]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Remove this, we're not going to keep the .old, makes it twice as much work to documen...
[user/henk/code/inspircd.git] / src / users.cpp
index 9f9d34fa472a02872c77a6e6bbf2064637fcc814..b53dcaca345342492ef7565749f7cddb59878cf6 100644 (file)
@@ -842,10 +842,10 @@ void User::CheckClass()
        this->nping = ServerInstance->Time() + a->GetPingTime() + ServerInstance->Config->dns_timeout;
 }
 
-bool User::CheckLines()
+bool User::CheckLines(bool doZline)
 {
-       const char* check[] = { "G" , "K", NULL };
-
+       const char* check[] = { "G" , "K", (doZline) ? "Z" : NULL, NULL };
+       
        if (!this->exempt)
        {
                for (int n = 0; check[n]; ++n)
@@ -1606,7 +1606,10 @@ bool User::ChangeDisplayedHost(const char* shost)
                FOREACH_MOD(I_OnChangeHost,OnChangeHost(this,shost));
        }
 
-       if (this->ServerInstance->Config->CycleHosts)
+       int MOD_RESULT = 0;
+       FOREACH_RESULT(I_OnHostCycle, OnHostCycle(this));
+
+       if (this->ServerInstance->Config->CycleHosts && !MOD_RESULT)
                this->WriteCommonExcept("QUIT :Changing hosts");
 
        /* Fix by Om: User::dhost is 65 long, this was truncating some long hosts */
@@ -1614,7 +1617,7 @@ bool User::ChangeDisplayedHost(const char* shost)
 
        this->InvalidateCache();
 
-       if (this->ServerInstance->Config->CycleHosts)
+       if (this->ServerInstance->Config->CycleHosts && !MOD_RESULT)
        {
                for (UCListIter i = this->chans.begin(); i != this->chans.end(); i++)
                {
@@ -1633,17 +1636,20 @@ bool User::ChangeDisplayedHost(const char* shost)
 
 bool User::ChangeIdent(const char* newident)
 {
-       if (!this->ident.compare(newident))
+       if (this->ident == newident)
                return true;
 
-       if (this->ServerInstance->Config->CycleHosts)
+        int MOD_RESULT = 0;
+       FOREACH_RESULT(I_OnHostCycle, OnHostCycle(this));
+
+       if (this->ServerInstance->Config->CycleHosts && !MOD_RESULT)
                this->WriteCommonExcept("%s","QUIT :Changing ident");
 
        this->ident.assign(newident, 0, ServerInstance->Config->Limits.IdentMax + 1);
 
        this->InvalidateCache();
 
-       if (this->ServerInstance->Config->CycleHosts)
+       if (this->ServerInstance->Config->CycleHosts && !MOD_RESULT)
        {
                for (UCListIter i = this->chans.begin(); i != this->chans.end(); i++)
                {