]> 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 77f4480fdac2565732adeb6ee83ebf2bd0c4067b..2e2dc643fa8ffd1229e9a4e0aee1e23e89fdb99b 100644 (file)
@@ -232,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;
     }
@@ -443,7 +443,7 @@ sub countryStats {
        return;
     }
 
-    &rawout("WHO $chan");
+    $conn->who($chan);
     $cache{countryStats}{chan} = $chan;
     $cache{countryStats}{mtype}        = $msgType;
     $cache{countryStats}{who}  = $who;
@@ -611,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"));
@@ -825,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'}";
@@ -832,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;