Added method to set channel modes.

This commit is contained in:
Aaron Weiss 2014-09-27 15:08:38 -04:00
parent 0ad2411c14
commit e0c2c1174b

View file

@ -44,6 +44,10 @@ impl<'a> Bot<'a> {
send(&self.conn, Message::new(None, "JOIN", [chan.as_slice()])) send(&self.conn, Message::new(None, "JOIN", [chan.as_slice()]))
} }
pub fn send_mode(&self, chan: &str, mode: &str) -> IoResult<()> {
send(&self.conn, Message::new(None, "MODE", [chan.as_slice(), mode.as_slice()]))
}
pub fn send_topic(&self, chan: &str, topic: &str) -> IoResult<()> { pub fn send_topic(&self, chan: &str, topic: &str) -> IoResult<()> {
send(&self.conn, Message::new(None, "TOPIC", [chan.as_slice(), topic.as_slice()])) send(&self.conn, Message::new(None, "TOPIC", [chan.as_slice(), topic.as_slice()]))
} }