aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorGravatar Jackmcbarn2011-02-14 11:01:22 -0500
committerGravatar Jackmcbarn2011-02-14 11:01:22 -0500
commitcc9c2b76367b1cf2e2a8ec74a028221c00ab606a (patch)
tree46aad977cc99dc2e4ba208799f26dbec4bfbee0d /src/modules
parentFix binding to IPv6 only (diff)
Fix bug #122
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_cloaking_12.cpp8
-rw-r--r--src/modules/m_cloaking_20.cpp8
-rw-r--r--src/modules/m_cloaking_21.cpp8
3 files changed, 18 insertions, 6 deletions
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()