X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fusers.cpp;h=b53dcaca345342492ef7565749f7cddb59878cf6;hb=513a6fe20da8b51a939fe517ca712666b32d72ac;hp=9f9d34fa472a02872c77a6e6bbf2064637fcc814;hpb=e1a9c3a9bc1e8afc90548a10f714c3f30794a9ec;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/users.cpp b/src/users.cpp index 9f9d34fa4..b53dcaca3 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -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++) {