diff options
| author | 2026-03-01 01:28:41 +0000 | |
|---|---|---|
| committer | 2026-03-01 01:28:41 +0000 | |
| commit | a1d25d2c14161d5eb466c14c936688fcc36a5a2f (patch) | |
| tree | 7986cc6967168923600913e6961d31ad698969be /modules/cloak_custom.cpp | |
| parent | Fix swhois sending a NOTE when it should send a FAIL. (diff) | |
Move standard replies to the core and add remote reply support.
Diffstat (limited to 'modules/cloak_custom.cpp')
| -rw-r--r-- | modules/cloak_custom.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/modules/cloak_custom.cpp b/modules/cloak_custom.cpp index 3adf529fd..3baecf737 100644 --- a/modules/cloak_custom.cpp +++ b/modules/cloak_custom.cpp @@ -21,7 +21,7 @@ #include "extension.h" #include "modules/cloak.h" #include "modules/hash.h" -#include "modules/ircv3_replies.h" +#include "modules/ircv3.h" class CustomCloakExtItem final : public SimpleExtItem<Cloak::Info> @@ -115,13 +115,11 @@ class CommandCustomCloak final private: CustomCloakExtItem& cloakext; UserModeReference cloakmode; - IRCv3::Replies::Fail failrpl; - IRCv3::Replies::Note noterpl; - IRCv3::Replies::CapReference stdrplcap; + IRCv3::ReplyCapReference stdrplcap; CmdResult FailedLogin(LocalUser* user, const std::string& account) { - failrpl.SendIfCap(user, stdrplcap, this, "LOGIN_FAIL", account, FMT::format("Failed to log into the \x02{}\x02 custom cloak account.", account)); + IRCv3::WriteReply(Reply::Type::FAIL, user, stdrplcap, this, "LOGIN_FAIL", account, FMT::format("Failed to log into the \x02{}\x02 custom cloak account.", account)); user->CommandFloodPenalty += 2500; return CmdResult::FAILURE; } @@ -133,8 +131,6 @@ public: : SplitCommand(mod, "CUSTOMCLOAK", 2) , cloakext(ext) , cloakmode(mod, "cloak") - , failrpl(mod) - , noterpl(mod) , stdrplcap(mod) { syntax = { "<username> <password>" }; @@ -169,7 +165,7 @@ public: } // If they have reached this point then the login succeeded, - noterpl.SendIfCap(user, stdrplcap, this, "LOGIN_SUCCESS", it->first, account.cloak.ToString(), FMT::format("You are now logged in as \x02{}\x02; updating your cloak to \x02{}\x02.", + IRCv3::WriteReply(Reply::Type::NOTE, user, stdrplcap, this, "LOGIN_SUCCESS", it->first, account.cloak.ToString(), FMT::format("You are now logged in as \x02{}\x02; updating your cloak to \x02{}\x02.", it->first, account.cloak.ToString())); cloakext.Set(user, account.cloak); |
