diff options
| author | 2026-03-28 21:32:23 +0000 | |
|---|---|---|
| committer | 2026-03-29 00:42:15 +0000 | |
| commit | cbc5431d62e3fe9166f18395dce3ddf2af0906d3 (patch) | |
| tree | 48a87fc27dc4826ce0caf4071e2060a9ff9e24c5 /modules/alias.cpp | |
| parent | Move service code from base to its own header. (diff) | |
Switch modules from reference<> to shared_ptr<> and weak_ptr<>.
Diffstat (limited to 'modules/alias.cpp')
| -rw-r--r-- | modules/alias.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/alias.cpp b/modules/alias.cpp index 85d16f2f3..966f519cf 100644 --- a/modules/alias.cpp +++ b/modules/alias.cpp @@ -89,11 +89,11 @@ public: Alias a; a.AliasedCommand = tag->getString("text"); if (a.AliasedCommand.empty()) - throw ModuleException(this, "<alias:text> is empty! at " + tag->source.str()); + throw ModuleException(weak_from_this(), "<alias:text> is empty! at " + tag->source.str()); tag->readString("replace", a.ReplaceFormat, true); if (a.ReplaceFormat.empty()) - throw ModuleException(this, "<alias:replace> is empty! at " + tag->source.str()); + throw ModuleException(weak_from_this(), "<alias:replace> is empty! at " + tag->source.str()); a.RequiredNick = tag->getString("requires"); a.ServiceOnly = tag->getBool("service"); @@ -115,7 +115,7 @@ public: ModuleAlias() : Module(VF_VENDOR, "Allows the server administrator to define custom channel commands (e.g. !kick) and server commands (e.g. /OPERSERV).") - , botmode(this, "bot") + , botmode(weak_from_this(), "bot") { } @@ -391,7 +391,7 @@ public: void Prioritize() override { // Prioritise after spanningtree so that channel aliases show the alias before the effects. - ServerInstance->Modules.SetPriority(this, I_OnUserPostMessage, PRIORITY_AFTER, "spanningtree"); + ServerInstance->Modules.SetPriority(shared_from_this(), I_OnUserPostMessage, PRIORITY_AFTER, "spanningtree"); } }; |
