Added support for server-time capability.

This commit is contained in:
Aaron Weiss 2015-06-05 20:56:46 -04:00
parent 489c6c1a2d
commit 279a690de6

View file

@ -24,6 +24,8 @@ pub enum Capability {
EchoMessage, EchoMessage,
/// [invite-notify](http://ircv3.net/specs/extensions/invite-notify-3.2.html) /// [invite-notify](http://ircv3.net/specs/extensions/invite-notify-3.2.html)
InviteNotify, InviteNotify,
/// [server-time](http://ircv3.net/specs/extensions/server-time-3.2.html)
ServerTime,
} }
/// List of IRCv3 capability negotiation versions. /// List of IRCv3 capability negotiation versions.
@ -47,6 +49,7 @@ impl AsRef<str> for Capability {
Capability::ChgHost => "chghost", Capability::ChgHost => "chghost",
Capability::EchoMessage => "echo-message", Capability::EchoMessage => "echo-message",
Capability::InviteNotify => "invite-notify", Capability::InviteNotify => "invite-notify",
Capability::ServerTime => "server-time",
} }
} }
} }
@ -67,5 +70,6 @@ mod test {
assert_eq!(ChgHost.as_ref(), "chghost"); assert_eq!(ChgHost.as_ref(), "chghost");
assert_eq!(EchoMessage.as_ref(), "echo-message"); assert_eq!(EchoMessage.as_ref(), "echo-message");
assert_eq!(InviteNotify.as_ref(), "invite-notify"); assert_eq!(InviteNotify.as_ref(), "invite-notify");
assert_eq!(ServerTime.as_ref(), "server-time");
} }
} }