From 33ed72a1dfae595132dd50c760b6a312ef2ce8fe Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 8 Jul 2006 17:44:16 +0000 Subject: 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 --- src/message.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/message.cpp') 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 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 << " "; } -- cgit v1.2.3