diff options
Diffstat (limited to 'src/protocol/unreal32.c')
-rw-r--r-- | src/protocol/unreal32.c | 1354 |
1 files changed, 677 insertions, 677 deletions
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c index 8f1a31549..ab52ddf43 100644 --- a/src/protocol/unreal32.c +++ b/src/protocol/unreal32.c @@ -85,381 +85,381 @@ #define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r IRCDVar myIrcd[] = { - {"UnrealIRCd 3.2.x", /* ircd name */ - "+Soi", /* Modes used by pseudoclients */ - 5, /* Chan Max Symbols */ - "-cilmnpstuzACGHKMNOQRSTV", /* Modes to Remove */ - "+ao", /* Channel Umode used by Botserv bots */ - 1, /* SVSNICK */ - 1, /* Vhost */ - 1, /* Has Owner */ - "+q", /* Mode to set for an owner */ - "-q", /* Mode to unset for an owner */ - "+a", /* Mode to set for channel admin */ - "-a", /* Mode to unset for channel admin */ - "+rd", /* Mode On Reg */ - NULL, /* Mode on ID for Roots */ - NULL, /* Mode on ID for Admins */ - NULL, /* Mode on ID for Opers */ - "-r+d", /* Mode on UnReg */ - "-r+d", /* Mode on Nick Change */ - 1, /* Supports SGlines */ - 1, /* Supports SQlines */ - 1, /* Supports SZlines */ - 1, /* Supports Halfop +h */ - 3, /* Number of server args */ - 0, /* Join 2 Set */ - 0, /* Join 2 Message */ - 1, /* Has exceptions +e */ - 1, /* TS Topic Forward */ - 0, /* TS Topci Backward */ - UMODE_S, /* Protected Umode */ - 0, /* Has Admin */ - 0, /* Chan SQlines */ - 0, /* Quit on Kill */ - 1, /* SVSMODE unban */ - 1, /* Has Protect */ - 1, /* Reverse */ - 1, /* Chan Reg */ - CMODE_r, /* Channel Mode */ - 1, /* vidents */ - 1, /* svshold */ - 1, /* time stamp on mode */ - 1, /* NICKIP */ - 1, /* O:LINE */ - 1, /* UMODE */ - 1, /* VHOST ON NICK */ - 1, /* Change RealName */ - CMODE_K, /* No Knock */ - CMODE_A, /* Admin Only */ - DEFAULT_MLOCK, /* Default MLOCK */ - UMODE_x, /* Vhost Mode */ - 1, /* +f */ - 1, /* +L */ - CMODE_f, /* +f Mode */ - CMODE_L, /* +L Mode */ - 0, /* On nick change check if they could be identified */ - 1, /* No Knock requires +i */ - NULL, /* CAPAB Chan Modes */ - 1, /* We support Unreal TOKENS */ - 1, /* TIME STAMPS are BASE64 */ - 1, /* +I support */ - '&', /* SJOIN ban char */ - '\"', /* SJOIN except char */ - '\'', /* SJOIN invite char */ - 1, /* Can remove User Channel Modes with SVSMODE */ - 0, /* Sglines are not enforced until user reconnects */ - "x", /* vhost char */ - 0, /* ts6 */ - 1, /* support helper umode */ - 0, /* p10 */ - NULL, /* character set */ - 1, /* reports sync state */ - 0, /* CIDR channelbans */ - "$", /* TLD Prefix for Global */ - } - , - {NULL} + {"UnrealIRCd 3.2.x", /* ircd name */ + "+Soi", /* Modes used by pseudoclients */ + 5, /* Chan Max Symbols */ + "-cilmnpstuzACGHKMNOQRSTV", /* Modes to Remove */ + "+ao", /* Channel Umode used by Botserv bots */ + 1, /* SVSNICK */ + 1, /* Vhost */ + 1, /* Has Owner */ + "+q", /* Mode to set for an owner */ + "-q", /* Mode to unset for an owner */ + "+a", /* Mode to set for channel admin */ + "-a", /* Mode to unset for channel admin */ + "+rd", /* Mode On Reg */ + NULL, /* Mode on ID for Roots */ + NULL, /* Mode on ID for Admins */ + NULL, /* Mode on ID for Opers */ + "-r+d", /* Mode on UnReg */ + "-r+d", /* Mode on Nick Change */ + 1, /* Supports SGlines */ + 1, /* Supports SQlines */ + 1, /* Supports SZlines */ + 1, /* Supports Halfop +h */ + 3, /* Number of server args */ + 0, /* Join 2 Set */ + 0, /* Join 2 Message */ + 1, /* Has exceptions +e */ + 1, /* TS Topic Forward */ + 0, /* TS Topci Backward */ + UMODE_S, /* Protected Umode */ + 0, /* Has Admin */ + 0, /* Chan SQlines */ + 0, /* Quit on Kill */ + 1, /* SVSMODE unban */ + 1, /* Has Protect */ + 1, /* Reverse */ + 1, /* Chan Reg */ + CMODE_r, /* Channel Mode */ + 1, /* vidents */ + 1, /* svshold */ + 1, /* time stamp on mode */ + 1, /* NICKIP */ + 1, /* O:LINE */ + 1, /* UMODE */ + 1, /* VHOST ON NICK */ + 1, /* Change RealName */ + CMODE_K, /* No Knock */ + CMODE_A, /* Admin Only */ + DEFAULT_MLOCK, /* Default MLOCK */ + UMODE_x, /* Vhost Mode */ + 1, /* +f */ + 1, /* +L */ + CMODE_f, /* +f Mode */ + CMODE_L, /* +L Mode */ + 0, /* On nick change check if they could be identified */ + 1, /* No Knock requires +i */ + NULL, /* CAPAB Chan Modes */ + 1, /* We support Unreal TOKENS */ + 1, /* TIME STAMPS are BASE64 */ + 1, /* +I support */ + '&', /* SJOIN ban char */ + '\"', /* SJOIN except char */ + '\'', /* SJOIN invite char */ + 1, /* Can remove User Channel Modes with SVSMODE */ + 0, /* Sglines are not enforced until user reconnects */ + "x", /* vhost char */ + 0, /* ts6 */ + 1, /* support helper umode */ + 0, /* p10 */ + NULL, /* character set */ + 1, /* reports sync state */ + 0, /* CIDR channelbans */ + "$", /* TLD Prefix for Global */ + } + , + {NULL} }; IRCDCAPAB myIrcdcap[] = { - { - CAPAB_NOQUIT, /* NOQUIT */ - 0, /* TSMODE */ - 0, /* UNCONNECT */ - CAPAB_NICKIP, /* NICKIP */ - 0, /* SJOIN */ - CAPAB_ZIP, /* ZIP */ - 0, /* BURST */ - 0, /* TS5 */ - 0, /* TS3 */ - 0, /* DKEY */ - 0, /* PT4 */ - 0, /* SCS */ - 0, /* QS */ - 0, /* UID */ - 0, /* KNOCK */ - 0, /* CLIENT */ - 0, /* IPV6 */ - 0, /* SSJ5 */ - 0, /* SN2 */ - CAPAB_TOKEN, /* TOKEN */ - 0, /* VHOST */ - CAPAB_SSJ3, /* SSJ3 */ - CAPAB_NICK2, /* NICK2 */ - CAPAB_UMODE2, /* UMODE2 */ - CAPAB_VL, /* VL */ - CAPAB_TLKEXT, /* TLKEXT */ - 0, /* DODKEY */ - 0, /* DOZIP */ - CAPAB_CHANMODE, /* CHANMODE */ - CAPAB_SJB64, - CAPAB_NICKCHARS, - } + { + CAPAB_NOQUIT, /* NOQUIT */ + 0, /* TSMODE */ + 0, /* UNCONNECT */ + CAPAB_NICKIP, /* NICKIP */ + 0, /* SJOIN */ + CAPAB_ZIP, /* ZIP */ + 0, /* BURST */ + 0, /* TS5 */ + 0, /* TS3 */ + 0, /* DKEY */ + 0, /* PT4 */ + 0, /* SCS */ + 0, /* QS */ + 0, /* UID */ + 0, /* KNOCK */ + 0, /* CLIENT */ + 0, /* IPV6 */ + 0, /* SSJ5 */ + 0, /* SN2 */ + CAPAB_TOKEN, /* TOKEN */ + 0, /* VHOST */ + CAPAB_SSJ3, /* SSJ3 */ + CAPAB_NICK2, /* NICK2 */ + CAPAB_UMODE2, /* UMODE2 */ + CAPAB_VL, /* VL */ + CAPAB_TLKEXT, /* TLKEXT */ + 0, /* DODKEY */ + 0, /* DOZIP */ + CAPAB_CHANMODE, /* CHANMODE */ + CAPAB_SJB64, + CAPAB_NICKCHARS, + } }; unsigned long umodes[128] = { - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused, Unused, Horzontal Tab */ - 0, 0, 0, /* Line Feed, Unused, Unused */ - 0, 0, 0, /* Carriage Return, Unused, Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused */ - 0, 0, 0, /* Unused, Unused, Space */ - 0, 0, 0, /* ! " # */ - 0, 0, 0, /* $ % & */ - 0, 0, 0, /* ! ( ) */ - 0, 0, 0, /* * + , */ - 0, 0, 0, /* - . / */ - 0, 0, /* 0 1 */ - 0, 0, /* 2 3 */ - 0, 0, /* 4 5 */ - 0, 0, /* 6 7 */ - 0, 0, /* 8 9 */ - 0, 0, /* : ; */ - 0, 0, 0, /* < = > */ - 0, 0, /* ? @ */ - UMODE_A, UMODE_B, UMODE_C, /* A B C */ - 0, 0, 0, /* D E F */ - UMODE_G, UMODE_H, 0, /* G H I */ - 0, 0, 0, /* J K L */ - 0, UMODE_N, UMODE_O, /* M N O */ - 0, 0, UMODE_R, /* P Q R */ - UMODE_S, UMODE_T, 0, /* S T U */ - UMODE_V, UMODE_W, 0, /* V W X */ - 0, /* Y */ - 0, /* Z */ - 0, 0, 0, /* [ \ ] */ - 0, 0, 0, /* ^ _ ` */ - UMODE_a, 0, 0, /* a b c */ - UMODE_d, 0, 0, /* d e f */ - UMODE_g, UMODE_h, UMODE_i, /* g h i */ - 0, 0, 0, /* j k l */ - 0, 0, UMODE_o, /* m n o */ - UMODE_p, UMODE_q, UMODE_r, /* p q r */ - UMODE_s, UMODE_t, 0, /* s t u */ - UMODE_v, UMODE_w, UMODE_x, /* v w x */ - 0, /* y */ - UMODE_z, /* z */ - 0, 0, 0, /* { | } */ - 0, 0 /* ~ � */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused, Unused, Horzontal Tab */ + 0, 0, 0, /* Line Feed, Unused, Unused */ + 0, 0, 0, /* Carriage Return, Unused, Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused */ + 0, 0, 0, /* Unused, Unused, Space */ + 0, 0, 0, /* ! " # */ + 0, 0, 0, /* $ % & */ + 0, 0, 0, /* ! ( ) */ + 0, 0, 0, /* * + , */ + 0, 0, 0, /* - . / */ + 0, 0, /* 0 1 */ + 0, 0, /* 2 3 */ + 0, 0, /* 4 5 */ + 0, 0, /* 6 7 */ + 0, 0, /* 8 9 */ + 0, 0, /* : ; */ + 0, 0, 0, /* < = > */ + 0, 0, /* ? @ */ + UMODE_A, UMODE_B, UMODE_C, /* A B C */ + 0, 0, 0, /* D E F */ + UMODE_G, UMODE_H, 0, /* G H I */ + 0, 0, 0, /* J K L */ + 0, UMODE_N, UMODE_O, /* M N O */ + 0, 0, UMODE_R, /* P Q R */ + UMODE_S, UMODE_T, 0, /* S T U */ + UMODE_V, UMODE_W, 0, /* V W X */ + 0, /* Y */ + 0, /* Z */ + 0, 0, 0, /* [ \ ] */ + 0, 0, 0, /* ^ _ ` */ + UMODE_a, 0, 0, /* a b c */ + UMODE_d, 0, 0, /* d e f */ + UMODE_g, UMODE_h, UMODE_i, /* g h i */ + 0, 0, 0, /* j k l */ + 0, 0, UMODE_o, /* m n o */ + UMODE_p, UMODE_q, UMODE_r, /* p q r */ + UMODE_s, UMODE_t, 0, /* s t u */ + UMODE_v, UMODE_w, UMODE_x, /* v w x */ + 0, /* y */ + UMODE_z, /* z */ + 0, 0, 0, /* { | } */ + 0, 0 /* ~ � */ }; char myCsmodes[128] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, - 0, - 0, 0, 0, - 'h', /* (37) % Channel halfops */ - 'b', /* (38) & bans */ - 0, 0, 0, - 'q', + 0, + 0, + 0, 0, 0, + 'h', /* (37) % Channel halfops */ + 'b', /* (38) & bans */ + 0, 0, 0, + 'q', - 'v', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 'v', 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'a', 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'a', 0 }; CMMode myCmmodes[128] = { - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, /* BCD */ - {NULL}, {NULL}, {NULL}, /* EFG */ - {NULL}, /* H */ - {add_invite, del_invite}, /* I */ - {NULL}, /* J */ - {NULL}, {NULL}, {NULL}, /* KLM */ - {NULL}, {NULL}, {NULL}, /* NOP */ - {NULL}, {NULL}, {NULL}, /* QRS */ - {NULL}, {NULL}, {NULL}, /* TUV */ - {NULL}, {NULL}, {NULL}, /* WXY */ - {NULL}, /* Z */ - {NULL}, {NULL}, /* (char 91 - 92) */ - {NULL}, {NULL}, {NULL}, /* (char 93 - 95) */ - {NULL}, /* ` (char 96) */ - {NULL}, /* a (char 97) */ - {add_ban, del_ban}, /* b */ - {NULL}, {NULL}, /* cd */ - {add_exception, del_exception}, - {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, - {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL} + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, /* BCD */ + {NULL}, {NULL}, {NULL}, /* EFG */ + {NULL}, /* H */ + {add_invite, del_invite}, /* I */ + {NULL}, /* J */ + {NULL}, {NULL}, {NULL}, /* KLM */ + {NULL}, {NULL}, {NULL}, /* NOP */ + {NULL}, {NULL}, {NULL}, /* QRS */ + {NULL}, {NULL}, {NULL}, /* TUV */ + {NULL}, {NULL}, {NULL}, /* WXY */ + {NULL}, /* Z */ + {NULL}, {NULL}, /* (char 91 - 92) */ + {NULL}, {NULL}, {NULL}, /* (char 93 - 95) */ + {NULL}, /* ` (char 96) */ + {NULL}, /* a (char 97) */ + {add_ban, del_ban}, /* b */ + {NULL}, {NULL}, /* cd */ + {add_exception, del_exception}, + {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, + {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL} }; CBMode myCbmodes[128] = { - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, - {CMODE_A, CBM_NO_USER_MLOCK, NULL, NULL}, - {0}, /* B */ - {CMODE_C, 0, NULL, NULL}, /* C */ - {0}, /* D */ - {0}, /* E */ - {0}, /* F */ - {CMODE_G, 0, NULL, NULL}, /* G */ - {0}, /* H */ - {0}, /* I */ - {0}, /* J */ - {CMODE_K, 0, NULL, NULL}, /* K */ - {CMODE_L, 0, set_redirect, cs_set_redirect}, - {CMODE_M, 0, NULL, NULL}, /* M */ - {CMODE_N, 0, NULL, NULL}, /* N */ - {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL}, - {0}, /* P */ - {CMODE_Q, 0, NULL, NULL}, /* Q */ - {CMODE_R, 0, NULL, NULL}, /* R */ - {CMODE_S, 0, NULL, NULL}, /* S */ - {CMODE_T, 0, NULL, NULL}, /* T */ - {0}, /* U */ - {CMODE_V, 0, NULL, NULL}, /* V */ - {0}, /* W */ - {0}, /* X */ - {0}, /* Y */ - {0}, /* Z */ - {0}, {0}, {0}, {0}, {0}, {0}, - {0}, /* a */ - {0}, /* b */ - {CMODE_c, 0, NULL, NULL}, - {0}, /* d */ - {0}, /* e */ - {CMODE_f, 0, set_flood, cs_set_flood}, - {0}, /* g */ - {0}, /* h */ - {CMODE_i, 0, NULL, NULL}, - {0}, /* j */ - {CMODE_k, 0, chan_set_key, cs_set_key}, - {CMODE_l, CBM_MINUS_NO_ARG, set_limit, cs_set_limit}, - {CMODE_m, 0, NULL, NULL}, - {CMODE_n, 0, NULL, NULL}, - {0}, /* o */ - {CMODE_p, 0, NULL, NULL}, - {0}, /* q */ - {CMODE_r, CBM_NO_MLOCK, NULL, NULL}, - {CMODE_s, 0, NULL, NULL}, - {CMODE_t, 0, NULL, NULL}, - {CMODE_u, 0, NULL, NULL}, - {0}, /* v */ - {0}, /* w */ - {0}, /* x */ - {0}, /* y */ - {CMODE_z, 0, NULL, NULL}, - {0}, {0}, {0}, {0} + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, + {CMODE_A, CBM_NO_USER_MLOCK, NULL, NULL}, + {0}, /* B */ + {CMODE_C, 0, NULL, NULL}, /* C */ + {0}, /* D */ + {0}, /* E */ + {0}, /* F */ + {CMODE_G, 0, NULL, NULL}, /* G */ + {0}, /* H */ + {0}, /* I */ + {0}, /* J */ + {CMODE_K, 0, NULL, NULL}, /* K */ + {CMODE_L, 0, set_redirect, cs_set_redirect}, + {CMODE_M, 0, NULL, NULL}, /* M */ + {CMODE_N, 0, NULL, NULL}, /* N */ + {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL}, + {0}, /* P */ + {CMODE_Q, 0, NULL, NULL}, /* Q */ + {CMODE_R, 0, NULL, NULL}, /* R */ + {CMODE_S, 0, NULL, NULL}, /* S */ + {CMODE_T, 0, NULL, NULL}, /* T */ + {0}, /* U */ + {CMODE_V, 0, NULL, NULL}, /* V */ + {0}, /* W */ + {0}, /* X */ + {0}, /* Y */ + {0}, /* Z */ + {0}, {0}, {0}, {0}, {0}, {0}, + {0}, /* a */ + {0}, /* b */ + {CMODE_c, 0, NULL, NULL}, + {0}, /* d */ + {0}, /* e */ + {CMODE_f, 0, set_flood, cs_set_flood}, + {0}, /* g */ + {0}, /* h */ + {CMODE_i, 0, NULL, NULL}, + {0}, /* j */ + {CMODE_k, 0, chan_set_key, cs_set_key}, + {CMODE_l, CBM_MINUS_NO_ARG, set_limit, cs_set_limit}, + {CMODE_m, 0, NULL, NULL}, + {CMODE_n, 0, NULL, NULL}, + {0}, /* o */ + {CMODE_p, 0, NULL, NULL}, + {0}, /* q */ + {CMODE_r, CBM_NO_MLOCK, NULL, NULL}, + {CMODE_s, 0, NULL, NULL}, + {CMODE_t, 0, NULL, NULL}, + {CMODE_u, 0, NULL, NULL}, + {0}, /* v */ + {0}, /* w */ + {0}, /* x */ + {0}, /* y */ + {CMODE_z, 0, NULL, NULL}, + {0}, {0}, {0}, {0} }; CBModeInfo myCbmodeinfos[] = { - {'c', CMODE_c, 0, NULL, NULL}, - {'f', CMODE_f, 0, get_flood, cs_get_flood}, - {'i', CMODE_i, 0, NULL, NULL}, - {'k', CMODE_k, 0, get_key, cs_get_key}, - {'l', CMODE_l, CBM_MINUS_NO_ARG, get_limit, cs_get_limit}, - {'m', CMODE_m, 0, NULL, NULL}, - {'n', CMODE_n, 0, NULL, NULL}, - {'p', CMODE_p, 0, NULL, NULL}, - {'r', CMODE_r, 0, NULL, NULL}, - {'s', CMODE_s, 0, NULL, NULL}, - {'t', CMODE_t, 0, NULL, NULL}, - {'u', CMODE_u, 0, NULL, NULL}, - {'z', CMODE_z, 0, NULL, NULL}, - {'A', CMODE_A, 0, NULL, NULL}, - {'C', CMODE_C, 0, NULL, NULL}, - {'G', CMODE_G, 0, NULL, NULL}, - {'K', CMODE_K, 0, NULL, NULL}, - {'L', CMODE_L, 0, get_redirect, cs_get_redirect}, - {'M', CMODE_M, 0, NULL, NULL}, - {'N', CMODE_N, 0, NULL, NULL}, - {'O', CMODE_O, 0, NULL, NULL}, - {'Q', CMODE_Q, 0, NULL, NULL}, - {'R', CMODE_R, 0, NULL, NULL}, - {'S', CMODE_S, 0, NULL, NULL}, - {'T', CMODE_T, 0, NULL, NULL}, - {'V', CMODE_V, 0, NULL, NULL}, - {0} + {'c', CMODE_c, 0, NULL, NULL}, + {'f', CMODE_f, 0, get_flood, cs_get_flood}, + {'i', CMODE_i, 0, NULL, NULL}, + {'k', CMODE_k, 0, get_key, cs_get_key}, + {'l', CMODE_l, CBM_MINUS_NO_ARG, get_limit, cs_get_limit}, + {'m', CMODE_m, 0, NULL, NULL}, + {'n', CMODE_n, 0, NULL, NULL}, + {'p', CMODE_p, 0, NULL, NULL}, + {'r', CMODE_r, 0, NULL, NULL}, + {'s', CMODE_s, 0, NULL, NULL}, + {'t', CMODE_t, 0, NULL, NULL}, + {'u', CMODE_u, 0, NULL, NULL}, + {'z', CMODE_z, 0, NULL, NULL}, + {'A', CMODE_A, 0, NULL, NULL}, + {'C', CMODE_C, 0, NULL, NULL}, + {'G', CMODE_G, 0, NULL, NULL}, + {'K', CMODE_K, 0, NULL, NULL}, + {'L', CMODE_L, 0, get_redirect, cs_get_redirect}, + {'M', CMODE_M, 0, NULL, NULL}, + {'N', CMODE_N, 0, NULL, NULL}, + {'O', CMODE_O, 0, NULL, NULL}, + {'Q', CMODE_Q, 0, NULL, NULL}, + {'R', CMODE_R, 0, NULL, NULL}, + {'S', CMODE_S, 0, NULL, NULL}, + {'T', CMODE_T, 0, NULL, NULL}, + {'V', CMODE_V, 0, NULL, NULL}, + {0} }; CUMode myCumodes[128] = { - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, - - {0}, - - {CUS_PROTECT, CUF_PROTECT_BOTSERV, check_valid_op}, - {0}, /* b */ - {0}, /* c */ - {0}, /* d */ - {0}, /* e */ - {0}, /* f */ - {0}, /* g */ - {CUS_HALFOP, 0, check_valid_op}, - {0}, /* i */ - {0}, /* j */ - {0}, /* k */ - {0}, /* l */ - {0}, /* m */ - {0}, /* n */ - {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op}, - {0}, /* p */ - {CUS_OWNER, 0, check_valid_op}, - {0}, /* r */ - {0}, /* s */ - {0}, /* t */ - {0}, /* u */ - {CUS_VOICE, 0, NULL}, - {0}, /* w */ - {0}, /* x */ - {0}, /* y */ - {0}, /* z */ - {0}, {0}, {0}, {0}, {0} + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, + + {0}, + + {CUS_PROTECT, CUF_PROTECT_BOTSERV, check_valid_op}, + {0}, /* b */ + {0}, /* c */ + {0}, /* d */ + {0}, /* e */ + {0}, /* f */ + {0}, /* g */ + {CUS_HALFOP, 0, check_valid_op}, + {0}, /* i */ + {0}, /* j */ + {0}, /* k */ + {0}, /* l */ + {0}, /* m */ + {0}, /* n */ + {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op}, + {0}, /* p */ + {CUS_OWNER, 0, check_valid_op}, + {0}, /* r */ + {0}, /* s */ + {0}, /* t */ + {0}, /* u */ + {CUS_VOICE, 0, NULL}, + {0}, /* w */ + {0}, /* x */ + {0}, /* y */ + {0}, /* z */ + {0}, {0}, {0}, {0}, {0} }; @@ -470,26 +470,26 @@ CUMode myCumodes[128] = { */ void unreal_cmd_svswatch(const char *sender, const char *nick, const char *parm) { - send_cmd(sender, "Bw %s :%s", nick, parm); + send_cmd(sender, "Bw %s :%s", nick, parm); } void unreal_cmd_netinfo(int ac, const char **av) { - send_cmd(NULL, "AO %ld %ld %d %s 0 0 0 :%s", (long int) maxusercnt, (long int) time(NULL), atoi(av[2]), av[3], av[7]); + send_cmd(NULL, "AO %ld %ld %d %s 0 0 0 :%s", (long int) maxusercnt, (long int) time(NULL), atoi(av[2]), av[3], av[7]); } /* PROTOCTL */ /* NICKv2 = Nick Version 2 - VHP = Sends hidden host + VHP = Sends hidden host UMODE2 = sends UMODE2 on user modes NICKIP = Sends IP on NICK TOKEN = Use tokens to talk - SJ3 = Supports SJOIN + SJ3 = Supports SJOIN NOQUIT = No Quit TKLEXT = Extended TKL we don't use it but best to have it SJB64 = Base64 encoded time stamps - VL = Version Info - NS = Numeric Server + VL = Version Info + NS = Numeric Server */ void unreal_cmd_capab() @@ -507,25 +507,25 @@ void unreal_cmd_capab() /* PASS */ void unreal_cmd_pass(const char *pass) { - send_cmd(NULL, "PASS :%s", pass); + send_cmd(NULL, "PASS :%s", pass); } /* CHGHOST */ void unreal_cmd_chghost(const char *nick, const char *vhost) { - if (!nick || !vhost) { - return; - } - send_cmd(ServerName, "AL %s %s", nick, vhost); + if (!nick || !vhost) { + return; + } + send_cmd(ServerName, "AL %s %s", nick, vhost); } /* CHGIDENT */ void unreal_cmd_chgident(const char *nick, const char *vIdent) { - if (!nick || !vIdent) { - return; - } - send_cmd(ServerName, "AZ %s %s", nick, vIdent); + if (!nick || !vIdent) { + return; + } + send_cmd(ServerName, "AZ %s %s", nick, vIdent); } @@ -715,9 +715,9 @@ class UnrealIRCdProto : public IRCDProto /* ** svso - ** parv[0] = sender prefix - ** parv[1] = nick - ** parv[2] = options + ** parv[0] = sender prefix + ** parv[1] = nick + ** parv[2] = options */ void SendSVSO(const char *source, const char *nick, const char *flag) { @@ -927,17 +927,17 @@ class UnrealIRCdProto : public IRCDProto /* Event: PROTOCTL */ int anope_event_capab(const char *source, int ac, const char **av) { - capab_parse(ac, av); - return MOD_CONT; + capab_parse(ac, av); + return MOD_CONT; } /* Events */ int anope_event_ping(const char *source, int ac, const char **av) { - if (ac < 1) - return MOD_CONT; - ircdproto->SendPong(ac > 1 ? av[1] : ServerName, av[0]); - return MOD_CONT; + if (ac < 1) + return MOD_CONT; + ircdproto->SendPong(ac > 1 ? av[1] : ServerName, av[0]); + return MOD_CONT; } /* netinfo @@ -952,45 +952,45 @@ int anope_event_ping(const char *source, int ac, const char **av) */ int anope_event_netinfo(const char *source, int ac, const char **av) { - unreal_cmd_netinfo(ac, av); - return MOD_CONT; + unreal_cmd_netinfo(ac, av); + return MOD_CONT; } int anope_event_eos(const char *source, int ac, const char **av) { - Server *s; - s = findserver(servlist, source); - /* If we found a server with the given source, that one just - * finished bursting. If there was no source, then our uplink - * server finished bursting. -GD - */ - if (!s && serv_uplink) - s = serv_uplink; - finish_sync(s, 1); - return MOD_CONT; + Server *s; + s = findserver(servlist, source); + /* If we found a server with the given source, that one just + * finished bursting. If there was no source, then our uplink + * server finished bursting. -GD + */ + if (!s && serv_uplink) + s = serv_uplink; + finish_sync(s, 1); + return MOD_CONT; } int anope_event_436(const char *source, int ac, const char **av) { - if (ac < 1) - return MOD_CONT; + if (ac < 1) + return MOD_CONT; - m_nickcoll(av[0]); - return MOD_CONT; + m_nickcoll(av[0]); + return MOD_CONT; } /* ** away -** parv[0] = sender prefix -** parv[1] = away message +** parv[0] = sender prefix +** parv[1] = away message */ int anope_event_away(const char *source, int ac, const char **av) { - if (!source) { - return MOD_CONT; - } - m_away(source, (ac ? av[0] : NULL)); - return MOD_CONT; + if (!source) { + return MOD_CONT; + } + m_away(source, (ac ? av[0] : NULL)); + return MOD_CONT; } /* @@ -1007,426 +1007,426 @@ int anope_event_away(const char *source, int ac, const char **av) */ int anope_event_topic(const char *source, int ac, const char **av) { - if (ac != 4) - return MOD_CONT; - do_topic(source, ac, av); - return MOD_CONT; + if (ac != 4) + return MOD_CONT; + do_topic(source, ac, av); + return MOD_CONT; } int anope_event_squit(const char *source, int ac, const char **av) { - if (ac != 2) - return MOD_CONT; - do_squit(source, ac, av); - return MOD_CONT; + if (ac != 2) + return MOD_CONT; + do_squit(source, ac, av); + return MOD_CONT; } int anope_event_quit(const char *source, int ac, const char **av) { - if (ac != 1) - return MOD_CONT; - do_quit(source, ac, av); - return MOD_CONT; + if (ac != 1) + return MOD_CONT; + do_quit(source, ac, av); + return MOD_CONT; } int anope_event_mode(const char *source, int ac, const char **av) { - if (ac < 2) - return MOD_CONT; - - if (*av[0] == '#' || *av[0] == '&') { - do_cmode(source, ac, av); - } else { - do_umode(source, ac, av); - } - return MOD_CONT; + if (ac < 2) + return MOD_CONT; + + if (*av[0] == '#' || *av[0] == '&') { + do_cmode(source, ac, av); + } else { + do_umode(source, ac, av); + } + return MOD_CONT; } /* Unreal sends USER modes with this */ /* - umode2 - parv[0] - sender - parv[1] - modes to change + umode2 + parv[0] - sender + parv[1] - modes to change */ int anope_event_umode2(const char *source, int ac, const char **av) { - if (ac < 1) - return MOD_CONT; + if (ac < 1) + return MOD_CONT; - do_umode2(source, ac, av); - return MOD_CONT; + do_umode2(source, ac, av); + return MOD_CONT; } int anope_event_kill(const char *source, int ac, const char **av) { - if (ac != 2) - return MOD_CONT; + if (ac != 2) + return MOD_CONT; - m_kill(av[0], av[1]); - return MOD_CONT; + m_kill(av[0], av[1]); + return MOD_CONT; } int anope_event_kick(const char *source, int ac, const char **av) { - if (ac != 3) - return MOD_CONT; - do_kick(source, ac, av); - return MOD_CONT; + if (ac != 3) + return MOD_CONT; + do_kick(source, ac, av); + return MOD_CONT; } int anope_event_join(const char *source, int ac, const char **av) { - if (ac != 1) - return MOD_CONT; - do_join(source, ac, av); - return MOD_CONT; + if (ac != 1) + return MOD_CONT; + do_join(source, ac, av); + return MOD_CONT; } int anope_event_motd(const char *source, int ac, const char **av) { - if (!source) { - return MOD_CONT; - } + if (!source) { + return MOD_CONT; + } - m_motd(source); - return MOD_CONT; + m_motd(source); + return MOD_CONT; } int anope_event_setname(const char *source, int ac, const char **av) { - User *u; + User *u; - if (ac != 1) - return MOD_CONT; + if (ac != 1) + return MOD_CONT; - u = finduser(source); - if (!u) { - if (debug) { - alog("debug: SETNAME for nonexistent user %s", source); - } - return MOD_CONT; - } + u = finduser(source); + if (!u) { + if (debug) { + alog("debug: SETNAME for nonexistent user %s", source); + } + return MOD_CONT; + } - u->SetRealname(av[0]); - return MOD_CONT; + u->SetRealname(av[0]); + return MOD_CONT; } int anope_event_chgname(const char *source, int ac, const char **av) { - User *u; + User *u; - if (ac != 2) - return MOD_CONT; + if (ac != 2) + return MOD_CONT; - u = finduser(av[0]); - if (!u) { - if (debug) { - alog("debug: CHGNAME for nonexistent user %s", av[0]); - } - return MOD_CONT; - } + u = finduser(av[0]); + if (!u) { + if (debug) { + alog("debug: CHGNAME for nonexistent user %s", av[0]); + } + return MOD_CONT; + } - u->SetRealname(av[1]); - return MOD_CONT; + u->SetRealname(av[1]); + return MOD_CONT; } int anope_event_setident(const char *source, int ac, const char **av) { - User *u; + User *u; - if (ac != 1) - return MOD_CONT; + if (ac != 1) + return MOD_CONT; - u = finduser(source); - if (!u) { - if (debug) { - alog("debug: SETIDENT for nonexistent user %s", source); - } - return MOD_CONT; - } + u = finduser(source); + if (!u) { + if (debug) { + alog("debug: SETIDENT for nonexistent user %s", source); + } + return MOD_CONT; + } - u->SetIdent(av[0]); - return MOD_CONT; + u->SetIdent(av[0]); + return MOD_CONT; } int anope_event_chgident(const char *source, int ac, const char **av) { - User *u; + User *u; - if (ac != 2) - return MOD_CONT; + if (ac != 2) + return MOD_CONT; - u = finduser(av[0]); - if (!u) { - if (debug) { - alog("debug: CHGIDENT for nonexistent user %s", av[0]); - } - return MOD_CONT; - } + u = finduser(av[0]); + if (!u) { + if (debug) { + alog("debug: CHGIDENT for nonexistent user %s", av[0]); + } + return MOD_CONT; + } - u->SetIdent(av[1]); - return MOD_CONT; + u->SetIdent(av[1]); + return MOD_CONT; } int anope_event_sethost(const char *source, int ac, const char **av) { - User *u; + User *u; - if (ac != 1) - return MOD_CONT; + if (ac != 1) + return MOD_CONT; - u = finduser(source); - if (!u) { - if (debug) { - alog("debug: SETHOST for nonexistent user %s", source); - } - return MOD_CONT; - } + u = finduser(source); + if (!u) { + if (debug) { + alog("debug: SETHOST for nonexistent user %s", source); + } + return MOD_CONT; + } - u->SetDisplayedHost(av[0]); - return MOD_CONT; + u->SetDisplayedHost(av[0]); + return MOD_CONT; } /* ** NICK - new -** source = NULL +** source = NULL ** parv[0] = nickname -** parv[1] = hopcount -** parv[2] = timestamp -** parv[3] = username -** parv[4] = hostname -** parv[5] = servername +** parv[1] = hopcount +** parv[2] = timestamp +** parv[3] = username +** parv[4] = hostname +** parv[5] = servername ** if NICK version 1: -** parv[6] = servicestamp +** parv[6] = servicestamp ** parv[7] = info ** if NICK version 2: ** parv[6] = servicestamp -** parv[7] = umodes +** parv[7] = umodes ** parv[8] = virthost, * if none ** parv[9] = info ** if NICKIP: -** parv[9] = ip -** parv[10] = info +** parv[9] = ip +** parv[10] = info ** ** NICK - change -** source = oldnick +** source = oldnick ** parv[0] = new nickname -** parv[1] = hopcount +** parv[1] = hopcount */ /* do_nick(const char *source, char *nick, char *username, char *host, - char *server, char *realname, time_t ts, uint32 svid, - uint32 ip, char *vhost, char *uid) + char *server, char *realname, time_t ts, uint32 svid, + uint32 ip, char *vhost, char *uid) */ int anope_event_nick(const char *source, int ac, const char **av) { - User *user; - - if (ac != 2) { - if (ac == 7) { - /* - <codemastr> that was a bug that is now fixed in 3.2.1 - <codemastr> in some instances it would use the non-nickv2 format - <codemastr> it's sent when a nick collision occurs - - so we have to leave it around for now -TSL - */ - do_nick(source, av[0], av[3], av[4], av[5], av[6], - strtoul(av[2], NULL, 10), 0, 0, "*", NULL); - - } else if (ac == 11) { - user = do_nick(source, av[0], av[3], av[4], av[5], av[10], - strtoul(av[2], NULL, 10), strtoul(av[6], NULL, - 0), - ntohl(decode_ip(av[9])), av[8], NULL); - if (user) - ircdproto->ProcessUsermodes(user, 1, &av[7]); - - } else { - /* NON NICKIP */ - user = do_nick(source, av[0], av[3], av[4], av[5], av[9], - strtoul(av[2], NULL, 10), strtoul(av[6], NULL, - 0), 0, av[8], - NULL); - if (user) - ircdproto->ProcessUsermodes(user, 1, &av[7]); - } - } else { - do_nick(source, av[0], NULL, NULL, NULL, NULL, - strtoul(av[1], NULL, 10), 0, 0, NULL, NULL); - } - return MOD_CONT; + User *user; + + if (ac != 2) { + if (ac == 7) { + /* + <codemastr> that was a bug that is now fixed in 3.2.1 + <codemastr> in some instances it would use the non-nickv2 format + <codemastr> it's sent when a nick collision occurs + - so we have to leave it around for now -TSL + */ + do_nick(source, av[0], av[3], av[4], av[5], av[6], + strtoul(av[2], NULL, 10), 0, 0, "*", NULL); + + } else if (ac == 11) { + user = do_nick(source, av[0], av[3], av[4], av[5], av[10], + strtoul(av[2], NULL, 10), strtoul(av[6], NULL, + 0), + ntohl(decode_ip(av[9])), av[8], NULL); + if (user) + ircdproto->ProcessUsermodes(user, 1, &av[7]); + + } else { + /* NON NICKIP */ + user = do_nick(source, av[0], av[3], av[4], av[5], av[9], + strtoul(av[2], NULL, 10), strtoul(av[6], NULL, + 0), 0, av[8], + NULL); + if (user) + ircdproto->ProcessUsermodes(user, 1, &av[7]); + } + } else { + do_nick(source, av[0], NULL, NULL, NULL, NULL, + strtoul(av[1], NULL, 10), 0, 0, NULL, NULL); + } + return MOD_CONT; } int anope_event_chghost(const char *source, int ac, const char **av) { - User *u; + User *u; - if (ac != 2) - return MOD_CONT; + if (ac != 2) + return MOD_CONT; - u = finduser(av[0]); - if (!u) { - if (debug) { - alog("debug: CHGHOST for nonexistent user %s", av[0]); - } - return MOD_CONT; - } + u = finduser(av[0]); + if (!u) { + if (debug) { + alog("debug: CHGHOST for nonexistent user %s", av[0]); + } + return MOD_CONT; + } - u->SetDisplayedHost(av[1]); - return MOD_CONT; + u->SetDisplayedHost(av[1]); + return MOD_CONT; } /* EVENT: SERVER */ int anope_event_server(const char *source, int ac, const char **av) { - char *desc; - char *vl; - char *upnumeric; - - if (!stricmp(av[1], "1")) { - uplink = sstrdup(av[0]); - vl = myStrGetToken(av[2], ' ', 0); - upnumeric = myStrGetToken(vl, '-', 2); - desc = myStrGetTokenRemainder(av[2], ' ', 1); - do_server(source, av[0], av[1], desc, upnumeric); - Anope_Free(vl); - Anope_Free(desc); - Anope_Free(upnumeric); - } else { - do_server(source, av[0], av[1], av[2], NULL); - } - - return MOD_CONT; + char *desc; + char *vl; + char *upnumeric; + + if (!stricmp(av[1], "1")) { + uplink = sstrdup(av[0]); + vl = myStrGetToken(av[2], ' ', 0); + upnumeric = myStrGetToken(vl, '-', 2); + desc = myStrGetTokenRemainder(av[2], ' ', 1); + do_server(source, av[0], av[1], desc, upnumeric); + Anope_Free(vl); + Anope_Free(desc); + Anope_Free(upnumeric); + } else { + do_server(source, av[0], av[1], av[2], NULL); + } + + return MOD_CONT; } int anope_event_privmsg(const char *source, int ac, const char **av) { - if (ac != 2) - return MOD_CONT; - m_privmsg(source, av[0], av[1]); - return MOD_CONT; + if (ac != 2) + return MOD_CONT; + m_privmsg(source, av[0], av[1]); + return MOD_CONT; } int anope_event_part(const char *source, int ac, const char **av) { - if (ac < 1 || ac > 2) - return MOD_CONT; - do_part(source, ac, av); - return MOD_CONT; + if (ac < 1 || ac > 2) + return MOD_CONT; + do_part(source, ac, av); + return MOD_CONT; } int anope_event_whois(const char *source, int ac, const char **av) { - if (source && ac >= 1) { - m_whois(source, av[0]); - } - return MOD_CONT; + if (source && ac >= 1) { + m_whois(source, av[0]); + } + return MOD_CONT; } int anope_event_error(const char *source, int ac, const char **av) { - if (av[0]) { - if (debug) { - alog("debug: %s", av[0]); - } + if (av[0]) { + if (debug) { + alog("debug: %s", av[0]); + } if(strstr(av[0],"No matching link configuration")!=0) { - alog("Error: Your IRCD's link block may not setup correctly, please check unrealircd.conf"); + alog("Error: Your IRCD's link block may not setup correctly, please check unrealircd.conf"); + } } - } - return MOD_CONT; + return MOD_CONT; } int anope_event_sdesc(const char *source, int ac, const char **av) { - Server *s; - s = findserver(servlist, source); + Server *s; + s = findserver(servlist, source); - if (s) { - s->desc = (char *)av[0]; // XXX Unsafe cast -- CyberBotX - } + if (s) { + s->desc = (char *)av[0]; // XXX Unsafe cast -- CyberBotX + } - return MOD_CONT; + return MOD_CONT; } int anope_event_sjoin(const char *source, int ac, const char **av) { - do_sjoin(source, ac, av); - return MOD_CONT; + do_sjoin(source, ac, av); + return MOD_CONT; } void moduleAddIRCDMsgs(void) { - Message *m; - - updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a"); - - m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m); - m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m); - m = createMessage("6", anope_event_away); addCoreMessage(IRCD,m); - m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m); - m = createMessage("C", anope_event_join); addCoreMessage(IRCD,m); - m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m); - m = createMessage("H", anope_event_kick); addCoreMessage(IRCD,m); - m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m); - m = createMessage(".", anope_event_kill); addCoreMessage(IRCD,m); - m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m); - m = createMessage("G", anope_event_mode); addCoreMessage(IRCD,m); - m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m); - m = createMessage("F", anope_event_motd); addCoreMessage(IRCD,m); - m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m); - m = createMessage("&", anope_event_nick); addCoreMessage(IRCD,m); - m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); - m = createMessage("D", anope_event_part); addCoreMessage(IRCD,m); - m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m); - m = createMessage("8", anope_event_ping); addCoreMessage(IRCD,m); - m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m); - m = createMessage("!", anope_event_privmsg); addCoreMessage(IRCD,m); - m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m); - m = createMessage(",", anope_event_quit); addCoreMessage(IRCD,m); - m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m); - m = createMessage("'", anope_event_server); addCoreMessage(IRCD,m); - m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m); - m = createMessage("-", anope_event_squit); addCoreMessage(IRCD,m); - m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m); - m = createMessage(")", anope_event_topic); addCoreMessage(IRCD,m); - m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m); - m = createMessage("n", anope_event_mode); addCoreMessage(IRCD,m); - m = createMessage("SVS2MODE", anope_event_mode); addCoreMessage(IRCD,m); - m = createMessage("v", anope_event_mode); addCoreMessage(IRCD,m); - m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m); - m = createMessage("#", anope_event_whois); addCoreMessage(IRCD,m); - m = createMessage("PROTOCTL", anope_event_capab); addCoreMessage(IRCD,m); - m = createMessage("_", anope_event_capab); addCoreMessage(IRCD,m); - m = createMessage("CHGHOST", anope_event_chghost); addCoreMessage(IRCD,m); - m = createMessage("AL", anope_event_chghost); addCoreMessage(IRCD,m); - m = createMessage("CHGIDENT", anope_event_chgident); addCoreMessage(IRCD,m); - m = createMessage("AZ", anope_event_chgident); addCoreMessage(IRCD,m); - m = createMessage("CHGNAME", anope_event_chgname); addCoreMessage(IRCD,m); - m = createMessage("BK", anope_event_chgname); addCoreMessage(IRCD,m); - m = createMessage("NETINFO", anope_event_netinfo); addCoreMessage(IRCD,m); - m = createMessage("AO", anope_event_netinfo); addCoreMessage(IRCD,m); - m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m); - m = createMessage("AA", anope_event_sethost); addCoreMessage(IRCD,m); - m = createMessage("SETIDENT", anope_event_setident); addCoreMessage(IRCD,m); - m = createMessage("AD", anope_event_setident); addCoreMessage(IRCD,m); - m = createMessage("SETNAME", anope_event_setname); addCoreMessage(IRCD,m); - m = createMessage("AE", anope_event_setname); addCoreMessage(IRCD,m); - m = createMessage("EOS", anope_event_eos); addCoreMessage(IRCD,m); - m = createMessage("ES", anope_event_eos); addCoreMessage(IRCD,m); - m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m); - m = createMessage("5", anope_event_error); addCoreMessage(IRCD,m); - m = createMessage("UMODE2", anope_event_umode2); addCoreMessage(IRCD,m); - m = createMessage("|", anope_event_umode2); addCoreMessage(IRCD,m); - m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m); - m = createMessage("~", anope_event_sjoin); addCoreMessage(IRCD,m); - m = createMessage("SDESC", anope_event_sdesc); addCoreMessage(IRCD,m); - m = createMessage("AG", anope_event_sdesc); addCoreMessage(IRCD,m); - - /* The non token version of these is in messages.c */ - m = createMessage("2", m_stats); addCoreMessage(IRCD,m); - m = createMessage(">", m_time); addCoreMessage(IRCD,m); - m = createMessage("+", m_version); addCoreMessage(IRCD,m); + Message *m; + + updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a"); + + m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m); + m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m); + m = createMessage("6", anope_event_away); addCoreMessage(IRCD,m); + m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m); + m = createMessage("C", anope_event_join); addCoreMessage(IRCD,m); + m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m); + m = createMessage("H", anope_event_kick); addCoreMessage(IRCD,m); + m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m); + m = createMessage(".", anope_event_kill); addCoreMessage(IRCD,m); + m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m); + m = createMessage("G", anope_event_mode); addCoreMessage(IRCD,m); + m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m); + m = createMessage("F", anope_event_motd); addCoreMessage(IRCD,m); + m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m); + m = createMessage("&", anope_event_nick); addCoreMessage(IRCD,m); + m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); + m = createMessage("D", anope_event_part); addCoreMessage(IRCD,m); + m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m); + m = createMessage("8", anope_event_ping); addCoreMessage(IRCD,m); + m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m); + m = createMessage("!", anope_event_privmsg); addCoreMessage(IRCD,m); + m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m); + m = createMessage(",", anope_event_quit); addCoreMessage(IRCD,m); + m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m); + m = createMessage("'", anope_event_server); addCoreMessage(IRCD,m); + m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m); + m = createMessage("-", anope_event_squit); addCoreMessage(IRCD,m); + m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m); + m = createMessage(")", anope_event_topic); addCoreMessage(IRCD,m); + m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m); + m = createMessage("n", anope_event_mode); addCoreMessage(IRCD,m); + m = createMessage("SVS2MODE", anope_event_mode); addCoreMessage(IRCD,m); + m = createMessage("v", anope_event_mode); addCoreMessage(IRCD,m); + m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m); + m = createMessage("#", anope_event_whois); addCoreMessage(IRCD,m); + m = createMessage("PROTOCTL", anope_event_capab); addCoreMessage(IRCD,m); + m = createMessage("_", anope_event_capab); addCoreMessage(IRCD,m); + m = createMessage("CHGHOST", anope_event_chghost); addCoreMessage(IRCD,m); + m = createMessage("AL", anope_event_chghost); addCoreMessage(IRCD,m); + m = createMessage("CHGIDENT", anope_event_chgident); addCoreMessage(IRCD,m); + m = createMessage("AZ", anope_event_chgident); addCoreMessage(IRCD,m); + m = createMessage("CHGNAME", anope_event_chgname); addCoreMessage(IRCD,m); + m = createMessage("BK", anope_event_chgname); addCoreMessage(IRCD,m); + m = createMessage("NETINFO", anope_event_netinfo); addCoreMessage(IRCD,m); + m = createMessage("AO", anope_event_netinfo); addCoreMessage(IRCD,m); + m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m); + m = createMessage("AA", anope_event_sethost); addCoreMessage(IRCD,m); + m = createMessage("SETIDENT", anope_event_setident); addCoreMessage(IRCD,m); + m = createMessage("AD", anope_event_setident); addCoreMessage(IRCD,m); + m = createMessage("SETNAME", anope_event_setname); addCoreMessage(IRCD,m); + m = createMessage("AE", anope_event_setname); addCoreMessage(IRCD,m); + m = createMessage("EOS", anope_event_eos); addCoreMessage(IRCD,m); + m = createMessage("ES", anope_event_eos); addCoreMessage(IRCD,m); + m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m); + m = createMessage("5", anope_event_error); addCoreMessage(IRCD,m); + m = createMessage("UMODE2", anope_event_umode2); addCoreMessage(IRCD,m); + m = createMessage("|", anope_event_umode2); addCoreMessage(IRCD,m); + m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m); + m = createMessage("~", anope_event_sjoin); addCoreMessage(IRCD,m); + m = createMessage("SDESC", anope_event_sdesc); addCoreMessage(IRCD,m); + m = createMessage("AG", anope_event_sdesc); addCoreMessage(IRCD,m); + + /* The non token version of these is in messages.c */ + m = createMessage("2", m_stats); addCoreMessage(IRCD,m); + m = createMessage(">", m_time); addCoreMessage(IRCD,m); + m = createMessage("+", m_version); addCoreMessage(IRCD,m); } |