Page 1 of 1
line 134: 25756 Speicherzugriffsfehler (core dumped)
Posted: Sat Feb 21, 2009 12:15 pm
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.
Re: line 134: 25756 Speicherzugriffsfehler (core dumped)
Posted: Sat Feb 21, 2009 1:01 pm
by Casper
It would be best to post your module around here so a coder can take a look at it.
Re: line 134: 25756 Speicherzugriffsfehler (core dumped)
Posted: Sun Feb 22, 2009 8:13 pm
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;
}
Re: line 134: 25756 Speicherzugriffsfehler (core dumped)
Posted: Sun Feb 22, 2009 8:21 pm
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!

Re: line 134: 25756 Speicherzugriffsfehler (core dumped)
Posted: Fri Feb 27, 2009 12:28 pm
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...