aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/irc.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/irc.c b/src/irc.c
index f0f386f..5dd3916 100644
--- a/src/irc.c
+++ b/src/irc.c
@@ -495,11 +495,13 @@ static void do_numeric(void) {
}
}
+#if 0
static void invalid_msg(char type) {
scr_print(SCR_SERVER, "??? unknown, type ");
scr_putc(SCR_SERVER, type);
scr_putc(SCR_SERVER, '\n');
}
+#endif
void select_screen(void) {
char s;
@@ -585,24 +587,21 @@ static void parse_msg(void) {
memset(msg_args, 0, sizeof(msg_args));
/* first token is either the source (with a :) or a command (without) */
- p = nextarg(msgbuf);
- if(!p) {
- invalid_msg('1');
- return;
- }
-
if(*msgbuf == ':') {
msg_src = msgbuf + 1; /* generally :irc.example.com or :nick!user@host */
- msg_cmd = p;
+ msg_cmd = nextarg(msgbuf);
} else {
msg_src = 0; /* no source supplied */
msg_cmd = msgbuf;
}
+ p = nextarg(msg_cmd);
+ #if 0
if(!msg_cmd) {
invalid_msg('2');
return;
}
+ #endif
/* special case for ping, treat as 1 arg, even if it has space and no : */
if(streq_i(msg_cmd, "PING")) {
@@ -611,7 +610,6 @@ static void parse_msg(void) {
return;
}
- p = nextarg(msg_cmd);
for(msg_argcount = 0; msg_argcount < MAX_MSG_ARGS; msg_argcount++) {
if(!p) break;