]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/builtinmodes.h
Remove a bunch of useless classes representing simple core modes
[user/henk/code/inspircd.git] / include / builtinmodes.h
index ce73a78171c374cbf3c4f44ee72f2ff7deb63200..26e38204aba31cf35bb5744ae71367e0cbe95989 100644 (file)
@@ -35,53 +35,26 @@ class ModeChannelBan : public ListModeBase
        }
 };
 
-/** Channel mode +i
- */
-class ModeChannelInviteOnly : public SimpleChannelModeHandler
-{
- public:
-       ModeChannelInviteOnly() : SimpleChannelModeHandler(NULL, "inviteonly", 'i')
-       {
-       }
-};
-
 /** 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);
-};
-
-/** Channel mode +m
- */
-class ModeChannelModerated : public SimpleChannelModeHandler
-{
- public:
-       ModeChannelModerated() : SimpleChannelModeHandler(NULL, "moderated", 'm')
-       {
-       }
-};
-
-/** Channel mode +n
- */
-class ModeChannelNoExternal : public SimpleChannelModeHandler
-{
- public:
-       ModeChannelNoExternal() : SimpleChannelModeHandler(NULL, "noextmsg", 'n')
-       {
-       }
+       void SerializeParam(Channel* chan, intptr_t n, std::string& out);
+       ModeAction OnSet(User* source, Channel* channel, std::string& parameter);
 };
 
 /** Channel mode +o
@@ -92,36 +65,6 @@ class ModeChannelOp : public PrefixMode
        ModeChannelOp();
 };
 
-/** Channel mode +p
- */
-class ModeChannelPrivate : public SimpleChannelModeHandler
-{
- public:
-       ModeChannelPrivate() : SimpleChannelModeHandler(NULL, "private", 'p')
-       {
-       }
-};
-
-/** Channel mode +s
- */
-class ModeChannelSecret : public SimpleChannelModeHandler
-{
- public:
-       ModeChannelSecret() : SimpleChannelModeHandler(NULL, "secret", 's')
-       {
-       }
-};
-
-/** Channel mode +t
- */
-class ModeChannelTopicOps : public SimpleChannelModeHandler
-{
- public:
-       ModeChannelTopicOps() : SimpleChannelModeHandler(NULL, "topiclock", 't')
-       {
-       }
-};
-
 /** Channel mode +v
  */
 class ModeChannelVoice : public PrefixMode
@@ -130,16 +73,6 @@ class ModeChannelVoice : public PrefixMode
        ModeChannelVoice();
 };
 
-/** User mode +i
- */
-class ModeUserInvisible : public SimpleUserModeHandler
-{
- public:
-       ModeUserInvisible() : SimpleUserModeHandler(NULL, "invisible", 'i')
-       {
-       }
-};
-
 /** User mode +s
  */
 class ModeUserServerNoticeMask : public ModeHandler
@@ -173,13 +106,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')
-       {
-       }
-};