Messages now properly end with new-lines.
This commit is contained in:
parent
16f29f179a
commit
cd52c5b6a4
2 changed files with 2 additions and 2 deletions
|
@ -48,6 +48,7 @@ impl Message {
|
|||
ret.push_str(" :");
|
||||
ret.push_str(suffix[]);
|
||||
}
|
||||
ret.push_str("\r\n");
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,8 +72,7 @@ impl<'a, T, U> IrcServer<'a, T, U> where T: IrcWriter, U: IrcReader {
|
|||
|
||||
fn handle_message(&self, message: &Message) {
|
||||
if message.command[] == "PING" {
|
||||
self.send(PONG(message.args[0][], None)).unwrap();
|
||||
println!("PING! PONG!");
|
||||
self.send(PONG(message.suffix.as_ref().unwrap()[], None)).unwrap();
|
||||
}
|
||||
/* TODO: implement more message handling */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue