vendor: update libnmdc to master
This commit is contained in:
parent
94f8587d26
commit
8134143daa
2
Gopkg.lock
generated
2
Gopkg.lock
generated
@ -5,7 +5,7 @@
|
||||
branch = "master"
|
||||
name = "code.ivysaur.me/libnmdc"
|
||||
packages = ["."]
|
||||
revision = "9eddfc6e586fd4a99bdc87d32bade0cd1a5a33e6"
|
||||
revision = "74c20aaed6b2034c9dfb14e95b25aeca0b35d6fe"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
|
1
vendor/code.ivysaur.me/libnmdc/HubEvent.go
generated
vendored
1
vendor/code.ivysaur.me/libnmdc/HubEvent.go
generated
vendored
@ -14,6 +14,7 @@ const (
|
||||
EVENT_HUBNAME_CHANGED HubEventType = 9
|
||||
EVENT_DEBUG_MESSAGE HubEventType = 10
|
||||
EVENT_USERCOMMAND HubEventType = 11
|
||||
EVENT_BAD_LOGIN_FAILURE HubEventType = 12
|
||||
)
|
||||
|
||||
type HubEvent struct {
|
||||
|
4
vendor/code.ivysaur.me/libnmdc/NmdcProtocol.go
generated
vendored
4
vendor/code.ivysaur.me/libnmdc/NmdcProtocol.go
generated
vendored
@ -94,6 +94,7 @@ func (this *NmdcProtocol) ProcessCommand(message string) {
|
||||
this.hc.processEvent(HubEvent{EventType: EVENT_HUBNAME_CHANGED, Nick: commandParts[1]})
|
||||
|
||||
case "$ValidateDenide": // sic
|
||||
this.hc.processEvent(HubEvent{EventType: EVENT_BAD_LOGIN_FAILURE})
|
||||
if len(this.hc.Hco.NickPassword) > 0 {
|
||||
this.hc.processEvent(HubEvent{EventType: EVENT_SYSTEM_MESSAGE_FROM_CONN, Message: "Incorrect password."})
|
||||
} else {
|
||||
@ -101,15 +102,18 @@ func (this *NmdcProtocol) ProcessCommand(message string) {
|
||||
}
|
||||
|
||||
case "$HubIsFull":
|
||||
this.hc.processEvent(HubEvent{EventType: EVENT_BAD_LOGIN_FAILURE})
|
||||
this.hc.processEvent(HubEvent{EventType: EVENT_SYSTEM_MESSAGE_FROM_CONN, Message: "Hub is full."})
|
||||
|
||||
case "$BadPass":
|
||||
this.hc.processEvent(HubEvent{EventType: EVENT_BAD_LOGIN_FAILURE})
|
||||
this.hc.processEvent(HubEvent{EventType: EVENT_SYSTEM_MESSAGE_FROM_CONN, Message: "Incorrect password."})
|
||||
|
||||
case "$GetPass":
|
||||
if len(this.hc.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.hc.processEvent(HubEvent{EventType: EVENT_BAD_LOGIN_FAILURE})
|
||||
this.hc.processEvent(HubEvent{EventType: EVENT_SYSTEM_MESSAGE_FROM_CONN, Message: "This account is passworded."})
|
||||
this.hc.Disconnect()
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user