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_codepage.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/modules/m_codepage.cpp') diff --git a/src/modules/m_codepage.cpp b/src/modules/m_codepage.cpp index fcff62ff5..6cf22dc98 100644 --- a/src/modules/m_codepage.cpp +++ b/src/modules/m_codepage.cpp @@ -129,11 +129,11 @@ class ModuleCodepage { unsigned char begin = tag->getUInt("begin", tag->getUInt("index", 0), 1, UCHAR_MAX); if (!begin) - throw ModuleException(" tag without index or begin specified at " + tag->getTagLocation()); + throw ModuleException(" tag without index or begin specified at " + tag->source.str()); unsigned char end = tag->getUInt("end", begin, 1, UCHAR_MAX); if (begin > end) - throw ModuleException(" must be lower than at " + tag->getTagLocation()); + throw ModuleException(" must be lower than at " + tag->source.str()); bool front = tag->getBool("front", false); for (unsigned short pos = begin; pos <= end; ++pos) @@ -141,13 +141,13 @@ class ModuleCodepage if (pos == '\n' || pos == '\r' || pos == ' ') { throw ModuleException(InspIRCd::Format(" tag contains a forbidden character: %u at %s", - pos, tag->getTagLocation().c_str())); + pos, tag->source.str().c_str())); } if (front && (pos == ':' || isdigit(pos))) { throw ModuleException(InspIRCd::Format(" tag contains a forbidden front character: %u at %s", - pos, tag->getTagLocation().c_str())); + pos, tag->source.str().c_str())); } newallowedchars.set(pos); @@ -165,11 +165,11 @@ class ModuleCodepage { unsigned char lower = tag->getUInt("lower", 0, 1, UCHAR_MAX); if (!lower) - throw ModuleException(" is required at " + tag->getTagLocation()); + throw ModuleException(" is required at " + tag->source.str()); unsigned char upper = tag->getUInt("upper", 0, 1, UCHAR_MAX); if (!upper) - throw ModuleException(" is required at " + tag->getTagLocation()); + throw ModuleException(" is required at " + tag->source.str()); newcasemap[upper] = lower; ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "Marked %u (%c) as the lower case version of %u (%c)", -- cgit v1.3.1-10-gc9f91