summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2014-02-05 13:49:16 +0000
committerAttila Molnar <attilamolnar@hush.com>2014-02-06 23:10:01 +0100
commitdb0e78c5d2e0998591b274c027fef26e1ac6ce6a (patch)
treef87b58008e0b3ccb44c4c4088e913de95cf1dcb3 /include
parent13edc2e8eb1404e51131468451ed64ef4d25cdaf (diff)
Fix various cases of UUID exposure.
- Introduce WriteCommand which sends * when the user has not registered. - Switch a ton of code to use WriteCommand instead of WriteServ. - Convert WriteNotice to be a wrapper around WriteCommand. - Only send * when NICK has not been sent instead of before registration.
Diffstat (limited to 'include')
-rw-r--r--include/users.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/users.h b/include/users.h
index 6a61b2bc1..c699ebab7 100644
--- a/include/users.h
+++ b/include/users.h
@@ -501,10 +501,16 @@ class CoreExport User : public Extensible
*/
void WriteServ(const char* text, ...) CUSTOM_PRINTF(2, 3);
+ /** Sends a command to this user.
+ * @param command The command to be sent.
+ * @param text The message to send.
+ */
+ void WriteCommand(const char* command, const std::string& text);
+
/** Sends a server notice to this user.
* @param text The contents of the message to send.
*/
- void WriteNotice(const std::string& text);
+ void WriteNotice(const std::string& text) { this->WriteCommand("NOTICE", ":" + text); }
void WriteNumeric(unsigned int numeric, const char* text, ...) CUSTOM_PRINTF(3, 4);