Anope IRC Services  Version 1.8
Go to the documentation of this file.
1 /* Viagra IRCD functions
2  *
3  * (C) 2003-2014 Anope Team
4  * Contact us at
5  *
6  * Please read COPYING and README for further details.
7  *
8  * Based on the original code of Epona by Lara.
9  * Based on the original code of Services by Andy Church.
10  *
11  *
12  */
14 /* User Modes */
15 #define UMODE_A 0x00000040 /* Is a Server Administrator. */
16 #define UMODE_C 0x00002000 /* Is a Server Co Administrator. */
17 #define UMODE_I 0x00008000 /* Stealth mode, makes you beeing hidden at channel. invisible joins/parts. */
18 #define UMODE_N 0x00000400 /* Is a Network Administrator. */
19 #define UMODE_O 0x00004000 /* Local IRC Operator. */
20 #define UMODE_Q 0x00001000 /* Is an Abuse Administrator. */
21 #define UMODE_R 0x08000000 /* Cant receive messages from non registered user. */
22 #define UMODE_S 0x00000080 /* Is a Network Service. For Services only. */
23 #define UMODE_T 0x00000800 /* Is a Technical Administrator. */
24 #define UMODE_a 0x00000001 /* Is a Services Administrator. */
25 #define UMODE_b 0x00040000 /* Can listen to generic bot warnings. */
26 #define UMODE_c 0x00010000 /* See's all connects/disconnects on local server. */
27 #define UMODE_d 0x00000100 /* Can listen to debug and channel cration notices. */
28 #define UMODE_e 0x00080000 /* Can see client connections/exits on remote servers. */
29 #define UMODE_f 0x00100000 /* Listen to flood/spam alerts from server. */
30 #define UMODE_g 0x00000200 /* Can read & send to globops, and locops. */
31 #define UMODE_h 0x00000002 /* Is a Help Operator. */
32 #define UMODE_i 0x00000004 /* Invisible (Not shown in /who and /names searches). */
33 #define UMODE_n 0x00020000 /* Can see client nick change notices. */
34 #define UMODE_o 0x00000008 /* Global IRC Operator. */
35 #define UMODE_r 0x00000010 /* Identifies the nick as being registered. */
36 #define UMODE_s 0x00200000 /* Can listen to generic server messages. */
37 #define UMODE_w 0x00000020 /* Can listen to wallop messages. */
38 #define UMODE_x 0x40000000 /* Gives the user hidden hostname. */
41 /* Channel Modes */
42 #define CMODE_i 0x00000001 /* Invite-only allowed. */
43 #define CMODE_m 0x00000002 /* Moderated channel, noone can speak and changing nick except users with mode +vho */
44 #define CMODE_n 0x00000004 /* No messages from outside channel */
45 #define CMODE_p 0x00000008 /* Private channel. */
46 #define CMODE_s 0x00000010 /* Secret channel. */
47 #define CMODE_t 0x00000020 /* Only channel operators may set the topic */
48 #define CMODE_k 0x00000040 /* Needs the channel key to join the channel */
49 #define CMODE_l 0x00000080 /* Channel may hold at most <number> of users */
50 #define CMODE_R 0x00000100 /* Requires a registered nickname to join the channel. */
51 #define CMODE_r 0x00000200 /* Channel is registered. */
52 #define CMODE_c 0x00000400 /* No ANSI color can be sent to the channel */
53 #define CMODE_M 0x00000800 /* Requires a registered nickname to speak at the channel. */
54 #define CMODE_H 0x00001000 /* HelpOps only channel. */
55 #define CMODE_O 0x00008000 /* IRCOps only channel. */
56 #define CMODE_S 0x00020000 /* Strips all mesages out of colors. */
57 #define CMODE_N 0x01000000 /* No nickchanges allowed. */
58 #define CMODE_P 0x02000000 /* "Peace mode" No kicks allowed unless by u:lines */
59 #define CMODE_x 0x04000000 /* No bold/underlined or reversed text can be sent to the channel */
63 void viagra_set_umode(User * user, int ac, char **av);
64 void viagra_cmd_svsnoop(char *server, int set);
65 void viagra_cmd_remove_akill(char *user, char *host);
66 void viagra_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when);
67 void viagra_cmd_vhost_off(User * u);
68 void viagra_cmd_akill(char *user, char *host, char *who, time_t when,time_t expires, char *reason);
69 void viagra_cmd_svskill(char *source, char *user, char *buf);
70 void viagra_cmd_svsmode(User * u, int ac, char **av);
71 void viagra_cmd_372(char *source, char *msg);
72 void viagra_cmd_372_error(char *source);
73 void viagra_cmd_375(char *source);
74 void viagra_cmd_376(char *source);
75 void viagra_cmd_nick(char *nick, char *name, char *modes);
76 void viagra_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes);
77 void viagra_cmd_mode(char *source, char *dest, char *buf);
78 void viagra_cmd_bot_nick(char *nick, char *user, char *host, char *real, char *modes);
79 void viagra_cmd_kick(char *source, char *chan, char *user, char *buf);
80 void viagra_cmd_notice_ops(char *source, char *dest, char *buf);
81 void viagra_cmd_notice(char *source, char *dest, char *buf);
82 void viagra_cmd_notice2(char *source, char *dest, char *msg);
83 void viagra_cmd_privmsg(char *source, char *dest, char *buf);
84 void viagra_cmd_privmsg2(char *source, char *dest, char *msg);
85 void viagra_cmd_serv_notice(char *source, char *dest, char *msg);
86 void viagra_cmd_serv_privmsg(char *source, char *dest, char *msg);
87 void viagra_cmd_bot_chan_mode(char *nick, char *chan);
88 void viagra_cmd_351(char *source);
89 void viagra_cmd_quit(char *source, char *buf);
90 void viagra_cmd_pong(char *servname, char *who);
91 void viagra_cmd_join(char *user, char *channel, time_t chantime);
92 void viagra_cmd_unsqline(char *user);
93 void viagra_cmd_invite(char *source, char *chan, char *nick);
94 void viagra_cmd_part(char *nick, char *chan, char *buf);
95 void viagra_cmd_391(char *source, char *timestr);
96 void viagra_cmd_250(char *buf);
97 void viagra_cmd_307(char *buf);
98 void viagra_cmd_311(char *buf);
99 void viagra_cmd_312(char *buf);
100 void viagra_cmd_317(char *buf);
101 void viagra_cmd_219(char *source, char *letter);
102 void viagra_cmd_401(char *source, char *who);
103 void viagra_cmd_318(char *source, char *who);
104 void viagra_cmd_242(char *buf);
105 void viagra_cmd_243(char *buf);
106 void viagra_cmd_211(char *buf);
107 void viagra_cmd_global(char *source, char *buf);
108 void viagra_cmd_global_legacy(char *source, char *fmt);
109 void viagra_cmd_sqline(char *mask, char *reason);
110 void viagra_cmd_squit(char *servname, char *message);
111 void viagra_cmd_svso(char *source, char *nick, char *flag);
112 void viagra_cmd_chg_nick(char *oldnick, char *newnick);
113 void viagra_cmd_svsnick(char *source, char *guest, time_t when);
114 void viagra_cmd_vhost_on(char *nick, char *vIdent, char *vhost);
115 void viagra_cmd_connect(int servernum);
116 void viagra_cmd_bob();
117 void viagra_cmd_svshold(char *nick);
118 void viagra_cmd_release_svshold(char *nick);
119 void viagra_cmd_unsgline(char *mask);
120 void viagra_cmd_unszline(char *mask);
121 void viagra_cmd_szline(char *mask, char *reason, char *whom);
122 void viagra_cmd_sgline(char *mask, char *reason);
123 void viagra_cmd_unban(char *name, char *nick);
124 void viagra_cmd_svsmode_chan(char *name, char *mode, char *nick);
125 void viagra_cmd_svid_umode(char *nick, time_t ts);
126 void viagra_cmd_nc_change(User * u);
127 void viagra_cmd_svid_umode2(User * u, char *ts);
128 void viagra_cmd_svid_umode3(User * u, char *ts);
129 void viagra_cmd_eob();
130 int viagra_flood_mode_check(char *value);
131 void viagra_cmd_jupe(char *jserver, char *who, char *reason);
132 int viagra_valid_nick(char *nick);
133 void viagra_cmd_ctcp(char *source, char *dest, char *buf);
void viagra_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: viagra.c:1425
void viagra_cmd_svid_umode2(User *u, char *ts)
Definition: viagra.c:1471
void viagra_cmd_svso(char *source, char *nick, char *flag)
Definition: viagra.c:1432
void viagra_cmd_akill(char *user, char *host, char *who, time_t when, time_t expires, char *reason)
Definition: viagra.c:848
void viagra_cmd_243(char *buf)
Definition: viagra.c:1308
void viagra_cmd_svshold(char *nick)
Definition: viagra.c:1405
void viagra_cmd_chg_nick(char *oldnick, char *newnick)
Definition: viagra.c:1486
void viagra_cmd_svsnick(char *source, char *guest, time_t when)
Definition: viagra.c:1417
void viagra_cmd_bob()
Definition: viagra.c:987
void viagra_cmd_part(char *nick, char *chan, char *buf)
Definition: viagra.c:793
void viagra_cmd_privmsg2(char *source, char *dest, char *msg)
Definition: viagra.c:1179
void viagra_cmd_global(char *source, char *buf)
Definition: viagra.c:1195
void viagra_cmd_unban(char *name, char *nick)
Definition: viagra.c:1439
void viagra_cmd_release_svshold(char *nick)
Definition: viagra.c:1411
int viagra_valid_nick(char *nick)
Definition: viagra.c:1575
void viagra_cmd_sgline(char *mask, char *reason)
Definition: viagra.c:782
void viagra_cmd_391(char *source, char *timestr)
Definition: viagra.c:1205
void viagra_cmd_bot_chan_mode(char *nick, char *chan)
Definition: viagra.c:1393
void viagra_cmd_318(char *source, char *who)
Definition: viagra.c:1288
void viagra_cmd_242(char *buf)
Definition: viagra.c:1298
void viagra_cmd_squit(char *servname, char *message)
Definition: viagra.c:922
void viagra_cmd_307(char *buf)
Definition: viagra.c:1224
void viagra_cmd_kick(char *source, char *chan, char *user, char *buf)
Definition: viagra.c:1343
void viagra_cmd_351(char *source)
Definition: viagra.c:1327
void viagra_cmd_pong(char *servname, char *who)
Definition: viagra.c:928
void viagra_cmd_notice(char *source, char *dest, char *buf)
Definition: viagra.c:1152
void viagra_cmd_401(char *source, char *who)
Definition: viagra.c:1279
void viagra_cmd_211(char *buf)
Definition: viagra.c:1318
void viagra_cmd_svsmode(User *u, int ac, char **av)
Definition: viagra.c:915
void viagra_cmd_global_legacy(char *source, char *fmt)
Definition: viagra.c:1566
void viagra_cmd_312(char *buf)
Definition: viagra.c:1244
void viagra_cmd_join(char *user, char *channel, time_t chantime)
Definition: viagra.c:833
void viagra_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when)
Definition: viagra.c:806
void viagra_cmd_sqline(char *mask, char *reason)
Definition: viagra.c:748
void viagra_cmd_219(char *source, char *letter)
Definition: viagra.c:1264
void viagra_cmd_375(char *source)
Definition: viagra.c:1372
void viagra_cmd_376(char *source)
Definition: viagra.c:1378
void viagra_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
Definition: viagra.c:819
void viagra_cmd_nick(char *nick, char *name, char *modes)
Definition: viagra.c:1352
void viagra_cmd_372_error(char *source)
Definition: viagra.c:1366
void viagra_cmd_250(char *buf)
Definition: viagra.c:1214
E int servernum
Definition: extern.h:615
void viagra_cmd_372(char *source, char *msg)
Definition: viagra.c:1361
void viagra_set_umode(User *user, int ac, char **av)
Definition: viagra.c:155
void viagra_cmd_invite(char *source, char *chan, char *nick)
Definition: viagra.c:1384
void viagra_cmd_remove_akill(char *user, char *host)
Definition: viagra.c:787
void viagra_cmd_serv_notice(char *source, char *dest, char *msg)
Definition: viagra.c:1184
void viagra_cmd_svskill(char *source, char *user, char *buf)
Definition: viagra.c:863
void viagra_cmd_317(char *buf)
Definition: viagra.c:1254
void viagra_cmd_notice_ops(char *source, char *dest, char *buf)
Definition: viagra.c:1144
void viagra_cmd_unszline(char *mask)
Definition: viagra.c:762
void viagra_cmd_connect(int servernum)
Definition: viagra.c:969
void viagra_cmd_svid_umode3(User *u, char *ts)
Definition: viagra.c:1476
void viagra_cmd_svsnoop(char *server, int set)
Definition: viagra.c:772
void viagra_cmd_notice2(char *source, char *dest, char *msg)
Definition: viagra.c:1165
void viagra_cmd_privmsg(char *source, char *dest, char *buf)
Definition: viagra.c:1170
int viagra_flood_mode_check(char *value)
Definition: viagra.c:1522
void viagra_cmd_bot_nick(char *nick, char *user, char *host, char *real, char *modes)
Definition: viagra.c:1334
void viagra_cmd_unsqline(char *user)
Definition: viagra.c:828
void viagra_cmd_311(char *buf)
Definition: viagra.c:1234
void viagra_cmd_svsmode_chan(char *name, char *mode, char *nick)
Definition: viagra.c:1446
void viagra_cmd_serv_privmsg(char *source, char *dest, char *msg)
Definition: viagra.c:1189
void viagra_cmd_eob()
Definition: viagra.c:1547
void viagra_cmd_vhost_off(User *u)
Definition: viagra.c:813
void viagra_cmd_szline(char *mask, char *reason, char *whom)
Definition: viagra.c:767
void viagra_cmd_quit(char *source, char *buf)
Definition: viagra.c:889
void viagra_cmd_ctcp(char *source, char *dest, char *buf)
Definition: viagra.c:1592
void viagra_cmd_unsgline(char *mask)
Definition: viagra.c:757
void viagra_cmd_mode(char *source, char *dest, char *buf)
Definition: viagra.c:871
void viagra_cmd_svid_umode(char *nick, time_t ts)
Definition: viagra.c:1457
void viagra_cmd_jupe(char *jserver, char *who, char *reason)
Definition: viagra.c:1552
void viagra_cmd_nc_change(User *u)
Definition: viagra.c:1465