diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bahamut.c | 36 | ||||
-rw-r--r-- | src/channels.c | 5 | ||||
-rw-r--r-- | src/chanserv.c | 10 | ||||
-rw-r--r-- | src/config.c | 10 | ||||
-rw-r--r-- | src/dreamforge.c | 7 | ||||
-rw-r--r-- | src/hybrid.c | 79 | ||||
-rw-r--r-- | src/nickserv.c | 6 | ||||
-rw-r--r-- | src/ptlink.c | 7 | ||||
-rw-r--r-- | src/rageircd.c | 75 | ||||
-rw-r--r-- | src/servers.c | 79 | ||||
-rw-r--r-- | src/ultimate2.c | 43 | ||||
-rw-r--r-- | src/ultimate3.c | 60 | ||||
-rw-r--r-- | src/unreal31.c | 11 | ||||
-rw-r--r-- | src/unreal32.c | 44 | ||||
-rw-r--r-- | src/viagra.c | 7 |
15 files changed, 362 insertions, 117 deletions
diff --git a/src/bahamut.c b/src/bahamut.c index 16c41795e..49dce62dd 100644 --- a/src/bahamut.c +++ b/src/bahamut.c @@ -89,7 +89,8 @@ IRCDVar ircd[] = { 0, /* Mode */ 0, /* Mode */ 1, - + 1, /* No Knock requires +i */ + NULL, /* CAPAB Chan Modes */ } , {NULL} @@ -124,8 +125,8 @@ IRCDCAPAB ircdcap[] = { 0, /* VL */ 0, /* TLKEXT */ 0, /* DODKEY */ - CAPAB_DOZIP /* DOZIP */ - } + CAPAB_DOZIP, /* DOZIP */ + 0} }; @@ -404,7 +405,7 @@ void anope_cmd_mode(char *source, char *dest, const char *fmt, ...) char buf[BUFSIZE]; *buf = '\0'; - if (!fmt) { + if (fmt) { va_start(args, fmt); vsnprintf(buf, BUFSIZE - 1, fmt, args); va_end(args); @@ -567,7 +568,7 @@ void moduleAddIRCDMsgs(void) { 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", NULL); addCoreMessage(IRCD,m); + m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m); m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); m = createMessage("PASS", NULL); addCoreMessage(IRCD,m); m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m); @@ -605,6 +606,8 @@ void moduleAddIRCDMsgs(void) { m = createMessage("SZLINE", NULL); addCoreMessage(IRCD,m); m = createMessage("UNSGLINE", NULL); addCoreMessage(IRCD,m); m = createMessage("UNSZLINE", NULL); addCoreMessage(IRCD,m); + m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m); + } /* *INDENT-ON* */ @@ -662,7 +665,7 @@ void anope_cmd_part(char *nick, char *chan, const char *fmt, ...) char buf[BUFSIZE]; *buf = '\0'; - if (!fmt) { + if (fmt) { va_start(args, fmt); vsnprintf(buf, BUFSIZE - 1, fmt, args); va_end(args); @@ -1419,4 +1422,25 @@ void anope_cmd_chg_nick(char *oldnick, char *newnick) send_cmd(oldnick, "NICK %s", newnick); } +int anope_event_error(char *source, int ac, char **av) +{ + if (ac >= 1) { + if (debug) { + alog("ERROR: %s", av[0]); + } + } + return MOD_CONT; +} + +int anope_event_notice(char *source, int ac, char **av) +{ + return MOD_CONT; +} + +int anope_event_sqline(char *source, int ac, char **av) +{ + return MOD_CONT; +} + + #endif diff --git a/src/channels.c b/src/channels.c index 9e32629e3..ebee50403 100644 --- a/src/channels.c +++ b/src/channels.c @@ -143,8 +143,7 @@ int chan_has_user_status(Channel * chan, User * user, int16 status) for (uc = user->chans; uc; uc = uc->next) { if (uc->chan == chan) { if (debug) { - alog("chan_has_user_status wanted %d the user is %d", - status, uc->status); + alog("debug: chan_has_user_status wanted %d the user is %d", status, uc->status); } return (uc->status & status); } @@ -874,6 +873,8 @@ void chan_adduser2(User * user, Channel * c) chan_set_user_status(c, user, CUS_OWNER | CUS_OP); } else if (ircd->protect && check_should_protect(user, chan)) { chan_set_user_status(c, user, CUS_PROTECT | CUS_OP); + } else if (ircd->admin && check_should_protect(user, chan)) { + chan_set_user_status(c, user, CUS_PROTECT | CUS_OP); } else if (check_should_op(user, chan)) { chan_set_user_status(c, user, CUS_OP); } else if (ircd->halfop && check_should_halfop(user, chan)) { diff --git a/src/chanserv.c b/src/chanserv.c index b18c492fd..dddfdd2b1 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -2605,9 +2605,14 @@ static int do_register(User * u) uc->chan = ci; /* Implement new mode lock */ check_modes(c); + /* On most ircds you do not receive the admin/owner mode till its registered */ if (ircd->admin) { anope_cmd_mode(s_ChanServ, chan, "+a %s", u->nick); } + if (ircd->owner && ircd->ownerset) { + anope_cmd_mode(s_ChanServ, chan, "%s %s", ircd->ownerset, + u->nick); + } } return MOD_CONT; } @@ -3149,8 +3154,9 @@ static int do_set_mlock(User * u, ChannelInfo * ci, char *param) } } - /* We can't mlock +K if +i is not mlocked as well. */ - if (ircd->noknock) { + /* Some ircd we can't set NOKNOCK without INVITE */ + /* So check if we need there is a NOKNOCK MODE and that we need INVITEONLY */ + if (ircd->noknock && ircd->knock_needs_i) { if ((ci->mlock_on & ircd->noknock) && !(ci->mlock_on & CMODE_i)) { ci->mlock_on &= ~ircd->noknock; notice_lang(s_ChanServ, u, CHAN_SET_MLOCK_K_REQUIRED); diff --git a/src/config.c b/src/config.c index 9a9209db6..99fd6b677 100644 --- a/src/config.c +++ b/src/config.c @@ -398,7 +398,7 @@ Directive directives[] = { {"CSAutokickMax", {{PARAM_POSINT, PARAM_RELOAD, &CSAutokickMax}}}, {"CSAutokickReason", {{PARAM_STRING, PARAM_RELOAD, &CSAutokickReason}}}, - {"CSDefBantype", {{PARAM_POSINT, PARAM_RELOAD, &CSDefBantype}}}, + {"CSDefBantype", {{PARAM_INT, PARAM_RELOAD, &CSDefBantype}}}, {"CSDefNone", {{PARAM_SET, PARAM_RELOAD, &CSDefNone}}}, {"CSDefKeepTopic", {{PARAM_SET, PARAM_RELOAD, &CSDefKeepTopic}}}, {"CSDefOpNotice", {{PARAM_SET, PARAM_RELOAD, &CSDefOpNotice}}}, @@ -462,8 +462,8 @@ Directive directives[] = { {PARAM_STRING, 0, &desc_HelpServ}}}, {"HelpServAlias", {{PARAM_STRING, 0, &s_HelpServAlias}, {PARAM_STRING, 0, &desc_HelpServAlias}}}, - {"KeepBackups", {{PARAM_POSINT, PARAM_RELOAD, &KeepBackups}}}, - {"KeepLogs", {{PARAM_POSINT, PARAM_RELOAD, &KeepLogs}}}, + {"KeepBackups", {{PARAM_INT, PARAM_RELOAD, &KeepBackups}}}, + {"KeepLogs", {{PARAM_INT, PARAM_RELOAD, &KeepLogs}}}, {"KillClones", {{PARAM_SET, PARAM_FULLONLY, &KillClones}}}, {"AddAkiller", {{PARAM_SET, PARAM_RELOAD, &AddAkiller}}}, {"KillClonesAkillExpire", @@ -477,7 +477,7 @@ Directive directives[] = { {"SuperAdmin", {{PARAM_SET, PARAM_RELOAD, &SuperAdmin}}}, {"LogMaxUsers", {{PARAM_SET, PARAM_RELOAD, &LogMaxUsers}}}, {"MailDelay", {{PARAM_TIME, PARAM_RELOAD, &MailDelay}}}, - {"MaxSessionKill", {{PARAM_POSINT, PARAM_RELOAD, &MaxSessionKill}}}, + {"MaxSessionKill", {{PARAM_INT, PARAM_RELOAD, &MaxSessionKill}}}, {"MaxSessionLimit", {{PARAM_POSINT, PARAM_RELOAD, &MaxSessionLimit}}}, {"MemoServName", {{PARAM_STRING, 0, &s_MemoServ}, {PARAM_STRING, 0, &desc_MemoServ}}}, @@ -536,7 +536,7 @@ Directive directives[] = { {{PARAM_STRING, PARAM_RELOAD, &NSGuestNickPrefix}}}, {"NSListMax", {{PARAM_POSINT, PARAM_RELOAD, &NSListMax}}}, {"NSListOpersOnly", {{PARAM_SET, PARAM_RELOAD, &NSListOpersOnly}}}, - {"NSMaxAliases", {{PARAM_POSINT, PARAM_RELOAD, &NSMaxAliases}}}, + {"NSMaxAliases", {{PARAM_INT, PARAM_RELOAD, &NSMaxAliases}}}, {"NSNoGroupChange", {{PARAM_SET, PARAM_RELOAD, &NSNoGroupChange}}}, {"NSRegDelay", {{PARAM_TIME, PARAM_RELOAD, &NSRegDelay}}}, {"NSReleaseTimeout", {{PARAM_TIME, PARAM_RELOAD, &NSReleaseTimeout}}}, diff --git a/src/dreamforge.c b/src/dreamforge.c index 365ddf466..fd82391ce 100644 --- a/src/dreamforge.c +++ b/src/dreamforge.c @@ -87,7 +87,8 @@ IRCDVar ircd[] = { 0, /* Mode */ 0, /* Mode */ 0, - + 1, /* No Knock requires +i */ + NULL, /* CAPAB Chan Modes */ } , {NULL} @@ -122,8 +123,8 @@ IRCDCAPAB ircdcap[] = { 0, /* VL */ 0, /* TLKEXT */ 0, /* DODKEY */ - 0 /* DOZIP */ - } + 0, /* DOZIP */ + 0} }; void anope_set_umode(User * user, int ac, char **av) diff --git a/src/hybrid.c b/src/hybrid.c index 53900431c..3f974898d 100644 --- a/src/hybrid.c +++ b/src/hybrid.c @@ -40,7 +40,7 @@ IRCDVar ircd[] = { "+io", /* Global alias mode */ "+", /* Used by BotServ Bots */ 3, /* Chan Max Symbols */ - "-iklmnpstR", /* Modes to Remove */ + "aiklmnpst", /* Modes to Remove */ "+o", /* Channel Umode used by Botserv bots */ 0, /* SVSNICK */ 0, /* Vhost */ @@ -77,16 +77,18 @@ IRCDVar ircd[] = { 0, /* O:LINE */ 0, /* VHOST ON NICK */ 0, /* Change RealName */ - 0, /* ChanServ extra */ - 0, /* No Knock */ - 0, /* Admin Only */ - DEFAULT_MLOCK, /* Default MLOCK */ - 0, /* Vhost Mode */ - 0, /* +f */ - 0, /* +L */ - 0, - 0, - 0, + 0, /* ChanServ extra */ + 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 */ } , {NULL} @@ -121,8 +123,8 @@ IRCDCAPAB ircdcap[] = { 0, /* VL */ 0, /* TLKEXT */ 0, /* DODKEY */ - 0 /* DOZIP */ - } + 0, /* DOZIP */ + 0} }; @@ -545,7 +547,7 @@ void moduleAddIRCDMsgs(void) { m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m); m = createMessage("NOTICE", NULL); addCoreMessage(IRCD,m); m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); - m = createMessage("PASS", NULL); 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); @@ -572,7 +574,7 @@ void moduleAddIRCDMsgs(void) { m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m); m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m); - m = createMessage("SVINFO", NULL); addCoreMessage(IRCD,m); + m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m); } @@ -639,6 +641,15 @@ void anope_cmd_join(char *user, char *channel, time_t chantime) send_cmd(NULL, "SJOIN %ld %s + :%s", time(NULL), channel, user); } +/* +oper: the nick of the oper performing the kline +target.server: the server(s) this kline is destined for +duration: the duration if a tkline, 0 if permanent. +user: the 'user' portion of the kline +host: the 'host' portion of the kline +reason: the reason for the kline. +*/ + void anope_cmd_akill(char *user, char *host, char *who, time_t when, time_t expires, char *reason) { @@ -685,13 +696,25 @@ void anope_cmd_connect(int servernum) anope_cmd_capab(); anope_cmd_server(ServerName, 1, ServerDesc); - anope_cmd_svsinfo(); + anope_cmd_svinfo(); } -/* SVSINFO */ void anope_cmd_svsinfo() { - send_cmd(NULL, "SVSINFO 5 5 0 :%ld", time(NULL)); + /* not used */ +} + +/* + * 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 + */ +void anope_cmd_svinfo() +{ + send_cmd(NULL, "SVINFO 5 5 0 :%ld", time(NULL)); } /* CAPAB */ @@ -1274,4 +1297,24 @@ void anope_cmd_chg_nick(char *oldnick, char *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 + */ +int anope_event_svinfo(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + +int anope_event_pass(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + #endif diff --git a/src/nickserv.c b/src/nickserv.c index 924c90bca..e9fff9fce 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -1326,10 +1326,12 @@ static int is_on_access(User * u, NickCore * nc) for (i = 0; i < nc->accesscount; i++) { if (match_wild_nocase(nc->access[i], buf) - || (u->vhost ? match_wild_nocase(nc->access[i], buf2) : 0)) { + || (ircd->vhost ? match_wild_nocase(nc->access[i], buf2) : 0)) { free(buf); if (ircd->vhost) { - free(buf2); + if (u->vhost) { + free(buf2); + } } return 1; } diff --git a/src/ptlink.c b/src/ptlink.c index d33a44792..674c3aa2e 100644 --- a/src/ptlink.c +++ b/src/ptlink.c @@ -87,7 +87,8 @@ IRCDVar ircd[] = { CMODE_f, 0, 1, - + 1, /* No Knock requires +i */ + NULL, /* CAPAB Chan Modes */ } , {NULL} @@ -122,8 +123,8 @@ IRCDCAPAB ircdcap[] = { 0, /* VL */ 0, /* TLKEXT */ 0, /* DODKEY */ - 0 /* DOZIP */ - } + 0, /* DOZIP */ + 0} }; diff --git a/src/rageircd.c b/src/rageircd.c index f398f2894..bc8f3ae3c 100644 --- a/src/rageircd.c +++ b/src/rageircd.c @@ -87,7 +87,8 @@ IRCDVar ircd[] = { 0, 0, 1, - + 0, /* No Knock requires +i */ + NULL, /* CAPAB Chan Modes */ }, {NULL} }; @@ -121,8 +122,8 @@ IRCDCAPAB ircdcap[] = { 0, /* VL */ 0, /* TLKEXT */ 0, /* DODKEY */ - 0 /* DOZIP */ - } + 0, /* DOZIP */ + 0} }; @@ -441,9 +442,9 @@ void moduleAddIRCDMsgs(void) { 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", NULL); addCoreMessage(IRCD,m); + m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m); m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); - m = createMessage("PASS", NULL); 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); @@ -453,11 +454,8 @@ void moduleAddIRCDMsgs(void) { m = createMessage("USER", NULL); addCoreMessage(IRCD,m); m = createMessage("WALLOPS", NULL); addCoreMessage(IRCD,m); m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m); - - /* DALnet specific messages */ m = createMessage("AKILL", NULL); addCoreMessage(IRCD,m); m = createMessage("GLOBOPS", NULL); addCoreMessage(IRCD,m); - m = createMessage("GNOTICE", NULL); addCoreMessage(IRCD,m); m = createMessage("GOPER", NULL); addCoreMessage(IRCD,m); m = createMessage("RAKILL", NULL); addCoreMessage(IRCD,m); m = createMessage("SILENCE", NULL); addCoreMessage(IRCD,m); @@ -465,9 +463,8 @@ void moduleAddIRCDMsgs(void) { m = createMessage("SVSMODE", NULL); addCoreMessage(IRCD,m); m = createMessage("SVSNICK", NULL); addCoreMessage(IRCD,m); m = createMessage("SVSNOOP", NULL); addCoreMessage(IRCD,m); - m = createMessage("SQLINE", NULL); addCoreMessage(IRCD,m); + m = createMessage("SQLINE", anope_event_sqline); addCoreMessage(IRCD,m); m = createMessage("UNSQLINE", 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); @@ -478,12 +475,14 @@ void moduleAddIRCDMsgs(void) { m = createMessage("SGLINE", NULL); addCoreMessage(IRCD,m); m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m); m = createMessage("SS", NULL); addCoreMessage(IRCD,m); - m = createMessage("SVINFO", NULL); addCoreMessage(IRCD,m); + m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m); m = createMessage("SZLINE", NULL); addCoreMessage(IRCD,m); m = createMessage("UNSGLINE", NULL); addCoreMessage(IRCD,m); m = createMessage("UNSZLINE", NULL); addCoreMessage(IRCD,m); - m = createMessage("SNICK", anope_event_snick); addCoreMessage(IRCD,m); - m = createMessage("VHOST", anope_event_vhost); 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); } /* *INDENT-ON* */ @@ -1392,5 +1391,55 @@ void anope_cmd_chg_nick(char *oldnick, char *newnick) send_cmd(oldnick, "NICK %s", newnick); } +int anope_event_myid(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + +int anope_event_pass(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + +/* + * SVINFO + * parv[0] = sender prefix + * + * if (parc == 2) + * parv[1] = ZIP (compression initialisation) + * + * if (parc > 2) + * parv[1] = TS_CURRENT + * parv[2] = TS_MIN + * parv[3] = standalone or connected to non-TS (unused) + * parv[4] = UTC time + * parv[5] = ircd codename + * parv[6] = masking keys + */ +int anope_event_svinfo(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + +int anope_event_gnotice(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + +int anope_event_notice(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + +int anope_event_sqline(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} #endif diff --git a/src/servers.c b/src/servers.c index 8a672f248..d69ac9afd 100644 --- a/src/servers.c +++ b/src/servers.c @@ -204,8 +204,13 @@ void do_server(const char *source, int ac, char **av) { Server *s; - if (debug) - alog("debug: Server introduced (%s) from %s", av[0], source); + if (debug) { + if (!*source) { + alog("debug: Server introduced (%s)", av[0]); + } else { + alog("debug: Server introduced (%s) from %s", av[0], source); + } + } if (source[0] == '\0') s = me_server; @@ -263,77 +268,103 @@ void do_squit(const char *source, int ac, char **av) void capab_parse(int ac, char **av) { int i; + char *s, *tmp; + + char *temp; for (i = 0; i < ac; i++) { - if (!stricmp(av[i], "NOQUIT")) { + temp = av[i]; + + s = myStrGetToken(temp, '=', 0); + tmp = myStrGetTokenRemainder(temp, '=', 1); + + if (!s) { + continue; + } + + if (!stricmp(s, "NOQUIT")) { uplink_capab |= CAPAB_NOQUIT; } - if (!stricmp(av[i], "TSMODE")) { + if (!stricmp(s, "TSMODE")) { uplink_capab |= CAPAB_TSMODE; } if (!stricmp(av[i], "UNCONNECT")) { uplink_capab |= CAPAB_UNCONNECT; } - if (!stricmp(av[i], "NICKIP")) { + if (!stricmp(s, "NICKIP")) { uplink_capab |= CAPAB_NICKIP; } - if (!stricmp(av[i], "SSJOIN")) { + if (!stricmp(s, "SSJOIN")) { uplink_capab |= CAPAB_NSJOIN; } - if (!stricmp(av[i], "ZIP")) { + if (!stricmp(s, "ZIP")) { uplink_capab |= CAPAB_ZIP; } - if (!stricmp(av[i], "BURST")) { + if (!stricmp(s, "BURST")) { uplink_capab |= CAPAB_BURST; } - if (!stricmp(av[i], "TS5")) { + if (!stricmp(s, "TS5")) { uplink_capab |= CAPAB_TS5; } - if (!stricmp(av[i], "TS3")) { + if (!stricmp(s, "TS3")) { uplink_capab |= CAPAB_TS3; } - if (!stricmp(av[i], "DKEY")) { + if (!stricmp(s, "DKEY")) { uplink_capab |= CAPAB_DKEY; } - if (!stricmp(av[i], "PT4")) { + if (!stricmp(s, "PT4")) { uplink_capab |= CAPAB_PT4; } - if (!stricmp(av[i], "SCS")) { + if (!stricmp(s, "SCS")) { uplink_capab |= CAPAB_SCS; } - if (!stricmp(av[i], "QS")) { + if (!stricmp(s, "QS")) { uplink_capab |= CAPAB_QS; } - if (!stricmp(av[i], "UID")) { + if (!stricmp(s, "UID")) { uplink_capab |= CAPAB_UID; } - if (!stricmp(av[i], "KNOCK")) { + if (!stricmp(s, "KNOCK")) { uplink_capab |= CAPAB_KNOCK; } - if (!stricmp(av[i], "CLIENT")) { + if (!stricmp(s, "CLIENT")) { uplink_capab |= CAPAB_CLIENT; } - if (!stricmp(av[i], "IPV6")) { + if (!stricmp(s, "IPV6")) { uplink_capab |= CAPAB_IPV6; } - if (!stricmp(av[i], "SSJ5")) { + if (!stricmp(s, "SSJ5")) { uplink_capab |= CAPAB_SSJ5; } - if (!stricmp(av[i], "SN2")) { + if (!stricmp(s, "SN2")) { uplink_capab |= CAPAB_SN2; } - if (!stricmp(av[i], "TOK1")) { + if (!stricmp(s, "TOK1")) { uplink_capab |= CAPAB_TOKEN; } - if (!stricmp(av[i], "TOKEN")) { + if (!stricmp(s, "TOKEN")) { uplink_capab |= CAPAB_TOKEN; } - if (!stricmp(av[i], "VHOST")) { + if (!stricmp(s, "VHOST")) { uplink_capab |= CAPAB_VHOST; } - if (!stricmp(av[i], "SSJ3")) { + if (!stricmp(s, "SSJ3")) { uplink_capab |= CAPAB_SSJ3; } + + if (!stricmp(s, "CHANMODES")) { + uplink_capab |= CAPAB_CHANMODE; + if (tmp) { + ircd->chanmodes = tmp; + } + } + if (s) { + free(s); + } + if (tmp) { + free(tmp); + } + } } diff --git a/src/ultimate2.c b/src/ultimate2.c index 4273b7123..b6856925c 100644 --- a/src/ultimate2.c +++ b/src/ultimate2.c @@ -87,7 +87,8 @@ IRCDVar ircd[] = { CMODE_f, CMODE_L, 0, - + 1, /* No Knock requires +i */ + NULL, /* CAPAB Chan Modes */ } , {NULL} @@ -110,7 +111,7 @@ IRCDCAPAB ircdcap[] = { 0, /* SCS */ 0, /* QS */ 0, /* UID */ - 0, /* KNOCK */ + CAPAB_KNOCK, /* KNOCK */ 0, /* CLIENT */ 0, /* IPV6 */ 0, /* SSJ5 */ @@ -123,7 +124,8 @@ IRCDCAPAB ircdcap[] = { 0, /* VL */ 0, /* TLKEXT */ 0, /* DODKEY */ - 0 /* DOZIP */ + 0, /* DOZIP */ + CAPAB_CHANMODE /* CHANMODE */ } }; @@ -569,9 +571,9 @@ void moduleAddIRCDMsgs(void) { 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", NULL); addCoreMessage(IRCD,m); + m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m); m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); - m = createMessage("PASS", NULL); 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); @@ -581,8 +583,6 @@ void moduleAddIRCDMsgs(void) { m = createMessage("USER", NULL); addCoreMessage(IRCD,m); m = createMessage("WALLOPS", NULL); addCoreMessage(IRCD,m); m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m); - - /* DALnet specific messages */ m = createMessage("AKILL", NULL); addCoreMessage(IRCD,m); m = createMessage("GLOBOPS", NULL); addCoreMessage(IRCD,m); m = createMessage("GNOTICE", NULL); addCoreMessage(IRCD,m); @@ -595,16 +595,16 @@ void moduleAddIRCDMsgs(void) { m = createMessage("SVSNOOP", NULL); addCoreMessage(IRCD,m); m = createMessage("SQLINE", NULL); addCoreMessage(IRCD,m); m = createMessage("UNSQLINE", NULL); addCoreMessage(IRCD,m); - m = createMessage("PROTOCTL", anope_event_capab); 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("NETINFO", NULL); addCoreMessage(IRCD,m); + m = createMessage("NETINFO", anope_event_netinfo); addCoreMessage(IRCD,m); + m = createMessage("SNETINFO", anope_event_snetinfo); 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("VCTRL", NULL); addCoreMessage(IRCD,m); + m = createMessage("VCTRL", anope_event_vctrl); addCoreMessage(IRCD,m); } /* *INDENT-ON* */ @@ -1427,6 +1427,29 @@ void anope_cmd_svid_umode3(User * u, char *ts) // not used } +int anope_event_notice(char *source, int ac, char **av) +{ + return MOD_CONT; +} +int anope_event_pass(char *source, int ac, char **av) +{ + return MOD_CONT; +} + +int anope_event_vctrl(char *source, int ac, char **av) +{ + return MOD_CONT; +} + +int anope_event_netinfo(char *source, int ac, char **av) +{ + return MOD_CONT; +} + +int anope_event_snetinfo(char *source, int ac, char **av) +{ + return MOD_CONT; +} #endif diff --git a/src/ultimate3.c b/src/ultimate3.c index 8cce51154..95de6121c 100644 --- a/src/ultimate3.c +++ b/src/ultimate3.c @@ -84,9 +84,13 @@ IRCDVar ircd[] = { UMODE_x, /* Vhost Mode */ 0, /* +f */ 0, /* +L */ - 0, - 0, - 1, + 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 */ + 1, /* No Knock requires +i */ + NULL, /* CAPAB Chan Modes */ }, {NULL} }; @@ -120,8 +124,8 @@ IRCDCAPAB ircdcap[] = { 0, /* VL */ 0, /* TLKEXT */ CAPAB_DODKEY, /* DODKEY */ - CAPAB_DOZIP /* DOZIP */ - } + CAPAB_DOZIP, /* DOZIP */ + 0} }; void anope_set_umode(User * user, int ac, char **av) @@ -538,9 +542,9 @@ void moduleAddIRCDMsgs(void) { 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", NULL); addCoreMessage(IRCD,m); + m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m); m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); - m = createMessage("PASS", NULL); 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); @@ -552,7 +556,7 @@ void moduleAddIRCDMsgs(void) { m = createMessage("WHOIS", anope_event_whois); addCoreMessage(IRCD,m); m = createMessage("AKILL", NULL); addCoreMessage(IRCD,m); m = createMessage("GLOBOPS", NULL); addCoreMessage(IRCD,m); - m = createMessage("GNOTICE", NULL); addCoreMessage(IRCD,m); + m = createMessage("GNOTICE", anope_event_gnotice); addCoreMessage(IRCD,m); m = createMessage("GOPER", NULL); addCoreMessage(IRCD,m); m = createMessage("RAKILL", NULL); addCoreMessage(IRCD,m); m = createMessage("SILENCE", NULL); addCoreMessage(IRCD,m); @@ -560,7 +564,7 @@ void moduleAddIRCDMsgs(void) { m = createMessage("SVSMODE", NULL); addCoreMessage(IRCD,m); m = createMessage("SVSNICK", NULL); addCoreMessage(IRCD,m); m = createMessage("SVSNOOP", NULL); addCoreMessage(IRCD,m); - m = createMessage("SQLINE", NULL); addCoreMessage(IRCD,m); + m = createMessage("SQLINE", anope_event_sqline); addCoreMessage(IRCD,m); m = createMessage("UNSQLINE", NULL); addCoreMessage(IRCD,m); m = createMessage("CAPAB", anope_event_capab); addCoreMessage(IRCD,m); m = createMessage("CS", anope_event_cs); addCoreMessage(IRCD,m); @@ -572,7 +576,7 @@ void moduleAddIRCDMsgs(void) { m = createMessage("SGLINE", NULL); addCoreMessage(IRCD,m); m = createMessage("SJOIN", anope_event_sjoin); addCoreMessage(IRCD,m); m = createMessage("SS", NULL); addCoreMessage(IRCD,m); - m = createMessage("SVINFO", NULL); addCoreMessage(IRCD,m); + m = createMessage("SVINFO", anope_event_svinfo); addCoreMessage(IRCD,m); m = createMessage("SZLINE", NULL); addCoreMessage(IRCD,m); m = createMessage("UNSGLINE", NULL); addCoreMessage(IRCD,m); m = createMessage("UNSZLINE", NULL); addCoreMessage(IRCD,m); @@ -581,7 +585,7 @@ void moduleAddIRCDMsgs(void) { m = createMessage("GCONNECT", NULL); addCoreMessage(IRCD,m); m = createMessage("NETGLOBAL", NULL); addCoreMessage(IRCD,m); m = createMessage("CHATOPS", NULL); addCoreMessage(IRCD,m); - m = createMessage("NETCTRL", 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", NULL); addCoreMessage(IRCD,m); } @@ -1539,6 +1543,40 @@ void anope_cmd_svid_umode3(User * u, char *ts) } +int anope_event_svinfo(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + +int anope_event_pass(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + +int anope_event_gnotice(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} +int anope_event_netctrl(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + +int anope_event_notice(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} + +int anope_event_sqline(char *source, int ac, char **av) +{ + /* currently not used but removes the message : unknown message from server */ + return MOD_CONT; +} #endif diff --git a/src/unreal31.c b/src/unreal31.c index dc745f210..0ead65d5a 100644 --- a/src/unreal31.c +++ b/src/unreal31.c @@ -63,7 +63,7 @@ IRCDVar ircd[] = { 1, /* TS Topic Forward */ 0, /* TS Topci Backward */ 0, /* Protected Umode */ - 1, /* Has Admin */ + 0, /* Has Admin */ 0, /* Chan SQlines */ 0, /* Quit on Kill */ 0, /* SVSMODE unban */ @@ -89,7 +89,8 @@ IRCDVar ircd[] = { CMODE_f, CMODE_L, 0, - + 1, /* No Knock requires +i */ + NULL, /* CAPAB Chan Modes */ }, {NULL} }; @@ -124,8 +125,8 @@ IRCDCAPAB ircdcap[] = { CAPAB_VL, /* VL */ CAPAB_TLKEXT, /* TLKEXT */ 0, /* DODKEY */ - 0 /* DOZIP */ - } + 0, /* DOZIP */ + 0} }; unsigned long umodes[128] = { @@ -512,7 +513,7 @@ void anope_cmd_svskill(char *source, char *user, const char *fmt, ...) vsnprintf(buf, sizeof(buf), fmt, args); va_end(args); - send_cmd(source, "KILL %s :%s", user, buf); + send_cmd(source, "SVSKILL %s :%s", user, buf); } void anope_cmd_svsmode(User * u, int ac, char **av) diff --git a/src/unreal32.c b/src/unreal32.c index b0d3a006c..3c83fe854 100644 --- a/src/unreal32.c +++ b/src/unreal32.c @@ -63,7 +63,7 @@ IRCDVar ircd[] = { 1, /* TS Topic Forward */ 0, /* TS Topci Backward */ 0, /* Protected Umode */ - 1, /* Has Admin */ + 0, /* Has Admin */ 0, /* Chan SQlines */ 0, /* Quit on Kill */ 0, /* SVSMODE unban */ @@ -86,10 +86,11 @@ IRCDVar ircd[] = { UMODE_x, /* Vhost Mode */ 1, /* +f */ 1, /* +L */ - CMODE_f, - CMODE_L, - 0, - + 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 */ }, {NULL} }; @@ -123,7 +124,8 @@ IRCDCAPAB ircdcap[] = { CAPAB_VL, /* VL */ CAPAB_TLKEXT, /* TLKEXT */ 0, /* DODKEY */ - 0 /* DOZIP */ + 0, /* DOZIP */ + CAPAB_CHANMODE, /* CHANMODE */ } }; @@ -229,7 +231,7 @@ CBMode cbmodes[128] = { {CMODE_Q, 0, NULL, NULL}, {CMODE_R, 0, NULL, NULL}, /* R */ {CMODE_S, 0, NULL, NULL}, - {0}, /* T */ + {CMODE_T, 0, NULL, NULL}, /* T */ {0}, /* U */ {CMODE_V, 0, NULL, NULL}, {0}, /* W */ @@ -291,6 +293,7 @@ CBModeInfo cbmodeinfos[] = { {'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} }; @@ -415,9 +418,8 @@ void moduleAddIRCDMsgs(void) { 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", NULL); addCoreMessage(IRCD,m); + m = createMessage("NOTICE", anope_event_notice); addCoreMessage(IRCD,m); m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); - m = createMessage("PASS", NULL); 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); @@ -450,6 +452,8 @@ void moduleAddIRCDMsgs(void) { m = createMessage("TKL", anope_event_tkl); addCoreMessage(IRCD,m); m = createMessage("EOS", anope_event_eos); addCoreMessage(IRCD,m); m = createMessage("PASS", anope_event_pass); addCoreMessage(IRCD,m); + m = createMessage("ERROR", anope_event_error); addCoreMessage(IRCD,m); + m = createMessage("SMO", anope_event_smo); addCoreMessage(IRCD,m); } /* *INDENT-ON* */ @@ -509,7 +513,7 @@ void anope_cmd_svskill(char *source, char *user, const char *fmt, ...) return; } - send_cmd(source, "KILL %s :%s", user, buf); + send_cmd(source, "SVSKILL %s :%s", user, buf); } void anope_cmd_svsmode(User * u, int ac, char **av) @@ -1544,4 +1548,24 @@ void anope_cmd_svid_umode3(User * u, char *ts) // not used } +int anope_event_error(char *source, int ac, char **av) +{ + if (av[0]) { + if (debug) { + alog("ERROR: %s", av[0]); + } + } + return MOD_CONT; +} + +int anope_event_notice(char *source, int ac, char **av) +{ + return MOD_CONT; +} + +int anope_event_smo(char *source, int ac, char **av) +{ + return MOD_CONT; +} + #endif diff --git a/src/viagra.c b/src/viagra.c index ee34e6401..b96751f39 100644 --- a/src/viagra.c +++ b/src/viagra.c @@ -87,7 +87,8 @@ IRCDVar ircd[] = { 0, 0, 1, - + 1, /* No Knock requires +i */ + NULL, /* CAPAB Chan Modes */ } , {NULL} @@ -123,8 +124,8 @@ IRCDCAPAB ircdcap[] = { 0, /* VL */ 0, /* TLKEXT */ CAPAB_DODKEY, /* DODKEY */ - CAPAB_DOZIP /* DOZIP */ - } + CAPAB_DOZIP, /* DOZIP */ + 0} }; |