diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-06-07 17:58:06 +0200 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-06-07 17:58:06 +0200 |
| commit | c6d63f0b5c231bfc42128a670923a660fabd1835 (patch) | |
| tree | 44af7c6c6937eda97a3f8bafb575b9d763d36aa3 /mumlib/src | |
| parent | be76c2aa51733a0cf495e92659fbcbe527f41149 (diff) | |
| download | mum-c6d63f0b5c231bfc42128a670923a660fabd1835.tar.gz | |
default send message to current channel if no channel specified
Diffstat (limited to 'mumlib/src')
| -rw-r--r-- | mumlib/src/command.rs | 1 | ||||
| -rw-r--r-- | mumlib/src/error.rs | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/mumlib/src/command.rs b/mumlib/src/command.rs index 351d7f6..f8a8fc8 100644 --- a/mumlib/src/command.rs +++ b/mumlib/src/command.rs @@ -69,6 +69,7 @@ pub enum CommandResponse { #[derive(Clone, Debug, Deserialize, Serialize)] pub enum MessageTarget { + CurrentChannel {recursive: bool }, Channel { recursive: bool, name: String }, User { name: String }, } diff --git a/mumlib/src/error.rs b/mumlib/src/error.rs index e88bd97..83f97b8 100644 --- a/mumlib/src/error.rs +++ b/mumlib/src/error.rs @@ -11,6 +11,7 @@ pub enum Error { InvalidServerAddr(String, u16), InvalidUsername(String), InvalidServerPassword, + NotConnectedToChannel, } impl std::error::Error for Error {} @@ -26,6 +27,7 @@ impl fmt::Display for Error { } Error::InvalidUsername(username) => write!(f, "Invalid username: {}", username), Error::InvalidServerPassword => write!(f, "Invalid server password"), + Error::NotConnectedToChannel => write!(f, "Not connected to a channel"), } } } |
