]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_whowas.cpp
Fuck. Press save, then commit.
[user/henk/code/inspircd.git] / src / cmd_whowas.cpp
index 1531f6239d74baf02d94e67caaac69e46a214fe8..de13d5b267b2b59e5fa2b28e8885cd3db685faef 100644 (file)
 
 WhoWasMaintainTimer * timer;
 
-extern "C" DllExport command_t* init_command(InspIRCd* Instance)
+extern "C" DllExport Command* init_command(InspIRCd* Instance)
 {
        return new cmd_whowas(Instance);
 }
 
 cmd_whowas::cmd_whowas(InspIRCd* Instance)
-: command_t(Instance, "WHOWAS", 0, 1)
+: Command(Instance, "WHOWAS", 0, 1)
 {
        syntax = "<nick>{,<nick>}";
        timer = new WhoWasMaintainTimer(Instance, 3600);
        Instance->Timers->AddTimer(timer);
 }
 
-CmdResult cmd_whowas::Handle (const char** parameters, int pcnt, userrec* user)
+CmdResult cmd_whowas::Handle (const char** parameters, int pcnt, User* user)
 {
        /* if whowas disabled in config */
        if (ServerInstance->Config->WhoWasGroupSize == 0 || ServerInstance->Config->WhoWasMaxGroups == 0)
@@ -92,7 +92,7 @@ CmdResult cmd_whowas::HandleInternal(const unsigned int id, const std::deque<cla
        switch (id)
        {
                case WHOWAS_ADD:
-                       AddToWhoWas((userrec*)parameters[0]);
+                       AddToWhoWas((User*)parameters[0]);
                break;
 
                case WHOWAS_STATS:
@@ -131,7 +131,7 @@ void cmd_whowas::GetStats(Extensible* ext)
        ext->Extend("stats", stats.c_str());
 }
 
-void cmd_whowas::AddToWhoWas(userrec* user)
+void cmd_whowas::AddToWhoWas(User* user)
 {
        /* if whowas disabled */
        if (ServerInstance->Config->WhoWasGroupSize == 0 || ServerInstance->Config->WhoWasMaxGroups == 0)
@@ -316,7 +316,7 @@ cmd_whowas::~cmd_whowas()
        }
 }
 
-WhoWasGroup::WhoWasGroup(userrec* user) : host(NULL), dhost(NULL), ident(NULL), server(NULL), gecos(NULL), signon(user->signon)
+WhoWasGroup::WhoWasGroup(User* user) : host(NULL), dhost(NULL), ident(NULL), server(NULL), gecos(NULL), signon(user->signon)
 {
        this->host = strdup(user->host);
        this->dhost = strdup(user->dhost);
@@ -340,7 +340,7 @@ WhoWasGroup::~WhoWasGroup()
 /* every hour, run this function which removes all entries older than Config->WhoWasMaxKeep */
 void WhoWasMaintainTimer::Tick(time_t t)
 {
-       command_t* whowas_command = ServerInstance->Parser->GetHandler("WHOWAS");
+       Command* whowas_command = ServerInstance->Parser->GetHandler("WHOWAS");
        if (whowas_command)
        {
                std::deque<classbase*> params;