[−][src]Enum irc_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 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.
Implementations
impl Command
[src]
pub fn new(cmd: &str, args: Vec<&str>) -> Result<Command, MessageParseError>
[src]
Constructs a new Command.
Trait Implementations
impl Clone for Command
[src]
impl Debug for Command
[src]
impl From<Command> for Message
[src]
impl PartialEq<Command> for Command
[src]
impl StructuralPartialEq for Command
[src]
Auto Trait Implementations
impl RefUnwindSafe for Command
[src]
impl Send for Command
[src]
impl Sync for Command
[src]
impl Unpin for Command
[src]
impl UnwindSafe for Command
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
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.
pub fn to_owned(&self) -> T
[src]
pub 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 = Infallible
The type returned in the event of a conversion error.
pub 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>,