Updated docs.
This commit is contained in:
parent
e1ab26a4bd
commit
5f8b09cf57
2 changed files with 4 additions and 5 deletions
|
@ -14,9 +14,8 @@ fn main() {
|
||||||
let server = IrcServer::from_config(config).unwrap();
|
let server = IrcServer::from_config(config).unwrap();
|
||||||
server.identify().unwrap();
|
server.identify().unwrap();
|
||||||
for command in server.iter_cmd() {
|
for command in server.iter_cmd() {
|
||||||
// Use of unwrap() on the results of iter_cmd() is currently discouraged on servers where
|
// Use of unwrap() on the results of iter_cmd() is discouraged since response codes will be
|
||||||
// the v3 capabilities extension is enabled, and the current lapse in specification
|
// received as parsing errors when using this type of iterator.
|
||||||
// compliance on that specific command will then cause the program to panic.
|
|
||||||
if let Ok(Command::PRIVMSG(chan, msg)) = command { // Ignore errors.
|
if let Ok(Command::PRIVMSG(chan, msg)) = command { // Ignore errors.
|
||||||
if msg.contains("pickles") {
|
if msg.contains("pickles") {
|
||||||
server.send_privmsg(&chan, "Hi!").unwrap();
|
server.send_privmsg(&chan, "Hi!").unwrap();
|
||||||
|
|
|
@ -202,8 +202,8 @@ pub enum Command {
|
||||||
MEMOSERV(String),
|
MEMOSERV(String),
|
||||||
|
|
||||||
// Capabilities extension to IRCv3
|
// Capabilities extension to IRCv3
|
||||||
/// CAP COMMAND :[param]
|
/// CAP [*] COMMAND [*] :[param]
|
||||||
#[unstable = "This command is not entirely specification compliant."]
|
#[unstable = "Feature recently changed to hopefully be specification-compliant."]
|
||||||
CAP(Option<String>, CapSubCommand, Option<String>, Option<String>),
|
CAP(Option<String>, CapSubCommand, Option<String>, Option<String>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue