From fc31e0a8c3af0b0e9f6ba9f1ee9fecf4413ede5f Mon Sep 17 00:00:00 2001 From: special Date: Sun, 24 Sep 2006 08:10:50 +0000 Subject: 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 --- src/modules/m_kicknorejoin.cpp | 6 ++++++ src/modules/m_services.cpp | 10 +++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'src') 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 { -- cgit v1.2.3