/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2008 Alexander Barton (alex@barton.de)
+ * Copyright (c)2001-2010 Alexander Barton (alex@barton.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include "defines.h"
#include "conn.h"
-#include "client.h"
#include "channel.h"
#include "conn-func.h"
#include "lists.h"
#include "parse.h"
#include "irc-info.h"
#include "irc-write.h"
-#include "resolve.h"
#include "conf.h"
#include "exp.h"
}
channel_modes = Channel_Modes(chan);
- if ((strchr(channel_modes, 'i')) && !is_invited) {
+ if (strchr(channel_modes, 'i') && !is_invited) {
/* Channel is "invite-only" and client is not on invite list */
IRC_WriteStrClient(Client, ERR_INVITEONLYCHAN_MSG,
Client_ID(Client), channame);
return false;
}
- if ((strchr(channel_modes, 'l')) &&
+ if (strchr(channel_modes, 'l') &&
(Channel_MaxUsers(chan) <= Channel_MemberCount(chan))) {
/* There are more clints joined to this channel than allowed */
IRC_WriteStrClient(Client, ERR_CHANNELISFULL_MSG,
return false;
}
+ if (strchr(channel_modes, 'z') && !Conn_UsesSSL(Client_Conn(Client))) {
+ /* Only "secure" clients are allowed, but clients doesn't
+ * use SSL encryption */
+ IRC_WriteStrClient(Client, ERR_SECURECHANNEL_MSG,
+ Client_ID(Client), channame);
+ return false;
+ }
+
return true;
}