line 134: 25756 Speicherzugriffsfehler (core dumped)

These are old archives. They are kept for historic purposes only.
Post Reply
MajorGorth
Posts: 3
Joined: Sun Feb 15, 2009 2:56 pm

line 134: 25756 Speicherzugriffsfehler (core dumped)

Post by MajorGorth »

Hey.

After adding a line for loading a self-programmed module which adds a Umode +c in unrealircd.conf I get following error when trying to start UnrealIRCd:
* Loading IRCd configuration ..
../../Unreal3.2.7/unreal: line 134: 25756 Speicherzugriffsfehler (core dumped) /home/irc/Unreal3.2.7/src/ircd
Possible error encountered (IRCd seemingly not started)
When removing that line, everything works fine.
Using it at Debian Etch 64 Bit.
Casper
Posts: 338
Joined: Sun Jul 08, 2007 7:44 am
Location: The Netherlands

Re: line 134: 25756 Speicherzugriffsfehler (core dumped)

Post by Casper »

It would be best to post your module around here so a coder can take a look at it.
Ex Network-Administrator
MajorGorth
Posts: 3
Joined: Sun Feb 15, 2009 2:56 pm

Re: line 134: 25756 Speicherzugriffsfehler (core dumped)

Post by MajorGorth »

Well then...

The module has no function yet but should be able to run and add the umode +c.

Code: Select all

/*
* ===================================================
* Filename: m_callop.c
* Description: Adds Usermode +c for callop receivers
* Author: MajorGorth
* History:
* - 1.0 (20090215) Initial release
* ===================================================
*/
#include "config.h"
#include "struct.h"
#include "common.h"
#include "macros.h"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif

extern void sendto_one(aClient* to, char *pattern, ...);
ModuleHeader MOD_HEADER(callop) = {"m_callop","$Id: m_adult.c,v 1.0 2009/02/15","Usermode +c for Anope plugin \"m_callop\"","3.2-beta8-1",NULL};
int allowedSet(aClient *sptr, int what);
#define UFLAG_CALLOP 'c'
#define DelUMode(x) if(x) UmodeDel(x); x = NULL

DLLFUNC int MOD_UNLOAD(callop)(int module_unload);
DLLFUNC int MOD_TEST(callop)(ModuleInfo *module);
DLLFUNC int MOD_INIT(callop)(ModuleInfo *module);

static Umode *CallopUMode;
static ModuleInfo *thisModInfo;

DLLFUNC int MOD_TEST(callop)(ModuleInfo *module)
{
	CallopUMode = UmodeAdd(module->handle, UFLAG_CALLOP, UMODE_GLOBAL, allowedSet, 0);
	if(!CallopUMode)
		return MOD_FAILED;
	else 
		return MOD_SUCCESS;
}
DLLFUNC int MOD_INIT(callop)(ModuleInfo *module)
{
	thisModInfo = module;
	#ifdef STATIC_LINKING
		ModuleSetOptions(module->handle,MOD_OPT_PERM);
	#endif
	return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(callop)(int module_load)
{
	return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(callop)(int module_unload)
{
	UmodeDel(CallopUMode);
	return MOD_SUCCESS;
}
int allowedSet(aClient *sptr, int what)
{
	if(IsServices(sptr) || IsNetAdmin(sptr))
		return 1;
	else
		return 0;
}
Casper
Posts: 338
Joined: Sun Jul 08, 2007 7:44 am
Location: The Netherlands

Re: line 134: 25756 Speicherzugriffsfehler (core dumped)

Post by Casper »

As I'm not a coder, I can't help you further, but I'm sure someone pops up and tell you what you can do! :)
Ex Network-Administrator
MajorGorth
Posts: 3
Joined: Sun Feb 15, 2009 2:56 pm

Re: line 134: 25756 Speicherzugriffsfehler (core dumped)

Post by MajorGorth »

Casper wrote:As I'm not a coder, I can't help you further, but I'm sure someone pops up and tell you what you can do! :)
Thank you though...
Post Reply