We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4af9996 + fa55bda commit 41a8d83Copy full SHA for 41a8d83
scripts/irssi_logger.pl
@@ -11,7 +11,7 @@
11
# - postgresql
12
# - postgresql-contrib (pg_trgm)
13
14
-$VERSION = "1.1";
+$VERSION = "1.2";
15
%IRSSI = (
16
authors => "Aaron Bieber",
17
contact => "deftly\@gmail.com",
@@ -118,7 +118,13 @@ sub write_db {
118
119
defined or $_ = "" for @vals;
120
121
- $dbh->do($sql, undef, @vals) || Irssi::print("Can't log to DB! " . DBI::errstr);
+ $dbh->do($sql, undef, @vals);
122
+ if ($dbh->err) {
123
+ Irssi::print("Can't log to DB! " . DBI::errstr);
124
+ if (!$dbh->ping) {
125
+ $dbh->connect();
126
+ }
127
128
}
129
130
0 commit comments