mirror of
https://github.com/anope/anope.git
synced 2026-07-01 12:26:39 +02:00
Added I_OnPreUserConnect, I_OnUserModeAdd, and I_OnUserModeAdd events
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2596 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -32,6 +32,11 @@ bool ModeManager::AddUserMode(char Mode, UserMode *um)
|
||||
bool ret = ModeManager::UserModesByChar.insert(std::make_pair(Mode, um)).second;
|
||||
if (ret)
|
||||
ret = ModeManager::UserModesByName.insert(std::make_pair(um->Name, um)).second;
|
||||
|
||||
if (ret)
|
||||
{
|
||||
FOREACH_MOD(I_OnUserModeAdd, OnUserModeAdd(um));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -47,6 +52,11 @@ bool ModeManager::AddChannelMode(char Mode, ChannelMode *cm)
|
||||
bool ret = ModeManager::ChannelModesByChar.insert(std::make_pair(Mode, cm)).second;
|
||||
if (ret)
|
||||
ret = ModeManager::ChannelModesByName.insert(std::make_pair(cm->Name, cm)).second;
|
||||
|
||||
if (ret)
|
||||
{
|
||||
FOREACH_MOD(I_OnChannelModeAdd, OnChannelModeAdd(cm));
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user