static rb_dlink_list mod_paths;
-static int mo_modload(struct Client *, struct Client *, int, const char **);
-static int mo_modlist(struct Client *, struct Client *, int, const char **);
-static int mo_modreload(struct Client *, struct Client *, int, const char **);
-static int mo_modunload(struct Client *, struct Client *, int, const char **);
-static int mo_modrestart(struct Client *, struct Client *, int, const char **);
-
-static int me_modload(struct Client *, struct Client *, int, const char **);
-static int me_modlist(struct Client *, struct Client *, int, const char **);
-static int me_modreload(struct Client *, struct Client *, int, const char **);
-static int me_modunload(struct Client *, struct Client *, int, const char **);
-static int me_modrestart(struct Client *, struct Client *, int, const char **);
+static int mo_modload(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int mo_modlist(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int mo_modreload(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int mo_modunload(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int mo_modrestart(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+
+static int me_modload(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int me_modlist(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int me_modreload(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int me_modunload(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int me_modrestart(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
static int do_modload(struct Client *, const char *);
static int do_modunload(struct Client *, const char *);
while ((ldirent = readdir(system_module_dir)) != NULL)
{
- len = strlen(ldirent->d_name);
+ len = strlen(ldirent->d_name);
if((len > 3) && !strcmp(ldirent->d_name+len-3, ".la"))
- {
- (void) rb_snprintf(module_fq_name, sizeof(module_fq_name), "%s/%s", AUTOMODPATH, ldirent->d_name);
- (void) load_a_module(module_fq_name, warn, 0);
- }
+ {
+ (void) snprintf(module_fq_name, sizeof(module_fq_name), "%s/%s", AUTOMODPATH, ldirent->d_name);
+ (void) load_a_module(module_fq_name, warn, 0);
+ }
}
(void) closedir(system_module_dir);
for (i = 0; core_module_table[i]; i++)
{
- rb_snprintf(module_name, sizeof(module_name), "%s/%s%s", MODPATH,
+ snprintf(module_name, sizeof(module_name), "%s/%s%s", MODPATH,
core_module_table[i], ".la");
if(load_a_module(module_name, warn, 1) == -1)
{
mpath = pathst->data;
- rb_snprintf(modpath, sizeof(modpath), "%s/%s", mpath, path);
+ snprintf(modpath, sizeof(modpath), "%s/%s", mpath, path);
if((strstr(modpath, "../") == NULL) && (strstr(modpath, "/..") == NULL))
{
if(stat(modpath, &statbuf) == 0)
/* load a module .. */
static int
-mo_modload(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+mo_modload(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{
if(!IsOperAdmin(source_p))
{
}
static int
-me_modload(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+me_modload(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{
if(!find_shared_conf(source_p->username, source_p->host, source_p->servptr->name, SHARED_MODULE))
{
/* unload a module .. */
static int
-mo_modunload(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+mo_modunload(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{
if(!IsOperAdmin(source_p))
{
}
static int
-me_modunload(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+me_modunload(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{
if(!find_shared_conf(source_p->username, source_p->host, source_p->servptr->name, SHARED_MODULE))
{
/* unload and load in one! */
static int
-mo_modreload(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+mo_modreload(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{
if(!IsOperAdmin(source_p))
{
}
static int
-me_modreload(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+me_modreload(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{
if(!find_shared_conf(source_p->username, source_p->host, source_p->servptr->name, SHARED_MODULE))
{
/* list modules .. */
static int
-mo_modlist(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+mo_modlist(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{
if(!IsOperAdmin(source_p))
{
}
static int
-me_modlist(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+me_modlist(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{
if(!find_shared_conf(source_p->username, source_p->host, source_p->servptr->name, SHARED_MODULE))
{
/* unload and reload all modules */
static int
-mo_modrestart(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+mo_modrestart(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{
if(!IsOperAdmin(source_p))
{
}
static int
-me_modrestart(struct Client *client_p, struct Client *source_p, int parc, const char **parv)
+me_modrestart(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char **parv)
{
if(!find_shared_conf(source_p->username, source_p->host, source_p->servptr->name, SHARED_MODULE))
{