diff --git a/irc_callback.go b/irc_callback.go index 4b71b3b..fad0d11 100644 --- a/irc_callback.go +++ b/irc_callback.go @@ -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