summaryrefslogtreecommitdiff
path: root/src/modules/m_services.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-06-02 00:49:42 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-06-02 00:49:42 +0000
commitb938e2e454a686be1a749b665763d3adee7062a0 (patch)
tree3c512c95181d9a432c9c538aa89019d45aea933a /src/modules/m_services.cpp
parentf52b00a9c935dfc053f1d123d286e4063a8d26de (diff)
Fixes to +r not being set reported by Vincent
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1588 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_services.cpp')
-rw-r--r--src/modules/m_services.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index 5b99ea76b..d98e218a7 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -21,7 +21,8 @@ using namespace std;
#include "channels.h"
#include "modules.h"
#include <string>
-
+#include "helperfuncs.h"
+#include "hashcomp.h"
/* $ModDesc: Povides support for services +r user/chan modes and more */
@@ -67,24 +68,28 @@ class ModuleServices : public Module
if (type == MT_CHANNEL)
{
// only a u-lined server may add or remove the +r mode.
- if ((Srv->IsUlined(user->nick)) || (Srv->IsUlined(user->server)) || (!strcmp(user->server,"")))
+ if ((Srv->IsUlined(user->nick)) || (Srv->IsUlined(user->server)) || (!strcmp(user->server,"") || (strchr(user->nick,'.'))))
{
+ log(DEBUG,"Allowing umode +r, server and nick are: '%s','%s'",user->nick,user->server);
return 1;
}
else
{
- Srv->SendServ(user->fd,"500 "+std::string(user->nick)+" :Only a U-Lined server may modify the +r channel mode");
+ log(DEBUG,"Only a server can set chanmode +r, server and nick are: '%s','%s'",user->nick,user->server);
+ Srv->SendServ(user->fd,"500 "+std::string(user->nick)+" :Only a server may modify the +r channel mode");
}
}
else
{
- if ((Srv->IsUlined(user->nick)) || (Srv->IsUlined(user->server)) || (!strcmp(user->server,"")))
+ if ((Srv->IsUlined(user->nick)) || (Srv->IsUlined(user->server)) || (!strcmp(user->server,"") || (strchr(user->nick,'.'))))
{
+ log(DEBUG,"Allowing umode +r, server and nick are: '%s','%s'",user->nick,user->server);
return 1;
}
else
{
- Srv->SendServ(user->fd,"500 "+std::string(user->nick)+" :Only a U-Lined server may modify the +r user mode");
+ log(DEBUG,"Only a server can set umode +r, server and nick are: '%s','%s'",user->nick,user->server);
+ Srv->SendServ(user->fd,"500 "+std::string(user->nick)+" :Only a server may modify the +r user mode");
}
}
}