Struct hiirc::Irc [] [src]

pub struct Irc {
    pub status: ConnectionStatus,
    // some fields omitted
}

Represents the state of this connection.

Fields

status: ConnectionStatus

Status of the connection.

Methods

impl Irc
[src]

fn get_channel_by_name(&self, name: &str) -> Option<&Channel>

Get a channel by name.

fn is_closed(&self) -> bool

Check if the underlying connection is closed.

fn close(&self) -> Result<()Error>

Close the underlying connection.

fn raw<S: AsRef<str>>(&self, raw: S) -> Result<()Error>

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

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

fn nick(&self, nickname: &str) -> Result<()Error>

NICK command.

fn user(&self, username: &str, realname: &str) -> Result<()Error>

USER command.

fn ping(&self, server: &str) -> Result<()Error>

PING command.

fn pong(&self, server: &str) -> Result<()Error>

PONG command.

fn privmsg(&self, target: &str, text: &str) -> Result<()Error>

PRIVMSG command.

fn join(&self, channel: &str, password: Option<&str>) -> Result<()Error>

JOIN command.

fn part(&self, channel: &str, message: Option<&str>) -> Result<()Error>

PART command.

fn quit(&self, message: Option<&str>) -> Result<()Error>

QUIT command.

fn get_topic(&self, channel: &str) -> Result<()Error>

Retrive the topic of a given channel.

The topic event will receive the information.

fn set_topic(&self, channel: &str, topic: &str) -> Result<()Error>

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.

fn kick(&self, channel: &str, nickname: &str) -> Result<()Error>

KICK command.

Trait Implementations

impl NickServ for Irc
[src]

fn identify(&self, password: &str) -> Result<()Error>

Send an identify message to the nick server. Read more