diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-08 17:44:16 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-08 17:44:16 +0000 |
commit | 33ed72a1dfae595132dd50c760b6a312ef2ce8fe (patch) | |
tree | 028c5a9cd64e99ee0574a0e9e89e8e2b5d2a0d1a /src/message.cpp | |
parent | d40e1e5b0b8c4b94359637921387cd80e9de991b (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/message.cpp')
-rw-r--r-- | src/message.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/message.cpp b/src/message.cpp index 28a11fda9..5106bffba 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -198,11 +198,11 @@ int c_count(userrec* u) } -bool hasumode(userrec* user, char mode) +bool hasumode(userrec* user, unsigned char mode) { if (user) { - return (strchr(user->modes,mode)>0); + return user->modes[mode-65]; } else return false; } @@ -422,7 +422,7 @@ std::string chlist(userrec *user,userrec* source) * If the channel is NOT private/secret AND the user is not invisible. * If the user is an oper, and the <options:operspywhois> option is set. */ - if ((source == user) || (*source->oper && Config->OperSpyWhois) || (((!rec->channel->modes[CM_PRIVATE]) && (!rec->channel->modes[CM_SECRET]) && !(user->modebits & UM_INVISIBLE)) || (rec->channel->HasUser(source)))) + if ((source == user) || (*source->oper && Config->OperSpyWhois) || (((!rec->channel->modes[CM_PRIVATE]) && (!rec->channel->modes[CM_SECRET]) && !(user->modes[UM_INVISIBLE])) || (rec->channel->HasUser(source)))) { list << cmode(user, rec->channel) << rec->channel->name << " "; } |