flokati/modules/announcements/announcements.go

36 lines
504 B
Go
Raw Normal View History

2016-01-20 06:40:13 +00:00
// vi:ts=4:sts=4:sw=4:noet:tw=72
package announcements
import (
"log"
"strings"
2016-01-20 06:40:13 +00:00
"github.com/sorcix/irc"
)
var (
sayCh chan string
)
func Init(ch chan string) {
log.Println("Initializing announcements module")
sayCh = ch
}
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:
}
2016-01-20 06:40:13 +00:00
}