00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _EGG_MOD_SERVER_SERVER_H
00026 #define _EGG_MOD_SERVER_SERVER_H
00027
00028 #define check_tcl_ctcp(a,b,c,d,e,f) check_tcl_ctcpr(a,b,c,d,e,f,H_ctcp)
00029 #define check_tcl_ctcr(a,b,c,d,e,f) check_tcl_ctcpr(a,b,c,d,e,f,H_ctcr)
00030
00031 #ifndef MAKING_SERVER
00032
00033
00034 #define botuserhost ((char *)(server_funcs[5]))
00035
00036 #define serv (*(int *)(server_funcs[7]))
00037
00038 #define flud_thr (*(int*)(server_funcs[8]))
00039 #define flud_time (*(int*)(server_funcs[9]))
00040 #define flud_ctcp_thr (*(int*)(server_funcs[10]))
00041 #define flud_ctcp_time (*(int*)(server_funcs[11]))
00042
00043 #define match_my_nick ((int(*)(char *))server_funcs[12])
00044 #define check_tcl_flud ((int (*)(char *,char *,struct userrec *,char *,char *))server_funcs[13])
00045
00046 #define answer_ctcp (*(int *)(server_funcs[15]))
00047
00048 #define trigger_on_ignore (*(int *)(server_funcs[16]))
00049 #define check_tcl_ctcpr ((int(*)(char*,char*,struct userrec*,char*,char*,char*,p_tcl_bind_list))server_funcs[17])
00050 #define detect_avalanche ((int(*)(char *))server_funcs[18])
00051 #define nuke_server ((void(*)(char *))server_funcs[19])
00052
00053 #define newserver ((char *)(server_funcs[20]))
00054 #define newserverport (*(int *)(server_funcs[21]))
00055 #define newserverpass ((char *)(server_funcs[22]))
00056 #define cycle_time (*(int *)(server_funcs[23]))
00057
00058 #define default_port (*(int *)(server_funcs[24]))
00059 #define server_online (*(int *)(server_funcs[25]))
00060 #define min_servs (*(int *)(server_funcs[26]))
00061 #define H_raw (*(p_tcl_bind_list *)(server_funcs[27]))
00062
00063 #define H_wall (*(p_tcl_bind_list *)(server_funcs[28]))
00064 #define H_msg (*(p_tcl_bind_list *)(server_funcs[29]))
00065 #define H_msgm (*(p_tcl_bind_list *)(server_funcs[30]))
00066 #define H_notc (*(p_tcl_bind_list *)(server_funcs[31]))
00067
00068 #define H_flud (*(p_tcl_bind_list *)(server_funcs[32]))
00069 #define H_ctcp (*(p_tcl_bind_list *)(server_funcs[33]))
00070 #define H_ctcr (*(p_tcl_bind_list *)(server_funcs[34]))
00071 #define ctcp_reply ((char *)(server_funcs[35]))
00072
00073 #define get_altbotnick ((char *(*)(void))(server_funcs[36]))
00074 #define nick_len (*(int *)(server_funcs[37]))
00075 #define check_tcl_notc ((int (*)(char *,char *,struct userrec *,char *,char *))server_funcs[38])
00076 #define exclusive_binds (*(int *)(server_funcs[39]))
00077
00078 #define H_out (*(p_tcl_bind_list *)(server_funcs[40]))
00079 #else
00080
00081
00082 #define free_null(ptr) do { \
00083 nfree(ptr); \
00084 ptr = NULL; \
00085 } while (0)
00086
00087 #define write_to_server(x,y) do { \
00088 tputs(serv, (x), (y)); \
00089 tputs(serv, "\r\n", 2); \
00090 } while (0)
00091
00092 #endif
00093
00094 struct server_list {
00095 struct server_list *next;
00096
00097 char *name;
00098 int port;
00099 char *pass;
00100 char *realname;
00101 };
00102
00103
00104 enum {
00105 NETT_EFNET = 0,
00106 NETT_IRCNET = 1,
00107 NETT_UNDERNET = 2,
00108 NETT_DALNET = 3,
00109 NETT_HYBRID_EFNET = 4
00110 } nett_t;
00111
00112 #endif