summaryrefslogtreecommitdiff
path: root/src/ircd.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-06-03 20:44:01 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-06-03 20:44:01 +0000
commitca25d6e252a652714957eff7bfd672fedad652e4 (patch)
tree19fbaa26f130f67ba83f7e6feb3a6979f0b63f93 /src/ircd.c
parente0cba0bb71611f82434b7f061760d105423bbe09 (diff)
BUILD : 1.7.10 (824) BUGS : 389 NOTES : Added the possibility for protocol files to override the code setting mod_current_buffer, which is needed for InspIRCd
git-svn-id: svn://svn.anope.org/anope/trunk@824 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@577 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/ircd.c')
-rw-r--r--src/ircd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ircd.c b/src/ircd.c
index 67b336b47..d40b9968c 100644
--- a/src/ircd.c
+++ b/src/ircd.c
@@ -24,6 +24,7 @@ int UseTSMODE;
**/
void initIrcdProto()
{
+ ircdproto.ircd_set_mod_current_buffer = NULL;
ircdproto.ircd_set_umode = NULL;
ircdproto.ircd_cmd_svsnoop = NULL;
ircdproto.ircd_cmd_remove_akill = NULL;
@@ -96,6 +97,17 @@ void initIrcdProto()
ircdproto.ircd_cmd_ctcp = NULL;
}
+/* Special function, returns 1 if executed, 0 if not */
+int anope_set_mod_current_buffer(int ac, char **av)
+{
+ if (ircdproto.ircd_set_mod_current_buffer) {
+ ircdproto.ircd_set_mod_current_buffer(ac, av);
+ return 1;
+ }
+
+ return 0;
+}
+
void anope_set_umode(User * user, int ac, char **av)
{
ircdproto.ircd_set_umode(user, ac, av);
@@ -601,6 +613,11 @@ void anope_cmd_ctcp(char *source, char *dest, const char *fmt, ...)
* Set routines for modules to set the prefered function for dealing with things.
**/
+void pmodule_set_mod_current_buffer(void (*func) (int ac, char **av))
+{
+ ircdproto.ircd_set_mod_current_buffer = func;
+}
+
void pmodule_cmd_svsnoop(void (*func) (char *server, int set))
{
ircdproto.ircd_cmd_svsnoop = func;