From 50e7e489c824211d24ca36ad6fa15181e254e0e4 Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Thu, 21 Jan 2016 07:45:56 +0100 Subject: [PATCH] Announcement commands (annadd, anndel, annlist). --- modules/announcements/announcements.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/announcements/announcements.go b/modules/announcements/announcements.go index 7d237af..54779ea 100644 --- a/modules/announcements/announcements.go +++ b/modules/announcements/announcements.go @@ -4,6 +4,7 @@ package announcements import ( "log" + "strings" "github.com/sorcix/irc" ) @@ -18,4 +19,17 @@ func Init(ch chan string) { } func HandleMessage(m *irc.Message) { + tok := strings.Split(m.Trailing, " ") + if len(tok) < 1 { + return + } + switch tok[0] { + case "!annadd": + /* add announcement */ + case "!anndel": + /* delete announcement */ + case "!annlist": + /* list announcement */ + default: + } }