From 721e0a2dcda045b9a95e041e2ec5f37023b3bdcf Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 29 Oct 2016 16:27:07 +0200 Subject: Ignore private queries (irc bridge) --- bridge/irc/irc.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bridge') 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 + " " -- cgit v1.2.3