summaryrefslogtreecommitdiffstats
path: root/bridge/irc/irc.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-11-14 00:10:55 +0100
committerWim <wim@42.be>2016-11-14 00:10:55 +0100
commite4e822ef6a202775fc89eb6dc0807b2350e2469f (patch)
tree341fca8f297e788d9cb77d5f04e027805b789848 /bridge/irc/irc.go
parent69d6f4b2daa50484cd370b67b4d776c1ce1268f6 (diff)
downloadmatterbridge-msglm-e4e822ef6a202775fc89eb6dc0807b2350e2469f.tar.gz
matterbridge-msglm-e4e822ef6a202775fc89eb6dc0807b2350e2469f.tar.bz2
matterbridge-msglm-e4e822ef6a202775fc89eb6dc0807b2350e2469f.zip
Fix !users command for irc. Closes #78.
Diffstat (limited to 'bridge/irc/irc.go')
-rw-r--r--bridge/irc/irc.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index 61b55dab..c7b6f207 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -55,9 +55,9 @@ func New(cfg config.Protocol, origin string, c chan config.Message) *Birc {
func (b *Birc) Command(msg *config.Message) string {
switch msg.Text {
case "!users":
+ b.i.AddCallback(ircm.RPL_NAMREPLY, b.storeNames)
b.i.AddCallback(ircm.RPL_ENDOFNAMES, b.endNames)
b.i.SendRaw("NAMES " + msg.Channel)
- b.i.ClearCallback(ircm.RPL_ENDOFNAMES)
}
return ""
}
@@ -169,7 +169,6 @@ func (b *Birc) handleNewConnection(event *irc.Event) {
i.AddCallback("PRIVMSG", b.handlePrivMsg)
i.AddCallback("CTCP_ACTION", b.handlePrivMsg)
i.AddCallback(ircm.RPL_TOPICWHOTIME, b.handleTopicWhoTime)
- i.AddCallback(ircm.RPL_NAMREPLY, b.storeNames)
i.AddCallback(ircm.NOTICE, b.handleNotice)
//i.AddCallback(ircm.RPL_MYINFO, func(e *irc.Event) { flog.Infof("%s: %s", e.Code, strings.Join(e.Arguments[1:], " ")) })
i.AddCallback("PING", func(e *irc.Event) {