summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-10-29 16:27:07 +0200
committerWim <wim@42.be>2016-10-29 16:27:07 +0200
commit721e0a2dcda045b9a95e041e2ec5f37023b3bdcf (patch)
tree0382b9ce2ecd79d6c687a299d39a824776b23345
parent8452eb12dad99aa65bc3acfe6782d75fdc010c0a (diff)
downloadmatterbridge-msglm-721e0a2dcda045b9a95e041e2ec5f37023b3bdcf.tar.gz
matterbridge-msglm-721e0a2dcda045b9a95e041e2ec5f37023b3bdcf.tar.bz2
matterbridge-msglm-721e0a2dcda045b9a95e041e2ec5f37023b3bdcf.zip
Ignore private queries (irc bridge)
-rw-r--r--bridge/irc/irc.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index 41b97f9c..b4429956 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -160,7 +160,11 @@ func (b *Birc) handleOther(event *irc.Event) {
}
func (b *Birc) handlePrivMsg(event *irc.Event) {
- flog.Debugf("handlePrivMsg() %s %s", event.Nick, event.Message())
+ // don't forward queries to the bot
+ if event.Arguments[0] == b.Nick {
+ return
+ }
+ flog.Debugf("handlePrivMsg() %s %s %#v", event.Nick, event.Message(), event)
msg := ""
if event.Code == "CTCP_ACTION" {
msg = event.Nick + " "