static Module* SQLModule;
static Module* MyMod;
static std::string dbid;
-extern time_t TIME;
enum LogTypes { LT_OPER = 1, LT_KILL, LT_SERVLINK, LT_XLINE, LT_CONNECT, LT_DISCONNECT, LT_FLOOD, LT_LOADMODULE };
id = i;
category = cat;
sourceid = nickid = hostid = -1;
- date = TIME;
+ date = time(NULL);
lastquery = "";
}
void Implements(char* List)
{
List[I_OnRehash] = List[I_OnOper] = List[I_OnGlobalOper] = List[I_OnKill] = 1;
- List[I_OnPreCommand] = List[I_OnUserConnect] = List[I_OnGlobalConnect] = 1;
+ List[I_OnPreCommand] = List[I_OnUserConnect] = 1;
List[I_OnUserQuit] = List[I_OnLoadModule] = List[I_OnRequest] = 1;
}
return 0;
}
- virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated)
+ virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec *user, bool validated, const std::string &original_line)
{
if ((command == "GLINE") || (command == "KLINE") || (command == "ELINE") || (command == "ZLINE"))
{
AddLogEntry(LT_CONNECT,user->nick,user->host,user->server);
}
- virtual void OnGlobalConnect(userrec* user)
- {
- AddLogEntry(LT_CONNECT,user->nick,user->host,user->server);
- }
-
virtual void OnUserQuit(userrec* user, const std::string &reason)
{
AddLogEntry(LT_DISCONNECT,user->nick,user->host,user->server);
virtual Version GetVersion()
{
- return Version(1,0,0,1,VF_VENDOR);
+ return Version(1,1,0,1,VF_VENDOR,API_VERSION);
}
};