aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs2
-rw-r--r--src/server.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib.rs b/src/lib.rs
index bf85c49..dd1434e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -6,7 +6,7 @@ extern crate regex;
extern crate log;
extern crate eventual;
-// pub mod server;
+pub mod server;
pub mod color;
pub mod ident;
pub mod callback;
diff --git a/src/server.rs b/src/server.rs
index e5548ef..035ee19 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -62,8 +62,8 @@ impl Server {
}
fn handle_event(&mut self, msg: &Message) {
- if *msg.command == "PING" {
- let _ = self.send(Command::PONG(msg.suffix, None).to_message());
+ if msg.command() == "PING" {
+ let _ = self.send(Command::PONG(msg.suffix().unwrap_or(""), None).to_message());
}
}