]> git.donarmstrong.com Git - infobot.git/blobdiff - src/UserExtra.pl
- added support/hack for channel +o as "+o" in bot user file.
[infobot.git] / src / UserExtra.pl
index 23b287394c8e260a79a77333d52f9725d8b87f5b..2e2dc643fa8ffd1229e9a4e0aee1e23e89fdb99b 100644 (file)
@@ -5,8 +5,7 @@
 #      Created: 20000107
 #
 
-if (&IsParam("useStrict")) { use strict; }
-
+#use strict;
 use vars qw($message $arg $qWord $verb $lobotomized);
 use vars qw(%channels %chanstats %cmdstats);
 
@@ -233,7 +232,7 @@ sub karma {
 sub ispell {
     my $query = shift;
 
-    if (! -x "/usr/bin/spell") {
+    if (! -x "/usr/bin/ispell") {
        &msg($who, "no binary found.");
        return;
     }
@@ -444,7 +443,7 @@ sub countryStats {
        return;
     }
 
-    &rawout("WHO $chan");
+    $conn->who($chan);
     $cache{countryStats}{chan} = $chan;
     $cache{countryStats}{mtype}        = $msgType;
     $cache{countryStats}{who}  = $who;
@@ -612,6 +611,17 @@ sub userCommands {
        return;
     }
 
+    # reload.
+    if ($message =~ /^reload$/i) {
+       return unless (&hasFlag("n"));
+
+       &status("USER reload $who");
+       &pSReply("reloading...");
+       &reloadAllModules();
+       &pSReply("reloaded.");
+       return;
+    }
+
     # redir.
     if ($message =~ /^redir(\s+(.*))?/i) {
        return unless (&hasFlag("o"));
@@ -826,6 +836,8 @@ sub userCommands {
        if ($param{'ircNick'} eq $ident) {
            &msg($who, "I hope you're right. I'll try anyway.");
        }
+       &DEBUG("ircNick => $param{'ircNick'}");
+       &DEBUG("ident => $ident");
 
        if (! &IsNickInAnyChan( $param{ircNick} ) ) {
            my $str = "attempting to change nick to $param{'ircNick'}";
@@ -833,8 +845,9 @@ sub userCommands {
            &msg($who, $str);
            &nick($param{'ircNick'});
        } else {
-           &msg($who, "hrm... can't do it");
+           &msg($who, "hrm.. I shouldn't do it (BUG?) but doing it anyway!");
            &DEBUG("wN: nick is somewhere... should try later.");
+           &nick($param{'ircNick'});
        }
 
        return;