#include "modules.h"
-#include "s_log.h"
+#include "logger.h"
#include "ircd.h"
#include "client.h"
#include "send.h"
#include "numeric.h"
#include "parse.h"
#include "ircd_defs.h"
-#include "irc_string.h"
-#include "sprintf_irc.h"
+#include "match.h"
"m_part",
"m_quit",
"m_server",
- "m_sjoin",
"m_squit",
NULL
};
{mg_unreg, mg_not_oper, mg_ignore, mg_ignore, mg_ignore, {mo_modrestart, 0}}
};
-extern struct Message error_msgtab;
-
void
modules_init(void)
{
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, mod_paths.head)
{
rb_free(ptr->data);
- free_rb_dlink_node(ptr);
+ rb_free_rb_dlink_node(ptr);
}
mod_paths.head = mod_paths.tail = NULL;
mod_paths.length = 0;
}
-/* irc_basename
- *
- * input -
- * output -
- * side effects -
- */
-char *
-irc_basename(const char *path)
-{
- char *mod_basename = rb_malloc(strlen(path) + 1);
- const char *s;
-
- if(!(s = strrchr(path, '/')))
- s = path;
- else
- s++;
-
- (void) strcpy(mod_basename, s);
- return mod_basename;
-}
-
/* findmodule_byname
*
* input -
return 0;
}
- m_bn = irc_basename(parv[1]);
+ m_bn = rb_basename(parv[1]);
if(findmodule_byname(m_bn) != -1)
{
return 0;
}
- m_bn = irc_basename(parv[1]);
+ m_bn = rb_basename(parv[1]);
if((modindex = findmodule_byname(m_bn)) == -1)
{
return 0;
}
- m_bn = irc_basename(parv[1]);
+ m_bn = rb_basename(parv[1]);
if((modindex = findmodule_byname(m_bn)) == -1)
{
#define RTLD_NOW RTLD_LAZY /* openbsd deficiency */
#endif
+#ifndef RTLD_LOCAL
+#define RTLD_LOCAL 0
+#endif
+
#ifdef CHARYBDIS_PROFILE
# ifndef RTLD_PROFILE
# warning libdl may not support profiling, sucks. :(
int *mapi_version;
- mod_basename = irc_basename(path);
+ mod_basename = rb_basename(path);
#ifdef CHARYBDIS_PROFILE
- tmpptr = dlopen(path, RTLD_NOW | RTLD_PROFILE);
+ tmpptr = dlopen(path, RTLD_NOW | RTLD_LOCAL | RTLD_PROFILE);
#else
- tmpptr = dlopen(path, RTLD_NOW);
+ tmpptr = dlopen(path, RTLD_NOW | RTLD_LOCAL);
#endif
if(tmpptr == NULL)