]> git.donarmstrong.com Git - infobot.git/commitdiff
add exactAddress channel configuration parameter
authordondelelcaro <dondelelcaro@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 22 Feb 2013 19:11:10 +0000 (19:11 +0000)
committerdondelelcaro <dondelelcaro@c11ca15a-4712-0410-83d8-924469b57eb5>
Fri, 22 Feb 2013 19:11:10 +0000 (19:11 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/branches/don/dpkg@1928 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/IrcHelpers.pl

index 25d78c11dc03593fc2d2c95bd11a0d1803fc8107..a2712673235c78401e2a0c6b30fcea0aa02beab5 100644 (file)
@@ -112,7 +112,11 @@ sub hookMsg {
             }
         }
 
-        if ( $message =~ /^($mask{nick})([\;\:\>\, ]+) */ ) {
+        my $nick_postfix_re = '[\;\:\>\, ]+';
+        if (getChanConf('exactAddress',0,$chan)) {
+            $nick_postfix_re = '[\;\:\>\,] '
+        }
+        if ( $message =~ /^($mask{nick})($nick_postfix_re) */ ) {
             my $newmessage = $';
             if ( $1 =~ /^\Q$mynick\E$/i ) {
                 $message   = $newmessage;