From cc9c2b76367b1cf2e2a8ec74a028221c00ab606a Mon Sep 17 00:00:00 2001 From: Jackmcbarn Date: Mon, 14 Feb 2011 11:01:22 -0500 Subject: Fix bug #122 --- src/modules/m_cloaking_12.cpp | 8 ++++++-- src/modules/m_cloaking_20.cpp | 8 ++++++-- src/modules/m_cloaking_21.cpp | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_cloaking_12.cpp b/src/modules/m_cloaking_12.cpp index ba09f7ef6..96d51c6bd 100644 --- a/src/modules/m_cloaking_12.cpp +++ b/src/modules/m_cloaking_12.cpp @@ -102,8 +102,8 @@ class CloakUser : public ModeHandler /* User is removing the mode, so restore their real host * and make it match the displayed one. */ - user->ChangeDisplayedHost(user->host.c_str()); user->SetMode('x',false); + user->ChangeDisplayedHost(user->host.c_str()); return MODEACTION_ALLOW; } } @@ -287,7 +287,11 @@ class ModuleCloaking : public Module // mode change, we will call SetMode back to true AFTER the host change is done. void OnChangeHost(User* u, const std::string& host) { - u->SetMode('x', false); + if(u->IsModeSet('x')) + { + u->SetMode('x', false); + u->WriteServ("MODE %s -x", u->nick.c_str()); + } } ~ModuleCloaking() diff --git a/src/modules/m_cloaking_20.cpp b/src/modules/m_cloaking_20.cpp index 50959cf40..9aeb5ac74 100644 --- a/src/modules/m_cloaking_20.cpp +++ b/src/modules/m_cloaking_20.cpp @@ -105,8 +105,8 @@ class CloakUser : public ModeHandler /* User is removing the mode, so restore their real host * and make it match the displayed one. */ - user->ChangeDisplayedHost(user->host.c_str()); user->SetMode('x',false); + user->ChangeDisplayedHost(user->host.c_str()); return MODEACTION_ALLOW; } } @@ -308,7 +308,11 @@ class ModuleCloaking : public Module // mode change, we will call SetMode back to true AFTER the host change is done. void OnChangeHost(User* u, const std::string& host) { - u->SetMode('x', false); + if(u->IsModeSet('x')) + { + u->SetMode('x', false); + u->WriteServ("MODE %s -x", u->nick.c_str()); + } } ~ModuleCloaking() diff --git a/src/modules/m_cloaking_21.cpp b/src/modules/m_cloaking_21.cpp index 93d01a4df..0cb78083a 100644 --- a/src/modules/m_cloaking_21.cpp +++ b/src/modules/m_cloaking_21.cpp @@ -101,8 +101,8 @@ class CloakUser : public ModeHandler /* User is removing the mode, so restore their real host * and make it match the displayed one. */ - user->ChangeDisplayedHost(user->host.c_str()); user->SetMode('x',false); + user->ChangeDisplayedHost(user->host.c_str()); return MODEACTION_ALLOW; } } @@ -325,7 +325,11 @@ class ModuleCloaking : public Module // mode change, we will call SetMode back to true AFTER the host change is done. void OnChangeHost(User* u, const std::string& host) { - u->SetMode('x', false); + if(u->IsModeSet('x')) + { + u->SetMode('x', false); + u->WriteServ("MODE %s -x", u->nick.c_str()); + } } ~ModuleCloaking() -- cgit v1.3.1-10-gc9f91