diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/bahamut.h | 65 | ||||
| -rw-r--r-- | include/commands.h | 1 | ||||
| -rw-r--r-- | include/dreamforge.h | 44 | ||||
| -rw-r--r-- | include/encrypt.h | 4 | ||||
| -rw-r--r-- | include/events.h | 7 | ||||
| -rw-r--r-- | include/extern.h | 345 | ||||
| -rw-r--r-- | include/hybrid.h | 51 | ||||
| -rw-r--r-- | include/module.h | 9 | ||||
| -rw-r--r-- | include/modules.h | 40 | ||||
| -rw-r--r-- | include/plexus.h | 60 | ||||
| -rw-r--r-- | include/ptlink.h | 84 | ||||
| -rw-r--r-- | include/rageircd.h | 48 | ||||
| -rw-r--r-- | include/ratbox.h | 52 | ||||
| -rw-r--r-- | include/services.h | 154 | ||||
| -rw-r--r-- | include/shadowircd.h | 77 | ||||
| -rw-r--r-- | include/slist.h | 13 | ||||
| -rw-r--r-- | include/solidircd.h | 71 | ||||
| -rw-r--r-- | include/ultimate2.h | 54 | ||||
| -rw-r--r-- | include/ultimate3.h | 58 | ||||
| -rw-r--r-- | include/unreal31.h | 57 | ||||
| -rw-r--r-- | include/unreal32.h | 85 | ||||
| -rw-r--r-- | include/viagra.h | 67 |
22 files changed, 443 insertions, 1003 deletions
diff --git a/include/bahamut.h b/include/bahamut.h deleted file mode 100644 index 2d386e73d..000000000 --- a/include/bahamut.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Bahamut functions - * - * (C) 2003-2005 Anope Team - * Contact us at info@anope.org - * - * Please read COPYING and README for furhter details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * - */ - -/*************************************************************************/ - -#ifdef IRC_BAHAMUT - - -#define UMODE_a 0x00000001 /* umode +a - Services Admin */ -#define UMODE_h 0x00000002 /* umode +h - Helper */ -#define UMODE_i 0x00000004 /* umode +i - Invisible */ -#define UMODE_o 0x00000008 /* umode +o - Oper */ -#define UMODE_r 0x00000010 /* umode +r - registered nick */ -#define UMODE_w 0x00000020 /* umode +w - Get wallops */ -#define UMODE_A 0x00000040 /* umode +A - Server Admin */ -#define UMODE_x 0x00000080 /* umode +x - Squelch with notice */ -#define UMODE_X 0x00000100 /* umode +X - Squelch without notice */ -#define UMODE_F 0x00000200 /* umode +F - no cptr->since message rate throttle */ -#define UMODE_j 0x00000400 /* umode +j - client rejection notices */ -#define UMODE_K 0x00000800 /* umode +K - U: lined server kill messages */ -#define UMODE_O 0x00001000 /* umode +O - Local Oper */ -#define UMODE_s 0x00002000 /* umode +s - Server notices */ -#define UMODE_c 0x00004000 /* umode +c - Client connections/exits */ -#define UMODE_k 0x00008000 /* umode +k - Server kill messages */ -#define UMODE_f 0x00010000 /* umode +f - Server flood messages */ -#define UMODE_y 0x00020000 /* umode +y - Stats/links */ -#define UMODE_d 0x00040000 /* umode +d - Debug info */ -#define UMODE_g 0x00080000 /* umode +g - Globops */ -#define UMODE_b 0x00100000 /* umode +b - Chatops */ -#define UMODE_n 0x00200000 /* umode +n - Routing Notices */ -#define UMODE_m 0x00400000 /* umode +m - spambot notices */ -#define UMODE_e 0x00800000 /* umode +e - oper notices for the above +D */ -#define UMODE_D 0x01000000 /* umode +D - Hidden dccallow umode */ -#define UMODE_I 0x02000000 /* umode +I - invisible oper (masked) */ -#define UMODE_R 0x80000000 /* unmode +R - No non registered msgs */ - -#define CMODE_i 0x00000001 -#define CMODE_m 0x00000002 -#define CMODE_n 0x00000004 -#define CMODE_p 0x00000008 -#define CMODE_s 0x00000010 -#define CMODE_t 0x00000020 -#define CMODE_k 0x00000040 /* These two used only by ChanServ */ -#define CMODE_l 0x00000080 -#define CMODE_R 0x00000100 /* Only identified users can join */ -#define CMODE_r 0x00000200 /* Set for all registered channels */ -#define CMODE_c 0x00000400 /* Colors can't be used */ -#define CMODE_M 0x00000800 /* Non-regged nicks can't send messages */ -#define CMODE_j 0x00001000 /* join throttle */ -#define CMODE_O 0x00008000 /* Only opers can join */ - -#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r - -#endif - diff --git a/include/commands.h b/include/commands.h index ec08a44a9..5fe00fc65 100644 --- a/include/commands.h +++ b/include/commands.h @@ -30,5 +30,4 @@ extern void do_help_cmd(char *service, User * u, Command *c,const char *cmd); extern MDE void mod_help_cmd(char *service, User *u, CommandHash *cmdTable[],const char *cmd); extern MDE void mod_run_cmd(char *service, User *u, CommandHash *cmdTable[],const char *cmd); -extern char *mod_current_module_name; /*************************************************************************/ diff --git a/include/dreamforge.h b/include/dreamforge.h deleted file mode 100644 index f5ee12b00..000000000 --- a/include/dreamforge.h +++ /dev/null @@ -1,44 +0,0 @@ -/* DreamForge IRCD functions - * - * (C) 2003-2005 Anope Team - * Contact us at info@anope.org - * - * Please read COPYING and README for furhter details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * - */ - -#ifdef IRC_DREAMFORGE - -#define UMODE_a 0x00000001 /* Services Admin */ -#define UMODE_h 0x00000002 /* Help system operator */ -#define UMODE_i 0x00000004 /* makes user invisible */ -#define UMODE_o 0x00000008 /* Operator */ -#define UMODE_r 0x00000010 /* Nick set by services as registered */ -#define UMODE_w 0x00000020 /* send wallops to them */ -#define UMODE_A 0x00000040 /* Admin */ -#define UMODE_O 0x00000080 /* Local operator */ -#define UMODE_s 0x00000100 /* server notices such as kill */ -#define UMODE_k 0x00000200 /* Show server-kills... */ -#define UMODE_c 0x00000400 /* Show client information */ -#define UMODE_f 0x00000800 /* Receive flood warnings */ -#define UMODE_g 0x80000000 /* Shows some global messages */ - -#define CMODE_i 0x00000001 -#define CMODE_m 0x00000002 -#define CMODE_n 0x00000004 -#define CMODE_p 0x00000008 -#define CMODE_s 0x00000010 -#define CMODE_t 0x00000020 -#define CMODE_k 0x00000040 /* These two used only by ChanServ */ -#define CMODE_l 0x00000080 -#define CMODE_R 0x00000100 /* Only identified users can join */ -#define CMODE_r 0x00000200 /* Set for all registered channels */ - -#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r - -#endif - diff --git a/include/encrypt.h b/include/encrypt.h index e786fd1de..462e1b373 100644 --- a/include/encrypt.h +++ b/include/encrypt.h @@ -12,5 +12,5 @@ * */ -extern int encrypt(const char *src, int len, char *dest, int size); -extern int check_password(const char *plaintext, const char *password); +E int encrypt(const char *src, int len, char *dest, int size); +E int check_password(const char *plaintext, const char *password); diff --git a/include/events.h b/include/events.h index 6fa858810..4065e1a2a 100644 --- a/include/events.h +++ b/include/events.h @@ -8,7 +8,7 @@ * Based on the original code of Epona by Lara. * Based on the original code of Services by Andy Church. * - * $Id:$ + * $Id$ * */ @@ -22,6 +22,7 @@ #define EVENT_BOT_JOIN "bot_join" #define EVENT_BOT_CREATE "bot_create" #define EVENT_BOT_CHANGE "bot_change" +#define EVENT_BOT_FANTASY "bot_command" #define EVENT_BOT_DEL "bot_del" #define EVENT_BOT_ASSIGN "bot_assign" #define EVENT_TOPIC_UPDATED "chan_topic_updated" @@ -34,6 +35,7 @@ #define EVENT_CONNECT "connect" #define EVENT_DB_EXPIRE "db_expire" #define EVENT_RESTART "restart" +#define EVENT_RELOAD "reload" #define EVENT_SHUTDOWN "shutdown" #define EVENT_SIGNAL "signal" #define EVENT_NICK_REGISTERED "nick_registered" @@ -49,4 +51,5 @@ #define EVENT_DEFCON_LEVEL "defcon_level" #define EVENT_NICK_SUSPENDED "nick_suspended" #define EVENT_NICK_UNSUSPEND "nick_unsuspend" - +#define EVENT_JOIN_CHANNEL "join_channel" +#define EVENT_PART_CHANNEL "part_channel" diff --git a/include/extern.h b/include/extern.h index fdfd09d4b..1c951d801 100644 --- a/include/extern.h +++ b/include/extern.h @@ -15,32 +15,37 @@ #ifndef EXTERN_H #define EXTERN_H -#include "slist.h" - #ifndef _WIN32 #define E extern +#define I extern #else #ifndef MODULE_COMPILE #define E extern __declspec(dllexport) +#define I extern __declspec(dllimport) #else #define E extern __declspec(dllimport) +#define I extern __declspec(dllexport) #endif #endif +#include "slist.h" + E char *uplink; /* IRC Variables */ -E IRCDVar ircd[]; -E IRCDCAPAB ircdcap[]; -E const char flood_mode_char_set[]; -E const char flood_mode_char_remove[]; +E IRCDVar *ircd; +E IRCDCAPAB *ircdcap; +E char *flood_mode_char_set; +E char *flood_mode_char_remove; E int UseTSMODE; /* hack to get around bahamut clones that don't send TSMODE */ -E unsigned long umodes[128]; +I unsigned long umodes[128]; E char csmodes[128]; E CMMode cmmodes[128]; E CBMode cbmodes[128]; -E CBModeInfo cbmodeinfos[]; +E CBModeInfo *cbmodeinfos; E CUMode cumodes[128]; +E char *IRCDModule; +E IRCDProto ircdproto; /**** actions.c ****/ @@ -53,6 +58,7 @@ E void common_svsmode(User * u, char *modes, char *arg); /**** botserv.c ****/ E BotInfo *botlists[256]; +E int nbots; E void get_botserv_stats(long *nrec, long *memuse); E void bs_init(void); E void botserv(User *u, char *buf); @@ -66,15 +72,19 @@ E BotInfo *findbot(char *nick); E void bot_join(ChannelInfo *ci); E void bot_rejoin_all(BotInfo *bi); E char *normalizeBuffer(char *); +E void unassign(User * u, ChannelInfo * ci); +E void insert_bot(BotInfo * bi); + +E void bot_raw_ban(User * requester, ChannelInfo * ci, char *nick, char *reason); +E void bot_raw_kick(User * requester, ChannelInfo * ci, char *nick, char *reason); +E void bot_raw_mode(User * requester, ChannelInfo * ci, char *mode, char *nick); /**** channels.c ****/ E Channel *chanlist[1024]; E CBMode cbmodes[128]; -E CBModeInfo cbmodeinfos[]; E CUMode cumodes[128]; E CMMode cmmodes[128]; -E unsigned long umodes[128]; E char csmodes[128]; E void add_ban(Channel * chan, char *mask); @@ -129,7 +139,7 @@ E void do_topic(const char *source, int ac, char **av); E void do_mass_mode(char *modes); E void chan_set_correct_modes(User * user, Channel * c, int give_modes); -E void restore_unsycned_topics(void); +E void restore_unsynced_topics(void); #define whosends(ci) ((!(ci) || !((ci)->botflags & BS_SYMBIOSIS) || !(ci)->bi || !(ci)->c || (ci)->c->usercount < BSMinUsers) ? s_ChanServ : (ci)->bi->nick) @@ -188,6 +198,11 @@ E void cs_set_limit(ChannelInfo * ci, char *value); E char *cs_get_redirect(ChannelInfo * ci); E void cs_set_redirect(ChannelInfo * ci, char *value); +E int levelinfo_maxwidth; +E ChannelInfo *makechan(const char *chan); +E int is_identified(User * user, ChannelInfo * ci); +E char *get_mlock_modes(ChannelInfo * ci, int complete); + /**** compat.c ****/ #if !HAVE_SNPRINTF @@ -430,11 +445,35 @@ E int CloneWarningDelay; E int KillClones; E int AddAkiller; +/** + * Modules Stuff + **/ E char **ModulesAutoload; E int ModulesNumber; E char **ModulesDelayedAutoload; E int ModulesDelayedNumber; +E char **HostServCoreModules; +E int HostServCoreNumber; + +E char **HelpServCoreModules; +E int HelpServCoreNumber; + +E char **MemoServCoreModules; +E int MemoServCoreNumber; + +E char **BotServCoreModules; +E int BotServCoreNumber; + +E char **OperServCoreModules; +E int OperServCoreNumber; + +E char **NickServCoreModules; +E int NickServCoreNumber; + +E char **ChanServCoreModules; +E int ChanServCoreNumber; + E int KillClonesAkillExpire; @@ -518,6 +557,9 @@ E long unsigned int UserKey3; E int convert_ircservices_44(void); +/**** encrypt.c ****/ +E int check_password(const char *plaintext, const char *password); + /**** helpserv.c ****/ E void helpserv(User * u, char *buf); E void helpserv_init(void); @@ -527,6 +569,11 @@ E void hostserv_init(void); E void addHostCore(char *nick, char *vIdent, char *vhost, char *creator, int32 tmp_time); E char *getvIdent(char *nick); E char *getvHost(char *nick); +E int is_host_remover(User * u); +E int is_host_setter(User *u); +E HostCore *hostCoreListHead(); +E HostCore *findHostCore(HostCore * head, char *nick, boolean * found); +E void set_lastmask(User * u); /**** init.c ****/ @@ -534,6 +581,103 @@ E void introduce_user(const char *user); E int init(int ac, char **av); E int servernum; +/**** ircd.c ****/ +E void pmodule_cmd_svsnoop(void (*func) (char *server, int set)); +E void pmodule_cmd_remove_akill(void (*func) (char *user, char *host)); +E void pmodule_cmd_topic(void (*func) (char *whosets, char *chan, char *whosetit, char *topic, time_t when)); +E void pmodule_cmd_vhost_off(void (*func) (User * u)); +E void pmodule_cmd_akill(void (*func) (char *user, char *host, char *who, time_t when, time_t expires, char *reason)); +E void pmodule_cmd_svskill(void (*func) (char *source, char *user, char *buf)); +E void pmodule_cmd_svsmode(void (*func) (User * u, int ac, char **av)); +E void pmodule_cmd_372(void (*func) (char *source, char *msg)); +E void pmodule_cmd_372_error(void (*func) (char *source)); +E void pmodule_cmd_375(void (*func) (char *source)); +E void pmodule_cmd_376(void (*func) (char *source)); +E void pmodule_cmd_nick(void (*func) (char *nick, char *name, char *modes)); +E void pmodule_cmd_guest_nick(void (*func) (char *nick, char *user, char *host, char *real, char *modes)); +E void pmodule_cmd_mode(void (*func) (char *source, char *dest, char *buf)); +E void pmodule_cmd_bot_nick(void (*func) (char *nick, char *user, char *host, char *real, char *modes)); +E void pmodule_cmd_kick(void (*func) (char *source, char *chan, char *user, char *buf)); +E void pmodule_cmd_notice_ops(void (*func) (char *source, char *dest, char *buf)); +E void pmodule_cmd_notice(void (*func) (char *source, char *dest, char *buf)); +E void pmodule_cmd_notice2(void (*func) (char *source, char *dest, char *msg)); +E void pmodule_cmd_privmsg(void (*func) (char *source, char *dest, char *buf)); +E void pmodule_cmd_privmsg2(void (*func) (char *source, char *dest, char *msg)); +E void pmodule_cmd_serv_notice(void (*func) (char *source, char *dest, char *msg)); +E void pmodule_cmd_serv_privmsg(void (*func) (char *source, char *dest, char *msg)); +E void pmodule_cmd_bot_chan_mode(void (*func) (char *nick, char *chan)); +E void pmodule_cmd_351(void (*func) (char *source)); +E void pmodule_cmd_quit(void (*func) (char *source, char *buf)); +E void pmodule_cmd_pong(void (*func) (char *servname, char *who)); +E void pmodule_cmd_join(void (*func) (char *user, char *channel, time_t chantime)); +E void pmodule_cmd_unsqline(void (*func) (char *user)); +E void pmodule_cmd_invite(void (*func) (char *source, char *chan, char *nick)); +E void pmodule_cmd_part(void (*func) (char *nick, char *chan, char *buf)); +E void pmodule_cmd_391(void (*func) (char *source, char *timestr)); +E void pmodule_cmd_250(void (*func) (char *buf)); +E void pmodule_cmd_307(void (*func) (char *buf)); +E void pmodule_cmd_311(void (*func) (char *buf)); +E void pmodule_cmd_312(void (*func) (char *buf)); +E void pmodule_cmd_317(void (*func) (char *buf)); +E void pmodule_cmd_219(void (*func) (char *source, char *letter)); +E void pmodule_cmd_401(void (*func) (char *source, char *who)); +E void pmodule_cmd_318(void (*func) (char *source, char *who)); +E void pmodule_cmd_242(void (*func) (char *buf)); +E void pmodule_cmd_243(void (*func) (char *buf)); +E void pmodule_cmd_211(void (*func) (char *buf)); +E void pmodule_cmd_global(void (*func) (char *source, char *buf)); +E void pmodule_cmd_global_legacy(void (*func) (char *source, char *fmt)); +E void pmodule_cmd_sqline(void (*func) (char *mask, char *reason)); +E void pmodule_cmd_squit(void (*func) (char *servname, char *message)); +E void pmodule_cmd_svso(void (*func) (char *source, char *nick, char *flag)); +E void pmodule_cmd_chg_nick(void (*func) (char *oldnick, char *newnick)); +E void pmodule_cmd_svsnick(void (*func) (char *source, char *guest, time_t when)); +E void pmodule_cmd_vhost_on(void (*func) (char *nick, char *vIdent, char *vhost)); +E void pmodule_cmd_connect(void (*func) (int servernum)); +E void pmodule_cmd_svshold(void (*func) (char *nick)); +E void pmodule_cmd_release_svshold(void (*func) (char *nick)); +E void pmodule_cmd_unsgline(void (*func) (char *mask)); +E void pmodule_cmd_unszline(void (*func) (char *mask)); +E void pmodule_cmd_szline(void (*func) (char *mask, char *reason, char *whom)); +E void pmodule_cmd_sgline(void (*func) (char *mask, char *reason)); +E void pmodule_cmd_unban(void (*func) (char *name, char *nick)); +E void pmodule_cmd_svsmode_chan(void (*func) (char *name, char *mode, char *nick)); +E void pmodule_cmd_svid_umode(void (*func) (char *nick, time_t ts)); +E void pmodule_cmd_nc_change(void (*func) (User * u)); +E void pmodule_cmd_svid_umode2(void (*func) (User * u, char *ts)); +E void pmodule_cmd_svid_umode3(void (*func) (User * u, char *ts)); +E void pmodule_cmd_ctcp(void (*func) (char *source, char *dest, char *buf)); +E void pmodule_cmd_eob(void (*func) ()); +E void pmodule_cmd_jupe(void (*func) (char *jserver, char *who, char *reason)); +E void pmodule_set_umode(void (*func) (User * user, int ac, char **av)); +E void pmodule_valid_nick(int (*func) (char *nick)); +E void pmodule_flood_mode_check(int (*func) (char *value)); +E void pmodule_ircd_var(IRCDVar * ircdvar); +E void pmodule_ircd_cap(IRCDCAPAB * cap); +E void pmodule_ircd_version(char *version); +E void pmodule_ircd_cbmodeinfos(CBModeInfo * modeinfos); +E void pmodule_ircd_cumodes(CUMode modes[128]); +E void pmodule_ircd_flood_mode_char_set(char *mode); +E void pmodule_ircd_flood_mode_char_remove(char *mode); +E void pmodule_ircd_cbmodes(CBMode modes[128]); +E void pmodule_ircd_cmmodes(CMMode modes[128]); +E void pmodule_ircd_csmodes(char mode[128]); +E void pmodule_ircd_useTSMode(int use); +E void pmodule_invis_umode(int mode); +E void pmodule_oper_umode(int mode); +E void pmodule_invite_cmode(int mode); +E void pmodule_secret_cmode(int mode); +E void pmodule_private_cmode(int mode); +E void pmodule_key_mode(int mode); +E void pmodule_limit_mode(int mode); + +E int anope_get_secret_mode(); +E int anope_get_invite_mode(); +E int anope_get_limit_mode(); +E int anope_get_private_mode(); +E int anope_get_invis_mode(); +E int anope_get_oper_mode(); + /**** language.c ****/ E char **langtexts[NUM_LANGS]; @@ -580,7 +724,7 @@ E int MailValidate(const char *email); E const char version_number[]; E const char version_number_dotted[]; E const char version_build[]; -E const char version_protocol[]; +E char *version_protocol; E const char version_flags[]; E char *services_dir; @@ -611,6 +755,7 @@ E void save_databases(void); E void expire_all(void); E void do_backtrace(int show_segheader); E void sighandler(int signum); +E void do_restart_services(void); /**** memory.c ****/ @@ -625,6 +770,8 @@ E char *sstrdup(const char *s); E void ms_init(void); E void memoserv(User * u, char *buf); E void check_memos(User * u); +E MemoInfo *getmemoinfo(const char *name, int *ischan, int *isforbid); +E int delmemo(MemoInfo * mi, int num); /**** messages.c ****/ @@ -704,6 +851,8 @@ E int do_randomnews(User * u); E NickAlias *nalists[1024]; E NickCore *nclists[1024]; E NickRequest *nrlists[1024]; +E NickRequest *findrequestnick(const char *nick); +E int delnickrequest(NickRequest * nr); E unsigned int guestnum; E void insert_requestnick(NickRequest * nr); E void alpha_insert_alias(NickAlias * na); @@ -711,6 +860,11 @@ E void insert_core(NickCore * nc); E void listnicks(int count_only, const char *nick); E void get_aliases_stats(long *nrec, long *memuse); E void get_core_stats(long *nrec, long *memuse); +E void collide(NickAlias * na, int from_timeout); +E void del_ns_timeout(NickAlias * na, int type); +E void change_core_display(NickCore * nc, char *newdisplay); +E void release(NickAlias * na, int from_timeout); +E int do_setmodes(User * u); E void ns_init(void); E void nickserv(User * u, char *buf); @@ -726,7 +880,7 @@ E int nick_identified(User * u); E int nick_recognized(User * u); E void expire_nicks(void); E void expire_requests(void); -E int ns_do_register(User * u); +I int ns_do_register(User * u); E int delnick(NickAlias * na); E NickAlias *findnick(const char *nick); E NickCore *findcore(const char *nick); @@ -778,10 +932,16 @@ E void expire_szlines(void); E int check_szline(char *nick, char *ip); E void check_clones(User * user); -E void delete_ignore(const char *nick); E Server *server_global(Server * s, char *msg); +E int OSOpersOnly; +E time_t DefContimer; +E void runDefCon(void); + +E struct clone clonelist[CLONE_DETECT_SIZE]; +E struct clone warnings[CLONE_DETECT_SIZE]; + /**** process.c ****/ E int allow_ignore; @@ -863,6 +1023,19 @@ E int exception_add(User * u, const char *mask, const int limit, const char *reason, const char *who, const time_t expires); +/**** slist.c ****/ +E int slist_add(SList *slist, void *item); +E void slist_clear(SList *slist, int free); +E int slist_delete(SList *slist, int index); +E int slist_delete_range(SList *slist, char *range, slist_delcheckcb_t cb, ...); +E int slist_enum(SList *slist, char *range, slist_enumcb_t cb, ...); +E int slist_full(SList *slist); +E int slist_indexof(SList *slist, void *item); +E void slist_init(SList *slist); +E void slist_pack(SList *slist); +E int slist_remove(SList *slist, void *item); +E int slist_setcapacity(SList *slist, int16 capacity); + /**** sockutil.c ****/ E int32 total_read, total_written; @@ -1051,74 +1224,74 @@ E void anope_cmd_burst(); /* BURST - use eob to send burst 0 */ E void anope_cmd_svswatch(char *sender, char *nick, char *parm); E void anope_cmd_ctcp(char *source, char *dest, const char *fmt, ...); /* CTCP */ -E int anope_event_482(char *source, int ac, char **av); -E int anope_event_436(char *source, int ac, char **av); -E int anope_event_away(char *source, int ac, char **av); -E int anope_event_ping(char *source, int ac, char **av); -E int anope_event_motd(char *source, int ac, char **av); -E int anope_event_join(char *source, int ac, char **av); -E int anope_event_kick(char *source, int ac, char **av); -E int anope_event_kill(char *source, int ac, char **av); -E int anope_event_mode(char *source, int ac, char **av); -E int anope_event_tmode(char *source, int ac, char **av); -E int anope_event_quit(char *source, int ac, char **av); -E int anope_event_squit(char *source, int ac, char **av); -E int anope_event_topic(char *source, int ac, char **av); -E int anope_event_whois(char *source, int ac, char **av); -E int anope_event_part(char *source, int ac, char **av); -E int anope_event_server(char *source, int ac, char **av); -E int anope_event_sid(char *source, int ac, char **av); -E int anope_event_nick(char *source, int ac, char **av); -E int anope_event_bmask(char *source, int ac, char **av); -E int anope_event_gnotice(char *source, int ac, char **av); -E int anope_event_privmsg(char *source, int ac, char **av); -E int anope_event_capab(char *source, int ac, char **av); -E int anope_event_sjoin(char *source, int ac, char **av); -E int anope_event_cs(char *source, int ac, char **av); -E int anope_event_hs(char *source, int ac, char **av); -E int anope_event_ms(char *source, int ac, char **av); -E int anope_event_ns(char *source, int ac, char **av); -E int anope_event_os(char *source, int ac, char **av); -E int anope_event_vs(char *source, int ac, char **av); -E int anope_event_svinfo(char *source, int ac, char **av); -E int anope_event_chghost(char *source, int ac, char **av); -E int anope_event_sethost(char *source, int ac, char **av); -E int anope_event_chgident(char *source, int ac, char **av); -E int anope_event_setident(char *source, int ac, char **av); -E int anope_event_chgname(char *source, int ac, char **av); -E int anope_event_setname(char *source, int ac, char **av); -E int anope_event_svsinfo(char *source, int ac, char **av); -E int anope_event_snick(char *source, int ac, char **av); -E int anope_event_vhost(char *source, int ac, char **av); -E int anope_event_tkl(char *source, int ac, char **av); -E int anope_event_eos(char *source, int ac, char **av); -E int anope_event_eob(char *source, int ac, char **av); -E int anope_event_pass(char *source, int ac, char **av); -E int anope_event_netinfo(char *source, int ac, char **av); -E int anope_event_error(char *source, int ac, char **av); -E int anope_event_eb(char *source, int ac, char **av); -E int anope_event_netctrl(char *source, int ac, char **av); -E int anope_event_notice(char *source, int ac, char **av); -E int anope_event_snotice(char *source, int ac, char **av); -E int anope_event_sqline(char *source, int ac, char **av); -E int anope_event_error(char *source, int ac, char **av); -E int anope_event_smo(char *source, int ac, char **av); -E int anope_event_myid(char *source, int ac, char **av); -E int anope_event_vctrl(char *source, int ac, char **av); -E int anope_event_tctrl(char *source, int ac, char **av); -E int anope_event_netinfo(char *source, int ac, char **av); -E int anope_event_snetinfo(char *source, int ac, char **av); -E int anope_event_umode2(char *source, int ac, char **av); -E int anope_event_globops(char *source, int ac, char **av); -E int anope_event_swhois(char *source, int ac, char **av); -E int anope_event_burst(char *source, int ac, char **av); -E int anope_event_luserslock(char *source, int ac, char **av); -E int anope_event_admin(char *source, int ac, char **av); -E int anope_event_credits(char *source, int ac, char **av); -E int anope_event_rehash(char *source, int ac, char **av); -E int anope_event_sdesc(char *source, int ac, char **av); -E int anope_event_netglobal(char *source, int ac, char **av); -E int anope_event_invite(char *source, int ac, char **av); +I int anope_event_482(char *source, int ac, char **av); +I int anope_event_436(char *source, int ac, char **av); +I int anope_event_away(char *source, int ac, char **av); +I int anope_event_ping(char *source, int ac, char **av); +I int anope_event_motd(char *source, int ac, char **av); +I int anope_event_join(char *source, int ac, char **av); +I int anope_event_kick(char *source, int ac, char **av); +I int anope_event_kill(char *source, int ac, char **av); +I int anope_event_mode(char *source, int ac, char **av); +I int anope_event_tmode(char *source, int ac, char **av); +I int anope_event_quit(char *source, int ac, char **av); +I int anope_event_squit(char *source, int ac, char **av); +I int anope_event_topic(char *source, int ac, char **av); +I int anope_event_whois(char *source, int ac, char **av); +I int anope_event_part(char *source, int ac, char **av); +I int anope_event_server(char *source, int ac, char **av); +I int anope_event_sid(char *source, int ac, char **av); +I int anope_event_nick(char *source, int ac, char **av); +I int anope_event_bmask(char *source, int ac, char **av); +I int anope_event_gnotice(char *source, int ac, char **av); +I int anope_event_privmsg(char *source, int ac, char **av); +I int anope_event_capab(char *source, int ac, char **av); +I int anope_event_sjoin(char *source, int ac, char **av); +I int anope_event_cs(char *source, int ac, char **av); +I int anope_event_hs(char *source, int ac, char **av); +I int anope_event_ms(char *source, int ac, char **av); +I int anope_event_ns(char *source, int ac, char **av); +I int anope_event_os(char *source, int ac, char **av); +I int anope_event_vs(char *source, int ac, char **av); +I int anope_event_svinfo(char *source, int ac, char **av); +I int anope_event_chghost(char *source, int ac, char **av); +I int anope_event_sethost(char *source, int ac, char **av); +I int anope_event_chgident(char *source, int ac, char **av); +I int anope_event_setident(char *source, int ac, char **av); +I int anope_event_chgname(char *source, int ac, char **av); +I int anope_event_setname(char *source, int ac, char **av); +I int anope_event_svsinfo(char *source, int ac, char **av); +I int anope_event_snick(char *source, int ac, char **av); +I int anope_event_vhost(char *source, int ac, char **av); +I int anope_event_tkl(char *source, int ac, char **av); +I int anope_event_eos(char *source, int ac, char **av); +I int anope_event_eob(char *source, int ac, char **av); +I int anope_event_pass(char *source, int ac, char **av); +I int anope_event_netinfo(char *source, int ac, char **av); +I int anope_event_error(char *source, int ac, char **av); +I int anope_event_eb(char *source, int ac, char **av); +I int anope_event_netctrl(char *source, int ac, char **av); +I int anope_event_notice(char *source, int ac, char **av); +I int anope_event_snotice(char *source, int ac, char **av); +I int anope_event_sqline(char *source, int ac, char **av); +I int anope_event_error(char *source, int ac, char **av); +I int anope_event_smo(char *source, int ac, char **av); +I int anope_event_myid(char *source, int ac, char **av); +I int anope_event_vctrl(char *source, int ac, char **av); +I int anope_event_tctrl(char *source, int ac, char **av); +I int anope_event_netinfo(char *source, int ac, char **av); +I int anope_event_snetinfo(char *source, int ac, char **av); +I int anope_event_umode2(char *source, int ac, char **av); +I int anope_event_globops(char *source, int ac, char **av); +I int anope_event_swhois(char *source, int ac, char **av); +I int anope_event_burst(char *source, int ac, char **av); +I int anope_event_luserslock(char *source, int ac, char **av); +I int anope_event_admin(char *source, int ac, char **av); +I int anope_event_credits(char *source, int ac, char **av); +I int anope_event_rehash(char *source, int ac, char **av); +I int anope_event_sdesc(char *source, int ac, char **av); +I int anope_event_netglobal(char *source, int ac, char **av); +I int anope_event_invite(char *source, int ac, char **av); E int anope_event_null(char *source, int ac, char **av); E void anope_set_umode(User * user, int ac, char **av); @@ -1150,9 +1323,9 @@ E int decode_ip(char *buf); E char *host_resolve(char *host); -extern void event_message_process(char *eventbuf); -extern void eventprintf(char *fmt, ...); -extern void event_process_hook(char *name, char *eventbuf); -extern void send_event(char *name, const char *fmt, ...); +E void event_message_process(char *eventbuf); +E void eventprintf(char *fmt, ...); +E void event_process_hook(char *name, int argc, char **argv); +E void send_event(char *name, int argc, ...); #endif /* EXTERN_H */ diff --git a/include/hybrid.h b/include/hybrid.h deleted file mode 100644 index 05dfbe4ca..000000000 --- a/include/hybrid.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Hybrid IRCD functions - * - * (C) 2003-2005 Anope Team - * Contact us at info@anope.org - * - * Please read COPYING and README for furhter details. - * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. - * - * - */ - -#ifdef IRC_HYBRID - - -#define UMODE_a 0x00000001 /* Admin status */ -#define UMODE_b 0x00000080 /* See bot and drone flooding notices */ -#define UMODE_c 0x00000100 /* Client connection/quit notices */ -#define UMODE_d 0x00000200 /* See debugging notices */ -#define UMODE_f 0x00000400 /* See I: line full notices */ -#define UMODE_g 0x00000800 /* Server Side Ignore */ -#define UMODE_i 0x00000004 /* Not shown in NAMES or WHO unless you share a channel */ -#define UMODE_k 0x00001000 /* See server generated KILL messages */ -#define UMODE_l 0x00002000 /* See LOCOPS messages */ -#define UMODE_n 0x00004000 /* See client nick changes */ -#define UMODE_o 0x00000008 /* Operator status */ -#define UMODE_r 0x00000010 /* See rejected client notices */ -#define UMODE_s 0x00008000 /* See general server notices */ -#define UMODE_u 0x00010000 /* See unauthorized client notices */ -#define UMODE_w 0x00000020 /* See server generated WALLOPS */ -#define UMODE_x 0x00020000 /* See remote server connection and split notices */ -#define UMODE_y 0x00040000 /* See LINKS, STATS (if configured), TRACE notices */ -#define UMODE_z 0x00080000 /* See oper generated WALLOPS */ - -#define CMODE_i 0x00000001 /* Invite only */ -#define CMODE_m 0x00000002 /* Users without +v/h/o cannot send text to the channel */ -#define CMODE_n 0x00000004 /* Users must be in the channel to send text to it */ -#define CMODE_p 0x00000008 /* Private is obsolete, this now restricts KNOCK */ -#define CMODE_s 0x00000010 /* The channel does not show up on NAMES or LIST */ -#define CMODE_t 0x00000020 /* Only chanops can change the topic */ -#define CMODE_k 0x00000040 /* Key/password for the channel. */ -#define CMODE_l 0x00000080 /* Limit the number of users in a channel */ -#define CMODE_a 0x00000400 /* Anonymous ops, chanops are hidden */ - - -#define DEFAULT_MLOCK CMODE_n | CMODE_t - -#endif - - diff --git a/include/module.h b/include/module.h new file mode 100644 index 000000000..fa09f545c --- /dev/null +++ b/include/module.h @@ -0,0 +1,9 @@ +#include "services.h" +#include "commands.h" +#include "language.h" +#include "modules.h" +#include "depricated.h" + +#define MOD_UNIQUE 0 +#define MOD_HEAD 1 +#define MOD_TAIL 2 diff --git a/include/modules.h b/include/modules.h index 0a00b4e2f..c2abd3279 100644 --- a/include/modules.h +++ b/include/modules.h @@ -96,11 +96,15 @@ typedef void * ano_module_t; #endif /*************************************************************************/ +typedef enum { CORE,PROTOCOL,THIRD,SUPPORTED,QATESTED } MODType; + +/*************************************************************************/ /* Structure for information about a *Serv command. */ typedef struct Command_ Command; typedef struct CommandHash_ CommandHash; typedef struct Module_ Module; +typedef struct ModuleLang_ ModuleLang; typedef struct ModuleHash_ ModuleHash; typedef struct Message_ Message; typedef struct MessageHash_ MessageHash; @@ -118,8 +122,14 @@ extern MDE CommandHash *CHANSERV[MAX_CMD_HASH]; extern MDE CommandHash *HELPSERV[MAX_CMD_HASH]; extern MDE CommandHash *OPERSERV[MAX_CMD_HASH]; extern MDE MessageHash *IRCD[MAX_CMD_HASH]; -extern EvtMessageHash *EVENT[MAX_CMD_HASH]; -extern EvtHookHash *EVENTHOOKS[MAX_CMD_HASH]; +extern MDE ModuleHash *MODULE_HASH[MAX_CMD_HASH]; +extern MDE EvtMessageHash *EVENT[MAX_CMD_HASH]; +extern MDE EvtHookHash *EVENTHOOKS[MAX_CMD_HASH]; + +struct ModuleLang_ { + int argc; + char **argv; +}; struct Module_ { char *name; @@ -129,6 +139,8 @@ struct Module_ { char *version; |
