1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 04:03:12 +02:00

Added 4 new events for (un)setting modes on channels and users

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2583 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Adam-
2009-10-25 04:12:21 +00:00
parent 8330009373
commit 338cb38ee8
3 changed files with 29 additions and 0 deletions
+2
View File
@@ -39,6 +39,7 @@ bool Channel::HasMode(ChannelModeName Name)
void Channel::SetMode(ChannelModeName Name)
{
modes[(size_t)Name] = true;
FOREACH_MOD(I_OnChannelModeSet, OnChannelModeSet(this, Name));
}
/**
@@ -62,6 +63,7 @@ void Channel::SetMode(char Mode)
void Channel::RemoveMode(ChannelModeName Name)
{
modes[(size_t)Name] = false;
FOREACH_MOD(I_OnChannelModeUnset, OnChannelModeUnset(this, Name));
}
/**
+2
View File
@@ -490,6 +490,7 @@ const bool User::HasMode(UserModeName Name) const
void User::SetMode(UserModeName Name)
{
modes[(size_t)Name] = true;
FOREACH_MOD(I_OnUserModeSet, OnUserModeSet(this, Name));
}
/* Set a mode on the user
@@ -511,6 +512,7 @@ void User::SetMode(char ModeChar)
void User::RemoveMode(UserModeName Name)
{
modes[(size_t)Name] = false;
FOREACH_MOD(I_OnUserModeUnset, OnUserModeUnset(this, Name));
}
/** Remove a mode from the user