summaryrefslogtreecommitdiff
path: root/src/modules/m_customprefix.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-04-14 15:43:03 +0100
committerPeter Powell <petpow@saberuk.com>2018-04-16 15:29:55 +0100
commit780dda83ba3857bc3c330d4b5d38bb251a9d879b (patch)
tree75034915142a3e1362f0f9d59c8e96e1eec22931 /src/modules/m_customprefix.cpp
parent2d36fcb16ef3209fffbe9f4b600971a1edd2ae4b (diff)
Add ConfigTag::getUInt for reading unsigned config values.
Diffstat (limited to 'src/modules/m_customprefix.cpp')
-rw-r--r--src/modules/m_customprefix.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp
index 5874e02d9..befc9750d 100644
--- a/src/modules/m_customprefix.cpp
+++ b/src/modules/m_customprefix.cpp
@@ -28,9 +28,9 @@ class CustomPrefixMode : public PrefixMode
: PrefixMode(parent, Name, Letter, 0, Prefix)
, tag(Tag)
{
- long rank = tag->getInt("rank", 0, 0, UINT_MAX);
- long setrank = tag->getInt("ranktoset", prefixrank, rank, UINT_MAX);
- long unsetrank = tag->getInt("ranktounset", setrank, setrank, UINT_MAX);
+ unsigned long rank = tag->getUInt("rank", 0, 0, UINT_MAX);
+ unsigned long setrank = tag->getUInt("ranktoset", prefixrank, rank, UINT_MAX);
+ unsigned long unsetrank = tag->getUInt("ranktounset", setrank, setrank, UINT_MAX);
bool depriv = tag->getBool("depriv", true);
this->Update(rank, setrank, unsetrank, depriv);
@@ -64,9 +64,9 @@ class ModuleCustomPrefix : public Module
if (!pm)
throw ModuleException("<customprefix:change> specified for a non-prefix mode at " + tag->getTagLocation());
- long rank = tag->getInt("rank", pm->GetPrefixRank(), 0, UINT_MAX);
- long setrank = tag->getInt("ranktoset", pm->GetLevelRequired(true), rank, UINT_MAX);
- long unsetrank = tag->getInt("ranktounset", pm->GetLevelRequired(false), setrank, UINT_MAX);
+ unsigned long rank = tag->getUInt("rank", pm->GetPrefixRank(), 0, UINT_MAX);
+ unsigned long setrank = tag->getUInt("ranktoset", pm->GetLevelRequired(true), rank, UINT_MAX);
+ unsigned long unsetrank = tag->getUInt("ranktounset", pm->GetLevelRequired(false), setrank, UINT_MAX);
bool depriv = tag->getBool("depriv", pm->CanSelfRemove());
pm->Update(rank, setrank, unsetrank, depriv);