diff options
| -rw-r--r-- | config/config.c | 3 | ||||
| -rw-r--r-- | src/irc.c | 14 |
2 files changed, 7 insertions, 10 deletions
diff --git a/config/config.c b/config/config.c index f29159d..e08de9f 100644 --- a/config/config.c +++ b/config/config.c @@ -586,6 +586,7 @@ void main(void) { prompt("Nick", conf->nick, 25); prompt_server(); + make_url(); do { bad = 0; @@ -606,8 +607,6 @@ void main(void) { prompt_channels(); prompt_extra_channels(); - make_url(); - print("\nURL: "); print(conf->url); putchar('\n'); @@ -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; |
