* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
class QueryInfo
{
+private:
+ InspIRCd* ServerInstance;
public:
QueryState qs;
unsigned long id;
time_t date;
bool insert;
- QueryInfo(const std::string &n, const std::string &s, const std::string &h, unsigned long i, int cat)
+ QueryInfo(InspIRCd* Instance, const std::string &n, const std::string &s, const std::string &h, unsigned long i, int cat)
{
+ ServerInstance = Instance;
qs = FIND_SOURCE;
nick = n;
source = s;
id = i;
category = cat;
sourceid = nickid = hostid = -1;
- date = time(NULL);
+ date = ServerInstance->Time();
insert = false;
}
SQLModule = ServerInstance->Modules->FindFeature("SQL");
- OnRehash(NULL,"");
+ OnRehash(NULL);
MyMod = this;
active_queries.clear();
dbid = Conf.ReadValue("sqllog","dbid",0); // database id of a database configured in sql module
}
- virtual void OnRehash(User* user, const std::string ¶meter)
+ virtual void OnRehash(User* user)
{
ReadConfig();
}
SQLrequest req = SQLrequest(this, SQLModule, dbid, SQLquery("SELECT id,actor FROM ircd_log_actors WHERE actor='?'") % source);
if(req.Send())
{
- QueryInfo* i = new QueryInfo(nick, source, host, req.id, category);
+ QueryInfo* i = new QueryInfo(ServerInstance, nick, source, host, req.id, category);
i->qs = FIND_SOURCE;
active_queries[req.id] = i;
}