Added response codes for monitor extension.
This commit is contained in:
parent
e9066e3cba
commit
c9b22f08ff
1 changed files with 12 additions and 1 deletions
|
@ -181,6 +181,15 @@ pub enum Response {
|
|||
RPL_ADMINEMAIL = 259,
|
||||
/// 263 <command> :Please wait a while and try again.
|
||||
RPL_TRYAGAIN = 263,
|
||||
/// 730 <nick> :target[,target2]*
|
||||
RPL_MONONLINE = 730,
|
||||
/// 731 <nick> :target[,target2]*
|
||||
RPL_MONOFFLINE = 731,
|
||||
/// 732 <nick> :target[,target2]*
|
||||
RPL_MONLIST = 732,
|
||||
/// 733 <nick> :End of MONITOR list
|
||||
RPL_ENDOFMONLIST = 733,
|
||||
|
||||
|
||||
// Error replies
|
||||
/// 401 <nickname> :No such nick/channel
|
||||
|
@ -289,6 +298,8 @@ pub enum Response {
|
|||
ERR_UMODEUNKNOWNFLAG = 501,
|
||||
/// 502 :Cannot change mode for other users
|
||||
ERR_USERSDONTMATCH = 502,
|
||||
/// 734 <nick> <limit> <targets> :Monitor list is full.
|
||||
ERR_MONLISTFULL = 734,
|
||||
}
|
||||
|
||||
impl Response {
|
||||
|
@ -318,7 +329,7 @@ impl FromStr for Response {
|
|||
(rc > 420 && rc < 425) || (rc > 430 && rc < 434) || rc == 436 || rc == 437 ||
|
||||
(rc > 440 && rc < 447) || rc == 451 || (rc > 460 && rc < 468) ||
|
||||
(rc > 470 && rc < 479) || (rc > 480 && rc < 486) || rc == 491 || rc == 501 ||
|
||||
rc == 502 {
|
||||
rc == 502 || (rc > 729 && rc < 735) {
|
||||
Ok(unsafe { transmute(rc) })
|
||||
} else {
|
||||
Err("Failed to parse due to unknown response code.")
|
||||
|
|
Loading…
Add table
Reference in a new issue