diff options
author | Till Hoeppner | 2015-04-21 10:55:42 +0200 |
---|---|---|
committer | Till Hoeppner | 2015-04-21 10:55:42 +0200 |
commit | 1ebf3c02d9c5bd967c1d45e6db343903bbdef777 (patch) | |
tree | 673ea680e97150b49cd520a7a30d88ffd3713377 /src | |
parent | 6ea95526bc3bc4e9589fa8378f73bc6eaee5a483 (diff) | |
download | irsc-1ebf3c02d9c5bd967c1d45e6db343903bbdef777.tar.gz irsc-1ebf3c02d9c5bd967c1d45e6db343903bbdef777.tar.xz irsc-1ebf3c02d9c5bd967c1d45e6db343903bbdef777.zip |
Remove to_name, etc.
Diffstat (limited to 'src')
-rw-r--r-- | src/command.rs | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/src/command.rs b/src/command.rs index 707196b..8aab8b5 100644 --- a/src/command.rs +++ b/src/command.rs @@ -1574,59 +1574,6 @@ pub enum Command<'a> { } impl<'a> Command<'a> { - pub fn to_name(&self) -> &'static str { - use self::Command::*; - match self { - &PASS => "PASS", - &NICK => "NICK", - &USER => "USER", - &OPER => "OPER", - &MODE => "MODE", - &SERVICE => "SERVICE", - &QUIT => "QUIT", - &SQUIT => "SQUIT", - &JOIN => "JOIN", - &PART => "PART", - &TOPIC => "TOPIC", - &NAMES => "NAMES", - &LIST => "LIST", - &INVITE => "INVITE", - &KICK => "KICK", - &PRIVMSG => "PRIVMSG", - &NOTICE => "NOTICE", - &MOTD => "MOTD", - &LUSERS => "LUSERS", - &VERSION => "VERSION", - &STATS => "STATS", - &LINKS => "LINKS", - &TIME => "TIME", - &CONNECT => "CONNECT", - &TRACE => "TRACE", - &ADMIN => "ADMIN", - &INFO => "INFO", - &SERVLIST => "SERVLIST", - &SQUERY => "SQUERY", - &WHO => "WHO", - &WHOIS => "WHOIS", - &WHOWAS => "WHOWAS", - &KILL => "KILL", - &PING(_, _) => "PING", - &PONG(_, _) => "PONG", - &ERROR(_) => "ERROR", - &AWAY(_) => "AWAY", - &REHASH => "REHASH", - &DIE => "DIE", - &RESTART => "RESTART", - &SUMMON(_, _) => "SUMMON", - &USERS(_) => "USERS", - &WALLOPS(_) => "WALLOPS", - &USERHOST(_) => "USERHOST", - &ISON => "ISON", - } - } -} - -impl<'a> Command<'a> { pub fn from_message(msg: &'a Message) -> Option<Command<'a>> { match msg.command() { "NOTICE" => msg.content().get(0).and_then(|c| msg.content().get(1).map(|t| |