summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorGravatar brain2008-10-02 22:27:03 +0000
committerGravatar brain2008-10-02 22:27:03 +0000
commita95616f608aefc38250a620087639dcc6407567f (patch)
treef4356ceb06e6a02fea26456c6a63261efc86fb19 /src/users.cpp
parentSome suggestions from jilles about handling unknown prefix errors, and some i... (diff)
Fix for bug #601
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10614 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/users.cpp b/src/users.cpp
index 33b8cdc7c..386a64b82 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -1606,6 +1606,9 @@ bool User::ChangeDisplayedHost(const char* shost)
FOREACH_MOD(I_OnChangeHost,OnChangeHost(this,shost));
}
+ int MOD_RESULT = 0;
+ FOREACH_RESULT(I_OnHostCycle, OnHostCycle(this));
+
if (this->ServerInstance->Config->CycleHosts)
this->WriteCommonExcept("QUIT :Changing 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,9 +1636,12 @@ bool User::ChangeDisplayedHost(const char* shost)
bool User::ChangeIdent(const char* newident)
{
- if (!this->ident.compare(newident))
+ if (this->ident == newident)
return true;
+ int MOD_RESULT = 0;
+ FOREACH_RESULT(I_OnHostCycle, OnHostCycle(this));
+
if (this->ServerInstance->Config->CycleHosts)
this->WriteCommonExcept("%s","QUIT :Changing ident");
@@ -1643,7 +1649,7 @@ bool User::ChangeIdent(const char* newident)
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++)
{