diff options
| author | 2007-06-28 17:54:10 +0000 | |
|---|---|---|
| committer | 2007-06-28 17:54:10 +0000 | |
| commit | d944892a0c4d04c056a8697fc0aee54b5b01ff88 (patch) | |
| tree | 891e9c32f405acf9980616a174fd6e3477a0420b /modules/mysql.pl | |
| parent | 0f110271658cc2f9e36e5fa4417b74679e39ce45 (diff) | |
check gecos, record gecos, inspect gecos, and more hilights
Diffstat (limited to 'modules/mysql.pl')
| -rw-r--r-- | modules/mysql.pl | 7 |
1 files changed, 4 insertions, 3 deletions
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) . ");"); } |
