diff options
Diffstat (limited to 'mumctl/src')
| -rw-r--r-- | mumctl/src/main.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mumctl/src/main.rs b/mumctl/src/main.rs index 8b0eeb2..f704b19 100644 --- a/mumctl/src/main.rs +++ b/mumctl/src/main.rs @@ -87,6 +87,11 @@ enum Command { }, /// Send a message to a channel or a user Message(Target), + /// Get events that have happened since we connected + Events { + #[structopt(short = "f", long = "follow")] + follow: bool, + }, } #[derive(Debug, StructOpt)] @@ -399,6 +404,17 @@ fn match_opt() -> Result<(), Error> { send_command(msg)??; } }, + Command::Events { follow } => { + for response in send_command_multi(MumCommand::Events { block: follow })? { + match response { + Ok(Some(CommandResponse::Event { event })) => { + println!("{}", event) + } + Ok(_) => unreachable!("Response should only be a Some(Event)"), + Err(e) => error!("{}", e), + } + } + } } let config_path = config::default_cfg_path(); |
