view connections from localhost as being secure

This commit is contained in:
Al Beano 2017-04-06 20:43:36 +01:00
parent bc728f92de
commit e684881e9c
1 changed files with 4 additions and 1 deletions

View File

@ -34,6 +34,7 @@
#include "irc-macros.h"
#include "irc-write.h"
#include "conf.h"
#include "client.h"
#include "irc-channel.h"
@ -118,7 +119,9 @@ join_allowed(CLIENT *Client, CHANNEL *chan, const char *channame,
return false;
}
if (Channel_HasMode(chan, 'z') && !Conn_UsesSSL(Client_Conn(Client))) {
if (Channel_HasMode(chan, 'z') && !Conn_UsesSSL(Client_Conn(Client))
&& strcmp(Client_Hostname(Client), "127.0.0.1") != 0 && strcmp(Client_Hostname(Client), "localhost") != 0
&& strcmp(Client_Hostname(Client), "localhost.localdomain") != 0) {
/* Only "secure" clients are allowed, but clients doesn't
* use SSL encryption */
IRC_WriteErrClient(Client, ERR_SECURECHANNEL_MSG,