Prevent export #sysop channel to other servers

This commit is contained in:
Michiel Broek 2005-05-01 09:46:39 +00:00
parent 24f43175fa
commit 8cd9daa68d
2 changed files with 13 additions and 2 deletions

View File

@ -351,7 +351,8 @@ int join(pid_t pid, char *channel, int sysop)
sprintf(buf, "* Created channel %s", channel);
chat_msg(channel, NULL, buf);
chat_dump();
send_all("JOIN %s@%s %s\r\n", chat_users[j].nick, CFG.myfqdn, channel);
if (strcasecmp(channel, "#sysop"))
send_all("JOIN %s@%s %s\r\n", chat_users[j].nick, CFG.myfqdn, channel);
for (tmpu = users; tmpu; tmpu = tmpu->next) {
if ((strcmp(tmpu->server, CFG.myfqdn) == 0) &&
@ -441,7 +442,7 @@ int part(pid_t pid, char *reason)
chat_msg(chat_users[i].channel, chat_users[i].nick, reason);
sprintf(buf, "%s has left channel %s, %d users left", chat_users[i].nick, tmp->name, tmp->users);
chat_msg(chat_users[i].channel, NULL, buf);
if (strcmp(tmp->name, (char *)"#sysop")) {
if (strcasecmp(tmp->name, (char *)"#sysop")) {
if (reason && strlen(reason))
send_all("PART %s@%s %s %s\r\n", chat_users[i].nick, CFG.myfqdn, tmp->name, reason);
else

View File

@ -1143,6 +1143,11 @@ int command_join(char *hostname, char *parameters)
return 432;
}
if (strcasecmp(channel, "#sysop") == 0) {
Syslog('+', "IBC: ignored JOIN for #sysop channel");
return 0;
}
found = FALSE;
for (tmp = channels; tmp; tmp = tmp->next) {
if (strcmp(tmp->name, channel) == 0) {
@ -1199,6 +1204,11 @@ int command_part(char *hostname, char *parameters)
return 461;
}
if (strcasecmp(channel, "#sysop") == 0) {
Syslog('+', "IBC: ignored PART from #sysop channel");
return 0;
}
for (tmp = channels; tmp; tmp = tmp->next) {
if (strcmp(tmp->name, channel) == 0) {
chnchg = TRUE;