summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
{