added "reset" to DCC CHAT
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@457
c11ca15a-4712-0410-83d8-
924469b57eb5
$query =~ s/^\s+|\s+$//g;
if (!defined $query or $query =~ /^\s*$/) {
$query =~ s/^\s+|\s+$//g;
if (!defined $query or $query =~ /^\s*$/) {
- &FIXME("doQ: query == NULL");
+ &FIXME("doQ: query == NULL (message => $message)");
- &WARN("smart_replace: no subst made.");
+ &WARN("smart_replace: no subst made. (string => $string)");
&status("parting $chan");
if (!&validChan($chan)) {
&status("parting $chan");
if (!&validChan($chan)) {
- &status("part: not on $chan");
- next;
+ &WARN("part: not on $chan; doing anyway");
+# next;
}
# chanserv check: channel specific.
}
# chanserv check: channel specific.
+ ### what the hell is this for...
&chanServCheck($chan);
} else {
&chanServCheck($chan);
} else {
sub getHostMask {
my($n) = @_;
sub getHostMask {
my($n) = @_;
- &FIXME("getHostMask...");
+ &FIXME("getHostMask($n) called...");
+ # 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"));
# rehash.
if ($message =~ /^rehash$/) {
return unless (&hasFlag("n"));