summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/fe-netjoin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-common/irc/fe-netjoin.c')
-rw-r--r--src/fe-common/irc/fe-netjoin.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/fe-common/irc/fe-netjoin.c b/src/fe-common/irc/fe-netjoin.c
index 8272093f..9ea633b4 100644
--- a/src/fe-common/irc/fe-netjoin.c
+++ b/src/fe-common/irc/fe-netjoin.c
@@ -253,15 +253,17 @@ static void sig_print_starting(TEXT_DEST_REC *dest)
if (!IS_IRC_SERVER(dest->server))
return;
- if (!(dest->level & MSGLEVEL_PUBLIC))
- return;
-
- if (!server_ischannel(dest->server, dest->target))
- return;
-
rec = netjoin_find_server(IRC_SERVER(dest->server));
- if (rec != NULL && rec->netjoins != NULL)
- print_netjoins(rec, dest->target);
+ 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);
+ }
}
static int sig_check_netjoins(void)