diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-18 16:55:27 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-18 16:55:27 +0000 |
commit | 32a26fa539242d009ffab01e09cafdaba9270dac (patch) | |
tree | cef3ba7e424faa783c67689ec22838185eef752b /src/mode.cpp | |
parent | 3ca314bffcd18c2cc965594b46ca058e57aaa7e9 (diff) |
Someone please help me fix the warnings in modules caused by this change. All mode handler OnMode events, ModeWatcher::BeforeMode/AfterMode, plus OnRawMode now have a bool servermode parameter
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8964 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 6b22587b1..e58dd6762 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -119,7 +119,7 @@ char ModeHandler::GetModeChar() return mode; } -ModeAction ModeHandler::OnModeChange(User*, User*, Channel*, std::string&, bool) +ModeAction ModeHandler::OnModeChange(User*, User*, Channel*, std::string&, bool, bool) { return MODEACTION_DENY; } @@ -167,12 +167,12 @@ ModeType ModeWatcher::GetModeType() return m_type; } -bool ModeWatcher::BeforeMode(User*, User*, Channel*, std::string&, bool, ModeType) +bool ModeWatcher::BeforeMode(User*, User*, Channel*, std::string&, bool, ModeType, bool) { return true; } -void ModeWatcher::AfterMode(User*, User*, Channel*, const std::string&, bool, ModeType) +void ModeWatcher::AfterMode(User*, User*, Channel*, const std::string&, bool, ModeType, bool) { } @@ -509,11 +509,11 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser continue; } - FOREACH_RESULT(I_OnRawMode, OnRawMode(user, targetchannel, modechar, parameter, adding, 1)); + FOREACH_RESULT(I_OnRawMode, OnRawMode(user, targetchannel, modechar, parameter, adding, 1, servermode)); } else { - FOREACH_RESULT(I_OnRawMode, OnRawMode(user, targetchannel, modechar, "", adding, 0)); + FOREACH_RESULT(I_OnRawMode, OnRawMode(user, targetchannel, modechar, "", adding, 0, servermode)); } if (IS_LOCAL(user) && (MOD_RESULT == ACR_DENY)) @@ -560,7 +560,7 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser for (ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++) { - if ((*watchers)->BeforeMode(user, targetuser, targetchannel, parameter, adding, type) == false) + if ((*watchers)->BeforeMode(user, targetuser, targetchannel, parameter, adding, type, servermode) == false) { abort = true; break; @@ -588,7 +588,7 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser } /* Call the handler for the mode */ - ModeAction ma = modehandlers[handler_id]->OnModeChange(user, targetuser, targetchannel, parameter, adding); + ModeAction ma = modehandlers[handler_id]->OnModeChange(user, targetuser, targetchannel, parameter, adding, servermode); if ((modehandlers[handler_id]->GetNumParams(adding)) && (parameter.empty())) { @@ -631,7 +631,7 @@ void ModeParser::Process(const char** parameters, int pcnt, User *user, bool ser /* Call all the AfterMode events in the mode watchers for this mode */ for (ModeWatchIter watchers = modewatchers[handler_id].begin(); watchers != modewatchers[handler_id].end(); watchers++) - (*watchers)->AfterMode(user, targetuser, targetchannel, parameter, adding, type); + (*watchers)->AfterMode(user, targetuser, targetchannel, parameter, adding, type, servermode); /* Reset the state change flag */ state_change = false; |