mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-12 19:14:46 +02:00
Changed some function names
This commit is contained in:
@@ -942,3 +942,6 @@ seen. gmtime warning still there
|
||||
- Updated makefile.win32 for the Auth system
|
||||
- Redid the event system somewhat
|
||||
- Fixed a little event issue involving data types.
|
||||
- Changed the name of the hook functions from add_Hook, del_Hook,
|
||||
add_HookX, del_HookX to HookAdd, HookDel, HookAddEx, HookDelEx
|
||||
so the names are more standard.
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ Event *EventDel(Event *event);
|
||||
|
||||
Event *EventFind(char *name);
|
||||
|
||||
void EventModEvery(Event *event, int every);
|
||||
void EventModEvery(Event *event, long every);
|
||||
|
||||
void DoEvents(void);
|
||||
|
||||
|
||||
+11
-4
@@ -86,11 +86,18 @@ int load_module(char *module, int module_load);
|
||||
int unload_module(char *name);
|
||||
vFP module_sym(char *name);
|
||||
|
||||
#define add_Hook(hooktype, func) add_HookX(hooktype, func, NULL)
|
||||
#define del_Hook(hooktype, func) del_HookX(hooktype, func, NULL)
|
||||
|
||||
void add_HookX(int hooktype, int (*intfunc)(), void (*voidfunc)());
|
||||
void del_HookX(int hooktype, int (*intfunc)(), void (*voidfunc)());
|
||||
|
||||
#define add_Hook(hooktype, func) HookAddEx(hooktype, func, NULL)
|
||||
#define del_Hook(hooktype, func) HookDelEx(hooktype, func, NULL)
|
||||
#define HookAdd(hooktype, func) HookAddEx(hooktype, func, NULL)
|
||||
#define HookDel(hooktype, func) HookDelEx(hooktype, func, NULL)
|
||||
|
||||
#define add_HookX(hooktype, func1, func2) HookAddEx(hooktype, func1, func2)
|
||||
#define del_HookX(hooktype, func1, func2) HookDelEx(hooktype, func1, func2)
|
||||
|
||||
void HookAddEx(int hooktype, int (*intfunc)(), void (*voidfunc)());
|
||||
void HookDelEx(int hooktype, int (*intfunc)(), void (*voidfunc)());
|
||||
|
||||
#define RunHook0(hooktype) for (global_i = Hooks[hooktype]; global_i; global_i = global_i->next)(*(global_i->func.intfunc))()
|
||||
#define RunHook(hooktype,x) for (global_i = Hooks[hooktype]; global_i; global_i = global_i->next) (*(global_i->func.intfunc))(x)
|
||||
|
||||
+3
-3
@@ -477,7 +477,7 @@ int m_module(aClient *cptr, aClient *sptr, int parc, char *parv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
void add_HookX(int hooktype, int (*func)(), void (*vfunc)())
|
||||
void HookAddEx(int hooktype, int (*func)(), void (*vfunc)())
|
||||
{
|
||||
Hook *p;
|
||||
|
||||
@@ -489,7 +489,7 @@ void add_HookX(int hooktype, int (*func)(), void (*vfunc)())
|
||||
add_ConfigItem((ConfigItem *) p, (ConfigItem **) &Hooks[hooktype]);
|
||||
}
|
||||
|
||||
void del_HookX(int hooktype, int (*func)(), void (*vfunc)())
|
||||
void HookDelEx(int hooktype, int (*func)(), void (*vfunc)())
|
||||
{
|
||||
Hook *p;
|
||||
|
||||
@@ -524,4 +524,4 @@ EVENT(e_unload_module_delayed)
|
||||
sendto_realops("Unloaded module %s", name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ int scan_http_init(int module_load)
|
||||
/*
|
||||
* Add scanning hooks
|
||||
*/
|
||||
add_HookX(HOOKTYPE_SCAN_HOST, NULL, scan_http_scan);
|
||||
HookAddEx(HOOKTYPE_SCAN_HOST, NULL, scan_http_scan);
|
||||
}
|
||||
|
||||
/* Is first run when server is 100% ready */
|
||||
@@ -132,7 +132,7 @@ DLLFUNC void mod_unload(void)
|
||||
void scan_http_unload(void)
|
||||
#endif
|
||||
{
|
||||
del_HookX(HOOKTYPE_SCAN_HOST, NULL, scan_http_scan);
|
||||
HookDelEx(HOOKTYPE_SCAN_HOST, NULL, scan_http_scan);
|
||||
}
|
||||
|
||||
#define HICHAR(s) (((unsigned short) s) >> 8)
|
||||
|
||||
@@ -109,7 +109,7 @@ int scan_socks_init(int module_load)
|
||||
/*
|
||||
* Add scanning hooks
|
||||
*/
|
||||
add_HookX(HOOKTYPE_SCAN_HOST, NULL, scan_socks_scan);
|
||||
HookAddEx(HOOKTYPE_SCAN_HOST, NULL, scan_socks_scan);
|
||||
}
|
||||
|
||||
/* Is first run when server is 100% ready */
|
||||
@@ -129,7 +129,7 @@ DLLFUNC void mod_unload(void)
|
||||
void scan_socks_unload(void)
|
||||
#endif
|
||||
{
|
||||
del_HookX(HOOKTYPE_SCAN_HOST, NULL, scan_socks_scan);
|
||||
HookDelEx(HOOKTYPE_SCAN_HOST, NULL, scan_socks_scan);
|
||||
}
|
||||
|
||||
#define HICHAR(s) (((unsigned short) s) >> 8)
|
||||
|
||||
@@ -96,9 +96,9 @@ DLLFUNC int mod_init(int module_load)
|
||||
int httpd_init(int module_load)
|
||||
#endif
|
||||
{
|
||||
add_HookX(HOOKTYPE_HTTPD_URL, h_u_stats, NULL);
|
||||
add_HookX(HOOKTYPE_HTTPD_URL, h_u_vfs, NULL);
|
||||
add_HookX(HOOKTYPE_HTTPD_URL, h_u_phtml, NULL);
|
||||
HookAddEx(HOOKTYPE_HTTPD_URL, h_u_stats, NULL);
|
||||
HookAddEx(HOOKTYPE_HTTPD_URL, h_u_vfs, NULL);
|
||||
HookAddEx(HOOKTYPE_HTTPD_URL, h_u_phtml, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -148,9 +148,9 @@ DLLFUNC void mod_unload(void)
|
||||
void httpd_unload(void)
|
||||
#endif
|
||||
{
|
||||
del_HookX(HOOKTYPE_HTTPD_URL, h_u_stats, NULL);
|
||||
del_HookX(HOOKTYPE_HTTPD_URL, h_u_vfs, NULL);
|
||||
del_HookX(HOOKTYPE_HTTPD_URL, h_u_phtml, NULL);
|
||||
HookDelEx(HOOKTYPE_HTTPD_URL, h_u_stats, NULL);
|
||||
HookDelEx(HOOKTYPE_HTTPD_URL, h_u_vfs, NULL);
|
||||
HookDelEx(HOOKTYPE_HTTPD_URL, h_u_phtml, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user