From cabbd084f89908e91b81300a776cbeb5034396b8 Mon Sep 17 00:00:00 2001 From: Till Hoeppner Date: Mon, 20 Apr 2015 20:54:13 +0200 Subject: Something inbetween working and broken --- src/server.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/server.rs') diff --git a/src/server.rs b/src/server.rs index a8c2819..e5548ef 100644 --- a/src/server.rs +++ b/src/server.rs @@ -8,11 +8,10 @@ use std::io::{ use std::net::TcpStream; -use message; -use message::{ Command, Message }; +use message::Message; +use command::Command; use ::{ DEBUG, Result, IrscError }; - #[cfg(feature = "ssl")] use openssl::ssl::{ SslContext, SslMethod, SslStream }; @@ -62,9 +61,9 @@ impl Server { } } - fn handle_event(&mut self, msg: &message::Message) { + fn handle_event(&mut self, msg: &Message) { if *msg.command == "PING" { - let _ = self.send(Command::Pong { server1: msg.suffix.clone(), server2: None }.to_message()); + let _ = self.send(Command::PONG(msg.suffix, None).to_message()); } } @@ -109,7 +108,7 @@ impl Server { .map_err(IrscError::Io)) } - pub fn send(&mut self, msg: message::Message) -> Result<()> { + pub fn send(&mut self, msg: Message) -> Result<()> { self.sendraw(&msg.to_string()) } -- cgit v1.2.3