X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/c7c9aa764d9cbdc653a2212e0ecad4fdf4ddcd1c..377b98f0794834938a3fc1e5959236a7927d19d7:/src/modules.c diff --git a/src/modules.c b/src/modules.c index 0d5cab5..dd977e5 100644 --- a/src/modules.c +++ b/src/modules.c @@ -189,27 +189,6 @@ mod_clear_paths(void) 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 - @@ -357,7 +336,7 @@ mo_modload(struct Client *client_p, struct Client *source_p, int parc, const cha return 0; } - m_bn = irc_basename(parv[1]); + m_bn = rb_basename(parv[1]); if(findmodule_byname(m_bn) != -1) { @@ -388,7 +367,7 @@ mo_modunload(struct Client *client_p, struct Client *source_p, int parc, const c return 0; } - m_bn = irc_basename(parv[1]); + m_bn = rb_basename(parv[1]); if((modindex = findmodule_byname(m_bn)) == -1) { @@ -428,7 +407,7 @@ mo_modreload(struct Client *client_p, struct Client *source_p, int parc, const c return 0; } - m_bn = irc_basename(parv[1]); + m_bn = rb_basename(parv[1]); if((modindex = findmodule_byname(m_bn)) == -1) { @@ -793,7 +772,7 @@ load_a_module(const char *path, int warn, int core) int *mapi_version; - mod_basename = irc_basename(path); + mod_basename = rb_basename(path); #ifdef CHARYBDIS_PROFILE tmpptr = dlopen(path, RTLD_NOW | RTLD_LOCAL | RTLD_PROFILE);