1 /* 2 * modvals.h 3 */ 4 /* 5 * Copyright (C) 1997 Robey Pointer 6 * Copyright (C) 1999 - 2021 Eggheads Development Team 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 2 11 * of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 21 */ 22 23 #ifndef _EGG_MOD_MODVALS_H 24 #define _EGG_MOD_MODVALS_H 25 26 /* #define HOOK_GET_FLAGREC 0 */ 27 /* #define HOOK_BUILD_FLAGREC 1 */ 28 /* #define HOOK_SET_FLAGREC 2 */ 29 #define HOOK_READ_USERFILE 3 30 #define HOOK_REHASH 4 31 #define HOOK_MINUTELY 5 32 #define HOOK_DAILY 6 33 #define HOOK_HOURLY 7 34 #define HOOK_USERFILE 8 35 #define HOOK_SECONDLY 9 36 #define HOOK_PRE_REHASH 10 37 #define HOOK_IDLE 11 38 #define HOOK_5MINUTELY 12 39 #define HOOK_LOADED 13 40 #define HOOK_BACKUP 14 41 #define HOOK_DIE 15 42 #define REAL_HOOKS 16 43 #define HOOK_SHAREOUT 105 44 #define HOOK_SHAREIN 106 45 #define HOOK_ENCRYPT_PASS 107 46 #define HOOK_QSERV 108 47 #define HOOK_ADD_MODE 109 48 #define HOOK_MATCH_NOTEREJ 110 49 #define HOOK_RFC_CASECMP 111 50 #define HOOK_DNS_HOSTBYIP 112 51 #define HOOK_DNS_IPBYHOST 113 52 #define HOOK_ENCRYPT_STRING 114 53 #define HOOK_DECRYPT_STRING 115 54 #define HOOK_ENCRYPT_PASS2 116 55 #define HOOK_VERIFY_PASS2 117 56 57 /* These are FIXED once they are in a release they STAY */ 58 #define MODCALL_START 0 59 #define MODCALL_CLOSE 1 60 #define MODCALL_EXPMEM 2 61 #define MODCALL_REPORT 3 62 /* Filesys */ 63 #define FILESYS_REMOTE_REQ 4 64 #define FILESYS_ADDFILE 5 65 #define FILESYS_INCRGOTS 6 66 #define FILESYS_ISVALID 7 67 /* Share */ 68 #define SHARE_FINISH 4 69 #define SHARE_DUMP_RESYNC 5 70 /* Channels */ 71 #define CHANNEL_CLEAR 15 72 /* Server */ 73 #define SERVER_BOTNAME 4 74 #define SERVER_BOTUSERHOST 5 75 #define SERVER_NICKLEN 38 76 /* IRC */ 77 #define IRC_RECHECK_CHANNEL 15 78 #define IRC_RECHECK_CHANNEL_MODES 17 79 #define IRC_DO_CHANNEL_PART 19 80 #define IRC_CHECK_THIS_BAN 20 81 #define IRC_CHECK_THIS_USER 21 82 #define IRC_RESET_CHAN_INFO 25 83 /* Notes */ 84 #define NOTES_CMD_NOTE 4 85 /* Console */ 86 #define CONSOLE_DOSTORE 4 87 88 #ifdef MOD_USE_SHL 89 # include <dl.h> 90 #endif 91 92 #ifdef MOD_USE_DYLD 93 # include <mach-o/dyld.h> 94 #endif 95 96 #ifdef MOD_USE_LOADER 97 # include <loader.h> 98 #endif 99 100 typedef struct _module_entry { 101 struct _module_entry *next; 102 char *name; /* Name of the module (without .so) */ 103 int major; /* Major version number MUST match */ 104 int minor; /* Minor version number MUST be >= */ 105 #ifndef STATIC 106 # ifdef MOD_USE_SHL 107 shl_t hand; 108 # endif 109 # ifdef MOD_USE_DYLD 110 NSModule hand; 111 # endif 112 # ifdef MOD_USE_LOADER 113 ldr_module_t hand; 114 # endif 115 # ifdef MOD_USE_DL 116 void *hand; 117 # endif 118 #endif /* STATIC */ 119 Function *funcs; 120 #ifdef DEBUG_MEM 121 int mem_work; 122 #endif /* DEBUG_MEM */ 123 } module_entry; 124 125 #endif /* _EGG_MOD_MODVALS_H */ 126