aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/irc.c b/src/irc.c
index b12c8da..2ed6d43 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -800,22 +800,23 @@ static void hunt_screen(signed char dir) {
scr_display(s);
}
-static char *get_cur_chan(void) {
- if(scr_current == SCR_SERVER && last_chan[0])
- return last_chan;
- else if ((scr_current > 1) && (scr_names[scr_current][0] == '#'))
+static char *get_cur(void) {
+ if((scr_current > 1) && (scr_names[scr_current][0] == '#'))
return scr_names[scr_current];
else
return 0;
}
+static char *get_cur_chan(void) {
+ if(scr_current == SCR_SERVER && last_chan[0])
+ return last_chan;
+ else return get_cur();
+}
+
static char *get_cur_nick(void) {
if(scr_current == SCR_PRIV && last_pm_nick[0])
return last_pm_nick;
- else if (scr_current > 1 && scr_names[scr_current][0] != '#')
- return scr_names[scr_current];
- else
- return 0;
+ else return get_cur();
}
static void send2_with_space(char *s1, char *s2) {