create a dedicated Message struct and implement reply(&str) on there, since it seems to be a commonly used thing. Begin implementing helpers for command parsing.

This commit is contained in:
Adrian Malacoda
2017-02-19 05:37:56 -06:00
parent b9d5b7916c
commit 0f945ec604
9 changed files with 96 additions and 92 deletions

View File

@@ -1,7 +1,7 @@
use {Channel, User};
use {Message, Channel, User};
pub enum Event {
Message { sender: User, channel: Option<Channel>, content: String },
Message { message: Message },
Join { channel: Channel },
Quit { channel: Channel }
}