func RegisterHandlers(bot *ircx.Bot) { bot.AddCallback(irc.RPL_WELCOME, ircx.Callback{Handler: ircx.HandlerFunc(RegisterConnect)}) bot.AddCallback(irc.PING, ircx.Callback{Handler: ircx.HandlerFunc(PingHandler)}) maildirproxy := NewMaildirproxy(*server) bot.AddCallback(irc.PRIVMSG, ircx.Callback{Handler: ircx.HandlerFunc(maildirproxy.PrivmsgHandler)}) }
func (f *c) HandleFunc(t string, fn func(ircx.Sender, *irc.Message)) { f.handlers[t] = append(f.handlers[t], ircx.HandlerFunc(fn)) }
func RegisterHandlers(bot *ircx.Bot) { bot.AddCallback(irc.RPL_WELCOME, ircx.Callback{Handler: ircx.HandlerFunc(RegisterConnect)}) bot.AddCallback(irc.PING, ircx.Callback{Handler: ircx.HandlerFunc(PingHandler)}) }