aboutsummaryrefslogtreecommitdiff
path: root/src/irc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc.c')
-rw-r--r--src/irc.c24
1 files changed, 20 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);
}
}