From c42130dcd5705838b153f663fff4e68b141f9c45 Mon Sep 17 00:00:00 2001 From: dms Date: Fri, 2 Feb 2001 13:38:30 +0000 Subject: [PATCH] tiny changes that I've missed git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@307 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/DynaConfig.pl | 2 +- src/Factoids/Norm.pl | 2 +- src/Factoids/Question.pl | 6 +++--- src/Factoids/Reply.pl | 1 - src/Factoids/Update.pl | 2 +- src/Misc.pl | 2 +- src/core.pl | 3 ++- src/modules.pl | 1 + 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/DynaConfig.pl b/src/DynaConfig.pl index cb9c30e..ba42451 100644 --- a/src/DynaConfig.pl +++ b/src/DynaConfig.pl @@ -372,7 +372,7 @@ sub verifyUser { my ($user,$m); if ($userHandle = $dcc{'CHATvrfy'}{$who}) { - &VERB("vUser: cached auth for $who.",2); + &DEBUG("vUser: cached auth for $who."); return $userHandle; } diff --git a/src/Factoids/Norm.pl b/src/Factoids/Norm.pl index 47839ea..92b1513 100644 --- a/src/Factoids/Norm.pl +++ b/src/Factoids/Norm.pl @@ -87,7 +87,7 @@ sub switchPerson { $in =~ s/(^|\W)your(\W|$)/$1$param{'ircNick'}\'s$2/ig; } - $in; + return $in; } # --- diff --git a/src/Factoids/Question.pl b/src/Factoids/Question.pl index 1cef709..1001c0b 100644 --- a/src/Factoids/Question.pl +++ b/src/Factoids/Question.pl @@ -100,14 +100,14 @@ sub doQuestion { } ### TODO: Use &Forker(); move function to Freshmeat.pl. - if (&IsParam("freshmeatForFactoid")) { + if (&IsChanConf("freshmeatForFactoid")) { &loadMyModule($myModules{'freshmeat'}); $result = &Freshmeat::showPackage($query); return $result if (defined $result); } ### TODO: Use &Forker(); move function to Debian.pl - if (&IsParam("debianForFactoid")) { + if (&IsChanConf("debianForFactoid")) { &loadMyModule($myModules{'debian'}); $result = &Debian::DebianFind($query); # ??? ### TODO: debian module should tell, through shm, that it went @@ -129,7 +129,7 @@ sub doQuestion { } } - $reply; + return $reply; } 1; diff --git a/src/Factoids/Reply.pl b/src/Factoids/Reply.pl index c11938b..d0375be 100644 --- a/src/Factoids/Reply.pl +++ b/src/Factoids/Reply.pl @@ -310,5 +310,4 @@ sub smart_replace { return $string; } - 1; diff --git a/src/Factoids/Update.pl b/src/Factoids/Update.pl index af6f4c4..1a2cf3a 100644 --- a/src/Factoids/Update.pl +++ b/src/Factoids/Update.pl @@ -52,7 +52,7 @@ sub update { my $also = ($rhs =~ s/^also //i); my $also_or = ($also and $rhs =~ s/\s+(or|\|\|)\s+//); - if (&IsParam("freshmeatForFactoid")) { + if (&IsChanConf("freshmeatForFactoid")) { if (&dbGet("freshmeat", "name", $lhs, "name")) { &msg($who, "permission denied. (freshmeat)"); &status("alert: $who wanted to teach me something that freshmeat already has info on."); diff --git a/src/Misc.pl b/src/Misc.pl index 22cd0ea..2ae258d 100644 --- a/src/Misc.pl +++ b/src/Misc.pl @@ -611,10 +611,10 @@ sub hasProfanity { sub hasParam { my ($param) = @_; - ### TODO: specific reason why it failed. if (&IsChanConf($param)) { return 1; } else { + ### TODO: specific reason why it failed. &msg($who, "unfortunately, \002$param\002 is disabled in my configuration") unless ($addrchar); return 0; } diff --git a/src/core.pl b/src/core.pl index b075235..d868f8e 100644 --- a/src/core.pl +++ b/src/core.pl @@ -85,7 +85,7 @@ sub doExit { &quit($param{'quitMsg'}) if (&whatInterface() =~ /IRC/); &writeUserFile(); &writeChanFile(); - &uptimeWriteFile() if (&IsParam("uptime")); + &uptimeWriteFile() if (&ChanConfList("uptime")); &closeDB(); &closeSHM($shm); &dumpallvars() if (&IsParam("dumpvarsAtExit")); @@ -364,6 +364,7 @@ sub restart { return; } + &DCCBroadcast("-HUP called.","m"); &shutdown(); &loadConfig($bot_misc_dir."/blootbot.config"); &reloadAllModules() if (&IsParam("DEBUG")); diff --git a/src/modules.pl b/src/modules.pl index 333c43e..8bb6909 100644 --- a/src/modules.pl +++ b/src/modules.pl @@ -44,6 +44,7 @@ if ($@) { "wingate" => "Wingate.pl", "insult" => "insult.pl", "nickometer" => "nickometer.pl", + "babelfish" => "babel.pl", ); @myModulesLoadNow = ('topic', 'uptime',); @myModulesReloadNot = ('IRC/Irc.pl','IRC/Schedulers.pl'); -- 2.39.2