- ein "banned client" darf in einen Channel, wenn er "invited" ist.
This commit is contained in:
parent
8a927a1b6a
commit
a1ded68a49
|
@ -9,7 +9,7 @@
|
||||||
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
||||||
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
||||||
*
|
*
|
||||||
* $Id: irc-channel.c,v 1.13 2002/09/03 23:56:55 alex Exp $
|
* $Id: irc-channel.c,v 1.14 2002/09/08 00:50:25 alex Exp $
|
||||||
*
|
*
|
||||||
* irc-channel.c: IRC-Channel-Befehle
|
* irc-channel.c: IRC-Channel-Befehle
|
||||||
*/
|
*/
|
||||||
|
@ -41,7 +41,7 @@ GLOBAL BOOLEAN
|
||||||
IRC_JOIN( CLIENT *Client, REQUEST *Req )
|
IRC_JOIN( CLIENT *Client, REQUEST *Req )
|
||||||
{
|
{
|
||||||
CHAR *channame, *flags, *topic, modes[8];
|
CHAR *channame, *flags, *topic, modes[8];
|
||||||
BOOLEAN is_new_chan;
|
BOOLEAN is_new_chan, is_invited, is_banned;
|
||||||
CLIENT *target;
|
CLIENT *target;
|
||||||
CHANNEL *chan;
|
CHANNEL *chan;
|
||||||
|
|
||||||
|
@ -96,10 +96,13 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
|
||||||
chan = Channel_Search( channame );
|
chan = Channel_Search( channame );
|
||||||
assert( chan != NULL );
|
assert( chan != NULL );
|
||||||
|
|
||||||
|
is_banned = Lists_CheckBanned( target, chan );
|
||||||
|
is_invited = Lists_CheckInvited( target, chan );
|
||||||
|
|
||||||
/* Testen, ob Client gebanned ist */
|
/* Testen, ob Client gebanned ist */
|
||||||
if( Lists_CheckBanned( target, chan ))
|
if(( is_banned == TRUE ) && ( is_invited == FALSE ))
|
||||||
{
|
{
|
||||||
/* Client ist gebanned: */
|
/* Client ist gebanned (und nicht invited): */
|
||||||
IRC_WriteStrClient( Client, ERR_BANNEDFROMCHAN_MSG, Client_ID( Client ), channame );
|
IRC_WriteStrClient( Client, ERR_BANNEDFROMCHAN_MSG, Client_ID( Client ), channame );
|
||||||
|
|
||||||
/* naechsten Namen ermitteln */
|
/* naechsten Namen ermitteln */
|
||||||
|
@ -108,12 +111,9 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ist der Channel "invite-only"? */
|
/* Ist der Channel "invite-only"? */
|
||||||
if( strchr( Channel_Modes( chan ), 'i' ))
|
if(( strchr( Channel_Modes( chan ), 'i' ) != NULL ) && ( is_invited == FALSE ))
|
||||||
{
|
{
|
||||||
/* Wurde der Client invited? */
|
/* Channel ist "invite-only" und Client wurde nicht invited: */
|
||||||
if( ! Lists_CheckInvited( target, chan ))
|
|
||||||
{
|
|
||||||
/* Client wurde nicht invited: */
|
|
||||||
IRC_WriteStrClient( Client, ERR_INVITEONLYCHAN_MSG, Client_ID( Client ), channame );
|
IRC_WriteStrClient( Client, ERR_INVITEONLYCHAN_MSG, Client_ID( Client ), channame );
|
||||||
|
|
||||||
/* naechsten Namen ermitteln */
|
/* naechsten Namen ermitteln */
|
||||||
|
@ -122,7 +122,6 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Channel joinen (und ggf. anlegen) */
|
/* Channel joinen (und ggf. anlegen) */
|
||||||
if( ! Channel_Join( target, channame ))
|
if( ! Channel_Join( target, channame ))
|
||||||
|
|
Loading…
Reference in New Issue