Skip to content
Browse files

Added connect around log

  • Loading branch information...
1 parent 9e71466 commit c4b44d06ae3841bc9f4a799b737e3281ce740e22 @davglass committed Nov 11, 2010
Showing with 7 additions and 5 deletions.
  1. +7 −5 lib/yuibot.js
View
12 lib/yuibot.js
@@ -85,11 +85,13 @@ jerk(function(j) {
}
});
if (log) {
- mysql.query("insert into chat (channel, who, utterance) values (?, ?, ?)", [
- message.source,
- message.user,
- message.text[0]
- ]);
+ mysql.connect(function() {
+ mysql.query("insert into chat (channel, who, utterance) values (?, ?, ?)", [
+ message.source,
+ message.user,
+ message.text[0]
+ ]);
+ });
}
});

0 comments on commit c4b44d0

Please sign in to comment.
Something went wrong with that request. Please try again.