#
-# Infobot user extension stubs
+# User Command Extension Stubs
#
if (&IsParam("useStrict")) { use strict; }
&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;
}
$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.
if (!defined $string) {
&help("find");
- return 'NOREPLY';
+ return $noreply;
}
&Forker("debian", sub { &Debian::DebianFind($string); } );
- return 'NOREPLY';
+ return $noreply;
}
if (&IsParam("debian")) {
&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]+//;
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;
} 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;
&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 :)
# &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*//;
&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) {
&msg($who,"there ". &fixPlural("is",$i) ." \002$i\002 ".
"seen ". &fixPlural("entry",$i) ." that I know of.");
- return 'NOREPLY';
+ return $noreply;
}
my @seen;
&DEBUG("seen: _ => '$_'.");
}
&performReply("i haven't seen '$person'");
- return 'NOREPLY';
+ return $noreply;
}
# valid seen.
}
&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');
if ($msgType eq 'public' && $thiscmd =~ /^#/) {
&msg($who, "error: channel argument is not required.");
&msg($who, "\002Usage\002: topic <CMD>");
- 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 <CMD>");
- 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;
$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);
$arg = $2;
if (!defined $arg) {
&help("userinfo unset");
- return 'NOREPLY';
+ return $noreply;
}
&UserInfoSet($arg, "");
}
$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);
}
$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";
&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);
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
### 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);
if ($topiccount == 0) {
&msg($who, "No topic set.");
- return 'NOREPLY';
+ return $noreply;
}
if ($args eq "") {
&help("topic del");
- return 'NOREPLY';
+ return $noreply;
}
$args = ",".$args.",";
if ($args !~ /[\,\-\d]/) {
&msg($who, "error: Invalid argument ($args).");
- return 'NOREPLY';
+ return $noreply;
}
foreach (split ",", $args) {
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.
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:");
if ($args eq "") {
&help("topic mod");
- return 'NOREPLY';
+ return $noreply;
}
# a warning message instead of halting. we kind of trust the user now.
if ($flags !~ /^(g)?$/) {
&msg($who, "error: Invalid flags to regex.");
- return 'NOREPLY';
+ return $noreply;
}
my $topic = $topic{$chan}{'Current'};
} 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#...");
if ($args eq "") {
&help("topic mv");
- return 'NOREPLY';
+ return $noreply;
}
if ($args =~ /^(first|last|\d+)\s+(before|after|swap)\s+(first|last|\d+)$/i) {
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?
if ($from > $topiccount || $to > $topiccount || $from < 1 || $to < 1) {
&msg($who, "error: <from> or <to> is out of range.");
- return 'NOREPLY';
+ return $noreply;
}
if ($from == $to) {
&msg($who, "error: <from> and <to> are the same.");
- return 'NOREPLY';
+ return $noreply;
}
if ($action =~ /^(swap)$/i) {
$_ = "Swapped #\002$from\002 with #\002$to\002.";
&topicNew($chan, &topicCipher(@subtopics), $_, $topicUpdate);
- return 'NOREPLY';
+ return $noreply;
}
# action != swap:
$_ = "Moved #\002$from\002 $action #\002$to\002.";
&topicNew($chan, &topicCipher(@subtopics), $_, $topicUpdate);
- return 'NOREPLY';
+ return $noreply;
}
&msg($who, "Invalid arguments.");
### 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:");
### 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;
}
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.");
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;
&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:
}
&performStrictReply("$reply.");
- return 'NOREPLY';
+ return $noreply;
}
# Command statistics.
if (!scalar(keys %cmdstats)) {
&performReply("no-one has run any commands yet");
- return 'NOREPLY';
+ return $noreply;
}
my %countstats;
}
&performStrictReply("command usage include ". &IJoin(@array).".");
- return 'NOREPLY';
+ return $noreply;
}
# conversion: ascii.
$result = "NULL" if ($arg == 0);
&performReply( sprintf("ascii %s is '%s'", $arg, $result) );
- return 'NOREPLY';
+ return $noreply;
}
# conversion: ord.
}
&performReply( sprintf("'%s' is ascii %s", $arg, ord $1) );
- return 'NOREPLY';
+ return $noreply;
}
# hex.
if (!defined $arg) {
&help("hex");
- return 'NOREPLY';
+ return $noreply;
}
if (length $arg > 80) {
&msg($who, "Too long.");
- return 'NOREPLY';
+ return $noreply;
}
my $retval;
&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++
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;
&CmdFactInfo($faqtoid, $query);
$cmdstats{'Factoid Info'}++;
- return 'NOREPLY';
+ return $noreply;
}
# Factoid extension statistics. xk++
if (!defined $type) {
&help("factstats");
- return 'NOREPLY';
+ return $noreply;
}
&Forker("factoids", sub {
&performStrictReply( &CmdFactStats($type) );
} );
$cmdstats{'Factoid Statistics'}++;
- return 'NOREPLY';
+ return $noreply;
}
# help.
&help($2);
- return 'NOREPLY';
+ return $noreply;
}
# karma.
&performStrictReply("$target has neutral karma");
}
- return 'NOREPLY';
+ return $noreply;
}
# ignorelist.
if ($count == 0) {
&performStrictReply("no one in the ignore list!!!");
- return 'NOREPLY';
+ return $noreply;
}
foreach (sort keys %ignoreList) {
}
}
- return 'NOREPLY';
+ return $noreply;
}
# ispell.
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'";
&performStrictReply($reply);
- return 'NOREPLY';
+ return $noreply;
}
# nslookup.
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 "") {
&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)");
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",
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;
&msg($who, &formListReply(0, "'$factoid' is redirected to by '", @redir));
- return 'NOREPLY';
+ return $noreply;
}
# rot13 it.
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.
&performStrictReply($reply);
- return 'NOREPLY';
+ return $noreply;
}
# status.
"kB of memory."
);
- return 'NOREPLY';
+ return $noreply;
}
# tell.
my $args = $3;
if (!defined $args) {
&help("tell");
- return 'NOREPLY';
+ return $noreply;
}
my ($target, $tell_obj) = ('','');
# 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.
# 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.
&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'}";
&msg($who, $str);
&nick($param{'ircNick'});
- return 'NOREPLY';
+ return $noreply;
}
# what else...