diff options
Diffstat (limited to 'src/modules/m_customprefix.cpp')
| -rw-r--r-- | src/modules/m_customprefix.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_customprefix.cpp b/src/modules/m_customprefix.cpp index 52af6e846..b077ef7e9 100644 --- a/src/modules/m_customprefix.cpp +++ b/src/modules/m_customprefix.cpp @@ -61,20 +61,20 @@ class ModuleCustomPrefix final { const std::string name = tag->getString("name"); if (name.empty()) - throw ModuleException("<customprefix:name> must be specified at " + tag->source.str()); + throw ModuleException(this, "<customprefix:name> must be specified at " + tag->source.str()); if (name.find(' ') != std::string::npos) - throw ModuleException("<customprefix:name> must not contain spaces at " + tag->source.str()); + throw ModuleException(this, "<customprefix:name> must not contain spaces at " + tag->source.str()); if (tag->getBool("change")) { ModeHandler* mh = ServerInstance->Modes.FindMode(name, MODETYPE_CHANNEL); if (!mh) - throw ModuleException("<customprefix:change> specified for a nonexistent mode at " + tag->source.str()); + throw ModuleException(this, "<customprefix:change> specified for a nonexistent mode at " + tag->source.str()); PrefixMode* pm = mh->IsPrefixMode(); if (!pm) - throw ModuleException("<customprefix:change> specified for a non-prefix mode at " + tag->source.str()); + throw ModuleException(this, "<customprefix:change> specified for a non-prefix mode at " + tag->source.str()); unsigned int rank = static_cast<unsigned int>(tag->getUInt("rank", pm->GetPrefixRank(), 0, UINT_MAX)); unsigned int setrank = static_cast<unsigned int>(tag->getUInt("ranktoset", pm->GetLevelRequired(true), rank, UINT_MAX)); @@ -89,11 +89,11 @@ class ModuleCustomPrefix final const std::string letter = tag->getString("letter"); if (letter.length() != 1) - throw ModuleException("<customprefix:letter> must be set to a mode character at " + tag->source.str()); + throw ModuleException(this, "<customprefix:letter> must be set to a mode character at " + tag->source.str()); const std::string prefix = tag->getString("prefix"); if (prefix.length() != 1) - throw ModuleException("<customprefix:prefix> must be set to a mode prefix at " + tag->source.str()); + throw ModuleException(this, "<customprefix:prefix> must be set to a mode prefix at " + tag->source.str()); try { @@ -103,7 +103,7 @@ class ModuleCustomPrefix final } catch (ModuleException& e) { - throw ModuleException(e.GetReason() + " (while creating mode from " + tag->source.str() + ")"); + throw ModuleException(this, e.GetReason() + " (while creating mode from " + tag->source.str() + ")"); } } } |
