Readded current_nickname to IrcServer interface (fixes #91).
This commit is contained in:
parent
c841e2cca9
commit
7712a5536b
1 changed files with 6 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue