summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mode.h2
-rw-r--r--src/mode.cpp6
2 files changed, 5 insertions, 3 deletions
diff --git a/include/mode.h b/include/mode.h
index 1c30d26e1..f515b1d16 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -120,7 +120,7 @@ class ModeParser
char* Revoke(userrec *d,chanrec *chan,int MASK);
public:
ModeParser();
-
+ bool AddMode(ModeHandler* mh, unsigned const char modeletter);
void Process(char **parameters, int pcnt, userrec *user, bool servermode);
//void ServerMode(char **parameters, int pcnt, userrec *user);
diff --git a/src/mode.cpp b/src/mode.cpp
index 059a9027b..0a490f92e 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -666,10 +666,12 @@ void cmd_mode::Handle (char **parameters, int pcnt, userrec *user)
return;
}
-ModeParser::AddMode(ModeHandler* mh, unsigned const char* modeletter)
+bool ModeParser::AddMode(ModeHandler* mh, unsigned const char modeletter)
{
- mh->GetType() == MODETYPE_USER ? mask = MASK_USER : mask = MASK_CHANNEL;
+ unsigned char mask = 0;
+ mh->GetModeType() == MODETYPE_USER ? mask = MASK_USER : mask = MASK_CHANNEL;
modehandlers[(modeletter-65) | mask] = mh;
+ return true;
}
ModeParser::ModeParser()