summaryrefslogtreecommitdiff
path: root/src/modules/m_services.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-08 17:44:16 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-08 17:44:16 +0000
commit33ed72a1dfae595132dd50c760b6a312ef2ce8fe (patch)
tree028c5a9cd64e99ee0574a0e9e89e8e2b5d2a0d1a /src/modules/m_services.cpp
parentd40e1e5b0b8c4b94359637921387cd80e9de991b (diff)
Refactored user modes to work like the channel modes - core and module data now the same storage format without ::modebits
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4175 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_services.cpp')
-rw-r--r--src/modules/m_services.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index 4d5183841..c868eefef 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -54,7 +54,7 @@ class ModuleServices : public Module
/* <- :stitch.chatspike.net 307 w00t w00t :is a registered nick */
virtual void OnWhois(userrec* source, userrec* dest)
{
- if (strchr(dest->modes, 'r'))
+ if (dest->modes['r'-65])
{
/* user is registered */
WriteServ(source->fd, "307 %s %s :is a registered nick", source->nick, dest->nick);
@@ -69,7 +69,7 @@ class ModuleServices : public Module
virtual void OnUserPostNick(userrec* user, const std::string &oldnick)
{
/* On nickchange, if they have +r, remove it */
- if (strchr(user->modes,'r'))
+ if (user->modes['r'-65])
{
char* modechange[2];
modechange[0] = user->nick;
@@ -133,7 +133,7 @@ class ModuleServices : public Module
if (target_type == TYPE_CHANNEL)
{
chanrec* c = (chanrec*)dest;
- if ((c->IsModeSet('M')) && (!strchr(user->modes,'r')))
+ if ((c->IsModeSet('M')) && (!user->modes['r'-65]))
{
if ((Srv->IsUlined(user->nick)) || (Srv->IsUlined(user->server)) || (!strcmp(user->server,"")))
{
@@ -148,7 +148,7 @@ class ModuleServices : public Module
if (target_type == TYPE_USER)
{
userrec* u = (userrec*)dest;
- if ((strchr(u->modes,'R')) && (!strchr(user->modes,'r')))
+ if ((u->modes['R'-65]) && (user->modes['r'-65]))
{
if ((Srv->IsUlined(user->nick)) || (Srv->IsUlined(user->server)))
{
@@ -174,7 +174,7 @@ class ModuleServices : public Module
{
if (chan->IsModeSet('R'))
{
- if (!strchr(user->modes,'r'))
+ if (user->modes['r'-65])
{
if ((Srv->IsUlined(user->nick)) || (Srv->IsUlined(user->server)))
{