]> git.donarmstrong.com Git - infobot.git/commitdiff
Answer to ~ when apt isn't in the channel
authordondelelcaro <dondelelcaro@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 10 Jun 2006 22:42:30 +0000 (22:42 +0000)
committerdondelelcaro <dondelelcaro@c11ca15a-4712-0410-83d8-924469b57eb5>
Sat, 10 Jun 2006 22:42:30 +0000 (22:42 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/branches/don/dpkg@1290 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/Irc.pl
src/IRC/IrcHelpers.pl

index b121fdf7c5e7e0ca74b9e13868480e488eb3ca05..4ce64f66e247e4856c594614a1c03b9bdba41d51 100644 (file)
@@ -23,7 +23,8 @@ use vars qw(@ircServers);
 #use open ':std';
 
 $nickserv      = 0;
-my $maxlinelen = 400;
+# It's probably closer to 510, but let's be cautious until we calculate it extensively.
+my $maxlinelen = 490;
 
 sub ircloop {
     my $error  = 0;
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})([\;\:\>\, ]+) */) {