From 71941137265669013ef64473748c4fde6bc48f1c Mon Sep 17 00:00:00 2001 From: Eskil Queseth Date: Tue, 3 Nov 2020 21:08:46 +0100 Subject: add mumd support for muting users --- mumlib/src/command.rs | 3 +++ mumlib/src/error.rs | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'mumlib') diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index e404056..63dd5f9 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -18,6 +18,9 @@ pub enum Command { }, ServerDisconnect, Status, + DeafenSelf, + MuteSelf, + MuteOther(String), } #[derive(Debug, Deserialize, Serialize)] diff --git a/mumlib/src/error.rs b/mumlib/src/error.rs index c6d9255..e8b0323 100644 --- a/mumlib/src/error.rs +++ b/mumlib/src/error.rs @@ -9,6 +9,7 @@ pub enum Error { DisconnectedError, AlreadyConnectedError, ChannelIdentifierError(String, ChannelIdentifierError), + InvalidUserIdentifierError(String), InvalidServerAddrError(String, u16), } @@ -18,9 +19,8 @@ impl Display for Error { Error::DisconnectedError => write!(f, "Not connected to a server"), Error::AlreadyConnectedError => write!(f, "Already connected to a server"), Error::ChannelIdentifierError(id, kind) => write!(f, "{}: {}", kind, id), - Error::InvalidServerAddrError(addr, port) => { - write!(f, "Invalid server address: {}: {}", addr, port) - } + Error::InvalidServerAddrError(addr, port) => write!(f, "Invalid server address: {}: {}", addr, port), + Error::InvalidUserIdentifierError(name) => write!(f, "Invalid username: {}", name), } } } -- cgit v1.2.1