[−][src]Enum irc_async::proto::command::Command
List of all client commands as defined in RFC 2812. This also includes commands from the capabilities extension. Additionally, this includes some common additional commands from popular IRCds.
Variants
PASS(String)
PASS :password
NICK(String)
NICK :nickname
USER user mode * :realname
OPER name :password
MODE nickname modes
SERVICE nickname reserved distribution type reserved :info
QUIT :comment
SQUIT server :comment
JOIN chanlist [chankeys] :[Real name]
PART chanlist :[comment]
ChannelMODE(String, Vec<Mode<ChannelMode>>)
MODE channel [modes [modeparams]]
TOPIC channel :[topic]
NAMES [chanlist :[target]]
LIST [chanlist :[target]]
INVITE nickname channel
KICK chanlist userlist :[comment]
PRIVMSG msgtarget :message
Responding to a PRIVMSG
When responding to a message, it is not sufficient to simply copy the message target
(msgtarget). This will work just fine for responding to messages in channels where the
target is the same for all participants. However, when the message is sent directly to a
user, this target will be that client's username, and responding to that same target will
actually mean sending itself a response. In such a case, you should instead respond to the
user sending the message as specified in the message prefix. Since this is a common
pattern, there is a utility function
Message::response_target
which is used for this exact purpose.
NOTICE msgtarget :message
Responding to a NOTICE
When responding to a notice, it is not sufficient to simply copy the message target
(msgtarget). This will work just fine for responding to messages in channels where the
target is the same for all participants. However, when the message is sent directly to a
user, this target will be that client's username, and responding to that same target will
actually mean sending itself a response. In such a case, you should instead respond to the
user sending the message as specified in the message prefix. Since this is a common
pattern, there is a utility function
Message::response_target
which is used for this exact purpose.
MOTD :[target]
LUSERS [mask :[target]]
VERSION :[target]
STATS [query :[target]]
LINKS [[remote server] server :mask]
TIME :[target]
CONNECT target server port :[remote server]
TRACE :[target]
ADMIN :[target]
INFO :[target]
SERVLIST [mask :[type]]
SQUERY servicename text
WHO [mask ["o"]]
WHOIS [target] masklist
WHOWAS nicklist [count :[target]]
KILL nickname :comment
PING server1 :[server2]
PONG server :[server2]
ERROR(String)
ERROR :message
AWAY :[message]
REHASH
DIE
RESTART
SUMMON user [target :[channel]]
USERS :[target]
WALLOPS(String)
WALLOPS :Text to be sent
USERHOST space-separated nicklist
ISON space-separated nicklist
SAJOIN nickname channel
SAMODE target modes [modeparams]
SANICK old nickname new nickname
SAPART nickname :comment
SAQUIT nickname :comment
NICKSERV(String)
NICKSERV message
CHANSERV(String)
CHANSERV message
OPERSERV(String)
OPERSERV message
BOTSERV(String)
BOTSERV message
HOSTSERV(String)
HOSTSERV message
MEMOSERV(String)
MEMOSERV message
CAP [] COMMAND [] :[param]
AUTHENTICATE(String)
AUTHENTICATE data
ACCOUNT(String)
ACCOUNT [account name]
METADATA target COMMAND [params] :[param]
MONITOR command [nicklist]
BATCH (+/-)reference-tag [type [params]]
CHGHOST user host
An IRC response code with arguments and optional suffix.
A raw IRC command unknown to the crate.
Methods
impl Command
[src]
pub fn new(
cmd: &str,
args: Vec<&str>,
suffix: Option<&str>
) -> Result<Command, MessageParseError>
[src]
cmd: &str,
args: Vec<&str>,
suffix: Option<&str>
) -> Result<Command, MessageParseError>
Constructs a new Command.
Trait Implementations
impl<'a> From<&'a Command> for String
[src]
impl From<Command> for Message
[src]
impl Clone for Command
[src]
impl PartialEq<Command> for Command
[src]
impl Debug for Command
[src]
impl StructuralPartialEq for Command
[src]
Auto Trait Implementations
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
impl RefUnwindSafe for Command
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,