1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

multiprotocol fixes

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@749 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-10-14 02:41:46 +00:00 committed by cras
parent f9a07afa5e
commit 8c4b167327
2 changed files with 13 additions and 7 deletions

View File

@ -59,7 +59,7 @@ static void print_notify_onserver(IRC_SERVER_REC *server, GSList *nicks,
GSList *tmp; GSList *tmp;
GString *str; GString *str;
g_return_if_fail(server != NULL); g_return_if_fail(IS_IRC_SERVER(server));
g_return_if_fail(offline != NULL); g_return_if_fail(offline != NULL);
g_return_if_fail(desc != NULL); g_return_if_fail(desc != NULL);
@ -104,10 +104,12 @@ static void cmd_notify_show(void)
for (tmp = chatnets; tmp != NULL; tmp = tmp->next) { for (tmp = chatnets; tmp != NULL; tmp = tmp->next) {
IRC_CHATNET_REC *rec = tmp->data; IRC_CHATNET_REC *rec = tmp->data;
if (!IS_IRCNET(rec)) continue; if (!IS_IRCNET(rec))
continue;
server = (IRC_SERVER_REC *) server_find_chatnet(rec->name); server = (IRC_SERVER_REC *) server_find_chatnet(rec->name);
if (server == NULL) continue; if (!IS_IRC_SERVER(server))
continue;
print_notify_onserver(server, nicks, &offline, rec->name); print_notify_onserver(server, nicks, &offline, rec->name);
} }
@ -116,7 +118,7 @@ static void cmd_notify_show(void)
for (tmp = servers; tmp != NULL; tmp = tmp->next) { for (tmp = servers; tmp != NULL; tmp = tmp->next) {
server = tmp->data; server = tmp->data;
if (server->connrec->chatnet != NULL) if (!IS_IRC_SERVER(server) || server->connrec->chatnet != NULL)
continue; continue;
print_notify_onserver(server, nicks, &offline, server->tag); print_notify_onserver(server, nicks, &offline, server->tag);
} }

View File

@ -134,7 +134,7 @@ int notifylist_ison_server(IRC_SERVER_REC *server, const char *nick)
NOTIFY_NICK_REC *rec; NOTIFY_NICK_REC *rec;
g_return_val_if_fail(nick != NULL, FALSE); g_return_val_if_fail(nick != NULL, FALSE);
g_return_val_if_fail(server != NULL, FALSE); g_return_val_if_fail(IS_IRC_SERVER(server), FALSE);
rec = notify_nick_find(server, nick); rec = notify_nick_find(server, nick);
return rec != NULL && rec->host_ok && rec->away_ok && rec->idle_ok; return rec != NULL && rec->host_ok && rec->away_ok && rec->idle_ok;
@ -154,7 +154,8 @@ static IRC_SERVER_REC *notifylist_ison_serverlist(const char *nick, const char *
for (tmp = list; *tmp != NULL; tmp++) { for (tmp = list; *tmp != NULL; tmp++) {
server = (IRC_SERVER_REC *) server_find_chatnet(*tmp); server = (IRC_SERVER_REC *) server_find_chatnet(*tmp);
if (server != NULL && notifylist_ison_server(server, nick)) if (IS_IRC_SERVER(server) &&
notifylist_ison_server(server, nick))
break; break;
} }
g_strfreev(list); g_strfreev(list);
@ -174,7 +175,10 @@ IRC_SERVER_REC *notifylist_ison(const char *nick, const char *serverlist)
/* any server.. */ /* any server.. */
for (tmp = servers; tmp != NULL; tmp = tmp->next) { for (tmp = servers; tmp != NULL; tmp = tmp->next) {
if (notifylist_ison_server(tmp->data, nick)) IRC_SERVER_REC *server = tmp->data;
if (IS_IRC_SERVER(server) &&
notifylist_ison_server(server, nick))
return tmp->data; return tmp->data;
} }