From a95da1cb2c8315af13eab4a40f2a1cff68f9b282 Mon Sep 17 00:00:00 2001 From: Alex Bramley Date: Sun, 21 Aug 2011 13:22:26 +0100 Subject: [PATCH] Enforce upper-case CTCP commands. --- client/commands.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/commands.go b/client/commands.go index 0eaaead..011b039 100644 --- a/client/commands.go +++ b/client/commands.go @@ -73,7 +73,7 @@ func (conn *Conn) Ctcp(t, ctcp string, arg ...string) { if msg != "" { msg = " " + msg } - conn.Privmsg(t, "\001"+ctcp+msg+"\001") + conn.Privmsg(t, "\001"+strings.ToUpper(ctcp)+msg+"\001") } // CtcpReply() sends a generic CTCP reply to the target t @@ -83,7 +83,7 @@ func (conn *Conn) CtcpReply(t, ctcp string, arg ...string) { if msg != "" { msg = " " + msg } - conn.Notice(t, "\001"+ctcp+msg+"\001") + conn.Notice(t, "\001"+strings.ToUpper(ctcp)+msg+"\001") } // Version() sends a CTCP "VERSION" to the target t