diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-06-11 03:24:57 +0200 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-06-11 03:24:57 +0200 |
| commit | ebb9e206701ff3c538f34c58d8e7a4d6f9f314c1 (patch) | |
| tree | c2b7fb28612f6853dcc76958cae6bd615cbb6e6d /mumd/src/state | |
| parent | b5805f7e72afcc53287b0e5ff52f131f99849784 (diff) | |
| download | mum-ebb9e206701ff3c538f34c58d8e7a4d6f9f314c1.tar.gz | |
doc func
Diffstat (limited to 'mumd/src/state')
| -rw-r--r-- | mumd/src/state/server.rs | 3 |
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)?; |
