summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlara Modin <klarasmodin@gmail.com>2022-06-21 23:07:00 +0200
committerKlara Modin <klarasmodin@gmail.com>2022-06-21 23:07:00 +0200
commit98c262b6515c16be0aec54c6c16f70d0c052a822 (patch)
tree1740bf93b1468e5614abef465f154ff9cc7d25ab
parent51646b21f5f590bd55cc02955eac85c9033412d1 (diff)
display target channel or nick
-rw-r--r--src/ui.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui.rs b/src/ui.rs
index 26e7dcd..7aa693a 100644
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -103,7 +103,7 @@ impl UI {
let (max_y, max_x) = UI::getmaxyx_tup();
mv(max_y-1, 0);
deleteln();
- printw(&self.nick);
+ printw(&format!("{}:{}", self.chan, self.nick));
getyx(stdscr(), &mut self.input_y, &mut self.input_x);
{
let mut chars = self.buffer.chars();
@@ -192,8 +192,8 @@ impl UI {
let prefix = message.prefix.clone().unwrap_or(String::new());
let mut iter = prefix.split("!");
let nick = iter.next().unwrap_or("");
- if let Some(content) = message.params.get(1) {
- self.put_str(&format!("<{}> {}\n", nick, content));
+ if let (Some(target), Some(content)) = (message.params.get(0), message.params.get(1)) {
+ self.put_str(&format!("{}:<{}> {}\n", target, nick, content));
}
},
_ => {