diff options
| author | 2022-11-24 19:16:25 +0000 | |
|---|---|---|
| committer | 2022-11-24 19:16:25 +0000 | |
| commit | b045f49afbb7e0b0af7bae84f075d3e0660b39e6 (patch) | |
| tree | 390de1d1664cb157b0ce4c1ee2d266a55733efaa /include/modules | |
| parent | Use string_view in IsNick/IsIdent/IsChannel. (diff) | |
| parent | Add a workaround for the replies API not working with a cap reference. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'include/modules')
| -rw-r--r-- | include/modules/ircv3_replies.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/modules/ircv3_replies.h b/include/modules/ircv3_replies.h index 480b6c8df..715c52121 100644 --- a/include/modules/ircv3_replies.h +++ b/include/modules/ircv3_replies.h @@ -116,12 +116,12 @@ public: * @param args A variable number of context parameters and a human readable description of this reply. */ template<typename... Args> - void SendIfCap(LocalUser* user, const Cap::Capability& cap, Command* command, const std::string& code, + void SendIfCap(LocalUser* user, Cap::Capability* cap, Command* command, const std::string& code, Args&&... args) { static_assert(sizeof...(Args) >= 1); - if (cap.IsEnabled(user)) + if (cap && cap->IsEnabled(user)) Send(user, command, code, std::forward<Args>(args)...); else SendNoticeInternal(user, command, std::get<sizeof...(Args) - 1>(std::forward_as_tuple(args...))); |
