summaryrefslogtreecommitdiff
path: root/src/protocol
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-14 20:57:20 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-14 20:57:20 +0000
commit6c55e0a529c7f1216ff6f63a4fc77ea06a2a3a38 (patch)
tree91b0841faf23087ebe0c74dd4269d181a383f1e7 /src/protocol
parent069409cd99cf78ab8bf87a1fe69a833576414fd3 (diff)
Insane commit of doom: s/ \t/g
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1681 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/bahamut.c1032
-rw-r--r--src/protocol/charybdis.c1416
-rw-r--r--src/protocol/inspircd11.c1530
-rw-r--r--src/protocol/inspircd12.cpp1282
-rw-r--r--src/protocol/obsolete/hybrid.c1854
-rw-r--r--src/protocol/obsolete/hybrid.h18
-rw-r--r--src/protocol/obsolete/plexus3.c700
-rw-r--r--src/protocol/obsolete/ptlink.c2010
-rw-r--r--src/protocol/obsolete/ptlink.h2
-rw-r--r--src/protocol/obsolete/rageircd.c2004
-rw-r--r--src/protocol/obsolete/rageircd.h2
-rw-r--r--src/protocol/obsolete/solidircd.c2006
-rw-r--r--src/protocol/obsolete/solidircd.h8
-rw-r--r--src/protocol/obsolete/ultimate3.c2188
-rw-r--r--src/protocol/obsolete/ultimate3.h4
-rw-r--r--src/protocol/obsolete/viagra.c1974
-rw-r--r--src/protocol/ratbox.c1364
-rw-r--r--src/protocol/unreal32.c1354
18 files changed, 10374 insertions, 10374 deletions
diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c
index d512f93c8..d26379aa9 100644
--- a/src/protocol/bahamut.c
+++ b/src/protocol/bahamut.c
@@ -55,415 +55,415 @@
#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_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
IRCDVar myIrcd[] = {
- {"Bahamut 1.8.x", /* ircd name */
- "+", /* Modes used by pseudoclients */
- 2, /* Chan Max Symbols */
- "-cilmnpstOR", /* Modes to Remove */
- "+o", /* Channel Umode used by Botserv bots */
- 1, /* SVSNICK */
- 0, /* Vhost */
- 0, /* Has Owner */
- NULL, /* Mode to set for an owner */
- NULL, /* Mode to unset for an owner */
- NULL, /* Mode to set for channel admin */
- NULL, /* 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 */
- "+d", /* Mode on Nick Change */
- 1, /* Supports SGlines */
- 1, /* Supports SQlines */
- 1, /* Supports SZlines */
- 0, /* Supports Halfop +h */
- 3, /* Number of server args */
- 0, /* Join 2 Set */
- 0, /* Join 2 Message */
- 1, /* Has exceptions +e */
- 0, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- 0, /* Protected Umode */
- 0, /* Has Admin */
- 1, /* Chan SQlines */
- 1, /* Quit on Kill */
- 1, /* SVSMODE unban */
- 0, /* Has Protect */
- 0, /* Reverse */
- 1, /* Chan Reg */
- CMODE_r, /* Channel Mode */
- 0, /* vidents */
- 1, /* svshold */
- 1, /* time stamp on mode */
- 1, /* NICKIP */
- 0, /* O:LINE */
- 1, /* UMODE */
- 0, /* VHOST ON NICK */
- 0, /* Change RealName */
- 0, /* No Knock */
- 0, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- 0, /* Vhost Mode */
- 1, /* +f */
- 0, /* +L */
- CMODE_j, /* Mode */
- 0, /* Mode */
- 1,
- 1, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support TOKENS */
- 0, /* TIME STAMPS are BASE64 */
- 1, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* Can remove User Channel Modes with SVSMODE */
- 0, /* Sglines are not enforced until user reconnects */
- NULL, /* 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}
+ {"Bahamut 1.8.x", /* ircd name */
+ "+", /* Modes used by pseudoclients */
+ 2, /* Chan Max Symbols */
+ "-cilmnpstOR", /* Modes to Remove */
+ "+o", /* Channel Umode used by Botserv bots */
+ 1, /* SVSNICK */
+ 0, /* Vhost */
+ 0, /* Has Owner */
+ NULL, /* Mode to set for an owner */
+ NULL, /* Mode to unset for an owner */
+ NULL, /* Mode to set for channel admin */
+ NULL, /* 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 */
+ "+d", /* Mode on Nick Change */
+ 1, /* Supports SGlines */
+ 1, /* Supports SQlines */
+ 1, /* Supports SZlines */
+ 0, /* Supports Halfop +h */
+ 3, /* Number of server args */
+ 0, /* Join 2 Set */
+ 0, /* Join 2 Message */
+ 1, /* Has exceptions +e */
+ 0, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ 0, /* Protected Umode */
+ 0, /* Has Admin */
+ 1, /* Chan SQlines */
+ 1, /* Quit on Kill */
+ 1, /* SVSMODE unban */
+ 0, /* Has Protect */
+ 0, /* Reverse */
+ 1, /* Chan Reg */
+ CMODE_r, /* Channel Mode */
+ 0, /* vidents */
+ 1, /* svshold */
+ 1, /* time stamp on mode */
+ 1, /* NICKIP */
+ 0, /* O:LINE */
+ 1, /* UMODE */
+ 0, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ 0, /* No Knock */
+ 0, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ 0, /* Vhost Mode */
+ 1, /* +f */
+ 0, /* +L */
+ CMODE_j, /* Mode */
+ 0, /* Mode */
+ 1,
+ 1, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support TOKENS */
+ 0, /* TIME STAMPS are BASE64 */
+ 1, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* Can remove User Channel Modes with SVSMODE */
+ 0, /* Sglines are not enforced until user reconnects */
+ NULL, /* 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 */
- CAPAB_TSMODE, /* TSMODE */
- CAPAB_UNCONNECT, /* UNCONNECT */
- 0, /* NICKIP */
- 0, /* SJOIN */
- 0, /* ZIP */
- CAPAB_BURST, /* BURST */
- 0, /* TS5 */
- 0, /* TS3 */
- CAPAB_DKEY, /* DKEY */
- 0, /* PT4 */
- 0, /* SCS */
- 0, /* QS */
- 0, /* UID */
- 0, /* KNOCK */
- 0, /* CLIENT */
- 0, /* IPV6 */
- 0, /* SSJ5 */
- 0, /* SN2 */
- 0, /* TOKEN */
- 0, /* VHOST */
- 0, /* SSJ3 */
- 0, /* NICK2 */
- 0, /* UMODE2 */
- 0, /* VL */
- 0, /* TLKEXT */
- 0, /* DODKEY */
- CAPAB_DOZIP, /* DOZIP */
- 0, 0, 0}
+ {
+ CAPAB_NOQUIT, /* NOQUIT */
+ CAPAB_TSMODE, /* TSMODE */
+ CAPAB_UNCONNECT, /* UNCONNECT */
+ 0, /* NICKIP */
+ 0, /* SJOIN */
+ 0, /* ZIP */
+ CAPAB_BURST, /* BURST */
+ 0, /* TS5 */
+ 0, /* TS3 */
+ CAPAB_DKEY, /* DKEY */
+ 0, /* PT4 */
+ 0, /* SCS */
+ 0, /* QS */
+ 0, /* UID */
+ 0, /* KNOCK */
+ 0, /* CLIENT */
+ 0, /* IPV6 */
+ 0, /* SSJ5 */
+ 0, /* SN2 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ 0, /* SSJ3 */
+ 0, /* NICK2 */
+ 0, /* UMODE2 */
+ 0, /* VL */
+ 0, /* TLKEXT */
+ 0, /* DODKEY */
+ CAPAB_DOZIP, /* DOZIP */
+ 0, 0, 0}
};
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, 0, 0, /* A B C */
- UMODE_D, 0, UMODE_F, /* D E F */
- 0, 0, UMODE_I, /* G H I */
- 0, UMODE_K, 0, /* J K L */
- 0, 0, UMODE_O, /* M N O */
- 0, 0, UMODE_R, /* P Q R */
- 0, 0, 0, /* S T U */
- 0, 0, UMODE_X, /* V W X */
- 0, /* Y */
- 0, /* Z */
- 0, 0, 0, /* [ \ ] */
- 0, 0, 0, /* ^ _ ` */
- UMODE_a, UMODE_b, UMODE_c, /* a b c */
- UMODE_d, UMODE_e, UMODE_f, /* d e f */
- UMODE_g, UMODE_h, UMODE_i, /* g h i */
- UMODE_j, UMODE_k, 0, /* j k l */
- UMODE_m, UMODE_n, UMODE_o, /* m n o */
- 0, 0, UMODE_r, /* p q r */
- UMODE_s, 0, 0, /* s t u */
- 0, UMODE_w, UMODE_x, /* v w x */
- UMODE_y, /* y */
- 0, /* 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, 0, 0, /* A B C */
+ UMODE_D, 0, UMODE_F, /* D E F */
+ 0, 0, UMODE_I, /* G H I */
+ 0, UMODE_K, 0, /* J K L */
+ 0, 0, UMODE_O, /* M N O */
+ 0, 0, UMODE_R, /* P Q R */
+ 0, 0, 0, /* S T U */
+ 0, 0, UMODE_X, /* V W X */
+ 0, /* Y */
+ 0, /* Z */
+ 0, 0, 0, /* [ \ ] */
+ 0, 0, 0, /* ^ _ ` */
+ UMODE_a, UMODE_b, UMODE_c, /* a b c */
+ UMODE_d, UMODE_e, UMODE_f, /* d e f */
+ UMODE_g, UMODE_h, UMODE_i, /* g h i */
+ UMODE_j, UMODE_k, 0, /* j k l */
+ UMODE_m, UMODE_n, UMODE_o, /* m n o */
+ 0, 0, UMODE_r, /* p q r */
+ UMODE_s, 0, 0, /* s t u */
+ 0, UMODE_w, UMODE_x, /* v w x */
+ UMODE_y, /* y */
+ 0, /* 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,
- 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,
+ '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, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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},
- {0}, /* A */
- {0}, /* B */
- {0}, /* C */
- {0}, /* D */
- {0}, /* E */
- {0}, /* F */
- {0}, /* G */
- {0}, /* H */
- {0}, /* I */
- {0}, /* J */
- {0}, /* K */
- {0}, /* L */
- {CMODE_M, 0, NULL, NULL}, /* M */
- {0}, /* N */
- {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
- {0}, /* P */
- {0}, /* Q */
- {CMODE_R, 0, NULL, NULL}, /* R */
- {0}, /* S */
- {0}, /* T */
- {0}, /* U */
- {0}, /* 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 */
- {0}, /* f */
- {0}, /* g */
- {0}, /* h */
- {CMODE_i, 0, NULL, NULL},
- {CMODE_j, 0, set_flood, cs_set_flood}, /* 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},
- {0},
- {0}, /* v */
- {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}, /* A */
+ {0}, /* B */
+ {0}, /* C */
+ {0}, /* D */
+ {0}, /* E */
+ {0}, /* F */
+ {0}, /* G */
+ {0}, /* H */
+ {0}, /* I */
+ {0}, /* J */
+ {0}, /* K */
+ {0}, /* L */
+ {CMODE_M, 0, NULL, NULL}, /* M */
+ {0}, /* N */
+ {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
+ {0}, /* P */
+ {0}, /* Q */
+ {CMODE_R, 0, NULL, NULL}, /* R */
+ {0}, /* S */
+ {0}, /* T */
+ {0}, /* U */
+ {0}, /* 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 */
+ {0}, /* f */
+ {0}, /* g */
+ {0}, /* h */
+ {CMODE_i, 0, NULL, NULL},
+ {CMODE_j, 0, set_flood, cs_set_flood}, /* 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},
+ {0},
+ {0}, /* v */
+ {0}, /* w */
+ {0}, /* x */
+ {0}, /* y */
+ {0}, /* z */
+ {0}, {0}, {0}, {0}
};
CBModeInfo myCbmodeinfos[] = {
- {'c', CMODE_c, 0, NULL, NULL},
- {'i', CMODE_i, 0, NULL, NULL},
- {'j', CMODE_j, 0, get_flood, cs_get_flood},
- {'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},
- {'M', CMODE_M, 0, NULL, NULL},
- {'O', CMODE_O, 0, NULL, NULL},
- {'R', CMODE_R, 0, NULL, NULL},
- {0}
+ {'c', CMODE_c, 0, NULL, NULL},
+ {'i', CMODE_i, 0, NULL, NULL},
+ {'j', CMODE_j, 0, get_flood, cs_get_flood},
+ {'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},
+ {'M', CMODE_M, 0, NULL, NULL},
+ {'O', CMODE_O, 0, NULL, NULL},
+ {'R', CMODE_R, 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},
- {0}, /* a */
- {0}, /* b */
- {0}, /* c */
- {0}, /* d */
- {0}, /* e */
- {0}, /* f */
- {0}, /* g */
- {0}, /* h */
- {0}, /* i */
- {0}, /* j */
- {0}, /* k */
- {0}, /* l */
- {0}, /* m */
- {0}, /* n */
- {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op},
- {0}, /* p */
- {0}, /* q */
- {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},
+ {0}, /* a */
+ {0}, /* b */
+ {0}, /* c */
+ {0}, /* d */
+ {0}, /* e */
+ {0}, /* f */
+ {0}, /* g */
+ {0}, /* h */
+ {0}, /* i */
+ {0}, /* j */
+ {0}, /* k */
+ {0}, /* l */
+ {0}, /* m */
+ {0}, /* n */
+ {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op},
+ {0}, /* p */
+ {0}, /* q */
+ {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}
};
void bahamut_cmd_burst()
{
- send_cmd(NULL, "BURST");
+ send_cmd(NULL, "BURST");
}
/*
* SVINFO
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
- * parv[4] = server's idea of UTC time
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
+ * parv[4] = server's idea of UTC time
*/
void bahamut_cmd_svinfo()
{
- send_cmd(NULL, "SVINFO 3 1 0 :%ld", (long int) time(NULL));
+ send_cmd(NULL, "SVINFO 3 1 0 :%ld", (long int) time(NULL));
}
/* PASS */
void bahamut_cmd_pass(const char *pass)
{
- send_cmd(NULL, "PASS %s :TS", pass);
+ send_cmd(NULL, "PASS %s :TS", pass);
}
/* CAPAB */
void bahamut_cmd_capab()
{
- send_cmd(NULL,
- "CAPAB SSJOIN NOQUIT BURST UNCONNECT NICKIP TSMODE TS3");
+ send_cmd(NULL,
+ "CAPAB SSJOIN NOQUIT BURST UNCONNECT NICKIP TSMODE TS3");
}
/* this avoids "undefined symbol" messages of those whom try to load mods that
call on this function */
void bahamut_cmd_chghost(const char *nick, const char *vhost)
{
- if (debug) {
- alog("debug: This IRCD does not support vhosting");
- }
+ if (debug) {
+ alog("debug: This IRCD does not support vhosting");
+ }
}
@@ -742,301 +742,301 @@ class BahamutIRCdProto : public IRCDProto
/* EVENT: SJOIN */
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;
}
/*
** NICK - new
-** source = NULL
+** source = NULL
** parv[0] = nickname
-** parv[1] = hopcount
-** parv[2] = timestamp
-** parv[3] = modes
-** parv[4] = username
-** parv[5] = hostname
-** parv[6] = server
+** parv[1] = hopcount
+** parv[2] = timestamp
+** parv[3] = modes
+** parv[4] = username
+** parv[5] = hostname
+** parv[6] = server
** parv[7] = servicestamp
-** parv[8] = IP
+** parv[8] = IP
** parv[9] = info
** NICK - change
-** source = oldnick
+** source = oldnick
** parv[0] = new nickname
-** parv[1] = hopcount
+** parv[1] = hopcount
*/
int anope_event_nick(const char *source, int ac, const char **av)
{
- User *user;
-
- if (ac != 2) {
- user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
- strtoul(av[2], NULL, 10), strtoul(av[7], NULL, 0),
- strtoul(av[8], NULL, 0), NULL, NULL);
- if (user) {
- ircdproto->ProcessUsermodes(user, 1, &av[3]);
- }
- } 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) {
+ user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
+ strtoul(av[2], NULL, 10), strtoul(av[7], NULL, 0),
+ strtoul(av[8], NULL, 0), NULL, NULL);
+ if (user) {
+ ircdproto->ProcessUsermodes(user, 1, &av[3]);
+ }
+ } else {
+ do_nick(source, av[0], NULL, NULL, NULL, NULL,
+ strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
+ }
+ return MOD_CONT;
}
/* EVENT : CAPAB */
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;
}
/* EVENT : OS */
int anope_event_os(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_OperServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_OperServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : NS */
int anope_event_ns(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_NickServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_NickServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : MS */
int anope_event_ms(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_MemoServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_MemoServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : HS */
int anope_event_hs(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_HostServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_HostServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : CS */
int anope_event_cs(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_ChanServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_ChanServ, av[0]);
+ 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;
}
/* EVENT : SERVER */
int anope_event_server(const char *source, int ac, const char **av)
{
- if (!stricmp(av[1], "1")) {
- uplink = sstrdup(av[0]);
- }
+ if (!stricmp(av[1], "1")) {
+ uplink = sstrdup(av[0]);
+ }
- do_server(source, av[0], av[1], av[2], NULL);
- return MOD_CONT;
+ do_server(source, av[0], av[1], av[2], NULL);
+ return MOD_CONT;
}
/* EVENT : PRIVMSG */
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_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;
}
/* EVENT: MODE */
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;
}
/* EVENT: KILL */
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;
}
/* EVENT: KICK */
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;
}
/* EVENT: JOIN */
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;
}
/* EVENT: MOTD */
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_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;
}
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;
}
int anope_event_error(const char *source, int ac, const char **av)
{
- if (ac >= 1) {
- if (debug) {
- alog("debug: %s", av[0]);
- }
- }
- return MOD_CONT;
+ if (ac >= 1) {
+ if (debug) {
+ alog("debug: %s", av[0]);
+ }
+ }
+ return MOD_CONT;
}
int anope_event_burst(const char *source, int ac, const char **av)
{
- Server *s;
- s = findserver(servlist, source);
- if (!ac) {
- /* for future use - start burst */
- } else {
- /* 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 (!ac) {
+ /* for future use - start burst */
+ } else {
+ /* 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;
}
/* *INDENT-OFF* */
void moduleAddIRCDMsgs(void) {
- Message *m;
-
-
- /* first update the cs protect info about this ircd */
- updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
-
- /* now add the commands */
- m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
- m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
- m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
- m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
- m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
- m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
- m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
- m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
- m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
- m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
- m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
- m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
- m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
- m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
- m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
- m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m);
- m = createMessage("HS", anope_event_hs); addCoreMessage(IRCD,m);
- m = createMessage("MS", anope_event_ms); addCoreMessage(IRCD,m);
- m = createMessage("NS", anope_event_ns); addCoreMessage(IRCD,m);
- m = createMessage("OS", anope_event_os); addCoreMessage(IRCD,m);
- m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
- m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
- m = createMessage("BURST", anope_event_burst); addCoreMessage(IRCD,m);
+ Message *m;
+
+
+ /* first update the cs protect info about this ircd */
+ updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
+
+ /* now add the commands */
+ m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
+ m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
+ m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
+ m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
+ m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
+ m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
+ m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
+ m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
+ m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
+ m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
+ m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
+ m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
+ m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
+ m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
+ m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m);
+ m = createMessage("HS", anope_event_hs); addCoreMessage(IRCD,m);
+ m = createMessage("MS", anope_event_ms); addCoreMessage(IRCD,m);
+ m = createMessage("NS", anope_event_ns); addCoreMessage(IRCD,m);
+ m = createMessage("OS", anope_event_os); addCoreMessage(IRCD,m);
+ m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
+ m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
+ m = createMessage("BURST", anope_event_burst); addCoreMessage(IRCD,m);
}
/* *INDENT-ON* */
diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c
index 7c34f3de3..cee42ce1c 100644
--- a/src/protocol/charybdis.c
+++ b/src/protocol/charybdis.c
@@ -49,373 +49,373 @@
#define DEFAULT_MLOCK CMODE_n | CMODE_t
IRCDVar myIrcd[] = {
- {"Charybdis 1.0+", /* ircd name */
- "+oiS", /* Modes used by pseudoclients */
- 2, /* Chan Max Symbols */
- "-cilmnpstrgzQF", /* Modes to Remove */
- "+o", /* Channel Umode used by Botserv bots */
- 1, /* SVSNICK */
- 1, /* Vhost */
- 0, /* Has Owner */
- NULL, /* Mode to set for an owner */
- NULL, /* Mode to unset for an owner */
- NULL, /* Mode to set for chan admin */
- NULL, /* Mode to unset for chan admin */
- NULL, /* Mode On Reg */
- NULL, /* Mode on ID for Roots */
- NULL, /* Mode on ID for Admins */
- NULL, /* Mode on ID for Opers */
- NULL, /* Mode on UnReg */
- NULL, /* Mode on Nick Change */
- 1, /* Supports SGlines */
- 1, /* Supports SQlines */
- 1, /* Supports SZlines */
- 0, /* Supports Halfop +h */
- 3, /* Number of server args */
- 1, /* Join 2 Set */
- 1, /* Join 2 Message */
- 1, /* Has exceptions +e */
- 0, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- 0, /* Protected Umode */
- 0, /* Has Admin */
- 1, /* Chan SQlines */
- 0, /* Quit on Kill */
- 0, /* SVSMODE unban */
- 0, /* Has Protect */
- 0, /* Reverse */
- 0, /* Chan Reg */
- 0, /* Channel Mode */
- 0, /* vidents */
- 1, /* svshold */
- 0, /* time stamp on mode */
- 0, /* NICKIP */
- 0, /* UMODE */
- 0, /* O:LINE */
- 1, /* VHOST ON NICK */
- 0, /* Change RealName */
- CMODE_p, /* No Knock */
- 0, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- 0, /* Vhost Mode */
- 1, /* +f */
- 1, /* +L */
- CMODE_j, /* +f Mode */
- CMODE_f, /* +L Mode (+f <target>) */
- 1, /* On nick change check if they could be identified */
- 0, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support TOKENS */
- 0, /* TIME STAMPS are BASE64 */
- 1, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* Can remove User Channel Modes with SVSMODE */
- 0, /* Sglines are not enforced until user reconnects */
- NULL, /* vhost char */
- 1, /* ts6 */
- 0, /* support helper umode */
- 0, /* p10 */
- NULL, /* character set */
- 0, /* reports sync state */
- 1, /* CIDR channelbans */
- "$$", /* TLD Prefix for Global */
- }
- ,
- {NULL}
+ {"Charybdis 1.0+", /* ircd name */
+ "+oiS", /* Modes used by pseudoclients */
+ 2, /* Chan Max Symbols */
+ "-cilmnpstrgzQF", /* Modes to Remove */
+ "+o", /* Channel Umode used by Botserv bots */
+ 1, /* SVSNICK */
+ 1, /* Vhost */
+ 0, /* Has Owner */
+ NULL, /* Mode to set for an owner */
+ NULL, /* Mode to unset for an owner */
+ NULL, /* Mode to set for chan admin */
+ NULL, /* Mode to unset for chan admin */
+ NULL, /* Mode On Reg */
+ NULL, /* Mode on ID for Roots */
+ NULL, /* Mode on ID for Admins */
+ NULL, /* Mode on ID for Opers */
+ NULL, /* Mode on UnReg */
+ NULL, /* Mode on Nick Change */
+ 1, /* Supports SGlines */
+ 1, /* Supports SQlines */
+ 1, /* Supports SZlines */
+ 0, /* Supports Halfop +h */
+ 3, /* Number of server args */
+ 1, /* Join 2 Set */
+ 1, /* Join 2 Message */
+ 1, /* Has exceptions +e */
+ 0, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ 0, /* Protected Umode */
+ 0, /* Has Admin */
+ 1, /* Chan SQlines */
+ 0, /* Quit on Kill */
+ 0, /* SVSMODE unban */
+ 0, /* Has Protect */
+ 0, /* Reverse */
+ 0, /* Chan Reg */
+ 0, /* Channel Mode */
+ 0, /* vidents */
+ 1, /* svshold */
+ 0, /* time stamp on mode */
+ 0, /* NICKIP */
+ 0, /* UMODE */
+ 0, /* O:LINE */
+ 1, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ CMODE_p, /* No Knock */
+ 0, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ 0, /* Vhost Mode */
+ 1, /* +f */
+ 1, /* +L */
+ CMODE_j, /* +f Mode */
+ CMODE_f, /* +L Mode (+f <target>) */
+ 1, /* On nick change check if they could be identified */
+ 0, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support TOKENS */
+ 0, /* TIME STAMPS are BASE64 */
+ 1, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* Can remove User Channel Modes with SVSMODE */
+ 0, /* Sglines are not enforced until user reconnects */
+ NULL, /* vhost char */
+ 1, /* ts6 */
+ 0, /* support helper umode */
+ 0, /* p10 */
+ NULL, /* character set */
+ 0, /* reports sync state */
+ 1, /* CIDR channelbans */
+ "$$", /* TLD Prefix for Global */
+ }
+ ,
+ {NULL}
};
IRCDCAPAB myIrcdcap[] = {
- {
- 0, /* NOQUIT */
- 0, /* TSMODE */
- 0, /* UNCONNECT */
- 0, /* NICKIP */
- 0, /* SJOIN */
- CAPAB_ZIP, /* ZIP */
- 0, /* BURST */
- CAPAB_TS5, /* TS5 */
- 0, /* TS3 */
- 0, /* DKEY */
- 0, /* PT4 */
- 0, /* SCS */
- CAPAB_QS, /* QS */
- CAPAB_UID, /* UID */
- CAPAB_KNOCK, /* KNOCK */
- 0, /* CLIENT */
- 0, /* IPV6 */
- 0, /* SSJ5 */
- 0, /* SN2 */
- 0, /* TOKEN */
- 0, /* VHOST */
- 0, /* SSJ3 */
- 0, /* NICK2 */
- 0, /* UMODE2 */
- 0, /* VL */
- 0, /* TLKEXT */
- 0, /* DODKEY */
- 0, /* DOZIP */
- 0, 0, 0}
+ {
+ 0, /* NOQUIT */
+ 0, /* TSMODE */
+ 0, /* UNCONNECT */
+ 0, /* NICKIP */
+ 0, /* SJOIN */
+ CAPAB_ZIP, /* ZIP */
+ 0, /* BURST */
+ CAPAB_TS5, /* TS5 */
+ 0, /* TS3 */
+ 0, /* DKEY */
+ 0, /* PT4 */
+ 0, /* SCS */
+ CAPAB_QS, /* QS */
+ CAPAB_UID, /* UID */
+ CAPAB_KNOCK, /* KNOCK */
+ 0, /* CLIENT */
+ 0, /* IPV6 */
+ 0, /* SSJ5 */
+ 0, /* SN2 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ 0, /* SSJ3 */
+ 0, /* NICK2 */
+ 0, /* UMODE2 */
+ 0, /* VL */
+ 0, /* TLKEXT */
+ 0, /* DODKEY */
+ 0, /* DOZIP */
+ 0, 0, 0}
};
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, /* ? @ */
- 0, 0, 0, /* A B C */
- 0, 0, 0, /* D E F */
- 0, 0, 0, /* G H I */
- 0, 0, 0, /* J K L */
- 0, 0, 0, /* M N O */
- 0, UMODE_Q, UMODE_R, /* P Q R */
- UMODE_S, 0, 0, /* S T U */
- 0, 0, 0, /* V W X */
- 0, /* Y */
- 0, /* Z */
- 0, 0, 0, /* [ \ ] */
- 0, 0, 0, /* ^ _ ` */
- UMODE_a, 0, 0, /* a b c */
- 0, 0, 0, /* d e f */
- UMODE_g, 0, UMODE_i, /* g h i */
- 0, 0, UMODE_l, /* j k l */
- 0, 0, UMODE_o, /* m n o */
- 0, 0, 0, /* p q r */
- UMODE_s, 0, 0, /* s t u */
- 0, UMODE_w, 0, /* 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, /* ? @ */
+ 0, 0, 0, /* A B C */
+ 0, 0, 0, /* D E F */
+ 0, 0, 0, /* G H I */
+ 0, 0, 0, /* J K L */
+ 0, 0, 0, /* M N O */
+ 0, UMODE_Q, UMODE_R, /* P Q R */
+ UMODE_S, 0, 0, /* S T U */
+ 0, 0, 0, /* V W X */
+ 0, /* Y */
+ 0, /* Z */
+ 0, 0, 0, /* [ \ ] */
+ 0, 0, 0, /* ^ _ ` */
+ UMODE_a, 0, 0, /* a b c */
+ 0, 0, 0, /* d e f */
+ UMODE_g, 0, UMODE_i, /* g h i */
+ 0, 0, UMODE_l, /* j k l */
+ 0, 0, UMODE_o, /* m n o */
+ 0, 0, 0, /* p q r */
+ UMODE_s, 0, 0, /* s t u */
+ 0, UMODE_w, 0, /* 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,
- 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,
+ '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, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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},
- {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},
- {NULL},
- {NULL},
- {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},
+ {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},
+ {NULL},
+ {NULL},
+ {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},
- {0}, /* A */
- {0}, /* B */
- {0}, /* C */
- {0}, /* D */
- {0}, /* E */
- {CMODE_F, 0, NULL, NULL}, /* F */
- {0}, /* G */
- {0}, /* H */
- {0}, /* I */
- {0}, /* J */
- {0}, /* K */
- {CMODE_L, CBM_NO_USER_MLOCK, NULL, NULL}, /* L */
- {0}, /* M */
- {0}, /* N */
- {0}, /* O */
- {CMODE_P, CBM_NO_USER_MLOCK, NULL, NULL}, /* P */
- {CMODE_Q, 0, NULL, NULL}, /* Q */
- {0}, /* R */
- {0}, /* S */
- {0}, /* T */
- {0}, /* U */
- {0}, /* V */
- {0}, /* W */
- {0}, /* X */
- {0}, /* Y */
- {0}, /* Z */
- {0}, {0}, {0}, {0}, {0}, {0},
- {0},
- {0}, /* b */
- {CMODE_c, 0, NULL, NULL}, /* c */
- {0}, /* d */
- {0}, /* e */
- {CMODE_f, 0, set_redirect, cs_set_redirect}, /* f */
- {CMODE_g, 0, NULL, NULL}, /* g */
- {0}, /* h */
- {CMODE_i, 0, NULL, NULL},
- {CMODE_j, 0, set_flood, cs_set_flood}, /* 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, 0, NULL, NULL},
- {CMODE_s, 0, NULL, NULL},
- {CMODE_t, 0, NULL, NULL},
- {0},
- {0}, /* v */
- {0}, /* w */
- {0}, /* x */
- {0}, /* y */
- {CMODE_z, 0, NULL, NULL}, /* 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}, /* A */
+ {0}, /* B */
+ {0}, /* C */
+ {0}, /* D */
+ {0}, /* E */
+ {CMODE_F, 0, NULL, NULL}, /* F */
+ {0}, /* G */
+ {0}, /* H */
+ {0}, /* I */
+ {0}, /* J */
+ {0}, /* K */
+ {CMODE_L, CBM_NO_USER_MLOCK, NULL, NULL}, /* L */
+ {0}, /* M */
+ {0}, /* N */
+ {0}, /* O */
+ {CMODE_P, CBM_NO_USER_MLOCK, NULL, NULL}, /* P */
+ {CMODE_Q, 0, NULL, NULL}, /* Q */
+ {0}, /* R */
+ {0}, /* S */
+ {0}, /* T */
+ {0}, /* U */
+ {0}, /* V */
+ {0}, /* W */
+ {0}, /* X */
+ {0}, /* Y */
+ {0}, /* Z */
+ {0}, {0}, {0}, {0}, {0}, {0},
+ {0},
+ {0}, /* b */
+ {CMODE_c, 0, NULL, NULL}, /* c */
+ {0}, /* d */
+ {0}, /* e */
+ {CMODE_f, 0, set_redirect, cs_set_redirect}, /* f */
+ {CMODE_g, 0, NULL, NULL}, /* g */
+ {0}, /* h */
+ {CMODE_i, 0, NULL, NULL},
+ {CMODE_j, 0, set_flood, cs_set_flood}, /* 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, 0, NULL, NULL},
+ {CMODE_s, 0, NULL, NULL},
+ {CMODE_t, 0, NULL, NULL},
+ {0},
+ {0}, /* v */
+ {0}, /* w */
+ {0}, /* x */
+ {0}, /* y */
+ {CMODE_z, 0, NULL, NULL}, /* z */
+ {0}, {0}, {0}, {0}
};
CBModeInfo myCbmodeinfos[] = {
- {'c', CMODE_c, 0, NULL, NULL},
- {'f', CMODE_f, CBM_MINUS_NO_ARG, get_redirect, cs_get_redirect},
- {'g', CMODE_g, 0, NULL, NULL},
- {'i', CMODE_i, 0, NULL, NULL},
- {'j', CMODE_j, CBM_MINUS_NO_ARG, get_flood, cs_get_flood},
- {'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},
- {'z', CMODE_z, 0, NULL, NULL},
- {'F', CMODE_F, 0, NULL, NULL},
- {'L', CMODE_L, 0, NULL, NULL},
- {'P', CMODE_P, 0, NULL, NULL},
- {'Q', CMODE_Q, 0, NULL, NULL},
- {0}
+ {'c', CMODE_c, 0, NULL, NULL},
+ {'f', CMODE_f, CBM_MINUS_NO_ARG, get_redirect, cs_get_redirect},
+ {'g', CMODE_g, 0, NULL, NULL},
+ {'i', CMODE_i, 0, NULL, NULL},
+ {'j', CMODE_j, CBM_MINUS_NO_ARG, get_flood, cs_get_flood},
+ {'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},
+ {'z', CMODE_z, 0, NULL, NULL},
+ {'F', CMODE_F, 0, NULL, NULL},
+ {'L', CMODE_L, 0, NULL, NULL},
+ {'P', CMODE_P, 0, NULL, NULL},
+ {'Q', CMODE_Q, 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},
-
- {0}, /* a */
- {0}, /* b */
- {0}, /* c */
- {0}, /* d */
- {0}, /* e */
- {0}, /* f */
- {0}, /* g */
- {0},
- {0}, /* i */
- {0}, /* j */
- {0}, /* k */
- {0}, /* l */
- {0}, /* m */
- {0}, /* n */
- {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op},
- {0}, /* p */
- {0}, /* q */
- {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},
+
+ {0}, /* a */
+ {0}, /* b */
+ {0}, /* c */
+ {0}, /* d */
+ {0}, /* e */
+ {0}, /* f */
+ {0}, /* g */
+ {0},
+ {0}, /* i */
+ {0}, /* j */
+ {0}, /* k */
+ {0}, /* l */
+ {0}, /* m */
+ {0}, /* n */
+ {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op},
+ {0}, /* p */
+ {0}, /* q */
+ {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}
};
/*******************************************************************/
@@ -424,15 +424,15 @@ CUMode myCumodes[128] = {
/*
* SVINFO
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
- * parv[4] = server's idea of UTC time
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
+ * parv[4] = server's idea of UTC time
*/
void charybdis_cmd_svinfo()
{
- send_cmd(NULL, "SVINFO 6 3 0 :%ld", (long int) time(NULL));
+ send_cmd(NULL, "SVINFO 6 3 0 :%ld", (long int) time(NULL));
}
void charybdis_cmd_svsinfo()
@@ -442,57 +442,57 @@ void charybdis_cmd_svsinfo()
/* CAPAB */
/*
- QS - Can handle quit storm removal
- EX - Can do channel +e exemptions
- CHW - Can do channel wall @#
- LL - Can do lazy links
- IE - Can do invite exceptions
- EOB - Can do EOB message
- KLN - Can do KLINE message
- GLN - Can do GLINE message
- HUB - This server is a HUB
- UID - Can do UIDs
- ZIP - Can do ZIPlinks
- ENC - Can do ENCrypted links
- KNOCK - supports KNOCK
+ QS - Can handle quit storm removal
+ EX - Can do channel +e exemptions
+ CHW - Can do channel wall @#
+ LL - Can do lazy links
+ IE - Can do invite exceptions
+ EOB - Can do EOB message
+ KLN - Can do KLINE message
+ GLN - Can do GLINE message
+ HUB - This server is a HUB
+ UID - Can do UIDs
+ ZIP - Can do ZIPlinks
+ ENC - Can do ENCrypted links
+ KNOCK - supports KNOCK
TBURST - supports TBURST
PARA - supports invite broadcasting for +p
ENCAP - supports message encapsulation
SERVICES - supports services-oriented TS6 extensions
- EUID - supports EUID and non-ENCAP CHGHOST
+ EUID - supports EUID and non-ENCAP CHGHOST
*/
void charybdis_cmd_capab()
{
- send_cmd(NULL,
- "CAPAB :QS EX CHW IE KLN GLN KNOCK TB UNKLN CLUSTER ENCAP SERVICES EUID");
+ send_cmd(NULL,
+ "CAPAB :QS EX CHW IE KLN GLN KNOCK TB UNKLN CLUSTER ENCAP SERVICES EUID");
}
/* PASS */
void charybdis_cmd_pass(const char *pass)
{
- if (UseTS6) {
- send_cmd(NULL, "PASS %s TS 6 :%s", pass, TS6SID);
- } else {
- send_cmd(NULL, "PASS %s :TS", pass);
- }
+ if (UseTS6) {
+ send_cmd(NULL, "PASS %s TS 6 :%s", pass, TS6SID);
+ } else {
+ send_cmd(NULL, "PASS %s :TS", pass);
+ }
}
void charybdis_cmd_tmode(const char *source, const char *dest, const char *fmt, ...)
{
- va_list args;
- char buf[BUFSIZE];
- *buf = '\0';
-
- if (fmt) {
- va_start(args, fmt);
- vsnprintf(buf, BUFSIZE - 1, fmt, args);
- va_end(args);
- }
- if (!*buf) {
- return;
- }
-
- send_cmd(NULL, "MODE %s %s", dest, buf);
+ va_list args;
+ char buf[BUFSIZE];
+ *buf = '\0';
+
+ if (fmt) {
+ va_start(args, fmt);
+ vsnprintf(buf, BUFSIZE - 1, fmt, args);
+ va_end(args);
+ }
+ if (!*buf) {
+ return;
+ }
+
+ send_cmd(NULL, "MODE %s %s", dest, buf);
}
class CharybdisProto : public IRCDProto
@@ -759,8 +759,8 @@ class CharybdisProto : public IRCDProto
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;
}
/*
@@ -789,29 +789,29 @@ int anope_event_sjoin(const char *source, int ac, const char **av)
*/
int anope_event_nick(const char *source, int ac, const char **av)
{
- Server *s;
- User *user;
-
- if (UseTS6 && ac == 9) {
- s = findserver_uid(servlist, source);
- /* Source is always the server */
- user = do_nick("", av[0], av[4], av[5], s->name, av[8],
- strtoul(av[2], NULL, 10), 0, 0, NULL, av[7]);
- if (user) {
- ircdproto->ProcessUsermodes(user, 1, &av[3]);
- }
- } else {
- if (ac != 2) {
- user = do_nick(source, av[0], av[4], av[5], av[6], av[7],
- strtoul(av[2], NULL, 10), 0, 0, NULL, NULL);
- if (user)
- ircdproto->ProcessUsermodes(user, 1, &av[3]);
- } else {
- do_nick(source, av[0], NULL, NULL, NULL, NULL,
- strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
- }
- }
- return MOD_CONT;
+ Server *s;
+ User *user;
+
+ if (UseTS6 && ac == 9) {
+ s = findserver_uid(servlist, source);
+ /* Source is always the server */
+ user = do_nick("", av[0], av[4], av[5], s->name, av[8],
+ strtoul(av[2], NULL, 10), 0, 0, NULL, av[7]);
+ if (user) {
+ ircdproto->ProcessUsermodes(user, 1, &av[3]);
+ }
+ } else {
+ if (ac != 2) {
+ user = do_nick(source, av[0], av[4], av[5], av[6], av[7],
+ strtoul(av[2], NULL, 10), 0, 0, NULL, NULL);
+ if (user)
+ ircdproto->ProcessUsermodes(user, 1, &av[3]);
+ } else {
+ do_nick(source, av[0], NULL, NULL, NULL, NULL,
+ strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
+ }
+ }
+ return MOD_CONT;
}
/*
@@ -831,200 +831,200 @@ int anope_event_nick(const char *source, int ac, const char **av)
*/
int anope_event_euid(const char *source, int ac, const char **av)
{
- Server *s;
- User *user;
- time_t ts;
+ Server *s;
+ User *user;
+ time_t ts;
- if (UseTS6 && ac == 11) {
- s = findserver_uid(servlist, source);
- /* Source is always the server */
+ if (UseTS6 && ac == 11) {
+ s = findserver_uid(servlist, source);
+ /* Source is always the server */
ts = strtoul(av[2], NULL, 10);
- user = do_nick("", av[0], av[4], !strcmp(av[8], "*") ? av[5] : av[8], s->name, av[10],
- ts, !stricmp(av[0], av[9]) ? ts : 0, 0, av[5], av[7]);
- if (user) {
- ircdproto->ProcessUsermodes(user, 1, &av[3]);
- }
- }
- return MOD_CONT;
+ user = do_nick("", av[0], av[4], !strcmp(av[8], "*") ? av[5] : av[8], s->name, av[10],
+ ts, !stricmp(av[0], av[9]) ? ts : 0, 0, av[5], av[7]);
+ if (user) {
+ ircdproto->ProcessUsermodes(user, 1, &av[3]);
+ }
+ }
+ return MOD_CONT;
}
int anope_event_topic(const char *source, int ac, const char **av)
{
- User *u;
-
- if (ac == 4) {
- do_topic(source, ac, av);
- } else {
- Channel *c = findchan(av[0]);
- time_t topic_time = time(NULL);
-
- if (!c) {
- if (debug) {
- alog("debug: TOPIC %s for nonexistent channel %s",
- merge_args(ac - 1, av + 1), av[0]);
- }
- return MOD_CONT;
- }
-
- if (check_topiclock(c, topic_time))
- return MOD_CONT;
-
- if (c->topic) {
- free(c->topic);
- c->topic = NULL;
- }
- if (ac > 1 && *av[1])
- c->topic = sstrdup(av[1]);
-
- if (UseTS6) {
- u = find_byuid(source);
- if (u) {
- strscpy(c->topic_setter, u->nick, sizeof(c->topic_setter));
- } else {
- strscpy(c->topic_setter, source, sizeof(c->topic_setter));
- }
- } else {
- strscpy(c->topic_setter, source, sizeof(c->topic_setter));
- }
- c->topic_time = topic_time;
-
- record_topic(av[0]);
+ User *u;
+
+ if (ac == 4) {
+ do_topic(source, ac, av);
+ } else {
+ Channel *c = findchan(av[0]);
+ time_t topic_time = time(NULL);
+ if (!c) {
+ if (debug) {
+ alog("debug: TOPIC %s for nonexistent channel %s",
+ merge_args(ac - 1, av + 1), av[0]);
+ }
+ return MOD_CONT;
+ }
+
+ if (check_topiclock(c, topic_time))
+ return MOD_CONT;
+
+ if (c->topic) {
+ free(c->topic);
+ c->topic = NULL;
+ }
if (ac > 1 && *av[1])
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
+ c->topic = sstrdup(av[1]);
+
+ if (UseTS6) {
+ u = find_byuid(source);
+ if (u) {
+ strscpy(c->topic_setter, u->nick, sizeof(c->topic_setter));
+ } else {
+ strscpy(c->topic_setter, source, sizeof(c->topic_setter));
+ }
+ } else {
+ strscpy(c->topic_setter, source, sizeof(c->topic_setter));
+ }
+ c->topic_time = topic_time;
+
+ record_topic(av[0]);
+
+ if (ac > 1 && *av[1])
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
else
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
- }
- return MOD_CONT;
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
+ }
+ return MOD_CONT;
}
int anope_event_tburst(const char *source, int ac, const char **av)
{
- char *setter;
- Channel *c;
- time_t topic_time;
-
- if (ac != 4) {
- return MOD_CONT;
- }
-
- setter = myStrGetToken(av[2], '!', 0);
-
- c = findchan(av[0]);
- topic_time = strtol(av[1], NULL, 10);
-
- if (!c) {
- if (debug) {
- alog("debug: TOPIC %s for nonexistent channel %s",
- merge_args(ac - 1, av + 1), av[0]);
- }
- if (setter)
- free(setter);
- return MOD_CONT;
- }
-
- if (check_topiclock(c, topic_time)) {
- if (setter)
- free(setter);
- return MOD_CONT;
- }
-
- if (c->topic) {
- free(c->topic);
- c->topic = NULL;
- }
- if (ac > 1 && *av[3])
- c->topic = sstrdup(av[3]);
-
- strscpy(c->topic_setter, setter, sizeof(c->topic_setter));
- c->topic_time = topic_time;
-
- record_topic(av[0]);
+ char *setter;
+ Channel *c;
+ time_t topic_time;
+
+ if (ac != 4) {
+ return MOD_CONT;
+ }
+
+ setter = myStrGetToken(av[2], '!', 0);
+
+ c = findchan(av[0]);
+ topic_time = strtol(av[1], NULL, 10);
+
+ if (!c) {
+ if (debug) {
+ alog("debug: TOPIC %s for nonexistent channel %s",
+ merge_args(ac - 1, av + 1), av[0]);
+ }
+ if (setter)
+ free(setter);
+ return MOD_CONT;
+ }
+
+ if (check_topiclock(c, topic_time)) {
+ if (setter)
+ free(setter);
+ return MOD_CONT;
+ }
+
+ if (c->topic) {
+ free(c->topic);
+ c->topic = NULL;
+ }
+ if (ac > 1 && *av[3])
+ c->topic = sstrdup(av[3]);
+
+ strscpy(c->topic_setter, setter, sizeof(c->topic_setter));
+ c->topic_time = topic_time;
+
+ record_topic(av[0]);
if (ac > 1 && *av[3])
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[3]);
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[3]);
else
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
- if (setter)
- free(setter);
+ if (setter)
+ free(setter);
- return MOD_CONT;
+ 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;
}
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;
}
int anope_event_away(const char *source, int ac, const char **av)
{
- User *u = NULL;
+ User *u = NULL;
- if (UseTS6) {
- u = find_byuid(source);
- }
+ if (UseTS6) {
+ u = find_byuid(source);
+ }
- m_away((UseTS6 ? (u ? u->nick : source) : source),
- (ac ? av[0] : NULL));
- return MOD_CONT;
+ m_away((UseTS6 ? (u ? u->nick : source) : source),
+ (ac ? av[0] : NULL));
+ return MOD_CONT;
}
int anope_event_kill(const char *source, int ac, const char **av)
{
- User *u = NULL;
+ User *u = NULL;
- if (ac != 2)
- return MOD_CONT;
+ if (ac != 2)
+ return MOD_CONT;
- if (UseTS6) {
- u = find_byuid(av[0]);
- }
+ if (UseTS6) {
+ u = find_byuid(av[0]);
+ }
- m_kill(u ? u->nick : av[0], av[1]);
- return MOD_CONT;
+ m_kill(u ? u->nick : 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) {
+ if (ac != 1) {
/* ignore cmodes in JOIN as per TS6 v8 */
- do_sjoin(source, ac > 2 ? 2 : ac, av);
- return MOD_CONT;
- } else {
- do_join(source, ac, av);
- }
- return MOD_CONT;
+ do_sjoin(source, ac > 2 ? 2 : ac, av);
+ return MOD_CONT;
+ } else {
+ 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_privmsg(const char *source, int ac, const char **av)
@@ -1045,16 +1045,16 @@ int anope_event_privmsg(const char *source, int ac, const char **av)
int anope_event_part(const char *source, int ac, const char **av)
{
- User *u;
+ User *u;
- if (ac < 1 || ac > 2) {
- return MOD_CONT;
- }
+ if (ac < 1 || ac > 2) {
+ return MOD_CONT;
+ }
- u = find_byuid(source);
- do_part((UseTS6 ? (u ? u->nick : source) : source), ac, av);
+ u = find_byuid(source);
+ do_part((UseTS6 ? (u ? u->nick : source) : source), ac, av);
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_whois(const char *source, int ac, const char **av)
@@ -1072,224 +1072,224 @@ int anope_event_whois(const char *source, int ac, const char **av)
/* EVENT: SERVER */
int anope_event_server(const char *source, int ac, const char **av)
{
- if (!stricmp(av[1], "1")) {
- uplink = sstrdup(av[0]);
- if (UseTS6 && TS6UPLINK) {
- do_server(source, av[0], av[1], av[2], TS6UPLINK);
- } else {
- do_server(source, av[0], av[1], av[2], NULL);
- }
- } else {
- do_server(source, av[0], av[1], av[2], NULL);
- }
- return MOD_CONT;
+ if (!stricmp(av[1], "1")) {
+ uplink = sstrdup(av[0]);
+ if (UseTS6 && TS6UPLINK) {
+ do_server(source, av[0], av[1], av[2], TS6UPLINK);
+ } else {
+ do_server(source, av[0], av[1], av[2], NULL);
+ }
+ } else {
+ do_server(source, av[0], av[1], av[2], NULL);
+ }
+ return MOD_CONT;
}
int anope_event_sid(const char *source, int ac, const char **av)
{
- Server *s;
+ Server *s;
- /* :42X SID trystan.nomadirc.net 2 43X :ircd-charybdis test server */
+ /* :42X SID trystan.nomadirc.net 2 43X :ircd-charybdis test server */
- s = findserver_uid(servlist, source);
+ s = findserver_uid(servlist, source);
- do_server(s->name, av[0], av[1], av[3], av[2]);
- return MOD_CONT;
+ do_server(s->name, av[0], av[1], av[3], av[2]);
+ 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)
{
- User *u;
+ User *u;
- if (ac != 1) {
- return MOD_CONT;
- }
+ if (ac != 1) {
+ return MOD_CONT;
+ }
- u = find_byuid(source);
+ u = find_byuid(source);
- do_quit((UseTS6 ? (u ? u->nick : source) : source), ac, av);
- return MOD_CONT;
+ do_quit((UseTS6 ? (u ? u->nick : source) : source), ac, av);
+ return MOD_CONT;
}
int anope_event_mode(const char *source, int ac, const char **av)
{
- User *u, *u2;
-
- if (ac < 2) {
- return MOD_CONT;
- }
-
- if (*av[0] == '#' || *av[0] == '&') {
- do_cmode(source, ac, av);
- } else {
- if (UseTS6) {
- u = find_byuid(source);
- u2 = find_byuid(av[0]);
- av[0] = u2->nick;
- do_umode(u->nick, ac, av);
- } else {
- do_umode(source, ac, av);
- }
- }
- return MOD_CONT;
+ User *u, *u2;
+
+ if (ac < 2) {
+ return MOD_CONT;
+ }
+
+ if (*av[0] == '#' || *av[0] == '&') {
+ do_cmode(source, ac, av);
+ } else {
+ if (UseTS6) {
+ u = find_byuid(source);
+ u2 = find_byuid(av[0]);
+ av[0] = u2->nick;
+ do_umode(u->nick, ac, av);
+ } else {
+ do_umode(source, ac, av);
+ }
+ }
+ return MOD_CONT;
}
int anope_event_tmode(const char *source, int ac, const char **av)
{
- if (ac > 2 && (*av[1] == '#' || *av[1] == '&')) {
- do_cmode(source, ac, av);
- }
- return MOD_CONT;
+ if (ac > 2 && (*av[1] == '#' || *av[1] == '&')) {
+ do_cmode(source, ac, av);
+ }
+ return MOD_CONT;
}
/* Event: PROTOCTL */
int anope_event_capab(const char *source, int ac, const char **av)
{
- int argvsize = 8;
- int argc;
- const char **argv;
- char *str;
-
- if (ac < 1)
- return MOD_CONT;
-
- /* We get the params as one arg, we should split it for capab_parse */
- argv = (const char **)scalloc(argvsize, sizeof(const char *));
- argc = 0;
- while ((str = myStrGetToken(av[0], ' ', argc))) {
- if (argc == argvsize) {
- argvsize += 8;
- argv = (const char **)srealloc(argv, argvsize * sizeof(const char *));
- }
- argv[argc] = str;
- argc++;
- }
-
- capab_parse(argc, argv);
-
- /* Free our built ac/av */
- for (argvsize = 0; argvsize < argc; argvsize++) {
- free((char *)argv[argvsize]);
- }
- free((char **)argv);
-
- return MOD_CONT;
+ int argvsize = 8;
+ int argc;
+ const char **argv;
+ char *str;
+
+ if (ac < 1)
+ return MOD_CONT;
+
+ /* We get the params as one arg, we should split it for capab_parse */
+ argv = (const char **)scalloc(argvsize, sizeof(const char *));
+ argc = 0;
+ while ((str = myStrGetToken(av[0], ' ', argc))) {
+ if (argc == argvsize) {
+ argvsize += 8;
+ argv = (const char **)srealloc(argv, argvsize * sizeof(const char *));
+ }
+ argv[argc] = str;
+ argc++;
+ }
+
+ capab_parse(argc, argv);
+
+ /* Free our built ac/av */
+ for (argvsize = 0; argvsize < argc; argvsize++) {
+ free((char *)argv[argvsize]);
+ }
+ free((char **)argv);
+
+ return MOD_CONT;
}
int anope_event_pass(const char *source, int ac, const char **av)
{
- if (UseTS6) {
- TS6UPLINK = sstrdup(av[3]);
- }
- return MOD_CONT;
+ if (UseTS6) {
+ TS6UPLINK = sstrdup(av[3]);
+ }
+ return MOD_CONT;
}
int anope_event_bmask(const char *source, int ac, const char **av)
{
- Channel *c;
- char *bans;
- char *b;
- int count, i;
-
- /* :42X BMASK 1106409026 #ircops b :*!*@*.aol.com */
- /* 0 1 2 3 */
- c = findchan(av[1]);
-
- if (c) {
- bans = sstrdup(av[3]);
- count = myNumToken(bans, ' ');
- for (i = 0; i <= count - 1; i++) {
- b = myStrGetToken(bans, ' ', i);
- if (!stricmp(av[2], "b")) {
- add_ban(c, b);
- }
- if (!stricmp(av[2], "e")) {
- add_exception(c, b);
- }
- if (!stricmp(av[2], "I")) {
- add_invite(c, b);
- }
- if (b)
- free(b);
- }
- free(bans);
- }
- return MOD_CONT;
+ Channel *c;
+ char *bans;
+ char *b;
+ int count, i;
+
+ /* :42X BMASK 1106409026 #ircops b :*!*@*.aol.com */
+ /* 0 1 2 3 */
+ c = findchan(av[1]);
+
+ if (c) {
+ bans = sstrdup(av[3]);
+ count = myNumToken(bans, ' ');
+ for (i = 0; i <= count - 1; i++) {
+ b = myStrGetToken(bans, ' ', i);
+ if (!stricmp(av[2], "b")) {
+ add_ban(c, b);
+ }
+ if (!stricmp(av[2], "e")) {
+ add_exception(c, b);
+ }
+ if (!stricmp(av[2], "I")) {
+ add_invite(c, b);
+ }
+ if (b)
+ free(b);
+ }
+ free(bans);
+ }
+ return MOD_CONT;
}
int anope_event_error(const char *source, int ac, const char **av)
{
- if (ac >= 1) {
- if (debug) {
- alog("debug: %s", av[0]);
- }
- }
- return MOD_CONT;
+ if (ac >= 1) {
+ if (debug) {
+ alog("debug: %s", av[0]);
+ }
+ }
+ return MOD_CONT;
}
int charybdis_send_account(int argc, char **argv)
{
- send_cmd((UseTS6 ? TS6SID : ServerName), "ENCAP * SU %s :%s",
+ send_cmd((UseTS6 ? TS6SID : ServerName), "ENCAP * SU %s :%s",
argv[0], argv[0]);
- return MOD_CONT;
+ return MOD_CONT;
}
/* XXX: We need a hook on /ns logout before this is useful! --nenolod */
/* We have one now! -GD */
int charybdis_send_deaccount(int argc, char **argv)
{
- send_cmd((UseTS6 ? TS6SID : ServerName), "ENCAP * SU %s",
+ send_cmd((UseTS6 ? TS6SID : ServerName), "ENCAP * SU %s",
argv[0]);
- return MOD_CONT;
+ return MOD_CONT;
}
/* *INDENT-OFF* */
void moduleAddIRCDMsgs(void)
{
- Message *m;
-
- updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
-
- if (UseTS6) {
- TS6SID = sstrdup(Numeric);
- }
-
- m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
- m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
- m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
- m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
- m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
- m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("TMODE", anope_event_tmode); addCoreMessage(IRCD,m);
- m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
- m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("BMASK", anope_event_bmask); addCoreMessage(IRCD,m);
- m = createMessage("UID", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
- m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
- m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
- m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
- m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
- m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
- m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
- m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
- m = createMessage("TB", anope_event_tburst); addCoreMessage(IRCD,m);
- m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
- m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
- m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
- m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
- m = createMessage("SID", anope_event_sid); addCoreMessage(IRCD,m);
- m = createMessage("EUID", anope_event_euid); addCoreMessage(IRCD,m);
+ Message *m;
+
+ updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
+
+ if (UseTS6) {
+ TS6SID = sstrdup(Numeric);
+ }
+
+ m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
+ m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
+ m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
+ m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
+ m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
+ m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("TMODE", anope_event_tmode); addCoreMessage(IRCD,m);
+ m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
+ m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("BMASK", anope_event_bmask); addCoreMessage(IRCD,m);
+ m = createMessage("UID", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
+ m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
+ m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
+ m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
+ m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
+ m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
+ m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
+ m = createMessage("TB", anope_event_tburst); addCoreMessage(IRCD,m);
+ m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
+ m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
+ m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
+ m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
+ m = createMessage("SID", anope_event_sid); addCoreMessage(IRCD,m);
+ m = createMessage("EUID", anope_event_euid); addCoreMessage(IRCD,m);
}
/* *INDENT-ON* */
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c
index ed8c7f06f..d20801548 100644
--- a/src/protocol/inspircd11.c
+++ b/src/protocol/inspircd11.c
@@ -64,338 +64,338 @@
#include "winsock.h"
int inet_aton(const char *name, struct in_addr *addr)
{
- uint32 a = inet_addr(name);
- addr->s_addr = a;
- return a != (uint32) - 1;
+ uint32 a = inet_addr(name);
+ addr->s_addr = a;
+ return a != (uint32) - 1;
}
#endif
IRCDVar myIrcd[] = {
- {"InspIRCd 1.1", /* ircd name */
- "+I", /* Modes used by pseudoclients */
- 5, /* Chan Max Symbols */
- "-cilmnpstuzACGHKNOQRSV", /* 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 */
- "+r", /* Mode On Reg */
- NULL, /* Mode on ID for Roots */
- NULL, /* Mode on ID for Admins */
- NULL, /* Mode on ID for Opers */
- "-r", /* Mode on UnReg */
- "-r", /* Mode on Nick Change */
- 1, /* Supports SGlines */
- 1, /* Supports SQlines */
- 1, /* Supports SZlines */
- 1, /* Supports Halfop +h */
- 4, /* Number of server args */
- 0, /* Join 2 Set */
- 1, /* Join 2 Message */
- 0, /* Has exceptions +e */
- 1, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- 0, /* Protected Umode */
- 0, /* Has Admin */
- 0, /* Chan SQlines */
- 0, /* Quit on Kill */
- 0, /* SVSMODE unban */
- 1, /* Has Protect */
- 1, /* Reverse */
- 1, /* Chan Reg */
- CMODE_r, /* Channel Mode */
- 1, /* vidents */
- 0, /* svshold */
- 0, /* time stamp on mode */
- 0, /* NICKIP */
- 1, /* O:LINE */
- 1, /* UMODE */
- 1, /* VHOST ON NICK */
- 0, /* Change RealName */
- CMODE_K, /* No Knock */
- 0, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- UMODE_x, /* Vhost Mode */
- 0, /* +f */
- 1, /* +L */
- CMODE_f,
- CMODE_L,
- 0,
- 1, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support inspircd TOKENS */
- 0, /* TIME STAMPS are BASE64 */
- 0, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* 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 */
- 0, /* reports sync state */
- 1, /* CIDR channelbans */
- "$", /* TLD Prefix for Global */
- }
- ,
- {NULL}
+ {"InspIRCd 1.1", /* ircd name */
+ "+I", /* Modes used by pseudoclients */
+ 5, /* Chan Max Symbols */
+ "-cilmnpstuzACGHKNOQRSV", /* 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 */
+ "+r", /* Mode On Reg */
+ NULL, /* Mode on ID for Roots */
+ NULL, /* Mode on ID for Admins */
+ NULL, /* Mode on ID for Opers */
+ "-r", /* Mode on UnReg */
+ "-r", /* Mode on Nick Change */
+ 1, /* Supports SGlines */
+ 1, /* Supports SQlines */
+ 1, /* Supports SZlines */
+ 1, /* Supports Halfop +h */
+ 4, /* Number of server args */
+ 0, /* Join 2 Set */
+ 1, /* Join 2 Message */
+ 0, /* Has exceptions +e */
+ 1, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ 0, /* Protected Umode */
+ 0, /* Has Admin */
+ 0, /* Chan SQlines */
+ 0, /* Quit on Kill */
+ 0, /* SVSMODE unban */
+ 1, /* Has Protect */
+ 1, /* Reverse */
+ 1, /* Chan Reg */
+ CMODE_r, /* Channel Mode */
+ 1, /* vidents */
+ 0, /* svshold */
+ 0, /* time stamp on mode */
+ 0, /* NICKIP */
+ 1, /* O:LINE */
+ 1, /* UMODE */
+ 1, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ CMODE_K, /* No Knock */
+ 0, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ UMODE_x, /* Vhost Mode */
+ 0, /* +f */
+ 1, /* +L */
+ CMODE_f,
+ CMODE_L,
+ 0,
+ 1, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support inspircd TOKENS */
+ 0, /* TIME STAMPS are BASE64 */
+ 0, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* 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 */
+ 0, /* reports sync state */
+ 1, /* CIDR channelbans */
+ "$", /* TLD Prefix for Global */
+ }
+ ,
+ {NULL}
};
IRCDCAPAB myIrcdcap[] = {
- {
- CAPAB_NOQUIT, /* NOQUIT */
- 0, /* TSMODE */
- 1, /* UNCONNECT */
- 0, /* NICKIP */
- 0, /* SJOIN */
- 0, /* 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 */
- 0, /* TOKEN */
- 0, /* VHOST */
- CAPAB_SSJ3, /* SSJ3 */
- CAPAB_NICK2, /* NICK2 */
- 0, /* UMODE2 */
- CAPAB_VL, /* VL */
- CAPAB_TLKEXT, /* TLKEXT */
- 0, /* DODKEY */
- 0, /* DOZIP */
- 0,
- 0, 0}
+ {
+ CAPAB_NOQUIT, /* NOQUIT */
+ 0, /* TSMODE */
+ 1, /* UNCONNECT */
+ 0, /* NICKIP */
+ 0, /* SJOIN */
+ 0, /* 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 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ CAPAB_SSJ3, /* SSJ3 */
+ CAPAB_NICK2, /* NICK2 */
+ 0, /* UMODE2 */
+ CAPAB_VL, /* VL */
+ CAPAB_TLKEXT, /* TLKEXT */
+ 0, /* DODKEY */
+ 0, /* DOZIP */
+ 0,
+ 0, 0}
};
unsigned long umodes[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, UMODE_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, UMODE_a, 0, 0, 0, 0, 0,
- UMODE_g,
- UMODE_h, UMODE_i, 0, 0, 0, 0, 0, UMODE_o,
- 0,
- 0, UMODE_r, 0, 0, 0, 0, UMODE_w,
- UMODE_x,
- 0,
- 0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, UMODE_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, UMODE_a, 0, 0, 0, 0, 0,
+ UMODE_g,
+ UMODE_h, UMODE_i, 0, 0, 0, 0, 0, UMODE_o,
+ 0,
+ 0, UMODE_r, 0, 0, 0, 0, UMODE_w,
+ UMODE_x,
+ 0,
+ 0,
+ 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 */
- 'a',
- 0, 0, 0, 0,
+ 0,
+ 0,
+ 0, 0, 0,
+ 'h', /* (37) % Channel halfops */
+ 'a',
+ 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,
+ '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, 'q', 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'q', 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}, {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},
- {add_ban, del_ban},
- {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}, {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},
+ {add_ban, del_ban},
+ {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}
};
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 */
- {CMODE_H, CBM_NO_USER_MLOCK, NULL, NULL},
- {0}, /* I */
- {0}, /* J */
- {CMODE_K, 0, NULL, NULL}, /* K */
- {CMODE_L, 0, set_redirect, cs_set_redirect},
- {0}, /* 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 */
- {0}, /* 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 */
- {0}, /* f */
- {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 */
+ {CMODE_H, CBM_NO_USER_MLOCK, NULL, NULL},
+ {0}, /* I */
+ {0}, /* J */
+ {CMODE_K, 0, NULL, NULL}, /* K */
+ {CMODE_L, 0, set_redirect, cs_set_redirect},
+ {0}, /* 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 */
+ {0}, /* 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 */
+ {0}, /* f */
+ {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[] = {
- {'f', CMODE_f, 0, NULL, NULL},
- {'c', CMODE_c, 0, NULL, NULL},
- {'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},
- {'H', CMODE_H, 0, NULL, NULL},
- {'K', CMODE_K, 0, NULL, NULL},
- {'L', CMODE_L, 0, get_redirect, cs_get_redirect},
- {'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},
- {'V', CMODE_V, 0, NULL, NULL},
- {0}
+ {'f', CMODE_f, 0, NULL, NULL},
+ {'c', CMODE_c, 0, NULL, NULL},
+ {'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},
+ {'H', CMODE_H, 0, NULL, NULL},
+ {'K', CMODE_K, 0, NULL, NULL},
+ {'L', CMODE_L, 0, get_redirect, cs_get_redirect},
+ {'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},
+ {'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}
};
static int has_servicesmod = 0;
@@ -415,22 +415,22 @@ static int has_inviteexceptionmod = 0;
/* CHGHOST */
void inspircd_cmd_chghost(const char *nick, const char *vhost)
{
- if (has_chghostmod == 1) {
- if (!nick || !vhost) {
- return;
- }
- send_cmd(s_OperServ, "CHGHOST %s %s", nick, vhost);
- } else {
+ if (has_chghostmod == 1) {
+ if (!nick || !vhost) {
+ return;
+ }
+ send_cmd(s_OperServ, "CHGHOST %s %s", nick, vhost);
+ } else {
ircdproto->SendGlobops(s_OperServ, "CHGHOST not loaded!");
- }
+ }
}
int anope_event_idle(const char *source, int ac, const char **av)
{
- if (ac == 1) {
- send_cmd(av[0], "IDLE %s %ld 0", source, (long int) time(NULL));
- }
- return MOD_CONT;
+ if (ac == 1) {
+ send_cmd(av[0], "IDLE %s %ld 0", source, (long int) time(NULL));
+ }
+ return MOD_CONT;
}
static char currentpass[1024];
@@ -438,7 +438,7 @@ static char currentpass[1024];
/* PASS */
void inspircd_cmd_pass(const char *pass)
{
- strncpy(currentpass, pass, 1024);
+ strncpy(currentpass, pass, 1024);
}
@@ -695,623 +695,623 @@ class InspIRCdProto : public IRCDProto
int anope_event_ftopic(const char *source, int ac, const char **av)
{
- /* :source FTOPIC channel ts setby :topic */
- const char *temp;
- if (ac < 4)
- return MOD_CONT;
- temp = av[1]; /* temp now holds ts */
- av[1] = av[2]; /* av[1] now holds set by */
- av[2] = temp; /* av[2] now holds ts */
- do_topic(source, ac, av);
- return MOD_CONT;
+ /* :source FTOPIC channel ts setby :topic */
+ const char *temp;
+ if (ac < 4)
+ return MOD_CONT;
+ temp = av[1]; /* temp now holds ts */
+ av[1] = av[2]; /* av[1] now holds set by */
+ av[2] = temp; /* av[2] now holds ts */
+ do_topic(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 {
- /* InspIRCd lets opers change another
- users modes, we have to kludge this
- as it slightly breaks RFC1459
- */
- if (!strcasecmp(source, av[0])) {
- do_umode(source, ac, av);
- } else {
- do_umode(av[0], ac, av);
- }
- }
- return MOD_CONT;
+ if (ac < 2)
+ return MOD_CONT;
+
+ if (*av[0] == '#' || *av[0] == '&') {
+ do_cmode(source, ac, av);
+ } else {
+ /* InspIRCd lets opers change another
+ users modes, we have to kludge this
+ as it slightly breaks RFC1459
+ */
+ if (!strcasecmp(source, av[0])) {
+ do_umode(source, ac, av);
+ } else {
+ do_umode(av[0], ac, av);
+ }
+ }
+ return MOD_CONT;
}
int anope_event_opertype(const char *source, int ac, const char **av)
{
- /* opertype is equivalent to mode +o because servers
- dont do this directly */
- User *u;
- u = finduser(source);
- if (u && !is_oper(u)) {
- const char *newav[2];
- newav[0] = source;
- newav[1] = "+o";
- return anope_event_mode(source, 2, newav);
- } else
- return MOD_CONT;
+ /* opertype is equivalent to mode +o because servers
+ dont do this directly */
+ User *u;
+ u = finduser(source);
+ if (u && !is_oper(u)) {
+ const char *newav[2];
+ newav[0] = source;
+ newav[1] = "+o";
+ return anope_event_mode(source, 2, newav);
+ } else
+ return MOD_CONT;
}
int anope_event_fmode(const char *source, int ac, const char **av)
{
- const char *newav[25];
- int n, o;
- Channel *c;
-
- /* :source FMODE #test 12345678 +nto foo */
- if (ac < 3)
- return MOD_CONT;
-
- /* Checking the TS for validity to avoid desyncs */
- if ((c = findchan(av[0]))) {
- if (c->creation_time > strtol(av[1], NULL, 10)) {
- /* Our TS is bigger, we should lower it */
- c->creation_time = strtol(av[1], NULL, 10);
- } else if (c->creation_time < strtol(av[1], NULL, 10)) {
- /* The TS we got is bigger, we should ignore this message. */
- return MOD_CONT;
- }
- } else {
- /* Got FMODE for a non-existing channel */
- return MOD_CONT;
- }
-
- /* TS's are equal now, so we can proceed with parsing */
- n = o = 0;
- while (n < ac) {
- if (n != 1) {
- newav[o] = av[n];
- o++;
- if (debug)
- alog("Param: %s", newav[o - 1]);
- }
- n++;
- }
-
- return anope_event_mode(source, ac - 1, newav);
+ const char *newav[25];
+ int n, o;
+ Channel *c;
+
+ /* :source FMODE #test 12345678 +nto foo */
+ if (ac < 3)
+ return MOD_CONT;
+
+ /* Checking the TS for validity to avoid desyncs */
+ if ((c = findchan(av[0]))) {
+ if (c->creation_time > strtol(av[1], NULL, 10)) {
+ /* Our TS is bigger, we should lower it */
+ c->creation_time = strtol(av[1], NULL, 10);
+ } else if (c->creation_time < strtol(av[1], NULL, 10)) {
+ /* The TS we got is bigger, we should ignore this message. */
+ return MOD_CONT;
+ }
+ } else {
+ /* Got FMODE for a non-existing channel */
+ return MOD_CONT;
+ }
+
+ /* TS's are equal now, so we can proceed with parsing */
+ n = o = 0;
+ while (n < ac) {
+ if (n != 1) {
+ newav[o] = av[n];
+ o++;
+ if (debug)
+ alog("Param: %s", newav[o - 1]);
+ }
+ n++;
+ }
+
+ return anope_event_mode(source, ac - 1, newav);
}
int anope_event_fjoin(const char *source, int ac, const char **av)
{
- const char *newav[10];
-
- /* value used for myStrGetToken */
- int curtoken = 0;
-
- /* storing the current nick */
- char *curnick;
-
- /* these are used to generate the final string that is passed to ircservices' core */
- int nlen = 0;
- char nicklist[514];
-
- /* temporary buffer */
- char prefixandnick[60];
-
- *nicklist = '\0';
- *prefixandnick = '\0';
-
- if (ac < 3)
- return MOD_CONT;
-
- curnick = myStrGetToken(av[2], ' ', curtoken);
- while (curnick != NULL) {
- for (; *curnick; curnick++) {
- /* I bet theres a better way to do this... */
- if ((*curnick == '&') ||
- (*curnick == '~') || (*curnick == '@') || (*curnick == '%')
- || (*curnick == '+')) {
- prefixandnick[nlen++] = *curnick;
- continue;
- } else {
- if (*curnick == ',') {
- curnick++;
- strncpy(prefixandnick + nlen, curnick,
- sizeof(prefixandnick) - nlen);
- break;
- } else {
- alog("fjoin: unrecognised prefix: %c", *curnick);
- }
- }
- }
- strncat(nicklist, prefixandnick, 513);
- strncat(nicklist, " ", 513);
- curtoken++;
- curnick = myStrGetToken(av[2], ' ', curtoken);
- nlen = 0;
- }
-
- newav[0] = av[1]; /* timestamp */
- newav[1] = av[0]; /* channel name */
- newav[2] = "+"; /* channel modes */
- newav[3] = nicklist;
- do_sjoin(source, 4, newav);
-
- return MOD_CONT;
+ const char *newav[10];
+
+ /* value used for myStrGetToken */
+ int curtoken = 0;
+
+ /* storing the current nick */
+ char *curnick;
+
+ /* these are used to generate the final string that is passed to ircservices' core */
+ int nlen = 0;
+ char nicklist[514];
+
+ /* temporary buffer */
+ char prefixandnick[60];
+
+ *nicklist = '\0';
+ *prefixandnick = '\0';
+
+ if (ac < 3)
+ return MOD_CONT;
+
+ curnick = myStrGetToken(av[2], ' ', curtoken);
+ while (curnick != NULL) {
+ for (; *curnick; curnick++) {
+ /* I bet theres a better way to do this... */
+ if ((*curnick == '&') ||
+ (*curnick == '~') || (*curnick == '@') || (*curnick == '%')
+ || (*curnick == '+')) {
+ prefixandnick[nlen++] = *curnick;
+ continue;
+ } else {
+ if (*curnick == ',') {
+ curnick++;
+ strncpy(prefixandnick + nlen, curnick,
+ sizeof(prefixandnick) - nlen);
+ break;
+ } else {
+ alog("fjoin: unrecognised prefix: %c", *curnick);
+ }
+ }
+ }
+ strncat(nicklist, prefixandnick, 513);
+ strncat(nicklist, " ", 513);
+ curtoken++;
+ curnick = myStrGetToken(av[2], ' ', curtoken);
+ nlen = 0;
+ }
+
+ newav[0] = av[1]; /* timestamp */
+ newav[1] = av[0]; /* channel name */
+ newav[2] = "+"; /* channel modes */
+ newav[3] = nicklist;
+ do_sjoin(source, 4, newav);
+
+ return MOD_CONT;
}
/* Events */
int anope_event_ping(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- ircdproto->SendPong(ServerName, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ ircdproto->SendPong(ServerName, av[0]);
+ 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;
}
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;
}
/* Taken from hybrid.c, topic syntax is identical */
int anope_event_topic(const char *source, int ac, const char **av)
{
- Channel *c = findchan(av[0]);
- time_t topic_time = time(NULL);
-
- if (!c) {
- if (debug) {
- alog("debug: TOPIC %s for nonexistent channel %s",
- merge_args(ac - 1, av + 1), av[0]);
- }
- return MOD_CONT;
- }
-
- if (check_topiclock(c, topic_time))
- return MOD_CONT;
-
- if (c->topic) {
- free(c->topic);
- c->topic = NULL;
- }
- if (ac > 1 && *av[1])
- c->topic = sstrdup(av[1]);
-
- strscpy(c->topic_setter, source, sizeof(c->topic_setter));
- c->topic_time = topic_time;
-
- record_topic(av[0]);
-
- if (ac > 1 && *av[1])
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
- else
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
-
- return MOD_CONT;
+ Channel *c = findchan(av[0]);
+ time_t topic_time = time(NULL);
+
+ if (!c) {
+ if (debug) {
+ alog("debug: TOPIC %s for nonexistent channel %s",
+ merge_args(ac - 1, av + 1), av[0]);
+ }
+ return MOD_CONT;
+ }
+
+ if (check_topiclock(c, topic_time))
+ return MOD_CONT;
+
+ if (c->topic) {
+ free(c->topic);
+ c->topic = NULL;
+ }
+ if (ac > 1 && *av[1])
+ c->topic = sstrdup(av[1]);
+
+ strscpy(c->topic_setter, source, sizeof(c->topic_setter));
+ c->topic_time = topic_time;
+
+ record_topic(av[0]);
+
+ if (ac > 1 && *av[1])
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
+ else
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
+
+ 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_rsquit(const char *source, int ac, const char **av)
{
- if (ac < 1 || ac > 3)
- return MOD_CONT;
+ if (ac < 1 || ac > 3)
+ return MOD_CONT;
- /* Horrible workaround to an insp bug (#) in how RSQUITs are sent - mark */
- if (ac > 1 && strcmp(ServerName, av[0]) == 0)
- do_squit(source, ac - 1, av + 1);
- else
- do_squit(source, ac, av);
+ /* Horrible workaround to an insp bug (#) in how RSQUITs are sent - mark */
+ if (ac > 1 && strcmp(ServerName, av[0]) == 0)
+ do_squit(source, ac - 1, av + 1);
+ else
+ do_squit(source, ac, av);
- return MOD_CONT;
+ 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_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 != 2)
- return MOD_CONT;
- do_join(source, ac, av);
- return MOD_CONT;
+ if (ac != 2)
+ 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(source);
- if (!u) {
- if (debug) {
- alog("debug: FNAME for nonexistent user %s", source);
- }
- return MOD_CONT;
- }
+ u = finduser(source);
+ if (!u) {
+ if (debug) {
+ alog("debug: FNAME 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_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;
}
int anope_event_nick(const char *source, int ac, const char **av)
{
- User *user;
- struct in_addr addy;
- uint32 *ad = (uint32 *) & addy;
+ User *user;
+ struct in_addr addy;
+ uint32 *ad = (uint32 *) & addy;
- if (ac != 1) {
- if (ac == 8) {
+ if (ac != 1) {
+ if (ac == 8) {
int svid = 0;
int ts = strtoul(av[0], NULL, 10);
if (strchr(av[5], 'r') != NULL)
svid = ts;
- inet_aton(av[6], &addy);
- user = do_nick("", av[1], /* nick */
- av[4], /* username */
- av[2], /* realhost */
- source, /* server */
- av[7], /* realname */
- ts, svid, htonl(*ad), av[3], NULL);
- if (user) {
- ircdproto->ProcessUsermodes(user, 1, &av[5]);
+ inet_aton(av[6], &addy);
+ user = do_nick("", av[1], /* nick */
+ av[4], /* username */
+ av[2], /* realhost */
+ source, /* server */
+ av[7], /* realname */
+ ts, svid, htonl(*ad), av[3], NULL);
+ if (user) {
+ ircdproto->ProcessUsermodes(user, 1, &av[5]);
user->chost = av[3];
}
- }
- } else {
- do_nick(source, av[0], NULL, NULL, NULL, NULL, 0, 0, 0, NULL,
- NULL);
- }
- return MOD_CONT;
+ }
+ } else {
+ do_nick(source, av[0], NULL, NULL, NULL, NULL, 0, 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 != 1)
- return MOD_CONT;
+ if (ac != 1)
+ return MOD_CONT;
- u = finduser(source);
- if (!u) {
- if (debug) {
- alog("debug: FHOST for nonexistent user %s", source);
- }
- return MOD_CONT;
- }
+ u = finduser(source);
+ if (!u) {
+ if (debug) {
+ alog("debug: FHOST for nonexistent user %s", source);
+ }
+ return MOD_CONT;
+ }
- u->SetDisplayedHost(av[0]);
- return MOD_CONT;
+ u->SetDisplayedHost(av[0]);
+ return MOD_CONT;
}
/* EVENT: SERVER */
int anope_event_server(const char *source, int ac, const char **av)
{
- if (!stricmp(av[1], "1")) {
- uplink = sstrdup(av[0]);
- }
- do_server(source, av[0], av[1], av[2], NULL);
- return MOD_CONT;
+ if (!stricmp(av[1], "1")) {
+ uplink = sstrdup(av[0]);
+ }
+ 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_capab(const char *source, int ac, const char **av)
{
- int argc;
- CBModeInfo *cbmi;
+ int argc;
+ CBModeInfo *cbmi;
- if (strcasecmp(av[0], "START") == 0) {
- /* reset CAPAB */
- has_servicesmod = 0;
- has_globopsmod = 0;
+ if (strcasecmp(av[0], "START") == 0) {
+ /* reset CAPAB */
+ has_servicesmod = 0;
+ has_globopsmod = 0;
has_svsholdmod = 0;
has_chghostmod = 0;
has_chgidentmod = 0;
- } else if (strcasecmp(av[0], "MODULES") == 0) {
- if (strstr(av[1], "m_globops.so")) {
- has_globopsmod = 1;
- }
- if (strstr(av[1], "m_services.so")) {
- has_servicesmod = 1;
- }
+ } else if (strcasecmp(av[0], "MODULES") == 0) {
+ if (strstr(av[1], "m_globops.so")) {
+ has_globopsmod = 1;
+ }
+ if (strstr(av[1], "m_services.so")) {
+ has_servicesmod = 1;
+ }
if (strstr(av[1], "m_svshold.so")) {
- has_svsholdmod = 1;
- }
+ has_svsholdmod = 1;
+ }
if (strstr(av[1], "m_chghost.so")) {
- has_chghostmod = 1;
- }
+ has_chghostmod = 1;
+ }
if (strstr(av[1], "m_chgident.so")) {
- has_chgidentmod = 1;
- }
- if (strstr(av[1], "m_messageflood.so")) {
- has_messagefloodmod = 1;
- }
- if (strstr(av[1], "m_banexception.so")) {
- has_banexceptionmod = 1;
- }
- if (strstr(av[1], "m_inviteexception.so")) {
- has_inviteexceptionmod = 1;
- }
- } else if (strcasecmp(av[0], "END") == 0) {
- if (!has_globopsmod) {
- send_cmd(NULL,
- "ERROR :m_globops is not loaded. This is required by Anope");
- quitmsg = "Remote server does not have the m_globops module loaded, and this is required.";
- quitting = 1;
- return MOD_STOP;
- }
- if (!has_servicesmod) {
- send_cmd(NULL,
- "ERROR :m_services is not loaded. This is required by Anope");
- quitmsg = "Remote server does not have the m_services module loaded, and this is required.";
- quitting = 1;
- return MOD_STOP;
- }
- if (!has_svsholdmod) {
- ircdproto->SendGlobops(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
- }
- if (!has_chghostmod) {
- ircdproto->SendGlobops(s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
- }
- if (!has_chgidentmod) {
- ircdproto->SendGlobops(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
- }
- if (has_messagefloodmod) {
- cbmi = myCbmodeinfos;
-
- /* Find 'f' in myCbmodeinfos and add the relevant bits to myCbmodes and myCbmodeinfos
- * to enable +f support if found. This is needed because we're really not set up to
- * handle modular ircds which can have modes enabled/disabled as they please :( - mark
- */
- while ((cbmi->mode != 'f')) {
- cbmi++;
- }
- if (cbmi) {
- cbmi->getvalue = get_flood;
- cbmi->csgetvalue = cs_get_flood;
-
- myCbmodes['f'].flag = CMODE_f;
- myCbmodes['f'].flags = 0;
- myCbmodes['f'].setvalue = set_flood;
- myCbmodes['f'].cssetvalue = cs_set_flood;
-
- pmodule_ircd_cbmodeinfos(myCbmodeinfos);
- pmodule_ircd_cbmodes(myCbmodes);
-
- ircd->fmode = 1;
- }
- else {
- alog("Support for channelmode +f can not be enabled");
- if (debug) {
- alog("debug: 'f' missing from myCbmodeinfos");
- }
- }
- }
- if (has_banexceptionmod) {
- myCmmodes['e'].addmask = add_exception;
- myCmmodes['e'].delmask = del_exception;
- ircd->except = 1;
- }
- if (has_inviteexceptionmod) {
- myCmmodes['I'].addmask = add_invite;
- myCmmodes['I'].delmask = del_invite;
- ircd->invitemode = 1;
- }
- ircd->svshold = has_svsholdmod;
-
- if (has_banexceptionmod || has_inviteexceptionmod) {
- pmodule_ircd_cmmodes(myCmmodes);
- }
-
- /* Generate a fake capabs parsing call so things like NOQUIT work
- * fine. It's ugly, but it works....
- */
- argc = 6;
+ has_chgidentmod = 1;
+ }
+ if (strstr(av[1], "m_messageflood.so")) {
+ has_messagefloodmod = 1;
+ }
+ if (strstr(av[1], "m_banexception.so")) {
+ has_banexceptionmod = 1;
+ }
+ if (strstr(av[1], "m_inviteexception.so")) {
+ has_inviteexceptionmod = 1;
+ }
+ } else if (strcasecmp(av[0], "END") == 0) {
+ if (!has_globopsmod) {
+ send_cmd(NULL,
+ "ERROR :m_globops is not loaded. This is required by Anope");
+ quitmsg = "Remote server does not have the m_globops module loaded, and this is required.";
+ quitting = 1;
+ return MOD_STOP;
+ }
+ if (!has_servicesmod) {
+ send_cmd(NULL,
+ "ERROR :m_services is not loaded. This is required by Anope");
+ quitmsg = "Remote server does not have the m_services module loaded, and this is required.";
+ quitting = 1;
+ return MOD_STOP;
+ }
+ if (!has_svsholdmod) {
+ ircdproto->SendGlobops(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
+ }
+ if (!has_chghostmod) {
+ ircdproto->SendGlobops(s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
+ }
+ if (!has_chgidentmod) {
+ ircdproto->SendGlobops(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
+ }
+ if (has_messagefloodmod) {
+ cbmi = myCbmodeinfos;
+
+ /* Find 'f' in myCbmodeinfos and add the relevant bits to myCbmodes and myCbmodeinfos
+ * to enable +f support if found. This is needed because we're really not set up to
+ * handle modular ircds which can have modes enabled/disabled as they please :( - mark
+ */
+ while ((cbmi->mode != 'f')) {
+ cbmi++;
+ }
+ if (cbmi) {
+ cbmi->getvalue = get_flood;
+ cbmi->csgetvalue = cs_get_flood;
+
+ myCbmodes['f'].flag = CMODE_f;
+ myCbmodes['f'].flags = 0;
+ myCbmodes['f'].setvalue = set_flood;
+ myCbmodes['f'].cssetvalue = cs_set_flood;
+
+ pmodule_ircd_cbmodeinfos(myCbmodeinfos);
+ pmodule_ircd_cbmodes(myCbmodes);
+
+ ircd->fmode = 1;
+ }
+ else {
+ alog("Support for channelmode +f can not be enabled");
+ if (debug) {
+ alog("debug: 'f' missing from myCbmodeinfos");
+ }
+ }
+ }
+ if (has_banexceptionmod) {
+ myCmmodes['e'].addmask = add_exception;
+ myCmmodes['e'].delmask = del_exception;
+ ircd->except = 1;
+ }
+ if (has_inviteexceptionmod) {
+ myCmmodes['I'].addmask = add_invite;
+ myCmmodes['I'].delmask = del_invite;
+ ircd->invitemode = 1;
+ }
+ ircd->svshold = has_svsholdmod;
+
+ if (has_banexceptionmod || has_inviteexceptionmod) {
+ pmodule_ircd_cmmodes(myCmmodes);
+ }
+
+ /* Generate a fake capabs parsing call so things like NOQUIT work
+ * fine. It's ugly, but it works....
+ */
+ argc = 6;
const char *argv[] = {"NOQUIT", "SSJ3", "NICK2", "VL", "TLKEXT", "UNCONNECT"};
- capab_parse(argc, argv);
- }
- return MOD_CONT;
+ capab_parse(argc, argv);
+ }
+ 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("JOIN", anope_event_join); addCoreMessage(IRCD,m);
- m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
- m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
- m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
- m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
- m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
- m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
- m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
- m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
- m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
- m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
- m = createMessage("RSQUIT", anope_event_rsquit); addCoreMessage(IRCD,m);
- m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
- m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
- m = createMessage("SVSMODE", anope_event_mode) ;addCoreMessage(IRCD,m);
- m = createMessage("FHOST", anope_event_chghost); addCoreMessage(IRCD,m);
- m = createMessage("CHGIDENT", anope_event_chgident); addCoreMessage(IRCD,m);
- m = createMessage("FNAME", anope_event_chgname); addCoreMessage(IRCD,m);
- m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m);
- m = createMessage("SETIDENT", anope_event_setident); addCoreMessage(IRCD,m);
- m = createMessage("SETNAME", anope_event_setname); addCoreMessage(IRCD,m);
- m = createMessage("FJOIN", anope_event_fjoin); addCoreMessage(IRCD,m);
- m = createMessage("FMODE", anope_event_fmode); addCoreMessage(IRCD,m);
- m = createMessage("FTOPIC", anope_event_ftopic); addCoreMessage(IRCD,m);
- m = createMessage("OPERTYPE", anope_event_opertype); addCoreMessage(IRCD,m);
- m = createMessage("IDLE", anope_event_idle); 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("JOIN", anope_event_join); addCoreMessage(IRCD,m);
+ m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
+ m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
+ m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
+ m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
+ m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
+ m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
+ m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
+ m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
+ m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
+ m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("RSQUIT", anope_event_rsquit); addCoreMessage(IRCD,m);
+ m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
+ m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
+ m = createMessage("SVSMODE", anope_event_mode) ;addCoreMessage(IRCD,m);
+ m = createMessage("FHOST", anope_event_chghost); addCoreMessage(IRCD,m);
+ m = createMessage("CHGIDENT", anope_event_chgident); addCoreMessage(IRCD,m);
+ m = createMessage("FNAME", anope_event_chgname); addCoreMessage(IRCD,m);
+ m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m);
+ m = createMessage("SETIDENT", anope_event_setident); addCoreMessage(IRCD,m);
+ m = createMessage("SETNAME", anope_event_setname); addCoreMessage(IRCD,m);
+ m = createMessage("FJOIN", anope_event_fjoin); addCoreMessage(IRCD,m);
+ m = createMessage("FMODE", anope_event_fmode); addCoreMessage(IRCD,m);
+ m = createMessage("FTOPIC", anope_event_ftopic); addCoreMessage(IRCD,m);
+ m = createMessage("OPERTYPE", anope_event_opertype); addCoreMessage(IRCD,m);
+ m = createMessage("IDLE", anope_event_idle); addCoreMessage(IRCD,m);
}
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp
index d70c2019d..d10da6392 100644
--- a/src/protocol/inspircd12.cpp
+++ b/src/protocol/inspircd12.cpp
@@ -64,338 +64,338 @@
#include "winsock.h"
int inet_aton(const char *name, struct in_addr *addr)
{
- uint32 a = inet_addr(name);
- addr->s_addr = a;
- return a != (uint32) - 1;
+ uint32 a = inet_addr(name);
+ addr->s_addr = a;
+ return a != (uint32) - 1;
}
#endif
IRCDVar myIrcd[] = {
- {"InspIRCd 1.2", /* ircd name */
- "+I", /* Modes used by pseudoclients */
- 5, /* Chan Max Symbols */
- "-cilmnpstuzACGHKNOQRSV", /* 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 */
- "+r", /* Mode On Reg */
- NULL, /* Mode on ID for Roots */
- NULL, /* Mode on ID for Admins */
- NULL, /* Mode on ID for Opers */
- "-r", /* Mode on UnReg */
- "-r", /* Mode on Nick Change */
- 1, /* Supports SGlines */
- 1, /* Supports SQlines */
- 1, /* Supports SZlines */
- 1, /* Supports Halfop +h */
- 4, /* Number of server args */
- 0, /* Join 2 Set */
- 1, /* Join 2 Message */
- 0, /* Has exceptions +e */
- 1, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- 0, /* Protected Umode */
- 0, /* Has Admin */
- 0, /* Chan SQlines */
- 0, /* Quit on Kill */
- 0, /* SVSMODE unban */
- 1, /* Has Protect */
- 1, /* Reverse */
- 1, /* Chan Reg */
- CMODE_r, /* Channel Mode */
- 1, /* vidents */
- 0, /* svshold */
- 0, /* time stamp on mode */
- 0, /* NICKIP */
- 1, /* O:LINE */
- 1, /* UMODE */
- 1, /* VHOST ON NICK */
- 0, /* Change RealName */
- CMODE_K, /* No Knock */
- 0, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- UMODE_x, /* Vhost Mode */
- 0, /* +f */
- 1, /* +L */
- CMODE_f,
- CMODE_L,
- 0,
- 1, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support inspircd TOKENS */
- 0, /* TIME STAMPS are BASE64 */
- 0, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* Can remove User Channel Modes with SVSMODE */
- 0, /* Sglines are not enforced until user reconnects */
- "x", /* vhost char */
- 1, /* ts6 */
- 1, /* support helper umode */
- 0, /* p10 */
- NULL, /* character set */
- 0, /* reports sync state */
- 1, /* CIDR channelbans */
- "$", /* TLD Prefix for Global */
- }
- ,
- {NULL}
+ {"InspIRCd 1.2", /* ircd name */
+ "+I", /* Modes used by pseudoclients */
+ 5, /* Chan Max Symbols */
+ "-cilmnpstuzACGHKNOQRSV", /* 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 */
+ "+r", /* Mode On Reg */
+ NULL, /* Mode on ID for Roots */
+ NULL, /* Mode on ID for Admins */
+ NULL, /* Mode on ID for Opers */
+ "-r", /* Mode on UnReg */
+ "-r", /* Mode on Nick Change */
+ 1, /* Supports SGlines */
+ 1, /* Supports SQlines */
+ 1, /* Supports SZlines */
+ 1, /* Supports Halfop +h */
+ 4, /* Number of server args */
+ 0, /* Join 2 Set */
+ 1, /* Join 2 Message */
+ 0, /* Has exceptions +e */
+ 1, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ 0, /* Protected Umode */
+ 0, /* Has Admin */
+ 0, /* Chan SQlines */
+ 0, /* Quit on Kill */
+ 0, /* SVSMODE unban */
+ 1, /* Has Protect */
+ 1, /* Reverse */
+ 1, /* Chan Reg */
+ CMODE_r, /* Channel Mode */
+ 1, /* vidents */
+ 0, /* svshold */
+ 0, /* time stamp on mode */
+ 0, /* NICKIP */
+ 1, /* O:LINE */
+ 1, /* UMODE */
+ 1, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ CMODE_K, /* No Knock */
+ 0, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ UMODE_x, /* Vhost Mode */
+ 0, /* +f */
+ 1, /* +L */
+ CMODE_f,
+ CMODE_L,
+ 0,
+ 1, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support inspircd TOKENS */
+ 0, /* TIME STAMPS are BASE64 */
+ 0, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* Can remove User Channel Modes with SVSMODE */
+ 0, /* Sglines are not enforced until user reconnects */
+ "x", /* vhost char */
+ 1, /* ts6 */
+ 1, /* support helper umode */
+ 0, /* p10 */
+ NULL, /* character set */
+ 0, /* reports sync state */
+ 1, /* CIDR channelbans */
+ "$", /* TLD Prefix for Global */
+ }
+ ,
+ {NULL}
};
IRCDCAPAB myIrcdcap[] = {
- {
- CAPAB_NOQUIT, /* NOQUIT */
- 0, /* TSMODE */
- 1, /* UNCONNECT */
- 0, /* NICKIP */
- 0, /* SJOIN */
- 0, /* 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 */
- 0, /* TOKEN */
- 0, /* VHOST */
- CAPAB_SSJ3, /* SSJ3 */
- CAPAB_NICK2, /* NICK2 */
- 0, /* UMODE2 */
- CAPAB_VL, /* VL */
- CAPAB_TLKEXT, /* TLKEXT */
- 0, /* DODKEY */
- 0, /* DOZIP */
- 0,
- 0, 0}
+ {
+ CAPAB_NOQUIT, /* NOQUIT */
+ 0, /* TSMODE */
+ 1, /* UNCONNECT */
+ 0, /* NICKIP */
+ 0, /* SJOIN */
+ 0, /* 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 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ CAPAB_SSJ3, /* SSJ3 */
+ CAPAB_NICK2, /* NICK2 */
+ 0, /* UMODE2 */
+ CAPAB_VL, /* VL */
+ CAPAB_TLKEXT, /* TLKEXT */
+ 0, /* DODKEY */
+ 0, /* DOZIP */
+ 0,
+ 0, 0}
};
unsigned long umodes[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, UMODE_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, UMODE_a, 0, 0, 0, 0, 0,
- UMODE_g,
- UMODE_h, UMODE_i, 0, 0, 0, 0, 0, UMODE_o,
- 0,
- 0, UMODE_r, 0, 0, 0, 0, UMODE_w,
- UMODE_x,
- 0,
- 0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, UMODE_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, UMODE_a, 0, 0, 0, 0, 0,
+ UMODE_g,
+ UMODE_h, UMODE_i, 0, 0, 0, 0, 0, UMODE_o,
+ 0,
+ 0, UMODE_r, 0, 0, 0, 0, UMODE_w,
+ UMODE_x,
+ 0,
+ 0,
+ 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 */
- 'a',
- 0, 0, 0, 0,
+ 0,
+ 0,
+ 0, 0, 0,
+ 'h', /* (37) % Channel halfops */
+ 'a',
+ 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,
+ '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, 'q', 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'q', 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}, {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},
- {add_ban, del_ban},
- {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}, {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},
+ {add_ban, del_ban},
+ {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}
};
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 */
- {CMODE_H, CBM_NO_USER_MLOCK, NULL, NULL},
- {0}, /* I */
- {0}, /* J */
- {CMODE_K, 0, NULL, NULL}, /* K */
- {CMODE_L, 0, set_redirect, cs_set_redirect},
- {0}, /* 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 */
- {0}, /* 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 */
- {0}, /* f */
- {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 */
+ {CMODE_H, CBM_NO_USER_MLOCK, NULL, NULL},
+ {0}, /* I */
+ {0}, /* J */
+ {CMODE_K, 0, NULL, NULL}, /* K */
+ {CMODE_L, 0, set_redirect, cs_set_redirect},
+ {0}, /* 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 */
+ {0}, /* 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 */
+ {0}, /* f */
+ {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[] = {
- {'f', CMODE_f, 0, NULL, NULL},
- {'c', CMODE_c, 0, NULL, NULL},
- {'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},
- {'H', CMODE_H, 0, NULL, NULL},
- {'K', CMODE_K, 0, NULL, NULL},
- {'L', CMODE_L, 0, get_redirect, cs_get_redirect},
- {'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},
- {'V', CMODE_V, 0, NULL, NULL},
- {0}
+ {'f', CMODE_f, 0, NULL, NULL},
+ {'c', CMODE_c, 0, NULL, NULL},
+ {'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},
+ {'H', CMODE_H, 0, NULL, NULL},
+ {'K', CMODE_K, 0, NULL, NULL},
+ {'L', CMODE_L, 0, get_redirect, cs_get_redirect},
+ {'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},
+ {'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}
};
static int has_servicesmod = 0;
@@ -440,7 +440,7 @@ static char currentpass[1024];
/* PASS */
void inspircd_cmd_pass(const char *pass)
{
- strncpy(currentpass, pass, 1024);
+ strncpy(currentpass, pass, 1024);
}
@@ -702,87 +702,87 @@ class InspIRCdProto : public IRCDProto
int anope_event_ftopic(const char *source, int ac, const char **av)
{
- /* :source FTOPIC channel ts setby :topic */
- const char *temp;
- if (ac < 4)
- return MOD_CONT;
- temp = av[1]; /* temp now holds ts */
- av[1] = av[2]; /* av[1] now holds set by */
- av[2] = temp; /* av[2] now holds ts */
- do_topic(source, ac, av);
- return MOD_CONT;
+ /* :source FTOPIC channel ts setby :topic */
+ const char *temp;
+ if (ac < 4)
+ return MOD_CONT;
+ temp = av[1]; /* temp now holds ts */
+ av[1] = av[2]; /* av[1] now holds set by */
+ av[2] = temp; /* av[2] now holds ts */
+ do_topic(source, ac, av);
+ return MOD_CONT;
}
int anope_event_mode(const char *source, int ac, const char **av)
{
- if (*av[0] == '#' || *av[0] == '&') {
- do_cmode(source, ac, av);
- } else {
- /* InspIRCd lets opers change another
- users modes, we have to kludge this
- as it slightly breaks RFC1459
- */
- if (!strcasecmp(source, av[0])) {
- do_umode(source, ac, av);
- } else {
- do_umode(av[0], ac, av);
- }
- }
- return MOD_CONT;
+ if (*av[0] == '#' || *av[0] == '&') {
+ do_cmode(source, ac, av);
+ } else {
+ /* InspIRCd lets opers change another
+ users modes, we have to kludge this
+ as it slightly breaks RFC1459
+ */
+ if (!strcasecmp(source, av[0])) {
+ do_umode(source, ac, av);
+ } else {
+ do_umode(av[0], ac, av);
+ }
+ }
+ return MOD_CONT;
}
int anope_event_opertype(const char *source, int ac, const char **av)
{
- /* opertype is equivalent to mode +o because servers
- dont do this directly */
- User *u;
- u = finduser(source);
- if (u && !is_oper(u)) {
- const char *newav[2];
- newav[0] = source;
- newav[1] = "+o";
- return anope_event_mode(source, 2, newav);
- } else
- return MOD_CONT;
+ /* opertype is equivalent to mode +o because servers
+ dont do this directly */
+ User *u;
+ u = finduser(source);
+ if (u && !is_oper(u)) {
+ const char *newav[2];
+ newav[0] = source;
+ newav[1] = "+o";
+ return anope_event_mode(source, 2, newav);
+ } else
+ return MOD_CONT;
}
int anope_event_fmode(const char *source, int ac, const char **av)
{
- const char *newav[25];
- int n, o;
- Channel *c;
-
- /* :source FMODE #test 12345678 +nto foo */
- if (ac < 3)
- return MOD_CONT;
-
- /* Checking the TS for validity to avoid desyncs */
- if ((c = findchan(av[0]))) {
- if (c->creation_time > strtol(av[1], NULL, 10)) {
- /* Our TS is bigger, we should lower it */
- c->creation_time = strtol(av[1], NULL, 10);
- } else if (c->creation_time < strtol(av[1], NULL, 10)) {
- /* The TS we got is bigger, we should ignore this message. */
- return MOD_CONT;
- }
- } else {
- /* Got FMODE for a non-existing channel */
- return MOD_CONT;
- }
-
- /* TS's are equal now, so we can proceed with parsing */
- n = o = 0;
- while (n < ac) {
- if (n != 1) {
- newav[o] = av[n];
- o++;
- if (debug)
- alog("Param: %s", newav[o - 1]);
- }
- n++;
- }
-
- return anope_event_mode(source, ac - 1, newav);
+ const char *newav[25];
+ int n, o;
+ Channel *c;
+
+ /* :source FMODE #test 12345678 +nto foo */
+ if (ac < 3)
+ return MOD_CONT;
+
+ /* Checking the TS for validity to avoid desyncs */
+ if ((c = findchan(av[0]))) {
+ if (c->creation_time > strtol(av[1], NULL, 10)) {
+ /* Our TS is bigger, we should lower it */
+ c->creation_time = strtol(av[1], NULL, 10);
+ } else if (c->creation_time < strtol(av[1], NULL, 10)) {
+ /* The TS we got is bigger, we should ignore this message. */
+ return MOD_CONT;
+ }
+ } else {
+ /* Got FMODE for a non-existing channel */
+ return MOD_CONT;
+ }
+
+ /* TS's are equal now, so we can proceed with parsing */
+ n = o = 0;
+ while (n < ac) {
+ if (n != 1) {
+ newav[o] = av[n];
+ o++;
+ if (debug)
+ alog("Param: %s", newav[o - 1]);
+ }
+ n++;
+ }
+
+ return anope_event_mode(source, ac - 1, newav);
}
/*
@@ -856,9 +856,9 @@ endnick:
nlen = 0;
}
- newav[0] = av[1]; /* timestamp */
- newav[1] = av[0]; /* channel name */
- newav[2] = av[2]; /* channel modes */ // XXX: this is incorrect, it doesn't take into account +L etc, modes which require params.. call FMODE instead? -- w00t
+ newav[0] = av[1]; /* timestamp */
+ newav[1] = av[0]; /* channel name */
+ newav[2] = av[2]; /* channel modes */ // XXX: this is incorrect, it doesn't take into account +L etc, modes which require params.. call FMODE instead? -- w00t
newav[3] = nicklist;
do_sjoin(source, 4, newav);
@@ -874,57 +874,57 @@ int anope_event_ping(const char *source, int ac, const char **av)
int anope_event_436(const char *source, int ac, const char **av)
{
- m_nickcoll(av[0]);
- return MOD_CONT;
+ m_nickcoll(av[0]);
+ return MOD_CONT;
}
int anope_event_away(const char *source, int ac, const char **av)
{
- m_away(source, (ac ? av[0] : NULL));
- return MOD_CONT;
+ m_away(source, (ac ? av[0] : NULL));
+ return MOD_CONT;
}
/* Taken from hybrid.c, topic syntax is identical */
int anope_event_topic(const char *source, int ac, const char **av)
{
- Channel *c = findchan(av[0]);
- time_t topic_time = time(NULL);
-
- if (!c) {
- if (debug) {
- alog("debug: TOPIC %s for nonexistent channel %s",
- merge_args(ac - 1, av + 1), av[0]);
- }
- return MOD_CONT;
- }
-
- if (check_topiclock(c, topic_time))
- return MOD_CONT;
-
- if (c->topic) {
- free(c->topic);
- c->topic = NULL;
- }
- if (ac > 1 && *av[1])
- c->topic = sstrdup(av[1]);
-
- strscpy(c->topic_setter, source, sizeof(c->topic_setter));
- c->topic_time = topic_time;
-
- record_topic(av[0]);
-
- if (ac > 1 && *av[1])
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
- else
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
-
- return MOD_CONT;
+ Channel *c = findchan(av[0]);
+ time_t topic_time = time(NULL);
+
+ if (!c) {
+ if (debug) {
+ alog("debug: TOPIC %s for nonexistent channel %s",
+ merge_args(ac - 1, av + 1), av[0]);
+ }
+ return MOD_CONT;
+ }
+
+ if (check_topiclock(c, topic_time))
+ return MOD_CONT;
+
+ if (c->topic) {
+ free(c->topic);
+ c->topic = NULL;
+ }
+ if (ac > 1 && *av[1])
+ c->topic = sstrdup(av[1]);
+
+ strscpy(c->topic_setter, source, sizeof(c->topic_setter));
+ c->topic_time = topic_time;
+
+ record_topic(av[0]);
+
+ if (ac > 1 && *av[1])
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
+ else
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
+
+ return MOD_CONT;
}
int anope_event_squit(const char *source, int ac, const char **av)
{
- do_squit(source, ac, av);
- return MOD_CONT;
+ do_squit(source, ac, av);
+ return MOD_CONT;
}
int anope_event_rsquit(const char *source, int ac, const char **av)
@@ -935,121 +935,121 @@ int anope_event_rsquit(const char *source, int ac, const char **av)
int anope_event_quit(const char *source, int ac, const char **av)
{
- do_quit(source, ac, av);
- return MOD_CONT;
+ do_quit(source, ac, av);
+ return MOD_CONT;
}
int anope_event_kill(const char *source, int ac, const char **av)
{
- 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)
{
- do_kick(source, ac, av);
- return MOD_CONT;
+ do_kick(source, ac, av);
+ return MOD_CONT;
}
int anope_event_join(const char *source, int ac, const char **av)
{
- do_join(source, ac, av);
- return MOD_CONT;
+ do_join(source, ac, av);
+ return MOD_CONT;
}
int anope_event_motd(const char *source, int ac, const char **av)
{
- 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;
-
- 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;
+ User *u;
+
+ 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;
}
int anope_event_chgname(const char *source, int ac, const char **av)
{
- User *u;
-
- u = finduser(source);
- if (!u) {
- if (debug) {
- alog("debug: FNAME for nonexistent user %s", source);
- }
- return MOD_CONT;
- }
-
- u->SetRealname(av[0]);
- return MOD_CONT;
+ User *u;
+
+ u = finduser(source);
+ if (!u) {
+ if (debug) {
+ alog("debug: FNAME for nonexistent user %s", source);
+ }
+ return MOD_CONT;
+ }
+
+ u->SetRealname(av[0]);
+ return MOD_CONT;
}
int anope_event_setident(const char *source, int ac, const char **av)
{
- User *u;
-
- 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;
+ User *u;
+
+ 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;
}
int anope_event_chgident(const char *source, int ac, const char **av)
{
- User *u;
-
- 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;
+ User *u;
+
+ 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;
}
int anope_event_sethost(const char *source, int ac, const char **av)
{
- User *u;
-
- 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;
+ User *u;
+
+ 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;
}
int anope_event_nick(const char *source, int ac, const char **av)
{
- do_nick(source, av[0], NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
- return MOD_CONT;
+ do_nick(source, av[0], NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
+ return MOD_CONT;
}
@@ -1097,18 +1097,18 @@ int anope_event_uid(const char *source, int ac, const char **av)
int anope_event_chghost(const char *source, int ac, const char **av)
{
- User *u;
-
- u = finduser(source);
- if (!u) {
- if (debug) {
- alog("debug: FHOST for nonexistent user %s", source);
- }
- return MOD_CONT;
- }
-
- u->SetDisplayedHost(av[0]);
- return MOD_CONT;
+ User *u;
+
+ u = finduser(source);
+ if (!u) {
+ if (debug) {
+ alog("debug: FHOST for nonexistent user %s", source);
+ }
+ return MOD_CONT;
+ }
+
+ u->SetDisplayedHost(av[0]);
+ return MOD_CONT;
}
/*
@@ -1125,8 +1125,8 @@ int anope_event_server(const char *source, int ac, const char **av)
{
uplink = sstrdup(av[0]);
}
- do_server(source, av[0], av[2], av[4], av[3]);
- return MOD_CONT;
+ do_server(source, av[0], av[2], av[4], av[3]);
+ return MOD_CONT;
}
@@ -1140,172 +1140,172 @@ int anope_event_privmsg(const char *source, int ac, const char **av)
int anope_event_part(const char *source, int ac, const char **av)
{
- do_part(source, ac, av);
- return MOD_CONT;
+ do_part(source, ac, av);
+ return MOD_CONT;
}
int anope_event_whois(const char *source, int ac, const char **av)
{
- m_whois(source, av[0]);
- return MOD_CONT;
+ m_whois(source, av[0]);
+ return MOD_CONT;
}
int anope_event_capab(const char *source, int ac, const char **av)
{
- int argc;
- CBModeInfo *cbmi;
+ int argc;
+ CBModeInfo *cbmi;
- if (strcasecmp(av[0], "START") == 0) {
- /* reset CAPAB */
- has_servicesmod = 0;
- has_globopsmod = 0;
+ if (strcasecmp(av[0], "START") == 0) {
+ /* reset CAPAB */
+ has_servicesmod = 0;
+ has_globopsmod = 0;
has_svsholdmod = 0;
has_chghostmod = 0;
has_chgidentmod = 0;
- } else if (strcasecmp(av[0], "MODULES") == 0) {
- if (strstr(av[1], "m_globops.so")) {
- has_globopsmod = 1;
- }
- if (strstr(av[1], "m_services_account.so")) {
- has_servicesmod = 1;
- }
+ } else if (strcasecmp(av[0], "MODULES") == 0) {
+ if (strstr(av[1], "m_globops.so")) {
+ has_globopsmod = 1;
+ }
+ if (strstr(av[1], "m_services_account.so")) {
+ has_servicesmod = 1;
+ }
if (strstr(av[1], "m_svshold.so")) {
- has_svsholdmod = 1;
- }
+ has_svsholdmod = 1;
+ }
if (strstr(av[1], "m_chghost.so")) {
- has_chghostmod = 1;
- }
+ has_chghostmod = 1;
+ }
if (strstr(av[1], "m_chgident.so")) {
- has_chgidentmod = 1;
- }
- if (strstr(av[1], "m_messageflood.so")) {
- has_messagefloodmod = 1;
- }
- if (strstr(av[1], "m_banexception.so")) {
- has_banexceptionmod = 1;
- }
- if (strstr(av[1], "m_inviteexception.so")) {
- has_inviteexceptionmod = 1;
- }
- } else if (strcasecmp(av[0], "END") == 0) {
- if (!has_globopsmod) {
- send_cmd(NULL,
- "ERROR :m_globops is not loaded. This is required by Anope");
- quitmsg = "Remote server does not have the m_globops module loaded, and this is required.";
- quitting = 1;
- return MOD_STOP;
- }
- if (!has_servicesmod) {
- send_cmd(NULL,
- "ERROR :m_services is not loaded. This is required by Anope");
- quitmsg = "Remote server does not have the m_services module loaded, and this is required.";
- quitting = 1;
- return MOD_STOP;
- }
- if (!has_svsholdmod) {
- ircdproto->SendGlobops(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
- }
- if (!has_chghostmod) {
- ircdproto->SendGlobops(s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
- }
- if (!has_chgidentmod) {
- ircdproto->SendGlobops(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
- }
- if (has_messagefloodmod) {
- cbmi = myCbmodeinfos;
-
- /* Find 'f' in myCbmodeinfos and add the relevant bits to myCbmodes and myCbmodeinfos
- * to enable +f support if found. This is needed because we're really not set up to
- * handle modular ircds which can have modes enabled/disabled as they please :( - mark
- */
- while ((cbmi->mode != 'f')) {
- cbmi++;
- }
- if (cbmi) {
- cbmi->getvalue = get_flood;
- cbmi->csgetvalue = cs_get_flood;
-
- myCbmodes['f'].flag = CMODE_f;
- myCbmodes['f'].flags = 0;
- myCbmodes['f'].setvalue = set_flood;
- myCbmodes['f'].cssetvalue = cs_set_flood;
-
- pmodule_ircd_cbmodeinfos(myCbmodeinfos);
- pmodule_ircd_cbmodes(myCbmodes);
-
- ircd->fmode = 1;
- }
- else {
- alog("Support for channelmode +f can not be enabled");
- if (debug) {
- alog("debug: 'f' missing from myCbmodeinfos");
- }
- }
- }
- if (has_banexceptionmod) {
- myCmmodes['e'].addmask = add_exception;
- myCmmodes['e'].delmask = del_exception;
- ircd->except = 1;
- }
- if (has_inviteexceptionmod) {
- myCmmodes['I'].addmask = add_invite;
- myCmmodes['I'].delmask = del_invite;
- ircd->invitemode = 1;
- }
- ircd->svshold = has_svsholdmod;
-
- if (has_banexceptionmod || has_inviteexceptionmod) {
- pmodule_ircd_cmmodes(myCmmodes);
- }
-
- /* Generate a fake capabs parsing call so things like NOQUIT work
- * fine. It's ugly, but it works....
- */
- argc = 6;
+ has_chgidentmod = 1;
+ }
+ if (strstr(av[1], "m_messageflood.so")) {
+ has_messagefloodmod = 1;
+ }
+ if (strstr(av[1], "m_banexception.so")) {
+ has_banexceptionmod = 1;
+ }
+ if (strstr(av[1], "m_inviteexception.so")) {
+ has_inviteexceptionmod = 1;
+ }
+ } else if (strcasecmp(av[0], "END") == 0) {
+ if (!has_globopsmod) {
+ send_cmd(NULL,
+ "ERROR :m_globops is not loaded. This is required by Anope");
+ quitmsg = "Remote server does not have the m_globops module loaded, and this is required.";
+ quitting = 1;
+ return MOD_STOP;
+ }
+ if (!has_servicesmod) {
+ send_cmd(NULL,
+ "ERROR :m_services is not loaded. This is required by Anope");
+ quitmsg = "Remote server does not have the m_services module loaded, and this is required.";
+ quitting = 1;
+ return MOD_STOP;
+ }
+ if (!has_svsholdmod) {
+ ircdproto->SendGlobops(s_OperServ, "SVSHOLD missing, Usage disabled until module is loaded.");
+ }
+ if (!has_chghostmod) {
+ ircdproto->SendGlobops(s_OperServ, "CHGHOST missing, Usage disabled until module is loaded.");
+ }
+ if (!has_chgidentmod) {
+ ircdproto->SendGlobops(s_OperServ, "CHGIDENT missing, Usage disabled until module is loaded.");
+ }
+ if (has_messagefloodmod) {
+ cbmi = myCbmodeinfos;
+
+ /* Find 'f' in myCbmodeinfos and add the relevant bits to myCbmodes and myCbmodeinfos
+ * to enable +f support if found. This is needed because we're really not set up to
+ * handle modular ircds which can have modes enabled/disabled as they please :( - mark
+ */
+ while ((cbmi->mode != 'f')) {
+ cbmi++;
+ }
+ if (cbmi) {
+ cbmi->getvalue = get_flood;
+ cbmi->csgetvalue = cs_get_flood;
+
+ myCbmodes['f'].flag = CMODE_f;
+ myCbmodes['f'].flags = 0;
+ myCbmodes['f'].setvalue = set_flood;
+ myCbmodes['f'].cssetvalue = cs_set_flood;
+
+ pmodule_ircd_cbmodeinfos(myCbmodeinfos);
+ pmodule_ircd_cbmodes(myCbmodes);
+
+ ircd->fmode = 1;
+ }
+ else {
+ alog("Support for channelmode +f can not be enabled");
+ if (debug) {
+ alog("debug: 'f' missing from myCbmodeinfos");
+ }
+ }
+ }
+ if (has_banexceptionmod) {
+ myCmmodes['e'].addmask = add_exception;
+ myCmmodes['e'].delmask = del_exception;
+ ircd->except = 1;
+ }
+ if (has_inviteexceptionmod) {
+ myCmmodes['I'].addmask = add_invite;
+ myCmmodes['I'].delmask = del_invite;
+ ircd->invitemode = 1;
+ }
+ ircd->svshold = has_svsholdmod;
+
+ if (has_banexceptionmod || has_inviteexceptionmod) {
+ pmodule_ircd_cmmodes(myCmmodes);
+ }
+
+ /* Generate a fake capabs parsing call so things like NOQUIT work
+ * fine. It's ugly, but it works....
+ */
+ argc = 6;
const char *argv[] = {"NOQUIT", "SSJ3", "NICK2", "VL", "TLKEXT", "UNCONNECT"};
- capab_parse(argc, argv);
- }
- return MOD_CONT;
+ capab_parse(argc, argv);
+ }
+ 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("JOIN", anope_event_join); addCoreMessage(IRCD,m);
- m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
- m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
- m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
- m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("UID", anope_event_uid); addCoreMessage(IRCD,m);
- m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
- m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
- m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
- m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
- m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
- m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
- m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
- m = createMessage("RSQUIT", anope_event_rsquit); addCoreMessage(IRCD,m);
- m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
- m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
- m = createMessage("SVSMODE", anope_event_mode) ;addCoreMessage(IRCD,m);
- m = createMessage("FHOST", anope_event_chghost); addCoreMessage(IRCD,m);
- m = createMessage("CHGIDENT", anope_event_chgident); addCoreMessage(IRCD,m);
- m = createMessage("FNAME", anope_event_chgname); addCoreMessage(IRCD,m);
- m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m);
- m = createMessage("SETIDENT", anope_event_setident); addCoreMessage(IRCD,m);
- m = createMessage("SETNAME", anope_event_setname); addCoreMessage(IRCD,m);
- m = createMessage("FJOIN", anope_event_fjoin); addCoreMessage(IRCD,m);
- m = createMessage("FMODE", anope_event_fmode); addCoreMessage(IRCD,m);
- m = createMessage("FTOPIC", anope_event_ftopic); addCoreMessage(IRCD,m);
- m = createMessage("OPERTYPE", anope_event_opertype); addCoreMessage(IRCD,m);
- m = createMessage("IDLE", anope_event_idle); 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("JOIN", anope_event_join); addCoreMessage(IRCD,m);
+ m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
+ m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
+ m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
+ m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("UID", anope_event_uid); addCoreMessage(IRCD,m);
+ m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
+ m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
+ m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
+ m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
+ m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
+ m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
+ m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("RSQUIT", anope_event_rsquit); addCoreMessage(IRCD,m);
+ m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
+ m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
+ m = createMessage("SVSMODE", anope_event_mode) ;addCoreMessage(IRCD,m);
+ m = createMessage("FHOST", anope_event_chghost); addCoreMessage(IRCD,m);
+ m = createMessage("CHGIDENT", anope_event_chgident); addCoreMessage(IRCD,m);
+ m = createMessage("FNAME", anope_event_chgname); addCoreMessage(IRCD,m);
+ m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m);
+ m = createMessage("SETIDENT", anope_event_setident); addCoreMessage(IRCD,m);
+ m = createMessage("SETNAME", anope_event_setname); addCoreMessage(IRCD,m);
+ m = createMessage("FJOIN", anope_event_fjoin); addCoreMessage(IRCD,m);
+ m = createMessage("FMODE", anope_event_fmode); addCoreMessage(IRCD,m);
+ m = createMessage("FTOPIC", anope_event_ftopic); addCoreMessage(IRCD,m);
+ m = createMessage("OPERTYPE", anope_event_opertype); addCoreMessage(IRCD,m);
+ m = createMessage("IDLE", anope_event_idle); addCoreMessage(IRCD,m);
}
class ProtoInspIRCd : public Module
diff --git a/src/protocol/obsolete/hybrid.c b/src/protocol/obsolete/hybrid.c
index f9e9e7c0d..7cc5db5fc 100644
--- a/src/protocol/obsolete/hybrid.c
+++ b/src/protocol/obsolete/hybrid.c
@@ -16,638 +16,638 @@
#include "hybrid.h"
IRCDVar myIrcd[] = {
- {"HybridIRCd 7.*", /* ircd name */
- "+o", /* nickserv mode */
- "+o", /* chanserv mode */
- "+o", /* memoserv mode */
- NULL, /* hostserv mode */
- "+aio", /* operserv mode */
- "+o", /* botserv mode */
- "+h", /* helpserv mode */
- "+i", /* Dev/Null mode */
- "+io", /* Global mode */
- "+o", /* nickserv alias mode */
- "+o", /* chanserv alias mode */
- "+o", /* memoserv alias mode */
- NULL, /* hostserv alias mode */
- "+aio", /* operserv alias mode */
- "+o", /* botserv alias mode */
- "+h", /* helpserv alias mode */
- "+i", /* Dev/Null alias mode */
- "+io", /* Global alias mode */
- "+", /* Used by BotServ Bots */
- 3, /* Chan Max Symbols */
- "-ailmnpst", /* Modes to Remove */
- "+o", /* Channel Umode used by Botserv bots */
- 0, /* SVSNICK */
- 0, /* Vhost */
- 0, /* Has Owner */
- NULL, /* Mode to set for an owner */
- NULL, /* Mode to unset for an owner */
- NULL, /* Mode to set for admin */
- NULL, /* Mode to unset for admin */
- NULL, /* Mode On Reg */
- NULL, /* Mode on ID for Roots */
- NULL, /* Mode on ID for Admins */
- NULL, /* Mode on ID for Opers */
- NULL, /* Mode on UnReg */
- NULL, /* Mode on Nick Change */
- 1, /* Supports SGlines */
- 1, /* Supports SQlines */
- 0, /* Supports SZlines */
- 1, /* Supports Halfop +h */
- 3, /* Number of server args */
- 1, /* Join 2 Set */
- 1, /* Join 2 Message */
- 1, /* Has exceptions +e */
- 0, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- 0, /* Protected Umode */
- 0, /* Has Admin */
- 0, /* Chan SQlines */
- 0, /* Quit on Kill */
- 0, /* SVSMODE unban */
- 0, /* Has Protect */
- 0, /* Reverse */
- 0, /* Chan Reg */
- 0, /* Channel Mode */
- 0, /* vidents */
- 0, /* svshold */
- 0, /* time stamp on mode */
- 0, /* NICKIP */
- 0, /* UMODE */
- 0, /* O:LINE */
- 0, /* VHOST ON NICK */
- 0, /* Change RealName */
- CMODE_p, /* No Knock */
- 0, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- 0, /* Vhost Mode */
- 0, /* +f */
- 0, /* +L */
- 0, /* +f Mode */
- 0, /* +L Mode */
- 0, /* On nick change check if they could be identified */
- 0, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support TOKENS */
- 1, /* TOKENS are CASE inSensitive */
- 0, /* TIME STAMPS are BASE64 */
- 0, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* Can remove User Channel Modes with SVSMODE */
- 0, /* Sglines are not enforced until user reconnects */
- NULL, /* vhost char */
- 0, /* ts6 */
- 0, /* support helper umode */
- 0, /* p10 */
- NULL, /* character set */
- 0, /* reports sync state */
- 0, /* CIDR channelbans */
- }
- ,
- {NULL}
+ {"HybridIRCd 7.*", /* ircd name */
+ "+o", /* nickserv mode */
+ "+o", /* chanserv mode */
+ "+o", /* memoserv mode */
+ NULL, /* hostserv mode */
+ "+aio", /* operserv mode */
+ "+o", /* botserv mode */
+ "+h", /* helpserv mode */
+ "+i", /* Dev/Null mode */
+ "+io", /* Global mode */
+ "+o", /* nickserv alias mode */
+ "+o", /* chanserv alias mode */
+ "+o", /* memoserv alias mode */
+ NULL, /* hostserv alias mode */
+ "+aio", /* operserv alias mode */
+ "+o", /* botserv alias mode */
+ "+h", /* helpserv alias mode */
+ "+i", /* Dev/Null alias mode */
+ "+io", /* Global alias mode */
+ "+", /* Used by BotServ Bots */
+ 3, /* Chan Max Symbols */
+ "-ailmnpst", /* Modes to Remove */
+ "+o", /* Channel Umode used by Botserv bots */
+ 0, /* SVSNICK */
+ 0, /* Vhost */
+ 0, /* Has Owner */
+ NULL, /* Mode to set for an owner */
+ NULL, /* Mode to unset for an owner */
+ NULL, /* Mode to set for admin */
+ NULL, /* Mode to unset for admin */
+ NULL, /* Mode On Reg */
+ NULL, /* Mode on ID for Roots */
+ NULL, /* Mode on ID for Admins */
+ NULL, /* Mode on ID for Opers */
+ NULL, /* Mode on UnReg */
+ NULL, /* Mode on Nick Change */
+ 1, /* Supports SGlines */
+ 1, /* Supports SQlines */
+ 0, /* Supports SZlines */
+ 1, /* Supports Halfop +h */
+ 3, /* Number of server args */
+ 1, /* Join 2 Set */
+ 1, /* Join 2 Message */
+ 1, /* Has exceptions +e */
+ 0, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ 0, /* Protected Umode */
+ 0, /* Has Admin */
+ 0, /* Chan SQlines */
+ 0, /* Quit on Kill */
+ 0, /* SVSMODE unban */
+ 0, /* Has Protect */
+ 0, /* Reverse */
+ 0, /* Chan Reg */
+ 0, /* Channel Mode */
+ 0, /* vidents */
+ 0, /* svshold */
+ 0, /* time stamp on mode */
+ 0, /* NICKIP */
+ 0, /* UMODE */
+ 0, /* O:LINE */
+ 0, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ CMODE_p, /* No Knock */
+ 0, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ 0, /* Vhost Mode */
+ 0, /* +f */
+ 0, /* +L */
+ 0, /* +f Mode */
+ 0, /* +L Mode */
+ 0, /* On nick change check if they could be identified */
+ 0, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support TOKENS */
+ 1, /* TOKENS are CASE inSensitive */
+ 0, /* TIME STAMPS are BASE64 */
+ 0, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* Can remove User Channel Modes with SVSMODE */
+ 0, /* Sglines are not enforced until user reconnects */
+ NULL, /* vhost char */
+ 0, /* ts6 */
+ 0, /* support helper umode */
+ 0, /* p10 */
+ NULL, /* character set */
+ 0, /* reports sync state */
+ 0, /* CIDR channelbans */
+ }
+ ,
+ {NULL}
};
IRCDCAPAB myIrcdcap[] = {
- {
- CAPAB_NOQUIT, /* NOQUIT */
- 0, /* TSMODE */
- 0, /* UNCONNECT */
- 0, /* NICKIP */
- 0, /* SJOIN */
- CAPAB_ZIP, /* ZIP */
- 0, /* BURST */
- CAPAB_TS5, /* TS5 */
- 0, /* TS3 */
- 0, /* DKEY */
- 0, /* PT4 */
- 0, /* SCS */
- CAPAB_QS, /* QS */
- CAPAB_UID, /* UID */
- CAPAB_KNOCK, /* KNOCK */
- 0, /* CLIENT */
- 0, /* IPV6 */
- 0, /* SSJ5 */
- 0, /* SN2 */
- 0, /* TOKEN */
- 0, /* VHOST */
- 0, /* SSJ3 */
- 0, /* NICK2 */
- 0, /* UMODE2 */
- 0, /* VL */
- 0, /* TLKEXT */
- 0, /* DODKEY */
- 0, /* DOZIP */
- 0, 0, 0}
+ {
+ CAPAB_NOQUIT, /* NOQUIT */
+ 0, /* TSMODE */
+ 0, /* UNCONNECT */
+ 0, /* NICKIP */
+ 0, /* SJOIN */
+ CAPAB_ZIP, /* ZIP */
+ 0, /* BURST */
+ CAPAB_TS5, /* TS5 */
+ 0, /* TS3 */
+ 0, /* DKEY */
+ 0, /* PT4 */
+ 0, /* SCS */
+ CAPAB_QS, /* QS */
+ CAPAB_UID, /* UID */
+ CAPAB_KNOCK, /* KNOCK */
+ 0, /* CLIENT */
+ 0, /* IPV6 */
+ 0, /* SSJ5 */
+ 0, /* SN2 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ 0, /* SSJ3 */
+ 0, /* NICK2 */
+ 0, /* UMODE2 */
+ 0, /* VL */
+ 0, /* TLKEXT */
+ 0, /* DODKEY */
+ 0, /* DOZIP */
+ 0, 0, 0}
};
void hybrid_ProcessUsermodes(User * user, int ac, const char **av)
{
- int add = 1; /* 1 if adding modes, 0 if deleting */
- const char *modes = av[0];
-
- ac--;
-
- if (debug)
- alog("debug: Changing mode for %s to %s", user->nick, modes);
-
- while (*modes) {
-
- /* This looks better, much better than "add ? (do_add) : (do_remove)".
- * At least this is readable without paying much attention :) -GD
- */
- if (add)
- user->mode |= umodes[(int) *modes];
- else
- user->mode &= ~umodes[(int) *modes];
-
- switch (*modes++) {
- case '+':
- add = 1;
- break;
- case '-':
- add = 0;
- break;
- case 'd':
- if (ac == 0) {
- alog("user: umode +d with no parameter (?) for user %s",
- user->nick);
- break;
- }
-
- ac--;
- av++;
- user->svid = strtoul(*av, NULL, 0);
- break;
- case 'o':
- if (add) {
- opcnt++;
-
- if (WallOper)
- anope_SendGlobops(s_OperServ,
- "\2%s\2 is now an IRC operator.",
- user->nick);
- display_news(user, NEWS_OPER);
-
- } else {
- opcnt--;
- }
- break;
- case 'r':
- if (add && !nick_identified(user)) {
- send_cmd(ServerName, "SVSMODE %s -r", user->nick);
- user->mode &= ~UMODE_r;
- }
- break;
-
- }
- }
+ int add = 1; /* 1 if adding modes, 0 if deleting */
+ const char *modes = av[0];
+
+ ac--;
+
+ if (debug)
+ alog("debug: Changing mode for %s to %s", user->nick, modes);
+
+ while (*modes) {
+
+ /* This looks better, much better than "add ? (do_add) : (do_remove)".
+ * At least this is readable without paying much attention :) -GD
+ */
+ if (add)
+ user->mode |= umodes[(int) *modes];
+ else
+ user->mode &= ~umodes[(int) *modes];
+
+ switch (*modes++) {
+ case '+':
+ add = 1;
+ break;
+ case '-':
+ add = 0;
+ break;
+ case 'd':
+ if (ac == 0) {
+ alog("user: umode +d with no parameter (?) for user %s",
+ user->nick);
+ break;
+ }
+
+ ac--;
+ av++;
+ user->svid = strtoul(*av, NULL, 0);
+ break;
+ case 'o':
+ if (add) {
+ opcnt++;
+
+ if (WallOper)
+ anope_SendGlobops(s_OperServ,
+ "\2%s\2 is now an IRC operator.",
+ user->nick);
+ display_news(user, NEWS_OPER);
+
+ } else {
+ opcnt--;
+ }
+ break;
+ case 'r':
+ if (add && !nick_identified(user)) {
+ send_cmd(ServerName, "SVSMODE %s -r", user->nick);
+ user->mode &= ~UMODE_r;
+ }
+ break;
+
+ }
+ }
}
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, /* ? @ */
- 0, 0, 0, /* A B C */
- 0, 0, 0, /* D E F */
- 0, 0, 0, /* G H I */
- 0, 0, 0, /* J K L */
- 0, 0, 0, /* M N O */
- 0, 0, 0, /* P Q R */
- 0, 0, 0, /* S T U */
- 0, 0, 0, /* V W X */
- 0, /* Y */
- 0, /* Z */
- 0, 0, 0, /* [ \ ] */
- 0, 0, 0, /* ^ _ ` */
- UMODE_a, UMODE_b, UMODE_c, /* a b c */
- UMODE_d, 0, UMODE_f, /* d e f */
- UMODE_g, 0, UMODE_i, /* g h i */
- 0, UMODE_k, UMODE_l, /* j k l */
- 0, UMODE_n, UMODE_o, /* m n o */
- 0, 0, UMODE_r, /* p q r */
- UMODE_s, 0, UMODE_u, /* s t u */
- 0, UMODE_w, UMODE_x, /* v w x */
- UMODE_y, /* 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, /* ? @ */
+ 0, 0, 0, /* A B C */
+ 0, 0, 0, /* D E F */
+ 0, 0, 0, /* G H I */
+ 0, 0, 0, /* J K L */
+ 0, 0, 0, /* M N O */
+ 0, 0, 0, /* P Q R */
+ 0, 0, 0, /* S T U */
+ 0, 0, 0, /* V W X */
+ 0, /* Y */
+ 0, /* Z */
+ 0, 0, 0, /* [ \ ] */
+ 0, 0, 0, /* ^ _ ` */
+ UMODE_a, UMODE_b, UMODE_c, /* a b c */
+ UMODE_d, 0, UMODE_f, /* d e f */
+ UMODE_g, 0, UMODE_i, /* g h i */
+ 0, UMODE_k, UMODE_l, /* j k l */
+ 0, UMODE_n, UMODE_o, /* m n o */
+ 0, 0, UMODE_r, /* p q r */
+ UMODE_s, 0, UMODE_u, /* s t u */
+ 0, UMODE_w, UMODE_x, /* v w x */
+ UMODE_y, /* 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,
- 'a', /* (33) ! */
- 0, 0, 0,
- 'h',
- 0, 0, 0, 0,
- 0,
+ 0,
+ 'a', /* (33) ! */
+ 0, 0, 0,
+ 'h',
+ 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,
+ '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, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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},
- {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},
- {NULL},
- {NULL},
- {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},
+ {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},
+ {NULL},
+ {NULL},
+ {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},
- {0}, /* A */
- {0}, /* B */
- {0}, /* C */
- {0}, /* D */
- {0}, /* E */
- {0}, /* F */
- {0}, /* G */
- {0}, /* H */
- {0}, /* I */
- {0}, /* J */
- {0}, /* K */
- {0}, /* L */
- {0}, /* M */
- {0}, /* N */
- {0}, /* O */
- {0}, /* P */
- {0}, /* Q */
- {0},
- {0}, /* S */
- {0}, /* T */
- {0}, /* U */
- {0}, /* V */
- {0}, /* W */
- {0}, /* X */
- {0}, /* Y */
- {0}, /* Z */
- {0}, {0}, {0}, {0}, {0}, {0},
- {CMODE_a, 0, NULL, NULL},
- {0}, /* b */
- {0}, /* c */
- {0}, /* d */
- {0}, /* e */
- {0}, /* f */
- {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 */
- {0},
- {CMODE_s, 0, NULL, NULL},
- {CMODE_t, 0, NULL, NULL},
- {0},
- {0}, /* v */
- {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}, /* A */
+ {0}, /* B */
+ {0}, /* C */
+ {0}, /* D */
+ {0}, /* E */
+ {0}, /* F */
+ {0}, /* G */
+ {0}, /* H */
+ {0}, /* I */
+ {0}, /* J */
+ {0}, /* K */
+ {0}, /* L */
+ {0}, /* M */
+ {0}, /* N */
+ {0}, /* O */
+ {0}, /* P */
+ {0}, /* Q */
+ {0},
+ {0}, /* S */
+ {0}, /* T */
+ {0}, /* U */
+ {0}, /* V */
+ {0}, /* W */
+ {0}, /* X */
+ {0}, /* Y */
+ {0}, /* Z */
+ {0}, {0}, {0}, {0}, {0}, {0},
+ {CMODE_a, 0, NULL, NULL},
+ {0}, /* b */
+ {0}, /* c */
+ {0}, /* d */
+ {0}, /* e */
+ {0}, /* f */
+ {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 */
+ {0},
+ {CMODE_s, 0, NULL, NULL},
+ {CMODE_t, 0, NULL, NULL},
+ {0},
+ {0}, /* v */
+ {0}, /* w */
+ {0}, /* x */
+ {0}, /* y */
+ {0}, /* z */
+ {0}, {0}, {0}, {0}
};
CBModeInfo myCbmodeinfos[] = {
- {'a', CMODE_a, 0, NULL, NULL},
- {'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},
- {'s', CMODE_s, 0, NULL, NULL},
- {'t', CMODE_t, 0, NULL, NULL},
- {0}
+ {'a', CMODE_a, 0, NULL, NULL},
+ {'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},
+ {'s', CMODE_s, 0, NULL, NULL},
+ {'t', CMODE_t, 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},
-
- {0}, /* a */
- {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 */
- {0}, /* q */
- {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},
+
+ {0}, /* a */
+ {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 */
+ {0}, /* q */
+ {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}
};
void hybrid_cmd_notice(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (NSDefFlags & NI_MSG) {
- hybrid_cmd_privmsg2(source, dest, buf);
- } else {
- send_cmd(source, "NOTICE %s :%s", dest, buf);
- }
+ if (NSDefFlags & NI_MSG) {
+ hybrid_cmd_privmsg2(source, dest, buf);
+ } else {
+ send_cmd(source, "NOTICE %s :%s", dest, buf);
+ }
}
void hybrid_cmd_notice2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE %s :%s", dest, msg);
+ send_cmd(source, "NOTICE %s :%s", dest, msg);
}
void hybrid_cmd_privmsg(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source, "PRIVMSG %s :%s", dest, buf);
+ send_cmd(source, "PRIVMSG %s :%s", dest, buf);
}
void hybrid_cmd_privmsg2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG %s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG %s :%s", dest, msg);
}
void hybrid_SendGlobalNotice(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE $$%s :%s", dest, msg);
+ send_cmd(source, "NOTICE $$%s :%s", dest, msg);
}
void hybrid_SendGlobalPrivmsg(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG $$%s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG $$%s :%s", dest, msg);
}
void hybrid_SendGlobops(const char *source, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source ? source : ServerName, "OPERWALL :%s", buf);
+ send_cmd(source ? source : ServerName, "OPERWALL :%s", buf);
}
/* GLOBOPS - to handle old WALLOPS */
void hybrid_SendGlobops_legacy(const char *source, const char *fmt)
{
- send_cmd(source ? source : ServerName, "OPERWALL :%s", fmt);
+ send_cmd(source ? source : ServerName, "OPERWALL :%s", fmt);
}
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;
}
int anope_event_nick(const char *source, int ac, const char **av)
{
- if (ac != 2) {
- User *user = do_nick(source, av[0], av[4], av[5], av[6], av[7],
- strtoul(av[2], NULL, 10), 0, 0, NULL, NULL);
- if (user)
- anope_ProcessUsermodes(user, 1, &av[3]);
- } else {
- do_nick(source, av[0], NULL, NULL, NULL, NULL,
- strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
- }
- return MOD_CONT;
+ if (ac != 2) {
+ User *user = do_nick(source, av[0], av[4], av[5], av[6], av[7],
+ strtoul(av[2], NULL, 10), 0, 0, NULL, NULL);
+ if (user)
+ anope_ProcessUsermodes(user, 1, &av[3]);
+ } 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_topic(const char *source, int ac, const char **av)
{
- if (ac == 4) {
- do_topic(source, ac, av);
- } else {
- Channel *c = findchan(av[0]);
- time_t topic_time = time(NULL);
-
- if (!c) {
- if (debug) {
- alog("debug: TOPIC %s for nonexistent channel %s",
- merge_args(ac - 1, av + 1), av[0]);
- }
- return MOD_CONT;
- }
+ if (ac == 4) {
+ do_topic(source, ac, av);
+ } else {
+ Channel *c = findchan(av[0]);
+ time_t topic_time = time(NULL);
+
+ if (!c) {
+ if (debug) {
+ alog("debug: TOPIC %s for nonexistent channel %s",
+ merge_args(ac - 1, av + 1), av[0]);
+ }
+ return MOD_CONT;
+ }
- if (check_topiclock(c, topic_time))
- return MOD_CONT;
+ if (check_topiclock(c, topic_time))
+ return MOD_CONT;
- if (c->topic) {
- free(c->topic);
- c->topic = NULL;
- }
- if (ac > 1 && *av[1])
- c->topic = sstrdup(av[1]);
+ if (c->topic) {
+ free(c->topic);
+ c->topic = NULL;
+ }
+ if (ac > 1 && *av[1])
+ c->topic = sstrdup(av[1]);
- strscpy(c->topic_setter, source, sizeof(c->topic_setter));
- c->topic_time = topic_time;
+ strscpy(c->topic_setter, source, sizeof(c->topic_setter));
+ c->topic_time = topic_time;
- record_topic(av[0]);
+ record_topic(av[0]);
if (ac > 1 && *av[1])
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
else
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
- }
- return MOD_CONT;
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
+ }
+ return MOD_CONT;
}
int anope_event_tburst(const char *source, int ac, const char **av)
{
- if (ac != 5)
- return MOD_CONT;
+ if (ac != 5)
+ return MOD_CONT;
- av[0] = av[1];
- av[1] = av[3];
- av[3] = av[4];
- do_topic(source, 4, av);
- return MOD_CONT;
+ av[0] = av[1];
+ av[1] = av[3];
+ av[3] = av[4];
+ do_topic(source, 4, av);
+ 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;
}
/* *INDENT-OFF* */
void moduleAddIRCDMsgs(void) {
- Message *m;
-
- updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
-
- m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
- m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
- m = createMessage("INVITE", anope_event_invite); addCoreMessage(IRCD,m);
- m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
- m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
- m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
- m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
- m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m);
- m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
- m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
- m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
- m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
- m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
- m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
- m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
- m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
- m = createMessage("TBURST", anope_event_tburst); addCoreMessage(IRCD,m);
- m = createMessage("USER", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
- m = createMessage("AKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GLOBOPS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GNOTICE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GOPER", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("RAKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSMODE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SQLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
- m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
- m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m);
-/* m = createMessage("EOB", anope_event_eob); addCoreMessage(IRCD,m); */
- m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
- m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
+ Message *m;
+
+ updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
+
+ m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
+ m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
+ m = createMessage("INVITE", anope_event_invite); addCoreMessage(IRCD,m);
+ m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
+ m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
+ m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
+ m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
+ m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m);
+ m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
+ m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
+ m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
+ m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
+ m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
+ m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
+ m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
+ m = createMessage("TBURST", anope_event_tburst); addCoreMessage(IRCD,m);
+ m = createMessage("USER", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
+ m = createMessage("AKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GLOBOPS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GNOTICE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GOPER", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("RAKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSMODE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SQLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
+ m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
+ m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m);
+/* m = createMessage("EOB", anope_event_eob); addCoreMessage(IRCD,m); */
+ m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
+ m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
}
/* *INDENT-ON* */
@@ -655,28 +655,28 @@ void moduleAddIRCDMsgs(void) {
void hybrid_SendSQLine(const char *mask, const char *reason)
{
- if (!mask || !reason) {
- return;
- }
+ if (!mask || !reason) {
+ return;
+ }
- send_cmd(ServerName, "RESV * %s :%s", mask, reason);
+ send_cmd(ServerName, "RESV * %s :%s", mask, reason);
}
void hybrid_SendSGLineDel(const char *mask)
{
- if (!mask) {
- return;
- }
+ if (!mask) {
+ return;
+ }
- send_cmd(ServerName, "UNXLINE * %s", mask);
+ send_cmd(ServerName, "UNXLINE * %s", mask);
}
void hybrid_SendSZLineDel(const char *mask)
{
- /* Does not support */
+ /* Does not support */
}
void hybrid_SendSZLine(const char *mask, const char *reason, const char *whom)
{
- /* Does not support */
+ /* Does not support */
}
void hybrid_cmd_svsadmin(const char *server, int set)
@@ -685,11 +685,11 @@ void hybrid_cmd_svsadmin(const char *server, int set)
void hybrid_SendSGLine(const char *mask, const char *reason)
{
- if (!mask || !reason) {
- return;
- }
+ if (!mask || !reason) {
+ return;
+ }
- send_cmd(ServerName, "XLINE * %s 0 :%s", mask, reason);
+ send_cmd(ServerName, "XLINE * %s 0 :%s", mask, reason);
}
void HybridIRCdProto::SendAkillDel(const char *user, const char *host)
@@ -699,34 +699,34 @@ void HybridIRCdProto::SendAkillDel(const char *user, const char *host)
}
void hybrid_cmd_topic(const char *whosets, const char *chan, const char *whosetit,
- const char *topic, time_t when)
+ const char *topic, time_t when)
{
- send_cmd(whosets, "TOPIC %s :%s", chan, topic);
+ send_cmd(whosets, "TOPIC %s :%s", chan, topic);
}
void hybrid_SendVhostDel(User * u)
{
- /* does not support vhosting */
+ /* does not support vhosting */
}
void hybrid_SendVhost(const char *nick, const char *vIdent, const char *vhost)
{
- /* does not support vhosting */
+ /* does not support vhosting */
}
void hybrid_SendSQLineDel(const char *user)
{
- if (!user) {
- return;
- }
+ if (!user) {
+ return;
+ }
- send_cmd(ServerName, "UNRESV * %s", user);
+ send_cmd(ServerName, "UNRESV * %s", user);
}
void hybrid_SendJoin(const char *user, const char *channel, time_t chantime)
{
- send_cmd(NULL, "SJOIN %ld %s + :%s", (long int) chantime, channel,
- user);
+ send_cmd(NULL, "SJOIN %ld %s + :%s", (long int) chantime, channel,
+ user);
}
/*
@@ -739,60 +739,60 @@ reason: the reason for the kline.
*/
void hybrid_SendAkill(const char *user, const char *host, const char *who, time_t when,
- time_t expires, const char *reason)
+ time_t expires, const char *reason)
{
- send_cmd(s_OperServ, "KLINE * %ld %s %s :%s",
- (long int) (expires - (long) time(NULL)), user, host, reason);
+ send_cmd(s_OperServ, "KLINE * %ld %s %s :%s",
+ (long int) (expires - (long) time(NULL)), user, host, reason);
}
void hybrid_SendSVSKill(const char *source, const char *user, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (!source || !user) {
- return;
- }
+ if (!source || !user) {
+ return;
+ }
- send_cmd(source, "KILL %s :%s", user, buf);
+ send_cmd(source, "KILL %s :%s", user, buf);
}
void hybrid_SendSVSMode(User * u, int ac, const char **av)
{
- /* Hybrid does not support SVSMODE */
+ /* Hybrid does not support SVSMODE */
}
/*
* SVINFO
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
- * parv[4] = server's idea of UTC time
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
+ * parv[4] = server's idea of UTC time
*/
void hybrid_cmd_svinfo()
{
- send_cmd(NULL, "SVINFO 5 5 0 :%ld", (long int) time(NULL));
+ send_cmd(NULL, "SVINFO 5 5 0 :%ld", (long int) time(NULL));
}
/* CAPAB */
/*
- QS - Can handle quit storm removal
- EX - Can do channel +e exemptions
- CHW - Can do channel wall @#
- LL - Can do lazy links
- IE - Can do invite exceptions
- EOB - Can do EOB message
- KLN - Can do KLINE message
- GLN - Can do GLINE message
+ QS - Can handle quit storm removal
+ EX - Can do channel +e exemptions
+ CHW - Can do channel wall @#
+ LL - Can do lazy links
+ IE - Can do invite exceptions
+ EOB - Can do EOB message
+ KLN - Can do KLINE message
+ GLN - Can do GLINE message
HOPS - can do half ops (+h)
- HUB - This server is a HUB
+ HUB - This server is a HUB
AOPS - Can do anon ops (+a)
- UID - Can do UIDs
- ZIP - Can do ZIPlinks
- ENC - Can do ENCrypted links
+ UID - Can do UIDs
+ ZIP - Can do ZIPlinks
+ ENC - Can do ENCrypted links
KNOCK - supports KNOCK
TBURST - supports TBURST
PARA - supports invite broadcasting for +p
@@ -800,425 +800,425 @@ void hybrid_cmd_svinfo()
*/
void hybrid_cmd_capab()
{
- send_cmd(NULL,
- "CAPAB :QS EX CHW IE KLN GLN HOPS HUB AOPS KNOCK TBURST PARA");
+ send_cmd(NULL,
+ "CAPAB :QS EX CHW IE KLN GLN HOPS HUB AOPS KNOCK TBURST PARA");
}
/* PASS */
void hybrid_cmd_pass(const char *pass)
{
- send_cmd(NULL, "PASS %s :TS", pass);
+ send_cmd(NULL, "PASS %s :TS", pass);
}
/* SERVER name hop descript */
void hybrid_SendServer(const char *servname, int hop, const char *descript)
{
- send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
+ send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
}
void hybrid_SendConnect(int servernum)
{
- me_server =
- new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
+ me_server =
+ new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
- if (servernum == 1)
- hybrid_cmd_pass(RemotePassword);
- else if (servernum == 2)
- hybrid_cmd_pass(RemotePassword2);
- else if (servernum == 3)
- hybrid_cmd_pass(RemotePassword3);
+ if (servernum == 1)
+ hybrid_cmd_pass(RemotePassword);
+ else if (servernum == 2)
+ hybrid_cmd_pass(RemotePassword2);
+ else if (servernum == 3)
+ hybrid_cmd_pass(RemotePassword3);
- hybrid_cmd_capab();
- hybrid_SendServer(ServerName, 1, ServerDesc);
- hybrid_cmd_svinfo();
+ hybrid_cmd_capab();
+ hybrid_SendServer(ServerName, 1, ServerDesc);
+ hybrid_cmd_svinfo();
}
void hybrid_cmd_svsinfo()
{
- /* not used */
+ /* not used */
}
void hybrid_SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real,
- const char *modes)
+ const char *modes)
{
- EnforceQlinedNick(nick, s_BotServ);
- send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s :%s", nick,
- (long int) time(NULL), modes, user, host, ServerName, real);
+ EnforceQlinedNick(nick, s_BotServ);
+ send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s :%s", nick,
+ (long int) time(NULL), modes, user, host, ServerName, real);
}
void hybrid_SendPart(const char *nick, const char *chan, const char *buf)
{
- if (buf) {
- send_cmd(nick, "PART %s :%s", chan, buf);
- } else {
- send_cmd(nick, "PART %s", chan);
- }
+ if (buf) {
+ send_cmd(nick, "PART %s :%s", chan, buf);
+ } else {
+ send_cmd(nick, "PART %s", chan);
+ }
}
int anope_event_ping(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- hybrid_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ hybrid_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
+ return MOD_CONT;
}
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;
}
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_eob(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);
+ 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;
+ return MOD_CONT;
}
void hybrid_SendEOB()
{
-/* send_cmd(ServerName, "EOB"); */
+/* send_cmd(ServerName, "EOB"); */
}
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_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;
}
/* EVENT: SERVER */
int anope_event_server(const char *source, int ac, const char **av)
{
- if (!stricmp(av[1], "1")) {
- uplink = sstrdup(av[0]);
- }
- do_server(source, av[0], av[1], av[2], NULL);
- return MOD_CONT;
+ if (!stricmp(av[1], "1")) {
+ uplink = sstrdup(av[0]);
+ }
+ do_server(source, av[0], av[1], av[2], NULL);
+ 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;
}
void hybrid_cmd_372(const char *source, const char *msg)
{
- send_cmd(ServerName, "372 %s :- %s", source, msg);
+ send_cmd(ServerName, "372 %s :- %s", source, msg);
}
void hybrid_cmd_372_error(const char *source)
{
- send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
- "contact your IRC administrator.", source);
+ send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
+ "contact your IRC administrator.", source);
}
void hybrid_cmd_375(const char *source)
{
- send_cmd(ServerName, "375 %s :- %s Message of the Day",
- source, ServerName);
+ send_cmd(ServerName, "375 %s :- %s Message of the Day",
+ source, ServerName);
}
void hybrid_cmd_376(const char *source)
{
- send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
+ send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
}
/* 391 */
void hybrid_cmd_391(const char *source, const char *timestr)
{
- if (!timestr) {
- return;
- }
- send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
+ if (!timestr) {
+ return;
+ }
+ send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
}
/* 250 */
void hybrid_cmd_250(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "250 %s", buf);
+ send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void hybrid_cmd_307(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "307 %s", buf);
+ send_cmd(ServerName, "307 %s", buf);
}
/* 311 */
void hybrid_cmd_311(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "311 %s", buf);
+ send_cmd(ServerName, "311 %s", buf);
}
/* 312 */
void hybrid_cmd_312(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "312 %s", buf);
+ send_cmd(ServerName, "312 %s", buf);
}
/* 317 */
void hybrid_cmd_317(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "317 %s", buf);
+ send_cmd(ServerName, "317 %s", buf);
}
/* 219 */
void hybrid_cmd_219(const char *source, const char *letter)
{
- if (!source) {
- return;
- }
+ if (!source) {
+ return;
+ }
- if (letter) {
- send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
- *letter);
- } else {
- send_cmd(NULL, "219 %s l :End of /STATS report.", source);
- }
+ if (letter) {
+ send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
+ *letter);
+ } else {
+ send_cmd(NULL, "219 %s l :End of /STATS report.", source);
+ }
}
/* 401 */
void hybrid_cmd_401(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
- send_cmd(ServerName, "401 %s %s :No such service.", source, who);
+ if (!source || !who) {
+ return;
+ }
+ send_cmd(ServerName, "401 %s %s :No such service.", source, who);
}
/* 318 */
void hybrid_cmd_318(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
+ if (!source || !who) {
+ return;
+ }
- send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
+ send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void hybrid_cmd_242(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "242 %s", buf);
+ send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void hybrid_cmd_243(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "243 %s", buf);
+ send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void hybrid_cmd_211(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "211 %s", buf);
+ send_cmd(NULL, "211 %s", buf);
}
void hybrid_SendMode(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source, "MODE %s %s", dest, buf);
+ send_cmd(source, "MODE %s %s", dest, buf);
}
void hybrid_cmd_nick(const char *nick, const char *name, const char *mode)
{
- EnforceQlinedNick(nick, NULL);
- send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s :%s", nick,
- (long int) time(NULL), mode, ServiceUser, ServiceHost,
- ServerName, (name));
+ EnforceQlinedNick(nick, NULL);
+ send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s :%s", nick,
+ (long int) time(NULL), mode, ServiceUser, ServiceHost,
+ ServerName, (name));
}
void hybrid_SendKick(const char *source, const char *chan, const char *user, const char *buf)
{
- if (buf) {
- send_cmd(source, "KICK %s %s :%s", chan, user, buf);
- } else {
- send_cmd(source, "KICK %s %s", chan, user);
- }
+ if (buf) {
+ send_cmd(source, "KICK %s %s :%s", chan, user, buf);
+ } else {
+ send_cmd(source, "KICK %s %s", chan, user);
+ }
}
void hybrid_SendNoticeChanops(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
+ send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
}
void hybrid_SendBotOp(const char *nick, const char *chan)
{
- anope_SendMode(nick, chan, "%s %s", ircd->botchanumode, nick);
+ anope_SendMode(nick, chan, "%s %s", ircd->botchanumode, nick);
}
/* QUIT */
void hybrid_SendQuit(const char *source, const char *buf)
{
- if (buf) {
- send_cmd(source, "QUIT :%s", buf);
- } else {
- send_cmd(source, "QUIT");
- }
+ if (buf) {
+ send_cmd(source, "QUIT :%s", buf);
+ } else {
+ send_cmd(source, "QUIT");
+ }
}
/* PONG */
void hybrid_SendPong(const char *servname, const char *who)
{
- send_cmd(servname, "PONG %s", who);
+ send_cmd(servname, "PONG %s", who);
}
/* INVITE */
void hybrid_SendInvite(const char *source, const char *chan, const char *nick)
{
- if (!source || !chan || !nick) {
- return;
- }
+ if (!source || !chan || !nick) {
+ return;
+ }
- send_cmd(source, "INVITE %s %s", nick, chan);
+ send_cmd(source, "INVITE %s %s", nick, chan);
}
/* SQUIT */
void hybrid_SendSquit(const char *servname, const char *message)
{
- if (!servname || !message) {
- return;
- }
+ if (!servname || !message) {
+ return;
+ }
- send_cmd(NULL, "SQUIT %s :%s", servname, message);
+ send_cmd(NULL, "SQUIT %s :%s", servname, message);
}
int anope_event_mode(const char *source, int ac, const char **av)
{
- if (ac < 2)
- 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;
+ if (*av[0] == '#' || *av[0] == '&') {
+ do_cmode(source, ac, av);
+ } else {
+ do_umode(source, ac, av);
+ }
+ return MOD_CONT;
}
void hybrid_cmd_351(const char *source)
{
- send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
- source, version_number, ServerName, ircd->name, version_flags,
- EncModule, version_build);
+ send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
+ source, version_number, ServerName, ircd->name, version_flags,
+ EncModule, version_build);
}
/* Event: PROTOCTL */
@@ -1244,7 +1244,7 @@ int anope_event_capab(const char *source, int ac, const char **av)
argc++;
}
- capab_parse(argc, argv);
+ capab_parse(argc, argv);
/* Free our built ac/av */
for (argvsize = 0; argvsize < argc; argvsize++) {
@@ -1252,163 +1252,163 @@ int anope_event_capab(const char *source, int ac, const char **av)
}
free((char **)argv);
- return MOD_CONT;
+ return MOD_CONT;
}
/* SVSHOLD - set */
void hybrid_SendSVSHOLD(const char *nick)
{
- /* Not supported by this IRCD */
+ /* Not supported by this IRCD */
}
/* SVSHOLD - release */
void hybrid_SendSVSHOLDDel(const char *nick)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
/* SVSNICK */
void hybrid_SendForceNickChange(const char *nick, const char *newnick, time_t when)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
void hybrid_SendGuestNick(const char *nick, const char *user, const char *host, const char *real,
- const char *modes)
+ const char *modes)
{
- send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s :%s", nick,
- (long int) time(NULL), modes, user, host, ServerName, real);
+ send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s :%s", nick,
+ (long int) time(NULL), modes, user, host, ServerName, real);
}
void hybrid_SendSVSO(const char *source, const char *nick, const char *flag)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
void hybrid_SendBanDel(const char *name, const char *nick)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
/* SVSMODE channel modes */
void hybrid_SendSVSMode_chan(const char *name, const char *mode, const char *nick)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
/* SVSMODE +d */
/* sent if svid is something weird */
void hybrid_SendSVID(const char *nick, time_t ts)
{
- send_cmd(ServerName, "SVSMODE %s +d 1", nick);
+ send_cmd(ServerName, "SVSMODE %s +d 1", nick);
}
/* SVSMODE +d */
/* nc_change was = 1, and there is no na->status */
void hybrid_SendUnregisteredNick(User * u)
{
- /* not used */
+ /* not used */
}
/* SVSMODE +d */
void hybrid_SendSVID2(User * u, const char *ts)
{
- /* not used */
+ /* not used */
}
void hybrid_SendSVID3(User * u, const char *ts)
{
- /* not used */
+ /* not used */
}
/* NICK <newnick> */
void hybrid_SendChangeBotNick(const char *oldnick, const char *newnick)
{
- if (!oldnick || !newnick) {
- return;
- }
+ if (!oldnick || !newnick) {
+ return;
+ }
- send_cmd(oldnick, "NICK %s", newnick);
+ send_cmd(oldnick, "NICK %s", newnick);
}
/*
* SVINFO
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
- * parv[4] = server's idea of UTC time
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
+ * parv[4] = server's idea of UTC time
*/
int anope_event_svinfo(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
int anope_event_pass(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
void hybrid_SendSVSJoin(const char *source, const char *nick, const char *chan, const char *param)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
void hybrid_SendSVSPart(const char *source, const char *nick, const char *chan)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
void hybrid_SendSWhois(const char *source, const char *who, const char *mask)
{
- /* not supported */
+ /* not supported */
}
int anope_event_notice(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_admin(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_invite(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int hybrid_IsFloodModeParamValid(const char *value)
{
- return 0;
+ return 0;
}
int anope_event_error(const char *source, int ac, const char **av)
{
- if (ac >= 1) {
- if (debug) {
- alog("debug: %s", av[0]);
- }
- }
- return MOD_CONT;
+ if (ac >= 1) {
+ if (debug) {
+ alog("debug: %s", av[0]);
+ }
+ }
+ return MOD_CONT;
}
void hybrid_SendJupe(const char *jserver, const char *who, const char *reason)
{
- char rbuf[256];
+ char rbuf[256];
- snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
- reason ? ": " : "", reason ? reason : "");
+ snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
+ reason ? ": " : "", reason ? reason : "");
- if (findserver(servlist, jserver))
- hybrid_SendSquit(jserver, rbuf);
- hybrid_SendServer(jserver, 2, rbuf);
- new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
+ if (findserver(servlist, jserver))
+ hybrid_SendSquit(jserver, rbuf);
+ hybrid_SendServer(jserver, 2, rbuf);
+ new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
}
/*
@@ -1417,8 +1417,8 @@ void hybrid_SendJupe(const char *jserver, const char *who, const char *reason)
*/
int hybrid_IsNickValid(const char *nick)
{
- /* no hard coded invalid nicks */
- return 1;
+ /* no hard coded invalid nicks */
+ return 1;
}
/*
@@ -1427,23 +1427,23 @@ int hybrid_IsNickValid(const char *nick)
*/
int hybrid_IsChannelValid(const char *chan)
{
- /* no hard coded invalid chans */
- return 1;
+ /* no hard coded invalid chans */
+ return 1;
}
void hybrid_SendCTCP(const char *source, const char *dest, const char *buf)
{
- char *s;
+ char *s;
- if (!buf) {
- return;
- } else {
- s = normalizeBuffer(buf);
- }
+ if (!buf) {
+ return;
+ } else {
+ s = normalizeBuffer(buf);
+ }
- send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
- free(s);
+ send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
+ free(s);
}
@@ -1453,78 +1453,78 @@ void hybrid_SendCTCP(const char *source, const char *dest, const char *buf)
**/
void moduleAddAnopeCmds()
{
- pmodule_cmd_topic(hybrid_cmd_topic);
- pmodule_SendVhostDel(hybrid_cmd_vhost_off);
- pmodule_SendAkill(hybrid_cmd_akill);
- pmodule_SendSVSKill(hybrid_SendSVSKill);
- pmodule_SendSVSMode(hybrid_cmd_svsmode);
- pmodule_cmd_372(hybrid_cmd_372);
- pmodule_cmd_372_error(hybrid_cmd_372_error);
- pmodule_cmd_375(hybrid_cmd_375);
- pmodule_cmd_376(hybrid_cmd_376);
- pmodule_cmd_nick(hybrid_cmd_nick);
- pmodule_SendGuestNick(hybrid_cmd_guest_nick);
- pmodule_SendMode(hybrid_cmd_mode);
- pmodule_SendClientIntroduction(hybrid_cmd_bot_nick);
- pmodule_SendKick(hybrid_cmd_kick);
- pmodule_SendNoticeChanops(hybrid_cmd_notice_ops);
- pmodule_cmd_notice(hybrid_cmd_notice);
- pmodule_cmd_notice2(hybrid_cmd_notice2);
- pmodule_cmd_privmsg(hybrid_cmd_privmsg);
- pmodule_cmd_privmsg2(hybrid_cmd_privmsg2);
- pmodule_SendGlobalNotice(hybrid_cmd_serv_notice);
- pmodule_SendGlobalPrivmsg(hybrid_cmd_serv_privmsg);
- pmodule_SendBotOp(hybrid_cmd_bot_chan_mode);
- pmodule_cmd_351(hybrid_cmd_351);
- pmodule_SendQuit(hybrid_cmd_quit);
- pmodule_SendPong(hybrid_cmd_pong);
- pmodule_SendJoin(hybrid_cmd_join);
- pmodule_SendSQLineDel(hybrid_cmd_unsqline);
- pmodule_SendInvite(hybrid_cmd_invite);
- pmodule_SendPart(hybrid_cmd_part);
- pmodule_cmd_391(hybrid_cmd_391);
- pmodule_cmd_250(hybrid_cmd_250);
- pmodule_cmd_307(hybrid_cmd_307);
- pmodule_cmd_311(hybrid_cmd_311);
- pmodule_cmd_312(hybrid_cmd_312);
- pmodule_cmd_317(hybrid_cmd_317);
- pmodule_cmd_219(hybrid_cmd_219);
- pmodule_cmd_401(hybrid_cmd_401);
- pmodule_cmd_318(hybrid_cmd_318);
- pmodule_cmd_242(hybrid_cmd_242);
- pmodule_cmd_243(hybrid_cmd_243);
- pmodule_cmd_211(hybrid_cmd_211);
- pmodule_SendGlobops(hybrid_cmd_global);
- pmodule_SendGlobops_legacy(hybrid_cmd_global_legacy);
- pmodule_SendSQLine(hybrid_cmd_sqline);
- pmodule_SendSquit(hybrid_cmd_squit);
- pmodule_SendSVSO(hybrid_cmd_svso);
- pmodule_SendChangeBotNick(hybrid_cmd_chg_nick);
- pmodule_SendForceNickChange(hybrid_cmd_svsnick);
- pmodule_SendVhost(hybrid_cmd_vhost_on);
- pmodule_SendConnect(hybrid_cmd_connect);
- pmodule_SendSVSHOLD(hybrid_cmd_svshold);
- pmodule_SendSVSHOLDDel(hybrid_cmd_release_svshold);
- pmodule_SendSGLineDel(hybrid_cmd_unsgline);
- pmodule_SendSZLineDel(hybrid_cmd_unszline);
- pmodule_SendSZLine(hybrid_cmd_szline);
- pmodule_SendSGLine(hybrid_cmd_sgline);
- pmodule_SendBanDel(hybrid_cmd_unban);
- pmodule_SendSVSMode_chan(hybrid_cmd_svsmode_chan);
- pmodule_SendSVID(hybrid_cmd_svid_umode);
- pmodule_SendUnregisteredNick(hybrid_cmd_nc_change);
- pmodule_SendSVID2(hybrid_cmd_svid_umode2);
- pmodule_SendSVID3(hybrid_cmd_svid_umode3);
- pmodule_SendSVSJoin(hybrid_cmd_svsjoin);
- pmodule_SendSVSPart(hybrid_cmd_svspart);
- pmodule_SendSWhois(hybrid_cmd_swhois);
- pmodule_SendEOB(hybrid_cmd_eob);
- pmodule_IsFloodModeParamValid(hybrid_flood_mode_check);
- pmodule_SendJupe(hybrid_cmd_jupe);
- pmodule_IsNickValid(hybrid_valid_nick);
- pmodule_IsChannelValid(hybrid_valid_chan);
- pmodule_SendCTCP(hybrid_cmd_ctcp);
- pmodule_ProcessUsermodes(hybrid_set_umode);
+ pmodule_cmd_topic(hybrid_cmd_topic);
+ pmodule_SendVhostDel(hybrid_cmd_vhost_off);
+ pmodule_SendAkill(hybrid_cmd_akill);
+ pmodule_SendSVSKill(hybrid_SendSVSKill);
+ pmodule_SendSVSMode(hybrid_cmd_svsmode);
+ pmodule_cmd_372(hybrid_cmd_372);
+ pmodule_cmd_372_error(hybrid_cmd_372_error);
+ pmodule_cmd_375(hybrid_cmd_375);
+ pmodule_cmd_376(hybrid_cmd_376);
+ pmodule_cmd_nick(hybrid_cmd_nick);
+ pmodule_SendGuestNick(hybrid_cmd_guest_nick);
+ pmodule_SendMode(hybrid_cmd_mode);
+ pmodule_SendClientIntroduction(hybrid_cmd_bot_nick);
+ pmodule_SendKick(hybrid_cmd_kick);
+ pmodule_SendNoticeChanops(hybrid_cmd_notice_ops);
+ pmodule_cmd_notice(hybrid_cmd_notice);
+ pmodule_cmd_notice2(hybrid_cmd_notice2);
+ pmodule_cmd_privmsg(hybrid_cmd_privmsg);
+ pmodule_cmd_privmsg2(hybrid_cmd_privmsg2);
+ pmodule_SendGlobalNotice(hybrid_cmd_serv_notice);
+ pmodule_SendGlobalPrivmsg(hybrid_cmd_serv_privmsg);
+ pmodule_SendBotOp(hybrid_cmd_bot_chan_mode);
+ pmodule_cmd_351(hybrid_cmd_351);
+ pmodule_SendQuit(hybrid_cmd_quit);
+ pmodule_SendPong(hybrid_cmd_pong);
+ pmodule_SendJoin(hybrid_cmd_join);
+ pmodule_SendSQLineDel(hybrid_cmd_unsqline);
+ pmodule_SendInvite(hybrid_cmd_invite);
+ pmodule_SendPart(hybrid_cmd_part);
+ pmodule_cmd_391(hybrid_cmd_391);
+ pmodule_cmd_250(hybrid_cmd_250);
+ pmodule_cmd_307(hybrid_cmd_307);
+ pmodule_cmd_311(hybrid_cmd_311);
+ pmodule_cmd_312(hybrid_cmd_312);
+ pmodule_cmd_317(hybrid_cmd_317);
+ pmodule_cmd_219(hybrid_cmd_219);
+ pmodule_cmd_401(hybrid_cmd_401);
+ pmodule_cmd_318(hybrid_cmd_318);
+ pmodule_cmd_242(hybrid_cmd_242);
+ pmodule_cmd_243(hybrid_cmd_243);
+ pmodule_cmd_211(hybrid_cmd_211);
+ pmodule_SendGlobops(hybrid_cmd_global);
+ pmodule_SendGlobops_legacy(hybrid_cmd_global_legacy);
+ pmodule_SendSQLine(hybrid_cmd_sqline);
+ pmodule_SendSquit(hybrid_cmd_squit);
+ pmodule_SendSVSO(hybrid_cmd_svso);
+ pmodule_SendChangeBotNick(hybrid_cmd_chg_nick);
+ pmodule_SendForceNickChange(hybrid_cmd_svsnick);
+ pmodule_SendVhost(hybrid_cmd_vhost_on);
+ pmodule_SendConnect(hybrid_cmd_connect);
+ pmodule_SendSVSHOLD(hybrid_cmd_svshold);
+ pmodule_SendSVSHOLDDel(hybrid_cmd_release_svshold);
+ pmodule_SendSGLineDel(hybrid_cmd_unsgline);
+ pmodule_SendSZLineDel(hybrid_cmd_unszline);
+ pmodule_SendSZLine(hybrid_cmd_szline);
+ pmodule_SendSGLine(hybrid_cmd_sgline);
+ pmodule_SendBanDel(hybrid_cmd_unban);
+ pmodule_SendSVSMode_chan(hybrid_cmd_svsmode_chan);
+ pmodule_SendSVID(hybrid_cmd_svid_umode);
+ pmodule_SendUnregisteredNick(hybrid_cmd_nc_change);
+ pmodule_SendSVID2(hybrid_cmd_svid_umode2);
+ pmodule_SendSVID3(hybrid_cmd_svid_umode3);
+ pmodule_SendSVSJoin(hybrid_cmd_svsjoin);
+ pmodule_SendSVSPart(hybrid_cmd_svspart);
+ pmodule_SendSWhois(hybrid_cmd_swhois);
+ pmodule_SendEOB(hybrid_cmd_eob);
+ pmodule_IsFloodModeParamValid(hybrid_flood_mode_check);
+ pmodule_SendJupe(hybrid_cmd_jupe);
+ pmodule_IsNickValid(hybrid_valid_nick);
+ pmodule_IsChannelValid(hybrid_valid_chan);
+ pmodule_SendCTCP(hybrid_cmd_ctcp);
+ pmodule_ProcessUsermodes(hybrid_set_umode);
}
/**
@@ -1533,34 +1533,34 @@ void moduleAddAnopeCmds()
int AnopeInit(int argc, char **argv)
{
- this->SetAuthor("Anope");
- this->SetVersion("$Id$");
- this->SetType(PROTOCOL);
-
- pmodule_ircd_version("Hybrid IRCd 7.0");
- pmodule_ircd_cap(myIrcdcap);
- pmodule_ircd_var(myIrcd);
- pmodule_ircd_cbmodeinfos(myCbmodeinfos);
- pmodule_ircd_cumodes(myCumodes);
- pmodule_ircd_flood_mode_char_set("");
- pmodule_ircd_flood_mode_char_remove("");
- pmodule_ircd_cbmodes(myCbmodes);
- pmodule_ircd_cmmodes(myCmmodes);
- pmodule_ircd_csmodes(myCsmodes);
- pmodule_ircd_useTSMode(0);
-
- /** Deal with modes anope _needs_ to know **/
- pmodule_invis_umode(UMODE_i);
- pmodule_oper_umode(UMODE_o);
- pmodule_invite_cmode(CMODE_i);
- pmodule_secret_cmode(CMODE_s);
- pmodule_private_cmode(CMODE_p);
- pmodule_key_mode(CMODE_k);
- pmodule_limit_mode(CMODE_l);
-
- moduleAddAnopeCmds();
+ this->SetAuthor("Anope");
+ this->SetVersion("$Id$");
+ this->SetType(PROTOCOL);
+
+ pmodule_ircd_version("Hybrid IRCd 7.0");
+ pmodule_ircd_cap(myIrcdcap);
+ pmodule_ircd_var(myIrcd);
+ pmodule_ircd_cbmodeinfos(myCbmodeinfos);
+ pmodule_ircd_cumodes(myCumodes);
+ pmodule_ircd_flood_mode_char_set("");
+ pmodule_ircd_flood_mode_char_remove("");
+ pmodule_ircd_cbmodes(myCbmodes);
+ pmodule_ircd_cmmodes(myCmmodes);
+ pmodule_ircd_csmodes(myCsmodes);
+ pmodule_ircd_useTSMode(0);
+
+ /** Deal with modes anope _needs_ to know **/
+ pmodule_invis_umode(UMODE_i);
+ pmodule_oper_umode(UMODE_o);
+ pmodule_invite_cmode(CMODE_i);
+ pmodule_secret_cmode(CMODE_s);
+ pmodule_private_cmode(CMODE_p);
+ pmodule_key_mode(CMODE_k);
+ pmodule_limit_mode(CMODE_l);
+
+ moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
- moduleAddIRCDMsgs();
+ moduleAddIRCDMsgs();
- return MOD_CONT;
+ return MOD_CONT;
}
diff --git a/src/protocol/obsolete/hybrid.h b/src/protocol/obsolete/hybrid.h
index 3d58695d4..a7e744ad5 100644
--- a/src/protocol/obsolete/hybrid.h
+++ b/src/protocol/obsolete/hybrid.h
@@ -30,15 +30,15 @@
#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 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
diff --git a/src/protocol/obsolete/plexus3.c b/src/protocol/obsolete/plexus3.c
index 99025bc5b..358522bce 100644
--- a/src/protocol/obsolete/plexus3.c
+++ b/src/protocol/obsolete/plexus3.c
@@ -34,7 +34,7 @@ IRCDVar myIrcd[] = {
"+i", /* Dev/Null alias mode */
"+i", /* Global alias mode */
"+i", /* Used by BotServ Bots */
- 5, /* Chan Max Symbols */
+ 5, /* Chan Max Symbols */
"-cilmnpstBMNORS", /* Modes to Remove */
"+ao", /* Channel Umode used by Botserv bots */
1, /* SVSNICK */
@@ -44,50 +44,50 @@ IRCDVar myIrcd[] = {
"-q", /* Mode to unset for an owner */
"+a", /* Mode to set for chan admin */
"-a", /* Mode to unset for chan admin */
- "+rd", /* Mode On Reg */
- "N", /* Mode on ID for Roots */
- NULL, /* Mode on ID for Admins */
- NULL, /* Mode on ID for Opers */
- "-r+d", /* Mode on UnReg */
+ "+rd", /* Mode On Reg */
+ "N", /* Mode on ID for Roots */
+ NULL, /* Mode on ID for Admins */
+ NULL, /* Mode on ID for Opers */
+ "-r+d", /* Mode on UnReg */
"+d", /* Mode on Nick Change */
- 1, /* Supports SGlines */
- 1, /* Supports SQlines */
- 0, /* Supports SZlines */
+ 1, /* Supports SGlines */
+ 1, /* Supports SQlines */
+ 0, /* Supports SZlines */
1, /* Supports Halfop +h */
3, /* Number of server args */
- 0, /* Join 2 Set */
- 0, /* Join 2 Message */
- 1, /* Has exceptions +e */
- 0, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- UMODE_N, /* Protected Umode */
- 0, /* Has Admin */
- 1, /* Chan SQlines */
- 0, /* Quit on Kill */
- 0, /* SVSMODE unban */
- 1, /* Has Protect */
- 0, /* Reverse */
- 0, /* Chan Reg */
- 0, /* Channel Mode */
- 0, /* vidents */
- 1, /* svshold */
+ 0, /* Join 2 Set */
+ 0, /* Join 2 Message */
+ 1, /* Has exceptions +e */
+ 0, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ UMODE_N, /* Protected Umode */
+ 0, /* Has Admin */
+ 1, /* Chan SQlines */
+ 0, /* Quit on Kill */
+ 0, /* SVSMODE unban */
+ 1, /* Has Protect */
+ 0, /* Reverse */
+ 0, /* Chan Reg */
+ 0, /* Channel Mode */
+ 0, /* vidents */
+ 1, /* svshold */
1, /* time stamp on mode */
- 0, /* NICKIP */
- 0, /* O:LINE */
- 1, /* UMODE */
- 1, /* VHOST ON NICK */
- 0, /* Change RealName */
- CMODE_p, /* No Knock */
- 0, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- UMODE_x, /* Vhost Mode */
- 0, /* +f */
- 0, /* +L */
- 0, /* +f Mode */
- 0, /* +L Mode */
+ 0, /* NICKIP */
+ 0, /* O:LINE */
+ 1, /* UMODE */
+ 1, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ CMODE_p, /* No Knock */
+ 0, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ UMODE_x, /* Vhost Mode */
+ 0, /* +f */
+ 0, /* +L */
+ 0, /* +f Mode */
+ 0, /* +L Mode */
1, /* On nick change check if they could be identified */
0, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
+ NULL, /* CAPAB Chan Modes */
0, /* We support TOKENS */
1, /* TOKENS are CASE inSensitive */
0, /* TIME STAMPS are BASE64 */
@@ -103,7 +103,7 @@ IRCDVar myIrcd[] = {
0, /* p10 */
NULL, /* character set */
1, /* reports sync state */
- 0, /* CIDR channelbans */
+ 0, /* CIDR channelbans */
}
,
{NULL}
@@ -111,34 +111,34 @@ IRCDVar myIrcd[] = {
IRCDCAPAB myIrcdcap[] = {
{
- 0, /* NOQUIT */
- 0, /* TSMODE */
- 0, /* UNCONNECT */
- 0, /* NICKIP */
- 0, /* SJOIN */
- CAPAB_ZIP, /* ZIP */
- 0, /* BURST */
- CAPAB_TS5, /* TS5 */
- 0, /* TS3 */
- 0, /* DKEY */
- 0, /* PT4 */
- 0, /* SCS */
- CAPAB_QS, /* QS */
- CAPAB_UID, /* UID */
- CAPAB_KNOCK, /* KNOCK */
- 0, /* CLIENT */
- 0, /* IPV6 */
- 0, /* SSJ5 */
- 0, /* SN2 */
- 0, /* TOKEN */
- 0, /* VHOST */
- 0, /* SSJ3 */
- 0, /* NICK2 */
- 0, /* UMODE2 */
- 0, /* VL */
- 0, /* TLKEXT */
- 0, /* DODKEY */
- 0, /* DOZIP */
+ 0, /* NOQUIT */
+ 0, /* TSMODE */
+ 0, /* UNCONNECT */
+ 0, /* NICKIP */
+ 0, /* SJOIN */
+ CAPAB_ZIP, /* ZIP */
+ 0, /* BURST */
+ CAPAB_TS5, /* TS5 */
+ 0, /* TS3 */
+ 0, /* DKEY */
+ 0, /* PT4 */
+ 0, /* SCS */
+ CAPAB_QS, /* QS */
+ CAPAB_UID, /* UID */
+ CAPAB_KNOCK, /* KNOCK */
+ 0, /* CLIENT */
+ 0, /* IPV6 */
+ 0, /* SSJ5 */
+ 0, /* SN2 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ 0, /* SSJ3 */
+ 0, /* NICK2 */
+ 0, /* UMODE2 */
+ 0, /* VL */
+ 0, /* TLKEXT */
+ 0, /* DODKEY */
+ 0, /* DOZIP */
0, 0, 0}
};
@@ -153,20 +153,20 @@ plexus_ProcessUsermodes (User * user, int ac, const char **av)
ac--;
if (debug)
- alog ("debug: Changing mode for %s to %s", user->nick, modes);
+ alog ("debug: Changing mode for %s to %s", user->nick, modes);
while (*modes)
- {
+ {
- /* This looks better, much better than "add ? (do_add) : (do_remove)".
- * At least this is readable without paying much attention :) -GD
- */
- if (add)
+ /* This looks better, much better than "add ? (do_add) : (do_remove)".
+ * At least this is readable without paying much attention :) -GD
+ */
+ if (add)
user->mode |= umodes[(int) *modes];
- else
+ else
user->mode &= ~umodes[(int) *modes];
- switch (*modes++)
+ switch (*modes++)
{
case '+':
add = 1;
@@ -176,11 +176,11 @@ plexus_ProcessUsermodes (User * user, int ac, const char **av)
break;
case 'd':
if (ac == 0)
- {
- alog ("user: umode +d with no parameter (?) for user %s",
- user->nick);
- break;
- }
+ {
+ alog ("user: umode +d with no parameter (?) for user %s",
+ user->nick);
+ break;
+ }
ac--;
av++;
@@ -191,30 +191,30 @@ plexus_ProcessUsermodes (User * user, int ac, const char **av)
break;
case 'o':
if (add)
- {
- opcnt++;
+ {
+ opcnt++;
- if (WallOper)
+ if (WallOper)
anope_SendGlobops (s_OperServ,
"\2%s\2 is now an IRC operator.",
user->nick);
- display_news (user, NEWS_OPER);
+ display_news (user, NEWS_OPER);
- }
+ }
else
- {
- opcnt--;
- }
+ {
+ opcnt--;
+ }
break;
case 'r':
if (add && !nick_identified (user))
- {
- common_svsmode (user, "-r", NULL);
- user->mode &= ~UMODE_r;
- }
+ {
+ common_svsmode (user, "-r", NULL);
+ user->mode &= ~UMODE_r;
+ }
break;
}
- }
+ }
}
unsigned long umodes[128] = {
@@ -276,7 +276,7 @@ char myCsmodes[128] = {
0,
0,
0, 0, 0,
- 'h', /* (37) % Channel halfops */
+ 'h', /* (37) % Channel halfops */
'a',
0, 0, 0, 0,
@@ -479,18 +479,18 @@ void
plexus_cmd_notice (const char *source, const char *dest, const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
if (NSDefFlags & NI_MSG)
- {
- plexus_cmd_privmsg2 (source, dest, buf);
- }
+ {
+ plexus_cmd_privmsg2 (source, dest, buf);
+ }
else
- {
- send_cmd (source, "NOTICE %s :%s", dest, buf);
- }
+ {
+ send_cmd (source, "NOTICE %s :%s", dest, buf);
+ }
}
void
@@ -503,9 +503,9 @@ void
plexus_cmd_privmsg (const char *source, const char *dest, const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (source, "PRIVMSG %s :%s", dest, buf);
}
@@ -533,9 +533,9 @@ void
plexus_SendGlobops (const char *source, const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (source ? source : ServerName, "OPERWALL :%s", buf);
}
@@ -558,18 +558,18 @@ int
anope_event_nick (const char *source, int ac, const char **av)
{
if (ac != 2)
- {
- User *user = do_nick (source, av[0], av[4], av[8], av[6], av[9],
- strtoul (av[2], NULL, 10),
- strtoul (av[7], NULL, 0), 0, av[5], NULL);
- if (user)
+ {
+ User *user = do_nick (source, av[0], av[4], av[8], av[6], av[9],
+ strtoul (av[2], NULL, 10),
+ strtoul (av[7], NULL, 0), 0, av[5], NULL);
+ if (user)
anope_ProcessUsermodes (user, 1, &av[3]);
- }
+ }
else
- {
- do_nick (source, av[0], NULL, NULL, NULL, NULL,
- strtoul (av[1], NULL, 10), 0, 0, NULL, NULL);
- }
+ {
+ do_nick (source, av[0], NULL, NULL, NULL, NULL,
+ strtoul (av[1], NULL, 10), 0, 0, NULL, NULL);
+ }
return MOD_CONT;
}
@@ -577,46 +577,46 @@ int
anope_event_topic (const char *source, int ac, const char **av)
{
if (ac == 4)
- {
- do_topic (source, ac, av);
- }
+ {
+ do_topic (source, ac, av);
+ }
else
- {
- Channel *c = findchan (av[0]);
- time_t topic_time = time (NULL);
+ {
+ Channel *c = findchan (av[0]);
+ time_t topic_time = time (NULL);
- if (!c)
+ if (!c)
{
if (debug)
- {
- alog ("debug: TOPIC %s for nonexistent channel %s",
- merge_args (ac - 1, av + 1), av[0]);
- }
+ {
+ alog ("debug: TOPIC %s for nonexistent channel %s",
+ merge_args (ac - 1, av + 1), av[0]);
+ }
return MOD_CONT;
}
- if (check_topiclock (c, topic_time))
+ if (check_topiclock (c, topic_time))
return MOD_CONT;
- if (c->topic)
+ if (c->topic)
{
free (c->topic);
c->topic = NULL;
}
- if (ac > 1 && *av[1])
+ if (ac > 1 && *av[1])
c->topic = sstrdup (av[1]);
- strscpy (c->topic_setter, source, sizeof (c->topic_setter));
- c->topic_time = topic_time;
+ strscpy (c->topic_setter, source, sizeof (c->topic_setter));
+ c->topic_time = topic_time;
- record_topic (av[0]);
+ record_topic (av[0]);
if (ac > 1 && *av[1])
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
else
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
- }
+ }
return MOD_CONT;
}
@@ -624,7 +624,7 @@ int
anope_event_tburst (const char *source, int ac, const char **av)
{
if (ac != 5)
- return MOD_CONT;
+ return MOD_CONT;
av[0] = av[1];
av[1] = av[3];
@@ -643,28 +643,28 @@ int
anope_event_encap (const char *source, int ac, const char **av)
{
if (ac < 2)
- return MOD_CONT;
+ return MOD_CONT;
if (!stricmp (av[1], "CHGHOST"))
- {
- User *u;
+ {
+ User *u;
- if (ac != 4)
+ if (ac != 4)
return MOD_CONT;
- u = finduser (av[2]);
- if (!u)
+ u = finduser (av[2]);
+ if (!u)
{
if (debug)
- {
- alog ("debug: CHGHOST for nonexistent user %s", av[2]);
- }
+ {
+ alog ("debug: CHGHOST for nonexistent user %s", av[2]);
+ }
return MOD_CONT;
}
- u->SetDisplayedHost(av[3]);
- return MOD_CONT;
- }
+ u->SetDisplayedHost(av[3]);
+ return MOD_CONT;
+ }
return MOD_CONT;
}
@@ -672,7 +672,7 @@ int
anope_event_436 (const char *source, int ac, const char **av)
{
if (ac < 1)
- return MOD_CONT;
+ return MOD_CONT;
m_nickcoll (av[0]);
return MOD_CONT;
@@ -803,7 +803,7 @@ plexus_cmd_topic (const char *whosets, const char *chan, const char *whosetit,
const char *topic, time_t when)
{
send_cmd (whosets, "ENCAP * TOPIC %s %s %lu :%s", chan, whosetit,
- (unsigned long int) when, topic);
+ (unsigned long int) when, topic);
}
void
@@ -818,18 +818,18 @@ plexus_SendVhost (const char *nick, const char *vIdent, const char *vhost)
User *u;
if (!nick)
- {
- return;
- }
+ {
+ return;
+ }
u = finduser (nick);
if (u)
- {
- send_cmd (ServerName, "ENCAP * CHGHOST %s %s", u->nick, vhost);
- common_svsmode (u, "+x", NULL);
- u->mode |= UMODE_x;
- }
+ {
+ send_cmd (ServerName, "ENCAP * CHGHOST %s %s", u->nick, vhost);
+ common_svsmode (u, "+x", NULL);
+ u->mode |= UMODE_x;
+ }
}
void
@@ -842,7 +842,7 @@ void
plexus_SendJoin (const char *user, const char *channel, time_t chantime)
{
send_cmd (ServerName, "SJOIN %ld %s + :%s", (long int) chantime, channel,
- user);
+ user);
}
/*
@@ -859,21 +859,21 @@ plexus_SendAkill (const char *user, const char *host, const char *who, time_t wh
time_t expires, const char *reason)
{
send_cmd (s_OperServ, "KLINE * %ld %s %s :%s",
- (long int) (expires - (long) time (NULL)), user, host, reason);
+ (long int) (expires - (long) time (NULL)), user, host, reason);
}
void
plexus_SendSVSKill (const char *source, const char *user, const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
if (!source || !user)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (source, "KILL %s :%s", user, buf);
}
@@ -882,17 +882,17 @@ void
plexus_SendSVSMode (User * u, int ac, const char **av)
{
send_cmd (ServerName, "ENCAP * SVSMODE %s %ld %s%s%s", u->nick,
- (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
- (ac == 2 ? av[1] : ""));
+ (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
+ (ac == 2 ? av[1] : ""));
}
/*
* SVINFO
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
- * parv[4] = server's idea of UTC time
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
+ * parv[4] = server's idea of UTC time
*/
void
plexus_cmd_svinfo ()
@@ -902,31 +902,31 @@ plexus_cmd_svinfo ()
/* CAPAB */
/*
- QS - Can handle quit storm removal
- EX - Can do channel +e exemptions
- CHW - Can do channel wall @#
- LL - Can do lazy links
- IE - Can do invite exceptions
- EOB - Can do EOB message
- KLN - Can do KLINE message
- GLN - Can do GLINE message
+ QS - Can handle quit storm removal
+ EX - Can do channel +e exemptions
+ CHW - Can do channel wall @#
+ LL - Can do lazy links
+ IE - Can do invite exceptions
+ EOB - Can do EOB message
+ KLN - Can do KLINE message
+ GLN - Can do GLINE message
HOPS - can do half ops (+h)
- HUB - This server is a HUB
+ HUB - This server is a HUB
AOPS - Can do anon ops (+a)
- UID - Can do UIDs
- ZIP - Can do ZIPlinks
- ENC - Can do ENCrypted links
+ UID - Can do UIDs
+ ZIP - Can do ZIPlinks
+ ENC - Can do ENCrypted links
KNOCK - supports KNOCK
TBURST - supports TBURST
PARA - supports invite broadcasting for +p
ENCAP - supports encapsulization of protocol messages
- SVS - supports services protocol extensions
+ SVS - supports services protocol extensions
*/
void
plexus_cmd_capab ()
{
send_cmd (NULL,
- "CAPAB :QS EX CHW IE EOB KLN UNKLN GLN HUB KNOCK TBURST PARA ENCAP SVS");
+ "CAPAB :QS EX CHW IE EOB KLN UNKLN GLN HUB KNOCK TBURST PARA ENCAP SVS");
}
/* PASS */
@@ -949,11 +949,11 @@ plexus_SendConnect (int servernum)
me_server = new_server (NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
if (servernum == 1)
- plexus_cmd_pass (RemotePassword);
+ plexus_cmd_pass (RemotePassword);
else if (servernum == 2)
- plexus_cmd_pass (RemotePassword2);
+ plexus_cmd_pass (RemotePassword2);
else if (servernum == 3)
- plexus_cmd_pass (RemotePassword3);
+ plexus_cmd_pass (RemotePassword3);
plexus_cmd_capab ();
plexus_SendServer (ServerName, 1, ServerDesc);
@@ -970,12 +970,12 @@ plexus_cmd_svsinfo ()
void
plexus_SendClientIntroduction (const char *nick, const char *user, const char *host, const char *real,
- const char *modes)
+ const char *modes)
{
EnforceQlinedNick (nick, NULL);
send_cmd (ServerName, "NICK %s 1 %ld %s %s %s %s 0 %s :%s", nick,
- (long int) time (NULL), modes, user, host, ServerName, host,
- real);
+ (long int) time (NULL), modes, user, host, ServerName, host,
+ real);
plexus_SendSQLine (nick, "Reserved for services");
}
@@ -984,20 +984,20 @@ void
plexus_SendPart (const char *nick, const char *chan, const char *buf)
{
if (buf)
- {
- send_cmd (nick, "PART %s :%s", chan, buf);
- }
+ {
+ send_cmd (nick, "PART %s :%s", chan, buf);
+ }
else
- {
- send_cmd (nick, "PART %s", chan);
- }
+ {
+ send_cmd (nick, "PART %s", chan);
+ }
}
int
anope_event_ping (const char *source, int ac, const char **av)
{
if (ac < 1)
- return MOD_CONT;
+ return MOD_CONT;
plexus_SendPong (ac > 1 ? av[1] : ServerName, av[0]);
return MOD_CONT;
}
@@ -1006,9 +1006,9 @@ int
anope_event_away (const char *source, int ac, const char **av)
{
if (!source)
- {
- return MOD_CONT;
- }
+ {
+ return MOD_CONT;
+ }
m_away (source, (ac ? av[0] : NULL));
return MOD_CONT;
}
@@ -1017,7 +1017,7 @@ int
anope_event_kill (const char *source, int ac, const char **av)
{
if (ac != 2)
- return MOD_CONT;
+ return MOD_CONT;
m_kill (av[0], av[1]);
return MOD_CONT;
@@ -1027,7 +1027,7 @@ int
anope_event_kick (const char *source, int ac, const char **av)
{
if (ac != 3)
- return MOD_CONT;
+ return MOD_CONT;
do_kick (source, ac, av);
return MOD_CONT;
}
@@ -1042,7 +1042,7 @@ anope_event_eob (const char *source, int ac, const char **av)
* server finished bursting. -GD
*/
if (!s && serv_uplink)
- s = serv_uplink;
+ s = serv_uplink;
finish_sync (s, 1);
return MOD_CONT;
@@ -1059,7 +1059,7 @@ int
anope_event_join (const char *source, int ac, const char **av)
{
if (ac != 1)
- return MOD_CONT;
+ return MOD_CONT;
do_join (source, ac, av);
return MOD_CONT;
}
@@ -1068,9 +1068,9 @@ int
anope_event_motd (const char *source, int ac, const char **av)
{
if (!source)
- {
- return MOD_CONT;
- }
+ {
+ return MOD_CONT;
+ }
m_motd (source);
return MOD_CONT;
@@ -1080,7 +1080,7 @@ int
anope_event_privmsg (const char *source, int ac, const char **av)
{
if (ac != 2)
- return MOD_CONT;
+ return MOD_CONT;
m_privmsg (source, av[0], av[1]);
return MOD_CONT;
}
@@ -1089,7 +1089,7 @@ int
anope_event_part (const char *source, int ac, const char **av)
{
if (ac < 1 || ac > 2)
- return MOD_CONT;
+ return MOD_CONT;
do_part (source, ac, av);
return MOD_CONT;
}
@@ -1098,9 +1098,9 @@ int
anope_event_whois (const char *source, int ac, const char **av)
{
if (source && ac >= 1)
- {
- m_whois (source, av[0]);
- }
+ {
+ m_whois (source, av[0]);
+ }
return MOD_CONT;
}
@@ -1109,9 +1109,9 @@ int
anope_event_server (const char *source, int ac, const char **av)
{
if (!stricmp (av[1], "1"))
- {
- uplink = sstrdup (av[0]);
- }
+ {
+ uplink = sstrdup (av[0]);
+ }
do_server (source, av[0], av[1], av[2], NULL);
return MOD_CONT;
}
@@ -1120,7 +1120,7 @@ int
anope_event_squit (const char *source, int ac, const char **av)
{
if (ac != 2)
- return MOD_CONT;
+ return MOD_CONT;
do_squit (source, ac, av);
return MOD_CONT;
}
@@ -1129,7 +1129,7 @@ int
anope_event_quit (const char *source, int ac, const char **av)
{
if (ac != 1)
- return MOD_CONT;
+ return MOD_CONT;
do_quit (source, ac, av);
return MOD_CONT;
}
@@ -1144,14 +1144,14 @@ void
plexus_cmd_372_error (const char *source)
{
send_cmd (ServerName, "422 %s :- MOTD file not found! Please "
- "contact your IRC administrator.", source);
+ "contact your IRC administrator.", source);
}
void
plexus_cmd_375 (const char *source)
{
send_cmd (ServerName, "375 %s :- %s Message of the Day",
- source, ServerName);
+ source, ServerName);
}
void
@@ -1165,9 +1165,9 @@ void
plexus_cmd_391 (const char *source, const char *timestr)
{
if (!timestr)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "391 :%s %s :%s", source, ServerName, timestr);
}
@@ -1176,9 +1176,9 @@ void
plexus_cmd_250 (const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "250 %s", buf);
}
@@ -1188,9 +1188,9 @@ void
plexus_cmd_307 (const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "307 %s", buf);
}
@@ -1200,9 +1200,9 @@ void
plexus_cmd_311 (const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "311 %s", buf);
}
@@ -1212,9 +1212,9 @@ void
plexus_cmd_312 (const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "312 %s", buf);
}
@@ -1224,9 +1224,9 @@ void
plexus_cmd_317 (const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "317 %s", buf);
}
@@ -1236,19 +1236,19 @@ void
plexus_cmd_219 (const char *source, const char *letter)
{
if (!source)
- {
- return;
- }
+ {
+ return;
+ }
if (letter)
- {
- send_cmd (ServerName, "219 %s %c :End of /STATS report.", source,
+ {
+ send_cmd (ServerName, "219 %s %c :End of /STATS report.", source,
*letter);
- }
+ }
else
- {
- send_cmd (ServerName, "219 %s l :End of /STATS report.", source);
- }
+ {
+ send_cmd (ServerName, "219 %s l :End of /STATS report.", source);
+ }
}
/* 401 */
@@ -1256,9 +1256,9 @@ void
plexus_cmd_401 (const char *source, const char *who)
{
if (!source || !who)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "401 %s %s :No such service.", source, who);
}
@@ -1267,9 +1267,9 @@ void
plexus_cmd_318 (const char *source, const char *who)
{
if (!source || !who)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "318 %s %s :End of /WHOIS list.", source, who);
}
@@ -1279,9 +1279,9 @@ void
plexus_cmd_242 (const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "242 %s", buf);
}
@@ -1291,9 +1291,9 @@ void
plexus_cmd_243 (const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "243 %s", buf);
}
@@ -1303,9 +1303,9 @@ void
plexus_cmd_211 (const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "211 %s", buf);
}
@@ -1314,9 +1314,9 @@ void
plexus_SendMode (const char *source, const char *dest, const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (source, "MODE %s %s", dest, buf);
}
@@ -1326,8 +1326,8 @@ plexus_cmd_nick (const char *nick, const char *name, const char *mode)
{
EnforceQlinedNick (nick, NULL);
send_cmd (ServerName, "NICK %s 1 %ld %s %s %s %s 0 %s :%s", nick,
- (long int) time (NULL), mode, ServiceUser, ServiceHost,
- ServerName, ServiceHost, (name));
+ (long int) time (NULL), mode, ServiceUser, ServiceHost,
+ ServerName, ServiceHost, (name));
send_cmd (nick, "RESV * %s :%s", nick, "Reserved for services");
}
@@ -1335,22 +1335,22 @@ void
plexus_SendKick (const char *source, const char *chan, const char *user, const char *buf)
{
if (buf)
- {
- send_cmd (source, "KICK %s %s :%s", chan, user, buf);
- }
+ {
+ send_cmd (source, "KICK %s %s :%s", chan, user, buf);
+ }
else
- {
- send_cmd (source, "KICK %s %s", chan, user);
- }
+ {
+ send_cmd (source, "KICK %s %s", chan, user);
+ }
}
void
plexus_SendNoticeChanops (const char *source, const char *dest, const char *buf)
{
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "NOTICE @%s :%s", dest, buf);
}
@@ -1366,13 +1366,13 @@ void
plexus_SendQuit (const char *source, const char *buf)
{
if (buf)
- {
- send_cmd (source, "QUIT :%s", buf);
- }
+ {
+ send_cmd (source, "QUIT :%s", buf);
+ }
else
- {
- send_cmd (source, "QUIT");
- }
+ {
+ send_cmd (source, "QUIT");
+ }
}
/* PONG */
@@ -1387,9 +1387,9 @@ void
plexus_SendInvite (const char *source, const char *chan, const char *nick)
{
if (!source || !chan || !nick)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (source, "INVITE %s %s", nick, chan);
}
@@ -1399,9 +1399,9 @@ void
plexus_SendSquit (const char *servname, const char *message)
{
if (!servname || !message)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (ServerName, "SQUIT %s :%s", servname, message);
}
@@ -1410,26 +1410,26 @@ int
anope_event_mode (const char *source, int ac, const char **av)
{
if (ac < 2)
- return MOD_CONT;
+ return MOD_CONT;
if (*av[0] == '#' || *av[0] == '&')
- {
- do_cmode (source, ac, av);
- }
+ {
+ do_cmode (source, ac, av);
+ }
else
- {
- Server *s;
- s = findserver (servlist, source);
+ {
+ Server *s;
+ s = findserver (servlist, source);
- if (s && *av[0])
+ if (s && *av[0])
{
do_umode (av[0], ac, av);
}
- else
+ else
{
do_umode (source, ac, av);
}
- }
+ }
return MOD_CONT;
}
@@ -1437,8 +1437,8 @@ void
plexus_cmd_351 (const char *source)
{
send_cmd (ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
- source, version_number, ServerName, ircd->name, version_flags,
- EncModule, version_build);
+ source, version_number, ServerName, ircd->name, version_flags,
+ EncModule, version_build);
}
/* Event: PROTOCTL */
@@ -1451,29 +1451,29 @@ anope_event_capab (const char *source, int ac, const char **av)
char *str;
if (ac < 1)
- return MOD_CONT;
+ return MOD_CONT;
/* We get the params as one arg, we should split it for capab_parse */
argv = (const char **)scalloc (argvsize, sizeof (const char *));
argc = 0;
while ((str = myStrGetToken (av[0], ' ', argc)))
- {
- if (argc == argvsize)
+ {
+ if (argc == argvsize)
{
argvsize += 8;
argv = (const char **)srealloc (argv, argvsize * sizeof (const char *));
}
- argv[argc] = str;
- argc++;
- }
+ argv[argc] = str;
+ argc++;
+ }
capab_parse (argc, argv);
/* Free our built ac/av */
for (argvsize = 0; argvsize < argc; argvsize++)
- {
- free ((char *)argv[argvsize]);
- }
+ {
+ free ((char *)argv[argvsize]);
+ }
free ((char **)argv);
return MOD_CONT;
@@ -1484,8 +1484,8 @@ void
plexus_SendSVSHOLD (const char *nick)
{
send_cmd (s_OperServ, "ENCAP * RESV %d %s 0 :%s", NSReleaseTimeout, nick,
- "This nick is being held for a registered user. "
- "For help with regaining nicknames please see /nickserv help release");
+ "This nick is being held for a registered user. "
+ "For help with regaining nicknames please see /nickserv help release");
}
/* SVSHOLD - release */
@@ -1502,21 +1502,21 @@ plexus_SendForceNickChange (const char *nick, const char *newnick, time_t when)
User *u;
if (!nick || !newnick)
- return;
+ return;
if( (u = finduser (nick))) {
- send_cmd (ServerName, "ENCAP * SVSNICK %s %ld %s %ld",
- u->nick, (long int) u->timestamp, newnick, (long int) when);
+ send_cmd (ServerName, "ENCAP * SVSNICK %s %ld %s %ld",
+ u->nick, (long int) u->timestamp, newnick, (long int) when);
}
}
void
plexus_SendGuestNick (const char *nick, const char *user, const char *host, const char *real,
- const char *modes)
+ const char *modes)
{
send_cmd (ServerName, "NICK %s 1 %ld %s %s %s %s 0 %s :%s", nick,
- (long int) time (NULL), modes, user, host, ServerName, host,
- real);
+ (long int) time (NULL), modes, user, host, ServerName, host,
+ real);
}
void
@@ -1545,7 +1545,7 @@ void
plexus_SendSVID (const char *nick, time_t ts)
{
send_cmd (ServerName, "ENCAP * SVSMODE %s %lu +d 1", nick,
- (unsigned long int) ts);
+ (unsigned long int) ts);
}
/* SVSMODE +d */
@@ -1571,17 +1571,17 @@ plexus_SendSVID3 (User * u, const char *ts)
strlcpy(modes, "+r", sizeof(modes));
if(ircd->rootmodeonid && is_services_root(u)) {
- strlcat(modes, ircd->rootmodeonid, sizeof(modes));
+ strlcat(modes, ircd->rootmodeonid, sizeof(modes));
} else if(ircd->adminmodeonid && is_services_admin(u)) {
- strlcat(modes, ircd->adminmodeonid, sizeof(modes));
+ strlcat(modes, ircd->adminmodeonid, sizeof(modes));
} else if(ircd->opermodeonid && is_services_oper(u)) {
- strlcat(modes, ircd->opermodeonid, sizeof(modes));
+ strlcat(modes, ircd->opermodeonid, sizeof(modes));
}
if (u->svid != u->timestamp) {
- strlcat(modes, "d", sizeof(modes));
- common_svsmode (u, modes, ts);
+ strlcat(modes, "d", sizeof(modes));
+ common_svsmode (u, modes, ts);
} else {
- common_svsmode (u, modes, NULL);
+ common_svsmode (u, modes, NULL);
}
}
@@ -1590,20 +1590,20 @@ void
plexus_SendChangeBotNick (const char *oldnick, const char *newnick)
{
if (!oldnick || !newnick)
- {
- return;
- }
+ {
+ return;
+ }
send_cmd (oldnick, "NICK %s", newnick);
}
/*
* SVINFO
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
- * parv[4] = server's idea of UTC time
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
+ * parv[4] = server's idea of UTC time
*/
int
anope_event_svinfo (const char *source, int ac, const char **av)
@@ -1665,12 +1665,12 @@ int
anope_event_error (const char *source, int ac, const char **av)
{
if (ac >= 1)
- {
- if (debug)
+ {
+ if (debug)
{
alog ("debug: %s", av[0]);
}
- }
+ }
return MOD_CONT;
}
@@ -1680,10 +1680,10 @@ plexus_SendJupe (const char *jserver, const char *who, const char *reason)
char rbuf[256];
snprintf (rbuf, sizeof (rbuf), "(H) Juped by %s%s%s", who,
- reason ? ": " : "", reason ? reason : "");
+ reason ? ": " : "", reason ? reason : "");
if (findserver(servlist, jserver))
- plexus_SendSquit (jserver, rbuf);
+ plexus_SendSquit (jserver, rbuf);
plexus_SendServer (jserver, 2, rbuf);
new_server (me_server, jserver, rbuf, SERVER_JUPED, NULL);
}
@@ -1717,13 +1717,13 @@ plexus_SendCTCP (const char *source, const char *dest, const char *buf)
char *s;
if (!buf)
- {
- return;
- }
+ {
+ return;
+ }
else
- {
- s = normalizeBuffer (buf);
- }
+ {
+ s = normalizeBuffer (buf);
+ }
send_cmd (source, "NOTICE %s :\1%s \1", dest, s);
free (s);
diff --git a/src/protocol/obsolete/ptlink.c b/src/protocol/obsolete/ptlink.c
index ffc7915e0..b0cba3bfa 100644
--- a/src/protocol/obsolete/ptlink.c
+++ b/src/protocol/obsolete/ptlink.c
@@ -16,379 +16,379 @@
#include "ptlink.h"
IRCDVar myIrcd[] = {
- {"PTlink 6.15.*+", /* ircd name */
- "+o", /* nickserv mode */
- "+o", /* chanserv mode */
- "+o", /* memoserv mode */
- "+o", /* hostserv mode */
- "+io", /* operserv mode */
- "+o", /* botserv mode */
- "+h", /* helpserv mode */
- "+i", /* Dev/Null mode */
- "+io", /* Global mode */
- "+o", /* nickserv alias mode */
- "+o", /* chanserv alias mode */
- "+o", /* memoserv alias mode */
- "+io", /* hostserv alias mode */
- "+io", /* operserv alias mode */
- "+o", /* botserv alias mode */
- "+h", /* helpserv alias mode */
- "+i", /* Dev/Null alias mode */
- "+io", /* Global alias mode */
- "+", /* Used by BotServ Bots */
- 2, /* Chan Max Symbols */
- "-inpsmtCRKOASdcqBNl", /* Modes to Remove */
- "+ao", /* Channel Umode used by Botserv bots */
- 1, /* SVSNICK */
- 1, /* Vhost */
- 0, /* Has Owner */
- NULL, /* Mode to set for an owner */
- NULL, /* Mode to unset for an owner */
- "+a", /* Mode to set for chan admin */
- "-a", /* Mode to unset for chan admin */
- "+r", /* Mode On Reg */
- NULL, /* Mode on ID for Roots */
- NULL, /* Mode on ID for Admins */
- NULL, /* Mode on ID for Opers */
- "-r", /* Mode on UnReg */
- NULL, /* Mode on Nick Change */
- 1, /* Supports SGlines */
- 1, /* Supports SQlines */
- 1, /* Supports SZlines */
- 0, /* Supports Halfop +h */
- 4, /* Number of server args */
- 0, /* Join 2 Set */
- 0, /* Join 2 Message */
- 1, /* Has exceptions +e */
- 0, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- 0, /* Protected Umode */
- 0, /* Has Admin */
- 0, /* Chan SQlines */
- 0, /* Quit on Kill */
- 0, /* SVSMODE unban */
- 1, /* Has Protect */
- 0, /* Reverse */
- 1, /* Chan Reg */
- CMODE_r, /* Channel Mode */
- 1, /* vidents */
- 0, /* svshold */
- 0, /* time stamp on mode */
- 0, /* NICKIP */
- 0, /* O:LINE */
- 1, /* UMODE */
- 1, /* VHOST ON NICK */
- 0, /* Change RealName */
- CMODE_K, /* No Knock */
- CMODE_A, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- UMODE_VH, /* Vhost Mode */
- 1, /* +f */
- 0, /* +L */
- CMODE_f,
- 0,
- 1,
- 1, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support TOKENS */
- 1, /* TOKENS are CASE inSensitive */
- 0, /* TIME STAMPS are BASE64 */
- 0, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* Can remove User Channel Modes with SVSMODE */
- 0, /* Sglines are not enforced until user reconnects */
- NULL, /* vhost char */
- 0, /* ts6 */
- 1, /* support helper umode */
- 0, /* p10 */
- NULL, /* character set */
- 0, /* reports sync state */
- 0, /* CIDR channelbans */
- }
- ,
- {NULL}
+ {"PTlink 6.15.*+", /* ircd name */
+ "+o", /* nickserv mode */
+ "+o", /* chanserv mode */
+ "+o", /* memoserv mode */
+ "+o", /* hostserv mode */
+ "+io", /* operserv mode */
+ "+o", /* botserv mode */
+ "+h", /* helpserv mode */
+ "+i", /* Dev/Null mode */
+ "+io", /* Global mode */
+ "+o", /* nickserv alias mode */
+ "+o", /* chanserv alias mode */
+ "+o", /* memoserv alias mode */
+ "+io", /* hostserv alias mode */
+ "+io", /* operserv alias mode */
+ "+o", /* botserv alias mode */
+ "+h", /* helpserv alias mode */
+ "+i", /* Dev/Null alias mode */
+ "+io", /* Global alias mode */
+ "+", /* Used by BotServ Bots */
+ 2, /* Chan Max Symbols */
+ "-inpsmtCRKOASdcqBNl", /* Modes to Remove */
+ "+ao", /* Channel Umode used by Botserv bots */
+ 1, /* SVSNICK */
+ 1, /* Vhost */
+ 0, /* Has Owner */
+ NULL, /* Mode to set for an owner */
+ NULL, /* Mode to unset for an owner */
+ "+a", /* Mode to set for chan admin */
+ "-a", /* Mode to unset for chan admin */
+ "+r", /* Mode On Reg */
+ NULL, /* Mode on ID for Roots */
+ NULL, /* Mode on ID for Admins */
+ NULL, /* Mode on ID for Opers */
+ "-r", /* Mode on UnReg */
+ NULL, /* Mode on Nick Change */
+ 1, /* Supports SGlines */
+ 1, /* Supports SQlines */
+ 1, /* Supports SZlines */
+ 0, /* Supports Halfop +h */
+ 4, /* Number of server args */
+ 0, /* Join 2 Set */
+ 0, /* Join 2 Message */
+ 1, /* Has exceptions +e */
+ 0, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ 0, /* Protected Umode */
+ 0, /* Has Admin */
+ 0, /* Chan SQlines */
+ 0, /* Quit on Kill */
+ 0, /* SVSMODE unban */
+ 1, /* Has Protect */
+ 0, /* Reverse */
+ 1, /* Chan Reg */
+ CMODE_r, /* Channel Mode */
+ 1, /* vidents */
+ 0, /* svshold */
+ 0, /* time stamp on mode */
+ 0, /* NICKIP */
+ 0, /* O:LINE */
+ 1, /* UMODE */
+ 1, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ CMODE_K, /* No Knock */
+ CMODE_A, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ UMODE_VH, /* Vhost Mode */
+ 1, /* +f */
+ 0, /* +L */
+ CMODE_f,
+ 0,
+ 1,
+ 1, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support TOKENS */
+ 1, /* TOKENS are CASE inSensitive */
+ 0, /* TIME STAMPS are BASE64 */
+ 0, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* Can remove User Channel Modes with SVSMODE */
+ 0, /* Sglines are not enforced until user reconnects */
+ NULL, /* vhost char */
+ 0, /* ts6 */
+ 1, /* support helper umode */
+ 0, /* p10 */
+ NULL, /* character set */
+ 0, /* reports sync state */
+ 0, /* CIDR channelbans */
+ }
+ ,
+ {NULL}
};
IRCDCAPAB myIrcdcap[] = {
- {
- 0, /* NOQUIT */
- 0, /* TSMODE */
- 0, /* UNCONNECT */
- 0, /* NICKIP */
- 0, /* SJOIN */
- CAPAB_ZIP, /* ZIP */
- 0, /* BURST */
- 0, /* TS5 */
- 0, /* TS3 */
- 0, /* DKEY */
- CAPAB_PT4, /* PT4 */
- CAPAB_SCS, /* SCS */
- CAPAB_QS, /* QS */
- 0, /* UID */
- 0, /* KNOCK */
- 0, /* CLIENT */
- 0, /* IPV6 */
- 0, /* SSJ5 */
- 0, /* SN2 */
- 0, /* TOKEN */
- 0, /* VHOST */
- 0, /* SSJ3 */
- 0, /* NICK2 */
- 0, /* UMODE2 */
- 0, /* VL */
- 0, /* TLKEXT */
- 0, /* DODKEY */
- 0, /* DOZIP */
- 0, 0, 0}
+ {
+ 0, /* NOQUIT */
+ 0, /* TSMODE */
+ 0, /* UNCONNECT */
+ 0, /* NICKIP */
+ 0, /* SJOIN */
+ CAPAB_ZIP, /* ZIP */
+ 0, /* BURST */
+ 0, /* TS5 */
+ 0, /* TS3 */
+ 0, /* DKEY */
+ CAPAB_PT4, /* PT4 */
+ CAPAB_SCS, /* SCS */
+ CAPAB_QS, /* QS */
+ 0, /* UID */
+ 0, /* KNOCK */
+ 0, /* CLIENT */
+ 0, /* IPV6 */
+ 0, /* SSJ5 */
+ 0, /* SN2 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ 0, /* SSJ3 */
+ 0, /* NICK2 */
+ 0, /* UMODE2 */
+ 0, /* VL */
+ 0, /* TLKEXT */
+ 0, /* DODKEY */
+ 0, /* DOZIP */
+ 0, 0, 0}
};
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, 0, /* A B C */
- 0, 0, 0, /* D E F */
- 0, 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 */
- 0, 0, 0, /* V W X */
- 0, /* Y */
- 0, /* Z */
- 0, 0, 0, /* [ \ ] */
- 0, 0, 0, /* ^ _ ` */
- UMODE_a, 0, 0, /* a b c */
- 0, 0, 0, /* d e f */
- 0, UMODE_h, UMODE_i, /* g h i */
- 0, 0, 0, /* j k l */
- 0, 0, UMODE_o, /* m n o */
- UMODE_p, 0, UMODE_r, /* p q r */
- UMODE_s, 0, 0, /* s t u */
- UMODE_v, UMODE_w, 0, /* v w x */
- UMODE_y, /* 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, 0, /* A B C */
+ 0, 0, 0, /* D E F */
+ 0, 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 */
+ 0, 0, 0, /* V W X */
+ 0, /* Y */
+ 0, /* Z */
+ 0, 0, 0, /* [ \ ] */
+ 0, 0, 0, /* ^ _ ` */
+ UMODE_a, 0, 0, /* a b c */
+ 0, 0, 0, /* d e f */
+ 0, UMODE_h, UMODE_i, /* g h i */
+ 0, 0, 0, /* j k l */
+ 0, 0, UMODE_o, /* m n o */
+ UMODE_p, 0, UMODE_r, /* p q r */
+ UMODE_s, 0, 0, /* s t u */
+ UMODE_v, UMODE_w, 0, /* v w x */
+ UMODE_y, /* 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,
- 0,
- 0, 0, 0, 0,
- 0,
+ 0,
+ 0,
+ 0, 0, 0,
+ 0,
+ 0, 0, 0, 0,
+ 0,
- 'v', 0, 0, 'a', 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 'v', 0, 0, 'a', 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, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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}, {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},
- {add_ban, del_ban},
- {NULL},
- {NULL},
- {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}, {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},
+ {add_ban, del_ban},
+ {NULL},
+ {NULL},
+ {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, 0, NULL, NULL}, /* A */
- {CMODE_B, 0, NULL, NULL}, /* B */
- {CMODE_C, 0, NULL, NULL}, /* C */
- {0}, /* D */
- {0}, /* E */
- {0}, /* F */
- {0}, /* G */
- {0}, /* H */
- {0}, /* I */
- {0}, /* J */
- {CMODE_K, 0, NULL, NULL}, /* K */
- {0}, /* L */
- {0}, /* M */
- {CMODE_N, 0, NULL, NULL}, /* N */
- {CMODE_O, 0, NULL, NULL}, /* O */
- {0}, /* P */
- {0}, /* Q */
- {CMODE_R, 0, NULL, NULL}, /* R */
- {CMODE_S, 0, NULL, NULL}, /* S */
- {0}, /* T */
- {0}, /* U */
- {0}, /* V */
- {0}, /* W */
- {0}, /* X */
- {0}, /* Y */
- {0}, /* Z */
- {0}, {0}, {0}, {0}, {0}, {0},
- {0}, /* a */
- {0}, /* b */
- {CMODE_c, 0, NULL, NULL},
- {CMODE_d, 0, NULL, NULL},
- {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},
- {CMODE_q, 0, NULL, NULL},
- {CMODE_r, CBM_NO_MLOCK, NULL, NULL},
- {CMODE_s, 0, NULL, NULL},
- {CMODE_t, 0, NULL, NULL},
- {0},
- {0}, /* v */
- {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},
+ {CMODE_A, 0, NULL, NULL}, /* A */
+ {CMODE_B, 0, NULL, NULL}, /* B */
+ {CMODE_C, 0, NULL, NULL}, /* C */
+ {0}, /* D */
+ {0}, /* E */
+ {0}, /* F */
+ {0}, /* G */
+ {0}, /* H */
+ {0}, /* I */
+ {0}, /* J */
+ {CMODE_K, 0, NULL, NULL}, /* K */
+ {0}, /* L */
+ {0}, /* M */
+ {CMODE_N, 0, NULL, NULL}, /* N */
+ {CMODE_O, 0, NULL, NULL}, /* O */
+ {0}, /* P */
+ {0}, /* Q */
+ {CMODE_R, 0, NULL, NULL}, /* R */
+ {CMODE_S, 0, NULL, NULL}, /* S */
+ {0}, /* T */
+ {0}, /* U */
+ {0}, /* V */
+ {0}, /* W */
+ {0}, /* X */
+ {0}, /* Y */
+ {0}, /* Z */
+ {0}, {0}, {0}, {0}, {0}, {0},
+ {0}, /* a */
+ {0}, /* b */
+ {CMODE_c, 0, NULL, NULL},
+ {CMODE_d, 0, NULL, NULL},
+ {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},
+ {CMODE_q, 0, NULL, NULL},
+ {CMODE_r, CBM_NO_MLOCK, NULL, NULL},
+ {CMODE_s, 0, NULL, NULL},
+ {CMODE_t, 0, NULL, NULL},
+ {0},
+ {0}, /* v */
+ {0}, /* w */
+ {0}, /* x */
+ {0}, /* y */
+ {0}, /* z */
+ {0}, {0}, {0}, {0}
};
CBModeInfo myCbmodeinfos[] = {
- {'c', CMODE_c, 0, NULL, NULL},
- {'d', CMODE_d, 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},
- {'q', CMODE_q, 0, NULL, NULL},
- {'r', CMODE_r, 0, NULL, NULL},
- {'s', CMODE_s, 0, NULL, NULL},
- {'t', CMODE_t, 0, NULL, NULL},
- {'A', CMODE_A, 0, NULL, NULL},
- {'B', CMODE_B, 0, NULL, NULL},
- {'C', CMODE_C, 0, NULL, NULL},
- {'K', CMODE_K, 0, NULL, NULL},
- {'N', CMODE_N, 0, NULL, NULL},
- {'O', CMODE_O, 0, NULL, NULL},
- {'R', CMODE_R, 0, NULL, NULL},
- {'S', CMODE_S, 0, NULL, NULL},
- {0}
+ {'c', CMODE_c, 0, NULL, NULL},
+ {'d', CMODE_d, 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},
+ {'q', CMODE_q, 0, NULL, NULL},
+ {'r', CMODE_r, 0, NULL, NULL},
+ {'s', CMODE_s, 0, NULL, NULL},
+ {'t', CMODE_t, 0, NULL, NULL},
+ {'A', CMODE_A, 0, NULL, NULL},
+ {'B', CMODE_B, 0, NULL, NULL},
+ {'C', CMODE_C, 0, NULL, NULL},
+ {'K', CMODE_K, 0, NULL, NULL},
+ {'N', CMODE_N, 0, NULL, NULL},
+ {'O', CMODE_O, 0, NULL, NULL},
+ {'R', CMODE_R, 0, NULL, NULL},
+ {'S', CMODE_S, 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},
-
- {0}, /* a */
- {0}, /* b */
- {0}, /* c */
- {0}, /* d */
- {0}, /* e */
- {0}, /* f */
- {0}, /* g */
- {0}, /* h */
- {0}, /* i */
- {0}, /* j */
- {0}, /* k */
- {0}, /* l */
- {0}, /* m */
- {0}, /* n */
- {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op},
- {0}, /* p */
- {0}, /* q */
- {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},
+
+ {0}, /* a */
+ {0}, /* b */
+ {0}, /* c */
+ {0}, /* d */
+ {0}, /* e */
+ {0}, /* f */
+ {0}, /* g */
+ {0}, /* h */
+ {0}, /* i */
+ {0}, /* j */
+ {0}, /* k */
+ {0}, /* l */
+ {0}, /* m */
+ {0}, /* n */
+ {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op},
+ {0}, /* p */
+ {0}, /* q */
+ {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}
};
void ptlink_SendBotOp(const char *nick, const char *chan)
{
- anope_SendMode(s_ChanServ, chan, "%s %s %s", ircd->botchanumode, nick,
- nick);
+ anope_SendMode(s_ChanServ, chan, "%s %s %s", ircd->botchanumode, nick,
+ nick);
}
/*
@@ -403,8 +403,8 @@ void ptlink_SendBotOp(const char *nick, const char *chan)
*/
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;
}
/*
@@ -420,55 +420,55 @@ int anope_event_sjoin(const char *source, int ac, const char **av)
*/
int anope_event_newmask(const char *source, int ac, const char **av)
{
- User *u;
- const char *newhost = NULL, *newuser = NULL;
- int tofree = 0;
-
- if (ac != 1)
- return MOD_CONT;
- u = finduser(source);
-
- if (!u) {
- if (debug) {
- alog("debug: NEWMASK for nonexistent user %s", av[0]);
- }
- return MOD_CONT;
- }
-
- if ((u->mode & (UMODE_NM | UMODE_VH)) == (UMODE_NM | UMODE_VH)) {
- /* This NEWMASK should be discarded because it's sent due to a +r by
- * someone with a ptlink-masked host. PTlink has our correct host, so
- * we can just ignore this :) Or we'll get ptlink's old host which is
- * not what we want. -GD
- */
- u->mode &= ~UMODE_NM;
- if (debug)
- alog("debug: Ignoring NEWMASK because it's send because of SVSMODE +r");
- return MOD_CONT;
- }
-
- newuser = myStrGetOnlyToken(av[0], '@', 0);
- if (newuser) {
- newhost = myStrGetTokenRemainder(av[0], '@', 1);
- tofree = 1;
- u->SetIdent(newuser);
- free((char *)newuser);
- } else {
- newhost = av[0];
- }
-
- if (newhost && *newhost == '@')
- newhost++;
-
- u->mode |= UMODE_VH;
-
- if (newhost)
- u->SetDisplayedHost(newhost);
-
- if (tofree)
- free((char *)newhost);
-
- return MOD_CONT;
+ User *u;
+ const char *newhost = NULL, *newuser = NULL;
+ int tofree = 0;
+
+ if (ac != 1)
+ return MOD_CONT;
+ u = finduser(source);
+
+ if (!u) {
+ if (debug) {
+ alog("debug: NEWMASK for nonexistent user %s", av[0]);
+ }
+ return MOD_CONT;
+ }
+
+ if ((u->mode & (UMODE_NM | UMODE_VH)) == (UMODE_NM | UMODE_VH)) {
+ /* This NEWMASK should be discarded because it's sent due to a +r by
+ * someone with a ptlink-masked host. PTlink has our correct host, so
+ * we can just ignore this :) Or we'll get ptlink's old host which is
+ * not what we want. -GD
+ */
+ u->mode &= ~UMODE_NM;
+ if (debug)
+ alog("debug: Ignoring NEWMASK because it's send because of SVSMODE +r");
+ return MOD_CONT;
+ }
+
+ newuser = myStrGetOnlyToken(av[0], '@', 0);
+ if (newuser) {
+ newhost = myStrGetTokenRemainder(av[0], '@', 1);
+ tofree = 1;
+ u->SetIdent(newuser);
+ free((char *)newuser);
+ } else {
+ newhost = av[0];
+ }
+
+ if (newhost && *newhost == '@')
+ newhost++;
+
+ u->mode |= UMODE_VH;
+
+ if (newhost)
+ u->SetDisplayedHost(newhost);
+
+ if (tofree)
+ free((char *)newhost);
+
+ return MOD_CONT;
}
/*
@@ -477,11 +477,11 @@ int anope_event_newmask(const char *source, int ac, const char **av)
parv[1] = hopcount
parv[2] = nick TS (nick introduction time)
parv[3] = umodes
- parv[4] = username
- parv[5] = hostname
- parv[6] = spoofed hostname
- parv[7] = server
- parv[8] = nick info
+ parv[4] = username
+ parv[5] = hostname
+ parv[6] = spoofed hostname
+ parv[7] = server
+ parv[8] = nick info
*/
/*
Change NICK
@@ -491,23 +491,23 @@ int anope_event_newmask(const char *source, int ac, const char **av)
*/
/*
NICK xpto 2 561264 +rw irc num.myisp.pt mask.myisp.pt uc.ptlink.net :Just me
- 0 1 2 3 4 5 6 7 8
+ 0 1 2 3 4 5 6 7 8
*/
int anope_event_nick(const char *source, int ac, const char **av)
{
- User *user;
+ User *user;
- if (ac != 2) {
- user = do_nick(source, av[0], av[4], av[5], av[7], av[8],
- strtoul(av[2], NULL, 10), 0, 0, av[6], NULL);
- if (user)
- anope_ProcessUsermodes(user, 1, &av[3]);
- } else {
- do_nick(source, av[0], NULL, NULL, NULL, NULL,
- strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
- }
- return MOD_CONT;
+ if (ac != 2) {
+ user = do_nick(source, av[0], av[4], av[5], av[7], av[8],
+ strtoul(av[2], NULL, 10), 0, 0, av[6], NULL);
+ if (user)
+ anope_ProcessUsermodes(user, 1, &av[3]);
+ } else {
+ do_nick(source, av[0], NULL, NULL, NULL, NULL,
+ strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
+ }
+ return MOD_CONT;
}
/*
@@ -520,145 +520,145 @@ int anope_event_nick(const char *source, int ac, const char **av)
*/
int anope_event_server(const char *source, int ac, const char **av)
{
- if (!stricmp(av[1], "1")) {
- uplink = sstrdup(av[0]);
- }
- do_server(source, av[0], av[1], av[3], NULL);
- return MOD_CONT;
+ if (!stricmp(av[1], "1")) {
+ uplink = sstrdup(av[0]);
+ }
+ do_server(source, av[0], av[1], av[3], NULL);
+ 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;
}
void moduleAddIRCDMsgs(void)
{
- Message *m;
-
- updateProtectDetails("PROTECT", "PROTECTME", "protect", "deprotect",
- "AUTOPROTECT", "+a", "-a");
-
- m = createMessage("401", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("402", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("436", anope_event_436);
- addCoreMessage(IRCD, m);
- m = createMessage("461", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("AWAY", anope_event_away);
- addCoreMessage(IRCD, m);
- m = createMessage("INVITE", anope_event_invite);
- addCoreMessage(IRCD, m);
- m = createMessage("JOIN", anope_event_join);
- addCoreMessage(IRCD, m);
- m = createMessage("KICK", anope_event_kick);
- addCoreMessage(IRCD, m);
- m = createMessage("KILL", anope_event_kill);
- addCoreMessage(IRCD, m);
- m = createMessage("MODE", anope_event_mode);
- addCoreMessage(IRCD, m);
- m = createMessage("MOTD", anope_event_motd);
- addCoreMessage(IRCD, m);
- m = createMessage("NICK", anope_event_nick);
- addCoreMessage(IRCD, m);
- m = createMessage("NOTICE", anope_event_notice);
- addCoreMessage(IRCD, m);
- m = createMessage("PART", anope_event_part);
- addCoreMessage(IRCD, m);
- m = createMessage("PASS", anope_event_pass);
- addCoreMessage(IRCD, m);
- m = createMessage("PING", anope_event_ping);
- addCoreMessage(IRCD, m);
- m = createMessage("PRIVMSG", anope_event_privmsg);
- addCoreMessage(IRCD, m);
- m = createMessage("QUIT", anope_event_quit);
- addCoreMessage(IRCD, m);
- m = createMessage("SERVER", anope_event_server);
- addCoreMessage(IRCD, m);
- m = createMessage("SQUIT", anope_event_squit);
- addCoreMessage(IRCD, m);
- m = createMessage("TOPIC", anope_event_topic);
- addCoreMessage(IRCD, m);
- m = createMessage("USER", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("WALLOPS", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("WHOIS", anope_event_whois);
- addCoreMessage(IRCD, m);
- m = createMessage("AKILL", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("GLOBOPS", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("GNOTICE", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("GOPER", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("RAKILL", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("SILENCE", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("SVSKILL", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("SVSMODE", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("SVSNICK", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("SVSNOOP", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("SQLINE", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("UNSQLINE", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("NEWMASK", anope_event_newmask);
- addCoreMessage(IRCD, m);
- m = createMessage("CAPAB", anope_event_capab);
- addCoreMessage(IRCD, m);
- m = createMessage("SVINFO", anope_event_svinfo);
- addCoreMessage(IRCD, m);
- m = createMessage("SVSINFO", anope_event_svsinfo);
- addCoreMessage(IRCD, m);
- m = createMessage("SJOIN", anope_event_sjoin);
- addCoreMessage(IRCD, m);
- m = createMessage("REHASH", anope_event_rehash);
- addCoreMessage(IRCD, m);
- m = createMessage("ADMIN", anope_event_admin);
- addCoreMessage(IRCD, m);
- m = createMessage("CREDITS", anope_event_credits);
- addCoreMessage(IRCD, m);
- m = createMessage("ERROR", anope_event_error);
- addCoreMessage(IRCD, m);
- m = createMessage("NJOIN", anope_event_sjoin);
- addCoreMessage(IRCD, m);
- m = createMessage("NNICK", anope_event_nick);
- addCoreMessage(IRCD, m);
- m = createMessage("ZLINE", anope_event_null);
- addCoreMessage(IRCD, m);
- m = createMessage("UNZLINE", anope_event_null);
- addCoreMessage(IRCD, m);
+ Message *m;
+
+ updateProtectDetails("PROTECT", "PROTECTME", "protect", "deprotect",
+ "AUTOPROTECT", "+a", "-a");
+
+ m = createMessage("401", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("402", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("436", anope_event_436);
+ addCoreMessage(IRCD, m);
+ m = createMessage("461", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("AWAY", anope_event_away);
+ addCoreMessage(IRCD, m);
+ m = createMessage("INVITE", anope_event_invite);
+ addCoreMessage(IRCD, m);
+ m = createMessage("JOIN", anope_event_join);
+ addCoreMessage(IRCD, m);
+ m = createMessage("KICK", anope_event_kick);
+ addCoreMessage(IRCD, m);
+ m = createMessage("KILL", anope_event_kill);
+ addCoreMessage(IRCD, m);
+ m = createMessage("MODE", anope_event_mode);
+ addCoreMessage(IRCD, m);
+ m = createMessage("MOTD", anope_event_motd);
+ addCoreMessage(IRCD, m);
+ m = createMessage("NICK", anope_event_nick);
+ addCoreMessage(IRCD, m);
+ m = createMessage("NOTICE", anope_event_notice);
+ addCoreMessage(IRCD, m);
+ m = createMessage("PART", anope_event_part);
+ addCoreMessage(IRCD, m);
+ m = createMessage("PASS", anope_event_pass);
+ addCoreMessage(IRCD, m);
+ m = createMessage("PING", anope_event_ping);
+ addCoreMessage(IRCD, m);
+ m = createMessage("PRIVMSG", anope_event_privmsg);
+ addCoreMessage(IRCD, m);
+ m = createMessage("QUIT", anope_event_quit);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SERVER", anope_event_server);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SQUIT", anope_event_squit);
+ addCoreMessage(IRCD, m);
+ m = createMessage("TOPIC", anope_event_topic);
+ addCoreMessage(IRCD, m);
+ m = createMessage("USER", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("WALLOPS", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("WHOIS", anope_event_whois);
+ addCoreMessage(IRCD, m);
+ m = createMessage("AKILL", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("GLOBOPS", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("GNOTICE", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("GOPER", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("RAKILL", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SILENCE", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SVSKILL", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SVSMODE", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SVSNICK", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SVSNOOP", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SQLINE", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("UNSQLINE", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("NEWMASK", anope_event_newmask);
+ addCoreMessage(IRCD, m);
+ m = createMessage("CAPAB", anope_event_capab);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SVINFO", anope_event_svinfo);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SVSINFO", anope_event_svsinfo);
+ addCoreMessage(IRCD, m);
+ m = createMessage("SJOIN", anope_event_sjoin);
+ addCoreMessage(IRCD, m);
+ m = createMessage("REHASH", anope_event_rehash);
+ addCoreMessage(IRCD, m);
+ m = createMessage("ADMIN", anope_event_admin);
+ addCoreMessage(IRCD, m);
+ m = createMessage("CREDITS", anope_event_credits);
+ addCoreMessage(IRCD, m);
+ m = createMessage("ERROR", anope_event_error);
+ addCoreMessage(IRCD, m);
+ m = createMessage("NJOIN", anope_event_sjoin);
+ addCoreMessage(IRCD, m);
+ m = createMessage("NNICK", anope_event_nick);
+ addCoreMessage(IRCD, m);
+ m = createMessage("ZLINE", anope_event_null);
+ addCoreMessage(IRCD, m);
+ m = createMessage("UNZLINE", anope_event_null);
+ addCoreMessage(IRCD, m);
}
int anope_event_svsinfo(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_svinfo(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
/* 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;
}
/*
@@ -669,14 +669,14 @@ int anope_event_capab(const char *source, int ac, const char **av)
*/
void ptlink_SendSQLine(const char *mask, const char *reason)
{
- send_cmd(ServerName, "SQLINE %s :%s", mask, reason);
+ send_cmd(ServerName, "SQLINE %s :%s", mask, reason);
}
/*
:%s SVSADMIN %s :%s
parv[0] = sender (services client)
parv[1] = target server
- parv[2] = operation
+ parv[2] = operation
operations:
noopers - remove existing opers and disable o:lines
*/
@@ -703,13 +703,13 @@ void PTlinkProto::SendAkillDel(const char *user, const char *host)
void anope_part(char *nick, char *chan)
{
- send_cmd(nick, "PART %s", chan);
+ send_cmd(nick, "PART %s", chan);
}
void anope_topic(char *whosets, char *chan, char *whosetit, char *topic,
- time_t when)
+ time_t when)
{
- send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
- (unsigned long int) when, topic);
+ send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
+ (unsigned long int) when, topic);
}
/*
@@ -719,13 +719,13 @@ void anope_topic(char *whosets, char *chan, char *whosetit, char *topic,
*/
void ptlink_SendSQLineDel(const char *user)
{
- send_cmd(NULL, "UNSQLINE %s", user);
+ send_cmd(NULL, "UNSQLINE %s", user);
}
void ptlink_SendJoin(const char *user, const char *channel, time_t chantime)
{
- send_cmd(ServerName, "SJOIN %ld %s + :%s", (long int) chantime,
- channel, user);
+ send_cmd(ServerName, "SJOIN %ld %s + :%s", (long int) chantime,
+ channel, user);
}
/*
@@ -737,24 +737,24 @@ void ptlink_SendJoin(const char *user, const char *channel, time_t chantime)
parv[4] = reason
*/
void ptlink_SendAkill(const char *user, const char *host, const char *who, time_t when,
- time_t expires, const char *reason)
+ time_t expires, const char *reason)
{
- send_cmd(ServerName, "GLINE %s@%s %i %s :%s", user, host, 86400 * 2,
- who, reason);
+ send_cmd(ServerName, "GLINE %s@%s %i %s :%s", user, host, 86400 * 2,
+ who, reason);
}
void ptlink_SendSVSKill(const char *source, const char *user, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (!source || !user) {
- return;
- }
+ if (!source || !user) {
+ return;
+ }
- send_cmd(source, "KILL %s :%s", user, buf);
+ send_cmd(source, "KILL %s :%s", user, buf);
}
/*
@@ -767,40 +767,40 @@ void ptlink_SendSVSKill(const char *source, const char *user, const char *buf)
*/
void ptlink_SendSVSMode(User * u, int ac, const char **av)
{
- send_cmd(ServerName, "SVSMODE %s %s%s%s", u->nick, av[0],
- (ac == 2 ? " " : ""), (ac == 2 ? av[1] : ""));
+ send_cmd(ServerName, "SVSMODE %s %s%s%s", u->nick, av[0],
+ (ac == 2 ? " " : ""), (ac == 2 ? av[1] : ""));
- /* If we set +r on someone +NRah (1 or more of those modes), PTlink will
- * send us a NEWMASK with their ptlink-masked-host. If we want HostServ
- * to work for them, we will need to send our NEWMASK after we receive
- * theirs. Thus we make a hack and store in moduleData that we need to
- * look out for that.
- */
- if ((strchr(av[0], 'r')
- && ((u->mode & UMODE_N) || (u->mode & UMODE_R)
- || (u->mode & UMODE_a) || (u->mode & UMODE_h))))
- u->mode |= UMODE_NM;
+ /* If we set +r on someone +NRah (1 or more of those modes), PTlink will
+ * send us a NEWMASK with their ptlink-masked-host. If we want HostServ
+ * to work for them, we will need to send our NEWMASK after we receive
+ * theirs. Thus we make a hack and store in moduleData that we need to
+ * look out for that.
+ */
+ if ((strchr(av[0], 'r')
+ && ((u->mode & UMODE_N) || (u->mode & UMODE_R)
+ || (u->mode & UMODE_a) || (u->mode & UMODE_h))))
+ u->mode |= UMODE_NM;
}
int anope_event_error(const char *source, int ac, const char **av)
{
- if (ac >= 1) {
- if (debug) {
- alog("debug: %s", av[0]);
- }
- }
- return MOD_CONT;
+ if (ac >= 1) {
+ if (debug) {
+ alog("debug: %s", av[0]);
+ }
+ }
+ return MOD_CONT;
}
void ptlink_SendSquit(const char *servname, const char *message)
{
- send_cmd(NULL, "SQUIT %s :%s", servname, message);
+ send_cmd(NULL, "SQUIT %s :%s", servname, message);
}
/* PONG */
void ptlink_SendPong(const char *servname, const char *who)
{
- send_cmd(servname, "PONG %s", who);
+ send_cmd(servname, "PONG %s", who);
}
/*
@@ -815,11 +815,11 @@ void ptlink_SendPong(const char *servname, const char *who)
void ptlink_cmd_svinfo()
{
#if defined(PTLINK_TS_CURRENT) && defined(PTLINK_TS_MIN)
- send_cmd(NULL, "SVINFO %d %d %lu", PTLINK_TS_CURRENT, PTLINK_TS_MIN,
- (unsigned long int) time(NULL));
+ send_cmd(NULL, "SVINFO %d %d %lu", PTLINK_TS_CURRENT, PTLINK_TS_MIN,
+ (unsigned long int) time(NULL));
#else
- /* hardwired if the defs some how go missing */
- send_cmd(NULL, "SVINFO 6 3 %lu", (unsigned long int) time(NULL));
+ /* hardwired if the defs some how go missing */
+ send_cmd(NULL, "SVINFO 6 3 %lu", (unsigned long int) time(NULL));
#endif
}
@@ -831,8 +831,8 @@ void ptlink_cmd_svinfo()
*/
void ptlink_cmd_svsinfo()
{
- send_cmd(NULL, "SVSINFO %lu %d", (unsigned long int) time(NULL),
- maxusercnt);
+ send_cmd(NULL, "SVSINFO %lu %d", (unsigned long int) time(NULL),
+ maxusercnt);
}
/*
@@ -843,7 +843,7 @@ void ptlink_cmd_svsinfo()
*/
void ptlink_cmd_pass(const char *pass)
{
- send_cmd(NULL, "PASS %s :TS", pass);
+ send_cmd(NULL, "PASS %s :TS", pass);
}
/*
@@ -852,57 +852,57 @@ void ptlink_cmd_pass(const char *pass)
*/
void ptlink_cmd_capab()
{
- send_cmd(NULL, "CAPAB :QS PTS4");
+ send_cmd(NULL, "CAPAB :QS PTS4");
}
void ptlink_SendServer(const char *servname, int hop, const char *descript)
{
- send_cmd(NULL, "SERVER %s %d Anope.Services%s :%s", servname, hop,
- version_number_dotted, descript);
+ send_cmd(NULL, "SERVER %s %d Anope.Services%s :%s", servname, hop,
+ version_number_dotted, descript);
}
void ptlink_SendConnect(int servernum)
{
- me_server =
- new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
+ me_server =
+ new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
- if (servernum == 1)
- ptlink_cmd_pass(RemotePassword);
- else if (servernum == 2)
- ptlink_cmd_pass(RemotePassword2);
- else if (servernum == 3)
- ptlink_cmd_pass(RemotePassword3);
+ if (servernum == 1)
+ ptlink_cmd_pass(RemotePassword);
+ else if (servernum == 2)
+ ptlink_cmd_pass(RemotePassword2);
+ else if (servernum == 3)
+ ptlink_cmd_pass(RemotePassword3);
- ptlink_cmd_capab();
- ptlink_SendServer(ServerName, 1, ServerDesc);
- ptlink_cmd_svinfo();
- ptlink_cmd_svsinfo();
+ ptlink_cmd_capab();
+ ptlink_SendServer(ServerName, 1, ServerDesc);
+ ptlink_cmd_svinfo();
+ ptlink_cmd_svsinfo();
}
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;
}
/*
@@ -910,31 +910,31 @@ int anope_event_whois(const char *source, int ac, const char **av)
parv[0] = sender prefix
parv[1] = channel
parv[2] = topic nick
- parv[3] = topic time
- parv[4] = topic text
+ parv[3] = topic time
+ parv[4] = topic text
*/
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;
}
/*
@@ -945,246 +945,246 @@ int anope_event_quit(const char *source, int ac, const char **av)
*/
int anope_event_mode(const char *source, int ac, const char **av)
{
- if (ac < 2)
- 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;
+ if (*av[0] == '#' || *av[0] == '&') {
+ do_cmode(source, ac, av);
+ } else {
+ do_umode(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;
}
void ptlink_SendNoticeChanops(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
+ send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
}
void ptlink_cmd_notice(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (NSDefFlags & NI_MSG) {
- ptlink_cmd_privmsg2(source, dest, buf);
- } else {
- send_cmd(source, "NOTICE %s :%s", dest, buf);
- }
+ if (NSDefFlags & NI_MSG) {
+ ptlink_cmd_privmsg2(source, dest, buf);
+ } else {
+ send_cmd(source, "NOTICE %s :%s", dest, buf);
+ }
}
void ptlink_cmd_notice2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE %s :%s", dest, msg);
+ send_cmd(source, "NOTICE %s :%s", dest, msg);
}
void ptlink_cmd_privmsg(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source, "PRIVMSG %s :%s", dest, buf);
+ send_cmd(source, "PRIVMSG %s :%s", dest, buf);
}
void ptlink_cmd_privmsg2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG %s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG %s :%s", dest, msg);
}
void ptlink_SendGlobalNotice(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE $%s :%s", dest, msg);
+ send_cmd(source, "NOTICE $%s :%s", dest, msg);
}
void ptlink_SendGlobalPrivmsg(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
}
/* GLOBOPS */
void ptlink_SendGlobops(const char *source, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
+ send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
}
/* 391 */
void ptlink_cmd_391(const char *source, const char *timestr)
{
- if (!timestr) {
- return;
- }
- send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
+ if (!timestr) {
+ return;
+ }
+ send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
}
/* 250 */
void ptlink_cmd_250(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "250 %s", buf);
+ send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void ptlink_cmd_307(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "307 %s", buf);
+ send_cmd(ServerName, "307 %s", buf);
}
/* 311 */
void ptlink_cmd_311(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "311 %s", buf);
+ send_cmd(ServerName, "311 %s", buf);
}
/* 312 */
void ptlink_cmd_312(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "312 %s", buf);
+ send_cmd(ServerName, "312 %s", buf);
}
/* 317 */
void ptlink_cmd_317(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "317 %s", buf);
+ send_cmd(ServerName, "317 %s", buf);
}
/* 219 */
void ptlink_cmd_219(const char *source, const char *letter)
{
- if (!source) {
- return;
- }
+ if (!source) {
+ return;
+ }
- if (letter) {
- send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
- *letter);
- } else {
- send_cmd(NULL, "219 %s l :End of /STATS report.", source);
- }
+ if (letter) {
+ send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
+ *letter);
+ } else {
+ send_cmd(NULL, "219 %s l :End of /STATS report.", source);
+ }
}
/* 401 */
void ptlink_cmd_401(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
- send_cmd(ServerName, "401 %s %s :No such service.", source, who);
+ if (!source || !who) {
+ return;
+ }
+ send_cmd(ServerName, "401 %s %s :No such service.", source, who);
}
/* 318 */
void ptlink_cmd_318(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
+ if (!source || !who) {
+ return;
+ }
- send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
+ send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void ptlink_cmd_242(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "242 %s", buf);
+ send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void ptlink_cmd_243(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "243 %s", buf);
+ send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void ptlink_cmd_211(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "211 %s", buf);
+ send_cmd(NULL, "211 %s", buf);
}
void ptlink_SendMode(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source, "MODE %s %s", dest, buf);
+ send_cmd(source, "MODE %s %s", dest, buf);
}
/*
@@ -1193,51 +1193,51 @@ void ptlink_SendMode(const char *source, const char *dest, const char *buf)
parv[2] = hopcount
parv[3] = nick TS (nick introduction time)
parv[4] = umodes
- parv[5] = username
- parv[6] = hostname
- parv[7] = spoofed hostname
- parv[8] = server
- parv[9] = nick info
+ parv[5] = username
+ parv[6] = hostname
+ parv[7] = spoofed hostname
+ parv[8] = server
+ parv[9] = nick info
*/
void ptlink_cmd_nick(const char *nick, const char *name, const char *mode)
{
- EnforceQlinedNick(nick, NULL);
- send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
- (unsigned long int) time(NULL), mode, ServiceUser,
- ServiceHost, ServiceHost, ServerName, name);
- ptlink_SendSQLine(nick, "Reserved for services");
+ EnforceQlinedNick(nick, NULL);
+ send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
+ (unsigned long int) time(NULL), mode, ServiceUser,
+ ServiceHost, ServiceHost, ServerName, name);
+ ptlink_SendSQLine(nick, "Reserved for services");
}
void ptlink_SendKick(const char *source, const char *chan, const char *user, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (buf) {
- send_cmd(source, "KICK %s %s :%s", chan, user, buf);
- } else {
- send_cmd(source, "KICK %s %s", chan, user);
- }
+ if (buf) {
+ send_cmd(source, "KICK %s %s :%s", chan, user, buf);
+ } else {
+ send_cmd(source, "KICK %s %s", chan, user);
+ }
}
/* QUIT */
void ptlink_SendQuit(const char *source, const char *buf)
{
- if (buf) {
- send_cmd(source, "QUIT :%s", buf);
- } else {
- send_cmd(source, "QUIT");
- }
+ if (buf) {
+ send_cmd(source, "QUIT :%s", buf);
+ } else {
+ send_cmd(source, "QUIT");
+ }
}
void ptlink_SendPart(const char *nick, const char *chan, const char *buf)
{
- if (buf) {
- send_cmd(nick, "PART %s :%s", chan, buf);
- } else {
- send_cmd(nick, "PART %s", chan);
- }
+ if (buf) {
+ send_cmd(nick, "PART %s :%s", chan, buf);
+ } else {
+ send_cmd(nick, "PART %s", chan);
+ }
}
/*
@@ -1245,156 +1245,156 @@ void ptlink_SendPart(const char *nick, const char *chan, const char *buf)
parv[0] = sender prefix
parv[1] = channel
parv[2] = topic nick
- parv[3] = topic time
- parv[4] = topic text
+ parv[3] = topic time
+ parv[4] = topic text
*/
void ptlink_cmd_topic(const char *whosets, const char *chan, const char *whosetit,
- const char *topic, time_t when)
+ const char *topic, time_t when)
{
- send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
- (long int) time(NULL), topic);
+ send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
+ (long int) time(NULL), topic);
}
void ptlink_SendVhostDel(User * u)
{
- /* does not support vhosting */
+ /* does not support vhosting */
}
void ptlink_SendVhost(const char *nick, const char *vIdent, const char *vhost)
{
- User *u;
+ User *u;
- if (vIdent) {
- send_cmd(s_HostServ, "NEWMASK %s@%s %s", vIdent, vhost, nick);
- } else {
- send_cmd(s_HostServ, "NEWMASK %s %s", vhost, nick);
- }
+ if (vIdent) {
+ send_cmd(s_HostServ, "NEWMASK %s@%s %s", vIdent, vhost, nick);
+ } else {
+ send_cmd(s_HostServ, "NEWMASK %s %s", vhost, nick);
+ }
- if ((u = finduser(nick)))
- u->mode |= UMODE_VH;
+ if ((u = finduser(nick)))
+ u->mode |= UMODE_VH;
}
/* INVITE */
void ptlink_SendInvite(const char *source, const char *chan, const char *nick)
{
- if (!source || !chan || !nick) {
- return;
- }
+ if (!source || !chan || !nick) {
+ return;
+ }
- send_cmd(source, "INVITE %s %s", nick, chan);
+ send_cmd(source, "INVITE %s %s", nick, chan);
}
void ptlink_cmd_372(const char *source, const char *msg)
{
- send_cmd(ServerName, "372 %s :- %s", source, msg);
+ send_cmd(ServerName, "372 %s :- %s", source, msg);
}
void ptlink_cmd_372_error(const char *source)
{
- send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
- "contact your IRC administrator.", source);
+ send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
+ "contact your IRC administrator.", source);
}
void ptlink_cmd_375(const char *source)
{
- send_cmd(ServerName, "375 %s :- %s Message of the Day",
- source, ServerName);
+ send_cmd(ServerName, "375 %s :- %s Message of the Day",
+ source, ServerName);
}
void ptlink_cmd_376(const char *source)
{
- send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
+ send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
}
void ptlink_ProcessUsermodes(User * user, int ac, const char **av)
{
- int add = 1; /* 1 if adding modes, 0 if deleting */
- const char *modes = av[0];
-
- ac--;
-
- if (debug)
- alog("debug: Changing mode for %s to %s", user->nick, modes);
-
- while (*modes) {
-
- /* This looks better, much better than "add ? (do_add) : (do_remove)".
- * At least this is readable without paying much attention :) -GD
- */
- if (add)
- user->mode |= umodes[(int) *modes];
- else
- user->mode &= ~umodes[(int) *modes];
-
- switch (*modes++) {
- case '+':
- add = 1;
- break;
- case '-':
- add = 0;
- break;
- case 'o':
- if (add) {
- opcnt++;
-
- if (WallOper)
- anope_SendGlobops(s_OperServ,
- "\2%s\2 is now an IRC operator.",
- user->nick);
- display_news(user, NEWS_OPER);
- if (is_services_admin(user)) {
- common_svsmode(user, "+a", NULL);
- user->mode |= UMODE_a;
- }
-
- } else {
- opcnt--;
- }
- break;
- case 'r':
- if (add && !nick_identified(user)) {
- common_svsmode(user, "-r", NULL);
- user->mode &= ~UMODE_r;
- }
- break;
- }
- }
+ int add = 1; /* 1 if adding modes, 0 if deleting */
+ const char *modes = av[0];
+
+ ac--;
+
+ if (debug)
+ alog("debug: Changing mode for %s to %s", user->nick, modes);
+
+ while (*modes) {
+
+ /* This looks better, much better than "add ? (do_add) : (do_remove)".
+ * At least this is readable without paying much attention :) -GD
+ */
+ if (add)
+ user->mode |= umodes[(int) *modes];
+ else
+ user->mode &= ~umodes[(int) *modes];
+
+ switch (*modes++) {
+ case '+':
+ add = 1;
+ break;
+ case '-':
+ add = 0;
+ break;
+ case 'o':
+ if (add) {
+ opcnt++;
+
+ if (WallOper)
+ anope_SendGlobops(s_OperServ,
+ "\2%s\2 is now an IRC operator.",
+ user->nick);
+ display_news(user, NEWS_OPER);
+ if (is_services_admin(user)) {
+ common_svsmode(user, "+a", NULL);
+ user->mode |= UMODE_a;
+ }
+
+ } else {
+ opcnt--;
+ }
+ break;
+ case 'r':
+ if (add && !nick_identified(user)) {
+ common_svsmode(user, "-r", NULL);
+ user->mode &= ~UMODE_r;
+ }
+ break;
+ }
+ }
}
int anope_event_ping(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- ptlink_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ ptlink_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
+ return MOD_CONT;
}
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;
}
void ptlink_SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real,
- char *modes)
+ char *modes)
{
- EnforceQlinedNick(nick, s_BotServ);
- send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
- (unsigned long int) time(NULL), modes, user, host, host,
- ServerName, real);
- ptlink_SendSQLine(nick, "Reserved for services");
+ EnforceQlinedNick(nick, s_BotServ);
+ send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
+ (unsigned long int) time(NULL), modes, user, host, host,
+ ServerName, real);
+ ptlink_SendSQLine(nick, "Reserved for services");
}
void ptlink_cmd_351(const char *source)
{
- send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
- source, version_number, ServerName, ircd->name, version_flags,
- EncModule, version_build);
+ send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
+ source, version_number, ServerName, ircd->name, version_flags,
+ EncModule, version_build);
}
@@ -1402,13 +1402,13 @@ void ptlink_cmd_351(const char *source)
/* SVSHOLD - set */
void ptlink_SendSVSHOLD(const char *nick)
{
- /* Not supported by this IRCD */
+ /* Not supported by this IRCD */
}
/* SVSHOLD - release */
void ptlink_SendSVSHOLDDel(const char *nick)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
/*
@@ -1418,7 +1418,7 @@ void ptlink_SendSVSHOLDDel(const char *nick)
*/
void ptlink_SendSZLineDel(const char *mask)
{
- send_cmd(s_OperServ, "UNZLINE %s", mask);
+ send_cmd(s_OperServ, "UNZLINE %s", mask);
}
/*
@@ -1430,8 +1430,8 @@ void ptlink_SendSZLineDel(const char *mask)
*/
void ptlink_SendSZLine(const char *mask, const char *reason, const char *whom)
{
- send_cmd(s_OperServ, "ZLINE %s %ld :%s", mask,
- (long int) time(NULL) + 86400 * 2, reason);
+ send_cmd(s_OperServ, "ZLINE %s %ld :%s", mask,
+ (long int) time(NULL) + 86400 * 2, reason);
}
/*
@@ -1441,7 +1441,7 @@ void ptlink_SendSZLine(const char *mask, const char *reason, const char *whom)
*/
void ptlink_SendSGLineDel(const char *mask)
{
- send_cmd(ServerName, "UNSXLINE :%s", mask);
+ send_cmd(ServerName, "UNSXLINE :%s", mask);
}
@@ -1454,8 +1454,8 @@ void ptlink_SendSGLineDel(const char *mask)
*/
void ptlink_SendSGLine(const char *mask, const char *reason)
{
- send_cmd(ServerName, "SXLINE %d :%s:%s", (int) strlen(mask), mask,
- reason);
+ send_cmd(ServerName, "SXLINE %d :%s:%s", (int) strlen(mask), mask,
+ reason);
}
/* SVSNICK */
@@ -1468,36 +1468,36 @@ void ptlink_SendSGLine(const char *mask, const char *reason)
*/
void ptlink_SendForceNickChange(const char *source, const char *guest, time_t when)
{
- if (!source || !guest) {
- return;
- }
- send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
+ if (!source || !guest) {
+ return;
+ }
+ send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
}
void ptlink_SendGuestNick(const char *nick, const char *user, const char *host, const char *real,
- const char *modes)
+ const char *modes)
{
- send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
- (unsigned long int) time(NULL), modes, user, host, host,
- ServerName, real);
+ send_cmd(NULL, "NICK %s 1 %lu %s %s %s %s %s :%s", nick,
+ (unsigned long int) time(NULL), modes, user, host, host,
+ ServerName, real);
}
void ptlink_SendBanDel(const char *name, const char *nick)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
/* SVSMODE channel modes */
void ptlink_SendSVSMode_chan(const char *name, const char *mode, const char *nick)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
void ptlink_SendSVSO(const char *source, const char *nick, const char *flag)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
@@ -1505,26 +1505,26 @@ void ptlink_SendSVSO(const char *source, const char *nick, const char *flag)
/* sent if svid is something weird */
void ptlink_SendSVID(const char *nick, time_t ts)
{
- /* Not Supported by this ircd */
+ /* Not Supported by this ircd */
}
/* SVSMODE +d */
/* nc_change was = 1, and there is no na->status */
void ptlink_SendUnregisteredNick(User * u)
{
- /* Not Supported by this ircd */
+ /* Not Supported by this ircd */
}
/* SVSMODE +d */
/* sent if svid is something weird */
void ptlink_SendSVID2(User * u, const char *ts)
{
- common_svsmode(u, "+r", NULL);
+ common_svsmode(u, "+r", NULL);
}
void ptlink_SendSVID3(User * u, const char *ts)
{
- /* Bahamuts have this extra one, since they can check on even nick changes */
+ /* Bahamuts have this extra one, since they can check on even nick changes */
}
/* NICK <newnick> */
@@ -1536,11 +1536,11 @@ void ptlink_SendSVID3(User * u, const char *ts)
*/
void ptlink_SendChangeBotNick(const char *oldnick, const char *newnick)
{
- if (!oldnick || !newnick) {
- return;
- }
+ if (!oldnick || !newnick) {
+ return;
+ }
- send_cmd(oldnick, "NICK %s %ld", newnick, (long int) time(NULL));
+ send_cmd(oldnick, "NICK %s %ld", newnick, (long int) time(NULL));
}
/*
@@ -1552,7 +1552,7 @@ void ptlink_SendChangeBotNick(const char *oldnick, const char *newnick)
*/
void ptlink_SendSVSJoin(const char *source, const char *nick, const char *chan, const char *param)
{
- send_cmd(source, "SVSJOIN %s %s", nick, chan);
+ send_cmd(source, "SVSJOIN %s %s", nick, chan);
}
/*
@@ -1564,80 +1564,80 @@ void ptlink_SendSVSJoin(const char *source, const char *nick, const char *chan,
*/
void ptlink_SendSVSPart(const char *source, const char *nick, const char *chan)
{
- send_cmd(source, "SVSPART %s :%s", nick, chan);
+ send_cmd(source, "SVSPART %s :%s", nick, chan);
}
void ptlink_SendSWhois(const char *source, const char *who, const char *mask)
{
- /* not supported */
+ /* not supported */
}
int anope_event_notice(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_pass(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_rehash(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_credits(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_admin(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_invite(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int ptlink_IsFloodModeParamValid(const char *value)
{
- char *dp, *end;
+ char *dp, *end;
- if (value && *value != ':'
- && (strtoul((*value == '*' ? value + 1 : value), &dp, 10) > 0)
- && (*dp == ':') && (*(++dp) != 0) && (strtoul(dp, &end, 10) > 0)
- && (*end == 0)) {
- return 1;
- } else {
- return 0;
- }
+ if (value && *value != ':'
+ && (strtoul((*value == '*' ? value + 1 : value), &dp, 10) > 0)
+ && (*dp == ':') && (*(++dp) != 0) && (strtoul(dp, &end, 10) > 0)
+ && (*end == 0)) {
+ return 1;
+ } else {
+ return 0;
+ }
}
void ptlink_SendEOB()
{
- /* not supported */
+ /* not supported */
}
void ptlink_SendJupe(const char *jserver, const char *who, const char *reason)
{
- char rbuf[256];
+ char rbuf[256];
- snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
- reason ? ": " : "", reason ? reason : "");
+ snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
+ reason ? ": " : "", reason ? reason : "");
- if (findserver(servlist, jserver))
- ptlink_SendSquit(jserver, rbuf);
- ptlink_SendServer(jserver, 1, rbuf);
- new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
+ if (findserver(servlist, jserver))
+ ptlink_SendSquit(jserver, rbuf);
+ ptlink_SendServer(jserver, 1, rbuf);
+ new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
}
/* GLOBOPS - to handle old WALLOPS */
void ptlink_SendGlobops_legacy(const char *source, const char *fmt)
{
- send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
+ send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
/*
@@ -1646,8 +1646,8 @@ void ptlink_SendGlobops_legacy(const char *source, const char *fmt)
*/
int ptlink_IsNickValid(const char *nick)
{
- /* no hard coded invalid nicks */
- return 1;
+ /* no hard coded invalid nicks */
+ return 1;
}
/*
@@ -1656,23 +1656,23 @@ int ptlink_IsNickValid(const char *nick)
*/
int ptlink_IsChannelValid(const char *cahn)
{
- /* no hard coded invalid chan */
- return 1;
+ /* no hard coded invalid chan */
+ return 1;
}
void ptlink_SendCTCP(const char *source, const char *dest, const char *buf)
{
- char *s;
+ char *s;
- if (!buf) {
- return;
- } else {
- s = normalizeBuffer(buf);
- }
+ if (!buf) {
+ return;
+ } else {
+ s = normalizeBuffer(buf);
+ }
- send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
- free(s);
+ send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
+ free(s);
}
@@ -1682,78 +1682,78 @@ void ptlink_SendCTCP(const char *source, const char *dest, const char *buf)
**/
void moduleAddAnopeCmds()
{
- pmodule_cmd_topic(ptlink_cmd_topic);
- pmodule_SendVhostDel(ptlink_cmd_vhost_off);
- pmodule_SendAkill(ptlink_cmd_akill);
- pmodule_SendSVSKill(ptlink_SendSVSKill);
- pmodule_SendSVSMode(ptlink_cmd_svsmode);
- pmodule_cmd_372(ptlink_cmd_372);
- pmodule_cmd_372_error(ptlink_cmd_372_error);
- pmodule_cmd_375(ptlink_cmd_375);
- pmodule_cmd_376(ptlink_cmd_376);
- pmodule_cmd_nick(ptlink_cmd_nick);
- pmodule_SendGuestNick(ptlink_cmd_guest_nick);
- pmodule_SendMode(ptlink_cmd_mode);
- pmodule_SendClientIntroduction(ptlink_cmd_bot_nick);
- pmodule_SendKick(ptlink_cmd_kick);
- pmodule_SendNoticeChanops(ptlink_cmd_notice_ops);
- pmodule_cmd_notice(ptlink_cmd_notice);
- pmodule_cmd_notice2(ptlink_cmd_notice2);
- pmodule_cmd_privmsg(ptlink_cmd_privmsg);
- pmodule_cmd_privmsg2(ptlink_cmd_privmsg2);
- pmodule_SendGlobalNotice(ptlink_cmd_serv_notice);
- pmodule_SendGlobalPrivmsg(ptlink_cmd_serv_privmsg);
- pmodule_SendBotOp(ptlink_cmd_bot_chan_mode);
- pmodule_cmd_351(ptlink_cmd_351);
- pmodule_SendQuit(ptlink_cmd_quit);
- pmodule_SendPong(ptlink_cmd_pong);
- pmodule_SendJoin(ptlink_cmd_join);
- pmodule_SendSQLineDel(ptlink_cmd_unsqline);
- pmodule_SendInvite(ptlink_cmd_invite);
- pmodule_SendPart(ptlink_cmd_part);
- pmodule_cmd_391(ptlink_cmd_391);
- pmodule_cmd_250(ptlink_cmd_250);
- pmodule_cmd_307(ptlink_cmd_307);
- pmodule_cmd_311(ptlink_cmd_311);
- pmodule_cmd_312(ptlink_cmd_312);
- pmodule_cmd_317(ptlink_cmd_317);
- pmodule_cmd_219(ptlink_cmd_219);
- pmodule_cmd_401(ptlink_cmd_401);
- pmodule_cmd_318(ptlink_cmd_318);
- pmodule_cmd_242(ptlink_cmd_242);
- pmodule_cmd_243(ptlink_cmd_243);
- pmodule_cmd_211(ptlink_cmd_211);
- pmodule_SendGlobops(ptlink_cmd_global);
- pmodule_SendGlobops_legacy(ptlink_cmd_global_legacy);
- pmodule_SendSQLine(ptlink_cmd_sqline);
- pmodule_SendSquit(ptlink_cmd_squit);
- pmodule_SendSVSO(ptlink_cmd_svso);
- pmodule_SendChangeBotNick(ptlink_cmd_chg_nick);
- pmodule_SendForceNickChange(ptlink_cmd_svsnick);
- pmodule_SendVhost(ptlink_cmd_vhost_on);
- pmodule_SendConnect(ptlink_cmd_connect);
- pmodule_SendSVSHOLD(ptlink_cmd_svshold);
- pmodule_SendSVSHOLDDel(ptlink_cmd_release_svshold);
- pmodule_SendSGLineDel(ptlink_cmd_unsgline);
- pmodule_SendSZLineDel(ptlink_cmd_unszline);
- pmodule_SendSZLine(ptlink_cmd_szline);
- pmodule_SendSGLine(ptlink_cmd_sgline);
- pmodule_SendBanDel(ptlink_cmd_unban);
- pmodule_SendSVSMode_chan(ptlink_cmd_svsmode_chan);
- pmodule_SendSVID(ptlink_cmd_svid_umode);
- pmodule_SendUnregisteredNick(ptlink_cmd_nc_change);
- pmodule_SendSVID2(ptlink_cmd_svid_umode2);
- pmodule_SendSVID3(ptlink_cmd_svid_umode3);
- pmodule_SendSVSJoin(ptlink_cmd_svsjoin);
- pmodule_SendSVSPart(ptlink_cmd_svspart);
- pmodule_SendSWhois(ptlink_cmd_swhois);
- pmodule_SendEOB(ptlink_cmd_eob);
- pmodule_IsFloodModeParamValid(ptlink_flood_mode_check);
- pmodule_SendJupe(ptlink_cmd_jupe);
- pmodule_IsNickValid(ptlink_valid_nick);
- pmodule_IsChannelValid(ptlink_valid_chan);
- pmodule_SendCTCP(ptlink_cmd_ctcp);
- pmodule_ProcessUsermodes(ptlink_set_umode);
+ pmodule_cmd_topic(ptlink_cmd_topic);
+ pmodule_SendVhostDel(ptlink_cmd_vhost_off);
+ pmodule_SendAkill(ptlink_cmd_akill);
+ pmodule_SendSVSKill(ptlink_SendSVSKill);
+ pmodule_SendSVSMode(ptlink_cmd_svsmode);
+ pmodule_cmd_372(ptlink_cmd_372);
+ pmodule_cmd_372_error(ptlink_cmd_372_error);
+ pmodule_cmd_375(ptlink_cmd_375);
+ pmodule_cmd_376(ptlink_cmd_376);
+ pmodule_cmd_nick(ptlink_cmd_nick);
+ pmodule_SendGuestNick(ptlink_cmd_guest_nick);
+ pmodule_SendMode(ptlink_cmd_mode);
+ pmodule_SendClientIntroduction(ptlink_cmd_bot_nick);
+ pmodule_SendKick(ptlink_cmd_kick);
+ pmodule_SendNoticeChanops(ptlink_cmd_notice_ops);
+ pmodule_cmd_notice(ptlink_cmd_notice);
+ pmodule_cmd_notice2(ptlink_cmd_notice2);
+ pmodule_cmd_privmsg(ptlink_cmd_privmsg);
+ pmodule_cmd_privmsg2(ptlink_cmd_privmsg2);
+ pmodule_SendGlobalNotice(ptlink_cmd_serv_notice);
+ pmodule_SendGlobalPrivmsg(ptlink_cmd_serv_privmsg);
+ pmodule_SendBotOp(ptlink_cmd_bot_chan_mode);
+ pmodule_cmd_351(ptlink_cmd_351);
+ pmodule_SendQuit(ptlink_cmd_quit);
+ pmodule_SendPong(ptlink_cmd_pong);
+ pmodule_SendJoin(ptlink_cmd_join);
+ pmodule_SendSQLineDel(ptlink_cmd_unsqline);
+ pmodule_SendInvite(ptlink_cmd_invite);
+ pmodule_SendPart(ptlink_cmd_part);
+ pmodule_cmd_391(ptlink_cmd_391);
+ pmodule_cmd_250(ptlink_cmd_250);
+ pmodule_cmd_307(ptlink_cmd_307);
+ pmodule_cmd_311(ptlink_cmd_311);
+ pmodule_cmd_312(ptlink_cmd_312);
+ pmodule_cmd_317(ptlink_cmd_317);
+ pmodule_cmd_219(ptlink_cmd_219);
+ pmodule_cmd_401(ptlink_cmd_401);
+ pmodule_cmd_318(ptlink_cmd_318);
+ pmodule_cmd_242(ptlink_cmd_242);
+ pmodule_cmd_243(ptlink_cmd_243);
+ pmodule_cmd_211(ptlink_cmd_211);
+ pmodule_SendGlobops(ptlink_cmd_global);
+ pmodule_SendGlobops_legacy(ptlink_cmd_global_legacy);
+ pmodule_SendSQLine(ptlink_cmd_sqline);
+ pmodule_SendSquit(ptlink_cmd_squit);
+ pmodule_SendSVSO(ptlink_cmd_svso);
+ pmodule_SendChangeBotNick(ptlink_cmd_chg_nick);
+ pmodule_SendForceNickChange(ptlink_cmd_svsnick);
+ pmodule_SendVhost(ptlink_cmd_vhost_on);
+ pmodule_SendConnect(ptlink_cmd_connect);
+ pmodule_SendSVSHOLD(ptlink_cmd_svshold);
+ pmodule_SendSVSHOLDDel(ptlink_cmd_release_svshold);
+ pmodule_SendSGLineDel(ptlink_cmd_unsgline);
+ pmodule_SendSZLineDel(ptlink_cmd_unszline);
+ pmodule_SendSZLine(ptlink_cmd_szline);
+ pmodule_SendSGLine(ptlink_cmd_sgline);
+ pmodule_SendBanDel(ptlink_cmd_unban);
+ pmodule_SendSVSMode_chan(ptlink_cmd_svsmode_chan);
+ pmodule_SendSVID(ptlink_cmd_svid_umode);
+ pmodule_SendUnregisteredNick(ptlink_cmd_nc_change);
+ pmodule_SendSVID2(ptlink_cmd_svid_umode2);
+ pmodule_SendSVID3(ptlink_cmd_svid_umode3);
+ pmodule_SendSVSJoin(ptlink_cmd_svsjoin);
+ pmodule_SendSVSPart(ptlink_cmd_svspart);
+ pmodule_SendSWhois(ptlink_cmd_swhois);
+ pmodule_SendEOB(ptlink_cmd_eob);
+ pmodule_IsFloodModeParamValid(ptlink_flood_mode_check);
+ pmodule_SendJupe(ptlink_cmd_jupe);
+ pmodule_IsNickValid(ptlink_valid_nick);
+ pmodule_IsChannelValid(ptlink_valid_chan);
+ pmodule_SendCTCP(ptlink_cmd_ctcp);
+ pmodule_ProcessUsermodes(ptlink_set_umode);
}
/**
@@ -1762,38 +1762,38 @@ void moduleAddAnopeCmds()
int AnopeInit(int argc, char **argv)
{
- this->SetAuthor("Anope");
- this->SetVersion
- ("$Id$");
- this->SetType(PROTOCOL);
-
-
- pmodule_ircd_version("PTlink 6.15.*+");
- pmodule_ircd_cap(myIrcdcap);
- pmodule_ircd_var(myIrcd);
- pmodule_ircd_cbmodeinfos(myCbmodeinfos);
- pmodule_ircd_cumodes(myCumodes);
- pmodule_ircd_flood_mode_char_set("+f");
- pmodule_ircd_flood_mode_char_remove("-f");
- pmodule_ircd_cbmodes(myCbmodes);
- pmodule_ircd_cmmodes(myCmmodes);
- pmodule_ircd_csmodes(myCsmodes);
- pmodule_ircd_useTSMode(0);
-
- /** Deal with modes anope _needs_ to know **/
- pmodule_invis_umode(UMODE_i);
- pmodule_oper_umode(UMODE_o);
- pmodule_invite_cmode(CMODE_i);
- pmodule_secret_cmode(CMODE_s);
- pmodule_private_cmode(CMODE_p);
- pmodule_key_mode(CMODE_k);
- pmodule_limit_mode(CMODE_l);
-
- moduleAddAnopeCmds();
+ this->SetAuthor("Anope");
+ this->SetVersion
+ ("$Id$");
+ this->SetType(PROTOCOL);
+
+
+ pmodule_ircd_version("PTlink 6.15.*+");
+ pmodule_ircd_cap(myIrcdcap);
+ pmodule_ircd_var(myIrcd);
+ pmodule_ircd_cbmodeinfos(myCbmodeinfos);
+ pmodule_ircd_cumodes(myCumodes);
+ pmodule_ircd_flood_mode_char_set("+f");
+ pmodule_ircd_flood_mode_char_remove("-f");
+ pmodule_ircd_cbmodes(myCbmodes);
+ pmodule_ircd_cmmodes(myCmmodes);
+ pmodule_ircd_csmodes(myCsmodes);
+ pmodule_ircd_useTSMode(0);
+
+ /** Deal with modes anope _needs_ to know **/
+ pmodule_invis_umode(UMODE_i);
+ pmodule_oper_umode(UMODE_o);
+ pmodule_invite_cmode(CMODE_i);
+ pmodule_secret_cmode(CMODE_s);
+ pmodule_private_cmode(CMODE_p);
+ pmodule_key_mode(CMODE_k);
+ pmodule_limit_mode(CMODE_l);
+
+ moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
- moduleAddIRCDMsgs();
+ moduleAddIRCDMsgs();
- return MOD_CONT;
+ return MOD_CONT;
}
/* EOF */
diff --git a/src/protocol/obsolete/ptlink.h b/src/protocol/obsolete/ptlink.h
index 8e7b893cf..83ac5ca34 100644
--- a/src/protocol/obsolete/ptlink.h
+++ b/src/protocol/obsolete/ptlink.h
@@ -65,7 +65,7 @@
that we support.
PTLink 6.14 to 6.17 TS CURRENT is 6 and MIN is 3
- PTlink 6.18 TS CURRENT is 9 and MIN is 3
+ PTlink 6.18 TS CURRENT is 9 and MIN is 3
PTLink 6.19 TS CURRENT is 10 and MIN is 9
If you are running 6.18 or 6.19 do not touch these values as they will
diff --git a/src/protocol/obsolete/rageircd.c b/src/protocol/obsolete/rageircd.c
index 1dd12910b..4e83bf03f 100644
--- a/src/protocol/obsolete/rageircd.c
+++ b/src/protocol/obsolete/rageircd.c
@@ -16,581 +16,581 @@
#include "rageircd.h"
IRCDVar myIrcd[] = {
- {"RageIRCd 2.0.*", /* ircd name */
- "+d", /* nickserv mode */
- "+d", /* chanserv mode */
- "+d", /* memoserv mode */
- "+d", /* hostserv mode */
- "+di", /* operserv mode */
- "+d", /* botserv mode */
- "+dh", /* helpserv mode */
- "+di", /* Dev/Null mode */
- "+di", /* Global mode */
- "+o", /* nickserv alias mode */
- "+o", /* chanserv alias mode */
- "+o", /* memoserv alias mode */
- "+io", /* hostserv alias mode */
- "+io", /* operserv alias mode */
- "+o", /* botserv alias mode */
- "+o", /* helpserv alias mode */
- "+i", /* Dev/Null alias mode */
- "+io", /* Global alias mode */
- "+", /* Used by BotServ Bots */
- 3, /* Chan Max Symbols */
- "-ilmnpRstcOACNM", /* Modes to Remove */
- "+o", /* Channel Umode used by Botserv bots */
- 1, /* SVSNICK */
- 1, /* Vhost */
- 0, /* Has Owner */
- NULL, /* Mode to set for an owner */
- NULL, /* 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 */
- "-rd", /* Mode on UnReg */
- "-r+d", /* Mode on Nick Change */
- 1, /* Supports SGlines */
- 1, /* Supports SQlines */
- 0, /* Supports SZlines */
- 1, /* Supports Halfop +h */
- 3, /* Number of server args */
- 0, /* Join 2 Set */
- 0, /* Join 2 Message */
- 1, /* Has exceptions +e */
- 0, /* TS Topic Forward */
- 0, /* TS Topic Backward */
- 0, /* Protected Umode */
- 1, /* Has Admin */
- 1, /* Chan SQlines */
- 1, /* Quit on Kill */
- 0, /* SVSMODE unban */
- 0, /* Has Protect */
- 0, /* Reverse */
- 1, /* Chan Reg */
- CMODE_r, /* Channel Mode */
- 0, /* vidents */
- 1, /* svshold */
- 1, /* time stamp on mode */
- 1, /* NICKIP */
- 0, /* O:LINE */
- 1, /* UMODE */
- 1, /* VHOST ON NICK */
- 0, /* Change RealName */
- CMODE_p, /* No Knock */
- CMODE_A, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- UMODE_x, /* Vhost Mode */
- 0, /* +f */
- 0, /* +L */
- 0,
- 0,
- 1,
- 0, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support TOKENS */
- 1, /* TOKENS are CASE inSensitive */
- 0, /* TIME STAMPS are BASE64 */
- 1, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* 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 */
- }
- ,
- {NULL}
+ {"RageIRCd 2.0.*", /* ircd name */
+ "+d", /* nickserv mode */
+ "+d", /* chanserv mode */
+ "+d", /* memoserv mode */
+ "+d", /* hostserv mode */
+ "+di", /* operserv mode */
+ "+d", /* botserv mode */
+ "+dh", /* helpserv mode */
+ "+di", /* Dev/Null mode */
+ "+di", /* Global mode */
+ "+o", /* nickserv alias mode */
+ "+o", /* chanserv alias mode */
+ "+o", /* memoserv alias mode */
+ "+io", /* hostserv alias mode */
+ "+io", /* operserv alias mode */
+ "+o", /* botserv alias mode */
+ "+o", /* helpserv alias mode */
+ "+i", /* Dev/Null alias mode */
+ "+io", /* Global alias mode */
+ "+", /* Used by BotServ Bots */
+ 3, /* Chan Max Symbols */
+ "-ilmnpRstcOACNM", /* Modes to Remove */
+ "+o", /* Channel Umode used by Botserv bots */
+ 1, /* SVSNICK */
+ 1, /* Vhost */
+ 0, /* Has Owner */
+ NULL, /* Mode to set for an owner */
+ NULL, /* 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 */
+ "-rd", /* Mode on UnReg */
+ "-r+d", /* Mode on Nick Change */
+ 1, /* Supports SGlines */
+ 1, /* Supports SQlines */
+ 0, /* Supports SZlines */
+ 1, /* Supports Halfop +h */
+ 3, /* Number of server args */
+ 0, /* Join 2 Set */
+ 0, /* Join 2 Message */
+ 1, /* Has exceptions +e */
+ 0, /* TS Topic Forward */
+ 0, /* TS Topic Backward */
+ 0, /* Protected Umode */
+ 1, /* Has Admin */
+ 1, /* Chan SQlines */
+ 1, /* Quit on Kill */
+ 0, /* SVSMODE unban */
+ 0, /* Has Protect */
+ 0, /* Reverse */
+ 1, /* Chan Reg */
+ CMODE_r, /* Channel Mode */
+ 0, /* vidents */
+ 1, /* svshold */
+ 1, /* time stamp on mode */
+ 1, /* NICKIP */
+ 0, /* O:LINE */
+ 1, /* UMODE */
+ 1, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ CMODE_p, /* No Knock */
+ CMODE_A, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ UMODE_x, /* Vhost Mode */
+ 0, /* +f */
+ 0, /* +L */
+ 0,
+ 0,
+ 1,
+ 0, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support TOKENS */
+ 1, /* TOKENS are CASE inSensitive */
+ 0, /* TIME STAMPS are BASE64 */
+ 1, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* 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 */
+ }
+ ,
+ {NULL}
};
IRCDCAPAB myIrcdcap[] = {
- {
- CAPAB_NOQUIT, /* NOQUIT */
- CAPAB_TSMODE, /* TSMODE */
- CAPAB_UNCONNECT, /* UNCONNECT */
- 0, /* NICKIP */
- 0, /* SJOIN */
- CAPAB_ZIP, /* ZIP */
- CAPAB_BURST, /* BURST */
- 0, /* TS5 */
- 0, /* TS3 */
- CAPAB_DKEY, /* DKEY */
- 0, /* PT4 */
- 0, /* SCS */
- 0, /* QS */
- CAPAB_UID, /* UID */
- 0, /* KNOCK */
- 0, /* CLIENT */
- 0, /* IPV6 */
- 0, /* SSJ5 */
- CAPAB_SN2, /* SN2 */
- CAPAB_TOKEN, /* TOKEN */
- CAPAB_VHOST, /* VHOST */
- CAPAB_SSJ3, /* SSJ3 */
- 0, /* NICK2 */
- 0, /* UMODE2 */
- 0, /* VL */
- 0, /* TLKEXT */
- 0, /* DODKEY */
- 0, /* DOZIP */
- 0, 0, 0}
+ {
+ CAPAB_NOQUIT, /* NOQUIT */
+ CAPAB_TSMODE, /* TSMODE */
+ CAPAB_UNCONNECT, /* UNCONNECT */
+ 0, /* NICKIP */
+ 0, /* SJOIN */
+ CAPAB_ZIP, /* ZIP */
+ CAPAB_BURST, /* BURST */
+ 0, /* TS5 */
+ 0, /* TS3 */
+ CAPAB_DKEY, /* DKEY */
+ 0, /* PT4 */
+ 0, /* SCS */
+ 0, /* QS */
+ CAPAB_UID, /* UID */
+ 0, /* KNOCK */
+ 0, /* CLIENT */
+ 0, /* IPV6 */
+ 0, /* SSJ5 */
+ CAPAB_SN2, /* SN2 */
+ CAPAB_TOKEN, /* TOKEN */
+ CAPAB_VHOST, /* VHOST */
+ CAPAB_SSJ3, /* SSJ3 */
+ 0, /* NICK2 */
+ 0, /* UMODE2 */
+ 0, /* VL */
+ 0, /* TLKEXT */
+ 0, /* DODKEY */
+ 0, /* DOZIP */
+ 0, 0, 0}
};
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, 0, 0, /* A B C */
- 0, 0, 0, /* D E F */
- 0, 0, 0, /* G H I */
- 0, 0, 0, /* J K L */
- 0, 0, 0, /* M N O */
- 0, 0, UMODE_R, /* P Q R */
- 0, 0, 0, /* S T U */
- 0, 0, 0, /* V W X */
- 0, /* Y */
- 0, /* Z */
- 0, 0, 0, /* [ \ ] */
- 0, 0, 0, /* ^ _ ` */
- UMODE_a, 0, 0, /* a b c */
- 0, 0, 0, /* d e f */
- 0, UMODE_h, UMODE_i, /* g h i */
- 0, 0, 0, /* j k l */
- 0, 0, UMODE_o, /* m n o */
- 0, 0, UMODE_r, /* p q r */
- 0, 0, 0, /* s t u */
- 0, UMODE_w, 0, /* v w x */
- 0, /* y */
- 0, /* 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, 0, 0, /* A B C */
+ 0, 0, 0, /* D E F */
+ 0, 0, 0, /* G H I */
+ 0, 0, 0, /* J K L */
+ 0, 0, 0, /* M N O */
+ 0, 0, UMODE_R, /* P Q R */
+ 0, 0, 0, /* S T U */
+ 0, 0, 0, /* V W X */
+ 0, /* Y */
+ 0, /* Z */
+ 0, 0, 0, /* [ \ ] */
+ 0, 0, 0, /* ^ _ ` */
+ UMODE_a, 0, 0, /* a b c */
+ 0, 0, 0, /* d e f */
+ 0, UMODE_h, UMODE_i, /* g h i */
+ 0, 0, 0, /* j k l */
+ 0, 0, UMODE_o, /* m n o */
+ 0, 0, UMODE_r, /* p q r */
+ 0, 0, 0, /* s t u */
+ 0, UMODE_w, 0, /* v w x */
+ 0, /* y */
+ 0, /* 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 */
- 0, 0, 0, 0,
- 'a', /* * Channel Admins */
+ 0,
+ 0,
+ 0, 0, 0,
+ 'h', /* (37) % Channel halfops */
+ 0, 0, 0, 0,
+ 'a', /* * Channel Admins */
- '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, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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},
- {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},
- {NULL},
- {NULL},
- {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},
+ {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},
+ {NULL},
+ {NULL},
+ {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},
- {0}, /* D */
- {0}, /* E */
- {0}, /* F */
- {0}, /* G */
- {0}, /* H */
- {0}, /* I */
- {0}, /* J */
- {0}, /* K */
- {0}, /* L */
- {CMODE_M, 0, NULL, NULL}, /* M */
- {CMODE_N, 0, NULL, NULL}, /* N */
- {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
- {0}, /* P */
- {0}, /* Q */
- {CMODE_R, 0, NULL, NULL}, /* R */
- {CMODE_S, 0, NULL, NULL}, /* S */
- {0}, /* T */
- {0}, /* U */
- {0}, /* 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 */
- {0}, /* f */
- {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},
- {0},
- {0}, /* v */
- {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},
+ {CMODE_A, CBM_NO_USER_MLOCK, NULL, NULL},
+ {0}, /* B */
+ {CMODE_C, 0, NULL, NULL},
+ {0}, /* D */
+ {0}, /* E */
+ {0}, /* F */
+ {0}, /* G */
+ {0}, /* H */
+ {0}, /* I */
+ {0}, /* J */
+ {0}, /* K */
+ {0}, /* L */
+ {CMODE_M, 0, NULL, NULL}, /* M */
+ {CMODE_N, 0, NULL, NULL}, /* N */
+ {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
+ {0}, /* P */
+ {0}, /* Q */
+ {CMODE_R, 0, NULL, NULL}, /* R */
+ {CMODE_S, 0, NULL, NULL}, /* S */
+ {0}, /* T */
+ {0}, /* U */
+ {0}, /* 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 */
+ {0}, /* f */
+ {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},
+ {0},
+ {0}, /* v */
+ {0}, /* w */
+ {0}, /* x */
+ {0}, /* y */
+ {0}, /* z */
+ {0}, {0}, {0}, {0}
};
CBModeInfo myCbmodeinfos[] = {
- {'c', CMODE_c, 0, NULL, NULL},
- {'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},
- {'A', CMODE_A, 0, NULL, NULL},
- {'C', CMODE_C, 0, NULL, NULL},
- {'M', CMODE_M, 0, NULL, NULL},
- {'N', CMODE_N, 0, NULL, NULL},
- {'O', CMODE_O, 0, NULL, NULL},
- {'R', CMODE_R, 0, NULL, NULL},
- {0}
+ {'c', CMODE_c, 0, NULL, NULL},
+ {'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},
+ {'A', CMODE_A, 0, NULL, NULL},
+ {'C', CMODE_C, 0, NULL, NULL},
+ {'M', CMODE_M, 0, NULL, NULL},
+ {'N', CMODE_N, 0, NULL, NULL},
+ {'O', CMODE_O, 0, NULL, NULL},
+ {'R', CMODE_R, 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_admin},
- {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 */
- {0}, /* q */
- {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_admin},
+ {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 */
+ {0}, /* q */
+ {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}
};
void rageircd_cmd_bot_unban(ChannelInfo * ci, const char *nick)
{
- send_cmd(ServerName, "SVSMODE %s -b %s", ci->name, nick);
+ send_cmd(ServerName, "SVSMODE %s -b %s", ci->name, nick);
}
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;
}
int anope_event_nick(const char *source, int ac, const char **av)
{
- User *user;
+ User *user;
- if (ac != 2) {
- user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
- strtoul(av[2], NULL, 10), strtoul(av[7], NULL, 0),
- strtoul(av[8], NULL, 0), "*", NULL);
- if (user)
- anope_ProcessUsermodes(user, 1, &av[3]);
- } else {
- do_nick(source, av[0], NULL, NULL, NULL, NULL,
- strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
- }
- return MOD_CONT;
+ if (ac != 2) {
+ user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
+ strtoul(av[2], NULL, 10), strtoul(av[7], NULL, 0),
+ strtoul(av[8], NULL, 0), "*", NULL);
+ if (user)
+ anope_ProcessUsermodes(user, 1, &av[3]);
+ } else {
+ do_nick(source, av[0], NULL, NULL, NULL, NULL,
+ strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
+ }
+ return MOD_CONT;
}
/* 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;
}
int anope_event_vhost(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: VHOST for nonexistent user %s", av[0]);
- }
- return MOD_CONT;
- }
+ u = finduser(av[0]);
+ if (!u) {
+ if (debug) {
+ alog("debug: VHOST for nonexistent user %s", av[0]);
+ }
+ return MOD_CONT;
+ }
- u->SetDisplayedHost(av[1]);
- return MOD_CONT;
+ u->SetDisplayedHost(av[1]);
+ return MOD_CONT;
}
/*
** SNICK
-** source = NULL
-** parv[0] = nickname Trystan
-** parv[1] = timestamp 1090113640
-** parv[2] = hops 1
-** parv[3] = username Trystan
-** parv[4] = host c-24-2-101-227.client.comcast.net
-** parv[5] = IP 402810339
-** parv[6] = vhost mynet-27CCA80D.client.comcast.net
-** parv[7] = server rage2.nomadirc.net
+** source = NULL
+** parv[0] = nickname Trystan
+** parv[1] = timestamp 1090113640
+** parv[2] = hops 1
+** parv[3] = username Trystan
+** parv[4] = host c-24-2-101-227.client.comcast.net
+** parv[5] = IP 402810339
+** parv[6] = vhost mynet-27CCA80D.client.comcast.net
+** parv[7] = server rage2.nomadirc.net
** parv[8] = servicestamp 0
-** parv[9] = modes +ix
-** parv[10] = info Dreams are answers to questions not yet asked
+** parv[9] = modes +ix
+** parv[10] = info Dreams are answers to questions not yet asked
*/
int anope_event_snick(const char *source, int ac, const char **av)
{
- User *user;
+ User *user;
- if (ac != 2) {
- user = do_nick(source, av[0], av[3], av[4], av[7], av[10],
- strtoul(av[1], NULL, 10), strtoul(av[8], NULL, 0),
- strtoul(av[5], NULL, 0), av[6], NULL);
- if (user) {
- anope_ProcessUsermodes(user, 1, &av[9]);
- }
- }
- return MOD_CONT;
+ if (ac != 2) {
+ user = do_nick(source, av[0], av[3], av[4], av[7], av[10],
+ strtoul(av[1], NULL, 10), strtoul(av[8], NULL, 0),
+ strtoul(av[5], NULL, 0), av[6], NULL);
+ if (user) {
+ anope_ProcessUsermodes(user, 1, &av[9]);
+ }
+ }
+ 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;
}
/* *INDENT-OFF* */
void moduleAddIRCDMsgs(void) {
- Message *m;
-
- updateProtectDetails("ADMIN","ADMINME","admin","deadmin","AUTOADMIN","+a","-a");
-
- m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
- m = createMessage("482", anope_event_482); addCoreMessage(IRCD,m);
- m = createMessage("461", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
- m = createMessage("INVITE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
- m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
- m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
- m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
- m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m);
- m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
- m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
- m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
- m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
- m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
- m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
- m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
- m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
- m = createMessage("USER", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
- m = createMessage("AKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GLOBOPS", anope_event_globops); addCoreMessage(IRCD,m);
- m = createMessage("GOPER", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("RAKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SQLINE", anope_event_sqline); addCoreMessage(IRCD,m);
- m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
- m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m);
- m = createMessage("HS", anope_event_hs); addCoreMessage(IRCD,m);
- m = createMessage("MS", anope_event_ms); addCoreMessage(IRCD,m);
- m = createMessage("NS", anope_event_ns); addCoreMessage(IRCD,m);
- m = createMessage("OS", anope_event_os); addCoreMessage(IRCD,m);
- m = createMessage("RS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SGLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
- m = createMessage("SS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m);
- m = createMessage("SZLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("UNSGLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("UNSZLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SNICK", anope_event_snick); addCoreMessage(IRCD,m);
- m = createMessage("VHOST", anope_event_vhost); addCoreMessage(IRCD,m);
- m = createMessage("MYID", anope_event_myid); addCoreMessage(IRCD,m);
- m = createMessage("GNOTICE", anope_event_notice); addCoreMessage(IRCD,m);
- m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
- m = createMessage("BURST", anope_event_burst); addCoreMessage(IRCD,m);
- m = createMessage("REHASH", anope_event_rehash); addCoreMessage(IRCD,m);
- m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
- m = createMessage("CREDITS", anope_event_credits); addCoreMessage(IRCD,m);
+ Message *m;
+
+ updateProtectDetails("ADMIN","ADMINME","admin","deadmin","AUTOADMIN","+a","-a");
+
+ m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
+ m = createMessage("482", anope_event_482); addCoreMessage(IRCD,m);
+ m = createMessage("461", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
+ m = createMessage("INVITE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
+ m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
+ m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
+ m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
+ m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m);
+ m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
+ m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
+ m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
+ m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
+ m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
+ m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
+ m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
+ m = createMessage("USER", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
+ m = createMessage("AKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GLOBOPS", anope_event_globops); addCoreMessage(IRCD,m);
+ m = createMessage("GOPER", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("RAKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SQLINE", anope_event_sqline); addCoreMessage(IRCD,m);
+ m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
+ m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m);
+ m = createMessage("HS", anope_event_hs); addCoreMessage(IRCD,m);
+ m = createMessage("MS", anope_event_ms); addCoreMessage(IRCD,m);
+ m = createMessage("NS", anope_event_ns); addCoreMessage(IRCD,m);
+ m = createMessage("OS", anope_event_os); addCoreMessage(IRCD,m);
+ m = createMessage("RS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SGLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
+ m = createMessage("SS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m);
+ m = createMessage("SZLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("UNSGLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("UNSZLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SNICK", anope_event_snick); addCoreMessage(IRCD,m);
+ m = createMessage("VHOST", anope_event_vhost); addCoreMessage(IRCD,m);
+ m = createMessage("MYID", anope_event_myid); addCoreMessage(IRCD,m);
+ m = createMessage("GNOTICE", anope_event_notice); addCoreMessage(IRCD,m);
+ m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
+ m = createMessage("BURST", anope_event_burst); addCoreMessage(IRCD,m);
+ m = createMessage("REHASH", anope_event_rehash); addCoreMessage(IRCD,m);
+ m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
+ m = createMessage("CREDITS", anope_event_credits); addCoreMessage(IRCD,m);
}
/* *INDENT-ON* */
int anope_event_error(const char *source, int ac, const char **av)
{
- if (ac >= 1) {
- if (debug) {
- alog("debug: %s", av[0]);
- }
- }
- return MOD_CONT;
+ if (ac >= 1) {
+ if (debug) {
+ alog("debug: %s", av[0]);
+ }
+ }
+ return MOD_CONT;
}
int anope_event_burst(const char *source, int ac, const char **av)
{
- Server *s;
- s = findserver(servlist, source);
- if (ac > 1) {
- /* for future use - start burst */
+ Server *s;
+ s = findserver(servlist, source);
+ if (ac > 1) {
+ /* for future use - start burst */
} else {
- /* 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);
+ /* 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;
@@ -598,26 +598,26 @@ return MOD_CONT;
void rageircd_SendSQLine(const char *mask, const char *reason)
{
- if (!mask || !reason) {
- return;
- }
+ if (!mask || !reason) {
+ return;
+ }
- send_cmd(NULL, "SQLINE %s :%s", mask, reason);
+ send_cmd(NULL, "SQLINE %s :%s", mask, reason);
}
void rageircd_SendSGLineDel(const char *mask)
{
- send_cmd(NULL, "UNSGLINE 0 :%s", mask);
+ send_cmd(NULL, "UNSGLINE 0 :%s", mask);
}
void rageircd_SendSZLineDel(const char *mask)
{
- send_cmd(NULL, "UNSZLINE 0 %s", mask);
+ send_cmd(NULL, "UNSZLINE 0 %s", mask);
}
void rageircd_SendSZLine(const char *mask, const char *reason, const char *whom)
{
- send_cmd(NULL, "SZLINE %s :%s", mask, reason);
+ send_cmd(NULL, "SZLINE %s :%s", mask, reason);
}
void RageIRCdProto::SendSVSNOOP(const char *server, int set)
@@ -632,7 +632,7 @@ void rageircd_cmd_svsadmin(const char *server, int set)
void rageircd_SendSGLine(const char *mask, const char *reason)
{
- send_cmd(NULL, "SGLINE %d :%s:%s", (int)strlen(mask), mask, reason);
+ send_cmd(NULL, "SGLINE %d :%s:%s", (int)strlen(mask), mask, reason);
}
@@ -645,557 +645,557 @@ void RageIRCdProto::SendAkillDel(const char *user, const char *host)
/* PART */
void rageircd_SendPart(const char *nick, const char *chan, const char *buf)
{
- if (!nick || !chan) {
- return;
- }
+ if (!nick || !chan) {
+ return;
+ }
- if (buf) {
- send_cmd(nick, "PART %s :%s", chan, buf);
- } else {
- send_cmd(nick, "PART %s", chan);
- }
+ if (buf) {
+ send_cmd(nick, "PART %s :%s", chan, buf);
+ } else {
+ send_cmd(nick, "PART %s", chan);
+ }
}
void rageircd_cmd_topic(const char *whosets, const char *chan, const char *whosetit,
- const char *topic, time_t when)
+ const char *topic, time_t when)
{
- send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
- (unsigned long int) when, topic);
+ send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
+ (unsigned long int) when, topic);
}
void rageircd_SendVhostDel(User * u)
{
- send_cmd(s_HostServ, "SVSMODE %s -x", u->nick);
- notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick, ircd->vhostchar);
+ send_cmd(s_HostServ, "SVSMODE %s -x", u->nick);
+ notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick, ircd->vhostchar);
}
void rageircd_cmd_chghost(const char *nick, const char *vhost)
{
- if (!nick || !vhost) {
- return;
- }
- send_cmd(ServerName, "VHOST %s %s", nick, vhost);
+ if (!nick || !vhost) {
+ return;
+ }
+ send_cmd(ServerName, "VHOST %s %s", nick, vhost);
}
void rageircd_SendVhost(const char *nick, const char *vIdent, const char *vhost)
{
- send_cmd(s_HostServ, "SVSMODE %s +x", nick);
- rageircd_cmd_chghost(nick, vhost);
+ send_cmd(s_HostServ, "SVSMODE %s +x", nick);
+ rageircd_cmd_chghost(nick, vhost);
}
void rageircd_SendSQLineDel(const char *user)
{
- send_cmd(NULL, "UNSQLINE %s", user);
+ send_cmd(NULL, "UNSQLINE %s", user);
}
void rageircd_SendJoin(const char *user, const char *channel, time_t chantime)
{
- send_cmd(user, "SJOIN %ld %s", (long int) chantime, channel);
+ send_cmd(user, "SJOIN %ld %s", (long int) chantime, channel);
}
void rageircd_SendAkill(const char *user, const char *host, const char *who, time_t when,
- time_t expires, const char *reason)
+ time_t expires, const char *reason)
{
- send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", host, user, 86400 * 2, who,
- (long int) time(NULL), reason);
+ send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", host, user, 86400 * 2, who,
+ (long int) time(NULL), reason);
}
void rageircd_SendSVSKill(const char *source, const char *user, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (!source || !user) {
- return;
- }
+ if (!source || !user) {
+ return;
+ }
- send_cmd(source, "SVSKILL %s :%s", user, buf);
+ send_cmd(source, "SVSKILL %s :%s", user, buf);
}
void rageircd_SendSVSMode(User * u, int ac, const char **av)
{
- send_cmd(ServerName, "SVSMODE %s %ld %s%s%s", u->nick,
- (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
- (ac == 2 ? av[1] : ""));
+ send_cmd(ServerName, "SVSMODE %s %ld %s%s%s", u->nick,
+ (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
+ (ac == 2 ? av[1] : ""));
}
void rageircd_SendSquit(const char *servname, const char *message)
{
- send_cmd(NULL, "SQUIT %s :%s", servname, message);
+ send_cmd(NULL, "SQUIT %s :%s", servname, message);
}
/* PONG */
void rageircd_SendPong(const char *servname, const char *who)
{
- send_cmd(servname, "PONG %s", who);
+ send_cmd(servname, "PONG %s", who);
}
void rageircd_cmd_svinfo()
{
- send_cmd(NULL, "SVINFO 5 3 0 %ld bluemoon 0", (long int) time(NULL));
+ send_cmd(NULL, "SVINFO 5 3 0 %ld bluemoon 0", (long int) time(NULL));
}
void rageircd_cmd_capab()
{
- /* CAPAB BURST UNCONNECT ZIP SSJ3 SN2 VHOST SUID TOK1 TSMODE */
- send_cmd(NULL, "CAPAB BURST UNCONNECT SSJ3 SN2 VHOST TSMODE");
+ /* CAPAB BURST UNCONNECT ZIP SSJ3 SN2 VHOST SUID TOK1 TSMODE */
+ send_cmd(NULL, "CAPAB BURST UNCONNECT SSJ3 SN2 VHOST TSMODE");
}
void rageircd_SendServer(const char *servname, int hop, const char *descript)
{
- send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
+ send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
}
/* PASS */
void rageircd_cmd_pass(const char *pass)
{
- send_cmd(NULL, "PASS %s :TS", pass);
+ send_cmd(NULL, "PASS %s :TS", pass);
}
void rageircd_cmd_burst()
{
- send_cmd(NULL, "BURST");
+ send_cmd(NULL, "BURST");
}
void rageircd_SendConnect(int servernum)
{
- if (Numeric) {
- me_server =
- new_server(NULL, ServerName, ServerDesc, SERVER_ISME, Numeric);
- } else {
- me_server =
- new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
- }
-
- if (servernum == 1)
- rageircd_cmd_pass(RemotePassword);
- else if (servernum == 2)
- rageircd_cmd_pass(RemotePassword2);
- else if (servernum == 3)
- rageircd_cmd_pass(RemotePassword3);
- rageircd_cmd_capab();
- if (Numeric) {
- send_cmd(NULL, "MYID !%s", Numeric);
- }
- rageircd_SendServer(ServerName, 1, ServerDesc);
- rageircd_cmd_svinfo();
- rageircd_cmd_burst();
+ if (Numeric) {
+ me_server =
+ new_server(NULL, ServerName, ServerDesc, SERVER_ISME, Numeric);
+ } else {
+ me_server =
+ new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
+ }
+
+ if (servernum == 1)
+ rageircd_cmd_pass(RemotePassword);
+ else if (servernum == 2)
+ rageircd_cmd_pass(RemotePassword2);
+ else if (servernum == 3)
+ rageircd_cmd_pass(RemotePassword3);
+ rageircd_cmd_capab();
+ if (Numeric) {
+ send_cmd(NULL, "MYID !%s", Numeric);
+ }
+ rageircd_SendServer(ServerName, 1, ServerDesc);
+ rageircd_cmd_svinfo();
+ rageircd_cmd_burst();
}
void rageircd_ProcessUsermodes(User * user, int ac, const char **av)
{
- int add = 1; /* 1 if adding modes, 0 if deleting */
- const char *modes = av[0];
-
- ac--;
-
- if (debug)
- alog("debug: Changing mode for %s to %s", user->nick, modes);
-
- while (*modes) {
-
- /* This looks better, much better than "add ? (do_add) : (do_remove)".
- * At least this is readable without paying much attention :) -GD
- */
- if (add)
- user->mode |= umodes[(int) *modes];
- else
- user->mode &= ~umodes[(int) *modes];
-
- switch (*modes++) {
- case '+':
- add = 1;
- break;
- case '-':
- add = 0;
- break;
- case 'd':
- if (ac == 0) {
- alog("user: umode +d with no parameter (?) for user %s",
- user->nick);
- break;
- }
-
- ac--;
- av++;
- user->svid = strtoul(*av, NULL, 0);
- break;
- case 'o':
- if (add) {
- opcnt++;
-
- if (WallOper)
- anope_SendGlobops(s_OperServ,
- "\2%s\2 is now an IRC operator.",
- user->nick);
- display_news(user, NEWS_OPER);
- if (is_services_oper(user)) {
- common_svsmode(user, "+a", NULL);
- user->mode |= UMODE_a;
- }
- } else {
- opcnt--;
- }
- break;
- case 'r':
- if (add && !nick_identified(user)) {
- common_svsmode(user, "-r", NULL);
- user->mode &= ~UMODE_r;
- }
- break;
- case 'x':
- update_host(user);
- break;
- }
- }
+ int add = 1; /* 1 if adding modes, 0 if deleting */
+ const char *modes = av[0];
+
+ ac--;
+
+ if (debug)
+ alog("debug: Changing mode for %s to %s", user->nick, modes);
+
+ while (*modes) {
+
+ /* This looks better, much better than "add ? (do_add) : (do_remove)".
+ * At least this is readable without paying much attention :) -GD
+ */
+ if (add)
+ user->mode |= umodes[(int) *modes];
+ else
+ user->mode &= ~umodes[(int) *modes];
+
+ switch (*modes++) {
+ case '+':
+ add = 1;
+ break;
+ case '-':
+ add = 0;
+ break;
+ case 'd':
+ if (ac == 0) {
+ alog("user: umode +d with no parameter (?) for user %s",
+ user->nick);
+ break;
+ }
+
+ ac--;
+ av++;
+ user->svid = strtoul(*av, NULL, 0);
+ break;
+ case 'o':
+ if (add) {
+ opcnt++;
+
+ if (WallOper)
+ anope_SendGlobops(s_OperServ,
+ "\2%s\2 is now an IRC operator.",
+ user->nick);
+ display_news(user, NEWS_OPER);
+ if (is_services_oper(user)) {
+ common_svsmode(user, "+a", NULL);
+ user->mode |= UMODE_a;
+ }
+ } else {
+ opcnt--;
+ }
+ break;
+ case 'r':
+ if (add && !nick_identified(user)) {
+ common_svsmode(user, "-r", NULL);
+ user->mode &= ~UMODE_r;
+ }
+ break;
+ case 'x':
+ update_host(user);
+ break;
+ }
+ }
}
/* GLOBOPS */
void rageircd_SendGlobops(const char *source, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
+ send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
}
void rageircd_SendNoticeChanops(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
+ send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
}
void rageircd_cmd_notice(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (NSDefFlags & NI_MSG) {
- rageircd_cmd_privmsg2(source, dest, buf);
- } else {
- send_cmd(source, "NOTICE %s :%s", dest, buf);
- }
+ if (NSDefFlags & NI_MSG) {
+ rageircd_cmd_privmsg2(source, dest, buf);
+ } else {
+ send_cmd(source, "NOTICE %s :%s", dest, buf);
+ }
}
void rageircd_cmd_notice2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE %s :%s", dest, msg);
+ send_cmd(source, "NOTICE %s :%s", dest, msg);
}
void rageircd_cmd_privmsg(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source, "PRIVMSG %s :%s", dest, buf);
+ send_cmd(source, "PRIVMSG %s :%s", dest, buf);
}
void rageircd_cmd_privmsg2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG %s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG %s :%s", dest, msg);
}
void rageircd_SendGlobalNotice(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE $%s :%s", dest, msg);
+ send_cmd(source, "NOTICE $%s :%s", dest, msg);
}
void rageircd_SendGlobalPrivmsg(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
}
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;
}
int anope_event_ping(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- rageircd_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ rageircd_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
+ return MOD_CONT;
}
void rageircd_cmd_351(const char *source)
{
- send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
- source, version_number, ServerName, ircd->name, version_flags,
- EncModule, version_build);
+ send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
+ source, version_number, ServerName, ircd->name, version_flags,
+ EncModule, version_build);
}
void rageircd_SendMode(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (ircdcap->tsmode) {
- if (uplink_capab & ircdcap->tsmode || UseTSMODE) {
- send_cmd(source, "MODE %s 0 %s", dest, buf);
- } else {
- send_cmd(source, "MODE %s %s", dest, buf);
- }
- } else {
- send_cmd(source, "MODE %s %s", dest, buf);
- }
+ if (ircdcap->tsmode) {
+ if (uplink_capab & ircdcap->tsmode || UseTSMODE) {
+ send_cmd(source, "MODE %s 0 %s", dest, buf);
+ } else {
+ send_cmd(source, "MODE %s %s", dest, buf);
+ }
+ } else {
+ send_cmd(source, "MODE %s %s", dest, buf);
+ }
}
void rageircd_SendKick(const char *source, const char *chan, const char *user, const char *buf)
{
- if (buf) {
- send_cmd(source, "KICK %s %s :%s", chan, user, buf);
- } else {
- send_cmd(source, "KICK %s %s", chan, user);
- }
+ if (buf) {
+ send_cmd(source, "KICK %s %s :%s", chan, user, buf);
+ } else {
+ send_cmd(source, "KICK %s %s", chan, user);
+ }
}
void rageircd_cmd_372(const char *source, const char *msg)
{
- send_cmd(ServerName, "372 %s :- %s", source, msg);
+ send_cmd(ServerName, "372 %s :- %s", source, msg);
}
void rageircd_cmd_372_error(const char *source)
{
- send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
- "contact your IRC administrator.", source);
+ send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
+ "contact your IRC administrator.", source);
}
void rageircd_cmd_375(const char *source)
{
- send_cmd(ServerName, "375 %s :- %s Message of the Day",
- source, ServerName);
+ send_cmd(ServerName, "375 %s :- %s Message of the Day",
+ source, ServerName);
}
void rageircd_cmd_376(const char *source)
{
- send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
+ send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
}
/* INVITE */
void rageircd_SendInvite(const char *source, const char *chan, const char *nick)
{
- if (!source || !chan || !nick) {
- return;
- }
+ if (!source || !chan || !nick) {
+ return;
+ }
- send_cmd(source, "INVITE %s %s", nick, chan);
+ send_cmd(source, "INVITE %s %s", nick, chan);
}
/* 391 */
void rageircd_cmd_391(const char *source, const char *timestr)
{
- if (!timestr) {
- return;
- }
- send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
+ if (!timestr) {
+ return;
+ }
+ send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
}
/* 250 */
void rageircd_cmd_250(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "250 %s", buf);
+ send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void rageircd_cmd_307(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "307 %s", buf);
+ send_cmd(ServerName, "307 %s", buf);
}
/* 311 */
void rageircd_cmd_311(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "311 %s", buf);
+ send_cmd(ServerName, "311 %s", buf);
}
/* 312 */
void rageircd_cmd_312(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "312 %s", buf);
+ send_cmd(ServerName, "312 %s", buf);
}
/* 317 */
void rageircd_cmd_317(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "317 %s", buf);
+ send_cmd(ServerName, "317 %s", buf);
}
/* 219 */
void rageircd_cmd_219(const char *source, const char *letter)
{
- if (!source) {
- return;
- }
+ if (!source) {
+ return;
+ }
- if (letter) {
- send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
- *letter);
- } else {
- send_cmd(NULL, "219 %s l :End of /STATS report.", source);
- }
+ if (letter) {
+ send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
+ *letter);
+ } else {
+ send_cmd(NULL, "219 %s l :End of /STATS report.", source);
+ }
}
/* 401 */
void rageircd_cmd_401(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
- send_cmd(ServerName, "401 %s %s :No such service.", source, who);
+ if (!source || !who) {
+ return;
+ }
+ send_cmd(ServerName, "401 %s %s :No such service.", source, who);
}
/* 318 */
void rageircd_cmd_318(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
+ if (!source || !who) {
+ return;
+ }
- send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
+ send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void rageircd_cmd_242(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "242 %s", buf);
+ send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void rageircd_cmd_243(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "243 %s", buf);
+ send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void rageircd_cmd_211(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "211 %s", buf);
+ send_cmd(NULL, "211 %s", buf);
}
void rageircd_cmd_nick(const char *nick, const char *name, const char *modes)
{
- EnforceQlinedNick(nick, NULL);
- send_cmd(NULL, "SNICK %s %ld 1 %s %s 0 * %s 0 %s :%s", nick,
- (long int) time(NULL), ServiceUser, ServiceHost, ServerName,
- modes, name);
- rageircd_SendSQLine(nick, "Reserved for services");
+ EnforceQlinedNick(nick, NULL);
+ send_cmd(NULL, "SNICK %s %ld 1 %s %s 0 * %s 0 %s :%s", nick,
+ (long int) time(NULL), ServiceUser, ServiceHost, ServerName,
+ modes, name);
+ rageircd_SendSQLine(nick, "Reserved for services");
}
/* EVENT : OS */
int anope_event_os(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_OperServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_OperServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : NS */
int anope_event_ns(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_NickServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_NickServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : MS */
int anope_event_ms(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_MemoServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_MemoServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : HS */
int anope_event_hs(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_HostServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_HostServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : CS */
int anope_event_cs(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_ChanServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_ChanServ, av[0]);
+ return MOD_CONT;
}
/* QUIT */
void rageircd_SendQuit(const char *source, const char *buf)
{
- if (buf) {
- send_cmd(source, "QUIT :%s", buf);
- } else {
- send_cmd(source, "QUIT");
- }
+ if (buf) {
+ send_cmd(source, "QUIT :%s", buf);
+ } else {
+ send_cmd(source, "QUIT");
+ }
}
void rageircd_SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real,
- const char *modes)
+ const char *modes)
{
- EnforceQlinedNick(nick, s_BotServ);
- send_cmd(NULL, "SNICK %s %ld 1 %s %s 0 * %s 0 %s :%s", nick,
- (long int) time(NULL), user, host, ServerName, modes, real);
- rageircd_SendSQLine(nick, "Reserved for services");
+ EnforceQlinedNick(nick, s_BotServ);
+ send_cmd(NULL, "SNICK %s %ld 1 %s %s 0 * %s 0 %s :%s", nick,
+ (long int) time(NULL), user, host, ServerName, modes, real);
+ rageircd_SendSQLine(nick, "Reserved for services");
}
/* SVSMODE -b */
void rageircd_SendBanDel(const char *name, const char *nick)
{
- rageircd_SendSVSMode_chan(name, "-b", nick);
+ rageircd_SendSVSMode_chan(name, "-b", nick);
}
@@ -1203,165 +1203,165 @@ void rageircd_SendBanDel(const char *name, const char *nick)
void rageircd_SendSVSMode_chan(const char *name, const char *mode, const char *nick)
{
- if (nick) {
- send_cmd(ServerName, "SVSMODE %s %s %s", name, mode, nick);
- } else {
- send_cmd(ServerName, "SVSMODE %s %s", name, mode);
- }
+ if (nick) {
+ send_cmd(ServerName, "SVSMODE %s %s %s", name, mode, nick);
+ } else {
+ send_cmd(ServerName, "SVSMODE %s %s", name, mode);
+ }
}
void rageircd_SendBotOp(const char *nick, const char *chan)
{
- anope_SendMode(nick, chan, "%s %s", ircd->botchanumode, nick);
+ anope_SendMode(nick, chan, "%s %s", ircd->botchanumode, nick);
}
int anope_event_server(const char *source, int ac, const char **av)
{
- if (!stricmp(av[1], "1")) {
- uplink = sstrdup(av[0]);
- }
- do_server(source, av[0], av[1], av[2], NULL);
- return MOD_CONT;
+ if (!stricmp(av[1], "1")) {
+ uplink = sstrdup(av[0]);
+ }
+ 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_482(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
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 (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 (*av[0] == '#' || *av[0] == '&') {
+ do_cmode(source, ac, av);
+ } else {
+ do_umode(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;
}
/* SVSHOLD - set */
void rageircd_SendSVSHOLD(const char *nick)
{
- send_cmd(ServerName, "SVSHOLD %s %d :%s", nick, NSReleaseTimeout,
- "Being held for registered user");
+ send_cmd(ServerName, "SVSHOLD %s %d :%s", nick, NSReleaseTimeout,
+ "Being held for registered user");
}
/* SVSHOLD - release */
void rageircd_SendSVSHOLDDel(const char *nick)
{
- send_cmd(ServerName, "SVSHOLD %s 0", nick);
+ send_cmd(ServerName, "SVSHOLD %s 0", nick);
}
void rageircd_SendForceNickChange(const char *source, const char *guest, time_t when)
{
- if (!source || !guest) {
- return;
- }
- send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
+ if (!source || !guest) {
+ return;
+ }
+ send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
}
void rageircd_SendGuestNick(const char *nick, const char *user, const char *host,
- const char *real, const char *modes)
+ const char *real, const char *modes)
{
- send_cmd(NULL, "SNICK %s %ld 1 %s %s 0 * %s 0 %s :%s", nick,
- (long int) time(NULL), user, host, ServerName, modes, real);
+ send_cmd(NULL, "SNICK %s %ld 1 %s %s 0 * %s 0 %s :%s", nick,
+ (long int) time(NULL), user, host, ServerName, modes, real);
}
void rageircd_SendSVSO(const char *source, const char *nick, const char *flag)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
@@ -1369,52 +1369,52 @@ void rageircd_SendSVSO(const char *source, const char *nick, const char *flag)
/* sent if svid is something weird */
void rageircd_SendSVID(const char *nick, time_t ts)
{
- send_cmd(ServerName, "SVSMODE %s %lu +d 1", nick,
- (unsigned long int) ts);
+ send_cmd(ServerName, "SVSMODE %s %lu +d 1", nick,
+ (unsigned long int) ts);
}
/* SVSMODE +d */
/* nc_change was = 1, and there is no na->status */
void rageircd_SendUnregisteredNick(User * u)
{
- common_svsmode(u, "+d", "1");
+ common_svsmode(u, "+d", "1");
}
/* SVSMODE +d */
void rageircd_SendSVID2(User * u, const char *ts)
{
- /* not used by bahamut ircds */
+ /* not used by bahamut ircds */
}
void rageircd_SendSVID3(User * u, const char *ts)
{
- if (u->svid != u->timestamp) {
- common_svsmode(u, "+rd", ts);
- } else {
- common_svsmode(u, "+r", NULL);
- }
+ if (u->svid != u->timestamp) {
+ common_svsmode(u, "+rd", ts);
+ } else {
+ common_svsmode(u, "+r", NULL);
+ }
}
/* NICK <newnick> */
void rageircd_SendChangeBotNick(const char *oldnick, const char *newnick)
{
- if (!oldnick || !newnick) {
- return;
- }
+ if (!oldnick || !newnick) {
+ return;
+ }
- send_cmd(oldnick, "NICK %s", newnick);
+ send_cmd(oldnick, "NICK %s", newnick);
}
int anope_event_myid(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
int anope_event_pass(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
/*
@@ -1434,90 +1434,90 @@ int anope_event_pass(const char *source, int ac, const char **av)
*/
int anope_event_svinfo(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
int anope_event_gnotice(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
int anope_event_notice(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
int anope_event_sqline(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
void rageircd_SendSVSJoin(const char *source, const char *nick, const char *chan, const char *param)
{
- /* Find no reference to it in the code and docs */
+ /* Find no reference to it in the code and docs */
}
void rageircd_SendSVSPart(const char *source, const char *nick, const char *chan)
{
- /* Find no reference to it in the code and docs */
+ /* Find no reference to it in the code and docs */
}
void rageircd_SendSWhois(const char *source, const char *who, const char *mask)
{
- /* not supported */
+ /* not supported */
}
int anope_event_rehash(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_credits(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_admin(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_globops(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int rageircd_IsFloodModeParamValid(const char *value)
{
- return 0;
+ return 0;
}
void rageircd_SendEOB()
{
- send_cmd(NULL, "BURST 0");
+ send_cmd(NULL, "BURST 0");
}
void rageircd_SendJupe(const char *jserver, const char *who, const char *reason)
{
- char rbuf[256];
+ char rbuf[256];
- snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
- reason ? ": " : "", reason ? reason : "");
+ snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
+ reason ? ": " : "", reason ? reason : "");
- if (findserver(servlist, jserver))
- rageircd_SendSquit(jserver, rbuf);
- rageircd_SendServer(jserver, 2, rbuf);
- new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
+ if (findserver(servlist, jserver))
+ rageircd_SendSquit(jserver, rbuf);
+ rageircd_SendServer(jserver, 2, rbuf);
+ new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
}
/* GLOBOPS - to handle old WALLOPS */
void rageircd_SendGlobops_legacy(const char *source, const char *fmt)
{
- send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
+ send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
/*
@@ -1526,8 +1526,8 @@ void rageircd_SendGlobops_legacy(const char *source, const char *fmt)
*/
int rageircd_IsNickValid(const char *nick)
{
- /* no hard coded invalid nicks */
- return 1;
+ /* no hard coded invalid nicks */
+ return 1;
}
/*
@@ -1536,23 +1536,23 @@ int rageircd_IsNickValid(const char *nick)
*/
int rageircd_IsChannelValid(const char *chan)
{
- /* no hard coded invalid nicks */
- return 1;
+ /* no hard coded invalid nicks */
+ return 1;
}
void rageircd_SendCTCP(const char *source, const char *dest, const char *buf)
{
- char *s;
+ char *s;
- if (!buf) {
- return;
- } else {
- s = normalizeBuffer(buf);
- }
+ if (!buf) {
+ return;
+ } else {
+ s = normalizeBuffer(buf);
+ }
- send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
- free(s);
+ send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
+ free(s);
}
@@ -1562,78 +1562,78 @@ void rageircd_SendCTCP(const char *source, const char *dest, const char *buf)
**/
void moduleAddAnopeCmds()
{
- pmodule_cmd_topic(rageircd_cmd_topic);
- pmodule_SendVhostDel(rageircd_cmd_vhost_off);
- pmodule_SendAkill(rageircd_cmd_akill);
- pmodule_SendSVSKill(rageircd_SendSVSKill);
- pmodule_SendSVSMode(rageircd_cmd_svsmode);
- pmodule_cmd_372(rageircd_cmd_372);
- pmodule_cmd_372_error(rageircd_cmd_372_error);
- pmodule_cmd_375(rageircd_cmd_375);
- pmodule_cmd_376(rageircd_cmd_376);
- pmodule_cmd_nick(rageircd_cmd_nick);
- pmodule_SendGuestNick(rageircd_cmd_guest_nick);
- pmodule_SendMode(rageircd_cmd_mode);
- pmodule_SendClientIntroduction(rageircd_cmd_bot_nick);
- pmodule_SendKick(rageircd_cmd_kick);
- pmodule_SendNoticeChanops(rageircd_cmd_notice_ops);
- pmodule_cmd_notice(rageircd_cmd_notice);
- pmodule_cmd_notice2(rageircd_cmd_notice2);
- pmodule_cmd_privmsg(rageircd_cmd_privmsg);
- pmodule_cmd_privmsg2(rageircd_cmd_privmsg2);
- pmodule_SendGlobalNotice(rageircd_cmd_serv_notice);
- pmodule_SendGlobalPrivmsg(rageircd_cmd_serv_privmsg);
- pmodule_SendBotOp(rageircd_cmd_bot_chan_mode);
- pmodule_cmd_351(rageircd_cmd_351);
- pmodule_SendQuit(rageircd_cmd_quit);
- pmodule_SendPong(rageircd_cmd_pong);
- pmodule_SendJoin(rageircd_cmd_join);
- pmodule_SendSQLineDel(rageircd_cmd_unsqline);
- pmodule_SendInvite(rageircd_cmd_invite);
- pmodule_SendPart(rageircd_cmd_part);
- pmodule_cmd_391(rageircd_cmd_391);
- pmodule_cmd_250(rageircd_cmd_250);
- pmodule_cmd_307(rageircd_cmd_307);
- pmodule_cmd_311(rageircd_cmd_311);
- pmodule_cmd_312(rageircd_cmd_312);
- pmodule_cmd_317(rageircd_cmd_317);
- pmodule_cmd_219(rageircd_cmd_219);
- pmodule_cmd_401(rageircd_cmd_401);
- pmodule_cmd_318(rageircd_cmd_318);
- pmodule_cmd_242(rageircd_cmd_242);
- pmodule_cmd_243(rageircd_cmd_243);
- pmodule_cmd_211(rageircd_cmd_211);
- pmodule_SendGlobops(rageircd_cmd_global);
- pmodule_SendGlobops_legacy(rageircd_cmd_global_legacy);
- pmodule_SendSQLine(rageircd_cmd_sqline);
- pmodule_SendSquit(rageircd_cmd_squit);
- pmodule_SendSVSO(rageircd_cmd_svso);
- pmodule_SendChangeBotNick(rageircd_cmd_chg_nick);
- pmodule_SendForceNickChange(rageircd_cmd_svsnick);
- pmodule_SendVhost(rageircd_cmd_vhost_on);
- pmodule_SendConnect(rageircd_cmd_connect);
- pmodule_SendSVSHOLD(rageircd_cmd_svshold);
- pmodule_SendSVSHOLDDel(rageircd_cmd_release_svshold);
- pmodule_SendSGLineDel(rageircd_cmd_unsgline);
- pmodule_SendSZLineDel(rageircd_cmd_unszline);
- pmodule_SendSZLine(rageircd_cmd_szline);
- pmodule_SendSGLine(rageircd_cmd_sgline);
- pmodule_SendBanDel(rageircd_cmd_unban);
- pmodule_SendSVSMode_chan(rageircd_cmd_svsmode_chan);
- pmodule_SendSVID(rageircd_cmd_svid_umode);
- pmodule_SendUnregisteredNick(rageircd_cmd_nc_change);
- pmodule_SendSVID2(rageircd_cmd_svid_umode2);
- pmodule_SendSVID3(rageircd_cmd_svid_umode3);
- pmodule_SendSVSJoin(rageircd_cmd_svsjoin);
- pmodule_SendSVSPart(rageircd_cmd_svspart);
- pmodule_SendSWhois(rageircd_cmd_swhois);
- pmodule_SendEOB(rageircd_cmd_eob);
- pmodule_IsFloodModeParamValid(rageircd_flood_mode_check);
- pmodule_SendJupe(rageircd_cmd_jupe);
- pmodule_IsNickValid(rageircd_valid_nick);
- pmodule_IsChannelValid(rageircd_valid_chan);
- pmodule_SendCTCP(rageircd_cmd_ctcp);
- pmodule_ProcessUsermodes(rageircd_set_umode);
+ pmodule_cmd_topic(rageircd_cmd_topic);
+ pmodule_SendVhostDel(rageircd_cmd_vhost_off);
+ pmodule_SendAkill(rageircd_cmd_akill);
+ pmodule_SendSVSKill(rageircd_SendSVSKill);
+ pmodule_SendSVSMode(rageircd_cmd_svsmode);
+ pmodule_cmd_372(rageircd_cmd_372);
+ pmodule_cmd_372_error(rageircd_cmd_372_error);
+ pmodule_cmd_375(rageircd_cmd_375);
+ pmodule_cmd_376(rageircd_cmd_376);
+ pmodule_cmd_nick(rageircd_cmd_nick);
+ pmodule_SendGuestNick(rageircd_cmd_guest_nick);
+ pmodule_SendMode(rageircd_cmd_mode);
+ pmodule_SendClientIntroduction(rageircd_cmd_bot_nick);
+ pmodule_SendKick(rageircd_cmd_kick);
+ pmodule_SendNoticeChanops(rageircd_cmd_notice_ops);
+ pmodule_cmd_notice(rageircd_cmd_notice);
+ pmodule_cmd_notice2(rageircd_cmd_notice2);
+ pmodule_cmd_privmsg(rageircd_cmd_privmsg);
+ pmodule_cmd_privmsg2(rageircd_cmd_privmsg2);
+ pmodule_SendGlobalNotice(rageircd_cmd_serv_notice);
+ pmodule_SendGlobalPrivmsg(rageircd_cmd_serv_privmsg);
+ pmodule_SendBotOp(rageircd_cmd_bot_chan_mode);
+ pmodule_cmd_351(rageircd_cmd_351);
+ pmodule_SendQuit(rageircd_cmd_quit);
+ pmodule_SendPong(rageircd_cmd_pong);
+ pmodule_SendJoin(rageircd_cmd_join);
+ pmodule_SendSQLineDel(rageircd_cmd_unsqline);
+ pmodule_SendInvite(rageircd_cmd_invite);
+ pmodule_SendPart(rageircd_cmd_part);
+ pmodule_cmd_391(rageircd_cmd_391);
+ pmodule_cmd_250(rageircd_cmd_250);
+ pmodule_cmd_307(rageircd_cmd_307);
+ pmodule_cmd_311(rageircd_cmd_311);
+ pmodule_cmd_312(rageircd_cmd_312);
+ pmodule_cmd_317(rageircd_cmd_317);
+ pmodule_cmd_219(rageircd_cmd_219);
+ pmodule_cmd_401(rageircd_cmd_401);
+ pmodule_cmd_318(rageircd_cmd_318);
+ pmodule_cmd_242(rageircd_cmd_242);
+ pmodule_cmd_243(rageircd_cmd_243);
+ pmodule_cmd_211(rageircd_cmd_211);
+ pmodule_SendGlobops(rageircd_cmd_global);
+ pmodule_SendGlobops_legacy(rageircd_cmd_global_legacy);
+ pmodule_SendSQLine(rageircd_cmd_sqline);
+ pmodule_SendSquit(rageircd_cmd_squit);
+ pmodule_SendSVSO(rageircd_cmd_svso);
+ pmodule_SendChangeBotNick(rageircd_cmd_chg_nick);
+ pmodule_SendForceNickChange(rageircd_cmd_svsnick);
+ pmodule_SendVhost(rageircd_cmd_vhost_on);
+ pmodule_SendConnect(rageircd_cmd_connect);
+ pmodule_SendSVSHOLD(rageircd_cmd_svshold);
+ pmodule_SendSVSHOLDDel(rageircd_cmd_release_svshold);
+ pmodule_SendSGLineDel(rageircd_cmd_unsgline);
+ pmodule_SendSZLineDel(rageircd_cmd_unszline);
+ pmodule_SendSZLine(rageircd_cmd_szline);
+ pmodule_SendSGLine(rageircd_cmd_sgline);
+ pmodule_SendBanDel(rageircd_cmd_unban);
+ pmodule_SendSVSMode_chan(rageircd_cmd_svsmode_chan);
+ pmodule_SendSVID(rageircd_cmd_svid_umode);
+ pmodule_SendUnregisteredNick(rageircd_cmd_nc_change);
+ pmodule_SendSVID2(rageircd_cmd_svid_umode2);
+ pmodule_SendSVID3(rageircd_cmd_svid_umode3);
+ pmodule_SendSVSJoin(rageircd_cmd_svsjoin);
+ pmodule_SendSVSPart(rageircd_cmd_svspart);
+ pmodule_SendSWhois(rageircd_cmd_swhois);
+ pmodule_SendEOB(rageircd_cmd_eob);
+ pmodule_IsFloodModeParamValid(rageircd_flood_mode_check);
+ pmodule_SendJupe(rageircd_cmd_jupe);
+ pmodule_IsNickValid(rageircd_valid_nick);
+ pmodule_IsChannelValid(rageircd_valid_chan);
+ pmodule_SendCTCP(rageircd_cmd_ctcp);
+ pmodule_ProcessUsermodes(rageircd_set_umode);
}
/**
@@ -1642,37 +1642,37 @@ void moduleAddAnopeCmds()
int AnopeInit(int argc, char **argv)
{
- this->SetAuthor("Anope");
- this->SetVersion
- ("$Id$");
- this->SetType(PROTOCOL);
-
- pmodule_ircd_version("RageIRCd 2.0.x");
- pmodule_ircd_cap(myIrcdcap);
- pmodule_ircd_var(myIrcd);
- pmodule_ircd_cbmodeinfos(myCbmodeinfos);
- pmodule_ircd_cumodes(myCumodes);
- pmodule_ircd_flood_mode_char_set("");
- pmodule_ircd_flood_mode_char_remove("");
- pmodule_ircd_cbmodes(myCbmodes);
- pmodule_ircd_cmmodes(myCmmodes);
- pmodule_ircd_csmodes(myCsmodes);
- pmodule_ircd_useTSMode(1);
-
- /** Deal with modes anope _needs_ to know **/
- pmodule_invis_umode(UMODE_i);
- pmodule_oper_umode(UMODE_o);
- pmodule_invite_cmode(CMODE_i);
- pmodule_secret_cmode(CMODE_s);
- pmodule_private_cmode(CMODE_p);
- pmodule_key_mode(CMODE_k);
- pmodule_limit_mode(CMODE_l);
-
- moduleAddAnopeCmds();
+ this->SetAuthor("Anope");
+ this->SetVersion
+ ("$Id$");
+ this->SetType(PROTOCOL);
+
+ pmodule_ircd_version("RageIRCd 2.0.x");
+ pmodule_ircd_cap(myIrcdcap);
+ pmodule_ircd_var(myIrcd);
+ pmodule_ircd_cbmodeinfos(myCbmodeinfos);
+ pmodule_ircd_cumodes(myCumodes);
+ pmodule_ircd_flood_mode_char_set("");
+ pmodule_ircd_flood_mode_char_remove("");
+ pmodule_ircd_cbmodes(myCbmodes);
+ pmodule_ircd_cmmodes(myCmmodes);
+ pmodule_ircd_csmodes(myCsmodes);
+ pmodule_ircd_useTSMode(1);
+
+ /** Deal with modes anope _needs_ to know **/
+ pmodule_invis_umode(UMODE_i);
+ pmodule_oper_umode(UMODE_o);
+ pmodule_invite_cmode(CMODE_i);
+ pmodule_secret_cmode(CMODE_s);
+ pmodule_private_cmode(CMODE_p);
+ pmodule_key_mode(CMODE_k);
+ pmodule_limit_mode(CMODE_l);
+
+ moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
- moduleAddIRCDMsgs();
+ moduleAddIRCDMsgs();
- return MOD_CONT;
+ return MOD_CONT;
}
/* EOF */
diff --git a/src/protocol/obsolete/rageircd.h b/src/protocol/obsolete/rageircd.h
index 12aab63dc..a20fedf30 100644
--- a/src/protocol/obsolete/rageircd.h
+++ b/src/protocol/obsolete/rageircd.h
@@ -32,7 +32,7 @@
#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_M 0x00000800 /* Non-regged nicks can't send messages */
#define CMODE_N 0x00001000
#define CMODE_S 0x00002000
#define CMODE_C 0x00004000
diff --git a/src/protocol/obsolete/solidircd.c b/src/protocol/obsolete/solidircd.c
index d5947a4b4..b6a70462b 100644
--- a/src/protocol/obsolete/solidircd.c
+++ b/src/protocol/obsolete/solidircd.c
@@ -18,502 +18,502 @@
#include "solidircd.h"
IRCDVar myIrcd[] = {
- {"Solid-IRCd 3.4.*", /* ircd name */
- "+o", /* nickserv mode */
- "+o", /* chanserv mode */
- "+o", /* memoserv mode */
- "+o", /* hostserv mode */
- "+io", /* operserv mode */
- "+o", /* botserv mode */
- "+h", /* helpserv mode */
- "+i", /* Dev/Null mode */
- "+io", /* Global mode */
- "+o", /* nickserv alias mode */
- "+o", /* chanserv alias mode */
- "+o", /* memoserv alias mode */
- "+io", /* hostserv alias mode */
- "+io", /* operserv alias mode */
- "+o", /* botserv alias mode */
- "+h", /* helpserv alias mode */
- "+i", /* Dev/Null alias mode */
- "+io", /* Global alias mode */
- "+", /* Used by BotServ Bots */
- 2, /* Chan Max Symbols */
- "-cilmnpstOR", /* Modes to Remove */
- "+o", /* Channel Umode used by Botserv bots */
- 1, /* SVSNICK */
- 1, /* Vhost */
- 0, /* Has Owner */
- NULL, /* Mode to set for an owner */
- NULL, /* Mode to unset for an owner */
- NULL, /* Mode to set for chan admin */
- NULL, /* Mode to unset for chan 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 */
- "+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 */
- 0, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- 0, /* Protected Umode */
- 0, /* Has Admin */
- 1, /* Chan SQlines */
- 1, /* Quit on Kill */
- 1, /* SVSMODE unban */
- 0, /* Has Protect */
- 0, /* Reverse */
- 1, /* Chan Reg */
- CMODE_r, /* Channel Mode */
- 0, /* vidents */
- 1, /* svshold */
- 1, /* time stamp on mode */
- 1, /* NICKIP */
- 0, /* O:LINE */
- 1, /* UMODE */
- 0, /* VHOST ON NICK */
- 0, /* Change RealName */
- 0, /* No Knock */
- 0, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- UMODE_v, /* Vhost Mode */
- 1, /* +f */
- 0, /* +L */
- CMODE_j, /* Mode */
- 0, /* Mode */
- 1,
- 1, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support TOKENS */
- 1, /* TOKENS are CASE inSensitive */
- 0, /* TIME STAMPS are BASE64 */
- 1, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* Can remove User Channel Modes with SVSMODE */
- 0, /* Sglines are not enforced until user reconnects */
- "v", /* vhost char */
- 0, /* ts6 */
- 1, /* support helper umode */
- 0, /* p10 */
- NULL, /* character set */
- 1, /* reports sync state */
- 0, /* CIDR channelbans */
- }
- ,
- {NULL}
+ {"Solid-IRCd 3.4.*", /* ircd name */
+ "+o", /* nickserv mode */
+ "+o", /* chanserv mode */
+ "+o", /* memoserv mode */
+ "+o", /* hostserv mode */
+ "+io", /* operserv mode */
+ "+o", /* botserv mode */
+ "+h", /* helpserv mode */
+ "+i", /* Dev/Null mode */
+ "+io", /* Global mode */
+ "+o", /* nickserv alias mode */
+ "+o", /* chanserv alias mode */
+ "+o", /* memoserv alias mode */
+ "+io", /* hostserv alias mode */
+ "+io", /* operserv alias mode */
+ "+o", /* botserv alias mode */
+ "+h", /* helpserv alias mode */
+ "+i", /* Dev/Null alias mode */
+ "+io", /* Global alias mode */
+ "+", /* Used by BotServ Bots */
+ 2, /* Chan Max Symbols */
+ "-cilmnpstOR", /* Modes to Remove */
+ "+o", /* Channel Umode used by Botserv bots */
+ 1, /* SVSNICK */
+ 1, /* Vhost */
+ 0, /* Has Owner */
+ NULL, /* Mode to set for an owner */
+ NULL, /* Mode to unset for an owner */
+ NULL, /* Mode to set for chan admin */
+ NULL, /* Mode to unset for chan 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 */
+ "+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 */
+ 0, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ 0, /* Protected Umode */
+ 0, /* Has Admin */
+ 1, /* Chan SQlines */
+ 1, /* Quit on Kill */
+ 1, /* SVSMODE unban */
+ 0, /* Has Protect */
+ 0, /* Reverse */
+ 1, /* Chan Reg */
+ CMODE_r, /* Channel Mode */
+ 0, /* vidents */
+ 1, /* svshold */
+ 1, /* time stamp on mode */
+ 1, /* NICKIP */
+ 0, /* O:LINE */
+ 1, /* UMODE */
+ 0, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ 0, /* No Knock */
+ 0, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ UMODE_v, /* Vhost Mode */
+ 1, /* +f */
+ 0, /* +L */
+ CMODE_j, /* Mode */
+ 0, /* Mode */
+ 1,
+ 1, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support TOKENS */
+ 1, /* TOKENS are CASE inSensitive */
+ 0, /* TIME STAMPS are BASE64 */
+ 1, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* Can remove User Channel Modes with SVSMODE */
+ 0, /* Sglines are not enforced until user reconnects */
+ "v", /* vhost char */
+ 0, /* ts6 */
+ 1, /* support helper umode */
+ 0, /* p10 */
+ NULL, /* character set */
+ 1, /* reports sync state */
+ 0, /* CIDR channelbans */
+ }
+ ,
+ {NULL}
};
IRCDCAPAB myIrcdcap[] = {
- {
- CAPAB_NOQUIT, /* NOQUIT */
- CAPAB_TSMODE, /* TSMODE */
- CAPAB_UNCONNECT, /* UNCONNECT */
- 0, /* NICKIP */
- 0, /* SJOIN */
- 0, /* ZIP */
- CAPAB_BURST, /* BURST */
- 0, /* TS5 */
- 0, /* TS3 */
- CAPAB_DKEY, /* DKEY */
- 0, /* PT4 */
- 0, /* SCS */
- 0, /* QS */
- 0, /* UID */
- 0, /* KNOCK */
- 0, /* CLIENT */
- 0, /* IPV6 */
- 0, /* SSJ5 */
- 0, /* SN2 */
- 0, /* TOKEN */
- 0, /* VHOST */
- 0, /* SSJ3 */
- 0, /* NICK2 */
- 0, /* UMODE2 */
- 0, /* VL */
- 0, /* TLKEXT */
- 0, /* DODKEY */
- CAPAB_DOZIP, /* DOZIP */
- 0, 0, 0}
+ {
+ CAPAB_NOQUIT, /* NOQUIT */
+ CAPAB_TSMODE, /* TSMODE */
+ CAPAB_UNCONNECT, /* UNCONNECT */
+ 0, /* NICKIP */
+ 0, /* SJOIN */
+ 0, /* ZIP */
+ CAPAB_BURST, /* BURST */
+ 0, /* TS5 */
+ 0, /* TS3 */
+ CAPAB_DKEY, /* DKEY */
+ 0, /* PT4 */
+ 0, /* SCS */
+ 0, /* QS */
+ 0, /* UID */
+ 0, /* KNOCK */
+ 0, /* CLIENT */
+ 0, /* IPV6 */
+ 0, /* SSJ5 */
+ 0, /* SN2 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ 0, /* SSJ3 */
+ 0, /* NICK2 */
+ 0, /* UMODE2 */
+ 0, /* VL */
+ 0, /* TLKEXT */
+ 0, /* DODKEY */
+ CAPAB_DOZIP, /* DOZIP */
+ 0, 0, 0}
};
void solidircd_ProcessUsermodes(User * user, int ac, const char **av)
{
- int add = 1; /* 1 if adding modes, 0 if deleting */
- const char *modes = av[0];
-
- ac--;
-
- if (debug)
- alog("debug: Changing mode for %s to %s", user->nick, modes);
-
- while (*modes) {
-
- /* This looks better, much better than "add ? (do_add) : (do_remove)".
- * At least this is readable without paying much attention :) -GD
- */
- if (add)
- user->mode |= umodes[(int) *modes];
- else
- user->mode &= ~umodes[(int) *modes];
-
- switch (*modes++) {
- case '+':
- add = 1;
- break;
- case '-':
- add = 0;
- break;
- case 'a':
- if (UnRestrictSAdmin) {
- break;
- }
- if (add && !is_services_admin(user)) {
- common_svsmode(user, "-a", NULL);
- user->mode &= ~UMODE_a;
- }
- break;
- case 'd':
- if (ac == 0) {
- alog("user: umode +d with no parameter (?) for user %s",
- user->nick);
- break;
- }
-
- ac--;
- av++;
- user->svid = strtoul(*av, NULL, 0);
- break;
- case 'o':
- if (add) {
- opcnt++;
-
- if (WallOper)
- anope_SendGlobops(s_OperServ,
- "\2%s\2 is now an IRC operator.",
- user->nick);
- display_news(user, NEWS_OPER);
-
- } else {
- opcnt--;
- }
- break;
- case 'r':
- if (add && !nick_identified(user)) {
- common_svsmode(user, "-r", NULL);
- user->mode &= ~UMODE_r;
- }
- break;
- case 'v':
- update_host(user);
- break;
- }
- }
+ int add = 1; /* 1 if adding modes, 0 if deleting */
+ const char *modes = av[0];
+
+ ac--;
+
+ if (debug)
+ alog("debug: Changing mode for %s to %s", user->nick, modes);
+
+ while (*modes) {
+
+ /* This looks better, much better than "add ? (do_add) : (do_remove)".
+ * At least this is readable without paying much attention :) -GD
+ */
+ if (add)
+ user->mode |= umodes[(int) *modes];
+ else
+ user->mode &= ~umodes[(int) *modes];
+
+ switch (*modes++) {
+ case '+':
+ add = 1;
+ break;
+ case '-':
+ add = 0;
+ break;
+ case 'a':
+ if (UnRestrictSAdmin) {
+ break;
+ }
+ if (add && !is_services_admin(user)) {
+ common_svsmode(user, "-a", NULL);
+ user->mode &= ~UMODE_a;
+ }
+ break;
+ case 'd':
+ if (ac == 0) {
+ alog("user: umode +d with no parameter (?) for user %s",
+ user->nick);
+ break;
+ }
+
+ ac--;
+ av++;
+ user->svid = strtoul(*av, NULL, 0);
+ break;
+ case 'o':
+ if (add) {
+ opcnt++;
+
+ if (WallOper)
+ anope_SendGlobops(s_OperServ,
+ "\2%s\2 is now an IRC operator.",
+ user->nick);
+ display_news(user, NEWS_OPER);
+
+ } else {
+ opcnt--;
+ }
+ break;
+ case 'r':
+ if (add && !nick_identified(user)) {
+ common_svsmode(user, "-r", NULL);
+ user->mode &= ~UMODE_r;
+ }
+ break;
+ case 'v':
+ update_host(user);
+ break;
+ }
+ }
}
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, 0, UMODE_C, /* A B C */
- UMODE_D, 0, UMODE_F, /* D E F */
- 0, UMODE_H, UMODE_I, /* G H I */
- 0, UMODE_K, 0, /* J K L */
- 0, 0, UMODE_O, /* M N O */
- 0, 0, UMODE_R, /* P Q R */
- 0, 0, 0, /* S T U */
- 0, 0, UMODE_X, /* V W X */
- 0, /* Y */
- 0, /* Z */
- 0, 0, 0, /* [ \ ] */
- 0, 0, 0, /* ^ _ ` */
- UMODE_a, UMODE_b, UMODE_c, /* a b c */
- UMODE_d, UMODE_e, UMODE_f, /* d e f */
- UMODE_g, UMODE_h, UMODE_i, /* g h i */
- UMODE_j, UMODE_k, 0, /* j k l */
- UMODE_m, UMODE_n, UMODE_o, /* m n o */
- 0, 0, UMODE_r, /* p q r */
- UMODE_s, 0, 0, /* s t u */
- UMODE_v, UMODE_w, UMODE_x, /* v w x */
- UMODE_y, /* 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, 0, UMODE_C, /* A B C */
+ UMODE_D, 0, UMODE_F, /* D E F */
+ 0, UMODE_H, UMODE_I, /* G H I */
+ 0, UMODE_K, 0, /* J K L */
+ 0, 0, UMODE_O, /* M N O */
+ 0, 0, UMODE_R, /* P Q R */
+ 0, 0, 0, /* S T U */
+ 0, 0, UMODE_X, /* V W X */
+ 0, /* Y */
+ 0, /* Z */
+ 0, 0, 0, /* [ \ ] */
+ 0, 0, 0, /* ^ _ ` */
+ UMODE_a, UMODE_b, UMODE_c, /* a b c */
+ UMODE_d, UMODE_e, UMODE_f, /* d e f */
+ UMODE_g, UMODE_h, UMODE_i, /* g h i */
+ UMODE_j, UMODE_k, 0, /* j k l */
+ UMODE_m, UMODE_n, UMODE_o, /* m n o */
+ 0, 0, UMODE_r, /* p q r */
+ UMODE_s, 0, 0, /* s t u */
+ UMODE_v, UMODE_w, UMODE_x, /* v w x */
+ UMODE_y, /* 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',
- 0, 0, 0, 0,
- 0,
+ 0,
+ 0,
+ 0, 0, 0,
+ 'h',
+ 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,
+ '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, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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},
- {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},
- {NULL},
- {NULL},
- {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},
+ {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},
+ {NULL},
+ {NULL},
+ {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},
- {0}, /* A */
- {0}, /* B */
- {0}, /* C */
- {0}, /* D */
- {0}, /* E */
- {0}, /* F */
- {0}, /* G */
- {0}, /* H */
- {0}, /* I */
- {0}, /* J */
- {0}, /* K */
- {0}, /* L */
- {CMODE_M, 0, NULL, NULL}, /* M */
- {CMODE_N, 0, NULL, NULL}, /* N */
- {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
- {0}, /* P */
- {0}, /* Q */
- {CMODE_R, 0, NULL, NULL}, /* R */
- {CMODE_S, 0, NULL, NULL}, /* S */
- {0}, /* T */
- {0}, /* U */
- {0}, /* 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 */
- {0}, /* f */
- {0}, /* g */
- {0}, /* h */
- {CMODE_i, 0, NULL, NULL},
- {CMODE_j, 0, set_flood, cs_set_flood}, /* 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},
- {0},
- {0}, /* v */
- {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}, /* A */
+ {0}, /* B */
+ {0}, /* C */
+ {0}, /* D */
+ {0}, /* E */
+ {0}, /* F */
+ {0}, /* G */
+ {0}, /* H */
+ {0}, /* I */
+ {0}, /* J */
+ {0}, /* K */
+ {0}, /* L */
+ {CMODE_M, 0, NULL, NULL}, /* M */
+ {CMODE_N, 0, NULL, NULL}, /* N */
+ {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
+ {0}, /* P */
+ {0}, /* Q */
+ {CMODE_R, 0, NULL, NULL}, /* R */
+ {CMODE_S, 0, NULL, NULL}, /* S */
+ {0}, /* T */
+ {0}, /* U */
+ {0}, /* 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 */
+ {0}, /* f */
+ {0}, /* g */
+ {0}, /* h */
+ {CMODE_i, 0, NULL, NULL},
+ {CMODE_j, 0, set_flood, cs_set_flood}, /* 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},
+ {0},
+ {0}, /* v */
+ {0}, /* w */
+ {0}, /* x */
+ {0}, /* y */
+ {0}, /* z */
+ {0}, {0}, {0}, {0}
};
CBModeInfo myCbmodeinfos[] = {
- {'c', CMODE_c, 0, NULL, NULL},
- {'i', CMODE_i, 0, NULL, NULL},
- {'j', CMODE_j, 0, get_flood, cs_get_flood},
- {'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},
- {'M', CMODE_M, 0, NULL, NULL},
- {'O', CMODE_O, 0, NULL, NULL},
- {'R', CMODE_R, 0, NULL, NULL},
- {'N', CMODE_N, 0, NULL, NULL},
- {'S', CMODE_S, 0, NULL, NULL},
- {0}
+ {'c', CMODE_c, 0, NULL, NULL},
+ {'i', CMODE_i, 0, NULL, NULL},
+ {'j', CMODE_j, 0, get_flood, cs_get_flood},
+ {'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},
+ {'M', CMODE_M, 0, NULL, NULL},
+ {'O', CMODE_O, 0, NULL, NULL},
+ {'R', CMODE_R, 0, NULL, NULL},
+ {'N', CMODE_N, 0, NULL, NULL},
+ {'S', CMODE_S, 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},
-
- {0}, /* a */
- {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 */
- {0}, /* q */
- {0}, /* r */
- {0}, /* s */
- {0}, /* t */
- {0}, /* u */
- {CUS_VOICE, 0, NULL}, /* v */
- {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},
+
+ {0}, /* a */
+ {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 */
+ {0}, /* q */
+ {0}, /* r */
+ {0}, /* s */
+ {0}, /* t */
+ {0}, /* u */
+ {CUS_VOICE, 0, NULL}, /* v */
+ {0}, /* w */
+ {0}, /* x */
+ {0}, /* y */
+ {0}, /* z */
+ {0}, {0}, {0}, {0}, {0}
};
void solidircd_SendMode(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (ircdcap->tsmode) {
- if (uplink_capab & ircdcap->tsmode) {
- send_cmd(source, "MODE %s 0 %s", dest, buf);
- } else {
- send_cmd(source, "MODE %s %s", dest, buf);
- }
- } else {
- send_cmd(source, "MODE %s %s", dest, buf);
- }
+ if (ircdcap->tsmode) {
+ if (uplink_capab & ircdcap->tsmode) {
+ send_cmd(source, "MODE %s 0 %s", dest, buf);
+ } else {
+ send_cmd(source, "MODE %s %s", dest, buf);
+ }
+ } else {
+ send_cmd(source, "MODE %s %s", dest, buf);
+ }
}
/* SVSHOLD - set */
void solidircd_SendSVSHOLD(const char *nick)
{
- send_cmd(ServerName, "SVSHOLD %s %d :%s", nick, NSReleaseTimeout,
- "Being held for registered user");
+ send_cmd(ServerName, "SVSHOLD %s %d :%s", nick, NSReleaseTimeout,
+ "Being held for registered user");
}
/* SVSHOLD - release */
void solidircd_SendSVSHOLDDel(const char *nick)
{
- send_cmd(ServerName, "SVSHOLD %s 0", nick);
+ send_cmd(ServerName, "SVSHOLD %s 0", nick);
}
/* SVSMODE -b */
void solidircd_SendBanDel(const char *name, const char *nick)
{
- solidircd_SendSVSMode_chan(name, "-b", nick);
+ solidircd_SendSVSMode_chan(name, "-b", nick);
}
@@ -521,186 +521,186 @@ void solidircd_SendBanDel(const char *name, const char *nick)
void solidircd_SendSVSMode_chan(const char *name, const char *mode, const char *nick)
{
- if (nick) {
- send_cmd(ServerName, "SVSMODE %s %s %s", name, mode, nick);
- } else {
- send_cmd(ServerName, "SVSMODE %s %s", name, mode);
- }
+ if (nick) {
+ send_cmd(ServerName, "SVSMODE %s %s %s", name, mode, nick);
+ } else {
+ send_cmd(ServerName, "SVSMODE %s %s", name, mode);
+ }
}
void solidircd_SendBotOp(const char *nick, const char *chan)
{
- anope_SendMode(nick, chan, "%s %s", ircd->botchanumode, nick);
+ anope_SendMode(nick, chan, "%s %s", ircd->botchanumode, nick);
}
/* EVENT: SJOIN */
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;
}
/*
** NICK - new
-** source = NULL
+** source = NULL
** parv[0] = nickname
-** parv[1] = hopcount
-** parv[2] = timestamp
-** parv[3] = modes
-** parv[4] = username
-** parv[5] = hostname
-** parv[6] = server
+** parv[1] = hopcount
+** parv[2] = timestamp
+** parv[3] = modes
+** parv[4] = username
+** parv[5] = hostname
+** parv[6] = server
** parv[7] = servicestamp
-** parv[8] = IP
+** parv[8] = IP
** parv[9] = info
** NICK - change
-** source = oldnick
+** source = oldnick
** parv[0] = new nickname
-** parv[1] = hopcount
+** parv[1] = hopcount
*/
int anope_event_nick(const char *source, int ac, const char **av)
{
- User *user;
+ User *user;
- if (ac != 2) {
- user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
- strtoul(av[2], NULL, 10), strtoul(av[7], NULL, 0),
- strtoul(av[8], NULL, 0), NULL, NULL);
- if (user) {
- anope_ProcessUsermodes(user, 1, &av[3]);
- }
- } else {
- do_nick(source, av[0], NULL, NULL, NULL, NULL,
- strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
- }
- return MOD_CONT;
+ if (ac != 2) {
+ user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
+ strtoul(av[2], NULL, 10), strtoul(av[7], NULL, 0),
+ strtoul(av[8], NULL, 0), NULL, NULL);
+ if (user) {
+ anope_ProcessUsermodes(user, 1, &av[3]);
+ }
+ } else {
+ do_nick(source, av[0], NULL, NULL, NULL, NULL,
+ strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
+ }
+ return MOD_CONT;
}
/* EVENT : CAPAB */
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;
}
/* EVENT : OS */
int anope_event_os(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_OperServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_OperServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : NS */
int anope_event_ns(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_NickServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_NickServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : MS */
int anope_event_ms(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_MemoServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_MemoServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : HS */
int anope_event_hs(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_HostServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_HostServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : CS */
int anope_event_cs(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_ChanServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_ChanServ, av[0]);
+ 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;
}
/* *INDENT-OFF* */
void moduleAddIRCDMsgs(void) {
- Message *m;
-
- updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
-
- m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
- m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
- m = createMessage("INVITE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
- m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
- m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
- m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
- m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m);
- m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
- m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
- m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
- m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
- m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
- m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
- m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
- m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
- m = createMessage("USER", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
- m = createMessage("AKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GLOBOPS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GNOTICE", anope_event_gnotice); addCoreMessage(IRCD,m);
- m = createMessage("GOPER", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("RAKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SQLINE", anope_event_sqline); addCoreMessage(IRCD,m);
- m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
- m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m);
- m = createMessage("HS", anope_event_hs); addCoreMessage(IRCD,m);
- m = createMessage("MS", anope_event_ms); addCoreMessage(IRCD,m);
- m = createMessage("NS", anope_event_ns); addCoreMessage(IRCD,m);
- m = createMessage("OS", anope_event_os); addCoreMessage(IRCD,m);
- m = createMessage("RS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SGLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
- m = createMessage("SS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m);
- m = createMessage("SZLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("UNSGLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("UNSZLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
- m = createMessage("LUSERSLOCK",anope_event_luserslock); addCoreMessage(IRCD,m);
- m = createMessage("BURST", anope_event_burst); addCoreMessage(IRCD,m);
- m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
- m = createMessage("SVHOST", anope_event_vs); addCoreMessage(IRCD,m);
- m = createMessage("ELMER", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SILLY", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SHUN", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("NORMAL", anope_event_null); addCoreMessage(IRCD,m);
+ Message *m;
+
+ updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
+
+ m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
+ m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
+ m = createMessage("INVITE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
+ m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
+ m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
+ m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
+ m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m);
+ m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
+ m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
+ m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
+ m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
+ m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
+ m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
+ m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
+ m = createMessage("USER", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
+ m = createMessage("AKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GLOBOPS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GNOTICE", anope_event_gnotice); addCoreMessage(IRCD,m);
+ m = createMessage("GOPER", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("RAKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SQLINE", anope_event_sqline); addCoreMessage(IRCD,m);
+ m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
+ m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m);
+ m = createMessage("HS", anope_event_hs); addCoreMessage(IRCD,m);
+ m = createMessage("MS", anope_event_ms); addCoreMessage(IRCD,m);
+ m = createMessage("NS", anope_event_ns); addCoreMessage(IRCD,m);
+ m = createMessage("OS", anope_event_os); addCoreMessage(IRCD,m);
+ m = createMessage("RS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SGLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
+ m = createMessage("SS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m);
+ m = createMessage("SZLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("UNSGLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("UNSZLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
+ m = createMessage("LUSERSLOCK",anope_event_luserslock); addCoreMessage(IRCD,m);
+ m = createMessage("BURST", anope_event_burst); addCoreMessage(IRCD,m);
+ m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
+ m = createMessage("SVHOST", anope_event_vs); addCoreMessage(IRCD,m);
+ m = createMessage("ELMER", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SILLY", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SHUN", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("NORMAL", anope_event_null); addCoreMessage(IRCD,m);
}
/* *INDENT-ON* */
@@ -708,50 +708,50 @@ void moduleAddIRCDMsgs(void) {
int anope_event_vs(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: SVHOST for nonexistent user %s", av[0]);
- }
- return MOD_CONT;
- }
+ u = finduser(av[0]);
+ if (!u) {
+ if (debug) {
+ alog("debug: SVHOST for nonexistent user %s", av[0]);
+ }
+ return MOD_CONT;
+ }
- u->SetDisplayedHost(av[1]);
- return MOD_CONT;
+ u->SetDisplayedHost(av[1]);
+ return MOD_CONT;
}
/* SQLINE */
void solidircd_SendSQLine(const char *mask, const char *reason)
{
- if (!mask || !reason) {
- return;
- }
+ if (!mask || !reason) {
+ return;
+ }
- send_cmd(NULL, "SQLINE %s :%s", mask, reason);
+ send_cmd(NULL, "SQLINE %s :%s", mask, reason);
}
/* UNSGLINE */
void solidircd_SendSGLineDel(const char *mask)
{
- send_cmd(NULL, "UNSGLINE 0 :%s", mask);
+ send_cmd(NULL, "UNSGLINE 0 :%s", mask);
}
/* UNSZLINE */
void solidircd_SendSZLineDel(const char *mask)
{
- send_cmd(NULL, "UNSZLINE 0 %s", mask);
+ send_cmd(NULL, "UNSZLINE 0 %s", mask);
}
/* SZLINE */
void solidircd_SendSZLine(const char *mask, const char *reason, const char *whom)
{
- send_cmd(NULL, "SZLINE %s :%s", mask, reason);
+ send_cmd(NULL, "SZLINE %s :%s", mask, reason);
}
/* SVSNOOP */
@@ -768,7 +768,7 @@ void solidircd_cmd_svsadmin(const char *server, int set)
/* SGLINE */
void solidircd_SendSGLine(const char *mask, const char *reason)
{
- send_cmd(NULL, "SGLINE %d :%s:%s", (int)strlen(mask), mask, reason);
+ send_cmd(NULL, "SGLINE %d :%s:%s", (int)strlen(mask), mask, reason);
}
/* RAKILL */
@@ -780,35 +780,35 @@ void SolidIRCdProto::SendAkillDel(const char *user, const char *host)
/* PART */
void solidircd_SendPart(const char *nick, const char *chan, const char *buf)
{
- if (!nick || !chan) {
- return;
- }
+ if (!nick || !chan) {
+ return;
+ }
- if (buf) {
- send_cmd(nick, "PART %s :%s", chan, buf);
- } else {
- send_cmd(nick, "PART %s", chan);
- }
+ if (buf) {
+ send_cmd(nick, "PART %s :%s", chan, buf);
+ } else {
+ send_cmd(nick, "PART %s", chan);
+ }
}
/* TOPIC */
void solidircd_cmd_topic(const char *whosets, const char *chan, const char *whosetit,
- const char *topic, time_t when)
+ const char *topic, time_t when)
{
- send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
- (unsigned long int) when, topic);
+ send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
+ (unsigned long int) when, topic);
}
/* UNSQLINE */
void solidircd_SendSQLineDel(const char *user)
{
- send_cmd(NULL, "UNSQLINE %s", user);
+ send_cmd(NULL, "UNSQLINE %s", user);
}
/* JOIN - SJOIN */
void solidircd_SendJoin(const char *user, const char *channel, time_t chantime)
{
- send_cmd(user, "SJOIN %ld %s", (long int) chantime, channel);
+ send_cmd(user, "SJOIN %ld %s", (long int) chantime, channel);
}
/* AKILL */
@@ -820,10 +820,10 @@ void solidircd_SendJoin(const char *user, const char *channel, time_t chantime)
* parv[6]=reason
*/
void solidircd_SendAkill(const char *user, const char *host, const char *who, time_t when,
- time_t expires, const char *reason)
+ time_t expires, const char *reason)
{
- send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", host, user, 86400 * 2, who,
- (long int) time(NULL), reason);
+ send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", host, user, 86400 * 2, who,
+ (long int) time(NULL), reason);
}
/* SVSKILL */
@@ -838,11 +838,11 @@ void solidircd_SendAkill(const char *user, const char *host, const char *who, ti
void solidircd_SendSVSKill(const char *source, const char *user, const char *buf)
{
- if (!source || !user || !buf) {
- return;
- }
+ if (!source || !user || !buf) {
+ return;
+ }
- send_cmd(source, "SVSKILL %s :%s", user, buf);
+ send_cmd(source, "SVSKILL %s :%s", user, buf);
}
/* SVSMODE */
@@ -854,492 +854,492 @@ void solidircd_SendSVSKill(const char *source, const char *user, const char *buf
*/
void solidircd_SendSVSMode(User * u, int ac, const char **av)
{
- send_cmd(ServerName, "SVSMODE %s %ld %s%s%s", u->nick,
- (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
- (ac == 2 ? av[1] : ""));
+ send_cmd(ServerName, "SVSMODE %s %ld %s%s%s", u->nick,
+ (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
+ (ac == 2 ? av[1] : ""));
}
/* SQUIT */
/*
- * parv[0] = sender prefix
- * parv[1] = server name
- * parv[2] = comment
+ * parv[0] = sender prefix
+ * parv[1] = server name
+ * parv[2] = comment
*/
void solidircd_SendSquit(const char *servname, const char *message)
{
- send_cmd(NULL, "SQUIT %s :%s", servname, message);
+ send_cmd(NULL, "SQUIT %s :%s", servname, message);
}
/* PONG */
void solidircd_SendPong(const char *servname, const char *who)
{
- send_cmd(servname, "PONG %s", who);
+ send_cmd(servname, "PONG %s", who);
}
void solidircd_cmd_burst()
{
- send_cmd(NULL, "BURST");
+ send_cmd(NULL, "BURST");
}
/*
* SVINFO
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
- * parv[4] = server's idea of UTC time
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
+ * parv[4] = server's idea of UTC time
*/
void solidircd_cmd_svinfo()
{
- send_cmd(NULL, "SVINFO 5 3 0 :%ld", (long int) time(NULL));
+ send_cmd(NULL, "SVINFO 5 3 0 :%ld", (long int) time(NULL));
}
/* PASS */
void solidircd_cmd_pass(const char *pass)
{
- send_cmd(NULL, "PASS %s :TS", pass);
+ send_cmd(NULL, "PASS %s :TS", pass);
}
/* SERVER */
void solidircd_SendServer(const char *servname, int hop, const char *descript)
{
- send_cmd(NULL, "SERVER %s %d :%s", servname, hop, ServerDesc);
+ send_cmd(NULL, "SERVER %s %d :%s", servname, hop, ServerDesc);
}
/* CAPAB */
void solidircd_cmd_capab()
{
- /* CAPAB SSJOIN NOQUIT BURST UNCONNECT ZIP NICKIP TSMODE */
- send_cmd(NULL, "CAPAB SSJOIN NOQUIT BURST UNCONNECT NICKIP TSMODE");
+ /* CAPAB SSJOIN NOQUIT BURST UNCONNECT ZIP NICKIP TSMODE */
+ send_cmd(NULL, "CAPAB SSJOIN NOQUIT BURST UNCONNECT NICKIP TSMODE");
}
void solidircd_SendConnect(int servernum)
{
- me_server =
- new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
+ me_server =
+ new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
- if (servernum == 1) {
- solidircd_cmd_pass(RemotePassword);
- } else if (servernum == 2) {
- solidircd_cmd_pass(RemotePassword2);
- } else if (servernum == 3) {
- solidircd_cmd_pass(RemotePassword3);
- }
- solidircd_cmd_capab();
- solidircd_SendServer(ServerName, 1, ServerDesc);
- solidircd_cmd_svinfo();
- solidircd_cmd_burst();
+ if (servernum == 1) {
+ solidircd_cmd_pass(RemotePassword);
+ } else if (servernum == 2) {
+ solidircd_cmd_pass(RemotePassword2);
+ } else if (servernum == 3) {
+ solidircd_cmd_pass(RemotePassword3);
+ }
+ solidircd_cmd_capab();
+ solidircd_SendServer(ServerName, 1, ServerDesc);
+ solidircd_cmd_svinfo();
+ solidircd_cmd_burst();
}
/* EVENT : SERVER */
int anope_event_server(const char *source, int ac, const char **av)
{
- char *uplink;
+ char *uplink;
- if (!stricmp(av[1], "1")) {
- uplink = sstrdup(av[0]);
- }
+ if (!stricmp(av[1], "1")) {
+ uplink = sstrdup(av[0]);
+ }
- do_server(source, av[0], av[1], av[2], NULL);
- return MOD_CONT;
+ do_server(source, av[0], av[1], av[2], NULL);
+ return MOD_CONT;
}
/* EVENT : PRIVMSG */
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;
}
/* EVENT : SVINFO */
/*
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
- * parv[4] = server's idea of UTC time
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
+ * parv[4] = server's idea of UTC time
*/
int anope_event_svinfo(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ 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_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;
}
/* EVENT: MODE */
int anope_event_mode(const char *source, int ac, const char **av)
{
- if (ac < 2)
- 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;
+ if (*av[0] == '#' || *av[0] == '&') {
+ do_cmode(source, ac, av);
+ } else {
+ do_umode(source, ac, av);
+ }
+ return MOD_CONT;
}
/* EVENT: KILL */
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;
}
/* EVENT: KICK */
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;
}
/* EVENT: JOIN */
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;
}
/* EVENT: MOTD */
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;
}
void solidircd_SendNoticeChanops(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
- send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
+ if (!buf) {
+ return;
+ }
+ send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
}
/* NOTICE */
void solidircd_cmd_notice(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (NSDefFlags & NI_MSG) {
- solidircd_cmd_privmsg2(source, dest, buf);
- } else {
- send_cmd(source, "NOTICE %s :%s", dest, buf);
- }
+ if (NSDefFlags & NI_MSG) {
+ solidircd_cmd_privmsg2(source, dest, buf);
+ } else {
+ send_cmd(source, "NOTICE %s :%s", dest, buf);
+ }
}
void solidircd_cmd_notice2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE %s :%s", dest, msg);
+ send_cmd(source, "NOTICE %s :%s", dest, msg);
}
void solidircd_cmd_privmsg(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source, "PRIVMSG %s :%s", dest, buf);
+ send_cmd(source, "PRIVMSG %s :%s", dest, buf);
}
void solidircd_cmd_privmsg2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG %s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG %s :%s", dest, msg);
}
void solidircd_SendGlobalNotice(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE $%s :%s", dest, msg);
+ send_cmd(source, "NOTICE $%s :%s", dest, msg);
}
void solidircd_SendGlobalPrivmsg(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
}
/* GLOBOPS */
void solidircd_SendGlobops(const char *source, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
+ send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
}
/* 391 */
void solidircd_cmd_391(const char *source, const char *timestr)
{
- if (!timestr) {
- return;
- }
- send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
+ if (!timestr) {
+ return;
+ }
+ send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
}
/* 250 */
void solidircd_cmd_250(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "250 %s", buf);
+ send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void solidircd_cmd_307(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "307 %s", buf);
+ send_cmd(ServerName, "307 %s", buf);
}
/* 311 */
void solidircd_cmd_311(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "311 %s", buf);
+ send_cmd(ServerName, "311 %s", buf);
}
/* 312 */
void solidircd_cmd_312(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "312 %s", buf);
+ send_cmd(ServerName, "312 %s", buf);
}
/* 317 */
void solidircd_cmd_317(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "317 %s", buf);
+ send_cmd(ServerName, "317 %s", buf);
}
/* 219 */
void solidircd_cmd_219(const char *source, const char *letter)
{
- if (!source) {
- return;
- }
+ if (!source) {
+ return;
+ }
- if (letter) {
- send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
- *letter);
- } else {
- send_cmd(NULL, "219 %s l :End of /STATS report.", source);
- }
+ if (letter) {
+ send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
+ *letter);
+ } else {
+ send_cmd(NULL, "219 %s l :End of /STATS report.", source);
+ }
}
/* 401 */
void solidircd_cmd_401(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
- send_cmd(ServerName, "401 %s %s :No such service.", source, who);
+ if (!source || !who) {
+ return;
+ }
+ send_cmd(ServerName, "401 %s %s :No such service.", source, who);
}
/* 318 */
void solidircd_cmd_318(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
+ if (!source || !who) {
+ return;
+ }
- send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
+ send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void solidircd_cmd_242(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "242 %s", buf);
+ send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void solidircd_cmd_243(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "243 %s", buf);
+ send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void solidircd_cmd_211(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "211 %s", buf);
+ send_cmd(NULL, "211 %s", buf);
}
void solidircd_cmd_nick(const char *nick, const char *name, const char *modes)
{
- EnforceQlinedNick(nick, NULL);
- send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
- (long int) time(NULL), modes, ServiceUser, ServiceHost,
- ServerName, name);
- solidircd_SendSQLine(nick, "Reserved for services");
+ EnforceQlinedNick(nick, NULL);
+ send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
+ (long int) time(NULL), modes, ServiceUser, ServiceHost,
+ ServerName, name);
+ solidircd_SendSQLine(nick, "Reserved for services");
}
void solidircd_SendKick(const char *source, const char *chan, const char *user, const char *buf)
{
- if (buf) {
- send_cmd(source, "KICK %s %s :%s", chan, user, buf);
- } else {
- send_cmd(source, "KICK %s %s", chan, user);
- }
+ if (buf) {
+ send_cmd(source, "KICK %s %s :%s", chan, user, buf);
+ } else {
+ send_cmd(source, "KICK %s %s", chan, user);
+ }
}
void solidircd_cmd_372(const char *source, const char *msg)
{
- send_cmd(ServerName, "372 %s :- %s", source, msg);
+ send_cmd(ServerName, "372 %s :- %s", source, msg);
}
void solidircd_cmd_372_error(const char *source)
{
- send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
- "contact your IRC administrator.", source);
+ send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
+ "contact your IRC administrator.", source);
}
void solidircd_cmd_375(const char *source)
{
- send_cmd(ServerName, "375 %s :- %s Message of the Day",
- source, ServerName);
+ send_cmd(ServerName, "375 %s :- %s Message of the Day",
+ source, ServerName);
}
void solidircd_cmd_376(const char *source)
{
- send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
+ send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
}
/* INVITE */
void solidircd_SendInvite(const char *source, const char *chan, const char *nick)
{
- if (!source || !chan || !nick) {
- return;
- }
+ if (!source || !chan || !nick) {
+ return;
+ }
- send_cmd(source, "INVITE %s %s", nick, chan);
+ send_cmd(source, "INVITE %s %s", nick, chan);
}
/* QUIT */
void solidircd_SendQuit(const char *source, const char *buf)
{
- if (buf) {
- send_cmd(source, "QUIT :%s", buf);
- } else {
- send_cmd(source, "QUIT");
- }
+ if (buf) {
+ send_cmd(source, "QUIT :%s", buf);
+ } else {
+ send_cmd(source, "QUIT");
+ }
}
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;
}
int anope_event_ping(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- solidircd_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ solidircd_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
+ return MOD_CONT;
}
void solidircd_cmd_351(const char *source)
{
- send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s)-- %s",
- source, version_number, ServerName, ircd->name, version_flags,
- EncModule, version_build);
+ send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s)-- %s",
+ source, version_number, ServerName, ircd->name, version_flags,
+ EncModule, version_build);
}
void solidircd_SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real,
- const char *modes)
+ const char *modes)
{
- EnforceQlinedNick(nick, s_BotServ);
- send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
- (long int) time(NULL), modes, user, host, ServerName, real);
- solidircd_SendSQLine(nick, "Reserved for services");
+ EnforceQlinedNick(nick, s_BotServ);
+ send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
+ (long int) time(NULL), modes, user, host, ServerName, real);
+ solidircd_SendSQLine(nick, "Reserved for services");
}
/* SVSNICK */
@@ -1350,51 +1350,51 @@ void solidircd_SendClientIntroduction(const char *nick, const char *user, const
*/
void solidircd_SendForceNickChange(const char *source, const char *guest, time_t when)
{
- if (!source || !guest) {
- return;
- }
- send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
+ if (!source || !guest) {
+ return;
+ }
+ send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
}
void solidircd_SendGuestNick(const char *nick, const char *user, const char *host,
- const char *real, const char *modes)
+ const char *real, const char *modes)
{
- send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
- (long int) time(NULL), modes, user, host, ServerName, real);
+ send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
+ (long int) time(NULL), modes, user, host, ServerName, real);
}
void solidircd_SendSVSO(const char *source, const char *nick, const char *flag)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
void solidircd_cmd_chghost(const char *nick, const char *vhost)
{
- if (!nick || !vhost) {
- return;
- }
- send_cmd(ServerName, "SVHOST %s %s", nick, vhost);
+ if (!nick || !vhost) {
+ return;
+ }
+ send_cmd(ServerName, "SVHOST %s %s", nick, vhost);
}
void solidircd_SendVhost(const char *nick, const char *vIdent, const char *vhost)
{
- send_cmd(s_HostServ, "SVSMODE %s +v", nick);
- solidircd_cmd_chghost(nick, vhost);
+ send_cmd(s_HostServ, "SVSMODE %s +v", nick);
+ solidircd_cmd_chghost(nick, vhost);
}
void solidircd_SendVhostDel(User * u)
{
- send_cmd(s_HostServ, "SVSMODE %s -v", u->nick);
- notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick, ircd->vhostchar);
+ send_cmd(s_HostServ, "SVSMODE %s -v", u->nick);
+ notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick, ircd->vhostchar);
}
/* SVSMODE +d */
/* sent if svid is something weird */
void solidircd_SendSVID(const char *nick, time_t ts)
{
- send_cmd(ServerName, "SVSMODE %s %lu +d 1", nick,
- (unsigned long int) ts);
+ send_cmd(ServerName, "SVSMODE %s %lu +d 1", nick,
+ (unsigned long int) ts);
}
@@ -1402,155 +1402,155 @@ void solidircd_SendSVID(const char *nick, time_t ts)
/* nc_change was = 1, and there is no na->status */
void solidircd_SendUnregisteredNick(User * u)
{
- common_svsmode(u, "+d", "1");
+ common_svsmode(u, "+d", "1");
}
/* SVSMODE +d */
void solidircd_SendSVID2(User * u, const char *ts)
{
- /* not used by bahamut ircds */
+ /* not used by bahamut ircds */
}
void solidircd_SendSVID3(User * u, const char *ts)
{
- if (u->svid != u->timestamp) {
- common_svsmode(u, "+rd", ts);
- } else {
- common_svsmode(u, "+r", NULL);
- }
+ if (u->svid != u->timestamp) {
+ common_svsmode(u, "+rd", ts);
+ } else {
+ common_svsmode(u, "+r", NULL);
+ }
}
/* NICK <newnick> */
void solidircd_SendChangeBotNick(const char *oldnick, const char *newnick)
{
- if (!oldnick || !newnick) {
- return;
- }
+ if (!oldnick || !newnick) {
+ return;
+ }
- send_cmd(oldnick, "NICK %s :%ld", newnick, (long int) time(NULL));
+ send_cmd(oldnick, "NICK %s :%ld", newnick, (long int) time(NULL));
}
int anope_event_error(const char *source, int ac, const char **av)
{
- if (ac >= 1) {
- if (debug) {
- alog("debug: %s", av[0]);
- }
- }
- return MOD_CONT;
+ if (ac >= 1) {
+ if (debug) {
+ alog("debug: %s", av[0]);
+ }
+ }
+ return MOD_CONT;
}
int anope_event_notice(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_sqline(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_gnotice(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_pass(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
void solidircd_SendSVSJoin(const char *source, const char *nick, const char *chan, const char *param)
{
- /* Can not find any reference to these in Bahamut */
+ /* Can not find any reference to these in Bahamut */
}
void solidircd_SendSVSPart(const char *source, const char *nick, const char *chan)
{
- /* Can not find any reference to these in Bahamut */
+ /* Can not find any reference to these in Bahamut */
}
void solidircd_SendSWhois(const char *source, const char *who, const char *mask)
{
- /* not supported */
+ /* not supported */
}
void solidircd_SendEOB()
{
- send_cmd(NULL, "BURST 0");
+ send_cmd(NULL, "BURST 0");
}
int anope_event_burst(const char *source, int ac, const char **av)
{
- Server *s;
- s = findserver(servlist, source);
- if (!ac) {
- /* for future use - start burst */
- } else {
- /* 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 (!ac) {
+ /* for future use - start burst */
+ } else {
+ /* 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_luserslock(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_rehash(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_credits(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_admin(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int solidircd_IsFloodModeParamValid(const char *value)
{
- char *dp, *end;
+ char *dp, *end;
- if (value && *value != ':'
- && (strtoul((*value == '*' ? value + 1 : value), &dp, 10) > 0)
- && (*dp == ':') && (*(++dp) != 0) && (strtoul(dp, &end, 10) > 0)
- && (*end == 0)) {
- return 1;
- } else {
- return 0;
- }
+ if (value && *value != ':'
+ && (strtoul((*value == '*' ? value + 1 : value), &dp, 10) > 0)
+ && (*dp == ':') && (*(++dp) != 0) && (strtoul(dp, &end, 10) > 0)
+ && (*end == 0)) {
+ return 1;
+ } else {
+ return 0;
+ }
}
void solidircd_SendJupe(const char *jserver, const char *who, const char *reason)
{
- char rbuf[256];
+ char rbuf[256];
- snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
- reason ? ": " : "", reason ? reason : "");
+ snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
+ reason ? ": " : "", reason ? reason : "");
- if (findserver(servlist, jserver))
- solidircd_SendSquit(jserver, rbuf);
- solidircd_SendServer(jserver, 2, rbuf);
- new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
+ if (findserver(servlist, jserver))
+ solidircd_SendSquit(jserver, rbuf);
+ solidircd_SendServer(jserver, 2, rbuf);
+ new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
}
/* GLOBOPS - to handle old WALLOPS */
void solidircd_SendGlobops_legacy(const char *source, const char *fmt)
{
- send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
+ send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
/*
@@ -1559,8 +1559,8 @@ void solidircd_SendGlobops_legacy(const char *source, const char *fmt)
*/
int solidircd_IsNickValid(const char *nick)
{
- /* no hard coded invalid nicks */
- return 1;
+ /* no hard coded invalid nicks */
+ return 1;
}
/*
@@ -1569,23 +1569,23 @@ int solidircd_IsNickValid(const char *nick)
*/
int solidircd_IsChannelValid(const char *chan)
{
- /* no hard coded invalid chan*/
- return 1;
+ /* no hard coded invalid chan*/
+ return 1;
}
void solidircd_SendCTCP(const char *source, const char *dest, const char *buf)
{
- char *s;
+ char *s;
- if (!buf) {
- return;
- } else {
- s = normalizeBuffer(buf);
- }
+ if (!buf) {
+ return;
+ } else {
+ s = normalizeBuffer(buf);
+ }
- send_cmd(source, "%s NOTICE :\1%s \1", dest, s);
- free(s);
+ send_cmd(source, "%s NOTICE :\1%s \1", dest, s);
+ free(s);
}
@@ -1595,78 +1595,78 @@ void solidircd_SendCTCP(const char *source, const char *dest, const char *buf)
**/
void moduleAddAnopeCmds()
{
- pmodule_cmd_topic(solidircd_cmd_topic);
- pmodule_SendVhostDel(solidircd_cmd_vhost_off);
- pmodule_SendAkill(solidircd_cmd_akill);
- pmodule_SendSVSKill(solidircd_SendSVSKill);
- pmodule_SendSVSMode(solidircd_cmd_svsmode);
- pmodule_cmd_372(solidircd_cmd_372);
- pmodule_cmd_372_error(solidircd_cmd_372_error);
- pmodule_cmd_375(solidircd_cmd_375);
- pmodule_cmd_376(solidircd_cmd_376);
- pmodule_cmd_nick(solidircd_cmd_nick);
- pmodule_SendGuestNick(solidircd_cmd_guest_nick);
- pmodule_SendMode(solidircd_cmd_mode);
- pmodule_SendClientIntroduction(solidircd_cmd_bot_nick);
- pmodule_SendKick(solidircd_cmd_kick);
- pmodule_SendNoticeChanops(solidircd_cmd_notice_ops);
- pmodule_cmd_notice(solidircd_cmd_notice);
- pmodule_cmd_notice2(solidircd_cmd_notice2);
- pmodule_cmd_privmsg(solidircd_cmd_privmsg);
- pmodule_cmd_privmsg2(solidircd_cmd_privmsg2);
- pmodule_SendGlobalNotice(solidircd_cmd_serv_notice);
- pmodule_SendGlobalPrivmsg(solidircd_cmd_serv_privmsg);
- pmodule_SendBotOp(solidircd_cmd_bot_chan_mode);
- pmodule_cmd_351(solidircd_cmd_351);
- pmodule_SendQuit(solidircd_cmd_quit);
- pmodule_SendPong(solidircd_cmd_pong);
- pmodule_SendJoin(solidircd_cmd_join);
- pmodule_SendSQLineDel(solidircd_cmd_unsqline);
- pmodule_SendInvite(solidircd_cmd_invite);
- pmodule_SendPart(solidircd_cmd_part);
- pmodule_cmd_391(solidircd_cmd_391);
- pmodule_cmd_250(solidircd_cmd_250);
- pmodule_cmd_307(solidircd_cmd_307);
- pmodule_cmd_311(solidircd_cmd_311);
- pmodule_cmd_312(solidircd_cmd_312);
- pmodule_cmd_317(solidircd_cmd_317);
- pmodule_cmd_219(solidircd_cmd_219);
- pmodule_cmd_401(solidircd_cmd_401);
- pmodule_cmd_318(solidircd_cmd_318);
- pmodule_cmd_242(solidircd_cmd_242);
- pmodule_cmd_243(solidircd_cmd_243);
- pmodule_cmd_211(solidircd_cmd_211);
- pmodule_SendGlobops(solidircd_cmd_global);
- pmodule_SendGlobops_legacy(solidircd_cmd_global_legacy);
- pmodule_SendSQLine(solidircd_cmd_sqline);
- pmodule_SendSquit(solidircd_cmd_squit);
- pmodule_SendSVSO(solidircd_cmd_svso);
- pmodule_SendChangeBotNick(solidircd_cmd_chg_nick);
- pmodule_SendForceNickChange(solidircd_cmd_svsnick);
- pmodule_SendVhost(solidircd_cmd_vhost_on);
- pmodule_SendConnect(solidircd_cmd_connect);
- pmodule_SendSVSHOLD(solidircd_cmd_svshold);
- pmodule_SendSVSHOLDDel(solidircd_cmd_release_svshold);
- pmodule_SendSGLineDel(solidircd_cmd_unsgline);
- pmodule_SendSZLineDel(solidircd_cmd_unszline);
- pmodule_SendSZLine(solidircd_cmd_szline);
- pmodule_SendSGLine(solidircd_cmd_sgline);
- pmodule_SendBanDel(solidircd_cmd_unban);
- pmodule_SendSVSMode_chan(solidircd_cmd_svsmode_chan);
- pmodule_SendSVID(solidircd_cmd_svid_umode);
- pmodule_SendUnregisteredNick(solidircd_cmd_nc_change);
- pmodule_SendSVID2(solidircd_cmd_svid_umode2);
- pmodule_SendSVID3(solidircd_cmd_svid_umode3);
- pmodule_SendSVSJoin(solidircd_cmd_svsjoin);
- pmodule_SendSVSPart(solidircd_cmd_svspart);
- pmodule_SendSWhois(solidircd_cmd_swhois);
- pmodule_SendEOB(solidircd_cmd_eob);
- pmodule_IsFloodModeParamValid(solidircd_flood_mode_check);
- pmodule_SendJupe(solidircd_cmd_jupe);
- pmodule_IsNickValid(solidircd_valid_nick);
- pmodule_IsChannelValid(solidircd_valid_chan);
- pmodule_SendCTCP(solidircd_cmd_ctcp);
- pmodule_ProcessUsermodes(solidircd_set_umode);
+ pmodule_cmd_topic(solidircd_cmd_topic);
+ pmodule_SendVhostDel(solidircd_cmd_vhost_off);
+ pmodule_SendAkill(solidircd_cmd_akill);
+ pmodule_SendSVSKill(solidircd_SendSVSKill);
+ pmodule_SendSVSMode(solidircd_cmd_svsmode);
+ pmodule_cmd_372(solidircd_cmd_372);
+ pmodule_cmd_372_error(solidircd_cmd_372_error);
+ pmodule_cmd_375(solidircd_cmd_375);
+ pmodule_cmd_376(solidircd_cmd_376);
+ pmodule_cmd_nick(solidircd_cmd_nick);
+ pmodule_SendGuestNick(solidircd_cmd_guest_nick);
+ pmodule_SendMode(solidircd_cmd_mode);
+ pmodule_SendClientIntroduction(solidircd_cmd_bot_nick);
+ pmodule_SendKick(solidircd_cmd_kick);
+ pmodule_SendNoticeChanops(solidircd_cmd_notice_ops);
+ pmodule_cmd_notice(solidircd_cmd_notice);
+ pmodule_cmd_notice2(solidircd_cmd_notice2);
+ pmodule_cmd_privmsg(solidircd_cmd_privmsg);
+ pmodule_cmd_privmsg2(solidircd_cmd_privmsg2);
+ pmodule_SendGlobalNotice(solidircd_cmd_serv_notice);
+ pmodule_SendGlobalPrivmsg(solidircd_cmd_serv_privmsg);
+ pmodule_SendBotOp(solidircd_cmd_bot_chan_mode);
+ pmodule_cmd_351(solidircd_cmd_351);
+ pmodule_SendQuit(solidircd_cmd_quit);
+ pmodule_SendPong(solidircd_cmd_pong);
+ pmodule_SendJoin(solidircd_cmd_join);
+ pmodule_SendSQLineDel(solidircd_cmd_unsqline);
+ pmodule_SendInvite(solidircd_cmd_invite);
+ pmodule_SendPart(solidircd_cmd_part);
+ pmodule_cmd_391(solidircd_cmd_391);
+ pmodule_cmd_250(solidircd_cmd_250);
+ pmodule_cmd_307(solidircd_cmd_307);
+ pmodule_cmd_311(solidircd_cmd_311);
+ pmodule_cmd_312(solidircd_cmd_312);
+ pmodule_cmd_317(solidircd_cmd_317);
+ pmodule_cmd_219(solidircd_cmd_219);
+ pmodule_cmd_401(solidircd_cmd_401);
+ pmodule_cmd_318(solidircd_cmd_318);
+ pmodule_cmd_242(solidircd_cmd_242);
+ pmodule_cmd_243(solidircd_cmd_243);
+ pmodule_cmd_211(solidircd_cmd_211);
+ pmodule_SendGlobops(solidircd_cmd_global);
+ pmodule_SendGlobops_legacy(solidircd_cmd_global_legacy);
+ pmodule_SendSQLine(solidircd_cmd_sqline);
+ pmodule_SendSquit(solidircd_cmd_squit);
+ pmodule_SendSVSO(solidircd_cmd_svso);
+ pmodule_SendChangeBotNick(solidircd_cmd_chg_nick);
+ pmodule_SendForceNickChange(solidircd_cmd_svsnick);
+ pmodule_SendVhost(solidircd_cmd_vhost_on);
+ pmodule_SendConnect(solidircd_cmd_connect);
+ pmodule_SendSVSHOLD(solidircd_cmd_svshold);
+ pmodule_SendSVSHOLDDel(solidircd_cmd_release_svshold);
+ pmodule_SendSGLineDel(solidircd_cmd_unsgline);
+ pmodule_SendSZLineDel(solidircd_cmd_unszline);
+ pmodule_SendSZLine(solidircd_cmd_szline);
+ pmodule_SendSGLine(solidircd_cmd_sgline);
+ pmodule_SendBanDel(solidircd_cmd_unban);
+ pmodule_SendSVSMode_chan(solidircd_cmd_svsmode_chan);
+ pmodule_SendSVID(solidircd_cmd_svid_umode);
+ pmodule_SendUnregisteredNick(solidircd_cmd_nc_change);
+ pmodule_SendSVID2(solidircd_cmd_svid_umode2);
+ pmodule_SendSVID3(solidircd_cmd_svid_umode3);
+ pmodule_SendSVSJoin(solidircd_cmd_svsjoin);
+ pmodule_SendSVSPart(solidircd_cmd_svspart);
+ pmodule_SendSWhois(solidircd_cmd_swhois);
+ pmodule_SendEOB(solidircd_cmd_eob);
+ pmodule_IsFloodModeParamValid(solidircd_flood_mode_check);
+ pmodule_SendJupe(solidircd_cmd_jupe);
+ pmodule_IsNickValid(solidircd_valid_nick);
+ pmodule_IsChannelValid(solidircd_valid_chan);
+ pmodule_SendCTCP(solidircd_cmd_ctcp);
+ pmodule_ProcessUsermodes(solidircd_set_umode);
}
/**
@@ -1675,35 +1675,35 @@ void moduleAddAnopeCmds()
int AnopeInit(int argc, char **argv)
{
- this->SetAuthor("Anope");
- this->SetVersion
- ("$Id$");
- this->SetType(PROTOCOL);
-
- pmodule_ircd_version("Solid-IRCd 3.4.*");
- pmodule_ircd_cap(myIrcdcap);
- pmodule_ircd_var(myIrcd);
- pmodule_ircd_cbmodeinfos(myCbmodeinfos);
- pmodule_ircd_cumodes(myCumodes);
- pmodule_ircd_flood_mode_char_set("+j");
- pmodule_ircd_flood_mode_char_remove("-j");
- pmodule_ircd_cbmodes(myCbmodes);
- pmodule_ircd_cmmodes(myCmmodes);
- pmodule_ircd_csmodes(myCsmodes);
- pmodule_ircd_useTSMode(0);
-
- /** Deal with modes anope _needs_ to know **/
- pmodule_invis_umode(UMODE_i);
- pmodule_oper_umode(UMODE_o);
- pmodule_invite_cmode(CMODE_i);
- pmodule_secret_cmode(CMODE_s);
- pmodule_private_cmode(CMODE_p);
- pmodule_key_mode(CMODE_k);
- pmodule_limit_mode(CMODE_l);
-
- moduleAddAnopeCmds();
+ this->SetAuthor("Anope");
+ this->SetVersion
+ ("$Id$");
+ this->SetType(PROTOCOL);
+
+ pmodule_ircd_version("Solid-IRCd 3.4.*");
+ pmodule_ircd_cap(myIrcdcap);
+ pmodule_ircd_var(myIrcd);
+ pmodule_ircd_cbmodeinfos(myCbmodeinfos);
+ pmodule_ircd_cumodes(myCumodes);
+ pmodule_ircd_flood_mode_char_set("+j");
+ pmodule_ircd_flood_mode_char_remove("-j");
+ pmodule_ircd_cbmodes(myCbmodes);
+ pmodule_ircd_cmmodes(myCmmodes);
+ pmodule_ircd_csmodes(myCsmodes);
+ pmodule_ircd_useTSMode(0);
+
+ /** Deal with modes anope _needs_ to know **/
+ pmodule_invis_umode(UMODE_i);
+ pmodule_oper_umode(UMODE_o);
+ pmodule_invite_cmode(CMODE_i);
+ pmodule_secret_cmode(CMODE_s);
+ pmodule_private_cmode(CMODE_p);
+ pmodule_key_mode(CMODE_k);
+ pmodule_limit_mode(CMODE_l);
+
+ moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
- moduleAddIRCDMsgs();
+ moduleAddIRCDMsgs();
- return MOD_CONT;
+ return MOD_CONT;
}
diff --git a/src/protocol/obsolete/solidircd.h b/src/protocol/obsolete/solidircd.h
index 23812ffc1..0644d17c2 100644
--- a/src/protocol/obsolete/solidircd.h
+++ b/src/protocol/obsolete/solidircd.h
@@ -56,10 +56,10 @@
#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_S 0x00002000 /* SSL only */
-#define CMODE_N 0x00004000 /* No Nickname change */
+#define CMODE_M 0x00000800 /* Non-regged nicks can't send messages */
+#define CMODE_j 0x00001000 /* join throttle */
+#define CMODE_S 0x00002000 /* SSL only */
+#define CMODE_N 0x00004000 /* No Nickname change */
#define CMODE_O 0x00008000 /* Only opers can join */
diff --git a/src/protocol/obsolete/ultimate3.c b/src/protocol/obsolete/ultimate3.c
index 7201096b7..92b83d7ab 100644
--- a/src/protocol/obsolete/ultimate3.c
+++ b/src/protocol/obsolete/ultimate3.c
@@ -16,468 +16,468 @@
#include "ultimate3.h"
IRCDVar myIrcd[] = {
- {"UltimateIRCd 3.0.*", /* ircd name */
- "+S", /* nickserv mode */
- "+S", /* chanserv mode */
- "+S", /* memoserv mode */
- "+o", /* hostserv mode */
- "+iS", /* operserv mode */
- "+S", /* botserv mode */
- "+Sh", /* helpserv mode */
- "+iS", /* Dev/Null mode */
- "+iS", /* Global mode */
- "+o", /* nickserv alias mode */
- "+o", /* chanserv alias mode */
- "+o", /* memoserv alias mode */
- "+io", /* hostserv alias mode */
- "+io", /* operserv alias mode */
- "+o", /* botserv alias mode */
- "+h", /* helpserv alias mode */
- "+i", /* Dev/Null alias mode */
- "+io", /* Global alias mode */
- "+S", /* Used by BotServ Bots */
- 5, /* Chan Max Symbols */
- "-ilmnpqstRKAO", /* Modes to Remove */
- "+o", /* Channel Umode used by Botserv bots */
- 1, /* SVSNICK */
- 1, /* Vhost */
- 0, /* Has Owner */
- NULL, /* Mode to set for an owner */
- NULL, /* 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 */
- "+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 */
- 0, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- UMODE_p, /* Protected Umode */
- 1, /* Has Admin */
- 1, /* Chan SQlines */
- 0, /* Quit on Kill */
- 1, /* SVSMODE unban */
- 0, /* Has Protect */
- 0, /* Reverse */
- 1, /* Chan Reg */
- CMODE_r, /* Channel Mode */
- 0, /* vidents */
- 0, /* svshold */
- 1, /* time stamp on mode */
- 1, /* NICKIP */
- 0, /* O:LINE */
- 1, /* UMODE */
- 1, /* VHOST ON NICK */
- 0, /* Change RealName */
- CMODE_K, /* No Knock */
- CMODE_A, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- UMODE_x, /* Vhost Mode */
- 0, /* +f */
- 0, /* +L */
- 0, /* +f Mode */
- 0, /* +L Mode */
- 1, /* On nick change check if they could be identified */
- 1, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support TOKENS */
- 1, /* TOKENS are CASE inSensitive */
- 0, /* TIME STAMPS are BASE64 */
- 0, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* Can remove User Channel Modes with SVSMODE */
- 1, /* Sglines are enforced */
- "x", /* vhost char */
- 0, /* ts6 */
- 1, /* support helper umode */
- 0, /* p10 */
- NULL, /* character set */
- 1, /* reports sync state */
- 0, /* CIDR channelbans */
- }
- ,
- {NULL}
+ {"UltimateIRCd 3.0.*", /* ircd name */
+ "+S", /* nickserv mode */
+ "+S", /* chanserv mode */
+ "+S", /* memoserv mode */
+ "+o", /* hostserv mode */
+ "+iS", /* operserv mode */
+ "+S", /* botserv mode */
+ "+Sh", /* helpserv mode */
+ "+iS", /* Dev/Null mode */
+ "+iS", /* Global mode */
+ "+o", /* nickserv alias mode */
+ "+o", /* chanserv alias mode */
+ "+o", /* memoserv alias mode */
+ "+io", /* hostserv alias mode */
+ "+io", /* operserv alias mode */
+ "+o", /* botserv alias mode */
+ "+h", /* helpserv alias mode */
+ "+i", /* Dev/Null alias mode */
+ "+io", /* Global alias mode */
+ "+S", /* Used by BotServ Bots */
+ 5, /* Chan Max Symbols */
+ "-ilmnpqstRKAO", /* Modes to Remove */
+ "+o", /* Channel Umode used by Botserv bots */
+ 1, /* SVSNICK */
+ 1, /* Vhost */
+ 0, /* Has Owner */
+ NULL, /* Mode to set for an owner */
+ NULL, /* 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 */
+ "+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 */
+ 0, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ UMODE_p, /* Protected Umode */
+ 1, /* Has Admin */
+ 1, /* Chan SQlines */
+ 0, /* Quit on Kill */
+ 1, /* SVSMODE unban */
+ 0, /* Has Protect */
+ 0, /* Reverse */
+ 1, /* Chan Reg */
+ CMODE_r, /* Channel Mode */
+ 0, /* vidents */
+ 0, /* svshold */
+ 1, /* time stamp on mode */
+ 1, /* NICKIP */
+ 0, /* O:LINE */
+ 1, /* UMODE */
+ 1, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ CMODE_K, /* No Knock */
+ CMODE_A, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ UMODE_x, /* Vhost Mode */
+ 0, /* +f */
+ 0, /* +L */
+ 0, /* +f Mode */
+ 0, /* +L Mode */
+ 1, /* On nick change check if they could be identified */
+ 1, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support TOKENS */
+ 1, /* TOKENS are CASE inSensitive */
+ 0, /* TIME STAMPS are BASE64 */
+ 0, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* Can remove User Channel Modes with SVSMODE */
+ 1, /* Sglines are enforced */
+ "x", /* vhost char */
+ 0, /* ts6 */
+ 1, /* support helper umode */
+ 0, /* p10 */
+ NULL, /* character set */
+ 1, /* reports sync state */
+ 0, /* CIDR channelbans */
+ }
+ ,
+ {NULL}
};
IRCDCAPAB myIrcdcap[] = {
- {
- CAPAB_NOQUIT, /* NOQUIT */
- CAPAB_TSMODE, /* TSMODE */
- CAPAB_UNCONNECT, /* UNCONNECT */
- 0, /* NICKIP */
- CAPAB_NSJOIN, /* SJOIN */
- CAPAB_ZIP, /* ZIP */
- CAPAB_BURST, /* BURST */
- CAPAB_TS5, /* TS5 */
- 0, /* TS3 */
- CAPAB_DKEY, /* DKEY */
- 0, /* PT4 */
- 0, /* SCS */
- 0, /* QS */
- 0, /* UID */
- 0, /* KNOCK */
- CAPAB_CLIENT, /* CLIENT */
- CAPAB_IPV6, /* IPV6 */
- CAPAB_SSJ5, /* SSJ5 */
- 0, /* SN2 */
- 0, /* TOKEN */
- 0, /* VHOST */
- 0, /* SSJ3 */
- 0, /* NICK2 */
- 0, /* UMODE2 */
- 0, /* VL */
- 0, /* TLKEXT */
- CAPAB_DODKEY, /* DODKEY */
- CAPAB_DOZIP, /* DOZIP */
- 0, 0, 0}
+ {
+ CAPAB_NOQUIT, /* NOQUIT */
+ CAPAB_TSMODE, /* TSMODE */
+ CAPAB_UNCONNECT, /* UNCONNECT */
+ 0, /* NICKIP */
+ CAPAB_NSJOIN, /* SJOIN */
+ CAPAB_ZIP, /* ZIP */
+ CAPAB_BURST, /* BURST */
+ CAPAB_TS5, /* TS5 */
+ 0, /* TS3 */
+ CAPAB_DKEY, /* DKEY */
+ 0, /* PT4 */
+ 0, /* SCS */
+ 0, /* QS */
+ 0, /* UID */
+ 0, /* KNOCK */
+ CAPAB_CLIENT, /* CLIENT */
+ CAPAB_IPV6, /* IPV6 */
+ CAPAB_SSJ5, /* SSJ5 */
+ 0, /* SN2 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ 0, /* SSJ3 */
+ 0, /* NICK2 */
+ 0, /* UMODE2 */
+ 0, /* VL */
+ 0, /* TLKEXT */
+ CAPAB_DODKEY, /* DODKEY */
+ CAPAB_DOZIP, /* DOZIP */
+ 0, 0, 0}
};
void ultimate3_ProcessUsermodes(User * user, int ac, const char **av)
{
- int add = 1; /* 1 if adding modes, 0 if deleting */
- const char *modes = av[0];
-
- ac--;
-
- if (debug)
- alog("debug: Changing mode for %s to %s", user->nick, modes);
-
- while (*modes) {
-
- /* This looks better, much better than "add ? (do_add) : (do_remove)".
- * At least this is readable without paying much attention :) -GD
- */
- if (add)
- user->mode |= umodes[(int) *modes];
- else
- user->mode &= ~umodes[(int) *modes];
-
- switch (*modes++) {
- case '+':
- add = 1;
- break;
- case '-':
- add = 0;
- break;
- case 'a':
- if (add && !is_services_oper(user)) {
- common_svsmode(user, "-a", NULL);
- user->mode &= ~UMODE_a;
- }
- break;
- case 'P':
- if (add && !is_services_admin(user)) {
- common_svsmode(user, "-P", NULL);
- user->mode &= ~UMODE_P;
- }
- break;
- case 'Z':
- if (add && !is_services_root(user)) {
- common_svsmode(user, "-Z", NULL);
- user->mode &= ~UMODE_Z;
- }
- break;
- case 'd':
- if (ac == 0) {
- alog("user: umode +d with no parameter (?) for user %s",
- user->nick);
- break;
- }
-
- ac--;
- av++;
- user->svid = strtoul(*av, NULL, 0);
- break;
- case 'o':
- if (add) {
- opcnt++;
- if (WallOper) {
- anope_SendGlobops(s_OperServ,
- "\2%s\2 is now an IRC operator.",
- user->nick);
- }
- display_news(user, NEWS_OPER);
- if (is_services_oper(user)) {
- common_svsmode(user, "+a", NULL);
- user->mode |= UMODE_a;
- }
- if (is_services_admin(user)) {
- common_svsmode(user, "+P", NULL);
- user->mode |= UMODE_P;
- }
- if (is_services_root(user)) {
- common_svsmode(user, "+Z", NULL);
- user->mode |= UMODE_Z;
- }
- } else {
- opcnt--;
- }
- break;
- case 'r':
- if (add && !nick_identified(user)) {
- common_svsmode(user, "-r", NULL);
- user->mode &= ~UMODE_r;
- }
- break;
- case 'x':
- update_host(user);
- break;
- }
- }
+ int add = 1; /* 1 if adding modes, 0 if deleting */
+ const char *modes = av[0];
+
+ ac--;
+
+ if (debug)
+ alog("debug: Changing mode for %s to %s", user->nick, modes);
+
+ while (*modes) {
+
+ /* This looks better, much better than "add ? (do_add) : (do_remove)".
+ * At least this is readable without paying much attention :) -GD
+ */
+ if (add)
+ user->mode |= umodes[(int) *modes];
+ else
+ user->mode &= ~umodes[(int) *modes];
+
+ switch (*modes++) {
+ case '+':
+ add = 1;
+ break;
+ case '-':
+ add = 0;
+ break;
+ case 'a':
+ if (add && !is_services_oper(user)) {
+ common_svsmode(user, "-a", NULL);
+ user->mode &= ~UMODE_a;
+ }
+ break;
+ case 'P':
+ if (add && !is_services_admin(user)) {
+ common_svsmode(user, "-P", NULL);
+ user->mode &= ~UMODE_P;
+ }
+ break;
+ case 'Z':
+ if (add && !is_services_root(user)) {
+ common_svsmode(user, "-Z", NULL);
+ user->mode &= ~UMODE_Z;
+ }
+ break;
+ case 'd':
+ if (ac == 0) {
+ alog("user: umode +d with no parameter (?) for user %s",
+ user->nick);
+ break;
+ }
+
+ ac--;
+ av++;
+ user->svid = strtoul(*av, NULL, 0);
+ break;
+ case 'o':
+ if (add) {
+ opcnt++;
+ if (WallOper) {
+ anope_SendGlobops(s_OperServ,
+ "\2%s\2 is now an IRC operator.",
+ user->nick);
+ }
+ display_news(user, NEWS_OPER);
+ if (is_services_oper(user)) {
+ common_svsmode(user, "+a", NULL);
+ user->mode |= UMODE_a;
+ }
+ if (is_services_admin(user)) {
+ common_svsmode(user, "+P", NULL);
+ user->mode |= UMODE_P;
+ }
+ if (is_services_root(user)) {
+ common_svsmode(user, "+Z", NULL);
+ user->mode |= UMODE_Z;
+ }
+ } else {
+ opcnt--;
+ }
+ break;
+ case 'r':
+ if (add && !nick_identified(user)) {
+ common_svsmode(user, "-r", NULL);
+ user->mode &= ~UMODE_r;
+ }
+ break;
+ case 'x':
+ update_host(user);
+ break;
+ }
+ }
}
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, 0, 0, /* A B C */
- UMODE_D, 0, 0, /* D E F */
- 0, 0, 0, /* G H I */
- 0, 0, 0, /* J K L */
- 0, 0, UMODE_0, /* M N O */
- UMODE_P, 0, UMODE_R, /* P Q R */
- UMODE_S, 0, 0, /* S T U */
- 0, UMODE_W, 0, /* V W X */
- 0, /* Y */
- UMODE_Z, /* Z */
- 0, 0, 0, /* [ \ ] */
- 0, 0, 0, /* ^ _ ` */
- UMODE_a, 0, 0, /* a b c */
- UMODE_d, 0, 0, /* d e f */
- 0, UMODE_h, UMODE_i, /* g h i */
- 0, 0, 0, /* j k l */
- 0, 0, UMODE_o, /* m n o */
- UMODE_p, 0, UMODE_r, /* p q r */
- 0, 0, 0, /* s t u */
- 0, UMODE_w, UMODE_x, /* v w x */
- 0, /* y */
- 0, /* 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, 0, 0, /* A B C */
+ UMODE_D, 0, 0, /* D E F */
+ 0, 0, 0, /* G H I */
+ 0, 0, 0, /* J K L */
+ 0, 0, UMODE_0, /* M N O */
+ UMODE_P, 0, UMODE_R, /* P Q R */
+ UMODE_S, 0, 0, /* S T U */
+ 0, UMODE_W, 0, /* V W X */
+ 0, /* Y */
+ UMODE_Z, /* Z */
+ 0, 0, 0, /* [ \ ] */
+ 0, 0, 0, /* ^ _ ` */
+ UMODE_a, 0, 0, /* a b c */
+ UMODE_d, 0, 0, /* d e f */
+ 0, UMODE_h, UMODE_i, /* g h i */
+ 0, 0, 0, /* j k l */
+ 0, 0, UMODE_o, /* m n o */
+ UMODE_p, 0, UMODE_r, /* p q r */
+ 0, 0, 0, /* s t u */
+ 0, UMODE_w, UMODE_x, /* v w x */
+ 0, /* y */
+ 0, /* 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,
- 'a', /* (33) ! Channel Admins */
- 0, 0, 0,
- 'h', /* (37) % Channel halfops */
- 0, 0, 0, 0,
- 0,
+ 0,
+ 'a', /* (33) ! Channel Admins */
+ 0, 0, 0,
+ 'h', /* (37) % Channel halfops */
+ 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,
+ '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, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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}, {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},
- {add_ban, del_ban},
- {NULL},
- {NULL},
- {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}, {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},
+ {add_ban, del_ban},
+ {NULL},
+ {NULL},
+ {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 */
- {0}, /* C */
- {0}, /* D */
- {0}, /* E */
- {0}, /* F */
- {0}, /* G */
- {0}, /* H */
- {0}, /* I */
- {0}, /* J */
- {CMODE_K, 0, NULL, NULL}, /* K */
- {0}, /* L */
- {CMODE_M, 0, NULL, NULL}, /* M */
- {CMODE_N, 0, NULL, NULL}, /* N */
- {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
- {0}, /* P */
- {0}, /* Q */
- {CMODE_R, 0, NULL, NULL}, /* R */
- {CMODE_S, 0, NULL, NULL}, /* S */
- {0}, /* T */
- {0}, /* U */
- {0}, /* V */
- {0}, /* W */
- {0}, /* X */
- {0}, /* Y */
- {0}, /* Z */
- {0}, {0}, {0}, {0}, {0}, {0},
- {0}, /* a */
- {0}, /* b */
- {CMODE_c, 0, NULL, NULL}, /* c */
- {0}, /* d */
- {0}, /* e */
- {0}, /* f */
- {0}, /* g */
- {0}, /* h */
- {CMODE_i, 0, NULL, NULL}, /* i */
- {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}, /* m */
- {CMODE_n, 0, NULL, NULL}, /* n */
- {0}, /* o */
- {CMODE_p, 0, NULL, NULL}, /* p */
- {CMODE_q, 0, NULL, NULL}, /* q */
- {CMODE_r, CBM_NO_MLOCK, NULL, NULL},
- {CMODE_s, 0, NULL, NULL}, /* s */
- {CMODE_t, 0, NULL, NULL}, /* t */
- {0}, /* u */
- {0}, /* v */
- {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},
+ {CMODE_A, CBM_NO_USER_MLOCK, NULL, NULL},
+ {0}, /* B */
+ {0}, /* C */
+ {0}, /* D */
+ {0}, /* E */
+ {0}, /* F */
+ {0}, /* G */
+ {0}, /* H */
+ {0}, /* I */
+ {0}, /* J */
+ {CMODE_K, 0, NULL, NULL}, /* K */
+ {0}, /* L */
+ {CMODE_M, 0, NULL, NULL}, /* M */
+ {CMODE_N, 0, NULL, NULL}, /* N */
+ {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
+ {0}, /* P */
+ {0}, /* Q */
+ {CMODE_R, 0, NULL, NULL}, /* R */
+ {CMODE_S, 0, NULL, NULL}, /* S */
+ {0}, /* T */
+ {0}, /* U */
+ {0}, /* V */
+ {0}, /* W */
+ {0}, /* X */
+ {0}, /* Y */
+ {0}, /* Z */
+ {0}, {0}, {0}, {0}, {0}, {0},
+ {0}, /* a */
+ {0}, /* b */
+ {CMODE_c, 0, NULL, NULL}, /* c */
+ {0}, /* d */
+ {0}, /* e */
+ {0}, /* f */
+ {0}, /* g */
+ {0}, /* h */
+ {CMODE_i, 0, NULL, NULL}, /* i */
+ {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}, /* m */
+ {CMODE_n, 0, NULL, NULL}, /* n */
+ {0}, /* o */
+ {CMODE_p, 0, NULL, NULL}, /* p */
+ {CMODE_q, 0, NULL, NULL}, /* q */
+ {CMODE_r, CBM_NO_MLOCK, NULL, NULL},
+ {CMODE_s, 0, NULL, NULL}, /* s */
+ {CMODE_t, 0, NULL, NULL}, /* t */
+ {0}, /* u */
+ {0}, /* v */
+ {0}, /* w */
+ {0}, /* x */
+ {0}, /* y */
+ {0}, /* z */
+ {0}, {0}, {0}, {0}
};
CBModeInfo myCbmodeinfos[] = {
- {'c', CMODE_c, 0, NULL, NULL},
- {'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},
- {'q', CMODE_q, 0, NULL, NULL},
- {'r', CMODE_r, 0, NULL, NULL},
- {'s', CMODE_s, 0, NULL, NULL},
- {'t', CMODE_t, 0, NULL, NULL},
- {'A', CMODE_A, 0, NULL, NULL},
- {'K', CMODE_K, 0, NULL, NULL},
- {'M', CMODE_M, 0, NULL, NULL},
- {'N', CMODE_N, 0, NULL, NULL},
- {'O', CMODE_O, 0, NULL, NULL},
- {'R', CMODE_R, 0, NULL, NULL},
- {'S', CMODE_S, 0, NULL, NULL},
- {0}
+ {'c', CMODE_c, 0, NULL, NULL},
+ {'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},
+ {'q', CMODE_q, 0, NULL, NULL},
+ {'r', CMODE_r, 0, NULL, NULL},
+ {'s', CMODE_s, 0, NULL, NULL},
+ {'t', CMODE_t, 0, NULL, NULL},
+ {'A', CMODE_A, 0, NULL, NULL},
+ {'K', CMODE_K, 0, NULL, NULL},
+ {'M', CMODE_M, 0, NULL, NULL},
+ {'N', CMODE_N, 0, NULL, NULL},
+ {'O', CMODE_O, 0, NULL, NULL},
+ {'R', CMODE_R, 0, NULL, NULL},
+ {'S', CMODE_S, 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_admin},
- {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 */
- {0}, /* q */
- {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_admin},
+ {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 */
+ {0}, /* q */
+ {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}
};
/* SVSMODE -b */
void ultimate3_SendBanDel(const char *name, const char *nick)
{
- ultimate3_SendSVSMode_chan(name, "-b", nick);
+ ultimate3_SendSVSMode_chan(name, "-b", nick);
}
@@ -485,179 +485,179 @@ void ultimate3_SendBanDel(const char *name, const char *nick)
void ultimate3_SendSVSMode_chan(const char *name, const char *mode, const char *nick)
{
- if (nick) {
- send_cmd(ServerName, "SVSMODE %s %s %s", name, mode, nick);
- } else {
- send_cmd(ServerName, "SVSMODE %s %s", name, mode);
- }
+ if (nick) {
+ send_cmd(ServerName, "SVSMODE %s %s %s", name, mode, nick);
+ } else {
+ send_cmd(ServerName, "SVSMODE %s %s", name, mode);
+ }
}
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;
}
/*
** NICK - new
-** source = NULL
+** source = NULL
** parv[0] = nickname
-** parv[1] = hopcount
-** parv[2] = timestamp
-** parv[3] = modes
-** parv[4] = username
-** parv[5] = hostname
-** parv[6] = server
+** parv[1] = hopcount
+** parv[2] = timestamp
+** parv[3] = modes
+** parv[4] = username
+** parv[5] = hostname
+** parv[6] = server
** parv[7] = servicestamp
-** parv[8] = IP
+** parv[8] = IP
** parv[9] = info
** NICK - change
-** source = oldnick
+** source = oldnick
** parv[0] = new nickname
-** parv[1] = hopcount
+** parv[1] = hopcount
*/
int anope_event_nick(const char *source, int ac, const char **av)
{
- if (ac != 2) {
- User *user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
- strtoul(av[2], NULL, 10), strtoul(av[7], NULL,
- 0),
- strtoul(av[8], NULL, 0), "*", NULL);
- if (user)
- anope_ProcessUsermodes(user, 1, &av[3]);
- } else {
- do_nick(source, av[0], NULL, NULL, NULL, NULL,
- strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
- }
- return MOD_CONT;
+ if (ac != 2) {
+ User *user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
+ strtoul(av[2], NULL, 10), strtoul(av[7], NULL,
+ 0),
+ strtoul(av[8], NULL, 0), "*", NULL);
+ if (user)
+ anope_ProcessUsermodes(user, 1, &av[3]);
+ } 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_sethost(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: SETHOST for nonexistent user %s", av[0]);
- }
- return MOD_CONT;
- }
+ u = finduser(av[0]);
+ if (!u) {
+ if (debug) {
+ alog("debug: SETHOST for nonexistent user %s", av[0]);
+ }
+ return MOD_CONT;
+ }
- u->SetDisplayedHost(av[1]);
- return MOD_CONT;
+ u->SetDisplayedHost(av[1]);
+ return MOD_CONT;
}
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;
}
/*
** CLIENT
-** source = NULL
+** source = NULL
** parv[0] = nickname Trystan
-** parv[1] = hopcount 1
-** parv[2] = timestamp 1090083810
-** parv[3] = modes +ix
-** parv[4] = modes ? +
-** parv[5] = username Trystan
-** parv[6] = hostname c-24-2-101-227.client.comcast.net
-** parv[7] = vhost 3223f75b.2b32ee69.client.comcast.net
-** parv[8] = server WhiteRose.No.Eu.Shadow-Realm.org
-** parv[9] = svid 0
-** parv[10] = ip 402810339
-** parv[11] = info Dreams are answers to questions not yet asked
+** parv[1] = hopcount 1
+** parv[2] = timestamp 1090083810
+** parv[3] = modes +ix
+** parv[4] = modes ? +
+** parv[5] = username Trystan
+** parv[6] = hostname c-24-2-101-227.client.comcast.net
+** parv[7] = vhost 3223f75b.2b32ee69.client.comcast.net
+** parv[8] = server WhiteRose.No.Eu.Shadow-Realm.org
+** parv[9] = svid 0
+** parv[10] = ip 402810339
+** parv[11] = info Dreams are answers to questions not yet asked
*/
int anope_event_client(const char *source, int ac, const char **av)
{
- if (ac != 2) {
- User *user = do_nick(source, av[0], av[5], av[6], av[8], av[11],
- strtoul(av[2], NULL, 10), strtoul(av[9], NULL,
- 0),
- strtoul(av[10], NULL, 0), av[7], NULL);
- if (user) {
- anope_ProcessUsermodes(user, 1, &av[3]);
- }
- }
- return MOD_CONT;
+ if (ac != 2) {
+ User *user = do_nick(source, av[0], av[5], av[6], av[8], av[11],
+ strtoul(av[2], NULL, 10), strtoul(av[9], NULL,
+ 0),
+ strtoul(av[10], NULL, 0), av[7], NULL);
+ if (user) {
+ anope_ProcessUsermodes(user, 1, &av[3]);
+ }
+ }
+ return MOD_CONT;
}
/* *INDENT-OFF* */
void moduleAddIRCDMsgs(void) {
- Message *m;
-
- updateProtectDetails("ADMIN","ADMINME","admin","deadmin","AUTOADMIN","+a","-a");
-
- m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
- m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
- m = createMessage("INVITE", anope_event_invite); addCoreMessage(IRCD,m);
- m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
- m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
- m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
- m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
- m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m);
- m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
- m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
- m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
- m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
- m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
- m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
- m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
- m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
- m = createMessage("USER", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
- m = createMessage("AKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GLOBOPS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GNOTICE", anope_event_gnotice); addCoreMessage(IRCD,m);
- m = createMessage("GOPER", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("RAKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SQLINE", anope_event_sqline); addCoreMessage(IRCD,m);
- m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
- m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m);
- m = createMessage("HS", anope_event_hs); addCoreMessage(IRCD,m);
- m = createMessage("MS", anope_event_ms); addCoreMessage(IRCD,m);
- m = createMessage("NS", anope_event_ns); addCoreMessage(IRCD,m);
- m = createMessage("OS", anope_event_os); addCoreMessage(IRCD,m);
- m = createMessage("RS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SGLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
- m = createMessage("SS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m);
- m = createMessage("SZLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("UNSGLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("UNSZLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m);
- m = createMessage("NETINFO", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GCONNECT", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("NETGLOBAL", anope_event_netglobal); addCoreMessage(IRCD,m);
- m = createMessage("CHATOPS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("NETCTRL", anope_event_netctrl); addCoreMessage(IRCD,m);
- m = createMessage("CLIENT", anope_event_client); addCoreMessage(IRCD,m);
- m = createMessage("SMODE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
- m = createMessage("BURST", anope_event_burst); addCoreMessage(IRCD,m);
- m = createMessage("REHASH", anope_event_rehash); addCoreMessage(IRCD,m);
- m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
- m = createMessage("CREDITS", anope_event_credits); addCoreMessage(IRCD,m);
- m = createMessage("SMODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("EOBURST", anope_event_eob); addCoreMessage(IRCD,m);
+ Message *m;
+
+ updateProtectDetails("ADMIN","ADMINME","admin","deadmin","AUTOADMIN","+a","-a");
+
+ m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
+ m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
+ m = createMessage("INVITE", anope_event_invite); addCoreMessage(IRCD,m);
+ m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
+ m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
+ m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
+ m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
+ m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m);
+ m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
+ m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
+ m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
+ m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
+ m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
+ m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
+ m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
+ m = createMessage("USER", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
+ m = createMessage("AKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GLOBOPS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GNOTICE", anope_event_gnotice); addCoreMessage(IRCD,m);
+ m = createMessage("GOPER", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("RAKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SQLINE", anope_event_sqline); addCoreMessage(IRCD,m);
+ m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
+ m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m);
+ m = createMessage("HS", anope_event_hs); addCoreMessage(IRCD,m);
+ m = createMessage("MS", anope_event_ms); addCoreMessage(IRCD,m);
+ m = createMessage("NS", anope_event_ns); addCoreMessage(IRCD,m);
+ m = createMessage("OS", anope_event_os); addCoreMessage(IRCD,m);
+ m = createMessage("RS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SGLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
+ m = createMessage("SS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m);
+ m = createMessage("SZLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("UNSGLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("UNSZLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m);
+ m = createMessage("NETINFO", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GCONNECT", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("NETGLOBAL", anope_event_netglobal); addCoreMessage(IRCD,m);
+ m = createMessage("CHATOPS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("NETCTRL", anope_event_netctrl); addCoreMessage(IRCD,m);
+ m = createMessage("CLIENT", anope_event_client); addCoreMessage(IRCD,m);
+ m = createMessage("SMODE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
+ m = createMessage("BURST", anope_event_burst); addCoreMessage(IRCD,m);
+ m = createMessage("REHASH", anope_event_rehash); addCoreMessage(IRCD,m);
+ m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
+ m = createMessage("CREDITS", anope_event_credits); addCoreMessage(IRCD,m);
+ m = createMessage("SMODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("EOBURST", anope_event_eob); addCoreMessage(IRCD,m);
}
/* *INDENT-ON* */
@@ -665,21 +665,21 @@ void moduleAddIRCDMsgs(void) {
void ultimate3_SendSQLine(const char *mask, const char *reason)
{
- if (!mask || !reason) {
- return;
- }
+ if (!mask || !reason) {
+ return;
+ }
- send_cmd(NULL, "SQLINE %s :%s", mask, reason);
+ send_cmd(NULL, "SQLINE %s :%s", mask, reason);
}
void ultimate3_SendSGLineDel(const char *mask)
{
- send_cmd(NULL, "UNSGLINE 0 :%s", mask);
+ send_cmd(NULL, "UNSGLINE 0 :%s", mask);
}
void ultimate3_SendSZLineDel(const char *mask)
{
- send_cmd(NULL, "UNSZLINE 0 %s", mask);
+ send_cmd(NULL, "UNSZLINE 0 %s", mask);
}
/* As of alpha27 (one after our offical support szline was removed */
@@ -689,10 +689,10 @@ void ultimate3_SendSZLineDel(const char *mask)
*/
void ultimate3_SendSZLine(const char *mask, const char *reason, const char *whom)
{
- send_cmd(NULL, "AKILL %s * %d %s %ld :%s", mask, 86400 * 2, whom,
- (long int) time(NULL), reason);
- /* leaving this in here in case some legacy user asks for it */
- /* send_cmd(NULL, "SZLINE %s :%s", mask, reason); */
+ send_cmd(NULL, "AKILL %s * %d %s %ld :%s", mask, 86400 * 2, whom,
+ (long int) time(NULL), reason);
+ /* leaving this in here in case some legacy user asks for it */
+ /* send_cmd(NULL, "SZLINE %s :%s", mask, reason); */
}
void UltimateIRCdProto::SendSVSNOOP(const char *server, int set)
@@ -707,7 +707,7 @@ void ultimate3_cmd_svsadmin(const char *server, int set)
void ultimate3_SendSGLine(const char *mask, const char *reason)
{
- send_cmd(NULL, "SGLINE %d :%s:%s", (int)strlen(mask), mask, reason);
+ send_cmd(NULL, "SGLINE %d :%s:%s", (int)strlen(mask), mask, reason);
}
void UltimateIRCdProto::SendAkillDel(const char *user, const char *host)
@@ -717,948 +717,948 @@ void UltimateIRCdProto::SendAkillDel(const char *user, const char *host)
void ultimate3_SendVhostDel(User * u)
{
- send_cmd(s_HostServ, "SVSMODE %s -x", u->nick);
- notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick, ircd->vhostchar);
+ send_cmd(s_HostServ, "SVSMODE %s -x", u->nick);
+ notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick, ircd->vhostchar);
}
void ultimate3_SendVhost(const char *nick, const char *vIdent, const char *vhost)
{
- send_cmd(s_HostServ, "SVSMODE %s +x", nick);
- send_cmd(ServerName, "SETHOST %s %s", nick, vhost);
+ send_cmd(s_HostServ, "SVSMODE %s +x", nick);
+ send_cmd(ServerName, "SETHOST %s %s", nick, vhost);
}
void ultimate3_SendJoin(const char *user, const char *channel, time_t chantime)
{
- send_cmd(user, "SJOIN %ld %s", (long int) chantime, channel);
+ send_cmd(user, "SJOIN %ld %s", (long int) chantime, channel);
}
void ultimate3_SendAkill(const char *user, const char *host, const char *who, time_t when,
- time_t expires, const char *reason)
+ time_t expires, const char *reason)
{
- send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", host, user, 86400 * 2, who,
- (long int) time(NULL), reason);
+ send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", host, user, 86400 * 2, who,
+ (long int) time(NULL), reason);
}
void ultimate3_SendSVSKill(const char *source, const char *user, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "SVSKILL %s :%s", user, buf);
+ send_cmd(NULL, "SVSKILL %s :%s", user, buf);
}
void ultimate3_SendSVSMode(User * u, int ac, const char **av)
{
- send_cmd(ServerName, "SVSMODE %s %ld %s%s%s", u->nick,
- (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
- (ac == 2 ? av[1] : ""));
+ send_cmd(ServerName, "SVSMODE %s %ld %s%s%s", u->nick,
+ (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
+ (ac == 2 ? av[1] : ""));
}
void anope_squit(char *servname, char *message)
{
- send_cmd(servname, "SQUIT %s :%s", servname, message);
+ send_cmd(servname, "SQUIT %s :%s", servname, message);
}
void anope_pong(char *servname)
{
- send_cmd(servname, "PONG %s", servname);
+ send_cmd(servname, "PONG %s", servname);
}
/* Events */
int anope_event_ping(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- ultimate3_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ ultimate3_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
+ 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;
}
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;
}
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 (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 (*av[0] == '#' || *av[0] == '&') {
+ do_cmode(source, ac, av);
+ } else {
+ do_umode(source, ac, av);
+ }
+ return MOD_CONT;
}
/* EVENT : OS */
int anope_event_os(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_OperServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_OperServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : NS */
int anope_event_ns(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_NickServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_NickServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : MS */
int anope_event_ms(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_MemoServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_MemoServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : HS */
int anope_event_hs(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_HostServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_HostServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : CS */
int anope_event_cs(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_ChanServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_ChanServ, av[0]);
+ 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;
}
/* EVENT: SERVER */
int anope_event_server(const char *source, int ac, const char **av)
{
- if (!stricmp(av[1], "1")) {
- uplink = sstrdup(av[0]);
- }
- do_server(source, av[0], av[1], av[2], NULL);
- return MOD_CONT;
+ if (!stricmp(av[1], "1")) {
+ uplink = sstrdup(av[0]);
+ }
+ 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;
}
void ultimate3_cmd_topic(const char *whosets, const char *chan, const char *whosetit,
- const char *topic, time_t when)
+ const char *topic, time_t when)
{
- send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
- (unsigned long int) when, topic);
+ send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
+ (unsigned long int) when, topic);
}
void ultimate3_cmd_372(const char *source, const char *msg)
{
- send_cmd(ServerName, "372 %s :- %s", source, msg);
+ send_cmd(ServerName, "372 %s :- %s", source, msg);
}
void ultimate3_cmd_372_error(const char *source)
{
- send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
- "contact your IRC administrator.", source);
+ send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
+ "contact your IRC administrator.", source);
}
void ultimate3_cmd_375(const char *source)
{
- send_cmd(ServerName, "375 %s :- %s Message of the Day",
- source, ServerName);
+ send_cmd(ServerName, "375 %s :- %s Message of the Day",
+ source, ServerName);
}
void ultimate3_cmd_376(const char *source)
{
- send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
+ send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
}
void ultimate3_cmd_nick(const char *nick, const char *name, const char *modes)
{
- EnforceQlinedNick(nick, NULL);
- send_cmd(NULL, "CLIENT %s 1 %ld %s + %s %s * %s 0 0 :%s", nick,
- (long int) time(NULL), modes, ServiceUser, ServiceHost,
- ServerName, name);
- ultimate3_SendSQLine(nick, "Reserved for services");
+ EnforceQlinedNick(nick, NULL);
+ send_cmd(NULL, "CLIENT %s 1 %ld %s + %s %s * %s 0 0 :%s", nick,
+ (long int) time(NULL), modes, ServiceUser, ServiceHost,
+ ServerName, name);
+ ultimate3_SendSQLine(nick, "Reserved for services");
}
void ultimate3_SendGuestNick(const char *nick, const char *user, const char *host,
- const char *real, const char *modes)
+ const char *real, const char *modes)
{
- send_cmd(NULL, "CLIENT %s 1 %ld %s + %s %s * %s 0 0 :%s", nick,
- (long int) time(NULL), modes, user, host, ServerName, real);
+ send_cmd(NULL, "CLIENT %s 1 %ld %s + %s %s * %s 0 0 :%s", nick,
+ (long int) time(NULL), modes, user, host, ServerName, real);
}
void ultimate3_SendMode(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source, "MODE %s %s", dest, buf);
+ send_cmd(source, "MODE %s %s", dest, buf);
}
void ultimate3_SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real,
- const char *modes)
+ const char *modes)
{
- EnforceQlinedNick(nick, s_BotServ);
- send_cmd(NULL, "CLIENT %s 1 %ld %s + %s %s * %s 0 0 :%s", nick,
- (long int) time(NULL), modes, user, host, ServerName, real);
- ultimate3_SendSQLine(nick, "Reserved for services");
+ EnforceQlinedNick(nick, s_BotServ);
+ send_cmd(NULL, "CLIENT %s 1 %ld %s + %s %s * %s 0 0 :%s", nick,
+ (long int) time(NULL), modes, user, host, ServerName, real);
+ ultimate3_SendSQLine(nick, "Reserved for services");
}
void ultimate3_SendKick(const char *source, const char *chan, const char *user, const char *buf)
{
- if (buf) {
- send_cmd(source, "KICK %s %s :%s", chan, user, buf);
- } else {
- send_cmd(source, "KICK %s %s", chan, user);
- }
+ if (buf) {
+ send_cmd(source, "KICK %s %s :%s", chan, user, buf);
+ } else {
+ send_cmd(source, "KICK %s %s", chan, user);
+ }
}
void ultimate3_SendNoticeChanops(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
+ send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
}
void ultimate3_cmd_notice(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (NSDefFlags & NI_MSG) {
- ultimate3_cmd_privmsg2(source, dest, buf);
- } else {
- send_cmd(source, "NOTICE %s :%s", dest, buf);
- }
+ if (NSDefFlags & NI_MSG) {
+ ultimate3_cmd_privmsg2(source, dest, buf);
+ } else {
+ send_cmd(source, "NOTICE %s :%s", dest, buf);
+ }
}
void ultimate3_cmd_notice2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE %s :%s", dest, msg);
+ send_cmd(source, "NOTICE %s :%s", dest, msg);
}
void ultimate3_cmd_privmsg(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source, "PRIVMSG %s :%s", dest, buf);
+ send_cmd(source, "PRIVMSG %s :%s", dest, buf);
}
void ultimate3_cmd_privmsg2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG %s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG %s :%s", dest, msg);
}
void ultimate3_SendGlobalNotice(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE $%s :%s", dest, msg);
+ send_cmd(source, "NOTICE $%s :%s", dest, msg);
}
void ultimate3_SendGlobalPrivmsg(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
}
void ultimate3_SendBotOp(const char *nick, const char *chan)
{
- anope_SendMode(nick, chan, "%s %s %s", ircd->botchanumode, nick, nick);
+ anope_SendMode(nick, chan, "%s %s %s", ircd->botchanumode, nick, nick);
}
void ultimate3_cmd_351(const char *source)
{
- send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
- source, version_number, ServerName, ircd->name, version_flags,
- EncModule,version_build);
+ send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
+ source, version_number, ServerName, ircd->name, version_flags,
+ EncModule,version_build);
}
/* QUIT */
void ultimate3_SendQuit(const char *source, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (buf) {
- send_cmd(source, "QUIT :%s", buf);
- } else {
- send_cmd(source, "QUIT");
- }
+ if (buf) {
+ send_cmd(source, "QUIT :%s", buf);
+ } else {
+ send_cmd(source, "QUIT");
+ }
}
/* PROTOCTL */
void ultimate3_cmd_capab()
{
- send_cmd(NULL,
- "CAPAB TS5 NOQUIT SSJ5 BURST UNCONNECT TSMODE NICKIP CLIENT");
+ send_cmd(NULL,
+ "CAPAB TS5 NOQUIT SSJ5 BURST UNCONNECT TSMODE NICKIP CLIENT");
}
/* PASS */
void ultimate3_cmd_pass(const char *pass)
{
- send_cmd(NULL, "PASS %s :TS", pass);
+ send_cmd(NULL, "PASS %s :TS", pass);
}
/* SERVER name hop descript */
/* Unreal 3.2 actually sends some info about itself in the descript area */
void ultimate3_SendServer(const char *servname, int hop, const char *descript)
{
- send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
+ send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
}
/* PONG */
void ultimate3_SendPong(const char *servname, const char *who)
{
- send_cmd(servname, "PONG %s", who);
+ send_cmd(servname, "PONG %s", who);
}
/* UNSQLINE */
void ultimate3_SendSQLineDel(const char *user)
{
- if (!user) {
- return;
- }
- send_cmd(NULL, "UNSQLINE %s", user);
+ if (!user) {
+ return;
+ }
+ send_cmd(NULL, "UNSQLINE %s", user);
}
/* CHGHOST */
void ultimate3_cmd_chghost(const char *nick, const char *vhost)
{
- if (!nick || !vhost) {
- return;
- }
- send_cmd(ServerName, "CHGHOST %s %s", nick, vhost);
+ if (!nick || !vhost) {
+ return;
+ }
+ send_cmd(ServerName, "CHGHOST %s %s", nick, vhost);
}
/* CHGIDENT */
void ultimate3_cmd_chgident(const char *nick, const char *vIdent)
{
- if (!nick || !vIdent) {
- return;
- }
- send_cmd(ServerName, "CHGIDENT %s %s", nick, vIdent);
+ if (!nick || !vIdent) {
+ return;
+ }
+ send_cmd(ServerName, "CHGIDENT %s %s", nick, vIdent);
}
/* INVITE */
void ultimate3_SendInvite(const char *source, const char *chan, const char *nick)
{
- if (!source || !chan || !nick) {
- return;
- }
+ if (!source || !chan || !nick) {
+ return;
+ }
- send_cmd(source, "INVITE %s %s", nick, chan);
+ send_cmd(source, "INVITE %s %s", nick, chan);
}
/* PART */
void ultimate3_SendPart(const char *nick, const char *chan, const char *buf)
{
- if (!nick || !chan) {
- return;
- }
+ if (!nick || !chan) {
+ return;
+ }
- if (buf) {
- send_cmd(nick, "PART %s :%s", chan, buf);
- } else {
- send_cmd(nick, "PART %s", chan);
- }
+ if (buf) {
+ send_cmd(nick, "PART %s :%s", chan, buf);
+ } else {
+ send_cmd(nick, "PART %s", chan);
+ }
}
/* 391 */
void ultimate3_cmd_391(const char *source, const char *timestr)
{
- if (!timestr) {
- return;
- }
- send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
+ if (!timestr) {
+ return;
+ }
+ send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
}
/* 250 */
void ultimate3_cmd_250(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "250 %s", buf);
+ send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void ultimate3_cmd_307(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "307 %s", buf);
+ send_cmd(ServerName, "307 %s", buf);
}
/* 311 */
void ultimate3_cmd_311(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "311 %s", buf);
+ send_cmd(ServerName, "311 %s", buf);
}
/* 312 */
void ultimate3_cmd_312(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "312 %s", buf);
+ send_cmd(ServerName, "312 %s", buf);
}
/* 317 */
void ultimate3_cmd_317(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "317 %s", buf);
+ send_cmd(ServerName, "317 %s", buf);
}
/* 219 */
void ultimate3_cmd_219(const char *source, const char *letter)
{
- if (!source) {
- return;
- }
+ if (!source) {
+ return;
+ }
- if (letter) {
- send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
- *letter);
- } else {
- send_cmd(NULL, "219 %s l :End of /STATS report.", source);
- }
+ if (letter) {
+ send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
+ *letter);
+ } else {
+ send_cmd(NULL, "219 %s l :End of /STATS report.", source);
+ }
}
/* 401 */
void ultimate3_cmd_401(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
- send_cmd(ServerName, "401 %s %s :No such service.", source, who);
+ if (!source || !who) {
+ return;
+ }
+ send_cmd(ServerName, "401 %s %s :No such service.", source, who);
}
/* 318 */
void ultimate3_cmd_318(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
+ if (!source || !who) {
+ return;
+ }
- send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
+ send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void ultimate3_cmd_242(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "242 %s", buf);
+ send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void ultimate3_cmd_243(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "243 %s", buf);
+ send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void ultimate3_cmd_211(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "211 %s", buf);
+ send_cmd(NULL, "211 %s", buf);
}
/* GLOBOPS */
void ultimate3_SendGlobops(const char *source, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
+ send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
}
/* SQUIT */
void ultimate3_SendSquit(const char *servname, const char *message)
{
- if (!servname || !message) {
- return;
- }
+ if (!servname || !message) {
+ return;
+ }
- send_cmd(NULL, "SQUIT %s :%s", servname, message);
+ send_cmd(NULL, "SQUIT %s :%s", servname, message);
}
/* SVSO */
void ultimate3_SendSVSO(const char *source, const char *nick, const char *flag)
{
- if (!source || !nick || !flag) {
- return;
- }
+ if (!source || !nick || !flag) {
+ return;
+ }
- send_cmd(source, "SVSO %s %s", nick, flag);
+ send_cmd(source, "SVSO %s %s", nick, flag);
}
/* NICK <newnick> */
void ultimate3_SendChangeBotNick(const char *oldnick, const char *newnick)
{
- if (!oldnick || !newnick) {
- return;
- }
+ if (!oldnick || !newnick) {
+ return;
+ }
- send_cmd(oldnick, "NICK %s", newnick);
+ send_cmd(oldnick, "NICK %s", newnick);
}
/* SVSNICK */
void ultimate3_SendForceNickChange(const char *source, const char *guest, time_t when)
{
- if (!source || !guest) {
- return;
- }
- send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
+ if (!source || !guest) {
+ return;
+ }
+ send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
}
/* Functions that use serval cmd functions */
/*
* SVINFO
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
- * parv[4] = server's idea of UTC time
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
+ * parv[4] = server's idea of UTC time
*/
void ultimate3_cmd_svinfo()
{
- send_cmd(NULL, "SVINFO 5 3 0 :%ld", (long int) time(NULL));
+ send_cmd(NULL, "SVINFO 5 3 0 :%ld", (long int) time(NULL));
}
void ultimate3_cmd_burst()
{
- send_cmd(NULL, "BURST");
+ send_cmd(NULL, "BURST");
}
void ultimate3_SendConnect(int servernum)
{
- me_server =
- new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
+ me_server =
+ new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
- if (servernum == 1) {
- ultimate3_cmd_pass(RemotePassword);
- }
- if (servernum == 2) {
- ultimate3_cmd_pass(RemotePassword2);
- }
- if (servernum == 3) {
- ultimate3_cmd_pass(RemotePassword3);
- }
- ultimate3_cmd_capab();
- ultimate3_SendServer(ServerName, 1, ServerDesc);
- ultimate3_cmd_svinfo();
- ultimate3_cmd_burst();
+ if (servernum == 1) {
+ ultimate3_cmd_pass(RemotePassword);
+ }
+ if (servernum == 2) {
+ ultimate3_cmd_pass(RemotePassword2);
+ }
+ if (servernum == 3) {
+ ultimate3_cmd_pass(RemotePassword3);
+ }
+ ultimate3_cmd_capab();
+ ultimate3_SendServer(ServerName, 1, ServerDesc);
+ ultimate3_cmd_svinfo();
+ ultimate3_cmd_burst();
}
/* SVSHOLD - set */
void ultimate3_SendSVSHOLD(const char *nick)
{
- /* Not supported by this IRCD */
+ /* Not supported by this IRCD */
}
/* SVSHOLD - release */
void ultimate3_SendSVSHOLDDel(const char *nick)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
/* SVSMODE +d */
/* sent if svid is something weird */
void ultimate3_SendSVID(const char *nick, time_t ts)
{
- send_cmd(ServerName, "SVSMODE %s %lu +d 1", nick,
- (unsigned long int) ts);
+ send_cmd(ServerName, "SVSMODE %s %lu +d 1", nick,
+ (unsigned long int) ts);
}
/* SVSMODE +d */
/* nc_change was = 1, and there is no na->status */
void ultimate3_SendUnregisteredNick(User * u)
{
- common_svsmode(u, "+d", "1");
+ common_svsmode(u, "+d", "1");
}
/* SVSMODE +d */
void ultimate3_SendSVID2(User * u, const char *ts)
{
- /* not used by bahamut ircds */
+ /* not used by bahamut ircds */
}
void ultimate3_SendSVID3(User * u, const char *ts)
{
- if (u->svid != u->timestamp) {
- common_svsmode(u, "+rd", ts);
- } else {
- common_svsmode(u, "+r", NULL);
- }
+ if (u->svid != u->timestamp) {
+ common_svsmode(u, "+rd", ts);
+ } else {
+ common_svsmode(u, "+r", NULL);
+ }
}
int anope_event_svinfo(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
int anope_event_pass(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
int anope_event_gnotice(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
int anope_event_netctrl(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
int anope_event_notice(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
int anope_event_sqline(const char *source, int ac, const char **av)
{
- /* currently not used but removes the message : unknown message from server */
- return MOD_CONT;
+ /* currently not used but removes the message : unknown message from server */
+ return MOD_CONT;
}
void ultimate3_SendSVSJoin(const char *source, const char *nick, const char *chan, const char *param)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
void ultimate3_SendSVSPart(const char *source, const char *nick, const char *chan)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
void ultimate3_SendSWhois(const char *source, const char *who, const char *mask)
{
- /* not supported */
+ /* not supported */
}
void ultimate3_SendEOB()
{
- send_cmd(NULL, "BURST 0");
+ send_cmd(NULL, "BURST 0");
}
int anope_event_error(const char *source, int ac, const char **av)
{
- if (ac >= 1) {
- if (debug) {
- alog("debug: %s", av[0]);
- }
- }
- return MOD_CONT;
+ if (ac >= 1) {
+ if (debug) {
+ alog("debug: %s", av[0]);
+ }
+ }
+ return MOD_CONT;
}
int anope_event_eob(const char *source, int ac, const char **av)
{
- Server *s;
+ Server *s;
- if (ac == 1) {
- s = findserver(servlist, av[0]);
- /* 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;
+ if (ac == 1) {
+ s = findserver(servlist, av[0]);
+ /* 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_burst(const char *source, int ac, const char **av)
{
- Server *s;
- s = findserver(servlist, source);
- if (!ac) {
- /* for future use - start burst */
- } else {
- /* 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 (!ac) {
+ /* for future use - start burst */
+ } else {
+ /* 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_rehash(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_credits(char *source, int ac, char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_admin(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_netglobal(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_invite(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int ultiamte3_IsFloodModeParamValid(const char *value)
{
- return 0;
+ return 0;
}
void ultimate3_SendJupe(const char *jserver, const char *who, const char *reason)
{
- char rbuf[256];
+ char rbuf[256];
- snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
- reason ? ": " : "", reason ? reason : "");
+ snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
+ reason ? ": " : "", reason ? reason : "");
- if (findserver(servlist, jserver))
- ultimate3_SendSquit(jserver, rbuf);
- ultimate3_SendServer(jserver, 2, rbuf);
- new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
+ if (findserver(servlist, jserver))
+ ultimate3_SendSquit(jserver, rbuf);
+ ultimate3_SendServer(jserver, 2, rbuf);
+ new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
}
/* GLOBOPS - to handle old WALLOPS */
void ultimate3_SendGlobops_legacy(const char *source, const char *fmt)
{
- send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
+ send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
/*
@@ -1667,8 +1667,8 @@ void ultimate3_SendGlobops_legacy(const char *source, const char *fmt)
*/
int ultiamte3_IsNickValid(const char *nick)
{
- /* no hard coded invalid nicks */
- return 1;
+ /* no hard coded invalid nicks */
+ return 1;
}
/*
@@ -1677,23 +1677,23 @@ int ultiamte3_IsNickValid(const char *nick)
*/
int ultiamte3_IsChannelValid(const char *chan)
{
- /* no hard coded invalid chans */
- return 1;
+ /* no hard coded invalid chans */
+ return 1;
}
void ultimate3_SendCTCP(const char *source, const char *dest, const char *buf)
{
- char *s;
+ char *s;
- if (!buf) {
- return;
- } else {
- s = normalizeBuffer(buf);
- }
+ if (!buf) {
+ return;
+ } else {
+ s = normalizeBuffer(buf);
+ }
- send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
- free(s);
+ send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
+ free(s);
}
@@ -1703,78 +1703,78 @@ void ultimate3_SendCTCP(const char *source, const char *dest, const char *buf)
**/
void moduleAddAnopeCmds()
{
- pmodule_cmd_topic(ultimate3_cmd_topic);
- pmodule_SendVhostDel(ultimate3_cmd_vhost_off);
- pmodule_SendAkill(ultimate3_cmd_akill);
- pmodule_SendSVSKill(ultimate3_SendSVSKill);
- pmodule_SendSVSMode(ultimate3_cmd_svsmode);
- pmodule_cmd_372(ultimate3_cmd_372);
- pmodule_cmd_372_error(ultimate3_cmd_372_error);
- pmodule_cmd_375(ultimate3_cmd_375);
- pmodule_cmd_376(ultimate3_cmd_376);
- pmodule_cmd_nick(ultimate3_cmd_nick);
- pmodule_SendGuestNick(ultimate3_cmd_guest_nick);
- pmodule_SendMode(ultimate3_cmd_mode);
- pmodule_SendClientIntroduction(ultimate3_cmd_bot_nick);
- pmodule_SendKick(ultimate3_cmd_kick);
- pmodule_SendNoticeChanops(ultimate3_cmd_notice_ops);
- pmodule_cmd_notice(ultimate3_cmd_notice);
- pmodule_cmd_notice2(ultimate3_cmd_notice2);
- pmodule_cmd_privmsg(ultimate3_cmd_privmsg);
- pmodule_cmd_privmsg2(ultimate3_cmd_privmsg2);
- pmodule_SendGlobalNotice(ultimate3_cmd_serv_notice);
- pmodule_SendGlobalPrivmsg(ultimate3_cmd_serv_privmsg);
- pmodule_SendBotOp(ultimate3_cmd_bot_chan_mode);
- pmodule_cmd_351(ultimate3_cmd_351);
- pmodule_SendQuit(ultimate3_cmd_quit);
- pmodule_SendPong(ultimate3_cmd_pong);
- pmodule_SendJoin(ultimate3_cmd_join);
- pmodule_SendSQLineDel(ultimate3_cmd_unsqline);
- pmodule_SendInvite(ultimate3_cmd_invite);
- pmodule_SendPart(ultimate3_cmd_part);
- pmodule_cmd_391(ultimate3_cmd_391);
- pmodule_cmd_250(ultimate3_cmd_250);
- pmodule_cmd_307(ultimate3_cmd_307);
- pmodule_cmd_311(ultimate3_cmd_311);
- pmodule_cmd_312(ultimate3_cmd_312);
- pmodule_cmd_317(ultimate3_cmd_317);
- pmodule_cmd_219(ultimate3_cmd_219);
- pmodule_cmd_401(ultimate3_cmd_401);
- pmodule_cmd_318(ultimate3_cmd_318);
- pmodule_cmd_242(ultimate3_cmd_242);
- pmodule_cmd_243(ultimate3_cmd_243);
- pmodule_cmd_211(ultimate3_cmd_211);
- pmodule_SendGlobops(ultimate3_cmd_global);
- pmodule_SendGlobops_legacy(ultimate3_cmd_global_legacy);
- pmodule_SendSQLine(ultimate3_cmd_sqline);
- pmodule_SendSquit(ultimate3_cmd_squit);
- pmodule_SendSVSO(ultimate3_cmd_svso);
- pmodule_SendChangeBotNick(ultimate3_cmd_chg_nick);
- pmodule_SendForceNickChange(ultimate3_cmd_svsnick);
- pmodule_SendVhost(ultimate3_cmd_vhost_on);
- pmodule_SendConnect(ultimate3_cmd_connect);
- pmodule_SendSVSHOLD(ultimate3_cmd_svshold);
- pmodule_SendSVSHOLDDel(ultimate3_cmd_release_svshold);
- pmodule_SendSGLineDel(ultimate3_cmd_unsgline);
- pmodule_SendSZLineDel(ultimate3_cmd_unszline);
- pmodule_SendSZLine(ultimate3_cmd_szline);
- pmodule_SendSGLine(ultimate3_cmd_sgline);
- pmodule_SendBanDel(ultimate3_cmd_unban);
- pmodule_SendSVSMode_chan(ultimate3_cmd_svsmode_chan);
- pmodule_SendSVID(ultimate3_cmd_svid_umode);
- pmodule_SendUnregisteredNick(ultimate3_cmd_nc_change);
- pmodule_SendSVID2(ultimate3_cmd_svid_umode2);
- pmodule_SendSVID3(ultimate3_cmd_svid_umode3);
- pmodule_SendSVSJoin(ultimate3_cmd_svsjoin);
- pmodule_SendSVSPart(ultimate3_cmd_svspart);
- pmodule_SendSWhois(ultimate3_cmd_swhois);
- pmodule_SendEOB(ultimate3_cmd_eob);
- pmodule_IsFloodModeParamValid(ultiamte3_flood_mode_check);
- pmodule_SendJupe(ultimate3_cmd_jupe);
- pmodule_IsNickValid(ultiamte3_valid_nick);
- pmodule_IsChannelValid(ultiamte3_valid_chan);
- pmodule_SendCTCP(ultimate3_cmd_ctcp);
- pmodule_ProcessUsermodes(ultimate3_set_umode);
+ pmodule_cmd_topic(ultimate3_cmd_topic);
+ pmodule_SendVhostDel(ultimate3_cmd_vhost_off);
+ pmodule_SendAkill(ultimate3_cmd_akill);
+ pmodule_SendSVSKill(ultimate3_SendSVSKill);
+ pmodule_SendSVSMode(ultimate3_cmd_svsmode);
+ pmodule_cmd_372(ultimate3_cmd_372);
+ pmodule_cmd_372_error(ultimate3_cmd_372_error);
+ pmodule_cmd_375(ultimate3_cmd_375);
+ pmodule_cmd_376(ultimate3_cmd_376);
+ pmodule_cmd_nick(ultimate3_cmd_nick);
+ pmodule_SendGuestNick(ultimate3_cmd_guest_nick);
+ pmodule_SendMode(ultimate3_cmd_mode);
+ pmodule_SendClientIntroduction(ultimate3_cmd_bot_nick);
+ pmodule_SendKick(ultimate3_cmd_kick);
+ pmodule_SendNoticeChanops(ultimate3_cmd_notice_ops);
+ pmodule_cmd_notice(ultimate3_cmd_notice);
+ pmodule_cmd_notice2(ultimate3_cmd_notice2);
+ pmodule_cmd_privmsg(ultimate3_cmd_privmsg);
+ pmodule_cmd_privmsg2(ultimate3_cmd_privmsg2);
+ pmodule_SendGlobalNotice(ultimate3_cmd_serv_notice);
+ pmodule_SendGlobalPrivmsg(ultimate3_cmd_serv_privmsg);
+ pmodule_SendBotOp(ultimate3_cmd_bot_chan_mode);
+ pmodule_cmd_351(ultimate3_cmd_351);
+ pmodule_SendQuit(ultimate3_cmd_quit);
+ pmodule_SendPong(ultimate3_cmd_pong);
+ pmodule_SendJoin(ultimate3_cmd_join);
+ pmodule_SendSQLineDel(ultimate3_cmd_unsqline);
+ pmodule_SendInvite(ultimate3_cmd_invite);
+ pmodule_SendPart(ultimate3_cmd_part);
+ pmodule_cmd_391(ultimate3_cmd_391);
+ pmodule_cmd_250(ultimate3_cmd_250);
+ pmodule_cmd_307(ultimate3_cmd_307);
+ pmodule_cmd_311(ultimate3_cmd_311);
+ pmodule_cmd_312(ultimate3_cmd_312);
+ pmodule_cmd_317(ultimate3_cmd_317);
+ pmodule_cmd_219(ultimate3_cmd_219);
+ pmodule_cmd_401(ultimate3_cmd_401);
+ pmodule_cmd_318(ultimate3_cmd_318);
+ pmodule_cmd_242(ultimate3_cmd_242);
+ pmodule_cmd_243(ultimate3_cmd_243);
+ pmodule_cmd_211(ultimate3_cmd_211);
+ pmodule_SendGlobops(ultimate3_cmd_global);
+ pmodule_SendGlobops_legacy(ultimate3_cmd_global_legacy);
+ pmodule_SendSQLine(ultimate3_cmd_sqline);
+ pmodule_SendSquit(ultimate3_cmd_squit);
+ pmodule_SendSVSO(ultimate3_cmd_svso);
+ pmodule_SendChangeBotNick(ultimate3_cmd_chg_nick);
+ pmodule_SendForceNickChange(ultimate3_cmd_svsnick);
+ pmodule_SendVhost(ultimate3_cmd_vhost_on);
+ pmodule_SendConnect(ultimate3_cmd_connect);
+ pmodule_SendSVSHOLD(ultimate3_cmd_svshold);
+ pmodule_SendSVSHOLDDel(ultimate3_cmd_release_svshold);
+ pmodule_SendSGLineDel(ultimate3_cmd_unsgline);
+ pmodule_SendSZLineDel(ultimate3_cmd_unszline);
+ pmodule_SendSZLine(ultimate3_cmd_szline);
+ pmodule_SendSGLine(ultimate3_cmd_sgline);
+ pmodule_SendBanDel(ultimate3_cmd_unban);
+ pmodule_SendSVSMode_chan(ultimate3_cmd_svsmode_chan);
+ pmodule_SendSVID(ultimate3_cmd_svid_umode);
+ pmodule_SendUnregisteredNick(ultimate3_cmd_nc_change);
+ pmodule_SendSVID2(ultimate3_cmd_svid_umode2);
+ pmodule_SendSVID3(ultimate3_cmd_svid_umode3);
+ pmodule_SendSVSJoin(ultimate3_cmd_svsjoin);
+ pmodule_SendSVSPart(ultimate3_cmd_svspart);
+ pmodule_SendSWhois(ultimate3_cmd_swhois);
+ pmodule_SendEOB(ultimate3_cmd_eob);
+ pmodule_IsFloodModeParamValid(ultiamte3_flood_mode_check);
+ pmodule_SendJupe(ultimate3_cmd_jupe);
+ pmodule_IsNickValid(ultiamte3_valid_nick);
+ pmodule_IsChannelValid(ultiamte3_valid_chan);
+ pmodule_SendCTCP(ultimate3_cmd_ctcp);
+ pmodule_ProcessUsermodes(ultimate3_set_umode);
}
/**
@@ -1783,35 +1783,35 @@ void moduleAddAnopeCmds()
int AnopeInit(int argc, char **argv)
{
- this->SetAuthor("Anope");
- this->SetVersion
- ("$Id$");
- this->SetType(PROTOCOL);
-
- pmodule_ircd_version("UltimateIRCd 3.0.0.a26+");
- pmodule_ircd_cap(myIrcdcap);
- pmodule_ircd_var(myIrcd);
- pmodule_ircd_cbmodeinfos(myCbmodeinfos);
- pmodule_ircd_cumodes(myCumodes);
- pmodule_ircd_flood_mode_char_set("");
- pmodule_ircd_flood_mode_char_remove("");
- pmodule_ircd_cbmodes(myCbmodes);
- pmodule_ircd_cmmodes(myCmmodes);
- pmodule_ircd_csmodes(myCsmodes);
- pmodule_ircd_useTSMode(0);
-
- /** Deal with modes anope _needs_ to know **/
- pmodule_invis_umode(UMODE_i);
- pmodule_oper_umode(UMODE_o);
- pmodule_invite_cmode(CMODE_i);
- pmodule_secret_cmode(CMODE_s);
- pmodule_private_cmode(CMODE_p);
- pmodule_key_mode(CMODE_k);
- pmodule_limit_mode(CMODE_l);
-
- moduleAddAnopeCmds();
+ this->SetAuthor("Anope");
+ this->SetVersion
+ ("$Id$");
+ this->SetType(PROTOCOL);
+
+ pmodule_ircd_version("UltimateIRCd 3.0.0.a26+");
+ pmodule_ircd_cap(myIrcdcap);
+ pmodule_ircd_var(myIrcd);
+ pmodule_ircd_cbmodeinfos(myCbmodeinfos);
+ pmodule_ircd_cumodes(myCumodes);
+ pmodule_ircd_flood_mode_char_set("");
+ pmodule_ircd_flood_mode_char_remove("");
+ pmodule_ircd_cbmodes(myCbmodes);
+ pmodule_ircd_cmmodes(myCmmodes);
+ pmodule_ircd_csmodes(myCsmodes);
+ pmodule_ircd_useTSMode(0);
+
+ /** Deal with modes anope _needs_ to know **/
+ pmodule_invis_umode(UMODE_i);
+ pmodule_oper_umode(UMODE_o);
+ pmodule_invite_cmode(CMODE_i);
+ pmodule_secret_cmode(CMODE_s);
+ pmodule_private_cmode(CMODE_p);
+ pmodule_key_mode(CMODE_k);
+ pmodule_limit_mode(CMODE_l);
+
+ moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
- moduleAddIRCDMsgs();
+ moduleAddIRCDMsgs();
- return MOD_CONT;
+ return MOD_CONT;
}
diff --git a/src/protocol/obsolete/ultimate3.h b/src/protocol/obsolete/ultimate3.h
index a67dc8e5f..de7683a21 100644
--- a/src/protocol/obsolete/ultimate3.h
+++ b/src/protocol/obsolete/ultimate3.h
@@ -46,8 +46,8 @@
#define CMODE_S 0x00002000
#define CMODE_K 0x00004000
#define CMODE_O 0x00008000 /* Only opers can join */
-#define CMODE_q 0x00010000 /* No Quit Reason */
-#define CMODE_M 0x00020000 /* Non-regged nicks can't send messages */
+#define CMODE_q 0x00010000 /* No Quit Reason */
+#define CMODE_M 0x00020000 /* Non-regged nicks can't send messages */
#define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
diff --git a/src/protocol/obsolete/viagra.c b/src/protocol/obsolete/viagra.c
index eaacb2c21..dfe3454cd 100644
--- a/src/protocol/obsolete/viagra.c
+++ b/src/protocol/obsolete/viagra.c
@@ -17,133 +17,133 @@
#include "viagra.h"
IRCDVar myIrcd[] = {
- {"ViagraIRCd 1.3.*", /* ircd name */
- "+oS", /* nickserv mode */
- "+oS", /* chanserv mode */
- "+oS", /* memoserv mode */
- "+oS", /* hostserv mode */
- "+ioS", /* operserv mode */
- "+oS", /* botserv mode */
- "+oS", /* helpserv mode */
- "+i", /* Dev/Null mode */
- "+ioS", /* Global mode */
- "+oS", /* nickserv alias mode */
- "+oS", /* chanserv alias mode */
- "+oS", /* memoserv alias mode */
- "+ioS", /* hostserv alias mode */
- "+ioS", /* operserv alias mode */
- "+oS", /* botserv alias mode */
- "+oS", /* helpserv alias mode */
- "+iS", /* Dev/Null alias mode */
- "+ioS", /* Global alias mode */
- "+qS", /* Used by BotServ Bots */
- 5, /* Chan Max Symbols */
- "-ciklmnpstOR", /* 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 */
- 0, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- 0, /* Protected Umode */
- 1, /* Has Admin */
- 0, /* Chan SQlines */
- 1, /* Quit on Kill */
- 1, /* SVSMODE unban */
- 1, /* Has Protect */
- 0, /* Reverse */
- 1, /* Chan Reg */
- CMODE_r, /* Channel Mode */
- 1, /* vidents */
- 0, /* svshold */
- 1, /* time stamp on mode */
- 1, /* NICKIP */
- 0, /* O:LINE */
- 1, /* UMODE */
- 1, /* VHOST ON NICK */
- 1, /* Change RealName */
- 0, /* No Knock */
- 0, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- UMODE_x, /* Vhost Mode */
- 0, /* +f */
- 0, /* +L */
- 0,
- 0,
- 1,
- 1, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support TOKENS */
- 1, /* TOKENS are CASE inSensitive */
- 0, /* TIME STAMPS are BASE64 */
- 0, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* 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 */
- }
- ,
- {NULL}
+ {"ViagraIRCd 1.3.*", /* ircd name */
+ "+oS", /* nickserv mode */
+ "+oS", /* chanserv mode */
+ "+oS", /* memoserv mode */
+ "+oS", /* hostserv mode */
+ "+ioS", /* operserv mode */
+ "+oS", /* botserv mode */
+ "+oS", /* helpserv mode */
+ "+i", /* Dev/Null mode */
+ "+ioS", /* Global mode */
+ "+oS", /* nickserv alias mode */
+ "+oS", /* chanserv alias mode */
+ "+oS", /* memoserv alias mode */
+ "+ioS", /* hostserv alias mode */
+ "+ioS", /* operserv alias mode */
+ "+oS", /* botserv alias mode */
+ "+oS", /* helpserv alias mode */
+ "+iS", /* Dev/Null alias mode */
+ "+ioS", /* Global alias mode */
+ "+qS", /* Used by BotServ Bots */
+ 5, /* Chan Max Symbols */
+ "-ciklmnpstOR", /* 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 */
+ 0, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ 0, /* Protected Umode */
+ 1, /* Has Admin */
+ 0, /* Chan SQlines */
+ 1, /* Quit on Kill */
+ 1, /* SVSMODE unban */
+ 1, /* Has Protect */
+ 0, /* Reverse */
+ 1, /* Chan Reg */
+ CMODE_r, /* Channel Mode */
+ 1, /* vidents */
+ 0, /* svshold */
+ 1, /* time stamp on mode */
+ 1, /* NICKIP */
+ 0, /* O:LINE */
+ 1, /* UMODE */
+ 1, /* VHOST ON NICK */
+ 1, /* Change RealName */
+ 0, /* No Knock */
+ 0, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ UMODE_x, /* Vhost Mode */
+ 0, /* +f */
+ 0, /* +L */
+ 0,
+ 0,
+ 1,
+ 1, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support TOKENS */
+ 1, /* TOKENS are CASE inSensitive */
+ 0, /* TIME STAMPS are BASE64 */
+ 0, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* 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 */
+ }
+ ,
+ {NULL}
};
IRCDCAPAB myIrcdcap[] = {
- {
- CAPAB_NOQUIT, /* NOQUIT */
- CAPAB_TSMODE, /* TSMODE */
- CAPAB_UNCONNECT, /* UNCONNECT */
- CAPAB_NICKIP, /* NICKIP */
- CAPAB_NSJOIN, /* SJOIN */
- CAPAB_ZIP, /* ZIP */
- CAPAB_BURST, /* BURST */
- CAPAB_TS5, /* TS5 */
- CAPAB_TS3, /* TS3 */
- CAPAB_DKEY, /* DKEY */
- 0, /* PT4 */
- 0, /* SCS */
- 0, /* QS */
- 0, /* UID */
- 0, /* KNOCK */
- 0, /* CLIENT */
- 0, /* IPV6 */
- 0, /* SSJ5 */
- 0, /* SN2 */
- 0, /* TOKEN */
- 0, /* VHOST */
- 0, /* SSJ3 */
- 0, /* NICK2 */
- 0, /* UMODE2 */
- 0, /* VL */
- 0, /* TLKEXT */
- CAPAB_DODKEY, /* DODKEY */
- CAPAB_DOZIP, /* DOZIP */
- 0, 0, 0}
+ {
+ CAPAB_NOQUIT, /* NOQUIT */
+ CAPAB_TSMODE, /* TSMODE */
+ CAPAB_UNCONNECT, /* UNCONNECT */
+ CAPAB_NICKIP, /* NICKIP */
+ CAPAB_NSJOIN, /* SJOIN */
+ CAPAB_ZIP, /* ZIP */
+ CAPAB_BURST, /* BURST */
+ CAPAB_TS5, /* TS5 */
+ CAPAB_TS3, /* TS3 */
+ CAPAB_DKEY, /* DKEY */
+ 0, /* PT4 */
+ 0, /* SCS */
+ 0, /* QS */
+ 0, /* UID */
+ 0, /* KNOCK */
+ 0, /* CLIENT */
+ 0, /* IPV6 */
+ 0, /* SSJ5 */
+ 0, /* SN2 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ 0, /* SSJ3 */
+ 0, /* NICK2 */
+ 0, /* UMODE2 */
+ 0, /* VL */
+ 0, /* TLKEXT */
+ CAPAB_DODKEY, /* DODKEY */
+ CAPAB_DOZIP, /* DOZIP */
+ 0, 0, 0}
};
@@ -151,364 +151,364 @@ IRCDCAPAB myIrcdcap[] = {
void viagra_ProcessUsermodes(User * user, int ac, const char **av)
{
- int add = 1; /* 1 if adding modes, 0 if deleting */
- const char *modes = av[0];
-
- ac--;
-
- if (debug)
- alog("debug: Changing mode for %s to %s", user->nick, modes);
-
- while (*modes) {
-
- /* This looks better, much better than "add ? (do_add) : (do_remove)".
- * At least this is readable without paying much attention :) -GD
- */
- if (add)
- user->mode |= umodes[(int) *modes];
- else
- user->mode &= ~umodes[(int) *modes];
-
- switch (*modes++) {
- case '+':
- add = 1;
- break;
- case '-':
- add = 0;
- break;
- case 'd':
- if (ac == 0) {
- alog("user: umode +d with no parameter (?) for user %s",
- user->nick);
- break;
- }
-
- ac--;
- av++;
- user->svid = strtoul(*av, NULL, 0);
- break;
- case 'o':
- if (add) {
- opcnt++;
- if (WallOper) {
- anope_SendGlobops(s_OperServ,
- "\2%s\2 is now an IRC operator.",
- user->nick);
- }
- display_news(user, NEWS_OPER);
- } else {
- opcnt--;
- }
- break;
- case 'r':
- if (add && !nick_identified(user)) {
- common_svsmode(user, "-r", NULL);
- user->mode &= ~UMODE_r;
- }
- break;
- case 'x':
- update_host(user);
- break;
- }
- }
+ int add = 1; /* 1 if adding modes, 0 if deleting */
+ const char *modes = av[0];
+
+ ac--;
+
+ if (debug)
+ alog("debug: Changing mode for %s to %s", user->nick, modes);
+
+ while (*modes) {
+
+ /* This looks better, much better than "add ? (do_add) : (do_remove)".
+ * At least this is readable without paying much attention :) -GD
+ */
+ if (add)
+ user->mode |= umodes[(int) *modes];
+ else
+ user->mode &= ~umodes[(int) *modes];
+
+ switch (*modes++) {
+ case '+':
+ add = 1;
+ break;
+ case '-':
+ add = 0;
+ break;
+ case 'd':
+ if (ac == 0) {
+ alog("user: umode +d with no parameter (?) for user %s",
+ user->nick);
+ break;
+ }
+
+ ac--;
+ av++;
+ user->svid = strtoul(*av, NULL, 0);
+ break;
+ case 'o':
+ if (add) {
+ opcnt++;
+ if (WallOper) {
+ anope_SendGlobops(s_OperServ,
+ "\2%s\2 is now an IRC operator.",
+ user->nick);
+ }
+ display_news(user, NEWS_OPER);
+ } else {
+ opcnt--;
+ }
+ break;
+ case 'r':
+ if (add && !nick_identified(user)) {
+ common_svsmode(user, "-r", NULL);
+ user->mode &= ~UMODE_r;
+ }
+ break;
+ case 'x':
+ update_host(user);
+ break;
+ }
+ }
}
unsigned long umodes[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, UMODE_A, 0, UMODE_C, 0, 0, 0, 0, 0, UMODE_I, 0, 0, 0, 0, UMODE_N,
- UMODE_O,
- 0,
- UMODE_Q,
- UMODE_R,
- UMODE_S, UMODE_T, 0, 0, 0, 0, 0,
- 0,
- 0, 0, 0, 0, 0,
- 0, UMODE_a, UMODE_b, UMODE_c, UMODE_d, UMODE_e, UMODE_f,
- UMODE_g,
- UMODE_h, UMODE_i, 0, 0, 0, 0, UMODE_n, UMODE_o,
- 0,
- 0, UMODE_r, UMODE_s, 0, 0, 0, UMODE_w,
- UMODE_x,
- 0,
- 0,
- 0, 0, 0, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, UMODE_A, 0, UMODE_C, 0, 0, 0, 0, 0, UMODE_I, 0, 0, 0, 0, UMODE_N,
+ UMODE_O,
+ 0,
+ UMODE_Q,
+ UMODE_R,
+ UMODE_S, UMODE_T, 0, 0, 0, 0, 0,
+ 0,
+ 0, 0, 0, 0, 0,
+ 0, UMODE_a, UMODE_b, UMODE_c, UMODE_d, UMODE_e, UMODE_f,
+ UMODE_g,
+ UMODE_h, UMODE_i, 0, 0, 0, 0, UMODE_n, UMODE_o,
+ 0,
+ 0, UMODE_r, UMODE_s, 0, 0, 0, UMODE_w,
+ UMODE_x,
+ 0,
+ 0,
+ 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 */
- 0, /* (38) & bans */
- 0, 0, 0,
- 'q',
+ 0,
+ 0,
+ 0, 0, 0,
+ 'h', /* (37) % Channel halfops */
+ 0, /* (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}, {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},
- {add_ban, del_ban},
- {NULL},
- {NULL},
- {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}, {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},
+ {add_ban, del_ban},
+ {NULL},
+ {NULL},
+ {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},
- {0}, /* A */
- {0}, /* B */
- {0}, /* C */
- {0}, /* D */
- {0}, /* E */
- {0}, /* F */
- {0}, /* G */
- {CMODE_H, 0, NULL, NULL}, /* H */
- {0}, /* I */
- {0}, /* J */
- {0}, /* K */
- {0}, /* L */
- {CMODE_M, 0, NULL, NULL}, /* M */
- {CMODE_N, 0, NULL, NULL}, /* N */
- {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
- {CMODE_P, 0, NULL, NULL}, /* P */
- {0}, /* Q */
- {CMODE_R, 0, NULL, NULL}, /* R */
- {CMODE_S, 0, NULL, NULL}, /* S */
- {0}, /* T */
- {0}, /* U */
- {0}, /* 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 */
- {0}, /* f */
- {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},
- {0},
- {0}, /* v */
- {0}, /* w */
- {CMODE_x, 0, NULL, NULL}, /* 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}, /* A */
+ {0}, /* B */
+ {0}, /* C */
+ {0}, /* D */
+ {0}, /* E */
+ {0}, /* F */
+ {0}, /* G */
+ {CMODE_H, 0, NULL, NULL}, /* H */
+ {0}, /* I */
+ {0}, /* J */
+ {0}, /* K */
+ {0}, /* L */
+ {CMODE_M, 0, NULL, NULL}, /* M */
+ {CMODE_N, 0, NULL, NULL}, /* N */
+ {CMODE_O, CBM_NO_USER_MLOCK, NULL, NULL},
+ {CMODE_P, 0, NULL, NULL}, /* P */
+ {0}, /* Q */
+ {CMODE_R, 0, NULL, NULL}, /* R */
+ {CMODE_S, 0, NULL, NULL}, /* S */
+ {0}, /* T */
+ {0}, /* U */
+ {0}, /* 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 */
+ {0}, /* f */
+ {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},
+ {0},
+ {0}, /* v */
+ {0}, /* w */
+ {CMODE_x, 0, NULL, NULL}, /* x */
+ {0}, /* y */
+ {0}, /* z */
+ {0}, {0}, {0}, {0}
};
CBModeInfo myCbmodeinfos[] = {
- {'c', CMODE_c, 0, NULL, NULL},
- {'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},
- {'x', CMODE_x, 0, NULL, NULL},
- {'H', CMODE_H, 0, NULL, NULL},
- {'M', CMODE_M, 0, NULL, NULL},
- {'N', CMODE_N, 0, NULL, NULL},
- {'O', CMODE_O, 0, NULL, NULL},
- {'P', CMODE_P, 0, NULL, NULL},
- {'R', CMODE_R, 0, NULL, NULL},
- {'S', CMODE_S, 0, NULL, NULL},
- {0}
+ {'c', CMODE_c, 0, NULL, NULL},
+ {'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},
+ {'x', CMODE_x, 0, NULL, NULL},
+ {'H', CMODE_H, 0, NULL, NULL},
+ {'M', CMODE_M, 0, NULL, NULL},
+ {'N', CMODE_N, 0, NULL, NULL},
+ {'O', CMODE_O, 0, NULL, NULL},
+ {'P', CMODE_P, 0, NULL, NULL},
+ {'R', CMODE_R, 0, NULL, NULL},
+ {'S', CMODE_S, 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}
};
void viagra_cmd_bot_unban(ChannelInfo * ci, const char *nick)
{
- send_cmd(ServerName, "SVSMODE %s -b %s", ci->name, nick);
+ send_cmd(ServerName, "SVSMODE %s -b %s", ci->name, nick);
}
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_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;
}
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;
}
/*
@@ -518,102 +518,102 @@ int anope_event_chgident(const char *source, int ac, const char **av)
*/
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;
}
int anope_event_nick(const char *source, int ac, const char **av)
{
- User *user;
+ User *user;
- if (ac != 2) {
- user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
- strtoul(av[2], NULL, 10), strtoul(av[7], NULL, 0),
- strtoul(av[8], NULL, 0), "*", NULL);
- if (user) {
- anope_ProcessUsermodes(user, 1, &av[3]);
- }
- } else {
- do_nick(source, av[0], NULL, NULL, NULL, NULL,
- strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
- }
- return MOD_CONT;
+ if (ac != 2) {
+ user = do_nick(source, av[0], av[4], av[5], av[6], av[9],
+ strtoul(av[2], NULL, 10), strtoul(av[7], NULL, 0),
+ strtoul(av[8], NULL, 0), "*", NULL);
+ if (user) {
+ anope_ProcessUsermodes(user, 1, &av[3]);
+ }
+ } 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_vs(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: VS for nonexistent user %s", av[0]);
- }
- return MOD_CONT;
- }
+ u = finduser(av[0]);
+ if (!u) {
+ if (debug) {
+ alog("debug: VS for nonexistent user %s", av[0]);
+ }
+ return MOD_CONT;
+ }
- u->SetDisplayedHost(av[1]);
- return MOD_CONT;
+ u->SetDisplayedHost(av[1]);
+ 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;
}
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;
}
int anope_event_notice(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_pass(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_svinfo(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
/*
@@ -623,35 +623,35 @@ int anope_event_svinfo(const char *source, int ac, const char **av)
*/
int anope_event_gnotice(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_sqline(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_burst(const char *source, int ac, const char **av)
{
- Server *s;
- s = findserver(servlist, source);
- if (!ac) {
- /* for future use - start burst */
- } else {
- /* 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 (!ac) {
+ /* for future use - start burst */
+ } else {
+ /* 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_tctrl(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
/*
@@ -661,81 +661,81 @@ int anope_event_tctrl(const char *source, int ac, const char **av)
*/
int anope_event_error(const char *source, int ac, const char **av)
{
- if (ac >= 1) {
- if (debug) {
- alog("debug: %s", av[0]);
- }
- }
- return MOD_CONT;
+ if (ac >= 1) {
+ if (debug) {
+ alog("debug: %s", av[0]);
+ }
+ }
+ return MOD_CONT;
}
/* *INDENT-OFF* */
void moduleAddIRCDMsgs(void) {
- Message *m;
-
- updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a");
-
- m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
- m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
- m = createMessage("INVITE", anope_event_invite); addCoreMessage(IRCD,m);
- m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
- m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
- m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
- m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
- m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m);
- m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
- m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
- m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
- m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
- m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
- m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
- m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
- m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
- m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
- m = createMessage("AKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GLOBOPS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("GNOTICE", anope_event_gnotice); addCoreMessage(IRCD,m);
- m = createMessage("GOPER", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("RAKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SQLINE", anope_event_sqline); addCoreMessage(IRCD,m);
- m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
- m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m);
- m = createMessage("HS", anope_event_hs); addCoreMessage(IRCD,m);
- m = createMessage("MS", anope_event_ms); addCoreMessage(IRCD,m);
- m = createMessage("NS", anope_event_ns); addCoreMessage(IRCD,m);
- m = createMessage("OS", anope_event_os); addCoreMessage(IRCD,m);
- m = createMessage("RS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SGLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
- m = createMessage("SS", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m);
- m = createMessage("SZLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("UNSGLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("UNSZLINE", anope_event_null); addCoreMessage(IRCD,m);
- m = createMessage("CHGHOST", anope_event_chghost); addCoreMessage(IRCD,m);
- m = createMessage("CHGIDENT", anope_event_chgident); addCoreMessage(IRCD,m);
- m = createMessage("CHGNAME", anope_event_chgname); addCoreMessage(IRCD,m);
- m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m);
- m = createMessage("SETIDENT", anope_event_setident); addCoreMessage(IRCD,m);
- m = createMessage("SETNAME", anope_event_setname); addCoreMessage(IRCD,m);
- m = createMessage("VS", anope_event_vs); addCoreMessage(IRCD,m);
- m = createMessage("BURST", anope_event_burst); addCoreMessage(IRCD,m);
- m = createMessage("TCTRL", anope_event_tctrl); addCoreMessage(IRCD,m);
- m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
- m = createMessage("REHASH", anope_event_rehash); addCoreMessage(IRCD,m);
- m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
- m = createMessage("SNOTICE", anope_event_snotice); addCoreMessage(IRCD,m);
+ Message *m;
+
+ updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+a","-a");
+
+ m = createMessage("401", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("402", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
+ m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
+ m = createMessage("INVITE", anope_event_invite); addCoreMessage(IRCD,m);
+ m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
+ m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
+ m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
+ m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
+ m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m);
+ m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
+ m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
+ m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
+ m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
+ m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
+ m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
+ m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
+ m = createMessage("WALLOPS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
+ m = createMessage("AKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GLOBOPS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("GNOTICE", anope_event_gnotice); addCoreMessage(IRCD,m);
+ m = createMessage("GOPER", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("RAKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SILENCE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSKILL", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSMODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("SVSNICK", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVSNOOP", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SQLINE", anope_event_sqline); addCoreMessage(IRCD,m);
+ m = createMessage("UNSQLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
+ m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m);
+ m = createMessage("HS", anope_event_hs); addCoreMessage(IRCD,m);
+ m = createMessage("MS", anope_event_ms); addCoreMessage(IRCD,m);
+ m = createMessage("NS", anope_event_ns); addCoreMessage(IRCD,m);
+ m = createMessage("OS", anope_event_os); addCoreMessage(IRCD,m);
+ m = createMessage("RS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SGLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
+ m = createMessage("SS", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m);
+ m = createMessage("SZLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("UNSGLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("UNSZLINE", anope_event_null); addCoreMessage(IRCD,m);
+ m = createMessage("CHGHOST", anope_event_chghost); addCoreMessage(IRCD,m);
+ m = createMessage("CHGIDENT", anope_event_chgident); addCoreMessage(IRCD,m);
+ m = createMessage("CHGNAME", anope_event_chgname); addCoreMessage(IRCD,m);
+ m = createMessage("SETHOST", anope_event_sethost); addCoreMessage(IRCD,m);
+ m = createMessage("SETIDENT", anope_event_setident); addCoreMessage(IRCD,m);
+ m = createMessage("SETNAME", anope_event_setname); addCoreMessage(IRCD,m);
+ m = createMessage("VS", anope_event_vs); addCoreMessage(IRCD,m);
+ m = createMessage("BURST", anope_event_burst); addCoreMessage(IRCD,m);
+ m = createMessage("TCTRL", anope_event_tctrl); addCoreMessage(IRCD,m);
+ m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
+ m = createMessage("REHASH", anope_event_rehash); addCoreMessage(IRCD,m);
+ m = createMessage("ADMIN", anope_event_admin); addCoreMessage(IRCD,m);
+ m = createMessage("SNOTICE", anope_event_snotice); addCoreMessage(IRCD,m);
}
/* *INDENT-ON* */
@@ -744,26 +744,26 @@ void moduleAddIRCDMsgs(void) {
/* SQLINE */
void viagra_SendSQLine(const char *mask, const char *reason)
{
- if (!mask || !reason) {
- return;
- }
+ if (!mask || !reason) {
+ return;
+ }
- send_cmd(NULL, "SQLINE %s :%s", mask, reason);
+ send_cmd(NULL, "SQLINE %s :%s", mask, reason);
}
void viagra_SendSGLineDel(const char *mask)
{
- send_cmd(NULL, "UNSGLINE 0 :%s", mask);
+ send_cmd(NULL, "UNSGLINE 0 :%s", mask);
}
void viagra_SendSZLineDel(const char *mask)
{
- send_cmd(NULL, "UNSZLINE 0 %s", mask);
+ send_cmd(NULL, "UNSZLINE 0 %s", mask);
}
void viagra_SendSZLine(const char *mask, const char *reason, const char *whom)
{
- send_cmd(NULL, "SZLINE %s :%s", mask, reason);
+ send_cmd(NULL, "SZLINE %s :%s", mask, reason);
}
void ViagraIRCdProto::SendSVSNOOP(const char *server, int set)
@@ -778,7 +778,7 @@ void viagra_cmd_svsadmin(const char *server, int set)
void viagra_SendSGLine(const char *mask, const char *reason)
{
- send_cmd(NULL, "SGLINE %d :%s:%s", (int)strlen(mask), mask, reason);
+ send_cmd(NULL, "SGLINE %d :%s:%s", (int)strlen(mask), mask, reason);
}
void ViagraIRCdProto::SendAkillDel(const char *user, const char *host)
@@ -789,47 +789,47 @@ void ViagraIRCdProto::SendAkillDel(const char *user, const char *host)
/* PART */
void viagra_SendPart(const char *nick, const char *chan, const char *buf)
{
- if (!nick || !chan) {
- return;
- }
+ if (!nick || !chan) {
+ return;
+ }
- if (buf) {
- send_cmd(nick, "PART %s :%s", chan, buf);
- } else {
- send_cmd(nick, "PART %s", chan);
- }
+ if (buf) {
+ send_cmd(nick, "PART %s :%s", chan, buf);
+ } else {
+ send_cmd(nick, "PART %s", chan);
+ }
}
void viagra_cmd_topic(const char *whosets, const char *chan, const char *whosetit,
- const char *topic, time_t when)
+ const char *topic, time_t when)
{
- send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
- (unsigned long int) when, topic);
+ send_cmd(whosets, "TOPIC %s %s %lu :%s", chan, whosetit,
+ (unsigned long int) when, topic);
}
void viagra_SendVhostDel(User * u)
{
- send_cmd(NULL, "SVSMODE %s -x", u->nick);
- notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick, ircd->vhostchar);
+ send_cmd(NULL, "SVSMODE %s -x", u->nick);
+ notice_lang(s_HostServ, u, HOST_OFF_UNREAL, u->nick, ircd->vhostchar);
}
void viagra_SendVhost(const char *nick, const char *vIdent, const char *vhost)
{
- if (vIdent) {
- send_cmd(NULL, "CHGIDENT %s %s", nick, vIdent);
- }
- send_cmd(NULL, "SVSMODE %s +x", nick);
- send_cmd(NULL, "SVSCHGHOST %s %s", nick, vhost);
+ if (vIdent) {
+ send_cmd(NULL, "CHGIDENT %s %s", nick, vIdent);
+ }
+ send_cmd(NULL, "SVSMODE %s +x", nick);
+ send_cmd(NULL, "SVSCHGHOST %s %s", nick, vhost);
}
void viagra_SendSQLineDel(const char *user)
{
- send_cmd(NULL, "UNSQLINE %s", user);
+ send_cmd(NULL, "UNSQLINE %s", user);
}
void viagra_SendJoin(const char *user, const char *channel, time_t chantime)
{
- send_cmd(user, "SJOIN %ld %s", (long int) chantime, channel);
+ send_cmd(user, "SJOIN %ld %s", (long int) chantime, channel);
}
@@ -843,10 +843,10 @@ void viagra_SendJoin(const char *user, const char *channel, time_t chantime)
* parv[6]=reason
*/
void viagra_SendAkill(const char *user, const char *host, const char *who, time_t when,
- time_t expires, const char *reason)
+ time_t expires, const char *reason)
{
- send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", host, user, 86400 * 2, who,
- (long int) time(NULL), reason);
+ send_cmd(NULL, "AKILL %s %s %d %s %ld :%s", host, user, 86400 * 2, who,
+ (long int) time(NULL), reason);
}
@@ -859,72 +859,72 @@ void viagra_SendAkill(const char *user, const char *host, const char *who, time_
*/
void viagra_SendSVSKill(const char *source, const char *user, const char *buf)
{
- if (buf) {
- send_cmd(source, "SVSKILL %s :%s", user, buf);
- }
- return;
+ if (buf) {
+ send_cmd(source, "SVSKILL %s :%s", user, buf);
+ }
+ return;
}
void viagra_SendMode(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (ircdcap->tsmode) {
- if (uplink_capab & ircdcap->tsmode) {
- send_cmd(source, "MODE %s 0 %s", dest, buf);
- } else {
- send_cmd(source, "MODE %s %s", dest, buf);
- }
- } else {
- send_cmd(source, "MODE %s %s", dest, buf);
- }
+ if (ircdcap->tsmode) {
+ if (uplink_capab & ircdcap->tsmode) {
+ send_cmd(source, "MODE %s 0 %s", dest, buf);
+ } else {
+ send_cmd(source, "MODE %s %s", dest, buf);
+ }
+ } else {
+ send_cmd(source, "MODE %s %s", dest, buf);
+ }
}
/* QUIT */
void viagra_SendQuit(const char *source, const char *buf)
{
- if (buf) {
- send_cmd(source, "QUIT :%s", buf);
- } else {
- send_cmd(source, "QUIT");
- }
+ if (buf) {
+ send_cmd(source, "QUIT :%s", buf);
+ } else {
+ send_cmd(source, "QUIT");
+ }
}
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;
}
int anope_event_ping(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- viagra_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ viagra_SendPong(ac > 1 ? av[1] : ServerName, av[0]);
+ return MOD_CONT;
}
void viagra_SendSVSMode(User * u, int ac, const char **av)
{
- send_cmd(ServerName, "SVSMODE %s %ld %s%s%s", u->nick,
- (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
- (ac == 2 ? av[1] : ""));
+ send_cmd(ServerName, "SVSMODE %s %ld %s%s%s", u->nick,
+ (long int) u->timestamp, av[0], (ac == 2 ? " " : ""),
+ (ac == 2 ? av[1] : ""));
}
void viagra_SendSquit(const char *servname, const char *message)
{
- send_cmd(NULL, "SQUIT %s :%s", servname, message);
+ send_cmd(NULL, "SQUIT %s :%s", servname, message);
}
/* PONG */
void viagra_SendPong(const char *servname, const char *who)
{
- send_cmd(servname, "PONG %s", who);
+ send_cmd(servname, "PONG %s", who);
}
/*
@@ -937,551 +937,551 @@ void viagra_SendPong(const char *servname, const char *who)
*/
void viagra_cmd_svinfo()
{
- send_cmd(NULL, "SVINFO 5 3 0 :%ld", (long int) time(NULL));
+ send_cmd(NULL, "SVINFO 5 3 0 :%ld", (long int) time(NULL));
}
/* CAPAB */
void viagra_cmd_capab()
{
- send_cmd(NULL, "CAPAB TS5 NOQUIT SSJOIN BURST UNCONNECT NICKIP");
+ send_cmd(NULL, "CAPAB TS5 NOQUIT SSJOIN BURST UNCONNECT NICKIP");
}
/* PASS */
void viagra_cmd_pass(const char *pass)
{
- send_cmd(NULL, "PASS %s :TS", pass);
+ send_cmd(NULL, "PASS %s :TS", pass);
}
/* SERVER */
void viagra_SendServer(const char *servname, int hop, const char *descript)
{
- send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
+ send_cmd(NULL, "SERVER %s %d :%s", servname, hop, descript);
}
void viagra_cmd_burst()
{
- send_cmd(NULL, "BURST");
+ send_cmd(NULL, "BURST");
}
void viagra_SendConnect(int servernum)
{
- me_server =
- new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
+ me_server =
+ new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
- if (servernum == 1) {
- viagra_cmd_pass(RemotePassword);
- } else if (servernum == 2) {
- viagra_cmd_pass(RemotePassword2);
- } else if (servernum == 3) {
- viagra_cmd_pass(RemotePassword3);
- }
- viagra_cmd_capab();
- viagra_SendServer(ServerName, 1, ServerDesc);
- viagra_cmd_svinfo();
- viagra_cmd_burst();
+ if (servernum == 1) {
+ viagra_cmd_pass(RemotePassword);
+ } else if (servernum == 2) {
+ viagra_cmd_pass(RemotePassword2);
+ } else if (servernum == 3) {
+ viagra_cmd_pass(RemotePassword3);
+ }
+ viagra_cmd_capab();
+ viagra_SendServer(ServerName, 1, ServerDesc);
+ viagra_cmd_svinfo();
+ viagra_cmd_burst();
}
/* EVENT : OS */
int anope_event_os(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_OperServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_OperServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : NS */
int anope_event_ns(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_NickServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_NickServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : MS */
int anope_event_ms(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_MemoServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_MemoServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : HS */
int anope_event_hs(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_HostServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_HostServ, av[0]);
+ return MOD_CONT;
}
/* EVENT : CS */
int anope_event_cs(const char *source, int ac, const char **av)
{
- if (ac < 1)
- return MOD_CONT;
- m_privmsg(source, s_ChanServ, av[0]);
- return MOD_CONT;
+ if (ac < 1)
+ return MOD_CONT;
+ m_privmsg(source, s_ChanServ, av[0]);
+ return MOD_CONT;
}
int anope_event_server(const char *source, int ac, const char **av)
{
- if (!stricmp(av[1], "1")) {
- uplink = sstrdup(av[0]);
- }
- do_server(source, av[0], av[1], av[2], NULL);
- return MOD_CONT;
+ if (!stricmp(av[1], "1")) {
+ uplink = sstrdup(av[0]);
+ }
+ 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_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 (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 (*av[0] == '#' || *av[0] == '&') {
+ do_cmode(source, ac, av);
+ } else {
+ do_umode(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;
}
void viagra_SendNoticeChanops(const char *source, const char *dest, const char *buf)
{
- if (buf) {
- send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
- }
- return;
+ if (buf) {
+ send_cmd(NULL, "NOTICE @%s :%s", dest, buf);
+ }
+ return;
}
void viagra_cmd_notice(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- if (NSDefFlags & NI_MSG) {
- viagra_cmd_privmsg2(source, dest, buf);
- } else {
- send_cmd(source, "NOTICE %s :%s", dest, buf);
- }
+ if (NSDefFlags & NI_MSG) {
+ viagra_cmd_privmsg2(source, dest, buf);
+ } else {
+ send_cmd(source, "NOTICE %s :%s", dest, buf);
+ }
}
void viagra_cmd_notice2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE %s :%s", dest, msg);
+ send_cmd(source, "NOTICE %s :%s", dest, msg);
}
void viagra_cmd_privmsg(const char *source, const char *dest, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source, "PRIVMSG %s :%s", dest, buf);
+ send_cmd(source, "PRIVMSG %s :%s", dest, buf);
}
void viagra_cmd_privmsg2(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG %s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG %s :%s", dest, msg);
}
void viagra_SendGlobalNotice(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "NOTICE $%s :%s", dest, msg);
+ send_cmd(source, "NOTICE $%s :%s", dest, msg);
}
void viagra_SendGlobalPrivmsg(const char *source, const char *dest, const char *msg)
{
- send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
+ send_cmd(source, "PRIVMSG $%s :%s", dest, msg);
}
/* GLOBOPS */
void viagra_SendGlobops(const char *source, const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
+ send_cmd(source ? source : ServerName, "GLOBOPS :%s", buf);
}
/* 391 */
void viagra_cmd_391(const char *source, const char *timestr)
{
- if (!timestr) {
- return;
- }
- send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
+ if (!timestr) {
+ return;
+ }
+ send_cmd(NULL, "391 :%s %s :%s", source, ServerName, timestr);
}
/* 250 */
void viagra_cmd_250(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "250 %s", buf);
+ send_cmd(NULL, "250 %s", buf);
}
/* 307 */
void viagra_cmd_307(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "307 %s", buf);
+ send_cmd(ServerName, "307 %s", buf);
}
/* 311 */
void viagra_cmd_311(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "311 %s", buf);
+ send_cmd(ServerName, "311 %s", buf);
}
/* 312 */
void viagra_cmd_312(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "312 %s", buf);
+ send_cmd(ServerName, "312 %s", buf);
}
/* 317 */
void viagra_cmd_317(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(ServerName, "317 %s", buf);
+ send_cmd(ServerName, "317 %s", buf);
}
/* 219 */
void viagra_cmd_219(const char *source, const char *letter)
{
- if (!source) {
- return;
- }
+ if (!source) {
+ return;
+ }
- if (letter) {
- send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
- *letter);
- } else {
- send_cmd(NULL, "219 %s l :End of /STATS report.", source);
- }
+ if (letter) {
+ send_cmd(NULL, "219 %s %c :End of /STATS report.", source,
+ *letter);
+ } else {
+ send_cmd(NULL, "219 %s l :End of /STATS report.", source);
+ }
}
/* 401 */
void viagra_cmd_401(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
- send_cmd(ServerName, "401 %s %s :No such service.", source, who);
+ if (!source || !who) {
+ return;
+ }
+ send_cmd(ServerName, "401 %s %s :No such service.", source, who);
}
/* 318 */
void viagra_cmd_318(const char *source, const char *who)
{
- if (!source || !who) {
- return;
- }
+ if (!source || !who) {
+ return;
+ }
- send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
+ send_cmd(ServerName, "318 %s %s :End of /WHOIS list.", source, who);
}
/* 242 */
void viagra_cmd_242(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "242 %s", buf);
+ send_cmd(NULL, "242 %s", buf);
}
/* 243 */
void viagra_cmd_243(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "243 %s", buf);
+ send_cmd(NULL, "243 %s", buf);
}
/* 211 */
void viagra_cmd_211(const char *buf)
{
- if (!buf) {
- return;
- }
+ if (!buf) {
+ return;
+ }
- send_cmd(NULL, "211 %s", buf);
+ send_cmd(NULL, "211 %s", buf);
}
void viagra_cmd_351(const char *source)
{
- send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
- source, version_number, ServerName, ircd->name, version_flags,
- EncModule, version_build);
+ send_cmd(ServerName, "351 %s Anope-%s %s :%s - %s (%s) -- %s",
+ source, version_number, ServerName, ircd->name, version_flags,
+ EncModule, version_build);
}
void viagra_SendClientIntroduction(const char *nick, const char *user, const char *host, const char *real,
- const char *modes)
+ const char *modes)
{
- EnforceQlinedNick(nick, s_BotServ);
- send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
- (long int) time(NULL), modes, user, host, ServerName, real);
- viagra_SendSQLine(nick, "Reserved for services");
+ EnforceQlinedNick(nick, s_BotServ);
+ send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
+ (long int) time(NULL), modes, user, host, ServerName, real);
+ viagra_SendSQLine(nick, "Reserved for services");
}
void viagra_SendKick(const char *source, const char *chan, const char *user, const char *buf)
{
- if (buf) {
- send_cmd(source, "KICK %s %s :%s", chan, user, buf);
- } else {
- send_cmd(source, "KICK %s %s", chan, user);
- }
+ if (buf) {
+ send_cmd(source, "KICK %s %s :%s", chan, user, buf);
+ } else {
+ send_cmd(source, "KICK %s %s", chan, user);
+ }
}
void viagra_cmd_nick(const char *nick, const char *name, const char *modes)
{
- EnforceQlinedNick(nick, NULL);
- send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
- (long int) time(NULL), modes, ServiceUser, ServiceHost,
- ServerName, name);
- viagra_SendSQLine(nick, "Reserved for services");
+ EnforceQlinedNick(nick, NULL);
+ send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
+ (long int) time(NULL), modes, ServiceUser, ServiceHost,
+ ServerName, name);
+ viagra_SendSQLine(nick, "Reserved for services");
}
void viagra_cmd_372(const char *source, const char *msg)
{
- send_cmd(ServerName, "372 %s :- %s", source, msg);
+ send_cmd(ServerName, "372 %s :- %s", source, msg);
}
void viagra_cmd_372_error(const char *source)
{
- send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
- "contact your IRC administrator.", source);
+ send_cmd(ServerName, "422 %s :- MOTD file not found! Please "
+ "contact your IRC administrator.", source);
}
void viagra_cmd_375(const char *source)
{
- send_cmd(ServerName, "375 %s :- %s Message of the Day",
- source, ServerName);
+ send_cmd(ServerName, "375 %s :- %s Message of the Day",
+ source, ServerName);
}
void viagra_cmd_376(const char *source)
{
- send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
+ send_cmd(ServerName, "376 %s :End of /MOTD command.", source);
}
/* INVITE */
void viagra_SendInvite(const char *source, const char *chan, const char *nick)
{
- if (!source || !chan || !nick) {
- return;
- }
+ if (!source || !chan || !nick) {
+ return;
+ }
- send_cmd(source, "INVITE %s %s", nick, chan);
+ send_cmd(source, "INVITE %s %s", nick, chan);
}
void viagra_SendBotOp(const char *nick, const char *chan)
{
- anope_SendMode(nick, chan, "%s %s", ircd->botchanumode, nick);
+ anope_SendMode(nick, chan, "%s %s", ircd->botchanumode, nick);
}
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;
}
/* SVSHOLD - set */
void viagra_SendSVSHOLD(const char *nick)
{
- /* Not supported by this IRCD */
+ /* Not supported by this IRCD */
}
/* SVSHOLD - release */
void viagra_SendSVSHOLDDel(const char *nick)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
/* SVSNICK */
void viagra_SendForceNickChange(const char *source, const char *guest, time_t when)
{
- if (!source || !guest) {
- return;
- }
- send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
+ if (!source || !guest) {
+ return;
+ }
+ send_cmd(NULL, "SVSNICK %s %s :%ld", source, guest, (long int) when);
}
void viagra_SendGuestNick(const char *nick, const char *user, const char *host, const char *real,
- const char *modes)
+ const char *modes)
{
- send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
- (long int) time(NULL), modes, user, host, ServerName, real);
+ send_cmd(NULL, "NICK %s 1 %ld %s %s %s %s 0 0 :%s", nick,
+ (long int) time(NULL), modes, user, host, ServerName, real);
}
void viagra_SendSVSO(const char *source, const char *nick, const char *flag)
{
- /* Not Supported by this IRCD */
+ /* Not Supported by this IRCD */
}
/* SVSMODE -b */
void viagra_SendBanDel(const char *name, const char *nick)
{
- viagra_SendSVSMode_chan(name, "-b", nick);
+ viagra_SendSVSMode_chan(name, "-b", nick);
}
/* SVSMODE channel modes */
void viagra_SendSVSMode_chan(const char *name, const char *mode, const char *nick)
{
- if (nick) {
- send_cmd(ServerName, "SVSMODE %s %s %s", name, mode, nick);
- } else {
- send_cmd(ServerName, "SVSMODE %s %s", name, mode);
- }
+ if (nick) {
+ send_cmd(ServerName, "SVSMODE %s %s %s", name, mode, nick);
+ } else {
+ send_cmd(ServerName, "SVSMODE %s %s", name, mode);
+ }
}
/* SVSMODE +d */
/* sent if svid is something weird */
void viagra_SendSVID(const char *nick, time_t ts)
{
- send_cmd(ServerName, "SVSMODE %s %lu +d 1", nick,
- (unsigned long int) ts);
+ send_cmd(ServerName, "SVSMODE %s %lu +d 1", nick,
+ (unsigned long int) ts);
}
/* SVSMODE +d */
/* nc_change was = 1, and there is no na->status */
void viagra_SendUnregisteredNick(User * u)
{
- common_svsmode(u, "+d", "1");
+ common_svsmode(u, "+d", "1");
}
/* SVSMODE +d */
void viagra_SendSVID2(User * u, const char *ts)
{
- /* not used by bahamut ircds */
+ /* not used by bahamut ircds */
}
void viagra_SendSVID3(User * u, const char *ts)
{
- if (u->svid != u->timestamp) {
- common_svsmode(u, "+rd", ts);
- } else {
- common_svsmode(u, "+r", NULL);
- }
+ if (u->svid != u->timestamp) {
+ common_svsmode(u, "+rd", ts);
+ } else {
+ common_svsmode(u, "+r", NULL);
+ }
}
/* NICK <newnick> */
void viagra_SendChangeBotNick(const char *oldnick, const char *newnick)
{
- if (!oldnick || !newnick) {
- return;
- }
+ if (!oldnick || !newnick) {
+ return;
+ }
- send_cmd(oldnick, "NICK %s", newnick);
+ send_cmd(oldnick, "NICK %s", newnick);
}
/*
@@ -1492,7 +1492,7 @@ void viagra_SendChangeBotNick(const char *oldnick, const char *newnick)
*/
void viagra_SendSVSJoin(const char *source, const char *nick, const char *chan, const char *param)
{
- send_cmd(source, "SVSJOIN %s :%s", nick, chan);
+ send_cmd(source, "SVSJOIN %s :%s", nick, chan);
}
/*
@@ -1503,61 +1503,61 @@ void viagra_SendSVSJoin(const char *source, const char *nick, const char *chan,
*/
void viagra_SendSVSPart(const char *source, const char *nick, const char *chan)
{
- send_cmd(source, "SVSPART %s :%s", nick, chan);
+ send_cmd(source, "SVSPART %s :%s", nick, chan);
}
void viagra_SendSWhois(const char *source, const char *who, const char *mask)
{
- /* not supported */
+ /* not supported */
}
int viagra_IsFloodModeParamValid(const char *value)
{
- return 0;
+ return 0;
}
int anope_event_rehash(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_admin(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_snotice(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_invite(const char *source, int ac, const char **av)
{
- return MOD_CONT;
+ return MOD_CONT;
}
void viagra_SendEOB()
{
- send_cmd(NULL, "BURST 0");
+ send_cmd(NULL, "BURST 0");
}
void viagra_SendJupe(const char *jserver, const char *who, const char *reason)
{
- char rbuf[256];
+ char rbuf[256];
- snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
- reason ? ": " : "", reason ? reason : "");
+ snprintf(rbuf, sizeof(rbuf), "Juped by %s%s%s", who,
+ reason ? ": " : "", reason ? reason : "");
- if (findserver(servlist, jserver))
- viagra_SendSquit(jserver, rbuf);
- viagra_SendServer(jserver, 2, rbuf);
- new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
+ if (findserver(servlist, jserver))
+ viagra_SendSquit(jserver, rbuf);
+ viagra_SendServer(jserver, 2, rbuf);
+ new_server(me_server, jserver, rbuf, SERVER_JUPED, NULL);
}
/* GLOBOPS - to handle old WALLOPS */
void viagra_SendGlobops_legacy(const char *source, const char *fmt)
{
- send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
+ send_cmd(source ? source : ServerName, "GLOBOPS :%s", fmt);
}
/*
@@ -1566,8 +1566,8 @@ void viagra_SendGlobops_legacy(const char *source, const char *fmt)
*/
int viagra_IsNickValid(const char *nick)
{
- /* no hard coded invalid nicks */
- return 1;
+ /* no hard coded invalid nicks */
+ return 1;
}
/*
@@ -1576,23 +1576,23 @@ int viagra_IsNickValid(const char *nick)
*/
int viagra_IsChannelValid(const char *chan)
{
- /* no hard coded invalid chans */
- return 1;
+ /* no hard coded invalid chans */
+ return 1;
}
void viagra_SendCTCP(const char *source, const char *dest, const char *buf)
{
- char *s;
+ char *s;
- if (!buf) {
- return;
- } else {
- s = normalizeBuffer(buf);
- }
+ if (!buf) {
+ return;
+ } else {
+ s = normalizeBuffer(buf);
+ }
- send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
- free(s);
+ send_cmd(source, "NOTICE %s :\1%s \1", dest, s);
+ free(s);
}
@@ -1602,78 +1602,78 @@ void viagra_SendCTCP(const char *source, const char *dest, const char *buf)
**/
void moduleAddAnopeCmds()
{
- pmodule_cmd_topic(viagra_cmd_topic);
- pmodule_SendVhostDel(viagra_cmd_vhost_off);
- pmodule_SendAkill(viagra_cmd_akill);
- pmodule_SendSVSKill(viagra_SendSVSKill);
- pmodule_SendSVSMode(viagra_cmd_svsmode);
- pmodule_cmd_372(viagra_cmd_372);
- pmodule_cmd_372_error(viagra_cmd_372_error);
- pmodule_cmd_375(viagra_cmd_375);
- pmodule_cmd_376(viagra_cmd_376);
- pmodule_cmd_nick(viagra_cmd_nick);
- pmodule_SendGuestNick(viagra_cmd_guest_nick);
- pmodule_SendMode(viagra_cmd_mode);
- pmodule_SendClientIntroduction(viagra_cmd_bot_nick);
- pmodule_SendKick(viagra_cmd_kick);
- pmodule_SendNoticeChanops(viagra_cmd_notice_ops);
- pmodule_cmd_notice(viagra_cmd_notice);
- pmodule_cmd_notice2(viagra_cmd_notice2);
- pmodule_cmd_privmsg(viagra_cmd_privmsg);
- pmodule_cmd_privmsg2(viagra_cmd_privmsg2);
- pmodule_SendGlobalNotice(viagra_cmd_serv_notice);
- pmodule_SendGlobalPrivmsg(viagra_cmd_serv_privmsg);
- pmodule_SendBotOp(viagra_cmd_bot_chan_mode);
- pmodule_cmd_351(viagra_cmd_351);
- pmodule_SendQuit(viagra_cmd_quit);
- pmodule_SendPong(viagra_cmd_pong);
- pmodule_SendJoin(viagra_cmd_join);
- pmodule_SendSQLineDel(viagra_cmd_unsqline);
- pmodule_SendInvite(viagra_cmd_invite);
- pmodule_SendPart(viagra_cmd_part);
- pmodule_cmd_391(viagra_cmd_391);
- pmodule_cmd_250(viagra_cmd_250);
- pmodule_cmd_307(viagra_cmd_307);
- pmodule_cmd_311(viagra_cmd_311);
- pmodule_cmd_312(viagra_cmd_312);
- pmodule_cmd_317(viagra_cmd_317);
- pmodule_cmd_219(viagra_cmd_219);
- pmodule_cmd_401(viagra_cmd_401);
- pmodule_cmd_318(viagra_cmd_318);
- pmodule_cmd_242(viagra_cmd_242);
- pmodule_cmd_243(viagra_cmd_243);
- pmodule_cmd_211(viagra_cmd_211);
- pmodule_SendGlobops(viagra_cmd_global);
- pmodule_SendGlobops_legacy(viagra_cmd_global_legacy);
- pmodule_SendSQLine(viagra_cmd_sqline);
- pmodule_SendSquit(viagra_cmd_squit);
- pmodule_SendSVSO(viagra_cmd_svso);
- pmodule_SendChangeBotNick(viagra_cmd_chg_nick);
- pmodule_SendForceNickChange(viagra_cmd_svsnick);
- pmodule_SendVhost(viagra_cmd_vhost_on);
- pmodule_SendConnect(viagra_cmd_connect);
- pmodule_SendSVSHOLD(viagra_cmd_svshold);
- pmodule_SendSVSHOLDDel(viagra_cmd_release_svshold);
- pmodule_SendSGLineDel(viagra_cmd_unsgline);
- pmodule_SendSZLineDel(viagra_cmd_unszline);
- pmodule_SendSZLine(viagra_cmd_szline);
- pmodule_SendSGLine(viagra_cmd_sgline);
- pmodule_SendBanDel(viagra_cmd_unban);
- pmodule_SendSVSMode_chan(viagra_cmd_svsmode_chan);
- pmodule_SendSVID(viagra_cmd_svid_umode);
- pmodule_SendUnregisteredNick(viagra_cmd_nc_change);
- pmodule_SendSVID2(viagra_cmd_svid_umode2);
- pmodule_SendSVID3(viagra_cmd_svid_umode3);
- pmodule_SendSVSJoin(viagra_cmd_svsjoin);
- pmodule_SendSVSPart(viagra_cmd_svspart);
- pmodule_SendSWhois(viagra_cmd_swhois);
- pmodule_SendEOB(viagra_cmd_eob);
- pmodule_IsFloodModeParamValid(viagra_flood_mode_check);
- pmodule_SendJupe(viagra_cmd_jupe);
- pmodule_IsNickValid(viagra_valid_nick);
- pmodule_IsChannelValid(viagra_valid_chan);
- pmodule_SendCTCP(viagra_cmd_ctcp);
- pmodule_ProcessUsermodes(viagra_set_umode);
+ pmodule_cmd_topic(viagra_cmd_topic);
+ pmodule_SendVhostDel(viagra_cmd_vhost_off);
+ pmodule_SendAkill(viagra_cmd_akill);
+ pmodule_SendSVSKill(viagra_SendSVSKill);
+ pmodule_SendSVSMode(viagra_cmd_svsmode);
+ pmodule_cmd_372(viagra_cmd_372);
+ pmodule_cmd_372_error(viagra_cmd_372_error);
+ pmodule_cmd_375(viagra_cmd_375);
+ pmodule_cmd_376(viagra_cmd_376);
+ pmodule_cmd_nick(viagra_cmd_nick);
+ pmodule_SendGuestNick(viagra_cmd_guest_nick);
+ pmodule_SendMode(viagra_cmd_mode);
+ pmodule_SendClientIntroduction(viagra_cmd_bot_nick);
+ pmodule_SendKick(viagra_cmd_kick);
+ pmodule_SendNoticeChanops(viagra_cmd_notice_ops);
+ pmodule_cmd_notice(viagra_cmd_notice);
+ pmodule_cmd_notice2(viagra_cmd_notice2);
+ pmodule_cmd_privmsg(viagra_cmd_privmsg);
+ pmodule_cmd_privmsg2(viagra_cmd_privmsg2);
+ pmodule_SendGlobalNotice(viagra_cmd_serv_notice);
+ pmodule_SendGlobalPrivmsg(viagra_cmd_serv_privmsg);
+ pmodule_SendBotOp(viagra_cmd_bot_chan_mode);
+ pmodule_cmd_351(viagra_cmd_351);
+ pmodule_SendQuit(viagra_cmd_quit);
+ pmodule_SendPong(viagra_cmd_pong);
+ pmodule_SendJoin(viagra_cmd_join);
+ pmodule_SendSQLineDel(viagra_cmd_unsqline);
+ pmodule_SendInvite(viagra_cmd_invite);
+ pmodule_SendPart(viagra_cmd_part);
+ pmodule_cmd_391(viagra_cmd_391);
+ pmodule_cmd_250(viagra_cmd_250);
+ pmodule_cmd_307(viagra_cmd_307);
+ pmodule_cmd_311(viagra_cmd_311);
+ pmodule_cmd_312(viagra_cmd_312);
+ pmodule_cmd_317(viagra_cmd_317);
+ pmodule_cmd_219(viagra_cmd_219);
+ pmodule_cmd_401(viagra_cmd_401);
+ pmodule_cmd_318(viagra_cmd_318);
+ pmodule_cmd_242(viagra_cmd_242);
+ pmodule_cmd_243(viagra_cmd_243);
+ pmodule_cmd_211(viagra_cmd_211);
+ pmodule_SendGlobops(viagra_cmd_global);
+ pmodule_SendGlobops_legacy(viagra_cmd_global_legacy);
+ pmodule_SendSQLine(viagra_cmd_sqline);
+ pmodule_SendSquit(viagra_cmd_squit);
+ pmodule_SendSVSO(viagra_cmd_svso);
+ pmodule_SendChangeBotNick(viagra_cmd_chg_nick);
+ pmodule_SendForceNickChange(viagra_cmd_svsnick);
+ pmodule_SendVhost(viagra_cmd_vhost_on);
+ pmodule_SendConnect(viagra_cmd_connect);
+ pmodule_SendSVSHOLD(viagra_cmd_svshold);
+ pmodule_SendSVSHOLDDel(viagra_cmd_release_svshold);
+ pmodule_SendSGLineDel(viagra_cmd_unsgline);
+ pmodule_SendSZLineDel(viagra_cmd_unszline);
+ pmodule_SendSZLine(viagra_cmd_szline);
+ pmodule_SendSGLine(viagra_cmd_sgline);
+ pmodule_SendBanDel(viagra_cmd_unban);
+ pmodule_SendSVSMode_chan(viagra_cmd_svsmode_chan);
+ pmodule_SendSVID(viagra_cmd_svid_umode);
+ pmodule_SendUnregisteredNick(viagra_cmd_nc_change);
+ pmodule_SendSVID2(viagra_cmd_svid_umode2);
+ pmodule_SendSVID3(viagra_cmd_svid_umode3);
+ pmodule_SendSVSJoin(viagra_cmd_svsjoin);
+ pmodule_SendSVSPart(viagra_cmd_svspart);
+ pmodule_SendSWhois(viagra_cmd_swhois);
+ pmodule_SendEOB(viagra_cmd_eob);
+ pmodule_IsFloodModeParamValid(viagra_flood_mode_check);
+ pmodule_SendJupe(viagra_cmd_jupe);
+ pmodule_IsNickValid(viagra_valid_nick);
+ pmodule_IsChannelValid(viagra_valid_chan);
+ pmodule_SendCTCP(viagra_cmd_ctcp);
+ pmodule_ProcessUsermodes(viagra_set_umode);
}
/**
@@ -1682,34 +1682,34 @@ void moduleAddAnopeCmds()
int AnopeInit(int argc, char **argv)
{
- this->SetAuthor("Anope");
- this->SetVersion("$Id$");
- this->SetType(PROTOCOL);
-
- pmodule_ircd_version("ViagraIRCd 1.3.x");
- pmodule_ircd_cap(myIrcdcap);
- pmodule_ircd_var(myIrcd);
- pmodule_ircd_cbmodeinfos(myCbmodeinfos);
- pmodule_ircd_cumodes(myCumodes);
- pmodule_ircd_flood_mode_char_set("");
- pmodule_ircd_flood_mode_char_remove("");
- pmodule_ircd_cbmodes(myCbmodes);
- pmodule_ircd_cmmodes(myCmmodes);
- pmodule_ircd_csmodes(myCsmodes);
- pmodule_ircd_useTSMode(0);
-
- /** Deal with modes anope _needs_ to know **/
- pmodule_invis_umode(UMODE_i);
- pmodule_oper_umode(UMODE_o);
- pmodule_invite_cmode(CMODE_i);
- pmodule_secret_cmode(CMODE_s);
- pmodule_private_cmode(CMODE_p);
- pmodule_key_mode(CMODE_k);
- pmodule_limit_mode(CMODE_l);
-
- moduleAddAnopeCmds();
+ this->SetAuthor("Anope");
+ this->SetVersion("$Id$");
+ this->SetType(PROTOCOL);
+
+ pmodule_ircd_version("ViagraIRCd 1.3.x");
+ pmodule_ircd_cap(myIrcdcap);
+ pmodule_ircd_var(myIrcd);
+ pmodule_ircd_cbmodeinfos(myCbmodeinfos);
+ pmodule_ircd_cumodes(myCumodes);
+ pmodule_ircd_flood_mode_char_set("");
+ pmodule_ircd_flood_mode_char_remove("");
+ pmodule_ircd_cbmodes(myCbmodes);
+ pmodule_ircd_cmmodes(myCmmodes);
+ pmodule_ircd_csmodes(myCsmodes);
+ pmodule_ircd_useTSMode(0);
+
+ /** Deal with modes anope _needs_ to know **/
+ pmodule_invis_umode(UMODE_i);
+ pmodule_oper_umode(UMODE_o);
+ pmodule_invite_cmode(CMODE_i);
+ pmodule_secret_cmode(CMODE_s);
+ pmodule_private_cmode(CMODE_p);
+ pmodule_key_mode(CMODE_k);
+ pmodule_limit_mode(CMODE_l);
+
+ moduleAddAnopeCmds();
pmodule_ircd_proto(&ircd_proto);
- moduleAddIRCDMsgs();
+ moduleAddIRCDMsgs();
- return MOD_CONT;
+ return MOD_CONT;
}
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index b46826e3a..7e29d09d5 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -48,363 +48,363 @@
#define DEFAULT_MLOCK CMODE_n | CMODE_t
IRCDVar myIrcd[] = {
- {"Ratbox 2.0+", /* ircd name */
- "+oi", /* Modes used by pseudoclients */
- 2, /* Chan Max Symbols */
- "-acilmnpst", /* Modes to Remove */
- "+o", /* Channel Umode used by Botserv bots */
- 0, /* SVSNICK */
- 0, /* Vhost */
- 0, /* Has Owner */
- NULL, /* Mode to set for an owner */
- NULL, /* Mode to unset for an owner */
- NULL, /* Mode to set for chan admin */
- NULL, /* Mode to unset for chan admin */
- NULL, /* Mode On Reg */
- NULL, /* Mode on ID for Roots */
- NULL, /* Mode on ID for Admins */
- NULL, /* Mode on ID for Opers */
- NULL, /* Mode on UnReg */
- NULL, /* Mode on Nick Change */
- 1, /* Supports SGlines */
- 1, /* Supports SQlines */
- 0, /* Supports SZlines */
- 0, /* Supports Halfop +h */
- 3, /* Number of server args */
- 1, /* Join 2 Set */
- 1, /* Join 2 Message */
- 1, /* Has exceptions +e */
- 0, /* TS Topic Forward */
- 0, /* TS Topci Backward */
- 0, /* Protected Umode */
- 0, /* Has Admin */
- 1, /* Chan SQlines */
- 0, /* Quit on Kill */
- 0, /* SVSMODE unban */
- 0, /* Has Protect */
- 0, /* Reverse */
- 0, /* Chan Reg */
- 0, /* Channel Mode */
- 0, /* vidents */
- 0, /* svshold */
- 0, /* time stamp on mode */
- 0, /* NICKIP */
- 0, /* UMODE */
- 0, /* O:LINE */
- 0, /* VHOST ON NICK */
- 0, /* Change RealName */
- CMODE_p, /* No Knock */
- 0, /* Admin Only */
- DEFAULT_MLOCK, /* Default MLOCK */
- 0, /* Vhost Mode */
- 0, /* +f */
- 0, /* +L */
- 0, /* +f Mode */
- 0, /* +L Mode */
- 0, /* On nick change check if they could be identified */
- 0, /* No Knock requires +i */
- NULL, /* CAPAB Chan Modes */
- 0, /* We support TOKENS */
- 0, /* TIME STAMPS are BASE64 */
- 1, /* +I support */
- 0, /* SJOIN ban char */
- 0, /* SJOIN except char */
- 0, /* SJOIN invite char */
- 0, /* Can remove User Channel Modes with SVSMODE */
- 0, /* Sglines are not enforced until user reconnects */
- NULL, /* vhost char */
- 1, /* ts6 */
- 0, /* support helper umode */
- 0, /* p10 */
- NULL, /* character set */
- 0, /* reports sync state */
- 0, /* CIDR channelbans */
- "$$", /* TLD Prefix for Global */
- }
- ,
- {NULL}
+ {"Ratbox 2.0+", /* ircd name */
+ "+oi", /* Modes used by pseudoclients */
+ 2, /* Chan Max Symbols */
+ "-acilmnpst", /* Modes to Remove */
+ "+o", /* Channel Umode used by Botserv bots */
+ 0, /* SVSNICK */
+ 0, /* Vhost */
+ 0, /* Has Owner */
+ NULL, /* Mode to set for an owner */
+ NULL, /* Mode to unset for an owner */
+ NULL, /* Mode to set for chan admin */
+ NULL, /* Mode to unset for chan admin */
+ NULL, /* Mode On Reg */
+ NULL, /* Mode on ID for Roots */
+ NULL, /* Mode on ID for Admins */
+ NULL, /* Mode on ID for Opers */
+ NULL, /* Mode on UnReg */
+ NULL, /* Mode on Nick Change */
+ 1, /* Supports SGlines */
+ 1, /* Supports SQlines */
+ 0, /* Supports SZlines */
+ 0, /* Supports Halfop +h */
+ 3, /* Number of server args */
+ 1, /* Join 2 Set */
+ 1, /* Join 2 Message */
+ 1, /* Has exceptions +e */
+ 0, /* TS Topic Forward */
+ 0, /* TS Topci Backward */
+ 0, /* Protected Umode */
+ 0, /* Has Admin */
+ 1, /* Chan SQlines */
+ 0, /* Quit on Kill */
+ 0, /* SVSMODE unban */
+ 0, /* Has Protect */
+ 0, /* Reverse */
+ 0, /* Chan Reg */
+ 0, /* Channel Mode */
+ 0, /* vidents */
+ 0, /* svshold */
+ 0, /* time stamp on mode */
+ 0, /* NICKIP */
+ 0, /* UMODE */
+ 0, /* O:LINE */
+ 0, /* VHOST ON NICK */
+ 0, /* Change RealName */
+ CMODE_p, /* No Knock */
+ 0, /* Admin Only */
+ DEFAULT_MLOCK, /* Default MLOCK */
+ 0, /* Vhost Mode */
+ 0, /* +f */
+ 0, /* +L */
+ 0, /* +f Mode */
+ 0, /* +L Mode */
+ 0, /* On nick change check if they could be identified */
+ 0, /* No Knock requires +i */
+ NULL, /* CAPAB Chan Modes */
+ 0, /* We support TOKENS */
+ 0, /* TIME STAMPS are BASE64 */
+ 1, /* +I support */
+ 0, /* SJOIN ban char */
+ 0, /* SJOIN except char */
+ 0, /* SJOIN invite char */
+ 0, /* Can remove User Channel Modes with SVSMODE */
+ 0, /* Sglines are not enforced until user reconnects */
+ NULL, /* vhost char */
+ 1, /* ts6 */
+ 0, /* support helper umode */
+ 0, /* p10 */
+ NULL, /* character set */
+ 0, /* reports sync state */
+ 0, /* CIDR channelbans */
+ "$$", /* TLD Prefix for Global */
+ }
+ ,
+ {NULL}
};
IRCDCAPAB myIrcdcap[] = {
- {
- 0, /* NOQUIT */
- 0, /* TSMODE */
- 0, /* UNCONNECT */
- 0, /* NICKIP */
- 0, /* SJOIN */
- CAPAB_ZIP, /* ZIP */
- 0, /* BURST */
- CAPAB_TS5, /* TS5 */
- 0, /* TS3 */
- 0, /* DKEY */
- 0, /* PT4 */
- 0, /* SCS */
- CAPAB_QS, /* QS */
- CAPAB_UID, /* UID */
- CAPAB_KNOCK, /* KNOCK */
- 0, /* CLIENT */
- 0, /* IPV6 */
- 0, /* SSJ5 */
- 0, /* SN2 */
- 0, /* TOKEN */
- 0, /* VHOST */
- 0, /* SSJ3 */
- 0, /* NICK2 */
- 0, /* UMODE2 */
- 0, /* VL */
- 0, /* TLKEXT */
- 0, /* DODKEY */
- 0, /* DOZIP */
- 0, 0, 0}
+ {
+ 0, /* NOQUIT */
+ 0, /* TSMODE */
+ 0, /* UNCONNECT */
+ 0, /* NICKIP */
+ 0, /* SJOIN */
+ CAPAB_ZIP, /* ZIP */
+ 0, /* BURST */
+ CAPAB_TS5, /* TS5 */
+ 0, /* TS3 */
+ 0, /* DKEY */
+ 0, /* PT4 */
+ 0, /* SCS */
+ CAPAB_QS, /* QS */
+ CAPAB_UID, /* UID */
+ CAPAB_KNOCK, /* KNOCK */
+ 0, /* CLIENT */
+ 0, /* IPV6 */
+ 0, /* SSJ5 */
+ 0, /* SN2 */
+ 0, /* TOKEN */
+ 0, /* VHOST */
+ 0, /* SSJ3 */
+ 0, /* NICK2 */
+ 0, /* UMODE2 */
+ 0, /* VL */
+ 0, /* TLKEXT */
+ 0, /* DODKEY */
+ 0, /* DOZIP */
+ 0, 0, 0}
};
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, /* ? @ */
- 0, 0, 0, /* A B C */
- 0, 0, 0, /* D E F */
- 0, 0, 0, /* G H I */
- 0, 0, 0, /* J K L */
- 0, 0, 0, /* M N O */
- 0, 0, 0, /* P Q R */
- 0, 0, 0, /* S T U */
- 0, 0, 0, /* V W X */
- 0, /* Y */
- 0, /* Z */
- 0, 0, 0, /* [ \ ] */
- 0, 0, 0, /* ^ _ ` */
- UMODE_a, UMODE_b, 0, /* a b c */
- UMODE_d, 0, 0, /* d e f */
- UMODE_g, 0, UMODE_i, /* g h i */
- 0, 0, UMODE_l, /* j k l */
- 0, UMODE_n, UMODE_o, /* m n o */
- 0, 0, 0, /* p q r */
- 0, 0, UMODE_u, /* s t u */
- 0, UMODE_w, UMODE_x, /* v w x */
- 0, /* y */
- 0, /* 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, /* ? @ */
+ 0, 0, 0, /* A B C */
+ 0, 0, 0, /* D E F */
+ 0, 0, 0, /* G H I */
+ 0, 0, 0, /* J K L */
+ 0, 0, 0, /* M N O */
+ 0, 0, 0, /* P Q R */
+ 0, 0, 0, /* S T U */
+ 0, 0, 0, /* V W X */
+ 0, /* Y */
+ 0, /* Z */
+ 0, 0, 0, /* [ \ ] */
+ 0, 0, 0, /* ^ _ ` */
+ UMODE_a, UMODE_b, 0, /* a b c */
+ UMODE_d, 0, 0, /* d e f */
+ UMODE_g, 0, UMODE_i, /* g h i */
+ 0, 0, UMODE_l, /* j k l */
+ 0, UMODE_n, UMODE_o, /* m n o */
+ 0, 0, 0, /* p q r */
+ 0, 0, UMODE_u, /* s t u */
+ 0, UMODE_w, UMODE_x, /* v w x */
+ 0, /* y */
+ 0, /* 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,
- 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,
+ '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, 0, 0
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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},
- {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},
- {NULL},
- {NULL},
- {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},
+ {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},
+ {NULL},
+ {NULL},
+ {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},
- {0}, /* A */
- {0}, /* B */
- {0}, /* C */
- {0}, /* D */
- {0}, /* E */
- {0}, /* F */
- {0}, /* G */
- {0}, /* H */
- {0}, /* I */
- {0}, /* J */
- {0}, /* K */
- {0}, /* L */
- {0}, /* M */
- {0}, /* N */
- {0}, /* O */
- {0}, /* P */
- {0}, /* Q */
- {0}, /* R */
- {0}, /* S */
- {0}, /* T */
- {0}, /* U */
- {0}, /* V */
- {0}, /* W */
- {0}, /* X */
- {0}, /* Y */
- {0}, /* Z */
- {0}, {0}, {0}, {0}, {0}, {0},
- {0},
- {0}, /* b */
- {0}, /* c */
- {0}, /* d */
- {0}, /* e */
- {0}, /* f */
- {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 */
- {0},
- {CMODE_s, 0, NULL, NULL},
- {CMODE_t, 0, NULL, NULL},
- {0},
- {0}, /* v */
- {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}, /* A */
+ {0}, /* B */
+ {0}, /* C */
+ {0}, /* D */
+ {0}, /* E */
+ {0}, /* F */
+ {0}, /* G */
+ {0}, /* H */
+ {0}, /* I */
+ {0}, /* J */
+ {0}, /* K */
+ {0}, /* L */
+ {0}, /* M */
+ {0}, /* N */
+ {0}, /* O */
+ {0}, /* P */
+ {0}, /* Q */
+ {0}, /* R */
+ {0}, /* S */
+ {0}, /* T */
+ {0}, /* U */
+ {0}, /* V */
+ {0}, /* W */
+ {0}, /* X */
+ {0}, /* Y */
+ {0}, /* Z */
+ {0}, {0}, {0}, {0}, {0}, {0},
+ {0},
+ {0}, /* b */
+ {0}, /* c */
+ {0}, /* d */
+ {0}, /* e */
+ {0}, /* f */
+ {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 */
+ {0},
+ {CMODE_s, 0, NULL, NULL},
+ {CMODE_t, 0, NULL, NULL},
+ {0},
+ {0}, /* v */
+ {0}, /* w */
+ {0}, /* x */
+ {0}, /* y */
+ {0}, /* z */
+ {0}, {0}, {0}, {0}
};
CBModeInfo myCbmodeinfos[] = {
- {'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},
- {'s', CMODE_s, 0, NULL, NULL},
- {'t', CMODE_t, 0, NULL, NULL},
- {0}
+ {'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},
+ {'s', CMODE_s, 0, NULL, NULL},
+ {'t', CMODE_t, 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},
-
- {0}, /* a */
- {0}, /* b */
- {0}, /* c */
- {0}, /* d */
- {0}, /* e */
- {0}, /* f */
- {0}, /* g */
- {0},
- {0}, /* i */
- {0}, /* j */
- {0}, /* k */
- {0}, /* l */
- {0}, /* m */
- {0}, /* n */
- {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op},
- {0}, /* p */
- {0}, /* q */
- {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},
+
+ {0}, /* a */
+ {0}, /* b */
+ {0}, /* c */
+ {0}, /* d */
+ {0}, /* e */
+ {0}, /* f */
+ {0}, /* g */
+ {0},
+ {0}, /* i */
+ {0}, /* j */
+ {0}, /* k */
+ {0}, /* l */
+ {0}, /* m */
+ {0}, /* n */
+ {CUS_OP, CUF_PROTECT_BOTSERV, check_valid_op},
+ {0}, /* p */
+ {0}, /* q */
+ {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}
};
@@ -412,15 +412,15 @@ CUMode myCumodes[128] = {
/*
* SVINFO
- * parv[0] = sender prefix
- * parv[1] = TS_CURRENT for the server
- * parv[2] = TS_MIN for the server
- * parv[3] = server is standalone or connected to non-TS only
- * parv[4] = server's idea of UTC time
+ * parv[0] = sender prefix
+ * parv[1] = TS_CURRENT for the server
+ * parv[2] = TS_MIN for the server
+ * parv[3] = server is standalone or connected to non-TS only
+ * parv[4] = server's idea of UTC time
*/
void ratbox_cmd_svinfo()
{
- send_cmd(NULL, "SVINFO 6 3 0 :%ld", (long int) time(NULL));
+ send_cmd(NULL, "SVINFO 6 3 0 :%ld", (long int) time(NULL));
}
void ratbox_cmd_svsinfo()
@@ -430,37 +430,37 @@ void ratbox_cmd_svsinfo()
void ratbox_cmd_tmode(const char *source, const char *dest, const char *fmt, ...)
{
- va_list args;
- char buf[BUFSIZE];
- *buf = '\0';
-
- if (fmt) {
- va_start(args, fmt);
- vsnprintf(buf, BUFSIZE - 1, fmt, args);
- va_end(args);
- }
- if (!*buf) {
- return;
- }
-
- send_cmd(NULL, "MODE %s %s", dest, buf);
+ va_list args;
+ char buf[BUFSIZE];
+ *buf = '\0';
+
+ if (fmt) {
+ va_start(args, fmt);
+ vsnprintf(buf, BUFSIZE - 1, fmt, args);
+ va_end(args);
+ }
+ if (!*buf) {
+ return;
+ }
+
+ send_cmd(NULL, "MODE %s %s", dest, buf);
}
/* CAPAB */
/*
- QS - Can handle quit storm removal
- EX - Can do channel +e exemptions
- CHW - Can do channel wall @#
- LL - Can do lazy links
- IE - Can do invite exceptions
- EOB - Can do EOB message
- KLN - Can do KLINE message
- GLN - Can do GLINE message
- HUB - This server is a HUB
- UID - Can do UIDs
- ZIP - Can do ZIPlinks
- ENC - Can do ENCrypted links
+ QS - Can handle quit storm removal
+ EX - Can do channel +e exemptions
+ CHW - Can do channel wall @#
+ LL - Can do lazy links
+ IE - Can do invite exceptions
+ EOB - Can do EOB message
+ KLN - Can do KLINE message
+ GLN - Can do GLINE message
+ HUB - This server is a HUB
+ UID - Can do UIDs
+ ZIP - Can do ZIPlinks
+ ENC - Can do ENCrypted links
KNOCK - supports KNOCK
TBURST - supports TBURST
PARA - supports invite broadcasting for +p
@@ -468,18 +468,18 @@ void ratbox_cmd_tmode(const char *source, const char *dest, const char *fmt, ...
*/
void ratbox_cmd_capab()
{
- send_cmd(NULL,
- "CAPAB :QS EX CHW IE KLN GLN KNOCK TB UNKLN CLUSTER ENCAP");
+ send_cmd(NULL,
+ "CAPAB :QS EX CHW IE KLN GLN KNOCK TB UNKLN CLUSTER ENCAP");
}
/* PASS */
void ratbox_cmd_pass(const char *pass)
{
- if (UseTS6) {
- send_cmd(NULL, "PASS %s TS 6 :%s", pass, TS6SID);
- } else {
- send_cmd(NULL, "PASS %s :TS", pass);
- }
+ if (UseTS6) {
+ send_cmd(NULL, "PASS %s TS 6 :%s", pass, TS6SID);
+ } else {
+ send_cmd(NULL, "PASS %s :TS", pass);
+ }
}
class RatboxProto : public IRCDTS6Proto
@@ -707,8 +707,8 @@ class RatboxProto : public IRCDTS6Proto
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;
}
/*
@@ -737,435 +737,435 @@ int anope_event_sjoin(const char *source, int ac, const char **av)
*/
int anope_event_nick(const char *source, int ac, const char **av)
{
- Server *s;
- User *user;
-
- if (UseTS6 && ac == 9) {
- s = findserver_uid(servlist, source);
- /* Source is always the server */
- user = do_nick("", av[0], av[4], av[5], s->name, av[8],
- strtoul(av[2], NULL, 10), 0, 0, "*", av[7]);
- if (user) {
- ircdproto->ProcessUsermodes(user, 1, &av[3]);
- }
- } else {
- if (ac != 2) {
- user = do_nick(source, av[0], av[4], av[5], av[6], av[7],
- strtoul(av[2], NULL, 10), 0, 0, "*", NULL);
- if (user)
- ircdproto->ProcessUsermodes(user, 1, &av[3]);
- } else {
- do_nick(source, av[0], NULL, NULL, NULL, NULL,
- strtoul(av[1], NULL, 10), 0, 0, NULL, NULL);
- }
- }
- return MOD_CONT;
+ Server *s;
+ User *user;
+
+ if (UseTS6 && ac == 9) {
+ s = findserver_uid(servlist, source);
+ /* Source is always the server */
+ user = do_nick("", av[0], av[4], av[5], s->name, av[8],
+ strtoul(av[2], NULL, 10), 0, 0, "*", av[7]);
+ if (user) {
+ ircdproto->ProcessUsermodes(user, 1, &av[3]);
+ }
+ } else {
+ if (ac != 2) {
+ user = do_nick(source, av[0], av[4], av[5], av[6], av[7],
+ strtoul(av[2], NULL, 10), 0, 0, "*", NULL);
+ if (user)
+ ircdproto->ProcessUsermodes(user, 1, &av[3]);
+ } 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_topic(const char *source, int ac, const char **av)
{
- User *u;
-
- if (ac == 4) {
- do_topic(source, ac, av);
- } else {
- Channel *c = findchan(av[0]);
- time_t topic_time = time(NULL);
-
- if (!c) {
- if (debug) {
- alog("debug: TOPIC %s for nonexistent channel %s",
- merge_args(ac - 1, av + 1), av[0]);
- }
- return MOD_CONT;
- }
-
- if (check_topiclock(c, topic_time))
- return MOD_CONT;
-
- if (c->topic) {
- free(c->topic);
- c->topic = NULL;
- }
- if (ac > 1 && *av[1])
- c->topic = sstrdup(av[1]);
-
- if (UseTS6) {
- u = find_byuid(source);
- if (u) {
- strscpy(c->topic_setter, u->nick, sizeof(c->topic_setter));
- } else {
- strscpy(c->topic_setter, source, sizeof(c->topic_setter));
- }
- } else {
- strscpy(c->topic_setter, source, sizeof(c->topic_setter));
- }
- c->topic_time = topic_time;
-
- record_topic(av[0]);
+ User *u;
+
+ if (ac == 4) {
+ do_topic(source, ac, av);
+ } else {
+ Channel *c = findchan(av[0]);
+ time_t topic_time = time(NULL);
+
+ if (!c) {
+ if (debug) {
+ alog("debug: TOPIC %s for nonexistent channel %s",
+ merge_args(ac - 1, av + 1), av[0]);
+ }
+ return MOD_CONT;
+ }
+
+ if (check_topiclock(c, topic_time))
+ return MOD_CONT;
+
+ if (c->topic) {
+ free(c->topic);
+ c->topic = NULL;
+ }
+ if (ac > 1 && *av[1])
+ c->topic = sstrdup(av[1]);
+
+ if (UseTS6) {
+ u = find_byuid(source);
+ if (u) {
+ strscpy(c->topic_setter, u->nick, sizeof(c->topic_setter));
+ } else {
+ strscpy(c->topic_setter, source, sizeof(c->topic_setter));
+ }
+ } else {
+ strscpy(c->topic_setter, source, sizeof(c->topic_setter));
+ }
+ c->topic_time = topic_time;
+
+ record_topic(av[0]);
if (ac > 1 && *av[1])
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], av[1]);
else
- send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
- }
- return MOD_CONT;
+ send_event(EVENT_TOPIC_UPDATED, 2, av[0], "");
+ }
+ return MOD_CONT;
}
int anope_event_tburst(const char *source, int ac, const char **av)
{
- char *setter;
- Channel *c;
- time_t topic_time;
-
- if (ac != 4) {
- return MOD_CONT;
- }
-
- setter = myStrGetToken(av[2], '!', 0);
-
- c = findchan(av[0]);
- topic_time = strtol(av[1], NULL, 10);
-
- if (!c) {
- if (debug) {
- alog("debug: TOPIC %s for nonexistent channel %s",
- merge_args(ac - 1, av + 1), av[0]);
- }
- if (setter)
- free(setter);
- return MOD_CONT;
- }
-
- if (check_topiclock(c, topic_time)) {
- if (setter)
- free(setter);
- return MOD_CONT;
- }
-
- if (c->topic) {
- free(c->topic);
- c->topic = NULL;
- }
- if (ac > 1 && *av[3])
- c->topic = sstrdup(av[3]);
-
- strscpy(c->topic_setter, setter, sizeof(c->topic_setter));
- c->topic_time = topic_time;
-
- record_topic(av[0]);
- if (setter)
- free(setter);
- return MOD_CONT;
+ char *setter;
+ Channel *c;
+ time_t topic_time;
+
+ if (ac != 4) {
+ return MOD_CONT;
+ }
+
+ setter = myStrGetToken(av[2], '!', 0);
+
+ c = findchan(av[0]);
+ topic_time = strtol(av[1], NULL, 10);
+
+ if (!c) {
+ if (debug) {
+ alog("debug: TOPIC %s for nonexistent channel %s",
+ merge_args(ac - 1, av + 1), av[0]);
+ }
+ if (setter)
+ free(setter);
+ return MOD_CONT;
+ }
+
+ if (check_topiclock(c, topic_time)) {
+ if (setter)
+ free(setter);
+ return MOD_CONT;
+ }
+
+ if (c->topic) {
+ free(c->topic);
+ c->topic = NULL;
+ }
+ if (ac > 1 && *av[3])
+ c->topic = sstrdup(av[3]);
+
+ strscpy(c->topic_setter, setter, sizeof(c->topic_setter));
+ c->topic_time = topic_time;
+
+ record_topic(av[0]);
+ if (setter)
+ free(setter);
+ 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;
}
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;
}
int anope_event_away(const char *source, int ac, const char **av)
{
- User *u = NULL;
+ User *u = NULL;
- if (UseTS6) {
- u = find_byuid(source);
- }
+ if (UseTS6) {
+ u = find_byuid(source);
+ }
- m_away((UseTS6 ? (u ? u->nick : source) : source),
- (ac ? av[0] : NULL));
- return MOD_CONT;
+ m_away((UseTS6 ? (u ? u->nick : source) : source),
+ (ac ? av[0] : NULL));
+ 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) {
- do_sjoin(source, ac, av);
- return MOD_CONT;
- } else {
- do_join(source, ac, av);
- }
- return MOD_CONT;
+ if (ac != 1) {
+ do_sjoin(source, ac, av);
+ return MOD_CONT;
+ } else {
+ 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_privmsg(const char *source, int ac, const char **av)
{
- User *u;
+ User *u;
BotInfo *bi;
- if (ac != 2) {
- return MOD_CONT;
- }
+ if (ac != 2) {
+ return MOD_CONT;
+ }
- u = find_byuid(source);
- bi = findbot(av[0]);
+ u = find_byuid(source);
+ bi = findbot(av[0]);
// XXX: this is really the same as charybdis
- m_privmsg(source, av[0], av[1]);
- 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)
{
- User *u;
+ User *u;
- if (ac < 1 || ac > 2) {
- return MOD_CONT;
- }
+ if (ac < 1 || ac > 2) {
+ return MOD_CONT;
+ }
- u = find_byuid(source);
- do_part((UseTS6 ? (u ? u->nick : source) : source), ac, av);
+ u = find_byuid(source);
+ do_part((UseTS6 ? (u ? u->nick : source) : source), ac, av);
- return MOD_CONT;
+ return MOD_CONT;
}
int anope_event_whois(const char *source, int ac, const char **av)
{
- BotInfo *bi;
+ BotInfo *bi;
- if (source && ac >= 1) {
- bi = findbot(av[0]);
- m_whois(source, (UseTS6 ? bi->uid.c_str() : bi->nick));
- }
- return MOD_CONT;
+ if (source && ac >= 1) {
+ bi = findbot(av[0]);
+ m_whois(source, (UseTS6 ? bi->uid.c_str() : bi->nick));
+ }
+ return MOD_CONT;
}
/* EVENT: SERVER */
int anope_event_server(const char *source, int ac, const char **av)
{
- if (!stricmp(av[1], "1")) {
- uplink = sstrdup(av[0]);
- if (UseTS6 && TS6UPLINK) {
- do_server(source, av[0], av[1], av[2], TS6UPLINK);
- } else {
- do_server(source, av[0], av[1], av[2], NULL);
- }
- } else {
- do_server(source, av[0], av[1], av[2], NULL);
- }
- return MOD_CONT;
+ if (!stricmp(av[1], "1")) {
+ uplink = sstrdup(av[0]);
+ if (UseTS6 && TS6UPLINK) {
+ do_server(source, av[0], av[1], av[2], TS6UPLINK);
+ } else {
+ do_server(source, av[0], av[1], av[2], NULL);
+ }
+ } else {
+ do_server(source, av[0], av[1], av[2], NULL);
+ }
+ return MOD_CONT;
}
int anope_event_sid(const char *source, int ac, const char **av)
{
- Server *s;
+ Server *s;
- /* :42X SID trystan.nomadirc.net 2 43X :ircd-ratbox test server */
+ /* :42X SID trystan.nomadirc.net 2 43X :ircd-ratbox test server */
- s = findserver_uid(servlist, source);
+ s = findserver_uid(servlist, source);
- do_server(s->name, av[0], av[1], av[3], av[2]);
- return MOD_CONT;
+ do_server(s->name, av[0], av[1], av[3], av[2]);
+ 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)
{
- User *u;
+ User *u;
- if (ac != 1) {
- return MOD_CONT;
- }
+ if (ac != 1) {
+ return MOD_CONT;
+ }
- u = find_byuid(source);
+ u = find_byuid(source);
- do_quit((UseTS6 ? (u ? u->nick : source) : source), ac, av);
- return MOD_CONT;
+ do_quit((UseTS6 ? (u ? u->nick : source) : source), ac, av);
+ return MOD_CONT;
}
int anope_event_mode(const char *source, int ac, const char **av)
{
- User *u, *u2;
-
- if (ac < 2) {
- return MOD_CONT;
- }
-
- if (*av[0] == '#' || *av[0] == '&') {
- do_cmode(source, ac, av);
- } else {
- if (UseTS6) {
- u = find_byuid(source);
- u2 = find_byuid(av[0]);
- av[0] = u2->nick;
- do_umode(u->nick, ac, av);
- } else {
- do_umode(source, ac, av);
- }
- }
- return MOD_CONT;
+ User *u, *u2;
+
+ if (ac < 2) {
+ return MOD_CONT;
+ }
+
+ if (*av[0] == '#' || *av[0] == '&') {
+ do_cmode(source, ac, av);
+ } else {
+ if (UseTS6) {
+ u = find_byuid(source);
+ u2 = find_byuid(av[0]);
+ av[0] = u2->nick;
+ do_umode(u->nick, ac, av);
+ } else {
+ do_umode(source, ac, av);
+ }
+ }
+ return MOD_CONT;
}
int anope_event_tmode(const char *source, int ac, const char **av)
{
- if (*av[1] == '#' || *av[1] == '&') {
- do_cmode(source, ac, av);
- }
- return MOD_CONT;
+ if (*av[1] == '#' || *av[1] == '&') {
+ do_cmode(source, ac, av);
+ }
+ return MOD_CONT;
}
/* Event: PROTOCTL */
int anope_event_capab(const char *source, int ac, const char **av)
{
- int argvsize = 8;
- int argc;
- const char **argv;
- char *str;
-
- if (ac < 1)
- return MOD_CONT;
-
- /* We get the params as one arg, we should split it for capab_parse */
- argv = (const char **)scalloc(argvsize, sizeof(const char *));
- argc = 0;
- while ((str = myStrGetToken(av[0], ' ', argc))) {
- if (argc == argvsize) {
- argvsize += 8;
- argv = (const char **)srealloc(argv, argvsize * sizeof(const char *));
- }
- argv[argc] = str;
- argc++;
- }
-
- capab_parse(argc, argv);
-
- /* Free our built ac/av */
- for (argvsize = 0; argvsize < argc; argvsize++) {
- free((char *)argv[argvsize]);
- }
- free((char **)argv);
-
- return MOD_CONT;
+ int argvsize = 8;
+ int argc;
+ const char **argv;
+ char *str;
+
+ if (ac < 1)
+ return MOD_CONT;
+
+ /* We get the params as one arg, we should split it for capab_parse */
+ argv = (const char **)scalloc(argvsize, sizeof(const char *));
+ argc = 0;
+ while ((str = myStrGetToken(av[0], ' ', argc))) {
+ if (argc == argvsize) {
+ argvsize += 8;
+ argv = (const char **)srealloc(argv, argvsize * sizeof(const char *));
+ }
+ argv[argc] = str;
+ argc++;
+ }
+
+ capab_parse(argc, argv);
+
+ /* Free our built ac/av */
+ for (argvsize = 0; argvsize < argc; argvsize++) {
+ free((char *)argv[argvsize]);
+ }
+ free((char **)argv);
+
+ return MOD_CONT;
}
int anope_event_pass(const char *source, int ac, const char **av)
{
- if (UseTS6) {
- TS6UPLINK = sstrdup(av[3]);
- }
- return MOD_CONT;
+ if (UseTS6) {
+ TS6UPLINK = sstrdup(av[3]);
+ }
+ return MOD_CONT;
}
int anope_event_bmask(const char *source, int ac, const char **av)
{
- Channel *c;
- char *bans;
- char *b;
- int count, i;
-
- /* :42X BMASK 1106409026 #ircops b :*!*@*.aol.com */
- /* 0 1 2 3 */
- c = findchan(av[1]);
-
- if (c) {
- bans = sstrdup(av[3]);
- count = myNumToken(bans, ' ');
- for (i = 0; i <= count - 1; i++) {
- b = myStrGetToken(bans, ' ', i);
- if (!stricmp(av[2], "b")) {
- add_ban(c, b);
- }
- if (!stricmp(av[2], "e")) {
- add_exception(c, b);
- }
- if (!stricmp(av[2], "I")) {
- add_invite(c, b);
- }
- if (b)
- free(b);
- }
- free(bans);
- }
- return MOD_CONT;
+ Channel *c;
+ char *bans;
+ char *b;
+ int count, i;
+
+ /* :42X BMASK 1106409026 #ircops b :*!*@*.aol.com */
+ /* 0 1 2 3 */
+ c = findchan(av[1]);
+
+ if (c) {
+ bans = sstrdup(av[3]);
+ count = myNumToken(bans, ' ');
+ for (i = 0; i <= count - 1; i++) {
+ b = myStrGetToken(bans, ' ', i);
+ if (!stricmp(av[2], "b")) {
+ add_ban(c, b);
+ }
+ if (!stricmp(av[2], "e")) {
+ add_exception(c, b);
+ }
+ if (!stricmp(av[2], "I")) {
+ add_invite(c, b);
+ }
+ if (b)
+ free(b);
+ }
+ free(bans);
+ }
+ return MOD_CONT;
}
int anope_event_error(const char *source, int ac, const char **av)
{
- if (ac >= 1) {
- if (debug) {
- alog("debug: %s", av[0]);
- }
- }
- return MOD_CONT;
+ if (ac >= 1) {
+ if (debug) {
+ alog("debug: %s", av[0]);
+ }
+ }
+ return MOD_CONT;
}
void moduleAddIRCDMsgs(void)
{
- Message *m;
-
- updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
-
- m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
- m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
- m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
- m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
- m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
- m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
- m = createMessage("TMODE", anope_event_tmode); addCoreMessage(IRCD,m);
- m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
- m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("BMASK", anope_event_bmask); addCoreMessage(IRCD,m);
- m = createMessage("UID", anope_event_nick); addCoreMessage(IRCD,m);
- m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
- m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
- m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
- m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
- m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
- m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
- m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
- m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
- m = createMessage("TB", anope_event_tburst); addCoreMessage(IRCD,m);
- m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
- m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
- m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
- m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
- m = createMessage("SID", anope_event_sid); addCoreMessage(IRCD,m);
+ Message *m;
+
+ updateProtectDetails("PROTECT","PROTECTME","protect","deprotect","AUTOPROTECT","+","-");
+
+ m = createMessage("436", anope_event_436); addCoreMessage(IRCD,m);
+ m = createMessage("AWAY", anope_event_away); addCoreMessage(IRCD,m);
+ m = createMessage("JOIN", anope_event_join); addCoreMessage(IRCD,m);
+ m = createMessage("KICK", anope_event_kick); addCoreMessage(IRCD,m);
+ m = createMessage("KILL", anope_event_kill); addCoreMessage(IRCD,m);
+ m = createMessage("MODE", anope_event_mode); addCoreMessage(IRCD,m);
+ m = createMessage("TMODE", anope_event_tmode); addCoreMessage(IRCD,m);
+ m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m);
+ m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("BMASK", anope_event_bmask); addCoreMessage(IRCD,m);
+ m = createMessage("UID", anope_event_nick); addCoreMessage(IRCD,m);
+ m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m);
+ m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m);
+ m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m);
+ m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m);
+ m = createMessage("QUIT", anope_event_quit); addCoreMessage(IRCD,m);
+ m = createMessage("SERVER", anope_event_server); addCoreMessage(IRCD,m);
+ m = createMessage("SQUIT", anope_event_squit); addCoreMessage(IRCD,m);
+ m = createMessage("TOPIC", anope_event_topic); addCoreMessage(IRCD,m);
+ m = createMessage("TB", anope_event_tburst); addCoreMessage(IRCD,m);
+ m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m);
+ m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m);
+ m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m);
+ m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m);
+ m = createMessage("SID", anope_event_sid); addCoreMessage(IRCD,m);
}
class ProtoRatbox : public Module
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);
}