aboutsummaryrefslogtreecommitdiff
path: root/src/server.rs
diff options
context:
space:
mode:
authorTill Hoeppner2015-04-21 13:42:24 +0200
committerTill Hoeppner2015-04-21 13:42:24 +0200
commitc67d6c211918f8b787b862bb580c41224a8d50c7 (patch)
treed432b1a08106fdbd1edaa0ac5ce397ed642aa101 /src/server.rs
parent1ebf3c02d9c5bd967c1d45e6db343903bbdef777 (diff)
downloadirsc-c67d6c211918f8b787b862bb580c41224a8d50c7.tar.gz
irsc-c67d6c211918f8b787b862bb580c41224a8d50c7.tar.xz
irsc-c67d6c211918f8b787b862bb580c41224a8d50c7.zip
Parse and format PASS, NICK, USER, OPER, PING, PONG, JOIN, PART
Diffstat (limited to 'src/server.rs')
-rw-r--r--src/server.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server.rs b/src/server.rs
index 035ee19..2190c09 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -7,6 +7,7 @@ use std::io::{
};
use std::net::TcpStream;
+use std::borrow::Cow;
use message::Message;
use command::Command;
@@ -63,7 +64,7 @@ impl Server {
fn handle_event(&mut self, msg: &Message) {
if msg.command() == "PING" {
- let _ = self.send(Command::PONG(msg.suffix().unwrap_or(""), None).to_message());
+ let _ = self.send(Command::PONG(Cow::Borrowed(msg.suffix().unwrap_or("")), None).to_message());
}
}