display a system message and disconnect if we're asked for a password but don't have one
This commit is contained in:
parent
58c1151278
commit
7f898dff32
@ -167,7 +167,14 @@ func (this *HubConnection) processProtocolMessage(message string) {
|
|||||||
this.processEvent(HubEvent{EventType: EVENT_SYSTEM_MESSAGE_FROM_CONN, Message: "Incorrect password."})
|
this.processEvent(HubEvent{EventType: EVENT_SYSTEM_MESSAGE_FROM_CONN, Message: "Incorrect password."})
|
||||||
|
|
||||||
case "$GetPass":
|
case "$GetPass":
|
||||||
this.SayRaw("$MyPass " + Escape(this.Hco.NickPassword) + "|")
|
if len(this.Hco.NickPassword) == 0 {
|
||||||
|
// We've got a problem. MyPass with no arguments is a syntax error with no message = instant close
|
||||||
|
// Just drop the connection
|
||||||
|
this.processEvent(HubEvent{EventType: EVENT_SYSTEM_MESSAGE_FROM_CONN, Message: "This account is passworded."})
|
||||||
|
this.Disconnect()
|
||||||
|
} else {
|
||||||
|
this.SayRaw("$MyPass " + Escape(this.Hco.NickPassword) + "|")
|
||||||
|
}
|
||||||
|
|
||||||
case "$Quit":
|
case "$Quit":
|
||||||
func() {
|
func() {
|
||||||
|
Loading…
Reference in New Issue
Block a user