pub enum Command {
Show 66 variants
PASS(String),
NICK(String),
USER(String, String, String),
OPER(String, String),
UserMODE(String, Vec<Mode<UserMode>>),
SERVICE(String, String, String, String, String, String),
QUIT(Option<String>),
SQUIT(String, String),
JOIN(String, Option<String>, Option<String>),
PART(String, Option<String>),
ChannelMODE(String, Vec<Mode<ChannelMode>>),
TOPIC(String, Option<String>),
NAMES(Option<String>, Option<String>),
LIST(Option<String>, Option<String>),
INVITE(String, String),
KICK(String, String, Option<String>),
PRIVMSG(String, String),
NOTICE(String, String),
MOTD(Option<String>),
LUSERS(Option<String>, Option<String>),
VERSION(Option<String>),
STATS(Option<String>, Option<String>),
LINKS(Option<String>, Option<String>),
TIME(Option<String>),
CONNECT(String, String, Option<String>),
TRACE(Option<String>),
ADMIN(Option<String>),
INFO(Option<String>),
SERVLIST(Option<String>, Option<String>),
SQUERY(String, String),
WHO(Option<String>, Option<bool>),
WHOIS(Option<String>, String),
WHOWAS(String, Option<String>, Option<String>),
KILL(String, String),
PING(String, Option<String>),
PONG(String, Option<String>),
ERROR(String),
AWAY(Option<String>),
REHASH,
DIE,
RESTART,
SUMMON(String, Option<String>, Option<String>),
USERS(Option<String>),
WALLOPS(String),
USERHOST(Vec<String>),
ISON(Vec<String>),
SAJOIN(String, String),
SAMODE(String, String, Option<String>),
SANICK(String, String),
SAPART(String, String),
SAQUIT(String, String),
NICKSERV(Vec<String>),
CHANSERV(String),
OPERSERV(String),
BOTSERV(String),
HOSTSERV(String),
MEMOSERV(String),
CAP(Option<String>, CapSubCommand, Option<String>, Option<String>),
AUTHENTICATE(String),
ACCOUNT(String),
METADATA(String, Option<MetadataSubCommand>, Option<Vec<String>>),
MONITOR(String, Option<String>),
BATCH(String, Option<BatchSubCommand>, Option<Vec<String>>),
CHGHOST(String, String),
Response(Response, Vec<String>),
Raw(String, Vec<String>),
}
Expand description
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(String, String, String)
USER user mode * :realname
OPER(String, String)
OPER name :password
UserMODE(String, Vec<Mode<UserMode>>)
MODE nickname modes
SERVICE(String, String, String, String, String, String)
SERVICE nickname reserved distribution type reserved :info
QUIT(Option<String>)
QUIT :comment
SQUIT(String, String)
SQUIT server :comment
JOIN(String, Option<String>, Option<String>)
JOIN chanlist [chankeys] :[Real name]
PART(String, Option<String>)
PART chanlist :[comment]
ChannelMODE(String, Vec<Mode<ChannelMode>>)
MODE channel [modes [modeparams]]
TOPIC(String, Option<String>)
TOPIC channel :[topic]
NAMES(Option<String>, Option<String>)
NAMES [chanlist :[target]]
LIST(Option<String>, Option<String>)
LIST [chanlist :[target]]
INVITE(String, String)
INVITE nickname channel
KICK(String, String, Option<String>)
KICK chanlist userlist :[comment]
PRIVMSG(String, String)
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(String, String)
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(Option<String>)
MOTD :[target]
LUSERS(Option<String>, Option<String>)
LUSERS [mask :[target]]
VERSION(Option<String>)
VERSION :[target]
STATS(Option<String>, Option<String>)
STATS [query :[target]]
LINKS(Option<String>, Option<String>)
LINKS [[remote server] server :mask]
TIME(Option<String>)
TIME :[target]
CONNECT(String, String, Option<String>)
CONNECT target server port :[remote server]
TRACE(Option<String>)
TRACE :[target]
ADMIN(Option<String>)
ADMIN :[target]
INFO(Option<String>)
INFO :[target]
SERVLIST(Option<String>, Option<String>)
SERVLIST [mask :[type]]
SQUERY(String, String)
SQUERY servicename text
WHO(Option<String>, Option<bool>)
WHO [mask [“o”]]
WHOIS(Option<String>, String)
WHOIS [target] masklist
WHOWAS(String, Option<String>, Option<String>)
WHOWAS nicklist [count :[target]]
KILL(String, String)
KILL nickname :comment
PING(String, Option<String>)
PING server1 :[server2]
PONG(String, Option<String>)
PONG server :[server2]
ERROR(String)
ERROR :message
AWAY(Option<String>)
AWAY :[message]
REHASH
REHASH
DIE
DIE
RESTART
RESTART
SUMMON(String, Option<String>, Option<String>)
SUMMON user [target :[channel]]
USERS(Option<String>)
USERS :[target]
WALLOPS(String)
WALLOPS :Text to be sent
USERHOST(Vec<String>)
USERHOST space-separated nicklist
ISON(Vec<String>)
ISON space-separated nicklist
SAJOIN(String, String)
SAJOIN nickname channel
SAMODE(String, String, Option<String>)
SAMODE target modes [modeparams]
SANICK(String, String)
SANICK old nickname new nickname
SAPART(String, String)
SAPART nickname :comment
SAQUIT(String, String)
SAQUIT nickname :comment
NICKSERV(Vec<String>)
NICKSERV message
CHANSERV(String)
CHANSERV message
OPERSERV(String)
OPERSERV message
BOTSERV(String)
BOTSERV message
HOSTSERV(String)
HOSTSERV message
MEMOSERV(String)
MEMOSERV message
CAP(Option<String>, CapSubCommand, Option<String>, Option<String>)
CAP [] COMMAND [] :[param]
AUTHENTICATE(String)
AUTHENTICATE data
ACCOUNT(String)
ACCOUNT [account name]
METADATA(String, Option<MetadataSubCommand>, Option<Vec<String>>)
METADATA target COMMAND [params] :[param]
MONITOR(String, Option<String>)
MONITOR command [nicklist]
BATCH(String, Option<BatchSubCommand>, Option<Vec<String>>)
BATCH (+/-)reference-tag [type [params]]
CHGHOST(String, String)
CHGHOST user host
Response(Response, Vec<String>)
An IRC response code with arguments and optional suffix.
Raw(String, Vec<String>)
A raw IRC command unknown to the crate.