# who.
if ($message =~ /^who$/) {
- my $count = scalar(keys %{$dcc{'CHAT'}});
+ my $count = scalar(keys %{ $dcc{'CHAT'} });
my $dccCHAT = $message;
&pSReply("Start of who ($count users).");
- foreach (keys %{$dcc{'CHAT'}}) {
+ foreach (keys %{ $dcc{'CHAT'} }) {
&pSReply("=> $_");
}
&pSReply("End of who.");
### 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"));
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"));
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;
}
&writeUserFile();
&writeChanFile();
+ &News::writeNews() if (&ChanConfList("news"));
return;
}