diff --git a/src/client/server/mod.rs b/src/client/server/mod.rs index e2b29e2..a33fb37 100644 --- a/src/client/server/mod.rs +++ b/src/client/server/mod.rs @@ -195,7 +195,7 @@ impl ServerState { } /// Gets the current nickname in use. - pub fn current_nickname(&self) -> &str { + fn current_nickname(&self) -> &str { let alt_nicks = self.config().alternate_nicknames(); let index = self.alt_nick_index.read().unwrap(); match *index { @@ -566,6 +566,11 @@ impl IrcServer { }) } + /// Gets the current nickname in use. + pub fn current_nickname(&self) -> &str { + self.state.current_nickname() + } + /// Gets the log view from the internal transport. Only used for unit testing. #[cfg(test)] fn log_view(&self) -> &LogView {