- removed Conf_MaxPChannels and reverted to old behavior.
This commit is contained in:
parent
f7fe170a5e
commit
25ca2b3cc5
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: conf.c,v 1.43 2002/12/13 17:32:33 alex Exp $";
|
static char UNUSED id[] = "$Id: conf.c,v 1.44 2002/12/14 13:36:19 alex Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -119,8 +119,6 @@ Conf_Test( VOID )
|
||||||
else printf( " MaxConnections = -1\n" );
|
else printf( " MaxConnections = -1\n" );
|
||||||
if( Conf_MaxJoins > 0 ) printf( " MaxJoins = %d\n", Conf_MaxJoins );
|
if( Conf_MaxJoins > 0 ) printf( " MaxJoins = %d\n", Conf_MaxJoins );
|
||||||
else printf( " MaxJoins = -1\n" );
|
else printf( " MaxJoins = -1\n" );
|
||||||
if( Conf_MaxPChannels > 0 ) printf( " MaxPChannels = %d\n", Conf_MaxPChannels );
|
|
||||||
else printf( " MaxPChannels = -1\n" );
|
|
||||||
puts( "" );
|
puts( "" );
|
||||||
|
|
||||||
for( i = 0; i < Conf_Oper_Count; i++ )
|
for( i = 0; i < Conf_Oper_Count; i++ )
|
||||||
|
@ -197,7 +195,6 @@ Set_Defaults( VOID )
|
||||||
|
|
||||||
Conf_MaxConnections = -1;
|
Conf_MaxConnections = -1;
|
||||||
Conf_MaxJoins = 10;
|
Conf_MaxJoins = 10;
|
||||||
Conf_MaxPChannels = -1;
|
|
||||||
} /* Set_Defaults */
|
} /* Set_Defaults */
|
||||||
|
|
||||||
|
|
||||||
|
@ -494,16 +491,6 @@ Handle_GLOBAL( INT Line, CHAR *Var, CHAR *Arg )
|
||||||
Conf_MaxJoins = atoi( Arg );
|
Conf_MaxJoins = atoi( Arg );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if( strcasecmp( Var, "MaxPChannels" ) == 0 )
|
|
||||||
{
|
|
||||||
/* Maximum number of persistent channels in the network. Values <= 0 are equal to "no limit". */
|
|
||||||
#ifdef HAVE_ISDIGIT
|
|
||||||
if( ! isdigit( *Arg )) Config_Error( LOG_WARNING, "%s, line %d: Value of \"MaxPChannels\" is not a number!", NGIRCd_ConfFile, Line );
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
Conf_MaxPChannels = atoi( Arg );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Config_Error( LOG_ERR, "%s, line %d (section \"Global\"): Unknown variable \"%s\"!", NGIRCd_ConfFile, Line, Var );
|
Config_Error( LOG_ERR, "%s, line %d (section \"Global\"): Unknown variable \"%s\"!", NGIRCd_ConfFile, Line, Var );
|
||||||
} /* Handle_GLOBAL */
|
} /* Handle_GLOBAL */
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
* Please read the file COPYING, README and AUTHORS for more information.
|
* Please read the file COPYING, README and AUTHORS for more information.
|
||||||
*
|
*
|
||||||
* $Id: conf.h,v 1.23 2002/12/13 17:32:33 alex Exp $
|
* $Id: conf.h,v 1.24 2002/12/14 13:36:19 alex Exp $
|
||||||
*
|
*
|
||||||
* Configuration management (header)
|
* Configuration management (header)
|
||||||
*/
|
*/
|
||||||
|
@ -102,9 +102,6 @@ GLOBAL LONG Conf_MaxConnections;
|
||||||
/* Maximum number of channels a user can join */
|
/* Maximum number of channels a user can join */
|
||||||
GLOBAL INT Conf_MaxJoins;
|
GLOBAL INT Conf_MaxJoins;
|
||||||
|
|
||||||
/* Maximum number of persistent channels in the network */
|
|
||||||
GLOBAL INT Conf_MaxPChannels;
|
|
||||||
|
|
||||||
|
|
||||||
GLOBAL VOID Conf_Init PARAMS((VOID ));
|
GLOBAL VOID Conf_Init PARAMS((VOID ));
|
||||||
GLOBAL INT Conf_Test PARAMS((VOID ));
|
GLOBAL INT Conf_Test PARAMS((VOID ));
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "portab.h"
|
#include "portab.h"
|
||||||
|
|
||||||
static char UNUSED id[] = "$Id: irc-mode.c,v 1.18 2002/12/14 13:24:09 alex Exp $";
|
static char UNUSED id[] = "$Id: irc-mode.c,v 1.19 2002/12/14 13:36:19 alex Exp $";
|
||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
@ -286,7 +286,7 @@ IRC_MODE( CLIENT *Client, REQUEST *Req )
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
/* Persistent channel */
|
/* Persistent channel */
|
||||||
if( set && ( Conf_MaxPChannels > 0 ) && ( Channel_PCount( ) >= Conf_MaxPChannels ))
|
if( set && ( ! Client_OperByMe( Client )))
|
||||||
{
|
{
|
||||||
/* there are too many persistent channels in the network! */
|
/* there are too many persistent channels in the network! */
|
||||||
ok = IRC_WriteStrClient( Client, ERR_NOPRIVILEGES_MSG, Client_ID( Client ));
|
ok = IRC_WriteStrClient( Client, ERR_NOPRIVILEGES_MSG, Client_ID( Client ));
|
||||||
|
|
Loading…
Reference in New Issue