From 4fd23123a78a173b3356cb74f7eff58849d1f408 Mon Sep 17 00:00:00 2001 From: djmcgrath Date: Fri, 19 Oct 2007 23:06:30 +0000 Subject: [PATCH] * New user flag "+s", to bypass +silent on channels git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1584 c11ca15a-4712-0410-83d8-924469b57eb5 --- files/infobot.help | 2 +- src/DynaConfig.pl | 1 + src/IRC/Irc.pl | 9 ++++++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/files/infobot.help b/files/infobot.help index 07784b0..5ae4fdf 100644 --- a/files/infobot.help +++ b/files/infobot.help @@ -482,4 +482,4 @@ flags: D: - can tell bot to join new channels flags: D: - can [un]lock factoids flags: D: "r" - remove factoid. flags: D: "t" - teach/add factoid. - +flags: D: "s" - Bypass +silent on channels diff --git a/src/DynaConfig.pl b/src/DynaConfig.pl index de814b4..74e7e4c 100644 --- a/src/DynaConfig.pl +++ b/src/DynaConfig.pl @@ -839,6 +839,7 @@ my @regFlagsUser = ( # can [un]lock factoids 'r', # remove factoid. 't', # teach/add factoid. + 's', # Bypass +silent on channels ); 1; diff --git a/src/IRC/Irc.pl b/src/IRC/Irc.pl index 70176e8..12aa203 100644 --- a/src/IRC/Irc.pl +++ b/src/IRC/Irc.pl @@ -213,7 +213,8 @@ sub say { return; } - if (&getChanConf('silent', $talkchannel)) { + if (&getChanConf('silent', $talkchannel) and not + (&IsFlag("s") and &verifyUser($who,$nuh{lc $who}))) { &DEBUG("say: silent in $talkchannel, not saying $msg"); return; } @@ -272,7 +273,8 @@ sub msg { } # some say() end up here (eg +help) - if (&getChanConf('silent', $nick)) { + if (&getChanConf('silent', $nick) and not + (&IsFlag("s") and &verifyUser($who,$nuh{lc $who}))) { &DEBUG("msg: silent in $nick, not saying $msg"); return; } @@ -313,7 +315,8 @@ sub action { return; } - if (&getChanConf('silent', $target)) { + if (&getChanConf('silent', $target) and not + (&IsFlag("s") and &verifyUser($who,$nuh{lc $who}))) { &DEBUG("action: silent in $target, not doing $txt"); return; } -- 2.39.2