1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-10 09:43:12 +02:00

+- Fixed .1081 problem, see bug #0000020 for more information about how

+  it REALLY should be fixed
This commit is contained in:
stskeeps
2001-12-31 00:55:48 +00:00
parent 49780c8113
commit 259b1a5eeb
6 changed files with 43 additions and 14 deletions
+3
View File
@@ -1065,3 +1065,6 @@ seen. gmtime warning still there
- Fixed sts's fix for svsnoop (since he failed to test his fix)
- Fixed a bug where the win32 editor would always say the file
was modified even if it wasn't
- Fixed .1081 problem, see bug #0000020 for more information about how
it REALLY should be fixed
+1
View File
@@ -85,6 +85,7 @@ int un_gid = 99;
#ifndef _WIN32
extern char unreallogo[];
#endif
int SVSNOOP = 0;
extern char *buildid;
time_t timeofday = 0;
LoopStruct loop;
+34
View File
@@ -311,6 +311,35 @@ int Module_Unload(char *name, int unload)
return 1;
}
vFP Module_SymEx(
#ifdef _WIN32
HMODULE mod
#else
void *mod
#endif
, char *name)
{
#ifndef STATIC_LINKING
vFP fp;
char buf[512];
int i;
if (!name)
return NULL;
ircsprintf(buf, "_%s", name);
/* Run through all modules and check for symbols */
irc_dlsym(mod, name, fp);
if (fp)
return (fp);
irc_dlsym(mod, buf, fp);
if (fp)
return (fp);
return NULL;
#endif
}
vFP Module_Sym(char *name)
{
@@ -449,6 +478,11 @@ int Module_Depend_Resolve(Module *p)
#ifndef STATIC_LINKING
while (d->pointer)
{
if ((*(d->pointer) = Module_SymEx(p->dll, d->symbol)))
{
d++;
continue;
}
*(d->pointer) = Module_SymX(d->symbol, &parental);
if (!*(d->pointer))
{
-2
View File
@@ -96,8 +96,6 @@ int l_commands_Init(int module_load)
m_who_Init(module_load);
m_mkpasswd_Init(module_load);
m_away_Init(module_load);
p.header = &m_svsnoop_Header;
Module_Depend_Resolve(&p);
m_svsnoop_Init(module_load);
m_svso_Init(module_load);
m_svsnick_Init(module_load);
+2 -1
View File
@@ -149,7 +149,8 @@ int m_oper_Unload(int module_unload)
** parv[1] = oper name
** parv[2] = oper password
*/
int SVSNOOP;
extern int SVSNOOP;
DLLFUNC int m_oper(aClient *cptr, aClient *sptr, int parc, char *parv[]) {
ConfigItem_oper *aconf;
+3 -11
View File
@@ -52,16 +52,8 @@ DLLFUNC int m_svsnoop(aClient *cptr, aClient *sptr, int parc, char *parv[]);
extern ircstats IRCstats;
static int *xSVSNOOP = NULL;
#ifdef STATIC_LINKING
extern int SVSNOOP;
#endif
static Mod_SymbolDepTable modsymdep[] = {
MOD_Dep(SVSNOOP, xSVSNOOP, "src/modules/m_oper.so"),
NULL
};
#ifndef DYNAMIC_LINKING
ModuleHeader m_svsnoop_Header
@@ -74,7 +66,7 @@ ModuleHeader Mod_Header
"$Id$",
"command /svsnoop",
"3.2-b5",
modsymdep
NULL
};
#ifdef DYNAMIC_LINKING
@@ -121,7 +113,7 @@ int m_svsnoop(aClient *cptr, aClient *sptr, int parc, char *parv[])
{
if (parv[2][0] == '+')
{
*xSVSNOOP = 1;
SVSNOOP = 1;
sendto_ops("This server has been placed in NOOP mode");
for (acptr = &me; acptr; acptr = acptr->prev)
{
@@ -146,7 +138,7 @@ int m_svsnoop(aClient *cptr, aClient *sptr, int parc, char *parv[])
}
else
{
*xSVSNOOP = 0;
SVSNOOP = 0;
sendto_ops("This server is no longer in NOOP mode");
}
}