2 # IrcHooks.pl: IRC Hooks stuff.
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 = "$bot_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];
435 if (exists $netsplit{lc $newnick}) {
436 &DEBUG("on_nick: $newnick/$nick came back from netsplit and changed to original nick! removing from hash.");
437 delete $netsplit{lc $newnick};
441 foreach $chan (keys %channels) {
442 foreach $mode (keys %{$channels{$chan}}) {
443 next unless (exists $channels{$chan}{$mode}{$nick});
445 $channels{$chan}{$mode}{$newnick} = $channels{$chan}{$mode}{$nick};
448 &DeleteUserInfo($nick,keys %channels);
449 $nuh{lc $newnick} = $nuh{lc $nick};
450 delete $nuh{lc $nick};
452 # successful self-nick change.
453 if ($nick eq $ident) {
454 &status(">>> I materialized into $b_green$newnick$ob from $nick");
457 &status(">>> $b_cyan$nick$ob materializes into $b_green$newnick$ob");
463 my $nick = $self->nick;
464 my $newnick = substr($nick,0,8).int(rand(10));
466 &DEBUG("on_nick_taken: changing nick to $newnick.");
467 $self->nick($newnick);
472 my ($self, $event) = @_;
473 my $nick = $event->nick();
474 my $chan = ($event->to)[0];
475 my $args = ($event->args)[0];
477 if ($nick =~ /^NickServ$/i) { # nickserv.
478 &status("NickServ: <== '$args'");
480 if ($args =~ /^This nickname is registered/i) {
481 &status("nickserv told us to register; doing it.");
482 if (&IsParam("nickServ_pass")) {
483 &status("NickServ: ==> Identifying.");
484 &rawout("PRIVMSG NickServ :IDENTIFY $param{'nickServ_pass'}");
487 &status("We can't tell nickserv a passwd ;(");
492 if ($args =~ /^Password a/i) {
495 } elsif ($nick =~ /^ChanServ$/i) { # chanserv.
496 &status("ChanServ: <== '$args'.");
498 if ($chan =~ /^$mask{chan}$/) { # channel notice.
499 &status("-$nick/$chan- $args");
501 $server = $nick unless (defined $server);
502 &status("-$nick- $args"); # private or server notice.
508 my ($self, $event) = @_;
509 my $chan = ($event->to)[0];
510 my $nick = $event->nick;
512 &status("!!! other called.");
513 &status("!!! $event->args");
517 my ($self, $event) = @_;
518 my $chan = lc( ($event->to)[0] ); # CASING!!!
519 my $nick = $event->nick;
520 my $userhost = $event->userhost;
522 $chanstats{$chan}{'Part'}++;
523 &DeleteUserInfo($nick,$chan);
524 &clearChanVars($chan) if ($nick eq $ident);
525 if (!&IsNickInAnyChan($nick) and &IsParam("seenStats")) {
526 delete $userstats{lc $nick};
529 &status(">>> part/$b_blue$chan$ob $b_cyan$nick$ob $b_yellow($ob$userhost$b_yellow)$ob");
533 my ($self, $event) = @_;
534 my $nick = $event->nick;
536 $self->ctcp_reply($nick, join(' ', ($event->args)));
537 &status(">>> ${b_green}CTCP PING$ob request from $b_cyan$nick$ob received.");
541 my ($self, $event) = @_;
542 my $nick = $event->nick;
543 my $lag = time() - ($event->args)[1];
545 &status(">>> ${b_green}CTCP PING$ob reply from $b_cyan$nick$ob: $lag sec.");
549 my ($self, $event) = @_;
550 my $msg = ($event->args)[0];
551 my $chan = lc( ($event->to)[0] ); # CASING.
552 my $nick = $event->nick;
553 $uh = $event->userhost();
554 $nuh = $nick."!".$uh;
555 ($user,$host) = split(/\@/, $uh);
558 if ($statcount < 200) {
559 foreach $chan (grep /[A-Z]/, keys %channels) {
560 &DEBUG("leak: chan => '$chan'.");
562 foreach $i (keys %{$channels{$chan}}) {
563 foreach (keys %{$channels{$chan}{$i}}) {
564 &DEBUG("leak: \$channels{$chan}{$i}{$_} ...");
572 $lastWho{$chan} = $nick;
573 ### TODO: use $nick or lc $nick?
574 if (&IsParam("seenStats")) {
575 $userstats{lc $nick}{'Count'}++;
576 $userstats{lc $nick}{'Time'} = time();
579 # if (&IsParam("hehCounter")) {
583 &hookMsg('public', $chan, $nick, $msg);
584 $chanstats{$chan}{'PublicMsg'}++;
588 my ($self, $event) = @_;
589 my $nick = $event->nick();
590 my $reason = ($event->args)[0];
592 foreach (keys %channels) {
593 # fixes inconsistent chanstats bug #1.
594 next unless (&IsNickInChan($nick,$_));
595 $chanstats{$_}{'SignOff'}++;
597 &DeleteUserInfo($nick, keys %channels);
598 if (exists $nuh{lc $nick}) {
599 delete $nuh{lc $nick};
601 &DEBUG("on_quit: nuh{lc $nick} does not exist! FIXME");
603 delete $userstats{lc $nick} if (&IsParam("seenStats"));
605 # should fix chanstats inconsistencies bug #2.
606 if ($reason=~/^($mask{host})\s($mask{host})$/) { # netsplit.
607 $reason = "NETSPLIT: $1 <=> $2";
609 $netsplit{lc $nick} = time();
610 if (!exists $netsplitservers{$1}{$2}) {
611 &status("netsplit detected between $1 and $2.");
612 $netsplitservers{$1}{$2} = time();
616 &status(">>> $b_cyan$nick$ob has signed off IRC $b_red($ob$reason$b_red)$ob");
617 if ($nick =~ /^\Q$ident\E$/) {
618 &DEBUG("!!! THIS SHOULD NEVER HAPPEN. FIXME HOPEFULLY");
620 if ($nick !~ /^\Q$ident\E$/ and $nick =~ /^\Q$param{'ircNick'}\E$/i) {
621 &status("own nickname became free; changing.");
622 &nick($param{'ircNick'});
626 sub on_targettoofast {
627 my ($self, $event) = @_;
628 my $nick = $event->nick();
629 my $chan = ($event->to)[0];
631 &DEBUG("on_targettoofast: nick => '$nick'.");
632 &DEBUG("on_targettoofast: chan => '$chan'.");
634 foreach ($event->args) {
635 &DEBUG("on_targettoofast: args => '$_'.");
638 ### .* wait (\d+) second/) {
642 &status("going to sleep for $sleep...");
649 my ($self, $event) = @_;
651 if (scalar($event->args) == 1) { # change.
652 my $topic = ($event->args)[0];
653 my $chan = ($event->to)[0];
654 my $nick = $event->nick();
658 # race condition here. To fix, change '1' to '0'.
659 # This will keep track of topics set by bot only.
662 # this may be fixed at a later date with topic queueing.
665 $topic{$chan}{'Current'} = $topic if (1 and &IsParam("topic") == 1);
666 $chanstats{$chan}{'Topic'}++;
668 &status(">>> topic/$b_blue$chan$ob by $b_cyan$nick$ob -> $topic");
670 my ($nick, $chan, $topic) = $event->args;
671 if (&IsParam("topic")) {
672 $topic{$chan}{'Current'} = $topic;
673 &topicAddHistory($chan,$topic);
676 $topic = &fixString($topic, 1);
677 &status(">>> topic/$b_blue$chan$ob is $topic");
682 my ($self, $event) = @_;
683 my ($myself,$chan,$setby,$time) = $event->args();
686 if (time() - $time > 60*60*24) {
687 $timestr = "at ". localtime $time;
689 $timestr = &Time2String(time() - $time) ." ago";
692 &status(">>> set by $b_cyan$setby$ob $timestr");
696 my ($self, $event) = @_;
697 my $nick = $event->nick;
699 &status(">>> ${b_green}CTCP VERSION$ob request from $b_cyan$nick$ob");
700 $self->ctcp_reply($nick, "VERSION $bot_version");
704 my ($self, $event) = @_;
705 my @args = $event->args;
707 $nuh{lc $args[5]} = $args[5]."!".$args[2]."\@".$args[3];
711 my ($self, $event) = @_;
712 my @args = $event->args;
714 $nuh{lc $args[1]} = $args[1]."!".$args[2]."\@".$args[3];
717 #######################################################################
718 ####### IRC HOOK HELPERS IRC HOOK HELPERS IRC HOOK HELPERS ########
719 #######################################################################
722 # Usage: &hookMode($chan, $modes, @targets);
724 my ($chan, $modes, @targets) = @_;
727 $chan = lc $chan; # !!!.
730 foreach $mode (split(//, $modes)) {
732 if ($mode =~ /[-+]/) {
733 $parity = 1 if ($mode eq "+");
734 $parity = 0 if ($mode eq "-");
739 if ($mode =~ /[bklov]/) {
740 my $target = shift @targets;
743 $chanstats{$chan}{'Op'}++ if ($mode eq "o");
744 $chanstats{$chan}{'Ban'}++ if ($mode eq "b");
746 $chanstats{$chan}{'Deop'}++ if ($mode eq "o");
747 $chanstats{$chan}{'Unban'}++ if ($mode eq "b");
750 # modes w/ target affecting nick => cache it.
751 if ($mode =~ /[ov]/) {
752 $channels{$chan}{$mode}{$target}++ if $parity;
753 delete $channels{$chan}{$mode}{$target} if !$parity;
756 if ($mode =~ /[l]/) {
757 $channels{$chan}{$mode} = $target if $parity;
758 delete $channels{$chan}{$mode} if !$parity;
762 # important channel modes, targetless.
763 if ($mode =~ /[mt]/) {
764 $channels{$chan}{$mode}++ if $parity;
765 delete $channels{$chan}{$mode} if !$parity;
771 ($msgType, $chan, $who, $message) = @_;
775 $orig{message} = $message;
779 $message =~ s/[\cA-\c_]//ig; # strip control characters
780 $message =~ s/^\s+//; # initial whitespaces.
781 $who =~ tr/A-Z/a-z/; # lowercase.
786 if ($msgType =~ /private/) {
791 # addressing revamped by the xk.
792 ### below needs to be fixed...
793 if (&IsParam("addressCharacter")) {
794 if ($message =~ s/^$param{'addressCharacter'}//) {
800 if ($message =~ /^($mask{nick})([\;\:\>\, ]+) */) {
802 if ($1 =~ /^\Q$ident\E$/i) {
803 $message = $newmessage;
806 # ignore messages addressed to other people or unaddressed.
807 $skipmessage++ if ($2 ne "" and $2 !~ /^ /);
812 # Determine floodwho.
813 if ($msgType =~ /public/i) { # public.
814 $floodwho = lc $chan;
815 } elsif ($msgType =~ /private/i) { # private.
818 &DEBUG("FIXME: floodwho = ???");
821 my ($count, $interval) = split(/:/, $param{'floodRepeat'} || "2:10");
823 # flood repeat protection.
825 my $time = $flood{$floodwho}{$message};
827 if (defined $time and (time - $time < $interval)) {
828 ### public != personal who so the below is kind of pointless.
830 foreach (keys %flood) {
831 next if (/^\Q$floodwho\E$/ or /^\Q$chan\E$/);
832 push(@who, grep /^\Q$message\E$/i, keys %{$flood{$_}});
835 &msg($who, "you already said what ".join(@who)." have said.");
837 &msg($who,"Someone already said that ". (time - $time) ." seconds ago" );
840 ### TODO: delete old floodwarn{} keys.
842 if (!exists $floodwarn{$floodwho}) {
845 $floodwarn++ if (time() - $floodwarn{$floodwho} > $interval);
849 &status("FLOOD repetition detected from $floodwho.");
850 $floodwarn{$floodwho} = time();
857 &status("$b_cyan$who$ob is short-addressing me");
859 &status("$b_cyan$who$ob is addressing me");
862 $flood{$floodwho}{$message} = time();
865 ($count, $interval) = split(/:/, $param{'floodMessages'} || "5:30");
866 # flood overflow protection.
868 foreach (keys %{$flood{$floodwho}}) {
869 next unless (time() - $flood{$floodwho}{$_} > $interval);
870 delete $flood{$floodwho}{$_};
873 my $i = scalar keys %{$flood{$floodwho}};
875 &msg($who,"overflow of messages ($i > $count)");
876 &status("FLOOD overflow detected from $floodwho; ignoring");
878 my $expire = $param{'ignoreAutoExpire'} || 5;
879 $ignoreList{"*!$uh"} = time() + ($expire * 60);
883 $flood{$floodwho}{$message} = time();
887 if ($msgType =~ /public/i) {
888 $talkchannel = $chan;
889 &status("<$orig{who}/$chan> $orig{message}");
893 if ($msgType =~ /private/i) {
894 &status("[$orig{who}] $orig{message}");
897 return if ($skipmessage);
898 return unless (&IsParam("minVolunteerLength") or $addressed);
901 foreach (keys %ignoreList) {
903 my @parts = split /\*/, "a${ignoreRE}a";
904 my $recast = join '\S*', map quotemeta($_), @parts;
905 $recast =~ s/^a(.*)a$/$1/;
906 if ($nuh =~ /^$recast$/) {
913 $userHandle = &verifyUser($who, $nuh);
915 &DEBUG("hookMsg: 'nuh' not defined?");
918 ### For extra debugging purposes...
919 if ($_ = &process()) {
920 # &DEBUG("IrcHooks: process returned '$_'.");