From 373bc208ff8f7eceecd944114cd729b5a348d918 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 3 Nov 2020 19:40:42 +0000 Subject: Move FilePosition to fileutils.h and use in ConfigTag. --- src/modules/m_customprefix.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/m_customprefix.cpp') diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp index 958330dfb..20cec66c2 100644 --- a/src/modules/m_customprefix.cpp +++ b/src/modules/m_customprefix.cpp @@ -59,17 +59,17 @@ class ModuleCustomPrefix : public Module { const std::string name = tag->getString("name"); if (name.empty()) - throw ModuleException(" must be specified at " + tag->getTagLocation()); + throw ModuleException(" must be specified at " + tag->source.str()); if (tag->getBool("change")) { ModeHandler* mh = ServerInstance->Modes.FindMode(name, MODETYPE_CHANNEL); if (!mh) - throw ModuleException(" specified for a nonexistent mode at " + tag->getTagLocation()); + throw ModuleException(" specified for a nonexistent mode at " + tag->source.str()); PrefixMode* pm = mh->IsPrefixMode(); if (!pm) - throw ModuleException(" specified for a non-prefix mode at " + tag->getTagLocation()); + throw ModuleException(" specified for a non-prefix mode at " + tag->source.str()); unsigned long rank = tag->getUInt("rank", pm->GetPrefixRank(), 0, UINT_MAX); unsigned long setrank = tag->getUInt("ranktoset", pm->GetLevelRequired(true), rank, UINT_MAX); @@ -84,11 +84,11 @@ class ModuleCustomPrefix : public Module const std::string letter = tag->getString("letter"); if (letter.length() != 1) - throw ModuleException(" must be set to a mode character at " + tag->getTagLocation()); + throw ModuleException(" must be set to a mode character at " + tag->source.str()); const std::string prefix = tag->getString("prefix"); if (prefix.length() != 1) - throw ModuleException(" must be set to a mode prefix at " + tag->getTagLocation()); + throw ModuleException(" must be set to a mode prefix at " + tag->source.str()); try { @@ -98,7 +98,7 @@ class ModuleCustomPrefix : public Module } catch (ModuleException& e) { - throw ModuleException(e.GetReason() + " (while creating mode from " + tag->getTagLocation() + ")"); + throw ModuleException(e.GetReason() + " (while creating mode from " + tag->source.str() + ")"); } } } -- cgit v1.3.1-10-gc9f91