From d944892a0c4d04c056a8697fc0aee54b5b01ff88 Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Thu, 28 Jun 2007 17:54:10 +0000 Subject: check gecos, record gecos, inspect gecos, and more hilights --- modules/mysql.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'modules/mysql.pl') diff --git a/modules/mysql.pl b/modules/mysql.pl index 7a5da7c..463dbaf 100644 --- a/modules/mysql.pl +++ b/modules/mysql.pl @@ -6,14 +6,15 @@ sub sql_connect { $::dbh = DBI->connect("DBI:mysql:database=$::mysql->{db};host=$::mysql->{host};port=$::mysql->{port}", $::mysql->{user}, $::mysql->{pass}); + $::dbh->{mysql_auto_reconnect} = 1; } sub sql_record { - my ($channel, $nick, $user, $host, $level, $id, $reason) = @_; - $::dbh->do("INSERT INTO $::mysql->{table} (channel, nick, user, host, level, id, reason) VALUES (" . + my ($channel, $nick, $user, $host, $gecos, $level, $id, $reason) = @_; + $::dbh->do("INSERT INTO $::mysql->{table} (channel, nick, user, host, gecos, level, id, reason) VALUES (" . $::dbh->quote($channel) . ", " . $::dbh->quote($nick) . ", " . $::dbh->quote($user) . - ", " . $::dbh->quote($host) . ", " . $::dbh->quote($level) . ", " . + ", " . $::dbh->quote($host) . ", " . $::dbh->quote($gecos) . ", " . $::dbh->quote($level) . ", " . $::dbh->quote($id) . ", " . $::dbh->quote($reason) . ");"); } -- cgit v1.2.3