#include "../irc/irc_config.h"
#include "../core/events.h"
#include "../core/hooks.h"
+#include "../lib/version.h"
#include "pqsql.h"
#include <stdlib.h>
#include <sys/poll.h>
#include <stdarg.h>
+MODULE_VERSION("$Id: pqsql.c 663 2006-05-16 17:27:36Z newserv $")
+
typedef struct pqasyncquery_s {
sstring *query;
void *tag;
/* Blocking connect for now.. */
dbconn = PQconnectdb(connectstr);
- if (!dbconn || (PQstatus(dbconn) != CONNECTION_OK))
+ if (!dbconn || (PQstatus(dbconn) != CONNECTION_OK)) {
+ Error("pqsql", ERR_ERROR, "Unable to connect to db.");
return;
-
+ }
Error("pqsql", ERR_INFO, "Connected!");
dbconnected = 1;
for(qqp=queryhead;qqp;qqp=qqp->next)
i++;
- snprintf(message, sizeof(message), "PQSQL : %6d database queries queued.",i);
+ snprintf(message, sizeof(message), "PQSQL : %6d queries queued.",i);
triggerhook(HOOK_CORE_STATSREPLY, message);
}