Added send_privmsg(...) to Bot implementation.
This commit is contained in:
parent
8672c257cb
commit
9dea4586eb
1 changed files with 4 additions and 0 deletions
|
@ -40,6 +40,10 @@ impl<'a> Bot<'a> {
|
|||
send(&self.conn, Message::new(None, "JOIN", [chan.as_slice()]))
|
||||
}
|
||||
|
||||
pub fn send_privmsg(&self, chan: &str, msg: &str) -> IoResult<()> {
|
||||
send(&self.conn, Message::new(None, "PRIVMSG", [chan.as_slice(), msg.as_slice()]))
|
||||
}
|
||||
|
||||
pub fn identify(&self) -> IoResult<()> {
|
||||
self.send_nick(self.config.nickname.as_slice());
|
||||
self.send_user(self.config.username.as_slice(), self.config.realname.as_slice())
|
||||
|
|
Loading…
Add table
Reference in a new issue