]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/builtinmodes.h
Move User::SendAll() into core_privmsg
[user/henk/code/inspircd.git] / include / builtinmodes.h
index b1e5c3ccd10bd87005b96eefcfcba902cd699267..e78e68b1124376cddc4397c3aaac21a1aacac9f7 100644 (file)
@@ -47,21 +47,24 @@ class ModeChannelInviteOnly : public SimpleChannelModeHandler
 
 /** Channel mode +k
  */
-class ModeChannelKey : public ModeHandler
+class ModeChannelKey : public ParamMode<ModeChannelKey, LocalStringExt>
 {
  public:
        ModeChannelKey();
        ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
+       void SerializeParam(Channel* chan, const std::string* key, std::string& out);
+       ModeAction OnSet(User* source, Channel* chan, std::string& param);
 };
 
 /** Channel mode +l
  */
-class ModeChannelLimit : public ParamChannelModeHandler
+class ModeChannelLimit : public ParamMode<ModeChannelLimit, LocalIntExt>
 {
  public:
        ModeChannelLimit();
-       bool ParamValidate(std::string& parameter);
        bool ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel* channel);
+       void SerializeParam(Channel* chan, intptr_t n, std::string& out);
+       ModeAction OnSet(User* source, Channel* channel, std::string& parameter);
 };
 
 /** Channel mode +m
@@ -86,13 +89,10 @@ class ModeChannelNoExternal : public SimpleChannelModeHandler
 
 /** Channel mode +o
  */
-class ModeChannelOp : public ModeHandler
+class ModeChannelOp : public PrefixMode
 {
- private:
  public:
        ModeChannelOp();
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
-       unsigned int GetPrefixRank();
 };
 
 /** Channel mode +p
@@ -127,13 +127,10 @@ class ModeChannelTopicOps : public SimpleChannelModeHandler
 
 /** Channel mode +v
  */
-class ModeChannelVoice : public ModeHandler
+class ModeChannelVoice : public PrefixMode
 {
- private:
  public:
        ModeChannelVoice();
-       ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
-       unsigned int GetPrefixRank();
 };
 
 /** User mode +i
@@ -179,13 +176,3 @@ class ModeUserOperator : public ModeHandler
        ModeUserOperator();
        ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
 };
-
-/** User mode +w
- */
-class ModeUserWallops : public SimpleUserModeHandler
-{
- public:
-       ModeUserWallops() : SimpleUserModeHandler(NULL, "wallops", 'w')
-       {
-       }
-};