added second fix of channel handling

This commit is contained in:
Michiel Broek 2005-04-23 15:56:22 +00:00
parent f55ac2f5a7
commit f224e68f37
2 changed files with 6 additions and 1 deletions

View File

@ -858,7 +858,7 @@ char *chat_put(char *data)
if (strlen(chat_users[i].channel)) {
sprintf(buf, "** Internal system error");
for (tmpc = channels; tmpc; tmpc = tmpc->next) {
if (strcmp(chat_users[i].channel, tmpc->name)) {
if (strcmp(chat_users[i].channel, tmpc->name) == 0) {
if ((strcmp(chat_users[i].name, tmpc->owner) == 0) || (strcmp(chat_users[i].nick, tmpc->owner) == 0)) {
cmd = strtok(msg, " \0");
cmd = strtok(NULL, "\0");

View File

@ -1175,6 +1175,7 @@ void command_join(char *hostname, char *parameters)
}
}
broadcast(hostname, "JOIN %s@%s %s\r\n", nick, server, channel);
chnchg = TRUE;
}
@ -1223,6 +1224,8 @@ void command_part(char *hostname, char *parameters)
usrchg = TRUE;
}
}
broadcast(hostname, "PART %s@%s %s\r\n", nick, server, channel);
}
@ -1255,6 +1258,8 @@ void command_topic(char *hostname, char *parameters)
}
break;
}
broadcast(hostname, "TOPIC %s %s\r\n", channel, topic);
}