more ctcp version updates

This commit is contained in:
Mark 2005-09-16 20:42:34 +00:00
parent 929c2f98a2
commit d4da4919eb
8 changed files with 27 additions and 29 deletions

View file

@ -4,6 +4,8 @@ Anything we add/remove/fix/change is in here (even our rants)
Fish (F), Mark (M), DeadNotBuried (D)
===============================================================================
* NeoStats * Version 3.0.a3-dev
- Replace SET VERSIONSCAN option with automatic support based on module
flags. (M)
- Fix OSX changes which prevent NeoStats running any any platform. (M)
- Fix a potential security vulnerbility with user supplied strings (F)
- NeoStats now compiles and runs on Mac OSX (Tiger) (F)

View file

@ -56,7 +56,6 @@ extern const char *ns_help_set_splittime[];
extern const char *ns_help_set_msgsampletime[];
extern const char *ns_help_set_msgthreshold[];
extern const char *ns_help_set_pingtime[];
extern const char *ns_help_set_versionscan[];
extern const char *ns_help_set_servicecmode[];
extern const char *ns_help_set_serviceumode[];
extern const char *ns_help_set_loglevel[];

View file

@ -88,7 +88,7 @@ ModuleInfo module_info = {
CORE_MODULE_VERSION,
__DATE__,
__TIME__,
0,
MODULE_FLAG_CTCP_VERSION,
0,
};

View file

@ -1,8 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "neostats", "src\neostats.vcproj", "{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "connectserv", "modules\connectserv\connectserv.vcproj", "{E033ECCE-E55E-43BC-89E7-ABE8AA46CE1F}"
ProjectSection(ProjectDependencies) = postProject
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3} = {02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}
@ -119,6 +115,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "limitserv", "modules\limits
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "neostats", "src\neostats.vcproj", "{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@ -127,14 +127,6 @@ Global
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Debug.ActiveCfg = Debug|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Debug.Build.0 = Debug|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Perl-Debug.ActiveCfg = Perl-Debug|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Perl-Debug.Build.0 = Perl-Debug|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Perl-Release.ActiveCfg = Perl-Release|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Perl-Release.Build.0 = Perl-Release|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Release.ActiveCfg = Release|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Release.Build.0 = Release|Win32
{E033ECCE-E55E-43BC-89E7-ABE8AA46CE1F}.Debug.ActiveCfg = Debug|Win32
{E033ECCE-E55E-43BC-89E7-ABE8AA46CE1F}.Debug.Build.0 = Debug|Win32
{E033ECCE-E55E-43BC-89E7-ABE8AA46CE1F}.Perl-Debug.ActiveCfg = Perl-Debug|Win32
@ -343,6 +335,14 @@ Global
{5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}.Perl-Release.Build.0 = Perl-Release|Win32
{5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}.Release.ActiveCfg = Release|Win32
{5E3A1DF8-46AF-485A-BAB2-3DC78C922F8F}.Release.Build.0 = Release|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Debug.ActiveCfg = Debug|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Debug.Build.0 = Debug|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Perl-Debug.ActiveCfg = Perl-Debug|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Perl-Debug.Build.0 = Perl-Debug|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Perl-Release.ActiveCfg = Perl-Release|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Perl-Release.Build.0 = Perl-Release|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Release.ActiveCfg = Release|Win32
{02AF1A66-8B8D-4BC3-AC09-0C0B339614F3}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection

View file

@ -968,14 +968,17 @@ int cfg_parse_fp(cfg_t *cfg, FILE *fp)
int cfg_parse(cfg_t *cfg, const char *filename)
{
int ret;
char pszDir[255];
int ret;
FILE *fp;
nassert(cfg && filename);
free(cfg->filename);
cfg->filename = cfg_tilde_expand(filename);
fp = fopen(cfg->filename, "rt");
getcwd( pszDir, 255 );
fp = fopen(cfg->filename, "rt");
if(fp == 0)
return CFG_FILE_ERROR;
ret = cfg_parse_fp(cfg, fp);

View file

@ -341,12 +341,6 @@ const char *ns_help_set_realname[] = {
NULL
};
const char *ns_help_set_versionscan[] = {
"\2VERSIONSCAN <ON|OFF>\2",
"CTCP version users on connection to the network.",
NULL
};
const char *ns_help_set_servicecmode[] = {
"\2SERVICECMODE <mode>\2",
"Channel modes assigned to service bots when they join",

View file

@ -333,9 +333,10 @@ static Module *load_stdmodule( const char *modfilename, Client * u )
}
/* Module side user authentication for e.g. SecureServ helpers
* Not available on auth modules */
if( !( infoptr->flags & MODULE_FLAG_AUTH ) ) {
if( !( infoptr->flags & MODULE_FLAG_AUTH ) )
mod_ptr->authcb = ns_dlsym( ( int * ) handle, "ModAuthUser" );
}
if( infoptr->flags & MODULE_FLAG_CTCP_VERSION )
me.versionscan ++;
/* assign a module number to this module */
assign_mod_number( mod_ptr );
@ -559,9 +560,9 @@ int unload_module( const char *modname, Client * u )
#endif /* USE_PERL */
if( mod_ptr->info->flags & MODULE_FLAG_AUTH )
{
DelAuthModule( mod_ptr );
}
if( mod_ptr->info->flags & MODULE_FLAG_CTCP_VERSION )
me.versionscan --;
moduleindex = mod_ptr->modnum;
/* canx any DNS queries used by this module */
canx_dns( mod_ptr );

View file

@ -124,7 +124,6 @@ static bot_setting ns_settings[] =
{"SPLITTIME", &nsconfig.splittime, SET_TYPE_INT, 0, 1000, NS_ULEVEL_ADMIN, NULL, ns_help_set_splittime, NULL,( void * )300 },
{"JOINSERVICESCHAN",&nsconfig.joinserviceschan, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, NULL, ns_help_set_joinserviceschan, NULL,( void* )1 },
{"PINGTIME", &nsconfig.pingtime, SET_TYPE_INT, 0, 0, NS_ULEVEL_ADMIN, NULL, ns_help_set_pingtime, NULL,( void* )120 },
{"VERSIONSCAN", &me.versionscan, SET_TYPE_BOOLEAN, 0, 0, NS_ULEVEL_ADMIN, NULL, ns_help_set_versionscan, NULL,( void* )1 },
{"SERVICECMODE", me.servicescmode, SET_TYPE_STRING, 0, MODESIZE, NS_ULEVEL_ADMIN, NULL, ns_help_set_servicecmode, NULL, NULL },
{"SERVICEUMODE", me.servicesumode, SET_TYPE_STRING, 0, MODESIZE, NS_ULEVEL_ADMIN, NULL, ns_help_set_serviceumode, NULL, NULL },
{"CMDCHAR", nsconfig.cmdchar, SET_TYPE_STRING, 0, 2, NS_ULEVEL_ADMIN, NULL, ns_help_set_cmdchar, NULL,( void* )"!" },
@ -183,8 +182,8 @@ ModuleEvent neostats_events[] =
static int services_event_ctcpversion( CmdParams *cmdparams )
{
dlog(DEBUG1, "Got Version reply event in services.c from %s: %s", cmdparams->source->name, cmdparams->param);
strlcpy( cmdparams->source->version, cmdparams->param, MAXHOST );
SendAllModuleEvent( EVENT_CTCPVERSIONRPLBC, cmdparams );
/*strlcpy( cmdparams->source->version, cmdparams->param, MAXHOST );*/
/*SendAllModuleEvent( EVENT_CTCPVERSIONRPLBC, cmdparams );*/
return NS_SUCCESS;
}