no longer breaks on invalid ctcp requests
This commit is contained in:
parent
33fb824b4f
commit
d088b73396
@ -90,7 +90,7 @@ func (irc *Connection) RunCallbacks(event *Event) {
|
||||
} else if msg == "TIME" {
|
||||
event.Code = "CTCP_TIME"
|
||||
|
||||
} else if msg[0:4] == "PING" {
|
||||
} else if strings.HasPrefix(msg, "PING") {
|
||||
event.Code = "CTCP_PING"
|
||||
|
||||
} else if msg == "USERINFO" {
|
||||
@ -99,10 +99,11 @@ func (irc *Connection) RunCallbacks(event *Event) {
|
||||
} else if msg == "CLIENTINFO" {
|
||||
event.Code = "CTCP_CLIENTINFO"
|
||||
|
||||
} else if msg[0:6] == "ACTION" {
|
||||
} else if strings.HasPrefix(msg, "ACTION") {
|
||||
event.Code = "CTCP_ACTION"
|
||||
msg = msg[7:]
|
||||
}
|
||||
|
||||
event.Arguments[len(event.Arguments)-1] = msg
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user