Anope IRC Services  Version 1.8
Go to the documentation of this file.
1 /* inspircd 1.2.0 + headers
2  *
3  * (C) 2009 Jan Milants <>
4  * (C) 2003-2014 Anope Team
5  * Contact us at
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  */
18 /*************************************************************************/
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
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
74 void inspircd_set_umode(User * user, int ac, char **av);
75 void inspircd_cmd_svsnoop(char *server, int set);
76 void inspircd_cmd_remove_akill(char *user, char *host);
77 void inspircd_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when);
79 void inspircd_cmd_akill(char *user, char *host, char *who, time_t when,time_t expires, char *reason);
80 void inspircd_cmd_svskill(char *source, char *user, char *buf);
81 void inspircd_cmd_svsmode(User * u, int ac, char **av);
82 void inspircd_cmd_372(char *source, char *msg);
83 void inspircd_cmd_372_error(char *source);
84 void inspircd_cmd_375(char *source);
85 void inspircd_cmd_376(char *source);
86 void inspircd_cmd_nick(char *nick, char *name, char *modes);
87 void inspircd_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes);
88 void inspircd_cmd_mode(char *source, char *dest, char *buf);
89 void inspircd_cmd_bot_nick(char *nick, char *user, char *host, char *real, char *modes);
90 void inspircd_cmd_kick(char *source, char *chan, char *user, char *buf);
91 void inspircd_cmd_notice_ops(char *source, char *dest, char *buf);
92 void inspircd_cmd_notice(char *source, char *dest, char *buf);
93 void inspircd_cmd_notice2(char *source, char *dest, char *msg);
94 void inspircd_cmd_privmsg(char *source, char *dest, char *buf);
95 void inspircd_cmd_privmsg2(char *source, char *dest, char *msg);
96 void inspircd_cmd_serv_notice(char *source, char *dest, char *msg);
97 void inspircd_cmd_serv_privmsg(char *source, char *dest, char *msg);
98 void inspircd_cmd_bot_chan_mode(char *nick, char *chan);
99 void inspircd_cmd_351(char *source);
100 void inspircd_cmd_quit(char *source, char *buf);
101 void inspircd_cmd_pong(char *servname, char *who);
102 void inspircd_cmd_join(char *user, char *channel, time_t chantime);
103 void inspircd_cmd_unsqline(char *user);
104 void inspircd_cmd_invite(char *source, char *chan, char *nick);
105 void inspircd_cmd_part(char *nick, char *chan, char *buf);
106 void inspircd_cmd_391(char *source, char *timestr);
107 void inspircd_cmd_250(char *buf);
108 void inspircd_cmd_307(char *buf);
109 void inspircd_cmd_311(char *buf);
110 void inspircd_cmd_312(char *buf);
111 void inspircd_cmd_317(char *buf);
112 void inspircd_cmd_219(char *source, char *letter);
113 void inspircd_cmd_401(char *source, char *who);
114 void inspircd_cmd_318(char *source, char *who);
115 void inspircd_cmd_242(char *buf);
116 void inspircd_cmd_243(char *buf);
117 void inspircd_cmd_211(char *buf);
118 void inspircd_cmd_global(char *source, char *buf);
119 void inspircd_cmd_global_legacy(char *source, char *fmt);
120 void inspircd_cmd_sqline(char *mask, char *reason);
121 void inspircd_cmd_squit(char *servname, char *message);
122 void inspircd_cmd_svso(char *source, char *nick, char *flag);
123 void inspircd_cmd_chg_nick(char *oldnick, char *newnick);
124 void inspircd_cmd_svsnick(char *source, char *guest, time_t when);
125 void inspircd_cmd_vhost_on(char *nick, char *vIdent, char *vhost);
127 void inspircd_cmd_bob();
128 void inspircd_cmd_svshold(char *nick);
129 void inspircd_cmd_release_svshold(char *nick);
130 void inspircd_cmd_unsgline(char *mask);
131 void inspircd_cmd_unszline(char *mask);
132 void inspircd_cmd_szline(char *mask, char *reason, char *whom);
133 void inspircd_cmd_sgline(char *mask, char *reason);
134 void inspircd_cmd_unban(char *name, char *nick);
135 void inspircd_cmd_svsmode_chan(char *name, char *mode, char *nick);
136 void inspircd_cmd_svid_umode(char *nick, time_t ts);
137 void inspircd_cmd_nc_change(User * u);
138 void inspircd_cmd_svid_umode2(User * u, char *ts);
139 void inspircd_cmd_svid_umode3(User * u, char *ts);
140 void inspircd_cmd_eob();
141 void inspircd_cmd_chghost(char *nick, char *vhost);
142 void inspircd_cmd_chgident(char *nick, char *vIdent);
143 int inspircd_flood_mode_check(char *value);
144 void inspircd_cmd_jupe(char *jserver, char *who, char *reason);
145 int inspircd_valid_nick(char *nick);
146 void inspircd_cmd_ctcp(char *source, char *dest, char *buf);
147 int inspircd_jointhrottle_mode_check(char *value);
149 int anope_event_fjoin(char *source, int ac, char **av);
150 int anope_event_fmode(char *source, int ac, char **av);
151 int anope_event_ftopic(char *source, int ac, char **av);
152 int anope_event_sanick(char *source, int ac, char **av);
153 int anope_event_samode(char *source, int ac, char **av);
154 int anope_event_sajoin(char *source, int ac, char **av);
155 int anope_event_sapart(char *source, int ac, char **av);
156 int anope_event_version(char *source, int ac, char **av);
157 int anope_event_opertype(char *source, int ac, char **av);
158 int anope_event_idle(char* source, int ac, char **av);
159 int anope_event_rsquit(char *source, int ac, char **av);
160 int anope_event_uid(char *source, int ac, char **av);
161 int anope_event_metadata(char *source, int ac, char **av);
162 int anope_event_burst(char *source, int ac, char **av);
163 int anope_event_eob(char *source, int ac, char **av);
164 int anope_event_time(char *source, int ac, char **av);
166 int is_sid(char *sid);
167 void ts6_sid_increment(unsigned pos);
168 char *ts6_sid_retrieve();
170 /* EOF */
void inspircd_cmd_invite(char *source, char *chan, char *nick)
Definition: inspircd11.c:944
int inspircd_valid_nick(char *nick)
Definition: inspircd11.c:1801
void inspircd_cmd_unsqline(char *user)
Definition: inspircd11.c:909
void inspircd_cmd_privmsg2(char *source, char *dest, char *msg)
Definition: inspircd11.c:838
void inspircd_cmd_privmsg(char *source, char *dest, char *buf)
Definition: inspircd11.c:829
void inspircd_cmd_250(char *buf)
Definition: inspircd11.c:977
void inspircd_cmd_global(char *source, char *buf)
Definition: inspircd11.c:1091
void inspircd_cmd_svid_umode3(User *u, char *ts)
Definition: inspircd11.c:1727
void inspircd_cmd_quit(char *source, char *buf)
Definition: inspircd11.c:867
int anope_event_uid(char *source, int ac, char **av)
Definition: inspircd12.c:1702
void inspircd_cmd_remove_akill(char *user, char *host)
Definition: inspircd11.c:541
void inspircd_cmd_eob()
Definition: inspircd11.c:1747
void inspircd_cmd_notice2(char *source, char *dest, char *msg)
Definition: inspircd11.c:824
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_szline(char *mask, char *reason, char *whom)
Definition: inspircd11.c:1677
void inspircd_cmd_connect(int servernum)
Definition: inspircd11.c:1160
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
void inspircd_cmd_351(char *source)
Definition: inspircd11.c:859
void inspircd_cmd_svsnoop(char *server, int set)
Definition: inspircd11.c:531
void inspircd_cmd_pong(char *servname, char *who)
Definition: inspircd11.c:897
void inspircd_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: inspircd11.c:625
int anope_event_ftopic(char *source, int ac, char **av)
Definition: inspircd11.c:656
void inspircd_cmd_notice_ops(char *source, char *dest, char *buf)
Definition: inspircd11.c:801
void inspircd_cmd_svsnick(char *source, char *guest, time_t when)
Definition: inspircd11.c:1137
void inspircd_cmd_211(char *buf)
Definition: inspircd11.c:1081
void ts6_sid_increment(unsigned pos)
Definition: inspircd12.c:2562
void inspircd_cmd_chghost(char *nick, char *vhost)
Definition: inspircd11.c:918
void inspircd_cmd_mode(char *source, char *dest, char *buf)
Definition: inspircd11.c:632
void inspircd_cmd_vhost_off(User *u)
Definition: inspircd11.c:554
int anope_event_rsquit(char *source, int ac, char **av)
Definition: inspircd11.c:1261
void inspircd_cmd_svsmode_chan(char *name, char *mode, char *nick)
Definition: inspircd11.c:1696
void inspircd_cmd_unsgline(char *mask)
Definition: inspircd11.c:1665
int anope_event_samode(char *source, int ac, char **av)
int inspircd_jointhrottle_mode_check(char *value)
Definition: inspircd11.c:1827
void inspircd_cmd_bob()
Definition: inspircd11.c:1181
void inspircd_cmd_svshold(char *nick)
Definition: inspircd11.c:1652
void inspircd_cmd_svsmode(User *u, int ac, char **av)
Definition: inspircd11.c:581
void inspircd_cmd_kick(char *source, char *chan, char *user, char *buf)
Definition: inspircd11.c:792
void inspircd_cmd_375(char *source)
Definition: inspircd11.c:602
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_nc_change(User *u)
Definition: inspircd11.c:1712
void inspircd_set_umode(User *user, int ac, char **av)
Definition: inspircd11.c:401
void inspircd_cmd_bot_chan_mode(char *nick, char *chan)
Definition: inspircd11.c:854
void inspircd_cmd_join(char *user, char *channel, time_t chantime)
Definition: inspircd11.c:903
void inspircd_cmd_serv_privmsg(char *source, char *dest, char *msg)
Definition: inspircd11.c:848
void inspircd_cmd_372_error(char *source)
Definition: inspircd11.c:596
void inspircd_cmd_312(char *buf)
Definition: inspircd11.c:1007
E int servernum
Definition: extern.h:615
void inspircd_cmd_svid_umode2(User *u, char *ts)
Definition: inspircd11.c:1720
void inspircd_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
Definition: inspircd11.c:1149
void inspircd_cmd_serv_notice(char *source, char *dest, char *msg)
Definition: inspircd11.c:843
int anope_event_opertype(char *source, int ac, char **av)
Definition: inspircd11.c:669
int anope_event_time(char *source, int ac, char **av)
Definition: inspircd12.c:2531
int anope_event_sanick(char *source, int ac, char **av)
void inspircd_cmd_219(char *source, char *letter)
Definition: inspircd11.c:1027
void inspircd_cmd_jupe(char *jserver, char *who, char *reason)
Definition: inspircd11.c:1782
void inspircd_cmd_part(char *nick, char *chan, char *buf)
Definition: inspircd11.c:954
void inspircd_cmd_401(char *source, char *who)
Definition: inspircd11.c:1042
void inspircd_cmd_chgident(char *nick, char *vIdent)
Definition: inspircd11.c:931
void inspircd_cmd_sgline(char *mask, char *reason)
Definition: inspircd11.c:1684
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_311(char *buf)
Definition: inspircd11.c:997
void inspircd_cmd_242(char *buf)
Definition: inspircd11.c:1061
void inspircd_cmd_squit(char *servname, char *message)
Definition: inspircd11.c:1112
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_nick(char *nick, char *name, char *modes)
Definition: inspircd11.c:613
void inspircd_cmd_notice(char *source, char *dest, char *buf)
Definition: inspircd11.c:811
int anope_event_fjoin(char *source, int ac, char **av)
Definition: inspircd11.c:723
int inspircd_flood_mode_check(char *value)
Definition: inspircd11.c:1768
void inspircd_cmd_svso(char *source, char *nick, char *flag)
Definition: inspircd11.c:1122
void inspircd_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when)
Definition: inspircd11.c:547
void inspircd_cmd_global_legacy(char *source, char *fmt)
Definition: inspircd11.c:1796
void inspircd_cmd_ctcp(char *source, char *dest, char *buf)
Definition: inspircd11.c:1812
void inspircd_cmd_sqline(char *mask, char *reason)
Definition: inspircd11.c:1101
void inspircd_cmd_chg_nick(char *oldnick, char *newnick)
Definition: inspircd11.c:1127
void inspircd_cmd_307(char *buf)
Definition: inspircd11.c:987
char * ts6_sid_retrieve()
Definition: inspircd12.c:2591
void inspircd_cmd_318(char *source, char *who)
Definition: inspircd11.c:1051
void inspircd_cmd_317(char *buf)
Definition: inspircd11.c:1017
int anope_event_metadata(char *source, int ac, char **av)
Definition: inspircd12.c:1749
int anope_event_burst(char *source, int ac, char **av)
Definition: bahamut.c:1455
int anope_event_sajoin(char *source, int ac, char **av)
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_243(char *buf)
Definition: inspircd11.c:1071
void inspircd_cmd_release_svshold(char *nick)
Definition: inspircd11.c:1659
void inspircd_cmd_svid_umode(char *nick, time_t ts)
Definition: inspircd11.c:1704
int anope_event_eob(char *source, int ac, char **av)
Definition: hybrid.c:889