summaryrefslogtreecommitdiff
path: root/include/modules/cap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules/cap.h')
-rw-r--r--include/modules/cap.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/modules/cap.h b/include/modules/cap.h
index 8299d14ae..6dcb9f3bc 100644
--- a/include/modules/cap.h
+++ b/include/modules/cap.h
@@ -313,4 +313,23 @@ namespace Cap
return false;
}
};
+
+ class MessageBase : public ClientProtocol::Message
+ {
+ public:
+ MessageBase(const std::string& subcmd)
+ : ClientProtocol::Message("CAP", ServerInstance->Config->ServerName)
+ {
+ PushParamPlaceholder();
+ PushParam(subcmd);
+ }
+
+ void SetUser(LocalUser* user)
+ {
+ if (user->registered & REG_NICK)
+ ReplaceParamRef(0, user->nick);
+ else
+ ReplaceParam(0, "*");
+ }
+ };
}