diff options
Diffstat (limited to 'src/modules/m_services.cpp')
-rw-r--r-- | src/modules/m_services.cpp | 10 |
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 { |