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