X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmodules%2Fmodule.h;h=25a767690264df5fd68ae73cd943169478f273d4;hb=e9d8fc51ef743296c6b788dcabba46cbfab05086;hp=8d8d196144cb3de77b6b4017e667e1cfb275e38a;hpb=57e7d4b1753480c4d93b79e8fa4c57f1b5a71dbd;p=NeonServV5.git diff --git a/src/modules/module.h b/src/modules/module.h index 8d8d196..25a7676 100644 --- a/src/modules/module.h +++ b/src/modules/module.h @@ -1,4 +1,4 @@ -/* module.h - NeonServ v5.5 +/* module.h - NeonServ v5.6 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -27,11 +27,11 @@ extern int module_id; /**** global function list ****/ /* 000 */ #define getStartTime ((time_t (*)(void))global[0]) /* 001 */ #define getRunningThreads ((int (*)(void))global[1]) -/* 002 */ #define exit_daemon ((int (*)(void))global[2]) +/* 002 */ #define getCurrentSecondsOfDay ((int (*)(void))global[2]) /* 003 */ #define stricmp ((int (*)(const char *, const char *))global[3]) /* 004 */ #define stricmplen ((int (*)(const char *, const char *, int))global[4]) -/* 005 */ #define restart_process ((void (*)(void))global[5]) -/* 006 */ #define cleanup ((void (*)(void))global[6]) +/* 005 */ /* deprecated */ +/* 006 */ /* deprecated */ /* 007 */ #define restart_bot ((void (*)(int))global[7]) /* 008 */ #define stop_bot ((void (*)(void))global[8]) /* 009 */ #define reload_config ((void (*)(void))global[9]) @@ -58,9 +58,9 @@ extern int module_id; /* 028 */ #define getChannelUsers ((struct ChanUser* (*)(struct ChanNode *, struct ChanUser *))global[28]) /* 029 */ #define getUserChannels ((struct ChanUser* (*)(struct UserNode *, struct ChanUser *))global[29]) /* 030 */ #define create_socket ((struct ClientSocket* (*)(char *, int, char *, char *, char *, char *, char *))global[30]) -/* 031 */ #define connect_socket ((int (*)(struct ClientSocket *))global[31]) +/* 031 */ #define connect_socket ((void (*)(struct ClientSocket *))global[31]) /* 032 */ #define close_socket ((int (*)(struct ClientSocket *))global[32]) -/* 033 */ #define disconnect_socket ((int (*)(struct ClientSocket *))global[33]) +/* 033 */ #define destroy_socket ((int (*)(struct ClientSocket *))global[33]) /* 034 */ #define write_socket ((int (*)(struct ClientSocket *, char*, int))global[34]) /* 035 */ #define putsock ((void (*)(struct ClientSocket *, const char *, ...))global[35]) /* 036 */ #define getBots ((struct ClientSocket* (*)(int, struct ClientSocket *))global[36]) @@ -224,8 +224,12 @@ extern int module_id; /* 192 */ #define module_global_cmd_unregister_neonbackup ((void (*)(char *))global[192]) /* 193 */ #define module_neonbackup_recover_chan ((void (*)(struct ChanNode *))global[193]) /* 194 */ #define requestInvite ((void (*)(struct UserNode *, struct ChanNode *))global[194]) +/* 195 */ #define is_stable_revision ((const int (*)(void))global[195]) +/* 196 */ #define get_dev_revision ((const char * (*)(void))global[196]) +/* 197 */ #define bind_freeclient ((int (*)(freeclient_func_t *, int))global[197]) +/* 198 */ #define unbind_freeclient ((void (*)(freeclient_func_t *))global[198]) -#define MODULE_HEADER(initfunc,startfunc,loopfunc,stopfunc) \ +#define MODULE_HEADER(initfunc,startfunc,stopfunc) \ void **global = NULL; \ int module_id = 0; \ int init_module(void **functions, int modid) { \ @@ -236,9 +240,6 @@ extern int module_id; void start_module(int type) { \ startfunc(type); \ } \ - void loop_module() { \ - loopfunc(); \ - } \ void stop_module(int type) { \ stopfunc(type); \ } \