]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Added E to authtracker queries to suppress warnings from postgres
authorsplidge <redacted>
Sat, 22 Mar 2008 02:51:11 +0000 (02:51 +0000)
committersplidge <redacted>
Sat, 22 Mar 2008 02:51:11 +0000 (02:51 +0000)
chanserv/authtracker/authtracker_query.c

index aaa9bb8a40ec98fe78ffbe1cbad62cf3fe62b90a..cb6a00e75b3b9c4fae6ced2efd488aa3bb72f35f 100644 (file)
@@ -17,7 +17,7 @@ void at_logquit(unsigned long userid, time_t accountts, time_t when, char *reaso
 
   dbescapestring(escreason, lreason, strlen(lreason));
 
-  dbquery("UPDATE chanserv.authhistory SET disconnecttime=%lu, quitreason='%s' WHERE userID=%lu AND authtime=%lu",
+  dbquery("UPDATE chanserv.authhistory SET disconnecttime=%lu, quitreason=E'%s' WHERE userID=%lu AND authtime=%lu",
               when, escreason, userid, accountts);
 }
 
@@ -31,7 +31,7 @@ void at_lognewsession(unsigned int userid, nick *np) {
   dbescapestring(eschost, np->host->name->content, np->host->name->length);
 
   dbquery("INSERT INTO chanserv.authhistory (userID, nick, username, host, authtime, disconnecttime, numeric) "
-    "VALUES (%lu, '%s', '%s', '%s', %lu, %lu, %u)",
+    "VALUES (%lu, E'%s', E'%s', E'%s', %lu, %lu, %u)",
     userid, escnick, escuser, eschost, np->accountts, 0UL, np->numeric);
 }