2 # IrcHooks.pl: IRC Hooks stuff.
3 # Author: xk <xk@leguin.openprojects.net>
5 # NOTE: Based on code by Kevin Lenzo & Patrick Cole (c) 1997
8 if (&IsParam("useStrict")) { use strict; }
14 my ($self, $event) = @_;
15 my $nick = $event->nick();
16 my $chan = ($event->to)[0];
18 &DEBUG("on_generic: nick => '$nick'.");
19 &DEBUG("on_generic: chan => '$chan'.");
21 foreach ($event->args) {
22 &DEBUG("on_generic: args => '$_'.");
27 my ($self, $event) = @_;
28 my ($nick, @args) = ($event->nick, $event->args);
29 my $chan = ($event->to)[0];
33 if ($chan eq $ident) {
34 &status("* [$nick] @args");
36 &status("* $nick/$chan @args");
41 my ($self, $event) = @_;
42 my $msg = ($event->args)[0];
43 my $sock = ($event->to)[0];
44 my $nick = $event->nick();
46 if (!exists $nuh{lc $nick}) {
47 &DEBUG("chat: nuh{$nick} doesn't exist; hrm should retry.");
53 $orig{message} = $msg;
55 $uh = (split /\!/, $nuh)[1];
60 if (!exists $dcc{'CHAT'}{$nick}) {
61 my $userHandle = &verifyUser($who, $nuh);
62 my $crypto = $userList{$userHandle}{'pass'};
65 if (!defined $crypto) {
66 &DEBUG("chat: no pass required.");
68 } elsif (&ckpasswd($msg, $crypto)) {
69 $self->privmsg($sock,"Authorized.");
70 $self->privmsg($sock,"I'll respond as if through /msg and addressed in public. Addition to that, access to 'user' commands will be allowed, like 'die' and 'jump'.");
71 # hrm... it's stupid to ask for factoids _within_ dcc chat.
72 # perhaps it should be default to commands, especially
73 # commands only authorized through DCC CHAT.
74 &status("DCC CHAT: passwd is ok.");
77 &status("DCC CHAT: incorrect pass; closing connection.");
78 &DEBUG("chat: sock => '$sock'.");
80 &DEBUG("chat: after closing sock. FIXME");
81 ### BUG: close seizes bot. why?
85 &status("DCC CHAT: user $nick is here!");
86 $dcc{'CHAT'}{$nick} = $sock;
87 &DCCBroadcast("$nick ($uh) has joined the chat arena.");
94 $userHandle = &verifyUser($who, $nuh);
95 &status("$b_red=$b_cyan$who$b_red=$ob $message");
96 if ($message =~ s/^\.//) { # dcc chat commands.
97 ### TODO: make use of &Forker(); here?
98 &loadMyModule($myModules{'ircdcc'});
99 return 'NOREPLY from userD' if (&userDCC() eq 'NOREPLY');
100 $conn->privmsg($dcc{'CHAT'}{$who}, "Invalid command.");
102 } else { # dcc chat arena.
103 foreach (keys %{$dcc{'CHAT'}}) {
104 $conn->privmsg($dcc{'CHAT'}{$_}, "<$who> $orig{message}");
108 return 'DCC CHAT MESSAGE';
114 if (&IsParam("wingate")) {
115 my $file = "$infobot_base_dir/$param{'ircUser'}.wingate";
119 next unless (/^(\S+)\*$/);
120 push(@wingateBad, $_);
125 ### TODO: move this to end of &joinNextChan()?
127 &DEBUG("on_EOM: calling sS in 60s.");
128 $conn->schedule(60, \&setupSchedulers, "");
132 if (&IsParam("ircUMode")) {
133 &status("Changing user modes to $param{'ircUMode'}.");
134 &rawout("MODE $ident $param{'ircUMode'}");
137 &status("End of motd. Now lets join some channels...");
138 if (!scalar @joinchan) {
139 &WARN("joinchan array is empty!!!");
140 @joinchan = split /[\t\s]+/, $param{'join_channels'};
147 my ($self, $event) = @_;
148 my $type = uc( ($event->args)[1] );
149 my $nick = $event->nick();
151 # pity Net::IRC doesn't store nuh. Here's a hack :)
154 if ($type eq 'SEND') {
155 # incoming DCC SEND. we're receiving a file.
156 $self->new_get($event, \*FH);
157 } elsif ($type eq 'CHAT') {
158 $self->new_chat($event);
160 &status("${b_green}DCC $type$ob unknown ...");
165 my ($self, $event) = @_;
166 my $nick = $event->nick();
167 my $sock = ($event->to)[0];
169 &DEBUG("dcc_close: nick => '$nick'.");
171 if (exists $dcc{'SEND'}{$nick} and -f "temp/$nick.txt") {
172 &status("${b_green}DCC SEND$ob close from $b_cyan$nick$ob");
174 &status("dcc_close: purging $nick.txt from Debian.pl");
175 unlink "temp/$nick.txt";
177 delete $dcc{'SEND'}{$nick};
178 } elsif (exists $dcc{'CHAT'}{$nick} and $dcc{'CHAT'}{$nick} eq $sock) {
179 &status("${b_green}DCC CHAT$ob close from $b_cyan$nick$ob");
180 delete $dcc{'CHAT'}{$nick};
182 &status("${b_green}DCC$ob UNKNOWN close from $b_cyan$nick$ob");
187 my ($self, $event) = @_;
188 my $type = uc( ($event->args)[0] );
189 my $nick = $event->nick();
190 my $sock = ($event->to)[0];
193 if ($type eq 'SEND') {
194 &status("${b_green}DCC lGET$ob established with $b_cyan$nick$ob");
195 } elsif ($type eq 'CHAT') {
196 &status("${b_green}DCC CHAT$ob established with $b_cyan$nick$ob ($nuh{$nick})");
197 my $userHandle = &verifyUser($nick, $nuh{lc $nick});
198 my $crypto = $userList{$userHandle}{'pass'};
199 if (defined $crypto) {
200 $self->privmsg($sock,"Enter Password, $userHandle.");
202 $self->privmsg($sock,"Welcome to blootbot DCC CHAT interface, $userHandle.");
205 &status("${b_green}DCC $type$ob unknown ...");
210 my ($self, $event) = @_;
211 my $from = $event->from();
212 my $what = ($event->args)[0];
214 &status("disconnect from $from ($what).");
215 $ircstats{'DisconnectReason'} = $what;
217 # clear any variables on reconnection.
222 if (!$self->connect()) {
223 &WARN("not connected? help me. ircCheck() should reconnect me");
228 my ($self, $event) = @_;
229 my $chan = ($event->args)[1];
231 if (exists $jointime{$chan}) {
232 my $delta_time = sprintf("%.03f", &gettimeofday() - $jointime{$chan});
233 $delta_time = 0 if ($delta_time < 0);
235 &status("$b_blue$chan$ob: sync in ${delta_time}s.");
238 rawout("MODE $chan");
242 foreach ("o","v","") {
243 my $count = scalar(keys %{$channels{$chan}{$_}});
244 next unless ($count);
246 $txt = "total" if ($_ eq "");
247 $txt = "voice" if ($_ eq "v");
248 $txt = "ops" if ($_ eq "o");
250 push(@array, "$count $txt");
252 my $chanstats = join(' || ', @array);
253 &status("$b_blue$chan$ob: [$chanstats]");
255 if (scalar @joinchan) { # remaining channels to join.
258 ### chanserv support.
259 ### TODO: what if we rejoin a channel.. need to set a var that
260 ### we've done the request-for-ops-on-join.
261 return unless (&IsParam("chanServ_ops"));
262 return unless ($nickserv);
264 my @chans = split(/[\s\t]+/, $param{'chanServ_ops'});
266 foreach $chan (keys %channels) {
267 next unless (grep /^$chan$/i, @chans);
269 if (!exists $channels{$chan}{'o'}{$ident}) {
270 &status("ChanServ ==> Requesting ops for $chan.");
271 rawout("PRIVMSG ChanServ :OP $chan $ident");
279 my ($self, $event) = @_;
280 my (@args) = ($event->args);
287 my ($self, $event) = @_;
288 my $chan = ($event->args)[0];
289 my $nick = $event->nick;
291 &DEBUG("on_invite: chan => '$chan', nick => '$nick'.");
293 # chan + possible_key.
294 ### do we need to know the key if we're invited???
295 ### grep the channel list?
296 foreach (split /[\s\t]+/, $param{'join_channels'}) {
297 next unless /^\Q$chan\E(,\S+)?$/i;
300 next if ($nick =~ /^\Q$ident\E$/);
301 if (&validChan($chan)) {
302 &msg($who, "i'm already in \002$chan\002.");
306 &status("invited to $b_blue$_$ob by $b_cyan$who$ob");
307 &joinchan($self, $_);
312 my ($self, $event) = @_;
313 my ($user,$host) = split(/\@/, $event->userhost);
314 $chan = lc( ($event->to)[0] ); # CASING!!!!
315 $who = $event->nick();
317 $chanstats{$chan}{'Join'}++;
318 $userstats{lc $who}{'Join'} = time() if (&IsParam("seenStats"));
322 if (exists $netsplit{lc $who}) {
323 delete $netsplit{lc $who};
327 # how to tell if there's a netjoin???
329 my $netsplitstr = "";
330 $netsplitstr = " $b_yellow\[${ob}NETSPLIT VICTIM$b_yellow]$ob" if ($netsplit);
331 &status(">>> join/$b_blue$chan$ob $b_cyan$who$ob $b_yellow($ob$user\@$host$b_yellow)$ob$netsplitstr");
333 $channels{$chan}{''}{$who}++;
334 $nuh{lc $who} = $who."!".$user."\@".$host unless (exists $nuh{lc $who});
337 &rootWarn($who,$user,$host,$chan)
338 if (&IsParam("rootWarn") &&
339 $user =~ /^r(oo|ew|00)t$/i &&
340 $channels{$chan}{'o'}{$ident});
342 # used to determine sync time.
343 if ($who =~ /^$ident$/i) {
344 if (defined( my $whojoin = $joinverb{$chan} )) {
345 &msg($chan, "Okay, I'm here. (courtesy of $whojoin)");
346 delete $joinverb{$chan};
349 ### TODO: move this to &joinchan()?
350 $jointime{$chan} = &gettimeofday();
353 ### TODO: this may go wild on a netjoin :)
360 my ($self, $event) = @_;
361 my ($chan,$reason) = $event->args;
362 my $kicker = $event->nick;
363 my $kickee = ($event->to)[0];
364 my $uh = $event->userhost();
366 &status(">>> kick/$b_blue$chan$ob [$b$kickee!$uh$ob] by $b_cyan$kicker$ob $b_yellow($ob$reason$b_yellow)$ob");
368 $chanstats{$chan}{'Kick'}++;
370 if ($kickee eq $ident) {
371 &clearChanVars($chan);
373 &status("SELF attempting to rejoin lost channel $chan");
376 &DeleteUserInfo($kickee,$chan);
381 my ($self, $event) = @_;
382 my ($user, $host) = split(/\@/, $event->userhost);
383 my @args = $event->args();
384 my $nick = $event->nick();
385 my $chan = ($event->to)[0];
389 if ($nick eq $chan) { # UMODE
390 &status(">>> mode $b_yellow\[$ob$b@args$b_yellow\]$ob by $b_cyan$nick$ob");
392 &status(">>> mode/$b_blue$chan$ob $b_yellow\[$ob$b@args$b_yellow\]$ob by $b_cyan$nick$ob");
393 &hookMode($chan, @args);
398 my ($self, $event) = @_;
399 my $nick = $event->nick();
400 my ($myself,$chan,@args) = $event->args();
402 &hookMode(lc $chan, @args); # CASING.
406 my ($self, $event) = @_;
407 my $nick = $event->nick;
408 my $chan = lc ( ($event->to)[0] ); # CASING.
409 my $msg = ($event->args)[0];
411 ($user,$host) = split(/\@/, $event->userhost);
412 $uh = $event->userhost();
413 $nuh = $nick."!".$uh;
415 &hookMsg('private', $chan, $nick, $msg);
419 my ($self, $event) = @_;
420 my @args = $event->args;
421 my $chan = lc $args[2]; # CASING, the last of them!
423 foreach (split / /, @args[3..$#args]) {
424 $channels{$chan}{'o'}{$_}++ if s/\@//;
425 $channels{$chan}{'v'}{$_}++ if s/\+//;
426 $channels{$chan}{''}{$_}++;
431 my ($self, $event) = @_;
432 my $nick = $event->nick();
433 my $newnick = ($event->args)[0];
436 foreach $chan (keys %channels) {
437 foreach $mode (keys %{$channels{$chan}}) {
438 next unless (exists $channels{$chan}{$mode}{$nick});
440 $channels{$chan}{$mode}{$newnick} = $channels{$chan}{$mode}{$nick};
443 &DeleteUserInfo($nick,keys %channels);
444 $nuh{lc $newnick} = $nuh{lc $nick};
445 delete $nuh{lc $nick};
447 # successful self-nick change.
448 if ($nick eq $ident) {
449 &status(">>> I materialized into $b_green$newnick$ob from $nick");
452 &status(">>> $b_cyan$nick$ob materializes into $b_green$newnick$ob");
458 my $nick = $self->nick;
459 my $newnick = substr($nick,0,8).int(rand(10));
461 &DEBUG("on_nick_taken: changing nick to $newnick.");
462 $self->nick($newnick);
467 my ($self, $event) = @_;
468 my $nick = $event->nick();
469 my $chan = ($event->to)[0];
470 my $args = ($event->args)[0];
472 if ($nick =~ /^NickServ$/i) { # nickserv.
473 &status("NickServ: <== '$args'");
475 if ($args =~ /^This nickname is registered/i) {
476 &status("nickserv told us to register; doing it.");
477 if (&IsParam("nickServ_pass")) {
478 &status("NickServ: ==> Identifying.");
479 &rawout("PRIVMSG NickServ :IDENTIFY $param{'nickServ_pass'}");
482 &status("We can't tell nickserv a passwd ;(");
487 if ($args =~ /^Password a/i) {
490 } elsif ($nick =~ /^ChanServ$/i) { # chanserv.
491 &status("ChanServ: <== '$args'.");
493 if ($chan =~ /^$mask{chan}$/) { # channel notice.
494 &status("-$nick/$chan- $args");
496 $server = $nick unless (defined $server);
497 &status("-$nick- $args"); # private or server notice.
503 my ($self, $event) = @_;
504 my $chan = ($event->to)[0];
505 my $nick = $event->nick;
507 &status("!!! other called.");
508 &status("!!! $event->args");
512 my ($self, $event) = @_;
513 my $chan = lc( ($event->to)[0] ); # CASING!!!
514 my $nick = $event->nick;
515 my $userhost = $event->userhost;
517 $chanstats{$chan}{'Part'}++;
518 &DeleteUserInfo($nick,$chan);
519 &clearChanVars($chan) if ($nick eq $ident);
520 if (!&IsNickInAnyChan($nick) and &IsParam("seenStats")) {
521 delete $userstats{lc $nick};
524 &status(">>> part/$b_blue$chan$ob $b_cyan$nick$ob $b_yellow($ob$userhost$b_yellow)$ob");
528 my ($self, $event) = @_;
529 my $nick = $event->nick;
531 $self->ctcp_reply($nick, join(' ', ($event->args)));
532 &status(">>> ${b_green}CTCP PING$ob request from $b_cyan$nick$ob received.");
536 my ($self, $event) = @_;
537 my $nick = $event->nick;
538 my $lag = time() - ($event->args)[1];
540 &status(">>> ${b_green}CTCP PING$ob reply from $b_cyan$nick$ob: $lag sec.");
544 my ($self, $event) = @_;
545 my $msg = ($event->args)[0];
546 my $chan = lc( ($event->to)[0] ); # CASING.
547 my $nick = $event->nick;
548 $uh = $event->userhost();
549 $nuh = $nick."!".$uh;
550 ($user,$host) = split(/\@/, $uh);
553 if ($statcount < 200) {
554 foreach $chan (grep /[A-Z]/, keys %channels) {
555 &DEBUG("leak: chan => '$chan'.");
557 foreach $i (keys %{$channels{$chan}}) {
558 foreach (keys %{$channels{$chan}{$i}}) {
559 &DEBUG("leak: \$channels{$chan}{$i}{$_} ...");
567 $lastWho{$chan} = $nick;
568 ### TODO: use $nick or lc $nick?
569 if (&IsParam("seenStats")) {
570 $userstats{lc $nick}{'Count'}++;
571 $userstats{lc $nick}{'Time'} = time();
574 # if (&IsParam("hehCounter")) {
578 &hookMsg('public', $chan, $nick, $msg);
579 $chanstats{$chan}{'PublicMsg'}++;
583 my ($self, $event) = @_;
584 my $nick = $event->nick();
585 my $reason = ($event->args)[0];
587 foreach (keys %channels) {
588 # fixes inconsistent chanstats bug #1.
589 next unless (&IsNickInChan($nick,$_));
590 $chanstats{$_}{'SignOff'}++;
592 &DeleteUserInfo($nick, keys %channels);
593 if (exists $nuh{lc $nick}) {
594 delete $nuh{lc $nick};
596 &DEBUG("on_quit: nuh{lc $nick} does not exist! FIXME");
598 delete $userstats{lc $nick} if (&IsParam("seenStats"));
600 # should fix chanstats inconsistencies bug #2.
601 if ($reason=~/^($mask{host})\s($mask{host})$/) { # netsplit.
602 $reason = "NETSPLIT: $1 <=> $2";
604 $netsplit{lc $nick} = time();
605 if (!exists $netsplitservers{$1}{$2}) {
606 &status("netsplit detected between $1 and $2.");
607 $netsplitservers{$1}{$2} = time();
611 &status(">>> $b_cyan$nick$ob has signed off IRC $b_red($ob$reason$b_red)$ob");
612 if ($nick =~ /^\Q$ident\E$/) {
613 &DEBUG("!!! THIS SHOULD NEVER HAPPEN. FIXME HOPEFULLY");
615 if ($nick !~ /^\Q$ident\E$/ and $nick =~ /^\Q$param{'ircNick'}\E$/i) {
616 &status("own nickname became free; changing.");
617 &nick($param{'ircNick'});
621 sub on_targettoofast {
622 my ($self, $event) = @_;
623 my $nick = $event->nick();
624 my $chan = ($event->to)[0];
626 &DEBUG("on_targettoofast: nick => '$nick'.");
627 &DEBUG("on_targettoofast: chan => '$chan'.");
629 foreach ($event->args) {
630 &DEBUG("on_targettoofast: args => '$_'.");
633 ### .* wait (\d+) second/) {
637 &status("going to sleep for $sleep...");
644 my ($self, $event) = @_;
646 if (scalar($event->args) == 1) { # change.
647 my $topic = ($event->args)[0];
648 my $chan = ($event->to)[0];
649 my $nick = $event->nick();
653 # race condition here. To fix, change '1' to '0'.
654 # This will keep track of topics set by bot only.
657 # this may be fixed at a later date with topic queueing.
660 $topic{$chan}{'Current'} = $topic if (1 and &IsParam("topic") == 1);
661 $chanstats{$chan}{'Topic'}++;
663 &status(">>> topic/$b_blue$chan$ob by $b_cyan$nick$ob -> $topic");
665 my ($nick, $chan, $topic) = $event->args;
666 if (&IsParam("topic")) {
667 $topic{$chan}{'Current'} = $topic;
668 &topicAddHistory($chan,$topic);
671 $topic = &fixString($topic, 1);
672 &status(">>> topic/$b_blue$chan$ob is $topic");
677 my ($self, $event) = @_;
678 my ($myself,$chan,$setby,$time) = $event->args();
681 if (time() - $time > 60*60*24) {
682 $timestr = "at ". localtime $time;
684 $timestr = &Time2String(time() - $time) ." ago";
687 &status(">>> set by $b_cyan$setby$ob $timestr");
691 my ($self, $event) = @_;
692 my $nick = $event->nick;
694 &status(">>> ${b_green}CTCP VERSION$ob request from $b_cyan$nick$ob");
695 $self->ctcp_reply($nick, "VERSION $infobot_version");
699 my ($self, $event) = @_;
700 my @args = $event->args;
702 $nuh{lc $args[5]} = $args[5]."!".$args[2]."\@".$args[3];
706 my ($self, $event) = @_;
707 my @args = $event->args;
709 $nuh{lc $args[1]} = $args[1]."!".$args[2]."\@".$args[3];
712 #######################################################################
713 ####### IRC HOOK HELPERS IRC HOOK HELPERS IRC HOOK HELPERS ########
714 #######################################################################
717 # Usage: &hookMode($chan, $modes, @targets);
719 my ($chan, $modes, @targets) = @_;
722 $chan = lc $chan; # !!!.
725 foreach $mode (split(//, $modes)) {
727 if ($mode =~ /[-+]/) {
728 $parity = 1 if ($mode eq "+");
729 $parity = 0 if ($mode eq "-");
734 if ($mode =~ /[bklov]/) {
735 my $target = shift @targets;
738 $chanstats{$chan}{'Op'}++ if ($mode eq "o");
739 $chanstats{$chan}{'Ban'}++ if ($mode eq "b");
741 $chanstats{$chan}{'Deop'}++ if ($mode eq "o");
742 $chanstats{$chan}{'Unban'}++ if ($mode eq "b");
745 # modes w/ target affecting nick => cache it.
746 if ($mode =~ /[ov]/) {
747 $channels{$chan}{$mode}{$target}++ if $parity;
748 delete $channels{$chan}{$mode}{$target} if !$parity;
751 if ($mode =~ /[l]/) {
752 $channels{$chan}{$mode} = $target if $parity;
753 delete $channels{$chan}{$mode} if !$parity;
757 # important channel modes, targetless.
758 if ($mode =~ /[mt]/) {
759 $channels{$chan}{$mode}++ if $parity;
760 delete $channels{$chan}{$mode} if !$parity;
766 ($msgType, $chan, $who, $message) = @_;
770 $orig{message} = $message;
774 $message =~ s/[\cA-\c_]//ig; # strip control characters
775 $message =~ s/^\s+//; # initial whitespaces.
776 $who =~ tr/A-Z/a-z/; # lowercase.
781 if ($msgType =~ /private/) {
786 # addressing revamped by the xk.
787 ### below needs to be fixed...
788 if (&IsParam("addressCharacter")) {
789 if ($message =~ s/^$param{'addressCharacter'}//) {
795 if ($message =~ /^($mask{nick})([\;\:\>\, ]+) */) {
797 if ($1 =~ /^\Q$ident\E$/i) {
798 $message = $newmessage;
801 # ignore messages addressed to other people or unaddressed.
802 $skipmessage++ if ($2 ne "" and $2 !~ /^ /);
807 # Determine floodwho.
808 if ($msgType =~ /public/i) { # public.
809 $floodwho = lc $chan;
810 } elsif ($msgType =~ /private/i) { # private.
813 &DEBUG("FIXME: floodwho = ???");
816 my ($count, $interval) = split(/:/, $param{'floodRepeat'} || "2:10");
818 # flood repeat protection.
820 my $time = $flood{$floodwho}{$message};
822 if (defined $time and (time - $time < $interval)) {
823 ### public != personal who so the below is kind of pointless.
825 foreach (keys %flood) {
826 next if (/^\Q$floodwho\E$/ or /^\Q$chan\E$/);
827 push(@who, grep /^\Q$message\E$/i, keys %{$flood{$_}});
830 &msg($who, "you already said what ".join(@who)." have said.");
832 &msg($who,"Someone already said that ". (time - $time) ." seconds ago" );
835 ### TODO: delete old floodwarn{} keys.
837 if (!exists $floodwarn{$floodwho}) {
840 $floodwarn++ if (time() - $floodwarn{$floodwho} > $interval);
844 &status("FLOOD repetition detected from $floodwho.");
845 $floodwarn{$floodwho} = time();
852 &status("$b_cyan$who$ob is short-addressing me");
854 &status("$b_cyan$who$ob is addressing me");
857 $flood{$floodwho}{$message} = time();
860 ($count, $interval) = split(/:/, $param{'floodMessages'} || "5:30");
861 # flood overflow protection.
863 foreach (keys %{$flood{$floodwho}}) {
864 next unless (time() - $flood{$floodwho}{$_} > $interval);
865 delete $flood{$floodwho}{$_};
868 my $i = scalar keys %{$flood{$floodwho}};
870 &msg($who,"overflow of messages ($i > $count)");
871 &status("FLOOD overflow detected from $floodwho; ignoring");
873 my $expire = $param{'ignoreAutoExpire'} || 5;
874 $ignoreList{"*!$uh"} = time() + ($expire * 60);
878 $flood{$floodwho}{$message} = time();
882 if ($msgType =~ /public/i) {
883 $talkchannel = $chan;
884 &status("<$orig{who}/$chan> $orig{message}");
888 if ($msgType =~ /private/i) {
889 &status("[$orig{who}] $orig{message}");
892 return if ($skipmessage);
893 return unless (&IsParam("minVolunteerLength") or $addressed);
896 foreach (keys %ignoreList) {
898 my @parts = split /\*/, "a${ignoreRE}a";
899 my $recast = join '\S*', map quotemeta($_), @parts;
900 $recast =~ s/^a(.*)a$/$1/;
901 if ($nuh =~ /^$recast$/) {
908 $userHandle = &verifyUser($who, $nuh);
910 &DEBUG("hookMsg: 'nuh' not defined?");
913 ### For extra debugging purposes...
914 if ($_ = &process()) {
915 # &DEBUG("IrcHooks: process returned '$_'.");