]> git.donarmstrong.com Git - infobot.git/blobdiff - src/IRC/IrcHelpers.pl
Answer to ~ when apt isn't in the channel
[infobot.git] / src / IRC / IrcHelpers.pl
index 7e273d657c37608668a9239c9e15122ae1cad687..b68ad325185b4ccf37bd7cb2155371eb916e5f09 100644 (file)
@@ -107,6 +107,13 @@ sub hookMsg {
                $addrchar  = 1;
                $addressed = 1;
            }
+           elsif ($message =~ s/^\Q~\E//){
+               @chans = &getNickInChans('apt');
+               if (not grep $chan, @chans){
+                   $addrchar = 1;
+                   $addressed = 1;
+               }
+           }
        }
 
        if ($message =~ /^($mask{nick})([\;\:\>\, ]+) */) {