]> git.donarmstrong.com Git - infobot.git/commitdiff
part now warns if we're on a channel - allow it anyway.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 22 Apr 2001 12:17:02 +0000 (12:17 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 22 Apr 2001 12:17:02 +0000 (12:17 +0000)
added "reset" to DCC CHAT

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@457 c11ca15a-4712-0410-83d8-924469b57eb5

src/Factoids/Question.pl
src/Factoids/Reply.pl
src/IRC/Irc.pl
src/Modules/UserDCC.pl

index f838b92ba8dfe9ecf85a6d7f05fdcbf0bddd3d78..51686a8a47ba75557ba1fb40584eea72b594449b 100644 (file)
@@ -26,7 +26,7 @@ sub doQuestion {
     $query =~ s/^\s+|\s+$//g;
 
     if (!defined $query or $query =~ /^\s*$/) {
-       &FIXME("doQ: query == NULL");
+       &FIXME("doQ: query == NULL (message => $message)");
        return '';
     }
 
index 1c470c4ca98c1a8584616e20adb273f436c401a8..dec2a12357b8f3316c64ad2431fab49fb407b3b6 100644 (file)
@@ -305,7 +305,7 @@ sub smart_replace {
     }
 
     if ($old eq $string) {
-       &WARN("smart_replace: no subst made.");
+       &WARN("smart_replace: no subst made. (string => $string)");
     }
 
     return $string;
index 6fd4f074086efba4d68121c48b88436823db4619..8d09e0abad3799c39fb8985c8298ec6826c89ffe 100644 (file)
@@ -425,8 +425,8 @@ sub part {
 
        &status("parting $chan");
        if (!&validChan($chan)) {
-           &status("part: not on $chan");
-           next;
+           &WARN("part: not on $chan; doing anyway");
+#          next;
        }
 
        rawout("PART $chan");
@@ -580,6 +580,7 @@ sub joinNextChan {
        }
 
        # chanserv check: channel specific.
+       ### what the hell is this for...
        &chanServCheck($chan);
 
     } else {
@@ -791,7 +792,7 @@ sub joinfloodCheck {
 sub getHostMask {
     my($n) = @_;
 
-    &FIXME("getHostMask...");
+    &FIXME("getHostMask($n) called...");
 }
 
 1;
index 4be0e86646ac25f1d2416fac3410556c9d6d8955..f8a309cc7f8c4fc443bac626ec13fed08684e004 100644 (file)
@@ -424,6 +424,29 @@ sub userDCC {
        return;
     }
 
+    # reset.
+    if ($message =~ /^reset$/i) {
+       return unless (&hasFlag("n"));
+
+       &msg($who,"resetting...");
+       my @done;
+       foreach ( keys %channels, keys %chanconf ) {
+           next if (grep /^\Q$_\E$/i, @done);
+
+           &part($_);
+
+           push(@done, $_);
+           sleep 1;
+       }
+       &clearIRCVars();
+       &joinNextChan();
+
+       &status("USER reset $who");
+       &msg($who,"resetted");
+
+       return;
+    }
+
     # rehash.
     if ($message =~ /^rehash$/) {
        return unless (&hasFlag("n"));