aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/state/server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mumd/src/state/server.rs')
-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)?;