From: dms Date: Mon, 31 Jul 2000 12:33:02 +0000 (+0000) Subject: changed NOREPLY to dollar noreply X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ef22f8580cea78f710736e62750cb3304e3a583c;p=infobot.git changed NOREPLY to dollar noreply git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@19 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/blootbot/src/CommandStubs.pl b/blootbot/src/CommandStubs.pl index d8cb178..ed35aa2 100644 --- a/blootbot/src/CommandStubs.pl +++ b/blootbot/src/CommandStubs.pl @@ -1,5 +1,5 @@ # -# Infobot user extension stubs +# User Command Extension Stubs # if (&IsParam("useStrict")) { use strict; } @@ -47,12 +47,12 @@ sub Modules { &Forker("babelfish", sub { &babel::babelfish(lc $1, lc $2, $3); } ); $cmdstats{'BabelFish'}++; - return 'NOREPLY'; + return $noreply; } # cookie (random). xk++ if ($message =~ /^(cookie|random)(\s+(.*))?$/i) { - return 'NOREPLY' unless (&hasParam("cookie")); + return $noreply unless (&hasParam("cookie")); my $arg = $3; @@ -86,69 +86,69 @@ sub Modules { } $cmdstats{'Random Cookie'}++; - return 'NOREPLY'; + return $noreply; } if ($message =~ /^d?bugs$/i) { - return 'NOREPLY' unless (&hasParam("debianExtra")); + return $noreply unless (&hasParam("debianExtra")); &Forker("debianExtra", sub { &debianBugs(); } ); $cmdstats{'Debian Bugs'}++; - return 'NOREPLY'; + return $noreply; } # Debian Author Search. if ($message =~ /^dauthor(\s+(.*))?$/i) { - return 'NOREPLY' unless (&hasParam("debian")); + return $noreply unless (&hasParam("debian")); my $query = $2; if (!defined $query) { &help("dauthor"); - return 'NOREPLY'; + return $noreply; } &Forker("debian", sub { &Debian::searchAuthor($query); } ); $cmdstats{'Debian Author Search'}++; - return 'NOREPLY'; + return $noreply; } # Debian Incoming Search. if ($message =~ /^dincoming$/i) { - return 'NOREPLY' unless (&hasParam("debian")); + return $noreply unless (&hasParam("debian")); &Forker("debian", sub { &Debian::generateIncoming(); } ); $cmdstats{'Debian Incoming Search'}++; - return 'NOREPLY'; + return $noreply; } # Debian Distro(Package) Stats if ($message =~ /^dstats(\s+(.*))?$/i) { - return 'NOREPLY' unless (&hasParam("debian")); + return $noreply unless (&hasParam("debian")); my $dist = $2 || $Debian::defaultdist; &Forker("debian", sub { &Debian::infoStats($dist); } ); $cmdstats{'Debian Statistics'}++; - return 'NOREPLY'; + return $noreply; } # Debian Contents search. if ($message =~ /^d?contents(\s+(.*))?$/i) { - return 'NOREPLY' unless (&hasParam("debian")); + return $noreply unless (&hasParam("debian")); my $query = $2; if (!defined $query) { &help("contents"); - return 'NOREPLY'; + return $noreply; } &Forker("debian", sub { &Debian::searchContents($query); } ); $cmdstats{'Debian Contents Search'}++; - return 'NOREPLY'; + return $noreply; } # Debian Package info. @@ -157,11 +157,11 @@ sub Modules { if (!defined $string) { &help("find"); - return 'NOREPLY'; + return $noreply; } &Forker("debian", sub { &Debian::DebianFind($string); } ); - return 'NOREPLY'; + return $noreply; } if (&IsParam("debian")) { @@ -176,13 +176,13 @@ sub Modules { &help($1); } - return 'NOREPLY'; + return $noreply; } } # Dict. xk++ if ($message =~ /^dict(\s+(.*))?$/i) { - return 'NOREPLY' unless (&hasParam("dict")); + return $noreply unless (&hasParam("dict")); my $query = $2; $query =~ s/^[\s\t]+//; @@ -191,82 +191,82 @@ sub Modules { if (!defined $query) { &help("dict"); - return 'NOREPLY'; + return $noreply; } if (length $query > 30) { &msg($who,"dictionary word is too long."); - return 'NOREPLY'; + return $noreply; } &Forker("dict", sub { &Dict::Dict($query); } ); $cmdstats{'Dict'}++; - return 'NOREPLY'; + return $noreply; } # Freshmeat. xk++ if ($message =~ /^(fm|freshmeat)(\s+(.*))?$/i) { - return 'NOREPLY' unless (&hasParam("freshmeat")); + return $noreply unless (&hasParam("freshmeat")); my $query = $3; if (!defined $query) { &help("freshmeat"); &msg($who, "I have \002".&countKeys("freshmeat")."\002 entries."); - return 'NOREPLY'; + return $noreply; } &loadMyModule($myModules{'freshmeat'}); &Freshmeat::Freshmeat($query); $cmdstats{'Freshmeat'}++; - return 'NOREPLY'; + return $noreply; } # google searching. Simon++ if (&IsParam("wwwsearch") and $message =~ /^(?:search\s+)?($W3Search_regex)\s+for\s+['"]?(.*?)['"]?\s*\?*$/i) { - return 'NOREPLY' unless (&hasParam("wwwsearch")); + return $noreply unless (&hasParam("wwwsearch")); &Forker("wwwsearch", sub { &W3Search::W3Search($1,$2,$param{'wwwsearch'}); } ); $cmdstats{'WWWSearch'}++; - return 'NOREPLY'; + return $noreply; } # insult server. patch thanks to michael@limit.org if ($message =~ /^insult(\s+(\S+))?$/) { - return 'NOREPLY' unless (&hasParam("insult")); + return $noreply unless (&hasParam("insult")); my $person = $2; if (!defined $person) { &help("insult"); - return 'NOREPLY'; + return $noreply; } &Forker("insult", sub { &Insult::Insult($person); } ); - return 'NOREPLY'; + return $noreply; } # Kernel. xk++ if ($message =~ /^kernel$/i) { - return 'NOREPLY' unless (&hasParam("kernel")); + return $noreply unless (&hasParam("kernel")); &Forker("kernel", sub { &Kernel::Kernel(); } ); $cmdstats{'Kernel'}++; - return 'NOREPLY'; + return $noreply; } # LART. originally by larne/cerb. if ($message =~ /^lart(\s+(.*))?$/i) { - return 'NOREPLY' unless (&hasParam("lart")); + return $noreply unless (&hasParam("lart")); my ($target) = &fixString($2); if (!defined $target) { &help("lart"); - return 'NOREPLY'; + return $noreply; } my $extra = 0; @@ -279,11 +279,11 @@ sub Modules { } else { &msg($who, "error: invalid format or missing arguments."); &help("lart"); - return 'NOREPLY'; + return $noreply; } } - my $line = &getRandomLineFromFile($infobot_misc_dir. "/infobot.lart"); + my $line = &getRandomLineFromFile($bot_misc_dir. "/blootbot.lart"); if (defined $line) { if ($target =~ /^(me|you|itself|\Q$ident\E)$/i) { $line =~ s/WHO/$who/g; @@ -297,44 +297,44 @@ sub Modules { &status("lart: error reading file?"); } - return 'NOREPLY'; + return $noreply; } # Search factoid extensions by 'author'. xk++ if ($message =~ /^listauth(\s+(\S+))?$/i) { - return 'NOREPLY' unless (&hasParam("search")); + return $noreply unless (&hasParam("search")); my $query = $2; if (!defined $query) { &help("listauth"); - return 'NOREPLY'; + return $noreply; } &loadMyModule($myModules{'factoids'}); &performStrictReply( &CmdListAuth($query) ); - return 'NOREPLY'; + return $noreply; } # list{keys|values}. xk++. Idea taken from #linuxwarez@EFNET if ($message =~ /^list(\S+)( (.*))?$/i) { - return 'NOREPLY' unless (&hasParam("search")); + return $noreply unless (&hasParam("search")); my $thiscmd = lc($1); my $args = $3; $thiscmd =~ s/^vals$/values/; - return 'NOREPLY' if ($thiscmd ne "keys" && $thiscmd ne "values"); + return $noreply if ($thiscmd ne "keys" && $thiscmd ne "values"); # Usage: if (!defined $args) { &help("list". $thiscmd); - return 'NOREPLY'; + return $noreply; } if (length $args == 1) { &msg($who,"search string is too short."); - return 'NOREPLY'; + return $noreply; } ### chews up to 4megs => use forker :) @@ -343,12 +343,12 @@ sub Modules { # &Search::Search($thiscmd, $args); $cmdstats{'Factoid Search'}++; - return 'NOREPLY'; + return $noreply; } # Nickometer. Adam Spiers++ if ($message =~ /^(?:lame|nick)ometer(?: for)? (\S+)/i) { - return 'NOREPLY' unless (&hasParam("nickometer")); + return $noreply unless (&hasParam("nickometer")); my $term = (lc $1 eq 'me') ? $who : $1; $term =~ s/\?+\s*//; @@ -370,38 +370,38 @@ sub Modules { &msg($who, "the 'lame nick-o-meter' reading for $term is $percentage, $who"); } - return 'NOREPLY'; + return $noreply; } # Quotes. mu++ if ($message =~ /^quote(\s+(\S+))?$/i) { - return 'NOREPLY' unless (&hasParam("quote")); + return $noreply unless (&hasParam("quote")); my $query = $2; if ($query eq "") { &help("quote"); - return 'NOREPLY'; + return $noreply; } &Forker("quote", sub { &Quote::Quote($query); } ); $cmdstats{'Quote'}++; - return 'NOREPLY'; + return $noreply; } # rootWarn. xk++ if ($message =~ /^rootWarn$/i) { - return 'NOREPLY' unless (&hasParam("rootWarn")); + return $noreply unless (&hasParam("rootWarn")); &loadMyModule($myModules{'rootwarn'}); &performStrictReply( &CmdrootWarn() ); - return 'NOREPLY'; + return $noreply; } # seen. if ($message =~ /^seen(\s+(\S+))?$/) { - return 'NOREPLY' unless (&hasParam("seen")); + return $noreply unless (&hasParam("seen")); my $person = $2; if (!defined $person) { @@ -411,7 +411,7 @@ sub Modules { &msg($who,"there ". &fixPlural("is",$i) ." \002$i\002 ". "seen ". &fixPlural("entry",$i) ." that I know of."); - return 'NOREPLY'; + return $noreply; } my @seen; @@ -432,7 +432,7 @@ sub Modules { &DEBUG("seen: _ => '$_'."); } &performReply("i haven't seen '$person'"); - return 'NOREPLY'; + return $noreply; } # valid seen. @@ -464,30 +464,30 @@ sub Modules { } &performStrictReply($reply); - return 'NOREPLY'; + return $noreply; } # slashdot headlines: from Chris Tessone. if ($message =~ /^slashdot$/i) { - return 'NOREPLY' unless (&hasParam("slashdot")); + return $noreply unless (&hasParam("slashdot")); &Forker("slashdot", sub { &Slashdot::Slashdot() }); $cmdstats{'Slashdot'}++; - return 'NOREPLY'; + return $noreply; } # Topic management. xk++ # may want to add a flag(??) for topic in the near future. -xk if ($message =~ /^topic(\s+(.*))?$/i) { - return 'NOREPLY' unless (&hasParam("topic")); + return $noreply unless (&hasParam("topic")); my $chan = $talkchannel; my @args = split(/ /, $2); if (!scalar @args) { &msg($who,"Try 'help topic'"); - return 'NOREPLY'; + return $noreply; } $chan = lc(shift @args) if ($msgType eq 'private'); @@ -497,37 +497,37 @@ sub Modules { if ($msgType eq 'public' && $thiscmd =~ /^#/) { &msg($who, "error: channel argument is not required."); &msg($who, "\002Usage\002: topic "); - return 'NOREPLY'; + return $noreply; } # topic over private: if ($msgType eq 'private' && $chan !~ /^#/) { &msg($who, "error: channel argument is required."); &msg($who, "\002Usage\002: topic #channel "); - return 'NOREPLY'; + return $noreply; } if (&validChan($chan) == 0) { &msg($who,"error: invalid channel \002$chan\002"); - return 'NOREPLY'; + return $noreply; } # for semi-outsiders. if (!&IsNickInChan($who,$chan)) { &msg($who, "Failed. You ($who) are not in $chan, hey?"); - return 'NOREPLY'; + return $noreply; } # now lets do it. &loadMyModule($myModules{'topic'}); &Topic($chan, $thiscmd, join(' ', @args)); $cmdstats{'Topic'}++; - return 'NOREPLY'; + return $noreply; } # Countdown. if ($message =~ /^countdown(\s+(\S+))?$/i) { - return 'NOREPLY' unless (&hasParam("countdown")); + return $noreply unless (&hasParam("countdown")); my $query = $2; @@ -536,25 +536,25 @@ sub Modules { $cmdstats{'Countdown'}++; - return 'NOREPLY'; + return $noreply; } # User Information Services. requested by Flugh. if ($message =~ /^uinfo(\s+(.*))?$/i) { - return 'NOREPLY' unless (&hasParam("userinfo")); + return $noreply unless (&hasParam("userinfo")); &loadMyModule($myModules{'userinfo'}); my $arg = $1; if (!defined $arg or $arg eq "") { &help("uinfo"); - return 'NOREPLY'; + return $noreply; } if ($arg =~ /^set(\s+(.*))?$/i) { $arg = $2; if (!defined $arg) { &help("userinfo set"); - return 'NOREPLY'; + return $noreply; } &UserInfoSet(split /\s+/, $arg, 2); @@ -562,7 +562,7 @@ sub Modules { $arg = $2; if (!defined $arg) { &help("userinfo unset"); - return 'NOREPLY'; + return $noreply; } &UserInfoSet($arg, ""); @@ -571,16 +571,16 @@ sub Modules { } $cmdstats{'UIS'}++; - return 'NOREPLY'; + return $noreply; } # Uptime. xk++ if ($message =~ /^uptime$/i) { - return 'NOREPLY' unless (&hasParam("uptime")); + return $noreply unless (&hasParam("uptime")); my $count = 1; &msg($who, "- Uptime for $ident -"); - &msg($who, "Now: ". &Time2String(&uptimeNow()) ." running $infobot_version"); + &msg($who, "Now: ". &Time2String(&uptimeNow()) ." running $bot_version"); foreach (&uptimeGetInfo()) { /^(\d+)\.\d+ (.*)/; my $time = &Time2String($1); @@ -591,12 +591,12 @@ sub Modules { } $cmdstats{'Uptime'}++; - return 'NOREPLY'; + return $noreply; } # wingate. if ($message =~ /^wingate$/i) { - return 'NOREPLY' unless (&hasParam("wingate")); + return $noreply unless (&hasParam("wingate")); my $reply = "Wingate statistics: scanned \002" .scalar(keys %wingate)."\002 hosts"; @@ -608,17 +608,17 @@ sub Modules { &performStrictReply("$reply."); - return 'NOREPLY'; + return $noreply; } # convert. if ($message =~ /^convert(\s+(.*))?$/i) { - return 'NOREPLY' unless (&hasParam("units")); + return $noreply unless (&hasParam("units")); my $str = $2; if (!defined $str) { &help("convert"); - return 'NOREPLY'; + return $noreply; } my ($from,$to); @@ -627,12 +627,12 @@ sub Modules { if (!defined $from or !defined $to or $to eq "" or $from eq "") { &msg($who, "Invalid format!"); &help("convert"); - return 'NOREPLY'; + return $noreply; } &Forker("units", sub { &Units::convertUnits($from, $to); } ); - return 'NOREPLY'; + return $noreply; } # do nothing and let the other routines have a go diff --git a/blootbot/src/Modules/Topic.pl b/blootbot/src/Modules/Topic.pl index 97e68c0..8d52083 100644 --- a/blootbot/src/Modules/Topic.pl +++ b/blootbot/src/Modules/Topic.pl @@ -174,13 +174,13 @@ sub Topic { ### CMD: ADD: if ($args eq "") { &help("topic add"); - return 'NOREPLY'; + return $noreply; } # heh, joeyh. 19990819. -xk if ($who =~ /\|\|/) { &msg($who, "error: you have an invalid nick, loser!"); - return 'NOREPLY'; + return $noreply; } my @prev = &topicDecipher($chan); @@ -197,12 +197,12 @@ sub Topic { if ($topiccount == 0) { &msg($who, "No topic set."); - return 'NOREPLY'; + return $noreply; } if ($args eq "") { &help("topic del"); - return 'NOREPLY'; + return $noreply; } $args = ",".$args.","; @@ -214,7 +214,7 @@ sub Topic { if ($args !~ /[\,\-\d]/) { &msg($who, "error: Invalid argument ($args)."); - return 'NOREPLY'; + return $noreply; } foreach (split ",", $args) { @@ -231,13 +231,13 @@ sub Topic { push(@delete, $1); } else { &msg($who, "error: Invalid sub-argument ($_)."); - return 'NOREPLY'; + return $noreply; } foreach (@delete) { if ($_ > $topiccount || $_ < 1) { &msg($who, "error: argument out of range. (max: $topiccount)"); - return 'NOREPLY'; + return $noreply; } # skip if already deleted. # only checked if x-y range is given. @@ -263,7 +263,7 @@ sub Topic { my @topics = &topicDecipher($chan); if (!scalar @topics) { &msg($who, "No topics for \002$chan\002."); - return 'NOREPLY'; + return $noreply; } &msg($who, "Topics for \002$chan\002:"); @@ -284,7 +284,7 @@ sub Topic { if ($args eq "") { &help("topic mod"); - return 'NOREPLY'; + return $noreply; } # a warning message instead of halting. we kind of trust the user now. @@ -298,7 +298,7 @@ sub Topic { if ($flags !~ /^(g)?$/) { &msg($who, "error: Invalid flags to regex."); - return 'NOREPLY'; + return $noreply; } my $topic = $topic{$chan}{'Current'}; @@ -311,7 +311,7 @@ sub Topic { } else { &msg($who, "warning: regex not found in topic."); } - return 'NOREPLY'; + return $noreply; } &msg($who, "error: Invalid regex. Try s/1/2/, s#3#4#..."); @@ -321,7 +321,7 @@ sub Topic { if ($args eq "") { &help("topic mv"); - return 'NOREPLY'; + return $noreply; } if ($args =~ /^(first|last|\d+)\s+(before|after|swap)\s+(first|last|\d+)$/i) { @@ -332,7 +332,7 @@ sub Topic { if ($topiccount == 1) { &msg($who, "error: impossible to move the only subtopic, dumbass."); - return 'NOREPLY'; + return $noreply; } # Is there an easier way to do this? @@ -343,12 +343,12 @@ sub Topic { if ($from > $topiccount || $to > $topiccount || $from < 1 || $to < 1) { &msg($who, "error: or is out of range."); - return 'NOREPLY'; + return $noreply; } if ($from == $to) { &msg($who, "error: and are the same."); - return 'NOREPLY'; + return $noreply; } if ($action =~ /^(swap)$/i) { @@ -358,7 +358,7 @@ sub Topic { $_ = "Swapped #\002$from\002 with #\002$to\002."; &topicNew($chan, &topicCipher(@subtopics), $_, $topicUpdate); - return 'NOREPLY'; + return $noreply; } # action != swap: @@ -387,7 +387,7 @@ sub Topic { $_ = "Moved #\002$from\002 $action #\002$to\002."; &topicNew($chan, &topicCipher(@subtopics), $_, $topicUpdate); - return 'NOREPLY'; + return $noreply; } &msg($who, "Invalid arguments."); @@ -408,7 +408,7 @@ sub Topic { ### CMD: HISTORY: if (!scalar @{$topic{$chan}{'History'}}) { &msg($who, "Sorry, no topics in history list."); - return 'NOREPLY'; + return $noreply; } &msg($who, "History of topics on \002$chan\002:"); @@ -425,14 +425,14 @@ sub Topic { ### CMD: RESTORE: if ($args eq "") { &help("topic restore"); - return 'NOREPLY'; + return $noreply; } # following needs to be verified. if ($args =~ /^last$/i) { if (${$topic{$chan}{'History'}}[0] eq $topic{$chan}{'Current'}) { &msg($who,"error: cannot restore last topic because it's mine."); - return 'NOREPLY'; + return $noreply; } $args = 1; } @@ -440,13 +440,13 @@ sub Topic { if ($args =~ /\d+/) { if ($args > $#{$topic{$chan}{'History'}} || $args < 1) { &msg($who, "error: argument is out of range."); - return 'NOREPLY'; + return $noreply; } $_ = "Changing topic according to request."; &topicNew($chan, ${$topic{$chan}{'History'}}[$args-1], $_, $topicUpdate); - return 'NOREPLY'; + return $noreply; } &msg($who, "error: argument is not positive integer."); @@ -471,13 +471,13 @@ sub Topic { if ($cmd ne "" and $cmd !~ /^help/i) { &msg($who, "Invalid command [$cmd]."); &msg($who, "Try 'help topic'."); - return 'NOREPLY'; + return $noreply; } &help("topic"); } - return 'NOREPLY'; + return $noreply; } 1; diff --git a/blootbot/src/UserExtra.pl b/blootbot/src/UserExtra.pl index 30df109..8652f79 100644 --- a/blootbot/src/UserExtra.pl +++ b/blootbot/src/UserExtra.pl @@ -40,14 +40,14 @@ sub userCommands { &fixPlural("channel",scalar(keys %channels))."." ); - return 'NOREPLY'; + return $noreply; } # channel specific. if (&validChan($chan) == 0) { &msg($who,"error: invalid channel \002$chan\002"); - return 'NOREPLY'; + return $noreply; } # Step 1: @@ -104,7 +104,7 @@ sub userCommands { } &performStrictReply("$reply."); - return 'NOREPLY'; + return $noreply; } # Command statistics. @@ -113,7 +113,7 @@ sub userCommands { if (!scalar(keys %cmdstats)) { &performReply("no-one has run any commands yet"); - return 'NOREPLY'; + return $noreply; } my %countstats; @@ -131,7 +131,7 @@ sub userCommands { } &performStrictReply("command usage include ". &IJoin(@array)."."); - return 'NOREPLY'; + return $noreply; } # conversion: ascii. @@ -148,7 +148,7 @@ sub userCommands { $result = "NULL" if ($arg == 0); &performReply( sprintf("ascii %s is '%s'", $arg, $result) ); - return 'NOREPLY'; + return $noreply; } # conversion: ord. @@ -166,7 +166,7 @@ sub userCommands { } &performReply( sprintf("'%s' is ascii %s", $arg, ord $1) ); - return 'NOREPLY'; + return $noreply; } # hex. @@ -175,12 +175,12 @@ sub userCommands { if (!defined $arg) { &help("hex"); - return 'NOREPLY'; + return $noreply; } if (length $arg > 80) { &msg($who, "Too long."); - return 'NOREPLY'; + return $noreply; } my $retval; @@ -190,14 +190,14 @@ sub userCommands { &performStrictReply("$arg is$retval"); - return 'NOREPLY'; + return $noreply; } # crypt. if ($message =~ /^crypt\s+(\S+)\s*(?:,| )\s*(\S+)/) { # word salt. &performStrictReply(crypt($1, $2)); - return 'NOREPLY'; + return $noreply; } # Factoid extension info. xk++ @@ -208,7 +208,7 @@ sub userCommands { if ($faqtoid =~ /^\-(\S+)(\s+(.*))$/) { &msg($who,"error: individual factoid info queries not supported as yet."); &msg($who,"it's possible that the factoid mistakenly begins with '-'."); - return 'NOREPLY'; + return $noreply; $query = lc $1; $faqtoid = lc $3; @@ -218,7 +218,7 @@ sub userCommands { &CmdFactInfo($faqtoid, $query); $cmdstats{'Factoid Info'}++; - return 'NOREPLY'; + return $noreply; } # Factoid extension statistics. xk++ @@ -227,14 +227,14 @@ sub userCommands { if (!defined $type) { &help("factstats"); - return 'NOREPLY'; + return $noreply; } &Forker("factoids", sub { &performStrictReply( &CmdFactStats($type) ); } ); $cmdstats{'Factoid Statistics'}++; - return 'NOREPLY'; + return $noreply; } # help. @@ -243,7 +243,7 @@ sub userCommands { &help($2); - return 'NOREPLY'; + return $noreply; } # karma. @@ -259,7 +259,7 @@ sub userCommands { &performStrictReply("$target has neutral karma"); } - return 'NOREPLY'; + return $noreply; } # ignorelist. @@ -273,7 +273,7 @@ sub userCommands { if ($count == 0) { &performStrictReply("no one in the ignore list!!!"); - return 'NOREPLY'; + return $noreply; } foreach (sort keys %ignoreList) { @@ -299,7 +299,7 @@ sub userCommands { } } - return 'NOREPLY'; + return $noreply; } # ispell. @@ -309,17 +309,17 @@ sub userCommands { if ($query eq "") { &help("spell"); - return 'NOREPLY'; + return $noreply; } if (! -x "/usr/bin/spell") { &msg($who, "no binary found."); - return 'NOREPLY'; + return $noreply; } if (!&validExec($query)) { &msg($who,"argument appears to be fuzzy."); - return 'NOREPLY'; + return $noreply; } my $reply = "I can't find alternate spellings for '$query'"; @@ -349,7 +349,7 @@ sub userCommands { &performStrictReply($reply); - return 'NOREPLY'; + return $noreply; } # nslookup. @@ -358,18 +358,18 @@ sub userCommands { if ($3 eq "") { &help("nslookup"); - return 'NOREPLY'; + return $noreply; } &status("DNS Lookup: $3"); &loadMyModule($myModules{'allowDNS'}); &DNS($3); - return 'NOREPLY'; + return $noreply; } # cycle. if ($message =~ /^(cycle)(\s+(\S+))?$/i) { - return 'NOREPLY' unless (&hasFlag("o")); + return $noreply unless (&hasFlag("o")); my $chan = lc $3; if ($chan eq "") { @@ -378,13 +378,13 @@ sub userCommands { &DEBUG("cycle: setting chan to '$chan'."); } else { &help("cycle"); - return 'NOREPLY'; + return $noreply; } } if (&validChan($chan) == 0) { &msg($who,"error: invalid channel \002$chan\002"); - return 'NOREPLY'; + return $noreply; } &msg($chan, "I'm coming back. (courtesy of $who)"); @@ -392,23 +392,23 @@ sub userCommands { sleep 3; &joinchan($chan); - return 'NOREPLY'; + return $noreply; } # redir. if ($message =~ /^redir(\s+(.*))?/i) { - return 'NOREPLY' unless (&hasFlag("o")); + return $noreply unless (&hasFlag("o")); my $factoid = $2; if (!defined $factoid) { &help("redir"); - return 'NOREPLY'; + return $noreply; } my $val = &getFactInfo($factoid, "factoid_value"); if (!defined $val or $val eq "") { &msg($who, "error: '$factoid' does not exist."); - return 'NOREPLY'; + return $noreply; } &DEBUG("val => '$val'."); my @list = &searchTable("factoids", "factoid_key", @@ -416,11 +416,11 @@ sub userCommands { if (scalar @list == 1) { &msg($who, "hrm... '$factoid' is unique."); - return 'NOREPLY'; + return $noreply; } if (scalar @list > 5) { &msg($who, "A bit too many factoids to be redirected, hey?"); - return 'NOREPLY'; + return $noreply; } my @redir; @@ -438,7 +438,7 @@ sub userCommands { &msg($who, &formListReply(0, "'$factoid' is redirected to by '", @redir)); - return 'NOREPLY'; + return $noreply; } # rot13 it. @@ -447,13 +447,13 @@ sub userCommands { if ($reply eq "") { &help("rot13"); - return 'NOREPLY'; + return $noreply; } $reply =~ y/A-Za-z/N-ZA-Mn-za-m/; &performStrictReply($reply); - return 'NOREPLY'; + return $noreply; } # ircstats. @@ -480,7 +480,7 @@ sub userCommands { &performStrictReply($reply); - return 'NOREPLY'; + return $noreply; } # status. @@ -503,7 +503,7 @@ sub userCommands { "kB of memory." ); - return 'NOREPLY'; + return $noreply; } # tell. @@ -513,7 +513,7 @@ sub userCommands { my $args = $3; if (!defined $args) { &help("tell"); - return 'NOREPLY'; + return $noreply; } my ($target, $tell_obj) = ('',''); @@ -559,13 +559,13 @@ sub userCommands { # check target type. Deny channel targets. if ($target !~ /^$mask{nick}$/ or $target =~ /^$mask{chan}$/) { &msg($who,"No, $who, I won't."); - return 'NOREPLY'; + return $noreply; } # "intrusive". if (!&IsNickInAnyChan($target)) { &msg($who, "No, $target is not in any of my chans."); - return 'NOREPLY'; + return $noreply; } ### TODO: don't "tell" if sender is not in target's channel. @@ -573,17 +573,17 @@ sub userCommands { # self. if ($target eq $ident) { &msg($who, "Isn't that a bit silly?"); - return 'NOREPLY'; + return $noreply; } # ... my $result = &doQuestion($tell_obj); - return 'NOREPLY' if ($result eq "NOREPLY"); + return $noreply if ($result eq $noreply); # no such factoid. if ($result eq "") { &msg($who, "i dunno what is '$tell_obj'."); - return 'NOREPLY'; + return $noreply; } # success. @@ -597,14 +597,14 @@ sub userCommands { &msg($target, $reply); - return 'NOREPLY'; + return $noreply; } # wantNick. xk++ if ($message =~ /^wantNick$/i) { if ($param{'ircNick'} eq $ident) { &msg($who, "no need to get my nick back since i have it ;)"); - return 'NOREPLY'; + return $noreply; } my $str = "attempting to change nick to $param{'ircNick'}"; @@ -612,7 +612,7 @@ sub userCommands { &msg($who, $str); &nick($param{'ircNick'}); - return 'NOREPLY'; + return $noreply; } # what else...