summaryrefslogtreecommitdiff
path: root/bouncer
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2014-01-24 20:36:45 +0100
committerTreeki <treeki@gmail.com>2014-01-24 20:36:45 +0100
commitf83687cc5e99d66153c296e7632b88de2594b79d (patch)
tree171996fcb3e7e235998edbe66f9c5440f23635c0 /bouncer
parent33371638a8985df53f86ed9297b9e57c9f46c015 (diff)
downloadbounce4-f83687cc5e99d66153c296e7632b88de2594b79d.tar.gz
bounce4-f83687cc5e99d66153c296e7632b88de2594b79d.zip
reverse the order of the user modes bitfield; top bit = highest power mode
Diffstat (limited to '')
-rw-r--r--bouncer/ircserver.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/bouncer/ircserver.cpp b/bouncer/ircserver.cpp
index f13a481..ecf5c64 100644
--- a/bouncer/ircserver.cpp
+++ b/bouncer/ircserver.cpp
@@ -359,14 +359,14 @@ void IRCServer::processISupport(const char *line) {
uint32_t IRCServer::getUserFlag(char search, const char *array) const {
- uint32_t flag = 1;
+ uint32_t flag = 0x80000000;
// Is this character a valid prefix?
while (*array != 0) {
if (*array == search)
return flag;
- flag <<= 1;
+ flag >>= 1;
++array;
}
}
@@ -393,7 +393,7 @@ int IRCServer::getChannelModeType(char mode) const {
}
char IRCServer::getEffectivePrefixChar(uint32_t modes) const {
- uint32_t flag = 1;
+ uint32_t flag = 0x80000000;
const char *prefixes = serverPrefix;
while (*prefixes != 0) {
@@ -401,7 +401,7 @@ char IRCServer::getEffectivePrefixChar(uint32_t modes) const {
return *prefixes;
++prefixes;
- flag <<= 1;
+ flag >>= 1;
}
return 0;