Don't crash on empty ACTION
This commit is contained in:
parent
c47f9d8e3d
commit
6ce1e34c21
@ -104,7 +104,11 @@ func (irc *Connection) RunCallbacks(event *Event) {
|
||||
|
||||
} else if strings.HasPrefix(msg, "ACTION") {
|
||||
event.Code = "CTCP_ACTION"
|
||||
msg = msg[7:]
|
||||
if len(msg) > 6 {
|
||||
msg = msg[7:]
|
||||
} else {
|
||||
msg = ""
|
||||
}
|
||||
}
|
||||
|
||||
event.Arguments[len(event.Arguments)-1] = msg
|
||||
|
Loading…
Reference in New Issue
Block a user