]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Migrate ModeChannelOp and ModeChannelVoice constructors to builtinmodes.h, remove...
authorAttila Molnar <attilamolnar@hush.com>
Wed, 6 Aug 2014 11:38:34 +0000 (13:38 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Wed, 6 Aug 2014 11:38:34 +0000 (13:38 +0200)
The default value for levelrequired is HALFOP_VALUE, meaning the ModeChannelVoice class is not required but it will be useful in case the default changes

include/builtinmodes.h
src/modes/cmode_o.cpp [deleted file]
src/modes/cmode_v.cpp [deleted file]

index 26e38204aba31cf35bb5744ae71367e0cbe95989..96838ce5e4e7307fe668afb32ff3dcd60e510046 100644 (file)
@@ -62,7 +62,11 @@ class ModeChannelLimit : public ParamMode<ModeChannelLimit, LocalIntExt>
 class ModeChannelOp : public PrefixMode
 {
  public:
-       ModeChannelOp();
+       ModeChannelOp()
+               : PrefixMode(NULL, "op", 'o', OP_VALUE, '@')
+       {
+               levelrequired = OP_VALUE;
+       }
 };
 
 /** Channel mode +v
@@ -70,7 +74,11 @@ class ModeChannelOp : public PrefixMode
 class ModeChannelVoice : public PrefixMode
 {
  public:
-       ModeChannelVoice();
+       ModeChannelVoice()
+               : PrefixMode(NULL, "voice", 'v', VOICE_VALUE, '+')
+       {
+               levelrequired = HALFOP_VALUE;
+       }
 };
 
 /** User mode +s
diff --git a/src/modes/cmode_o.cpp b/src/modes/cmode_o.cpp
deleted file mode 100644 (file)
index 4325b94..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * InspIRCd -- Internet Relay Chat Daemon
- *
- *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- *   Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
- *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
- *   Copyright (C) 2006 Craig Edwards <craigedwards@brainbox.cc>
- *
- * This file is part of InspIRCd.  InspIRCd is free software: you can
- * redistribute it and/or modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation, version 2.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "inspircd.h"
-#include "builtinmodes.h"
-
-ModeChannelOp::ModeChannelOp() : PrefixMode(NULL, "op", 'o', OP_VALUE, '@')
-{
-       levelrequired = OP_VALUE;
-}
diff --git a/src/modes/cmode_v.cpp b/src/modes/cmode_v.cpp
deleted file mode 100644 (file)
index 5ecc10c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * InspIRCd -- Internet Relay Chat Daemon
- *
- *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
- *   Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
- *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
- *   Copyright (C) 2006 Craig Edwards <craigedwards@brainbox.cc>
- *
- * This file is part of InspIRCd.  InspIRCd is free software: you can
- * redistribute it and/or modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation, version 2.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-
-#include "inspircd.h"
-#include "builtinmodes.h"
-
-ModeChannelVoice::ModeChannelVoice() : PrefixMode(NULL, "voice", 'v', VOICE_VALUE, '+')
-{
-       levelrequired = HALFOP_VALUE;
-}