diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-27 22:29:56 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-27 22:29:56 +0000 |
commit | 1a738eb97eb7ac62b7d28bd40b03969d175ee6e3 (patch) | |
tree | f9aba6c851c7c3575d10b23caaf8db79af159f23 /src/mode.cpp | |
parent | 50234923b292122bb19296952b947d55b1760c62 (diff) |
Add user/channel mode synchronisation detection to CAPAB - link will now drop if modes differ in some way (one side requires param, other doesn't, etc). Same for user modes.
This will not affect services. Side effect: Modes::ChanModes() -> Modes::GiveModeList(ModeMasks), mode list is formatted
identically for both MASK_CHANNEL and MASK_USER.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10733 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index bdec78737..a5549a964 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -1010,7 +1010,7 @@ std::string ModeParser::ModeString(User* user, Channel* channel, bool nick_suffi return types; } -std::string ModeParser::ChanModes() +std::string ModeParser::GiveModeList(ModeMasks m) { std::string type1; /* Listmodes EXCEPT those with a prefix */ std::string type2; /* Modes that take a param when adding or removing */ @@ -1022,7 +1022,7 @@ std::string ModeParser::ChanModes() if ((!ServerInstance->Config->AllowHalfop) && (mode == 'h')) continue; - unsigned char pos = (mode-65) | MASK_CHANNEL; + unsigned char pos = (mode-65) | m; /* One parameter when adding */ if (modehandlers[pos]) { |