query and join are now the same
This commit is contained in:
parent
f9f5866e5a
commit
ec0b060d27
18
ii.c
18
ii.c
@ -248,8 +248,17 @@ static void proc_channels_input(Channel *c, char *buf)
|
|||||||
p = strchr(&buf[3], ' ');
|
p = strchr(&buf[3], ' ');
|
||||||
if(p)
|
if(p)
|
||||||
*p = 0;
|
*p = 0;
|
||||||
|
if(buf[3]=='#'){
|
||||||
snprintf(message, PIPE_BUF, "JOIN %s\r\n", &buf[3]);
|
snprintf(message, PIPE_BUF, "JOIN %s\r\n", &buf[3]);
|
||||||
add_channel(&buf[3]);
|
add_channel(&buf[3]);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(p){
|
||||||
|
add_channel(&buf[3]);
|
||||||
|
proc_channels_privmsg(&buf[3], p + 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
snprintf(message, PIPE_BUF, "TOPIC %s :%s\r\n", c->name, &buf[3]);
|
snprintf(message, PIPE_BUF, "TOPIC %s :%s\r\n", c->name, &buf[3]);
|
||||||
@ -262,15 +271,6 @@ static void proc_channels_input(Channel *c, char *buf)
|
|||||||
else
|
else
|
||||||
snprintf(message, PIPE_BUF, "AWAY :%s\r\n", &buf[3]);
|
snprintf(message, PIPE_BUF, "AWAY :%s\r\n", &buf[3]);
|
||||||
break;
|
break;
|
||||||
case 'm':
|
|
||||||
p = strchr(&buf[3], ' ');
|
|
||||||
if(p) {
|
|
||||||
*p = 0;
|
|
||||||
add_channel(&buf[3]);
|
|
||||||
proc_channels_privmsg(&buf[3], p + 1);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
break;
|
|
||||||
case 'n':
|
case 'n':
|
||||||
snprintf(nick, sizeof(nick),"%s", &buf[3]);
|
snprintf(nick, sizeof(nick),"%s", &buf[3]);
|
||||||
snprintf(message, PIPE_BUF, "NICK %s\r\n", &buf[3]);
|
snprintf(message, PIPE_BUF, "NICK %s\r\n", &buf[3]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user