From 5bd349f8ff6cc81cf04dc41620e2c7bd8031655e Mon Sep 17 00:00:00 2001 From: Aaron Weiss Date: Fri, 11 May 2018 22:28:18 +0200 Subject: [PATCH] Added more documentation to send_privmsg about line splitting. --- src/client/ext.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/ext.rs b/src/client/ext.rs index 0dd4568..f82c53d 100644 --- a/src/client/ext.rs +++ b/src/client/ext.rs @@ -184,7 +184,10 @@ pub trait ClientExt: Client { self.send(OPER(username.to_string(), password.to_string())) } - /// Sends a message to the specified target. + /// Sends a message to the specified target. If the message contains IRC newlines (`\r\n`), it + /// will automatically be split and sent as multiple separate `PRIVMSG`s to the specified + /// target. If you absolutely must avoid this behavior, you can do + /// `client.send(PRIVMSG(target, message))` directly. fn send_privmsg(&self, target: S1, message: S2) -> Result<()> where Self: Sized,