diff options
| -rw-r--r-- | mumctl/src/main.rs | 2 | ||||
| -rw-r--r-- | mumlib/src/command.rs | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/mumctl/src/main.rs b/mumctl/src/main.rs index 99e0608..84517d5 100644 --- a/mumctl/src/main.rs +++ b/mumctl/src/main.rs @@ -382,7 +382,7 @@ fn match_opt() -> Result<(), Error> { let msg = MumCommand::SendMessage { message, target: if names.is_empty() { - MessageTarget::Channel(vec![(ChannelTarget::Default, recursive)]) + MessageTarget::Channel(vec![(ChannelTarget::Current, recursive)]) } else { MessageTarget::Channel( names diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index 79bbc8b..4f4cf3a 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -67,12 +67,15 @@ pub enum CommandResponse { }, } +/// Messages sent to channels can be sent either to a named channel or the +/// currently connected channel. #[derive(Clone, Debug, Deserialize, Serialize)] pub enum ChannelTarget { - Default, + Current, Named(String) } +/// Messages can be sent to either channels or specific users. #[derive(Clone, Debug, Deserialize, Serialize)] pub enum MessageTarget { Channel(Vec<(ChannelTarget, bool)>), // (target, recursive) |
