X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_customprefix.cpp;h=befc9750d1c90e89957ee14e15ea9b07a635cca0;hb=965c81baee0fb6f46aa788f45742d558f50c8b15;hp=5874e02d9c1f1d2bf5f846a2c850f6cb90403568;hpb=368adf591020261c4e8f8d066e2cbfc16add3832;p=user%2Fhenk%2Fcode%2Finspircd.git 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(" 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);