Documentation ¶
Overview ¶
Package login provides a login protocol server.
Index ¶
- func ChangeLoginServer(w *net.Message) error
- func CharacterList(w *net.Message, chars []CharacterListEntry, premiumDays uint16) error
- func Error(w *net.Message, errorText string) error
- func FYI(w *net.Message, fyiText string) error
- func MOTD(w *net.Message, motdText string) error
- type CharacterListEntry
- type LoginServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChangeLoginServer ¶
ChangeLoginServer sends network message with ID 0x28, of uncertain functionality.
func CharacterList ¶
func CharacterList(w *net.Message, chars []CharacterListEntry, premiumDays uint16) error
CharacterList sends the network message containing the passed characters on the character list, and tells the user they have premiumDays left.
func Error ¶
Error writes a login error network message to the passed net.Message.
Passed error text will be included.
func FYI ¶
FYI writes an FYI network message to the passed net.Messsage.
Passed FYI text will be included.
func MOTD ¶
MOTD writes the message-of-the-day network message to the passed net.Message.
Passed motdText will be included.
The motdText should begin with ascii-encoded decimal number identifying the sequence number of the MOTD, then it should be followed by a newline set of characters (ascii 13+10, \r\n). The number is used by the client to avoid bothering the user with the same message that was already seen.
Types ¶
type CharacterListEntry ¶
CharacterListEntry represents a single character presented on the character list.
type LoginServer ¶
type LoginServer struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(pk *rsa.PrivateKey) (*LoginServer, error)
NewServer creates a new LoginServer which can decrypt the initial login message using the passed RSA private key.