Trait hiirc::IrcWrite [] [src]

pub trait IrcWrite {
    fn raw<S: AsRef<str>>(&self, raw: S) -> Result<(), Error>;

    fn nick(&self, nickname: &str) -> Result<(), Error> { ... }
fn user(&self, username: &str, realname: &str) -> Result<(), Error> { ... }
fn ping(&self, server: &str) -> Result<(), Error> { ... }
fn pong(&self, server: &str) -> Result<(), Error> { ... }
fn pass(&self, password: &str) -> Result<(), Error> { ... }
fn privmsg(&self, target: &str, text: &str) -> Result<(), Error> { ... }
fn notice(&self, target: &str, text: &str) -> Result<(), Error> { ... }
fn join(&self, channel: &str, password: Option<&str>) -> Result<(), Error> { ... }
fn part(&self, channel: &str, message: Option<&str>) -> Result<(), Error> { ... }
fn quit(&self, message: Option<&str>) -> Result<(), Error> { ... }
fn get_topic(&self, channel: &str) -> Result<(), Error> { ... }
fn set_topic(&self, channel: &str, topic: &str) -> Result<(), Error> { ... }
fn kick(&self, channel: &str, nickname: &str) -> Result<(), Error> { ... } }

Ability to send commands to the irc server.

This trait represents the ability to send messages to a server. It's implemented by Irc and Deferred.

Required Methods

Send a raw message. A newline is added for you.

If you add a new line it will be refused as a multiline message.

Provided Methods

NICK command.

USER command.

PING command.

PONG command.

PASS command.

PRIVMSG command.

NOTICE command.

JOIN command.

PART command.

QUIT command.

Retrive the topic of a given channel.

The topic event will receive the information.

Set the topic of a channel.

To remove the topic of a channel, use an empty topic string. It will also trigger a topic_change event.

KICK command.

Implementors