mirror of
https://github.com/anope/anope.git
synced 2026-07-03 20:23:13 +02:00
Rewrote part of chan_set_correct_modes and set Mode::ModeChar correctly
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2590 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -28,6 +28,7 @@ std::map<ChannelModeName, ChannelMode *> ModeManager::ChannelModesByName;
|
||||
*/
|
||||
bool ModeManager::AddUserMode(char Mode, UserMode *um)
|
||||
{
|
||||
um->ModeChar = Mode;
|
||||
bool ret = ModeManager::UserModesByChar.insert(std::make_pair(Mode, um)).second;
|
||||
if (ret)
|
||||
ret = ModeManager::UserModesByName.insert(std::make_pair(um->Name, um)).second;
|
||||
@@ -42,6 +43,7 @@ bool ModeManager::AddUserMode(char Mode, UserMode *um)
|
||||
*/
|
||||
bool ModeManager::AddChannelMode(char Mode, ChannelMode *cm)
|
||||
{
|
||||
cm->ModeChar = Mode;
|
||||
bool ret = ModeManager::ChannelModesByChar.insert(std::make_pair(Mode, cm)).second;
|
||||
if (ret)
|
||||
ret = ModeManager::ChannelModesByName.insert(std::make_pair(cm->Name, cm)).second;
|
||||
|
||||
Reference in New Issue
Block a user