diff options
| author | 2008-03-25 17:05:22 +0000 | |
|---|---|---|
| committer | 2008-03-25 17:05:22 +0000 | |
| commit | ba55c0675df20a89a452162216af4b6a8e06ce5c (patch) | |
| tree | ecef59649a9a5cef4896057894e072ce68603763 /modules/mysql.pl | |
| parent | 0293b9d684ce2f89a1850b7a0d4819bdd1c947ef (diff) | |
Added dnsbl analysis, better sql, better rules, fixed some commands
Diffstat (limited to 'modules/mysql.pl')
| -rw-r--r-- | modules/mysql.pl | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/modules/mysql.pl b/modules/mysql.pl index 22369e1..f0b7845 100644 --- a/modules/mysql.pl +++ b/modules/mysql.pl @@ -76,23 +76,36 @@ sub logg $string = $string . 'channel, '; } $string = $string . 'nick, user, host, geco'; - if ($table ne 'join') { + if (($table ne 'join') && ($table ne 'kick')) { $string = $string . ', content1'; } - if (($table eq 'kick') || ($table eq 'mode')) { + if ($table eq 'mode') { $string = $string . ', content2'; } + if ($table eq 'kick') { + $string = $string . ', victim_nick, victim_user, victim_host, victim_geco, content1'; + } $string = $string . ') VALUES ('; - if (($table ne 'nick') && ($table ne 'quit')) { + if (($table ne 'nick') && ($table ne 'quit') && ($table ne 'kick')) { $string = $string . $dbh->quote($event->{to}->[0]) . ", "; } + if ($table eq 'kick') { + $string = $string . $dbh->quote($event->{args}->[0]) . ", "; + } my $geco = $::sn{lc $event->{nick}}->{gecos}; $string = $string . $dbh->quote($event->{nick}) . ", " . $dbh->quote($event->{user}) . ", " . $dbh->quote($event->{host}) . ", " . $dbh->quote($geco); - if ($table ne 'join') { + if (($table ne 'join') && ($table ne 'kick')) { $string = $string. ', ' . $dbh->quote($event->{args}->[0]); } - if (($table eq 'kick') || ($table eq 'mode')) { + if ($table eq 'kick') { + $string = $string . ', ' . $dbh->quote($event->{to}->[0]); + $string = $string . ', ' . $dbh->quote($::sn{lc $event->{to}->[0]}->{user}); + $string = $string . ', ' . $dbh->quote($::sn{lc $event->{to}->[0]}->{host}); + $string = $string . ', ' . $dbh->quote($::sn{lc $event->{to}->[0]}->{gecos}); + $string = $string . ', ' . $dbh->quote($event->{args}->[1]); + } + if ($table eq 'mode') { $string = $string . ', ' . $dbh->quote($event->{args}->[1]); } $string = $string . ');'; |
