aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-08-18 15:44:54 +0100
committerGravatar Sadie Powell2024-08-18 15:53:01 +0100
commitca78bc4a0e54c7a76482d3fc5cdf0e7ee3a65597 (patch)
tree05adfcc1ecee6fbfeec333dc0ee39447382a24d6 /include
parentUpdate my nick in the INFO output. (diff)
Document Write* members in the User type correctly.
Diffstat (limited to 'include')
-rw-r--r--include/users.h44
1 files changed, 29 insertions, 15 deletions
diff --git a/include/users.h b/include/users.h
index b3b191e88..f6dd59a0d 100644
--- a/include/users.h
+++ b/include/users.h
@@ -654,42 +654,56 @@ public:
/** Logs this user out of their server operator account. Does nothing to non-operators. */
void OperLogout();
+ /** Write to all users that can see this user (including this user in the list if include_self is true), appending CR/LF
+ * @param protoev Protocol event to send, may contain any number of messages.
+ * @param include_self Should the message be sent back to the author?
+ */
+ void WriteCommonRaw(ClientProtocol::Event& protoev, bool include_self = true);
+
/** Sends a server notice to this user.
- * @param text The contents of the message to send.
+ * @param text The message to send.
*/
void WriteNotice(const std::string& text);
- /** Send a NOTICE message from the local server to the user.
- * @param text Text to send
+ /** Sends a server notice from the local server to the user.
+ * @param text The message to send.
*/
virtual void WriteRemoteNotice(const std::string& text);
- virtual void WriteRemoteNumeric(const Numeric::Numeric& numeric);
+ /** Sends a notice to this user.
+ * @param numeric The numeric to send.
+ */
+ void WriteNumeric(const Numeric::Numeric& numeric);
+ /** Sends a notice to this user.
+ * @param numeric The numeric code to send.
+ * @param p One or more parameters to the numeric.
+ */
template <typename... Param>
- void WriteRemoteNumeric(unsigned int numeric, Param&&... p)
+ void WriteNumeric(unsigned int numeric, Param&&... p)
{
Numeric::Numeric n(numeric);
n.push(std::forward<Param>(p)...);
- WriteRemoteNumeric(n);
+ WriteNumeric(n);
}
- void WriteNumeric(const Numeric::Numeric& numeric);
+ /** Sends a notice from the local server to this user.
+ * @param numeric The numeric to send.
+ */
+ virtual void WriteRemoteNumeric(const Numeric::Numeric& numeric);
+ /** Sends a notice from the local server to this user.
+ * @param numeric The numeric code to send.
+ * @param p One or more parameters to the numeric.
+ */
template <typename... Param>
- void WriteNumeric(unsigned int numeric, Param&&... p)
+ void WriteRemoteNumeric(unsigned int numeric, Param&&... p)
{
Numeric::Numeric n(numeric);
n.push(std::forward<Param>(p)...);
- WriteNumeric(n);
+ WriteRemoteNumeric(n);
}
- /** Write to all users that can see this user (including this user in the list if include_self is true), appending CR/LF
- * @param protoev Protocol event to send, may contain any number of messages.
- * @param include_self Should the message be sent back to the author?
- */
- void WriteCommonRaw(ClientProtocol::Event& protoev, bool include_self = true);
-
/** Execute a function once for each local neighbor of this user. By default, the neighbors of a user are the users
* who have at least one common channel with the user. Modules are allowed to alter the set of neighbors freely.
* This function is used for example to send something conditionally to neighbors, or to send different messages