318 |
|
* side effects - module is loaded if found. |
319 |
|
*/ |
320 |
|
int |
321 |
< |
load_one_module(char *path, int coremodule) |
321 |
> |
load_one_module(const char *path, int coremodule) |
322 |
|
{ |
323 |
|
dlink_node *ptr = NULL; |
324 |
|
char modpath[PATH_MAX + 1]; |
358 |
|
mo_modload(struct Client *client_p, struct Client *source_p, |
359 |
|
int parc, char *parv[]) |
360 |
|
{ |
361 |
< |
char *m_bn; |
361 |
> |
const char *m_bn = NULL; |
362 |
|
|
363 |
|
if (!IsAdmin(source_p)) |
364 |
|
{ |
367 |
|
return; |
368 |
|
} |
369 |
|
|
370 |
< |
m_bn = basename(parv[1]); |
370 |
> |
m_bn = libio_basename(parv[1]); |
371 |
|
|
372 |
|
if (findmodule_byname(m_bn) != NULL) |
373 |
|
{ |
384 |
|
mo_modunload(struct Client *client_p, struct Client *source_p, |
385 |
|
int parc, char *parv[]) |
386 |
|
{ |
387 |
< |
char *m_bn; |
387 |
> |
const char *m_bn = NULL; |
388 |
|
dlink_node *ptr; |
389 |
|
struct module *modp; |
390 |
|
|
395 |
|
return; |
396 |
|
} |
397 |
|
|
398 |
< |
m_bn = basename(parv[1]); |
398 |
> |
m_bn = libio_basename(parv[1]); |
399 |
|
|
400 |
|
if ((ptr = findmodule_byname(m_bn)) == NULL) |
401 |
|
{ |
428 |
|
mo_modreload(struct Client *client_p, struct Client *source_p, |
429 |
|
int parc, char *parv[]) |
430 |
|
{ |
431 |
< |
char *m_bn; |
431 |
> |
const char *m_bn = NULL; |
432 |
|
dlink_node *ptr; |
433 |
|
struct module *modp; |
434 |
|
int check_core; |
440 |
|
return; |
441 |
|
} |
442 |
|
|
443 |
< |
m_bn = basename(parv[1]); |
443 |
> |
m_bn = libio_basename(parv[1]); |
444 |
|
|
445 |
|
if ((ptr = findmodule_byname(m_bn)) == NULL) |
446 |
|
{ |