]> git.donarmstrong.com Git - infobot.git/blobdiff - src/Modules/UserDCC.pl
- added top3 irctextcounter stats
[infobot.git] / src / Modules / UserDCC.pl
index 4be0e86646ac25f1d2416fac3410556c9d6d8955..58c67b48ac3b75acf6e3564d57293462b8e80447 100644 (file)
@@ -38,6 +38,19 @@ sub userDCC {
 
     ### for those users with enough flags.
 
+    if ($message =~ /^tellme(\s+(.*))?$/i) {
+       my $args = $2;
+       if ($args =~ /^\s*$/) {
+           &help("tellme");
+           return;
+       }
+
+       my $result = &doQuestion($args);
+       &pSReply($result);
+
+       return;
+    }
+
     # 4op.
     if ($message =~ /^4op(\s+($mask{chan}))?$/i) {
        return unless (&hasFlag("o"));
@@ -424,6 +437,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"));
@@ -660,7 +696,7 @@ sub userDCC {
 
        if (scalar @args == 1) {        # del pass.
            if (!&IsFlag("n") and $who !~ /^\Q$verifyUser\E$/i) {
-               &pSReply("cannto remove passwd of others.");
+               &pSReply("cannot remove passwd of others.");
                return;
            }