summaryrefslogtreecommitdiff
path: root/src/modules/m_services.cpp
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 /src/modules/m_services.cpp
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
Diffstat (limited to 'src/modules/m_services.cpp')
-rw-r--r--src/modules/m_services.cpp10
1 files changed, 7 insertions, 3 deletions
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
{