summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlara Modin <kasm@kasm.eu>2018-05-17 00:02:05 +0200
committerKlara Modin <kasm@kasm.eu>2018-05-17 00:02:05 +0200
commitfbfa91c516a7f73f7bf092e191d9d2716f1e83da (patch)
treed719aedff39fa6abd52453933a4ef0bea2463d42
parent333bc46168fc93d4e3b3817c2db316f8b0d4f0b9 (diff)
set nick when server is attached
-rw-r--r--src/server_int.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server_int.rs b/src/server_int.rs
index bedf85e..b7bd7d6 100644
--- a/src/server_int.rs
+++ b/src/server_int.rs
@@ -260,7 +260,10 @@ impl Server {
}
pub fn attach(&mut self, ui: Arc<Mutex<UI>>) {
- self.ui = Some(ui);
+ self.ui = Some(ui.clone());
+
+ let mut ui = ui.lock().unwrap();
+ ui.nick(&self.nick);
}
pub fn try_clone(&self) -> io::Result<Server> {