mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 12:53:42 +02:00
try to make sure the server is still good enough to call ischannel when printing netsplit/join
This commit is contained in:
parent
946876b1e9
commit
5c5ed64180
2 changed files with 25 additions and 11 deletions
|
|
@ -245,17 +245,24 @@ static void print_netjoins(NETJOIN_SERVER_REC *server, const char *filter_channe
|
|||
message before it. */
|
||||
static void sig_print_starting(TEXT_DEST_REC *dest)
|
||||
{
|
||||
GSList *tmp, *next;
|
||||
NETJOIN_SERVER_REC *rec;
|
||||
|
||||
if (printing_joins)
|
||||
return;
|
||||
|
||||
for (tmp = joinservers; tmp != NULL; tmp = next) {
|
||||
NETJOIN_SERVER_REC *server = tmp->data;
|
||||
if (!IS_IRC_SERVER(dest->server))
|
||||
return;
|
||||
|
||||
next = tmp->next;
|
||||
if (server->netjoins != NULL)
|
||||
print_netjoins(server, NULL);
|
||||
rec = netjoin_find_server(IRC_SERVER(dest->server));
|
||||
if (rec != NULL && rec->netjoins != NULL) {
|
||||
/* if netjoins exists, the server rec should be
|
||||
still valid. otherwise, calling server->ischannel
|
||||
may not be safe. */
|
||||
if (dest->target != NULL &&
|
||||
!server_ischannel((SERVER_REC *) rec->server, dest->target))
|
||||
return;
|
||||
|
||||
print_netjoins(rec, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue