summaryrefslogtreecommitdiff
path: root/include/users.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-20 04:40:27 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-20 04:40:27 +0000
commit34fbe51fa4d0cb1a5e03089e4d896dbd6de017b0 (patch)
tree78c2f2c45c7857c9ce14c8770b76c17b21b52d19 /include/users.h
parentfa5abf73fee733bda9c99005c447205df2299e14 (diff)
Move DumpText into User; kill unused WriteWallOps and DecreasePenalty functions
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11931 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/users.h')
-rw-r--r--include/users.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/include/users.h b/include/users.h
index 42d04696a..5153ebdd4 100644
--- a/include/users.h
+++ b/include/users.h
@@ -666,23 +666,26 @@ class CoreExport User : public StreamSocket
*/
void UnOper();
- /** Write text to this user, appending CR/LF.
+ /** Write text to this user, appending CR/LF. Works on local users only.
* @param text A std::string to send to the user
*/
void Write(const std::string &text);
/** Write text to this user, appending CR/LF.
+ * Works on local users only.
* @param text The format string for text to send to the user
* @param ... POD-type format arguments
*/
void Write(const char *text, ...) CUSTOM_PRINTF(2, 3);
/** Write text to this user, appending CR/LF and prepending :server.name
+ * Works on local users only.
* @param text A std::string to send to the user
*/
void WriteServ(const std::string& text);
/** Write text to this user, appending CR/LF and prepending :server.name
+ * Works on local users only.
* @param text The format string for text to send to the user
* @param ... POD-type format arguments
*/
@@ -742,18 +745,19 @@ class CoreExport User : public StreamSocket
*/
void WriteCommonQuit(const std::string &normal_text, const std::string &oper_text);
- /** Write a WALLOPS message from this user to all local opers.
- * If this user is not opered, the function will return without doing anything.
- * @param text The format string to send in the WALLOPS message
- * @param ... Format arguments
+ /** Dump text to a user target, splitting it appropriately to fit
+ * @param LinePrefix text to prefix each complete line with
+ * @param TextStream the text to send to the user
+ */
+ void SendText(const std::string &LinePrefix, std::stringstream &TextStream);
+
+ /** Write to the user, routing the line if the user is remote.
*/
- void WriteWallOps(const char* text, ...) CUSTOM_PRINTF(2, 3);
+ void SendText(const std::string& line);
- /** Write a WALLOPS message from this user to all local opers.
- * If this user is not opered, the function will return without doing anything.
- * @param text The text to send in the WALLOPS message
+ /** Write to the user, routing the line if the user is remote.
*/
- void WriteWallOps(const std::string &text);
+ void SendText(const char* text, ...) CUSTOM_PRINTF(2, 3);
/** Return true if the user shares at least one channel with another user
* @param other The other user to compare the channel list against
@@ -849,10 +853,6 @@ class CoreExport User : public StreamSocket
*/
void IncreasePenalty(int increase);
- /** Decreases a user's command penalty by a set amount.
- */
- void DecreasePenalty(int decrease);
-
void OnDataReady();
void OnError(BufferedSocketError error);