Anope IRC Services  Version 1.8
inspircd20.h
Go to the documentation of this file.
1 /* inspircd 1.2.0 + headers
2  *
3  * (C) 2009 Jan Milants <Viper@Anope.org>
4  * (C) 2003-2014 Anope Team
5  * Contact us at team@anope.org
6  *
7  * Please read COPYING and README for further details.
8  *
9  * Partially based on code of Denora IRC Stats.
10  * Based on InspIRCd 1.1 code of Anope by Anope Team.
11  * Based on the original code of Epona by Lara.
12  * Based on the original code of Services by Andy Church.
13  *
14  *
15  */
16 
17 
18 /*************************************************************************/
19 
20 #define UMODE_c 0x00000001
21 #define UMODE_h 0x00000002
22 #define UMODE_i 0x00000004
23 #define UMODE_o 0x00000008
24 #define UMODE_r 0x00000010
25 #define UMODE_w 0x00000020
26 #define UMODE_d 0x00000040
27 #define UMODE_g 0x00000080
28 #define UMODE_x 0x00000100
29 #define UMODE_k 0x00000200
30 #define UMODE_s 0x00000400
31 #define UMODE_B 0x00001000
32 #define UMODE_G 0x00002000
33 #define UMODE_H 0x00004000
34 #define UMODE_I 0x00008000
35 #define UMODE_Q 0x00010000
36 #define UMODE_R 0x00020000
37 #define UMODE_S 0x00040000
38 #define UMODE_W 0x00080000
39 
40 #define CMODE_i 0x00000001
41 #define CMODE_m 0x00000002
42 #define CMODE_n 0x00000004
43 #define CMODE_p 0x00000008
44 #define CMODE_s 0x00000010
45 #define CMODE_t 0x00000020
46 #define CMODE_k 0x00000040 /* These two used only by ChanServ */
47 #define CMODE_l 0x00000080
48 #define CMODE_R 0x00000100 /* Only identified users can join */
49 #define CMODE_r 0x00000200 /* Set for all registered channels */
50 #define CMODE_c 0x00000400
51 #define CMODE_A 0x00000800
52 #define CMODE_T 0x00001000
53 #define CMODE_K 0x00002000
54 #define CMODE_L 0x00004000
55 #define CMODE_O 0x00008000
56 #define CMODE_Q 0x00010000
57 #define CMODE_S 0x00020000
58 #define CMODE_P 0x00040000
59 #define CMODE_f 0x00080000
60 #define CMODE_G 0x00100000
61 #define CMODE_C 0x00200000
62 #define CMODE_u 0x00400000
63 #define CMODE_z 0x00800000
64 #define CMODE_N 0x01000000
65 #define CMODE_j 0x02000000
66 #define CMODE_M 0x04000000
67 #define CMODE_B 0x08000000
68 #define CMODE_F 0x10000000
69 #define CMODE_g 0x20000000
70 #define CMODE_J 0x40000000
71 
72 #define DEFAULT_MLOCK CMODE_n | CMODE_t | CMODE_r
73 
74 struct chmodeinfo
75 {
76  char modechar;
78 } chmodes[] = {
79  {'i', CMODE_i},
80  {'m', CMODE_m},
81  {'n', CMODE_n},
82  {'p', CMODE_p},
83  {'s', CMODE_s},
84  {'t', CMODE_t},
85  {'k', CMODE_k},
86  {'l', CMODE_l},
87  {'R', CMODE_R},
88  {'r', CMODE_r},
89  {'c', CMODE_c},
90  {'A', CMODE_A},
91  {'T', CMODE_T},
92  {'K', CMODE_K},
93  {'L', CMODE_L},
94  {'O', CMODE_O},
95  {'Q', CMODE_Q},
96  {'S', CMODE_S},
97  {'P', CMODE_P},
98  {'f', CMODE_f},
99  {'G', CMODE_G},
100  {'C', CMODE_C},
101  {'u', CMODE_u},
102  {'z', CMODE_z},
103  {'N', CMODE_N},
104  {'j', CMODE_j},
105  {'M', CMODE_M},
106  {'B', CMODE_B},
107  {'F', CMODE_F},
108  {'g', CMODE_g},
109  {'J', CMODE_J},
110  {0, 0}
111 };
112 
113 void inspircd_set_umode(User * user, int ac, char **av);
114 void inspircd_cmd_svsnoop(char *server, int set);
115 void inspircd_cmd_remove_akill(char *user, char *host);
116 void inspircd_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when);
117 void inspircd_cmd_vhost_off(User * u);
118 void inspircd_cmd_akill(char *user, char *host, char *who, time_t when,time_t expires, char *reason);
119 void inspircd_cmd_svskill(char *source, char *user, char *buf);
120 void inspircd_cmd_svsmode(User * u, int ac, char **av);
121 void inspircd_cmd_372(char *source, char *msg);
122 void inspircd_cmd_372_error(char *source);
123 void inspircd_cmd_375(char *source);
124 void inspircd_cmd_376(char *source);
125 void inspircd_cmd_nick(char *nick, char *name, char *modes);
126 void inspircd_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes);
127 void inspircd_cmd_mode(char *source, char *dest, char *buf);
128 void inspircd_cmd_bot_nick(char *nick, char *user, char *host, char *real, char *modes);
129 void inspircd_cmd_kick(char *source, char *chan, char *user, char *buf);
130 void inspircd_cmd_notice_ops(char *source, char *dest, char *buf);
131 void inspircd_cmd_notice(char *source, char *dest, char *buf);
132 void inspircd_cmd_notice2(char *source, char *dest, char *msg);
133 void inspircd_cmd_privmsg(char *source, char *dest, char *buf);
134 void inspircd_cmd_privmsg2(char *source, char *dest, char *msg);
135 void inspircd_cmd_serv_notice(char *source, char *dest, char *msg);
136 void inspircd_cmd_serv_privmsg(char *source, char *dest, char *msg);
137 void inspircd_cmd_bot_chan_mode(char *nick, char *chan);
138 void inspircd_cmd_351(char *source);
139 void inspircd_cmd_quit(char *source, char *buf);
140 void inspircd_cmd_pong(char *servname, char *who);
141 void inspircd_cmd_join(char *user, char *channel, time_t chantime);
142 void inspircd_cmd_unsqline(char *user);
143 void inspircd_cmd_invite(char *source, char *chan, char *nick);
144 void inspircd_cmd_part(char *nick, char *chan, char *buf);
145 void inspircd_cmd_391(char *source, char *timestr);
146 void inspircd_cmd_250(char *buf);
147 void inspircd_cmd_307(char *buf);
148 void inspircd_cmd_311(char *buf);
149 void inspircd_cmd_312(char *buf);
150 void inspircd_cmd_317(char *buf);
151 void inspircd_cmd_219(char *source, char *letter);
152 void inspircd_cmd_401(char *source, char *who);
153 void inspircd_cmd_318(char *source, char *who);
154 void inspircd_cmd_242(char *buf);
155 void inspircd_cmd_243(char *buf);
156 void inspircd_cmd_211(char *buf);
157 void inspircd_cmd_global(char *source, char *buf);
158 void inspircd_cmd_global_legacy(char *source, char *fmt);
159 void inspircd_cmd_sqline(char *mask, char *reason);
160 void inspircd_cmd_squit(char *servname, char *message);
161 void inspircd_cmd_svso(char *source, char *nick, char *flag);
162 void inspircd_cmd_chg_nick(char *oldnick, char *newnick);
163 void inspircd_cmd_svsnick(char *source, char *guest, time_t when);
164 void inspircd_cmd_vhost_on(char *nick, char *vIdent, char *vhost);
166 void inspircd_cmd_bob();
167 void inspircd_cmd_svshold(char *nick);
168 void inspircd_cmd_release_svshold(char *nick);
169 void inspircd_cmd_unsgline(char *mask);
170 void inspircd_cmd_unszline(char *mask);
171 void inspircd_cmd_szline(char *mask, char *reason, char *whom);
172 void inspircd_cmd_sgline(char *mask, char *reason);
173 void inspircd_cmd_unban(char *name, char *nick);
174 void inspircd_cmd_svsmode_chan(char *name, char *mode, char *nick);
175 void inspircd_cmd_svid_umode(char *nick, time_t ts);
176 void inspircd_cmd_nc_change(User * u);
177 void inspircd_cmd_svid_umode2(User * u, char *ts);
178 void inspircd_cmd_svid_umode3(User * u, char *ts);
179 void inspircd_cmd_eob();
180 void inspircd_cmd_chghost(char *nick, char *vhost);
181 void inspircd_cmd_chgident(char *nick, char *vIdent);
182 int inspircd_flood_mode_check(char *value);
183 void inspircd_cmd_jupe(char *jserver, char *who, char *reason);
184 int inspircd_valid_nick(char *nick);
185 void inspircd_cmd_ctcp(char *source, char *dest, char *buf);
186 int inspircd_jointhrottle_mode_check(char *value);
187 
188 int anope_event_fjoin(char *source, int ac, char **av);
189 int anope_event_fmode(char *source, int ac, char **av);
190 int anope_event_ftopic(char *source, int ac, char **av);
191 int anope_event_sanick(char *source, int ac, char **av);
192 int anope_event_samode(char *source, int ac, char **av);
193 int anope_event_sajoin(char *source, int ac, char **av);
194 int anope_event_sapart(char *source, int ac, char **av);
195 int anope_event_version(char *source, int ac, char **av);
196 int anope_event_opertype(char *source, int ac, char **av);
197 int anope_event_idle(char* source, int ac, char **av);
198 int anope_event_rsquit(char *source, int ac, char **av);
199 int anope_event_uid(char *source, int ac, char **av);
200 int anope_event_metadata(char *source, int ac, char **av);
201 int anope_event_burst(char *source, int ac, char **av);
202 int anope_event_eob(char *source, int ac, char **av);
203 int anope_event_time(char *source, int ac, char **av);
204 
205 int is_sid(char *sid);
206 void ts6_sid_increment(unsigned pos);
207 char *ts6_sid_retrieve();
208 
209 /* EOF */
void inspircd_cmd_mode(char *source, char *dest, char *buf)
Definition: inspircd11.c:632
int anope_event_rsquit(char *source, int ac, char **av)
Definition: inspircd11.c:1261
#define CMODE_S
Definition: inspircd20.h:57
void inspircd_cmd_unszline(char *mask)
Definition: inspircd11.c:1671
void inspircd_cmd_unban(char *name, char *nick)
Definition: inspircd11.c:1689
void inspircd_cmd_unsgline(char *mask)
Definition: inspircd11.c:1665
#define CMODE_G
Definition: inspircd20.h:60
void inspircd_cmd_svid_umode(char *nick, time_t ts)
Definition: inspircd11.c:1704
void inspircd_cmd_bot_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: inspircd11.c:783
void inspircd_cmd_376(char *source)
Definition: inspircd11.c:608
int anope_event_eob(char *source, int ac, char **av)
Definition: hybrid.c:889
void inspircd_cmd_svsnoop(char *server, int set)
Definition: inspircd11.c:531
void inspircd_cmd_pong(char *servname, char *who)
Definition: inspircd11.c:897
#define CMODE_m
Definition: inspircd20.h:41
void inspircd_cmd_svso(char *source, char *nick, char *flag)
Definition: inspircd11.c:1122
void inspircd_cmd_privmsg(char *source, char *dest, char *buf)
Definition: inspircd11.c:829
int anope_event_idle(char *source, int ac, char **av)
Definition: inspircd11.c:648
void inspircd_cmd_391(char *source, char *timestr)
Definition: inspircd11.c:968
void inspircd_cmd_quit(char *source, char *buf)
Definition: inspircd11.c:867
#define CMODE_K
Definition: inspircd20.h:53
void inspircd_cmd_nc_change(User *u)
Definition: inspircd11.c:1712
#define CMODE_z
Definition: inspircd20.h:63
void inspircd_cmd_chg_nick(char *oldnick, char *newnick)
Definition: inspircd11.c:1127
void inspircd_cmd_eob()
Definition: inspircd11.c:1747
void inspircd_cmd_notice2(char *source, char *dest, char *msg)
Definition: inspircd11.c:824
#define CMODE_g
Definition: inspircd20.h:69
void inspircd_cmd_vhost_off(User *u)
Definition: inspircd11.c:554
#define CMODE_P
Definition: inspircd20.h:58
void inspircd_cmd_connect(int servernum)
Definition: inspircd11.c:1160
void inspircd_cmd_svsmode_chan(char *name, char *mode, char *nick)
Definition: inspircd11.c:1696
void inspircd_cmd_372_error(char *source)
Definition: inspircd11.c:596
void inspircd_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: inspircd11.c:625
void inspircd_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
Definition: inspircd11.c:1149
void inspircd_cmd_kick(char *source, char *chan, char *user, char *buf)
Definition: inspircd11.c:792
void inspircd_cmd_unsqline(char *user)
Definition: inspircd11.c:909
int inspircd_valid_nick(char *nick)
Definition: inspircd11.c:1801
void inspircd_cmd_privmsg2(char *source, char *dest, char *msg)
Definition: inspircd11.c:838
void inspircd_cmd_svid_umode3(User *u, char *ts)
Definition: inspircd11.c:1727
int anope_event_sanick(char *source, int ac, char **av)
#define CMODE_B
Definition: inspircd20.h:67
int anope_event_uid(char *source, int ac, char **av)
Definition: inspircd12.c:1702
#define CMODE_n
Definition: inspircd20.h:42
void inspircd_cmd_211(char *buf)
Definition: inspircd11.c:1081
void inspircd_cmd_chghost(char *nick, char *vhost)
Definition: inspircd11.c:918
int anope_event_version(char *source, int ac, char **av)
Definition: inspircd11.c:643
int anope_event_sapart(char *source, int ac, char **av)
void inspircd_cmd_akill(char *user, char *host, char *who, time_t when, time_t expires, char *reason)
Definition: inspircd11.c:566
void inspircd_cmd_svskill(char *source, char *user, char *buf)
Definition: inspircd11.c:573
int is_sid(char *sid)
Definition: inspircd12.c:2552
void inspircd_cmd_szline(char *mask, char *reason, char *whom)
Definition: inspircd11.c:1677
void inspircd_cmd_serv_privmsg(char *source, char *dest, char *msg)
Definition: inspircd11.c:848
#define CMODE_s
Definition: inspircd20.h:44
void inspircd_cmd_squit(char *servname, char *message)
Definition: inspircd11.c:1112
int anope_event_samode(char *source, int ac, char **av)
#define CMODE_j
Definition: inspircd20.h:65
int inspircd_jointhrottle_mode_check(char *value)
Definition: inspircd11.c:1827
#define CMODE_M
Definition: inspircd20.h:66
void inspircd_cmd_bob()
Definition: inspircd11.c:1181
void inspircd_cmd_nick(char *nick, char *name, char *modes)
Definition: inspircd11.c:613
void inspircd_cmd_svsmode(User *u, int ac, char **av)
Definition: inspircd11.c:581
int anope_event_ftopic(char *source, int ac, char **av)
Definition: inspircd11.c:656
void inspircd_cmd_notice(char *source, char *dest, char *buf)
Definition: inspircd11.c:811
int anope_event_time(char *source, int ac, char **av)
Definition: inspircd12.c:2531
int anope_event_opertype(char *source, int ac, char **av)
Definition: inspircd11.c:669
void inspircd_set_umode(User *user, int ac, char **av)
Definition: inspircd11.c:401
void inspircd_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when)
Definition: inspircd11.c:547
void inspircd_cmd_svsnick(char *source, char *guest, time_t when)
Definition: inspircd11.c:1137
void inspircd_cmd_ctcp(char *source, char *dest, char *buf)
Definition: inspircd11.c:1812
void inspircd_cmd_part(char *nick, char *chan, char *buf)
Definition: inspircd11.c:954
u_int32_t uint32
Definition: db-merger.c:123
void ts6_sid_increment(unsigned pos)
Definition: inspircd12.c:2562
void inspircd_cmd_join(char *user, char *channel, time_t chantime)
Definition: inspircd11.c:903
E int servernum
Definition: extern.h:615
void inspircd_cmd_401(char *source, char *who)
Definition: inspircd11.c:1042
void inspircd_cmd_sqline(char *mask, char *reason)
Definition: inspircd11.c:1101
char * ts6_sid_retrieve()
Definition: inspircd12.c:2591
#define CMODE_J
Definition: inspircd20.h:70
void inspircd_cmd_sgline(char *mask, char *reason)
Definition: inspircd11.c:1684
void inspircd_cmd_318(char *source, char *who)
Definition: inspircd11.c:1051
void inspircd_cmd_311(char *buf)
Definition: inspircd11.c:997
#define CMODE_t
Definition: inspircd20.h:45
void inspircd_cmd_242(char *buf)
Definition: inspircd11.c:1061
void inspircd_cmd_317(char *buf)
Definition: inspircd11.c:1017
int anope_event_metadata(char *source, int ac, char **av)
Definition: inspircd12.c:1749
void inspircd_cmd_372(char *source, char *msg)
Definition: inspircd11.c:591
int anope_event_fmode(char *source, int ac, char **av)
Definition: inspircd11.c:684
void inspircd_cmd_312(char *buf)
Definition: inspircd11.c:1007
void inspircd_cmd_svshold(char *nick)
Definition: inspircd11.c:1652
#define CMODE_c
Definition: inspircd20.h:50
void inspircd_cmd_375(char *source)
Definition: inspircd11.c:602
#define CMODE_C
Definition: inspircd20.h:61
int inspircd_flood_mode_check(char *value)
Definition: inspircd11.c:1768
struct chmodeinfo chmodes[]
#define CMODE_u
Definition: inspircd20.h:62
#define CMODE_R
Definition: inspircd20.h:48
#define CMODE_k
Definition: inspircd20.h:46
void inspircd_cmd_jupe(char *jserver, char *who, char *reason)
Definition: inspircd11.c:1782
void inspircd_cmd_250(char *buf)
Definition: inspircd11.c:977
void inspircd_cmd_global_legacy(char *source, char *fmt)
Definition: inspircd11.c:1796
void inspircd_cmd_global(char *source, char *buf)
Definition: inspircd11.c:1091
void inspircd_cmd_bot_chan_mode(char *nick, char *chan)
Definition: inspircd11.c:854
void inspircd_cmd_chgident(char *nick, char *vIdent)
Definition: inspircd11.c:931
#define CMODE_N
Definition: inspircd20.h:64
#define CMODE_p
Definition: inspircd20.h:43
void inspircd_cmd_307(char *buf)
Definition: inspircd11.c:987
#define CMODE_T
Definition: inspircd20.h:52
#define CMODE_r
Definition: inspircd20.h:49
#define CMODE_F
Definition: inspircd20.h:68
#define CMODE_i
Definition: inspircd20.h:40
int anope_event_burst(char *source, int ac, char **av)
Definition: bahamut.c:1455
int anope_event_sajoin(char *source, int ac, char **av)
#define CMODE_f
Definition: inspircd20.h:59
#define CMODE_L
Definition: inspircd20.h:54
#define CMODE_A
Definition: inspircd20.h:51
void inspircd_cmd_243(char *buf)
Definition: inspircd11.c:1071
uint32 mode
Definition: inspircd20.h:77
void inspircd_cmd_release_svshold(char *nick)
Definition: inspircd11.c:1659
char modechar
Definition: inspircd20.h:76
void inspircd_cmd_svid_umode2(User *u, char *ts)
Definition: inspircd11.c:1720
void inspircd_cmd_serv_notice(char *source, char *dest, char *msg)
Definition: inspircd11.c:843
int anope_event_fjoin(char *source, int ac, char **av)
Definition: inspircd11.c:723
void inspircd_cmd_351(char *source)
Definition: inspircd11.c:859
void inspircd_cmd_invite(char *source, char *chan, char *nick)
Definition: inspircd11.c:944
#define CMODE_O
Definition: inspircd20.h:55
void inspircd_cmd_219(char *source, char *letter)
Definition: inspircd11.c:1027
void inspircd_cmd_notice_ops(char *source, char *dest, char *buf)
Definition: inspircd11.c:801
#define CMODE_l
Definition: inspircd20.h:47
#define CMODE_Q
Definition: inspircd20.h:56
void inspircd_cmd_remove_akill(char *user, char *host)
Definition: inspircd11.c:541