summaryrefslogtreecommitdiff
path: root/src/modes/umode_s.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-01 19:56:16 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-01 19:56:16 +0000
commit0376f1d8be09a242befe207be4fa9e809d098557 (patch)
treefb4b48e61025a335d271efa39a622526f8517e50 /src/modes/umode_s.cpp
parentef79134812eb0f3ef024fe57519dce05ec4fb401 (diff)
Convert to SimpleUserModeHandler and SimpleChannelModeHandler
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9599 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modes/umode_s.cpp')
-rw-r--r--src/modes/umode_s.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/modes/umode_s.cpp b/src/modes/umode_s.cpp
index 4e5fba8e0..6b6e521eb 100644
--- a/src/modes/umode_s.cpp
+++ b/src/modes/umode_s.cpp
@@ -17,27 +17,10 @@
#include "users.h"
#include "modes/umode_s.h"
-ModeUserServerNotice::ModeUserServerNotice(InspIRCd* Instance) : ModeHandler(Instance, 's', 0, 0, false, MODETYPE_USER, false)
+ModeUserServerNotice::ModeUserServerNotice(InspIRCd* Instance) : SimpleUserModeHandler(Instance, 's')
{
}
-ModeAction ModeUserServerNotice::OnModeChange(User* source, User* dest, Channel*, std::string&, bool adding, bool servermode)
-{
- /* Only opers can change other users modes */
- if ((source != dest) && (!*source->oper))
- return MODEACTION_DENY;
-
- /* Set the bitfields */
- if (dest->modes[UM_SERVERNOTICE] != adding)
- {
- dest->modes[UM_SERVERNOTICE] = adding;
- return MODEACTION_ALLOW;
- }
-
- /* Allow the change */
- return MODEACTION_DENY;
-}
-
unsigned int ModeUserServerNotice::GetCount()
{
return count;