mute non-SSL warning for localhost (won't bother about other cases)

This commit is contained in:
Bram Matthys 2015-05-25 13:14:44 +02:00
parent 04727556c7
commit efdefc4eb8

View file

@ -680,8 +680,15 @@ int m_server_synch(aClient *cptr, ConfigItem_link *aconf)
me.name, inpath);
sendto_realops("(\2link\2) Link %s -> %s established",
me.name, inpath);
sendto_realops("\002WARNING:\002 This link is unencrypted (non-SSL). We highly recommend to use "
"SSL server linking. See https://www.unrealircd.org/docs/Linking_servers");
/* Print out a warning if linking to a non-SSL server unless it's localhost.
* Yeah.. there are still other cases when non-SSL links are fine (eg: local IP
* of the same machine), we won't bother with detecting that. -- Syzop
*/
if (strcmp(cptr->sockhost, "localhost"))
{
sendto_realops("\002WARNING:\002 This link is unencrypted (non-SSL). We highly recommend to use "
"SSL server linking. See https://www.unrealircd.org/docs/Linking_servers");
}
}
(void)add_to_client_hash_table(cptr->name, cptr);
/* doesnt duplicate cptr->serv if allocted this struct already */