From 005b03c9f387e80c8e19ca5c26b1eb89362ff29a Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Wed, 6 Aug 2014 13:38:34 +0200 Subject: [PATCH] Migrate ModeChannelOp and ModeChannelVoice constructors to builtinmodes.h, remove cmode_{o,v} 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 | 12 ++++++++++-- src/modes/cmode_o.cpp | 29 ----------------------------- src/modes/cmode_v.cpp | 29 ----------------------------- 3 files changed, 10 insertions(+), 60 deletions(-) delete mode 100644 src/modes/cmode_o.cpp delete mode 100644 src/modes/cmode_v.cpp diff --git a/include/builtinmodes.h b/include/builtinmodes.h index 26e38204a..96838ce5e 100644 --- a/include/builtinmodes.h +++ b/include/builtinmodes.h @@ -62,7 +62,11 @@ class ModeChannelLimit : public ParamMode 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 index 4325b94a3..000000000 --- a/src/modes/cmode_o.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * InspIRCd -- Internet Relay Chat Daemon - * - * Copyright (C) 2009 Daniel De Graaf - * Copyright (C) 2007 Robin Burchell - * Copyright (C) 2007 Dennis Friis - * Copyright (C) 2006 Craig Edwards - * - * 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 . - */ - - -#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 index 5ecc10c9d..000000000 --- a/src/modes/cmode_v.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - * InspIRCd -- Internet Relay Chat Daemon - * - * Copyright (C) 2009 Daniel De Graaf - * Copyright (C) 2007 Robin Burchell - * Copyright (C) 2007 Dennis Friis - * Copyright (C) 2006 Craig Edwards - * - * 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 . - */ - - -#include "inspircd.h" -#include "builtinmodes.h" - -ModeChannelVoice::ModeChannelVoice() : PrefixMode(NULL, "voice", 'v', VOICE_VALUE, '+') -{ - levelrequired = HALFOP_VALUE; -} -- 2.39.5