typedef int cmd_client_t(struct Client *client, char *argv[], int argc);
typedef int cmd_auth_t(struct Auth *auth, char *argv[], int argc);
typedef int cmd_client_t(struct Client *client, char *argv[], int argc);
typedef int cmd_auth_t(struct Auth *auth, char *argv[], int argc);
{{"PING", "P"}, /* Ping Command */
{NULL, 0, 1, 0}, /* Client */
{NULL, 0, 1, 0}, /* Unauthed */
{{"PING", "P"}, /* Ping Command */
{NULL, 0, 1, 0}, /* Client */
{NULL, 0, 1, 0}, /* Unauthed */
{NULL, 0, 1, 0} /* Server */
},
{{"NICK", "N"}, /* Nick Command */
{NULL, 0, 1, 0} /* Server */
},
{{"NICK", "N"}, /* Nick Command */
- {cmd_nick_cli, 0, 1, 0}, /* Client */
- {cmd_nick_auth, 0, 1, 0}, /* Unauthed */
+ {cmd_nick_cli, 1, 1, 0}, /* Client */
+ {cmd_nick_auth, 1, 1, 0}, /* Unauthed */
{NULL, 0, 1, 0} /* Server */
},
{{"USER", "U"}, /* User Command */
{NULL, 0, 1, 0} /* Server */
},
{{"USER", "U"}, /* User Command */
srvmsg->destinations = malloc(sizeof(struct ServerMsgDstMap));
srvmsg->destinations->dstcount = 1;
srvmsg->destinations->dst[0].destination.srvnum = ((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]);
srvmsg->destinations = malloc(sizeof(struct ServerMsgDstMap));
srvmsg->destinations->dstcount = 1;
srvmsg->destinations->dst[0].destination.srvnum = ((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]);
srvmsg->destinations->dstcount = srvcount;
for(i = 0; i < srvcount; i++) {
srvmsg->destinations->dst[i].destination.srvnum = ((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]);
srvmsg->destinations->dstcount = srvcount;
for(i = 0; i < srvcount; i++) {
srvmsg->destinations->dst[i].destination.srvnum = ((buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]);
memmove(buffer->buffer, buffer->buffer + srvmsg->msglen, srvmsg->msglen - buffer->bufpos);
buffer->bufpos -= srvmsg->msglen;
} else
memmove(buffer->buffer, buffer->buffer + srvmsg->msglen, srvmsg->msglen - buffer->bufpos);
buffer->bufpos -= srvmsg->msglen;
} else