summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-24 08:10:50 +0000
committerspecial <special@e03df62e-2008-0410-955e-edbf42e46eb7>2006-09-24 08:10:50 +0000
commitfc31e0a8c3af0b0e9f6ba9f1ee9fecf4413ede5f (patch)
tree02a867368c6622b4db98385dc45826212c726152
parent8e2ff0c765a98d28459eebabc1247807dbd2c0a4 (diff)
Fixed bugs #150 and #151, thanks to jamie for reporting and patches
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5311 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_kicknorejoin.cpp6
-rw-r--r--src/modules/m_services.cpp10
2 files changed, 13 insertions, 3 deletions
diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp
index f0244388e..ea97367a0 100644
--- a/src/modules/m_kicknorejoin.cpp
+++ b/src/modules/m_kicknorejoin.cpp
@@ -68,6 +68,12 @@ class KickRejoin : public ModeHandler
}
else
{
+ if (!adding)
+ {
+ channel->SetModeParam('J', parameter.c_str(), adding);
+ return MODEACTION_ALLOW;
+ }
+
std::string cur_param = channel->GetModeParameter('J');
if (cur_param == parameter)
{
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index 7e3a8d89b..c949d7f68 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -63,9 +63,13 @@ class User_r : public ModeHandler
{
if ((kludgeme) || (ServerInstance->ULine(source->nick)) || (ServerInstance->ULine(source->server)) || (!*source->server || (strchr(source->nick,'.'))))
{
- ServerInstance->Log(DEBUG,"Allowing umode +r, server and nick are: '%s','%s'",source->nick,source->server);
- dest->SetMode('r',adding);
- return MODEACTION_ALLOW;
+ if ((adding && !dest->IsModeSet('r')) || (!adding && dest->IsModeSet('r')))
+ {
+ ServerInstance->Log(DEBUG,"Allowing umode +r, server and nick are: '%s','%s'",source->nick,source->server);
+ dest->SetMode('r',adding);
+ return MODEACTION_ALLOW;
+ }
+ return MODEACTION_DENY;
}
else
{