Added more documentation to send_privmsg about line splitting.

This commit is contained in:
Aaron Weiss 2018-05-11 22:28:18 +02:00
parent 4e9b1ece19
commit 5bd349f8ff
No known key found for this signature in database
GPG key ID: 047D32DF25DC22EF

View file

@ -184,7 +184,10 @@ pub trait ClientExt: Client {
self.send(OPER(username.to_string(), password.to_string())) 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<S1, S2>(&self, target: S1, message: S2) -> Result<()> fn send_privmsg<S1, S2>(&self, target: S1, message: S2) -> Result<()>
where where
Self: Sized, Self: Sized,