0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

Add new conf_read_start and conf_read_end hooks.

This commit is contained in:
Keith Buck 2012-05-21 20:22:07 +00:00
parent ec57fe6779
commit 7d60375446
3 changed files with 10 additions and 0 deletions

View file

@ -32,6 +32,8 @@ extern int h_introduce_client;
extern int h_can_kick;
extern int h_privmsg_channel;
extern int h_privmsg_user;
extern int h_conf_read_start;
extern int h_conf_read_end;
void init_hook(void);
int register_hook(const char *name);

View file

@ -66,6 +66,8 @@ int h_introduce_client;
int h_can_kick;
int h_privmsg_user;
int h_privmsg_channel;
int h_conf_read_start;
int h_conf_read_end;
void
init_hook(void)
@ -91,6 +93,8 @@ init_hook(void)
h_can_kick = register_hook("can_kick");
h_privmsg_user = register_hook("privmsg_user");
h_privmsg_channel = register_hook("privmsg_channel");
h_conf_read_start = register_hook("conf_read_start");
h_conf_read_end = register_hook("conf_read_end");
}
/* grow_hooktable()

View file

@ -52,6 +52,7 @@
#include "bandbi.h"
#include "operhash.h"
#include "chmode.h"
#include "hook.h"
struct config_server_hide ConfigServerHide;
@ -1372,7 +1373,10 @@ read_conf_files(int cold)
clear_out_old_conf();
}
call_hook(h_conf_read_start, NULL);
read_conf(conf_fbfile_in);
call_hook(h_conf_read_end, NULL);
fclose(conf_fbfile_in);
}