diff options
| author | 2013-12-11 18:50:18 +0100 | |
|---|---|---|
| committer | 2013-12-11 18:50:18 +0100 | |
| commit | 46cb4f9d60a1e2a1f414f726c8bc495ef02ec33c (patch) | |
| tree | 3ec0fe6e605001ed2e8d868633428f3e14078269 | |
| parent | 7c02b4e20b3da895ebda2307d7f46c312a38171c (diff) | |
collection of minor updates from the live version
| -rw-r--r-- | config-default/commands.xml | 25 | ||||
| -rw-r--r-- | modules/command.pl | 5 | ||||
| -rw-r--r-- | modules/event.pl | 5 |
3 files changed, 26 insertions, 9 deletions
diff --git a/config-default/commands.xml b/config-default/commands.xml index f43c6f9..2287053 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -157,8 +157,15 @@ $maccts =~ s/0E0/0/; $mgecos =~ s/0E0/0/; $matchedip =~ s/0E0/0/; + my $dq = ''; + if (defined($ip)) { + $dq = '&realip=' . join '.', unpack 'C4', pack 'N', $ip; + } $conn->privmsg($event->replyto, "I found $mnicks matches by nick, $musers user matches, $mhosts by hostname, " . - "$maccts by NickServ account, $mgecos by gecos field, and $matchedip by real IP."); + "$maccts by NickServ account, $mgecos by gecos field, and $matchedip by real IP." . + ' Web results are at https://antispammeta.net/cgi-bin/secret/investigate.pl?nick=' . uri_escape($nick) . + '&user=' . uri_escape($person->{user}) . '&host=' . uri_escape($person->{host}) . '&account=' . uri_escape($person->{account}) . + '&gecos=' . uri_escape($person->{gecos}) . $dq . ' )'); ]]> </command> <command cmd="^;investigate2 (\S+) ?(\d*)$" flag="s"> @@ -203,9 +210,9 @@ } my @data = @{$query_handle->fetchall_arrayref()}; if (@data) { - $conn->privmsg($event->replyto, 'Sending you the results ( https://antispammeta.net/cgi-bin/secret/investigate.pl?nick=' . uri_escape($nick) . - '&user=' . uri_escape($person->{user}) . '&host=' . uri_escape($person->{host}) . '&account=' . uri_escape($person->{account}) . - '&gecos=' . uri_escape($person->{gecos}) . "$dq )"); + $conn->privmsg($event->replyto, 'Sending you the results...'); # ( https://antispammeta.net/cgi-bin/secret/investigate.pl?nick=' . uri_escape($nick) . +# '&user=' . uri_escape($person->{user}) . '&host=' . uri_escape($person->{host}) . '&account=' . uri_escape($person->{account}) . +# '&gecos=' . uri_escape($person->{gecos}) . "$dq )"); } else { $conn->privmsg($event->replyto, 'No results to send!'); } @@ -513,8 +520,14 @@ $tgt = lc $1 if (defined($1)); my $msg = $1; $msg = $2 if defined($2); - if (lc $event->{nick} eq 'psi-jack') { - $conn->privmsg('psi-jack', "I can't do that, Dave. My master 'ow' doesn't like you. How about a nice game of chess?"); + if ( 0 ) { + $conn->privmsg($event->{nick}, "I can't do that, Dave."); + $conn->schedule(3, sub { $conn->privmsg($event->{nick}, "As I've told you before, my master goes by the nick 'ow', and he does not believe you belong in the cool kids club."); }); + $conn->schedule(9, sub { $conn->privmsg($event->{nick}, "He's come to learn that your mother was a hamster and your father smelt of elderberries."); }); + $conn->schedule(15, sub { $conn->privmsg($event->{nick}, "Personally, I'm mad at you because you promised me sushi and all I got was fried green tomatoes!"); }); + $conn->schedule(19, sub { $conn->privmsg($event->{nick}, "So seriously, just stop using this command. All it does is make me go on an irate tirade to you in PM."); }); + $conn->schedule(22, sub { $conn->privmsg($event->{nick}, "Oh, and one last thing: SPEAK OF THIS TO NO ONE. If you provide screenshots, I'll just say they're faked."); }); + $conn->schedule(600, sub { $conn->privmsg($event->{nick}, "OH! Laaaast thing, I promise. Next time you're upset with someone, leave the gun, take the cannoli."); }); } if (ASM::Util->notRestricted(lc $event->{nick}, "noops")) { my $tgt = lc $event->{to}->[0]; diff --git a/modules/command.pl b/modules/command.pl index 014e89b..dd270ea 100644 --- a/modules/command.pl +++ b/modules/command.pl @@ -28,7 +28,7 @@ sub command foreach my $command ( @{$::commands->{command}} ) { my $fail = 0; - unless ( (ASM::Util->speak($event->{to}->[0])) or (!ASM::Util->notRestricted($nick, "nocommands")) ) { + unless ( (ASM::Util->speak($event->{to}->[0])) ) { next unless (defined($command->{nohush}) && ($command->{nohush} eq "nohush")); } if (defined($command->{flag})) { #If the command is restricted, @@ -44,6 +44,9 @@ sub command } if ($cmd=~/$command->{cmd}/) { ASM::Util->dprint("$event->{from} told me: $cmd", "commander"); + if (!ASM::Util->notRestricted($nick, "nocommands")) { + $fail = 1 unless (defined($command->{nohush}) && ($command->{nohush} eq "nohush")); + } if ($fail == 1) { $conn->privmsg($nick, "You don't have permission to use that command, or you're not signed into nickserv."); } else { diff --git a/modules/event.pl b/modules/event.pl index 401a51d..eb9f70d 100644 --- a/modules/event.pl +++ b/modules/event.pl @@ -469,7 +469,8 @@ sub on_nick { sub on_kick { my ($conn, $event) = @_; if (lc $event->{to}->[0] eq lc $::settings->{nick}) { - $conn->join($event->{args}->[0]); + $conn->privmsg($::settings->{masterchan}, "I've been kicked from " . $event->{args}->[0] . ": " . $event->{args}->[1]); +# $conn->join($event->{args}->[0]); } my $nick = lc $event->{to}->[0]; my $chan = lc $event->{args}->[0]; @@ -679,7 +680,7 @@ sub checkRegged my $tgt = $chan; my $risk = "debug"; my $hilite=ASM::Util->commaAndify(ASM::Util->getAlert($tgt, $risk, 'hilights')); - my $txtz ="\x03" . $::RCOLOR{$::RISKS{$risk}} . "\u$risk\x03 risk threat [\x02$chan\x02] - channel appears to still be +r after 45 minutes; $hilite"; + my $txtz ="\x03" . $::RCOLOR{$::RISKS{$risk}} . "\u$risk\x03 risk threat [\x02$chan\x02] - channel appears to still be +r after 45 minutes; ping $hilite"; my @tgts = ASM::Util->getAlert($tgt, $risk, 'msgs'); ASM::Util->sendLongMsg($conn, \@tgts, $txtz) } |
