summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-08-06 13:35:40 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-08-06 13:35:40 +0200
commit51da1d3b59c25af4931b998cc23e2066392e548e (patch)
tree7f04223551f1a475f304befc744776bfadad0d9a /src/modules
parent00660293338f6a78278e52d05f6cf9a7ef9acc64 (diff)
Pass prefix rank and prefix char to PrefixMode constructor
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_customprefix.cpp3
-rw-r--r--src/modules/m_ojoin.cpp4
-rw-r--r--src/modules/m_operprefix.cpp4
3 files changed, 4 insertions, 7 deletions
diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp
index 65c2cbd31..f6f9a84f6 100644
--- a/src/modules/m_customprefix.cpp
+++ b/src/modules/m_customprefix.cpp
@@ -26,14 +26,13 @@ class CustomPrefixMode : public PrefixMode
bool depriv;
CustomPrefixMode(Module* parent, ConfigTag* Tag)
- : PrefixMode(parent, Tag->getString("name"), 0)
+ : PrefixMode(parent, Tag->getString("name"), 0, Tag->getInt("rank"))
, tag(Tag)
{
std::string v = tag->getString("prefix");
prefix = v.c_str()[0];
v = tag->getString("letter");
mode = v.c_str()[0];
- prefixrank = tag->getInt("rank");
levelrequired = tag->getInt("ranktoset", prefixrank);
depriv = tag->getBool("depriv", true);
}
diff --git a/src/modules/m_ojoin.cpp b/src/modules/m_ojoin.cpp
index 120715429..e3cbbbb41 100644
--- a/src/modules/m_ojoin.cpp
+++ b/src/modules/m_ojoin.cpp
@@ -87,11 +87,9 @@ class NetworkPrefix : public PrefixMode
{
public:
NetworkPrefix(Module* parent, char NPrefix)
- : PrefixMode(parent, "official-join", 'Y')
+ : PrefixMode(parent, "official-join", 'Y', NETWORK_VALUE, NPrefix)
{
- prefix = NPrefix;
levelrequired = INT_MAX;
- prefixrank = NETWORK_VALUE;
}
ModResult AccessCheck(User* source, Channel* channel, std::string &parameter, bool adding)
diff --git a/src/modules/m_operprefix.cpp b/src/modules/m_operprefix.cpp
index 3f05dd086..262c034db 100644
--- a/src/modules/m_operprefix.cpp
+++ b/src/modules/m_operprefix.cpp
@@ -29,12 +29,12 @@
class OperPrefixMode : public PrefixMode
{
public:
- OperPrefixMode(Module* Creator) : PrefixMode(Creator, "operprefix", 'y')
+ OperPrefixMode(Module* Creator)
+ : PrefixMode(Creator, "operprefix", 'y', OPERPREFIX_VALUE)
{
std::string pfx = ServerInstance->Config->ConfValue("operprefix")->getString("prefix", "!");
prefix = pfx.empty() ? '!' : pfx[0];
levelrequired = INT_MAX;
- prefixrank = OPERPREFIX_VALUE;
}
};