26 #include <sys/socket.h>
27 #include <netinet/in.h>
28 #include <arpa/inet.h>
33 int inet_aton(
const char *name,
struct in_addr *addr)
35 uint32 a = inet_addr(name);
63 "-cijlmnpstuzACGHKNOQRSV",
176 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
177 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
178 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
199 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
200 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
210 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
212 'o', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
213 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
215 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
216 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
'q', 0
220 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
221 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
222 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
223 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
224 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
225 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
226 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
227 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
228 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
229 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
230 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
231 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
240 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
241 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL},
242 {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}, {NULL}
248 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
249 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
250 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
251 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
252 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
253 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
254 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
255 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
283 {0}, {0}, {0}, {0}, {0}, {0},
347 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
348 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
349 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
350 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
352 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
353 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
354 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
355 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
357 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
358 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
359 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
360 {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0},
390 {0}, {0}, {0}, {0}, {0}
439 alog(
"debug: Changing mode for %s to %s", user->
nick, modes);
472 if (
burst && user == u_intro_regged)
568 char *topic, time_t when)
571 if (!whosets)
return;
573 send_cmd(ud ? ud->
uid : whosets,
"FTOPIC %s %lu %s :%s", chan,
574 (
unsigned long int) when, whosetit, topic);
596 time_t expires,
char *reason)
599 time_t timeleft = expires - time(NULL);
600 if (timeleft > 172800 || timeleft < 0)
602 send_cmd(
TS6SID,
"ADDLINE G %s@%s %s %ld %ld :%s", user, host, who,
603 (
long int) time(NULL), (
long int) timeleft, reason);
611 if (!buf || !source || !user)
624 if (strstr(av[0],
"+r") && u->
na) {
626 }
else if (strstr(av[0],
"-r")) {
643 send_cmd(
TS6SID,
"PUSH %s ::%s 422 %s :- MOTD file not found! Please "
644 "contact your IRC administrator.", u ? u->
uid : source,
ServerName, source);
651 send_cmd(
TS6SID,
"PUSH %s ::%s 375 %s :- %s Message of the Day", u ? u->
uid : source,
667 nicknumbuf, (
long int) time(NULL), nick,
ServiceHost,
670 if (strchr(modes,
'o') != NULL)
671 send_cmd(nicknumbuf,
"OPERTYPE Service");
675 char *real,
char *modes)
678 send_cmd(
TS6SID,
"UID %s %ld %s %s %s %s 0.0.0.0 %ld +%s :%s", nicknumbuf,
679 (
long int) time(NULL), nick, host, host, user, (
long int) time(NULL), modes, real);
774 alog(
"Param: %s", newav[o - 1]);
806 char prefixandnick[60];
809 *prefixandnick =
'\0';
815 while (curnick != NULL) {
816 char *curnick_real = curnick;
817 for (; *curnick; curnick++) {
821 prefixandnick[nlen++] =
'~';
824 prefixandnick[nlen++] =
'&';
827 prefixandnick[nlen++] =
'@';
830 prefixandnick[nlen++] =
'%';
833 prefixandnick[nlen++] =
'+';
837 strncpy(prefixandnick + nlen, curnick,
sizeof(prefixandnick) - nlen);
841 alog(
"fjoin: unrecognised prefix: %c", *curnick);
848 strncat(nicklist, prefixandnick, 513);
849 strncat(nicklist,
" ", 513);
859 for (i = 2; i < ac - 1; i++)
876 nicknumbuf, (
long int) time(NULL), nick, host, host, user,
877 (
long int) time(NULL), modes, real);
879 if (strchr(modes,
'o') != NULL)
880 send_cmd(nicknumbuf,
"OPERTYPE Bot");
886 Uid *ud = (source ?
find_uid(source) : NULL), *ud2 = NULL;
887 if (!u) ud2 = (user ?
find_uid(user) : NULL);
890 send_cmd(ud ? ud->
uid : source,
"KICK %s %s :%s", chan, u ? u->
uid : ud2 ? ud2->uid : user, buf);
892 send_cmd(ud ? ud->
uid : source,
"KICK %s %s :%s", chan, u ? u->
uid : ud2 ? ud2->uid : user, user);
937 ud = (source ?
find_uid(source) : NULL);
974 send_cmd(
TS6SID,
"PUSH %s ::%s 351 %s Anope-%s %s :%s - %s (%s) -- %s",
1008 sid ? sid :
TS6SID, descript);
1014 send_cmd(servname,
"PONG %s", who);
1021 send_cmd(
TS6SID,
"FJOIN %s %ud + :,%s", channel, (
unsigned int)chantime, ud ? ud->
uid : user);
1042 if (!nick || !vhost)
1058 if (!nick || !vIdent || !*vIdent)
1062 send_cmd(ud->
uid,
"CHGIDENT %s %s", nick, vIdent);
1070 if (!source || !chan || !nick)
1207 if (!source || !who)
1217 if (!source || !who)
1287 send_cmd(ud ? ud->
uid : TS6SID,
"SNONOTICE A :%s", buf);
1294 if (!mask || !reason)
1298 (
long int) time(NULL), reason);
1304 if (!servname || !message)
1319 if (!oldnick || !newnick)
1327 send_cmd(ud ? ud->
uid : oldnick,
"NICK %s %ld", newnick, time(NULL));
1335 if (!source || !guest)
1340 send_cmd(
TS6SID,
"SVSNICK %s %s %lu", u ? u->
uid : source, guest, (
unsigned long) when);
1358 if (servernum == 1) {
1361 if (servernum == 2) {
1364 if (servernum == 3) {
1413 m_away(u ? u->
nick : source, (ac ? av[0] : NULL));
1420 time_t topic_time = time(NULL);
1425 alog(
"debug: TOPIC %s for nonexistent channel %s",
1438 if (ac > 1 && *av[1])
1446 if (ac > 1 && *av[1])
1482 if (ac < 1 || ac > 3)
1516 if (*av[0] ==
'#' || *av[0] ==
'&') {
1533 if (u == NULL || u2 == NULL)
1594 alog(
"debug: SETNAME for nonexistent user %s", source);
1613 alog(
"debug: FNAME for nonexistent user %s", source);
1632 alog(
"debug: SETIDENT for nonexistent user %s", source);
1651 alog(
"debug: CHGIDENT for nonexistent user %s", av[0]);
1670 alog(
"debug: SETHOST for nonexistent user %s", source);
1681 do_nick(source, av[0], NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL);
1705 struct in_addr addy;
1708 int ts = strtoul(av[1], NULL, 10);
1709 int regged = ((strchr(av[8],
'r') != NULL) ? ts : 0);
1714 u_intro_regged = NULL;
1717 alog(
"debug: User %s had +r but received no account info.", user->
nick);
1725 inet_aton(av[6], &addy);
1734 ts, regged &&
burst ? 2 : 0, htonl(*ad), av[4], av[0]);
1738 if (regged &&
burst && user->
na) u_intro_regged = user;
1755 if (ac != 3 || !u_intro_regged || !
burst)
1760 if (
debug)
alog(
"debug: Received METADATA from unknown source.");
1763 if (strcmp(av[1],
"accountname"))
1768 if (
debug)
alog(
"debug: METADATA for nonexistent user %s.", av[0]);
1771 if (u != u_intro_regged) {
1772 if (
debug)
alog(
"debug: ERROR: Expected different user in METADA.");
1775 u_intro_regged = NULL;
1779 if (na->
nc == u->
na->
nc) {
1796 alog(
"%s: %s!%s@%s automatically identified for nick %s",
1802 alog(
"debug: User %s had +r but did not receive matching account info.", u->
nick);
1824 u_intro_regged = NULL;
1853 alog(
"debug: FHOST for nonexistent user %s.", source);
1875 do_server(source, av[0], av[2], av[4], av[3]);
1896 if (ac < 1 || ac > 2)
1906 if (source && ac >= 1) {
1917 if (strcasecmp(av[0],
"START") == 0) {
1934 }
else if (strcasecmp(av[0],
"CAPABILITIES") == 0) {
1935 char *h = strstr(av[1],
"HALFOP");
1936 if (h && h[7] ==
'1') {
1939 }
else if (strcasecmp(av[0],
"MODULES") == 0) {
1940 if (strstr(av[1],
"m_globops.so")) {
1943 if (strstr(av[1],
"m_services_account.so")) {
1946 if (strstr(av[1],
"m_svshold.so")) {
1949 if (strstr(av[1],
"m_chghost.so")) {
1952 if (strstr(av[1],
"m_chgident.so")) {
1955 if (strstr(av[1],
"m_messageflood.so")) {
1958 if (strstr(av[1],
"m_banexception.so")) {
1961 if (strstr(av[1],
"m_inviteexception.so")) {
1964 if (strstr(av[1],
"m_joinflood.so")) {
1967 if (strstr(av[1],
"m_hidechans.so")) {
1970 if (strstr(av[1],
"m_chanprotect.so")) {
1973 if (strstr(av[1],
"m_redirect.so")) {
1976 if (strstr(av[1],
"m_servprotect.so")) {
1979 if (strstr(av[1],
"m_permchannels.so")) {
1982 if (strstr(av[1],
"m_nokicks.so")) {
1985 if (strstr(av[1],
"m_stripcolor.so")) {
1988 if (strstr(av[1],
"m_nonotice.so")) {
1991 if (strstr(av[1],
"m_auditorium.so")) {
1994 if (strstr(av[1],
"m_sslmodes.so")) {
1997 if (strstr(av[1],
"m_blockcolor.so")) {
2000 if (strstr(av[1],
"m_operchans.so")) {
2003 if (strstr(av[1],
"m_nonicks.so")) {
2006 if (strstr(av[1],
"m_knock.so")) {
2009 if (strstr(av[1],
"m_censor.so")) {
2012 if (strstr(av[1],
"m_noctcp.so")) {
2015 if (strstr(av[1],
"m_allowinvite.so")) {
2018 if (strstr(av[1],
"m_blockcaps.so")) {
2021 if (strstr(av[1],
"m_nickflood.so")) {
2024 if (strstr(av[1],
"m_chanfilter.so")) {
2027 if (strstr(av[1],
"m_kicknorejoin.so")) {
2030 if (strstr(av[1],
"m_cloaking.so")) {
2033 }
else if (strcasecmp(av[0],
"END") == 0) {
2035 send_cmd(NULL,
"ERROR :m_globops is not loaded. This is required by Anope");
2036 quitmsg =
"Remote server does not have the m_globops module loaded, and this is required.";
2041 send_cmd(NULL,
"ERROR :m_services_account is not loaded. This is required by Anope");
2042 quitmsg =
"Remote server does not have the m_services_account module loaded, and this is required.";
2047 send_cmd(NULL,
"ERROR :m_hidechans is not loaded. This is required by Anope");
2048 quitmsg =
"Remote server does not have the m_hidechans module loaded, and this is required.";
2068 while ((cbmi->
mode !=
'f')) {
2082 alog(
"Support for channelmode +f can not be enabled");
2104 while ((cbmi->
mode !=
'j'))
2118 alog(
"Support for channelmode +j can not be enabled");
2125 alog(
"Support for admin and owner channelmodes disabled.");
2131 alog(
"Support for halfops disabled.");
2137 while ((cbmi->
mode !=
'L'))
2151 alog(
"Support for channelmode +L can not be enabled");
2177 alog(
"Support for usermode +k enabled. Pseudo-clients will be gods.");
2186 myCbmodes[
'Q'].
flags = 0;
2190 myCbmodes[
'S'].
flags = 0;
2194 myCbmodes[
'T'].
flags = 0;
2198 myCbmodes[
'u'].
flags = 0;
2202 myCbmodes[
'z'].
flags = 0;
2206 myCbmodes[
'c'].
flags = 0;
2214 myCbmodes[
'N'].
flags = 0;
2219 myCbmodes[
'K'].
flags = 0;
2223 myCbmodes[
'G'].
flags = 0;
2227 myCbmodes[
'C'].
flags = 0;
2231 myCbmodes[
'A'].
flags = 0;
2235 myCbmodes[
'B'].
flags = 0;
2240 while ((cbmi->
mode !=
'F'))
2251 alog(
"Support for channelmode +F can not be enabled");
2261 while ((cbmi->
mode !=
'J'))
2272 alog(
"Support for channelmode +J can not be enabled");
2287 argv[5] =
"UNCONNECT";
2295 quitmsg =
"Defcon modes failed to validate";
2311 "Being held for registered user");
2337 (
long int) time(NULL), reason);
2364 alog(
"debug: common_svsmode(0)");
2372 alog(
"debug: common_svsmode(1)");
2380 alog(
"debug: common_svsmode(2)");
2393 send_cmd(ud ? ud->
uid : source,
"SVSJOIN %s %s", u ? u->
uid : nick, chan);
2400 send_cmd(ud ? ud->
uid : source,
"SVSPART %s %s", u ? u->
uid : nick, chan);
2434 if (value && *value !=
':'
2435 && (strtoul((*value ==
'*' ? value + 1 : value), &dp, 10) > 0)
2436 && (*dp ==
':') && (*(++dp) != 0) && (strtoul(dp, &end, 10) > 0)
2448 boolean found =
false;
2453 snprintf(rbuf,
sizeof(rbuf),
"Juped by %s%s%s", who,
2454 reason ?
": " :
"", reason ? reason :
"");
2504 ud = (source ?
find_uid(source) : NULL);
2512 char *tempValue, *one, *two;
2520 one = strtok(tempValue,
":");
2521 two = strtok(NULL,
"");
2526 if ((param1 >= 1) && (param1 <= 255) && (param2 >= 1) && (param2 <= 999))
2536 send_cmd(
TS6SID,
"TIME %s %s %ld", source, av[1], (
long int) time(NULL));
2557 return ((strlen(sid) == 3) && isdigit(sid[0]) &&
2558 ((sid[1] >=
'A' && sid[1] <=
'Z') || isdigit(sid[1])) &&
2559 ((sid[2] >=
'A' && sid[2] <=
'Z') || isdigit(sid[2])));
2710 alog(
"FATAL ERROR: The InspIRCd 1.2 protocol module requires UseTS6 to be enabled in the services.conf.");
2719 alog(
"FATAL ERROR: The InspIRCd 1.2 protocol module requires the Numeric in the services.conf to contain a TS6SID.");
E int is_oper(User *user)
static int has_chanfilter
E void pmodule_cmd_vhost_off(void(*func)(User *u))
void inspircd_cmd_szline(char *mask, char *reason, char *whom)
int anope_event_privmsg(char *source, int ac, char **av)
E void pmodule_permchan_mode(int mode)
static int has_blockcolor
E void set_redirect(Channel *chan, char *value)
int anope_event_admin(char *source, int ac, char **av)
E Uid * find_uid(const char *nick)
static int has_messagefloodmod
int anope_event_mode(char *source, int ac, char **av)
int anope_event_sethost(char *source, int ac, char **av)
static int has_joinfloodmod
int inspircd_flood_mode_check(char *value)
E void pmodule_cmd_svspart(void(*func)(char *source, char *nick, char *chan))
void inspircd_cmd_svspart(char *source, char *nick, char *chan)
int anope_event_credits(char *source, int ac, char **av)
void inspircd_set_umode(User *user, int ac, char **av)
void inspircd_cmd_svso(char *source, char *nick, char *flag)
void inspircd_cmd_211(char *buf)
E void do_topic(const char *source, int ac, char **av)
void inspircd_cmd_351(char *source)
void(* cssetvalue)(ChannelInfo *ci, char *value)
E void do_server(const char *source, char *servername, char *hops, char *descript, char *numeric)
E void pmodule_cmd_notice2(void(*func)(char *source, char *dest, char *msg))
void inspircd_cmd_219(char *source, char *letter)
int inspircd_valid_nick(char *nick)
void inspircd_cmd_privmsg(char *source, char *dest, char *buf)
void inspircd_cmd_vhost_off(User *u)
E void pmodule_cmd_bot_chan_mode(void(*func)(char *nick, char *chan))
static int has_inviteexceptionmod
void inspircd_cmd_svsadmin(char *server, int set)
int anope_event_kill(char *source, int ac, char **av)
E void do_squit(const char *source, int ac, char **av)
E int snprintf(char *buf, size_t size, const char *fmt,...)
int anope_event_436(char *source, int ac, char **av)
E NickAlias * findnick(const char *nick)
E int anope_event_null(char *source, int ac, char **av)
E void pmodule_cmd_351(void(*func)(char *source))
E void cs_set_throttle(ChannelInfo *ci, char *value)
MDE void updateProtectDetails(char *level_info_protect_word, char *level_info_protectme_word, char *fant_protect_add, char *fant_protect_del, char *level_protect_word, char *protect_set_mode, char *protect_unset_mode)
void inspircd_cmd_serv_privmsg(char *source, char *dest, char *msg)
void inspircd_cmd_svsnick(char *source, char *guest, time_t when)
E void change_user_username(User *user, const char *username)
E void pmodule_cmd_nick(void(*func)(char *nick, char *name, char *modes))
E void chan_set_key(Channel *chan, char *value)
E void pmodule_ircd_cmmodes(CMMode modes[128])
E void do_kick(const char *source, int ac, char **av)
E void cs_set_unkwn(ChannelInfo *ci, char *value)
E void pmodule_cmd_372_error(void(*func)(char *source))
MDE int addCoreMessage(MessageHash *msgTable[], Message *m)
E void pmodule_valid_nick(int(*func)(char *nick))
E void cs_set_limit(ChannelInfo *ci, char *value)
void inspircd_cmd_unban(char *name, char *nick)
int anope_event_fmode(char *source, int ac, char **av)
E int nick_identified(User *u)
void moduleAddIRCDMsgs(void)
E void pmodule_cmd_kick(void(*func)(char *source, char *chan, char *user, char *buf))
E void send_cmd(const char *source, const char *fmt,...) FORMAT(printf
E void send_event(const char *name, int argc,...)
void inspircd_cmd_notice_ops(char *source, char *dest, char *buf)
E void pmodule_cmd_vhost_on(void(*func)(char *nick, char *vIdent, char *vhost))
E void pmodule_cmd_svsjoin(void(*func)(char *source, char *nick, char *chan, char *param))
static int has_chghostmod
E void pmodule_cmd_swhois(void(*func)(char *source, char *who, char *mask))
E void pmodule_cmd_pong(void(*func)(char *servname, char *who))
E void pmodule_cmd_307(void(*func)(char *buf))
E char * get_limit(Channel *chan)
E void pmodule_cmd_211(void(*func)(char *buf))
E void set_unkwn(Channel *chan, char *value)
E void pmodule_cmd_unsqline(void(*func)(char *user))
void inspircd_cmd_swhois(char *source, char *who, char *mask)
E void pmodule_cmd_sgline(void(*func)(char *mask, char *reason))
E int stricmp(const char *s1, const char *s2)
char *(* csgetvalue)(ChannelInfo *ci)
E void pmodule_set_umode(void(*func)(User *user, int ac, char **av))
void inspircd_cmd_unsgline(char *mask)
E void pmodule_ircd_cap(IRCDCAPAB *cap)
void inspircd_cmd_376(char *source)
int anope_event_setname(char *source, int ac, char **av)
E void pmodule_cmd_nc_change(void(*func)(User *u))
E void pmodule_cmd_372(void(*func)(char *source, char *msg))
void inspircd_cmd_notice2(char *source, char *dest, char *msg)
void inspircd_cmd_jupe(char *jserver, char *who, char *reason)
int inspircd_jointhrottle_mode_check(char *value)
void inspircd_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when)
void inspircd_cmd_join(char *user, char *channel, time_t chantime)
E void pmodule_cmd_bob(void(*func)())
E void pmodule_ircd_flood_mode_char_remove(char *mode)
E void del_invite(Channel *chan, char *mask)
void inspircd_cmd_svsmode(User *u, int ac, char **av)
E User * find_byuid(const char *uid)
E void pmodule_cmd_ctcp(void(*func)(char *source, char *dest, char *buf))
static int ts6_sid_initted
char topic_setter[NICKMAX]
E void pmodule_cmd_invite(void(*func)(char *source, char *chan, char *nick))
E void pmodule_ircd_var(IRCDVar *ircdvar)
E void do_umode(const char *source, int ac, char **av)
static int has_svsholdmod
MDE Message * createMessage(const char *name, int(*func)(char *source, int ac, char **av))
E Uid * find_nickuid(const char *uid)
void moduleAddAnopeCmds()
E void add_invite(Channel *chan, char *mask)
static int has_servprotectmod
void inspircd_cmd_svsjoin(char *source, char *nick, char *chan, char *param)
void inspircd_cmd_svsmode_chan(char *name, char *mode, char *nick)
E void pmodule_cmd_svsnoop(void(*func)(char *server, int set))
E void pmodule_cmd_squit(void(*func)(char *servname, char *message))
E void check_memos(User *u)
E char * strscpy(char *d, const char *s, size_t len)
E void pmodule_cmd_unsgline(void(*func)(char *mask))
E char * get_throttle(Channel *chan)
void inspircd_cmd_312(char *buf)
MDE void moduleAddAuthor(const char *author)
int anope_event_burst(char *source, int ac, char **av)
E char * cs_get_key(ChannelInfo *ci)
E void cs_set_redirect(ChannelInfo *ci, char *value)
MDE void moduleSetType(MODType type)
int anope_event_motd(char *source, int ac, char **av)
static int has_globopsmod
void inspircd_cmd_nick(char *nick, char *name, char *modes)
void inspircd_cmd_svid_umode2(User *u, char *ts)
E void pmodule_cmd_jupe(void(*func)(char *jserver, char *who, char *reason))
E void update_host(User *user)
E void pmodule_cmd_243(void(*func)(char *buf))
void inspircd_cmd_notice(char *source, char *dest, char *buf)
E Channel * findchan(const char *chan)
int anope_event_idle(char *source, int ac, char **av)
E void do_sjoin(const char *source, int ac, char **av)
E void anope_set_umode(User *user, int ac, char **av)
E char * sstrdup(const char *s)
void inspircd_cmd_svid_umode(char *nick, time_t ts)
int anope_event_rehash(char *source, int ac, char **av)
E void do_join(const char *source, int ac, char **av)
E Uid * new_uid(const char *nick, char *uid)
static char currentpass[1024]
void inspircd_cmd_372_error(char *source)
E int m_nickcoll(char *user)
E char * cs_get_redirect(ChannelInfo *ci)
void inspircd_cmd_svsnoop(char *server, int set)
E void pmodule_cmd_375(void(*func)(char *source))
static char ts6_new_sid[4]
E void pmodule_key_mode(int mode)
E void pmodule_cmd_svsnick(void(*func)(char *source, char *guest, time_t when))
void inspircd_cmd_guest_nick(char *nick, char *user, char *host, char *real, char *modes)
void inspircd_cmd_part(char *nick, char *chan, char *buf)
E void pmodule_invis_umode(int mode)
E void pmodule_cmd_svid_umode2(void(*func)(User *u, char *ts))
void inspircd_cmd_mode(char *source, char *dest, char *buf)
E void pmodule_cmd_chg_nick(void(*func)(char *oldnick, char *newnick))
void inspircd_cmd_ctcp(char *source, char *dest, char *buf)
void(* addmask)(Channel *chan, char *mask)
void inspircd_cmd_server(char *servname, int hop, char *descript, char *sid)
E void record_topic(const char *chan)
int AnopeInit(int argc, char **argv)
E void pmodule_invite_cmode(int mode)
E void cs_set_flood(ChannelInfo *ci, char *value)
E void pmodule_cmd_eob(void(*func)())
E void pmodule_cmd_svid_umode3(void(*func)(User *u, char *ts))
E void pmodule_cmd_376(void(*func)(char *source))
int anope_event_uid(char *source, int ac, char **av)
E char * ts6_uid_retrieve(void)
E User * finduser(const char *nick)
void inspircd_cmd_391(char *source, char *buf)
void inspircd_cmd_307(char *buf)
E int m_kill(char *nick, char *msg)
E void pmodule_cmd_part(void(*func)(char *nick, char *chan, char *buf))
E int m_away(char *source, char *msg)
E BotInfo * findbot(char *nick)
E void set_flood(Channel *chan, char *value)
int anope_event_part(char *source, int ac, char **av)
static int has_chanprotectmod
void(* setvalue)(Channel *chan, char *value)
MDE void moduleAddVersion(const char *version)
void inspircd_cmd_squit(char *servname, char *message)
int anope_event_setident(char *source, int ac, char **av)
void inspircd_cmd_317(char *buf)
void inspircd_cmd_chghost(char *nick, char *vhost)
int anope_event_capab(char *source, int ac, char **av)
char *(* getvalue)(Channel *chan)
E void add_ban(Channel *chan, char *mask)
E void do_part(const char *source, int ac, char **av)
E void del_ban(Channel *chan, char *mask)
E char * merge_args(int argc, char **argv)
void inspircd_cmd_chgident(char *nick, char *vIdent)
void inspircd_cmd_serv_notice(char *source, char *dest, char *msg)
E void pmodule_ircd_cumodes(CUMode modes[128])
E const char version_flags[]
int anope_event_time(char *source, int ac, char **av)
void inspircd_cmd_svskill(char *source, char *user, char *buf)
E void alog(const char *fmt,...) FORMAT(printf
void inspircd_cmd_pass(char *pass)
void inspircd_cmd_nc_change(User *u)
int anope_event_join(char *source, int ac, char **av)
E char * get_redirect(Channel *chan)
E int m_motd(char *source)
E void pmodule_cmd_svsmode(void(*func)(User *u, int ac, char **av))
E void do_quit(const char *source, int ac, char **av)
E void pmodule_cmd_bot_nick(void(*func)(char *nick, char *user, char *host, char *real, char *modes))
E void pmodule_private_cmode(int mode)
void(* delmask)(Channel *chan, char *mask)
E char * cs_get_flood(ChannelInfo *ci)
E void display_news(User *u, int16 type)
void inspircd_cmd_pong(char *servname, char *who)
static int has_kicknorejoin
E Server * findserver(Server *s, const char *name)
int anope_event_squit(char *source, int ac, char **av)
E void pmodule_cmd_svid_umode(void(*func)(char *nick, time_t ts))
E int m_privmsg(char *source, char *receiver, char *msg)
E void pmodule_ircd_csmodes(char mode[128])
E void pmodule_cmd_242(void(*func)(char *buf))
static int has_banexceptionmod
void inspircd_cmd_401(char *source, char *who)
void inspircd_cmd_375(char *source)
#define EVENT_TOPIC_UPDATED
E void set_limit(Channel *chan, char *value)
E void finish_sync(Server *serv, int sync_links)
static int has_chgidentmod
void inspircd_cmd_quit(char *source, char *buf)
E void pmodule_cmd_311(void(*func)(char *buf))
E void pmodule_cmd_join(void(*func)(char *user, char *channel, time_t chantime))
int anope_event_opertype(char *source, int ac, char **av)
E char * get_unkwn(Channel *chan)
int anope_event_kick(char *source, int ac, char **av)
void inspircd_cmd_protoctl()
int inspircd_valid_chan(char *chan)
E void del_exception(Channel *chan, char *mask)
E void pmodule_cmd_318(void(*func)(char *source, char *who))
E void pmodule_cmd_250(void(*func)(char *buf))
void inspircd_cmd_242(char *buf)
void ts6_sid_increment(unsigned pos)
int anope_event_chgname(char *source, int ac, char **av)
E void pmodule_ircd_version(char *version)
int anope_event_chghost(char *source, int ac, char **av)
void inspircd_cmd_bot_chan_mode(char *nick, char *chan)
E const char version_number[]
E int validate_user(User *u)
int anope_event_whois(char *source, int ac, char **av)
int anope_event_rsquit(char *source, int ac, char **av)
E char * get_flood(Channel *chan)
static int has_servicesmod
int anope_event_topic(char *source, int ac, char **av)
void inspircd_cmd_akill(char *user, char *host, char *who, time_t when, time_t expires, char *reason)
void inspircd_cmd_243(char *buf)
E void pmodule_cmd_unszline(void(*func)(char *mask))
E int check_topiclock(Channel *c, time_t topic_time)
E void cs_set_key(ChannelInfo *ci, char *value)
E void anope_cmd_mode(char *source, char *dest, const char *fmt,...)
E void pmodule_cmd_401(void(*func)(char *source, char *who))
int anope_event_nick(char *source, int ac, char **av)
void inspircd_cmd_sqline(char *mask, char *reason)
E void pmodule_cmd_svso(void(*func)(char *source, char *nick, char *flag))
E void pmodule_cmd_serv_privmsg(void(*func)(char *source, char *dest, char *msg))
E void pmodule_cmd_317(void(*func)(char *buf))
E void do_cmode(const char *source, int ac, char **av)
E void pmodule_secret_cmode(int mode)
E void pmodule_cmd_391(void(*func)(char *source, char *timestr))
void inspircd_cmd_connect(int servernum)
int anope_event_fjoin(char *source, int ac, char **av)
E void pmodule_cmd_remove_akill(void(*func)(char *user, char *host))
void inspircd_cmd_sgline(char *mask, char *reason)
E void pmodule_ircd_cbmodes(CBMode modes[128])
char * ts6_sid_retrieve()
void inspircd_cmd_bot_nick(char *nick, char *user, char *host, char *real, char *modes)
int anope_event_eob(char *source, int ac, char **av)
E void pmodule_cmd_szline(void(*func)(char *mask, char *reason, char *whom))
E char * myStrGetToken(const char *str, const char dilim, int token_number)
int anope_event_server(char *source, int ac, char **av)
E void pmodule_cmd_notice_ops(void(*func)(char *source, char *dest, char *buf))
E void pmodule_cmd_release_svshold(void(*func)(char *nick))
E void add_exception(Channel *chan, char *mask)
int anope_event_metadata(char *source, int ac, char **av)
void inspircd_cmd_unsqline(char *user)
void inspircd_cmd_svshold(char *nick)
void inspircd_cmd_privmsg2(char *source, char *dest, char *msg)
#define CBM_NO_USER_MLOCK
E Server * findserver_uid(Server *s, const char *name)
void inspircd_cmd_svid_umode3(User *u, char *ts)
E void pmodule_cmd_unban(void(*func)(char *name, char *nick))
E void pmodule_cmd_notice(void(*func)(char *source, char *dest, char *buf))
void inspircd_cmd_vhost_on(char *nick, char *vIdent, char *vhost)
void inspircd_cmd_release_svshold(char *nick)
unsigned long umodes[128]
int anope_event_quit(char *source, int ac, char **av)
E void chan_set_throttle(Channel *chan, char *value)
E void pmodule_cmd_akill(void(*func)(char *user, char *host, char *who, time_t when, time_t expires, char *reason))
E char * cs_get_unkwn(ChannelInfo *ci)
E void capab_parse(int ac, char **av)
E int check_valid_op(User *user, Channel *chan, int servermode)
E char * cs_get_limit(ChannelInfo *ci)
void inspircd_cmd_chg_nick(char *oldnick, char *newnick)
E char * cs_get_throttle(ChannelInfo *ci)
void inspircd_cmd_remove_akill(char *user, char *host)
E void pmodule_cmd_guest_nick(void(*func)(char *nick, char *user, char *host, char *real, char *modes))
E void common_svsmode(User *u, char *modes, char *arg)
int anope_event_away(char *source, int ac, char **av)
E void * smalloc(long size)
static int has_allowinvite
void inspircd_cmd_318(char *source, char *who)
void inspircd_cmd_311(char *buf)
E int defconParseModeString(const char *str)
static int has_auditorium
void inspircd_cmd_invite(char *source, char *chan, char *nick)
E void pmodule_valid_chan(int(*func)(char *chan))
E void pmodule_cmd_privmsg(void(*func)(char *source, char *dest, char *buf))
E void pmodule_cmd_svshold(void(*func)(char *nick))
void inspircd_cmd_unszline(char *mask)
void inspircd_cmd_372(char *source, char *msg)
E void pmodule_cmd_serv_notice(void(*func)(char *source, char *dest, char *msg))
E void pmodule_jointhrottle_mode_check(int(*func)(char *value))
void inspircd_cmd_250(char *buf)
static int has_hidechansmod
E char * get_key(Channel *chan)
E int m_whois(char *source, char *who)
static int has_stripcolor
int anope_event_chgident(char *source, int ac, char **av)
E void pmodule_cmd_topic(void(*func)(char *whosets, char *chan, char *whosetit, char *topic, time_t when))
E void pmodule_cmd_quit(void(*func)(char *source, char *buf))
static int has_redirectmod
E void pmodule_ircd_useTSMode(int use)
E void pmodule_oper_umode(int mode)
E Server * new_server(Server *uplink, const char *name, const char *desc, uint16 flags, char *suid)
E void pmodule_flood_mode_check(int(*func)(char *value))
E void change_user_realname(User *user, const char *realname)
E void pmodule_ircd_cbmodeinfos(CBModeInfo *modeinfos)
static int has_permchannels
E void pmodule_cmd_sqline(void(*func)(char *mask, char *reason))
E void pmodule_cmd_privmsg2(void(*func)(char *source, char *dest, char *msg))
E User * 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)
int anope_event_ping(char *source, int ac, char **av)
E void pmodule_cmd_connect(void(*func)(int servernum))
E void pmodule_cmd_global_legacy(void(*func)(char *source, char *fmt))
E void pmodule_cmd_mode(void(*func)(char *source, char *dest, char *buf))
E char * common_get_vhost(User *u)
E void pmodule_limit_mode(int mode)
E void pmodule_cmd_svskill(void(*func)(char *source, char *user, char *buf))
E void pmodule_cmd_svsmode_chan(void(*func)(char *name, char *mode, char *nick))
E void pmodule_ircd_flood_mode_char_set(char *mode)
E void pmodule_cmd_312(void(*func)(char *buf))
E const char version_build[]
E void change_user_host(User *user, const char *host)
int anope_event_version(char *source, int ac, char **av)
E char * normalizeBuffer(char *)
void inspircd_cmd_global_legacy(char *source, char *fmt)
E char * common_get_vident(User *u)
int anope_event_ftopic(char *source, int ac, char **av)
E void anope_cmd_global(char *source, const char *fmt,...)
E void pmodule_cmd_global(void(*func)(char *source, char *buf))
CBModeInfo myCbmodeinfos[]
#define CUF_PROTECT_BOTSERV
void inspircd_cmd_global(char *source, char *buf)
void inspircd_cmd_kick(char *source, char *chan, char *user, char *buf)
E void nsStartNickTracking(User *u)
E void pmodule_cmd_219(void(*func)(char *source, char *letter))