summaryrefslogtreecommitdiffstats
path: root/config-default
diff options
context:
space:
mode:
authorLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2013-03-07 10:35:43 +0000
committerLibravatarWilliam Heimbigner <william.heimbigner@gmail.com>2013-03-07 10:35:43 +0000
commitfdb1d6257cb9871c687e13b1ac1ec038ed2529e4 (patch)
tree94b21da667654e56d20b3ba0e194a6a846226d61 /config-default
parent28e8eda8a99d2ea148741b2783b4f6110a8927d8 (diff)
Added logging of kicks/bans/quiets/removes/klines/kills to a special SQL table and corresponding text files
Enabled SQL debugging Bugfix: Only attempt to determine a host's IP if it doesn't contain a '/' Updates to channels.xml and users.xml Adjusted ;userx add and ;userx flags such that A cannot give B a flag that A doesn't already have Tweaked the ;help command Fixed ;mship such that it will respond even if it can't see the nick provided. Tweaked ;status to give output in format like 7d22h18m3s instead of 9814798712 seconds Added a ;teredo helper command to give info on IPv6 teredo-tunneled connections Added a nick blacklist file (to counter bot nicklists). Added a english wordlist file, for "garbage" detection. Added ;investigate and ;investigate2 commands Added a way to not throttle info-risk threats Added special detection for a cycling botnet Added special detection for bots that join, say something, and immediately quit Added detection for ascii art Added detection for "garbage" text Added fuzzy-matching against a set of nicks Added "real IP" to state tracking and logging, which "decrypts" gateway/web and teredo IPs Moved sigalarm code into meta.pl Improved statsp tracking, and logs it to a file Ping-pong every 30 seconds, auto-reconnect on persistent lag. Ensure inspector routine is always called AFTER log-handling routines Fixed a state-tracking bug in topic change handling Fixed a state-tracking bug with nick changes Fixed some state-tracking bugs with mode changes Determine who is impacted when a quiet/ban mask is placed Fixed handling of CTCP SOURCE requests Added feature where it keeps a 30 line "backlog" of each channel in memory. Added the reason for parts and quits to text logging
Diffstat (limited to 'config-default')
-rw-r--r--config-default/channels.xml187
-rw-r--r--config-default/commands.xml157
-rw-r--r--config-default/mysql.xml1
-rw-r--r--config-default/settings.xml1
-rw-r--r--config-default/users.xml26
5 files changed, 266 insertions, 106 deletions
diff --git a/config-default/channels.xml b/config-default/channels.xml
index 178a0bb..830a0eb 100644
--- a/config-default/channels.xml
+++ b/config-default/channels.xml
@@ -41,10 +41,17 @@
<debug>##hamradio-ops</debug>
</msgs>
</channel>
+ <channel id="##hamradio-banappeal">
+ <hilights></hilights>
+ </channel>
<channel id="##hamradio-ops">
<hilights></hilights>
<msgs></msgs>
</channel>
+ <channel id="##hardware">
+ <hilights></hilights>
+ <msgs></msgs>
+ </channel>
<channel id="##linux" silence="yes">
<hilights>
<info>Dominian</info>
@@ -106,6 +113,7 @@
<channel id="##wikia">
<hilights>
<info>vegadark</info>
+ <info>Furry</info>
</hilights>
<msgs></msgs>
</channel>
@@ -117,6 +125,7 @@
<disable>Thehelpfulone</disable>
<high>werdan7</high>
<info>njan</info>
+ <info>PZt</info>
<low>numist</low>
<low>HentaiXP</low>
<low>TechSalvager</low>
@@ -138,8 +147,15 @@
<hilights></hilights>
<msgs></msgs>
</channel>
- <channel id="#antispammeta-debug" />
- <channel id="#baadf00d" />
+ <channel id="#antispammeta-debug">
+ <hilights></hilights>
+ </channel>
+ <channel id="#baadf00d">
+ <hilights></hilights>
+ </channel>
+ <channel id="#chromium-support">
+ <hilights></hilights>
+ </channel>
<channel id="#cisco">
<hilights></hilights>
<msgs></msgs>
@@ -196,7 +212,9 @@
<hilights></hilights>
</channel>
<channel id="#frikipedia">
- <hilights></hilights>
+ <hilights>
+ <info>Nietzsche</info>
+ </hilights>
<msgs></msgs>
</channel>
<channel id="#gentoo" silence="yes">
@@ -233,12 +251,10 @@
</channel>
<channel id="#mediawiki" silence="yes">
<hilights>
- <debug>flyingparchment</debug>
- <debug>roberthl</debug>
<debug>Snowolf</debug>
- <disable>seanw</disable>
+ <debug>techman224</debug>
<info>charitwo</info>
- <low>vvv</low>
+ <medium>Jasper_Deng</medium>
</hilights>
<msgs>
<debug>#wikimedia-ops</debug>
@@ -255,14 +271,13 @@
</channel>
<channel id="#persian">
<hilights></hilights>
+ <msgs></msgs>
</channel>
<channel id="#persians">
<hilights></hilights>
</channel>
<channel id="#reddit">
<hilights>
- <debug>KyleXY</debug>
- <debug>kylexy</debug>
<debug>TheMoonMaster</debug>
<debug>Paradox</debug>
<debug>Mortvert</debug>
@@ -333,20 +348,20 @@
</channel>
<channel id="#wikimedia" silence="yes">
<hilights>
- <debug>Martinp23</debug>
<debug>PeterSymonds</debug>
- <debug>vvv</debug>
<debug>AfterDeath</debug>
- <debug>DeltaQuad</debug>
<debug>Snowolf</debug>
<debug>Thehelpfulone</debug>
<debug>Tanvir</debug>
<debug>jeremyb</debug>
<debug>Logan_</debug>
+ <debug>Rjd0060</debug>
<info>charitwo</info>
<info>Rjd0060</info>
<info>Fluffernutter</info>
<info>TBloemink</info>
+ <info>Steven_Zhang</info>
+ <low>DeltaQuad</low>
</hilights>
<msgs>
<debug>#wikimedia-ops</debug>
@@ -360,12 +375,29 @@
<debug>Thehelpfulone</debug>
<debug>Snowolf</debug>
<debug>Logan_</debug>
- <low>Kanonkas</low>
+ <debug>Rjd0060</debug>
+ <info>James_F</info>
</hilights>
<msgs>
<debug>#wikimedia-ops</debug>
</msgs>
</channel>
+ <channel id="#wikimedia-irc">
+ <hilights>
+ <info>seanw</info>
+ <info>martinp23</info>
+ <info>Rjd0060</info>
+ <info>Cbrown1023</info>
+ <info>dungodung</info>
+ <info>PeterSymonds</info>
+ <info>Barras</info>
+ <info>Thehelpfulone</info>
+ </hilights>
+ <msgs>
+ <debug>#wikimedia-ops</debug>
+ <low>#wikimedia-ops</low>
+ </msgs>
+ </channel>
<channel id="#wikimedia-office">
<hilights>
<info>mbimmler</info>
@@ -378,21 +410,17 @@
<info>Theo10011</info>
<info>Ironholds</info>
</hilights>
- <msgs>
- <debug>#wikimedia-ops</debug>
- </msgs>
+ <msgs></msgs>
</channel>
<channel id="#wikimedia-ops">
<hilights>
<debug>Cbrown1023</debug>
<debug>Thehelpfulone</debug>
- <debug>Not_the_NSA</debug>
- <debug>Kanonkas</debug>
<debug>PeterSymonds</debug>
- <debug>AfterDeath</debug>
<debug>Logan_</debug>
<debug>jeremyb</debug>
<debug>AfterDeath</debug>
+ <debug>Snowolf</debug>
<info>charitwo</info>
<info>TBloemink</info>
<info>Mh7kJ</info>
@@ -427,9 +455,7 @@
<debug>fschulenburg</debug>
<debug>Bastique</debug>
</hilights>
- <msgs>
- <debug>#wikimedia-ops</debug>
- </msgs>
+ <msgs></msgs>
</channel>
<channel id="#wikimedia-overflow">
<hilights>
@@ -445,6 +471,7 @@
<debug>PeterSymonds</debug>
<debug>Snowolf</debug>
<debug>Thehelpfulone</debug>
+ <debug>Rjd0060</debug>
<info>Snowolf</info>
<info>Rjd0060</info>
<info>TBloemink</info>
@@ -464,11 +491,19 @@
<debug>Thehelpfulone</debug>
<debug>Snowolf</debug>
<debug>Rjd0060</debug>
+ <debug>techman224</debug>
+ <medium>Jasper_Deng</medium>
</hilights>
<msgs>
<low>#wikimedia-ops</low>
</msgs>
</channel>
+ <channel id="#wikimedia-techJasper_Deng">
+ <hilights></hilights>
+ </channel>
+ <channel id="#wikimedia-techjasper_deng">
+ <hilights></hilights>
+ </channel>
<channel id="#wikimedia-toolserver">
<hilights>
<info>Austin</info>
@@ -481,53 +516,36 @@
<info>Simetrical</info>
<info>Werdna</info>
</hilights>
- <msgs>
- <debug>#wikimedia-ops</debug>
- </msgs>
+ <msgs></msgs>
</channel>
<channel id="#wikipedia" silence="yes">
<hilights>
- <debug>Golbez</debug>
<debug>Prodego</debug>
<debug>Snowolf</debug>
<debug>AfterDeath</debug>
<debug>Thehelpfulone</debug>
<debug>werdan7</debug>
- <debug>wimt</debug>
- <debug>Jake_Wartenberg</debug>
<debug>shimgray</debug>
- <debug>kibble</debug>
<debug>PeterSymonds</debug>
<debug>Jamesofur</debug>
<debug>killiondude</debug>
<debug>SpitfireWP</debug>
<debug>jeremyb</debug>
- <debug>Maximillion</debug>
<debug>stwalkerster</debug>
- <debug>DeltaQuad</debug>
<debug>Gfoley4</debug>
<debug>Logan_</debug>
- <debug>Theo10011</debug>
<debug>Snowolf</debug>
<debug>Tanvir</debug>
<debug>TBloemink</debug>
<debug>Rjd0060</debug>
<debug>Shirik</debug>
- <low>bumm13_</low>
- <low>Cyrius</low>
+ <info>Steven_Zhang</info>
<low>DanielB</low>
<low>FastLizard4</low>
<low>James_F</low>
<low>JohnReaves</low>
- <low>Lucifer_Cat</low>
- <low>Luna-San</low>
- <low>Mike42</low>
- <low>Mike_H</low>
- <low>skenmy</low>
- <low>ST47</low>
- <low>tawker</low>
<low>slakr</low>
- <low>Courcelles</low>
+ <low>DeltaQuad</low>
<medium>closedmouth</medium>
<medium>Fluffernutter</medium>
</hilights>
@@ -555,8 +573,6 @@
<debug>Jamesofur</debug>
<debug>SpitfireWP</debug>
<debug>jeremyb</debug>
- <debug>DeltaQuad</debug>
- <debug>Theo10011</debug>
<debug>Gfoley4</debug>
<debug>Logan_</debug>
<debug>Snowolf</debug>
@@ -564,12 +580,10 @@
<debug>Shirik</debug>
<debug>TBloemink</debug>
<debug>Rjd0060</debug>
- <low>Cobi</low>
- <low>Golbez</low>
+ <info>DeltaQuad</info>
<low>agkwiki</low>
<low>KFP</low>
<low>slakr</low>
- <low>Courcelles</low>
<medium>closedmouth</medium>
<medium>Fluffernutter</medium>
</hilights>
@@ -581,41 +595,21 @@
<hilights>
<info>Thehelpfulone</info>
<info>jamesofur</info>
- <info>Nixeagle</info>
<info>DeltaQuad</info>
- <info>Netalarm</info>
- <info>JoeGazz84</info>
- <info>MacMed</info>
<info>Snowolf</info>
</hilights>
- <msgs>
- <debug>#wikimedia-ops</debug>
- <low>#wikimedia-ops</low>
- </msgs>
+ <msgs></msgs>
</channel>
<channel id="#wikipedia-en-ambassadors">
<hilights>
- <info>anowlin</info>
- <info>ragesoss</info>
<info>stwalkerster</info>
- <info>chzz</info>
<info>Prodego</info>
- <info>Deskana</info>
- <info>Pathoschild</info>
- <info>fetchcomms</info>
- <info>BarkingFish</info>
- <info>Cbrown1023</info>
- <info>Earwig</info>
- <info>ldavis</info>
- <info>annielin</info>
<info>PeterSymonds</info>
<info>Shirik</info>
<info>Fluffernutter</info>
<info>Thehelpfulone</info>
</hilights>
- <msgs>
- <debug>#wikimedia-ops</debug>
- </msgs>
+ <msgs></msgs>
</channel>
<channel id="#wikipedia-en-classroom">
<hilights></hilights>
@@ -623,25 +617,13 @@
<channel id="#wikipedia-en-help" silence="yes">
<hilights>
<debug>werdan7</debug>
- <debug>GDonato</debug>
<debug>Thehelpfulone</debug>
- <debug>Mike42</debug>
- <debug>bjelleklang</debug>
- <debug>JohnReaves</debug>
- <debug>After-Midnight</debug>
- <debug>Srikeit</debug>
- <debug>Deon555</debug>
- <debug>Luna-San</debug>
- <debug>Golbez</debug>
<debug>stwalkerster</debug>
<debug>PeterSymonds</debug>
- <debug>Hersfold</debug>
<debug>killiondude</debug>
- <debug>DeltaQuad</debug>
<debug>Logan_</debug>
<debug>Shirik</debug>
<debug>slakr</debug>
- <debug>JoeGazz84</debug>
<debug>Steven_Zhang</debug>
<debug>SteveMobile</debug>
<debug>TBloemink</debug>
@@ -649,11 +631,13 @@
<debug>Tanvir</debug>
<debug>TBloemink</debug>
<debug>Ocaasi</debug>
+ <debug>Rjd0060</debug>
<info>mabdul</info>
+ <info>gwickwire</info>
<low>KFP</low>
<low>Gfoley4</low>
- <low>sonia</low>
<low>Pine</low>
+ <low>DeltaQuad</low>
</hilights>
<msgs>
<debug>#wikimedia-ops</debug>
@@ -672,12 +656,35 @@
<info>PeterSymonds</info>
<info>Shirik</info>
</hilights>
+ <msgs></msgs>
+ </channel>
+ <channel id="#wikipedia-media">
+ <hilights></hilights>
+ </channel>
+ <channel id="#wikipedia-otrs">
+ <hilights></hilights>
+ </channel>
+ <channel id="#wikipedia-social" silence="yes">
+ <hilights></hilights>
+ <msgs>
+ <low>#wikimedia-ops</low>
+ </msgs>
+ </channel>
+ <channel id="#wikitravel">
+ <hilights></hilights>
+ </channel>
+ <channel id="#wikivoyage">
+ <hilights>
+ <debug>Snowolf</debug>
+ <debug>Rschen7754</debug>
+ <info>Thehelpfulone</info>
+ <info>Logan_</info>
+ </hilights>
<msgs>
<debug>#wikimedia-ops</debug>
- <low>#wikimedia-ops</low>
</msgs>
</channel>
- <channel id="#wikipedia-social" silence="yes">
+ <channel id="#wikivoyage-es">
<hilights></hilights>
<msgs>
<low>#wikimedia-ops</low>
@@ -698,11 +705,14 @@
<info>Wytukaze</info>
<info>Tawker</info>
</hilights>
- <msgs>
- <debug>#wikimedia-ops</debug>
- </msgs>
+ <msgs></msgs>
+ </channel>
+ <channel id="antispammeta">
+ <hilights></hilights>
+ </channel>
+ <channel id="antispammetabeta">
+ <hilights></hilights>
</channel>
- <channel id="antispammetabeta" />
<channel id="default">
<hilights></hilights>
</channel>
@@ -714,7 +724,6 @@
<medium>dave2</medium>
</hilights>
<msgs>
- <debug>##asb-nexus</debug>
<debug>#antispammeta</debug>
</msgs>
</channel>
diff --git a/config-default/commands.xml b/config-default/commands.xml
index a3a1695..8154271 100644
--- a/config-default/commands.xml
+++ b/config-default/commands.xml
@@ -1,19 +1,69 @@
<commands>
- <command cmd="^;status$" flag="o">
+ <command cmd="^;makemelunch">
+ <![CDATA[
+ $conn->me($event->replyto, "makes " . $event->{nick} . " a sandwich");
+ ]]>
+ </command>
+ <command cmd="^;teredo (\S+)">
+ <![CDATA[
+ my $arg1 = $1;
+ my @splitip = split(/:/, $arg1);
+ if ( (int($splitip[0]) != 2001) || (int($splitip[1]) != 0) ) {
+ $conn->privmsg($event->replyto, "This is not a teredo-tunnelled IP.");
+ return;
+ }
+ print Dumper(\@splitip);
+ my $server = join('.', unpack('C4', pack('N', hex($splitip[2] . $splitip[3]))));
+ my $host = join('.', unpack('C4', pack('N', (hex($splitip[6] . $splitip[7])^hex('ffffffff')))));
+ my $port = hex($splitip[5]) ^ hex('ffff');
+ $conn->privmsg($event->replyto, "Source is $host:$port; teredo server in use is $server.");
+#hex('41379e76') ^ hex('ffffffff'); print join ('.', unpack('C4', pack('N', $ip))) . "\n"
+#join '.', unpack "C*", pack "H*", $ip;
+ #2001:0:4137:9e76:3094:127d:51a2:6952
+ #2001:0 - teredo marker
+ #4137:9e76 - teredo server
+ #3094 - teredo flags
+ #127d - xor 0xff - UDP port in use
+ #51a2:6952 - xor 0xff - source IP
+ ]]>
+ </command>
+ <command cmd="^;status$">
<![CDATA[
my $size = `ps -p $$ h -o size`;
my $cputime = `ps -p $$ h -o time`;
chomp $size; chomp $cputime;
- $conn->privmsg($event->replyto, "This bot has been running for " . (time - $::starttime) . " seconds" .
+ my $upstr = '';
+ my $up = (time - $::starttime);
+ if (int($up/86400) != 0) { #days
+ $upstr = $upstr . int($up/86400) . 'd';
+ $up = $up % 86400;
+ }
+ if (int($up/3600) != 0) { #hours
+ $upstr = $upstr . int($up/3600) . 'h';
+ $up = $up % 3600;
+ }
+ if (int($up/60) != 0) { #minutes
+ $upstr = $upstr . int($up/60) . 'm';
+ $up = $up % 60;
+ }
+ if (int($up/1) != 0) { #seconds
+ $upstr = $upstr . int($up/1) . 's';
+ $up = $up % 1;
+ }
+ $conn->privmsg($event->replyto, "This bot has been running for " . $upstr .
", is tracking " . (scalar (keys %::sn)) . " nicks" .
" across " . (scalar (keys %::sc)) . " tracked channels." .
" It is using " . $size . "KB of RAM" .
" and has used " . $cputime . " of CPU time.");
]]>
</command>
- <command cmd="^;mship (\S+)$" flag="c">
+ <command cmd="^;mship (\S+)$" flag="s">
<![CDATA[
- $conn->privmsg($event->replyto, $1 . " is on: " . ASM::Util->commaAndify(sort @{$::sn{lc $1}->{mship}}));
+ if (defined($::sn{lc $1}->{mship})) {
+ $conn->privmsg($event->replyto, $1 . " is on: " . ASM::Util->commaAndify(sort @{$::sn{lc $1}->{mship}}));
+ } else {
+ $conn->privmsg($event->replyto, "I don't see $1.");
+ }
]]>
</command>
<command cmd="^;source$">
@@ -46,8 +96,8 @@
</command>
<command cmd="^;help$">
<![CDATA[
- $conn->privmsg($event->replyto, "help is at http://meta.wikimedia.org/wiki/User:WHeimbigner/AntiSpamMeta");
- $conn->privmsg($event->replyto, "You can also get faster help by emailing william dot heimbigner at ttu dot edu - or bug ErrantEgo or tomaw");
+ $conn->privmsg($event->replyto, "command list is at http://antispammeta.net/syntax.txt ; see also http://meta.wikimedia.org/wiki/User:WHeimbigner/AntiSpamMeta (not as up to date but contains some additonal info)");
+ $conn->privmsg($event->replyto, "You can also get faster help by bugging ow, DLa\x02\x02nge, tom\x02\x02aw, or mari\x02\x02enz");
]]>
</command>
<command cmd="^;db$">
@@ -63,10 +113,95 @@
$conn->privmsg($event->replyto, "$result results found.");
]]>
</command>
+ <command cmd="^;investigate (\S+) *$">
+ <![CDATA[
+ my $nick = lc $1;
+ unless (defined($::sn{$nick})) {
+ $conn->privmsg($event->replyto, "I don't see $nick in my state tracking database, so I can't run any queries on their info, sorry :(" .
+ " You can try https://antispammeta.net/cgi-bin/secret/investigate.pl?nick=$nick instead!");
+ return;
+ }
+ my $person = $::sn{$nick};
+ my $dbh = $::db->{DBH};
+
+ my $mnicks = $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE nick like " . $dbh->quote($nick) . ';');
+ my $musers = $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE user like " . $dbh->quote($person->{user}) . ';');
+ my $mhosts = $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE host like " . $dbh->quote($person->{host}) . ';');
+ my $maccts = $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE account like " . $dbh->quote($person->{account}) . ';');
+ my $mgecos = $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE gecos like " . $dbh->quote($person->{gecos}) . ';');
+
+ my $ip = ASM::Util->getNickIP($nick);
+ my $matchedip = 0;
+ $matchedip = $dbh->do("SELECT * from $::db->{ACTIONTABLE} WHERE ip = " . $dbh->quote($ip) . ';') if defined($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.");
+ ]]>
+ </command>
+ <command cmd="^;investigate2 (\S+) ?(\d*)$" flag="s">
+ <![CDATA[
+ my $nick = lc $1;
+ my $skip = 0;
+ $skip = $2 if (defined($2) and ($2 ne ""));
+ unless (defined($::sn{$nick})) {
+ $conn->privmsg($event->replyto, "I don't see $nick in my state tracking database, so I can't run any queries on their info, sorry :(" .
+ " You can try https://antispammeta.net/cgi-bin/secret/investigate.pl?nick=$nick instead!");
+ return;
+ }
+ my $person = $::sn{$nick};
+ my $dbh = $::db->{DBH};
+
+ my $query = "SELECT * from $::db->{ACTIONTABLE} WHERE nick like " . $dbh->quote($nick) .
+ ' or user like ' . $dbh->quote($person->{user}) .
+ ' or host like ' . $dbh->quote($person->{host}) .
+ ' or account like ' . $dbh->quote($person->{account}) .
+ ' or gecos like ' . $dbh->quote($person->{gecos});
+ my $ip = ASM::Util->getNickIP($nick);
+ if (defined($ip)) {
+ $query = $query . ' or ip = ' . $dbh->quote($ip);
+ }
+ $query = $query . " order by time desc limit $skip,5;";
+ print Dumper($query);
+ my $query_handle = $dbh->prepare($query);
+ $query_handle->execute();
+ my @data = @{$query_handle->fetchall_arrayref()};
+# reverse @data;
+#$data will be an array of arrays,
+ my ($xindex, $xtime, $xaction, $xreason, $xchannel, $xnick, $xuser, $xhost, $xip, $xgecos, $xaccount, $xbynick, $xbyuser, $xbyhost, $xbygecos, $xbyaccount ) =
+ ( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+ $conn->privmsg($event->replyto, "PM'ing you the list of results");
+ foreach my $line (@data) {
+ my $reason = '';
+ $reason = $line->[$xreason] if defined($line->[$xreason]);
+ $conn->privmsg($event->nick, '#' . $line->[$xindex] . ': ' . $line->[$xtime] . ' ' .
+ $line->[$xnick] . '!' . $line->[$xuser] . '@' . $line->[$xhost] . ' (' . $line->[$xgecos] . ') ' .
+ $line->[$xaction] . ' (' . $reason . ')' .
+ ' on ' . $line->[$xchannel] . ' by ' . $line->[$xbynick]); # . "\n";
+ }
+ my $dq = '';
+ if (defined($ip)) {
+ $dq = '&realip=' . join '.', unpack 'C4', pack 'N', $ip;
+ }
+ $conn->privmsg($event->nick, "Only 5 results are shown at a time. For more, do ;investigate2 $nick " . ($skip+5) .
+ ' or better yet, check out 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 );
+# print Dumper($data);
+ ]]>
+ </command>
<command cmd="^;userx add (\S+) (\S+)$" flag="a">
<![CDATA[
my $acct = lc $1;
my $flags = $2;
+ my %hasflagshash = ();
+ foreach my $item (split(//, $::users->{person}->{lc $::sn{lc $event->{nick}}->{account}}->{flags})) {
+ $hasflagshash{$item} = 1;
+ }
+ foreach my $flag (split(//, $flags)) {
+ if (!defined($hasflagshash{$flag})) {
+ $conn->privmsg($event->replyto, "You can't give a flag you don't already have.");
+ return;
+ }
+ }
if ($flags =~ /d/i) {
$conn->privmsg($event->replyto, "The d flag may not be assigned over IRC. Edit the configuration manually.");
return;
@@ -95,6 +230,16 @@
<![CDATA[
my $nick = lc $1;
my $flags = $2;
+ my %hasflagshash = ();
+ foreach my $item (split(//, $::users->{person}->{lc $::sn{lc $event->{nick}}->{account}}->{flags})) {
+ $hasflagshash{$item} = 1;
+ }
+ foreach my $flag (split(//, $flags)) {
+ if (!defined($hasflagshash{$flag})) {
+ $conn->privmsg($event->replyto, "You can't give a flag you don't already have.");
+ return;
+ }
+ }
if ($flags =~ /d/i) {
$conn->privmsg($event->replyto, "The d flag may not be assigned over IRC. Edit the configuration manually.");
return;
diff --git a/config-default/mysql.xml b/config-default/mysql.xml
index 3f66147..10aca77 100644
--- a/config-default/mysql.xml
+++ b/config-default/mysql.xml
@@ -3,6 +3,7 @@
<pass>PASS</pass>
<db>asm_main</db>
<table>alertlog</table>
+ <actiontable>actionlog</actiontable>
<host>localhost</host>
<port>3307</port>
</mysql>
diff --git a/config-default/settings.xml b/config-default/settings.xml
index 66eab42..b128cac 100644
--- a/config-default/settings.xml
+++ b/config-default/settings.xml
@@ -21,6 +21,7 @@
</autojoins>
<log>
<dir>logs/</dir>
+ <actiondir>actionlogs/</actiondir>
<filefmt>-%m-%d-%Y.log</filefmt>
<timefmt>%B %d %T </timefmt>
<zone>GMT</zone>
diff --git a/config-default/users.xml b/config-default/users.xml
index 7902bcc..ecf8de3 100644
--- a/config-default/users.xml
+++ b/config-default/users.xml
@@ -1,14 +1,18 @@
<people>
- <person id="afterdeath" flags="hocdatp" />
+ <person id="afterdeath" flags="hocdatps" />
+ <person id="antispammeta" />
<person id="cbrown1023" flags="oath" />
<person id="dave2" flags="oath" />
<person id="denny" flags="ha" />
- <person id="dlange" flags="coathd" />
+ <person id="dlange" flags="coathds" />
<person id="dmcdevit" flags="oath" />
<person id="dominian" flags="oath" />
<person id="dungodung" flags="oath" />
<person id="errantego" flags="doath" />
<person id="gary" flags="oath" />
+ <person id="gry" />
+ <person id="gryllida" flags="ahsto" />
+ <person id="gwickwire" flags="s" />
<person id="idleone" flags="o" />
<person id="jeremyb" flags="oth" />
<person id="jonathand" flags="oath" />
@@ -18,28 +22,28 @@
<person id="logan_" flags="oath" />
<person id="lstarnes" flags="oath" />
<person id="marienz" flags="doath" />
- <person id="mrmist" flags="doath" />
<person id="martinp23" flags="oath" />
<person id="mquin" flags="hota" />
+ <person id="mrmist" flags="doath" />
<person id="myrtti" flags="htoa" />
<person id="nhandler" flags="oath" />
<person id="njan" flags="oath" />
<person id="o_o" flags="oath" />
<person id="paradox" flags="h" />
- <person id="petersymonds" flags="oath" />
+ <person id="petersymonds" flags="oaths" />
+ <person id="pine" flags="ths" />
<person id="pricechild" flags="oath" />
<person id="richih" flags="oath" />
<person id="rjd0060" flags="th" />
- <person id="sauvin" flags="oath" />
+ <person id="sauvin" flags="oaths" />
<person id="seanw" flags="oath" />
<person id="shiibot" flags="p" />
- <person id="snowolf" flags="oath" />
+ <person id="snowolf" flags="oaths" />
+ <person id="tbloemink" flags="ths" />
<person id="th1" flags="th" />
<person id="thehelpfulone" flags="oath" />
<person id="tomaw" flags="oathd" />
- <person id="troubled" flags="oath" />
- <person id="ttuttle" flags="oath" />
- <person id="werdan7" flags="oath" />
- <person id="wildpikachu" flags="doath" />
- <person id="windowshasyou" flags="oath" />
+ <person id="ttuttle" flags="oaths" />
+ <person id="werdan7" flags="oth" />
+ <person id="wildpikachu" flags="doaths" />
</people>