From 391b6d42cf51aaea7ef237afdfce5f7d07d94a97 Mon Sep 17 00:00:00 2001 From: William Orr Date: Sat, 1 Feb 2014 21:38:45 -0800 Subject: [PATCH] Added support for CTCP ACTION (/me) --- README.markdown | 1 + irc_callback.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.markdown b/README.markdown index dadc50b..3db1880 100644 --- a/README.markdown +++ b/README.markdown @@ -30,6 +30,7 @@ Events for callbacks * CTCP_CLIENTINFO * CTCP_TIME * CTCP_PING +* CTCP_ACTION (/me) * PRIVMSG * MODE * JOIN diff --git a/irc_callback.go b/irc_callback.go index 2c6bf1f..a066aae 100644 --- a/irc_callback.go +++ b/irc_callback.go @@ -54,6 +54,11 @@ func (irc *Connection) RunCallbacks(event *Event) { } else if event.Message == "CLIENTINFO" { event.Code = "CTCP_CLIENTINFO" + + } else if event.Message[0:6] == "ACTION" { + event.Code = "CTCP_ACTION" + event.Message = event.Message[7:] + } }