aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/state
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-06-11 03:24:57 +0200
committerGustav Sörnäs <gustav@sornas.net>2021-06-11 03:24:57 +0200
commitebb9e206701ff3c538f34c58d8e7a4d6f9f314c1 (patch)
treec2b7fb28612f6853dcc76958cae6bd615cbb6e6d /mumd/src/state
parentb5805f7e72afcc53287b0e5ff52f131f99849784 (diff)
downloadmum-ebb9e206701ff3c538f34c58d8e7a4d6f9f314c1.tar.gz
doc func
Diffstat (limited to 'mumd/src/state')
-rw-r--r--mumd/src/state/server.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/mumd/src/state/server.rs b/mumd/src/state/server.rs
index 58c614c..4abde49 100644
--- a/mumd/src/state/server.rs
+++ b/mumd/src/state/server.rs
@@ -132,6 +132,9 @@ impl Server {
})
}
+ /// Returns the currenctly connected channel.
+ ///
+ /// Returns None if not connected.
pub fn current_channel(&self) -> Option<(u32, &Channel)> {
let channel_id = self.users().get(&self.session_id()?)?.channel();
let channel = self.channels().get(&channel_id)?;