aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/irc.c24
-rw-r--r--src/screen.c1
2 files changed, 21 insertions, 4 deletions
diff --git a/src/irc.c b/src/irc.c
index 0c1e4cd..6a66f24 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -400,15 +400,29 @@ static void parse_msg(void) {
p = strtok(0, " ");
if(p) {
msg_args[msg_argcount] = p;
+ /* if any arg is a channel name, use it for the dest */
+ if(*p == '#')
+ msg_dest = p;
} else {
break;
}
}
}
- if(msg_argcount)
- msg_dest = msg_args[0];
- else if(msg_text)
- msg_dest = msg_text;
+
+ /*
+ if(msg_dest) {
+ scr_print_current("got here, msg_dest is: ");
+ scr_print_current(msg_dest);
+ scr_print_current("\n");
+ }
+ */
+
+ if(!msg_dest) {
+ if(msg_argcount)
+ msg_dest = msg_args[0];
+ else if(msg_text)
+ msg_dest = msg_text;
+ }
if(msg_src) {
if((p = strstr(msg_src, "!"))) {
@@ -526,6 +540,8 @@ static void start_keystroke(void) {
scr_display(s);
} else if(i == CH_CURS_UP || i == '-') {
scrollback();
+ } else if(i == 0x1b) { /* escape */
+ scr_destroy(scr_current);
}
}
diff --git a/src/screen.c b/src/screen.c
index e7f83b4..f442e66 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -91,6 +91,7 @@ void scr_destroy(char s) {
scr_names[s][0] = 0;
if(scr_current == s)
scr_display(0);
+ scr_clear(s);
}
void scr_set_topic(char s, const char *topic) {