diff options
author | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-03-01 19:00:34 +0000 |
---|---|---|
committer | rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-03-01 19:00:34 +0000 |
commit | 90bdc0f9af64dfab2348efb2a851a079a82810c9 (patch) | |
tree | f8c85a06dc401c2ae5a7ebd616121e482da546a9 | |
parent | cb7dc8881afc814edb90bd506f6d58b53115c7ec (diff) |
Updated inspircd protocol files from Brain, and it now compiles with make strict.
git-svn-id: svn://svn.anope.org/anope/trunk@994 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@719 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | src/core/ns_alist.c | 2 | ||||
-rw-r--r-- | src/protocol/inspircd.c | 39 |
3 files changed, 27 insertions, 17 deletions
@@ -48,6 +48,9 @@ Provided by Trystan <trystan@nomadirc.net> - 2006 Provided by ThaPrince <jon@vile.com> - 2006 02/28 F fantasy kick now honours protected, just like cs versions. [ #00] +Provided by Brain <brain@inspircd.org> - 2006 +03/01 F Updated inspircd protocol files. [#422] + Anope Version 1.7.13 -------------------- Provided by Anope Dev. <dev@anope.org> - 2005 diff --git a/src/core/ns_alist.c b/src/core/ns_alist.c index f7a913f8f..62ca99c18 100644 --- a/src/core/ns_alist.c +++ b/src/core/ns_alist.c @@ -156,7 +156,7 @@ int do_alist(User * u) match_count++; if ((ci->flags & CI_XOP) || (level == ACCESS_FOUNDER)) { - char *xop; + const char *xop; xop = get_xop_level(level); diff --git a/src/protocol/inspircd.c b/src/protocol/inspircd.c index a4f320a86..3d51f1513 100644 --- a/src/protocol/inspircd.c +++ b/src/protocol/inspircd.c @@ -451,6 +451,7 @@ void moduleAddIRCDMsgs(void) { m = createMessage("MOTD", anope_event_motd); addCoreMessage(IRCD,m); m = createMessage("NICK", anope_event_nick); addCoreMessage(IRCD,m); m = createMessage("NOTICE", anope_event_null); addCoreMessage(IRCD,m); + m = createMessage("CAPAB", anope_event_null); addCoreMessage(IRCD,m); m = createMessage("PART", anope_event_part); addCoreMessage(IRCD,m); m = createMessage("PING", anope_event_ping); addCoreMessage(IRCD,m); m = createMessage("PRIVMSG", anope_event_privmsg); addCoreMessage(IRCD,m); @@ -509,7 +510,7 @@ void inspircd_cmd_remove_akill(char *user, char *host) void inspircd_cmd_topic(char *whosets, char *chan, char *whosetit, char *topic, time_t when) { - send_cmd(ServerName, "FTOPIC %s %lu %s :%s", chan, (unsigned long int) when, whosetit, topic); + send_cmd(whosets, "FTOPIC %s %lu %s :%s", chan, (unsigned long int) when, whosetit, topic); } void inspircd_cmd_vhost_off(User * u) @@ -566,7 +567,7 @@ void inspircd_cmd_376(char *source) void inspircd_cmd_nick(char *nick, char *name, char *modes) { - // :test.chatspike.net NICK 1133519355 Brain synapse.brainbox.winbot.co.uk netadmin.chatspike.net ~brain +xwsioS 10.0.0.2 :Craig Edwards + /* :test.chatspike.net NICK 1133519355 Brain synapse.brainbox.winbot.co.uk netadmin.chatspike.net ~brain +xwsioS 10.0.0.2 :Craig Edwards */ send_cmd(ServerName, "NICK %ld %s %s %s %s +%s 0.0.0.0 :%s",(long int) time(NULL),nick,ServiceHost,ServiceHost,ServiceUser,modes,name); send_cmd(ServerName, "OPERTYPE Service"); } @@ -616,10 +617,15 @@ int anope_event_opertype(char* source, int ac, char**av) { /* opertype is equivalent to mode +o because servers dont do this directly */ - char* newav[2]; - newav[0] = source; - newav[1] = "+o"; - return anope_event_mode(source, 2, newav); + User* u; + u = finduser(source); + if (u && !is_oper(u)) { + char* newav[2]; + newav[0] = source; + newav[1] = "+o"; + return anope_event_mode(source, 2, newav); + } + else return MOD_CONT; } int anope_event_fmode(char *source, int ac, char **av) @@ -1043,7 +1049,8 @@ void inspircd_cmd_svsnick(char *source, char *guest, time_t when) if (!source || !guest) { return; } - send_cmd(s_OperServ, "SANICK %s %s", source, guest); + /* Please note that inspircd will now echo back a nickchange for this SVSNICK */ + send_cmd(ServerName, "SVSNICK %s %s :%lu", source, guest, (unsigned long)when); } /* Functions that use serval cmd functions */ @@ -1061,9 +1068,6 @@ void inspircd_cmd_vhost_on(char *nick, char *vIdent, char *vhost) void inspircd_cmd_connect(int servernum) { - me_server = - new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL); - if (servernum == 1) { inspircd_cmd_pass(RemotePassword); } @@ -1076,6 +1080,9 @@ void inspircd_cmd_connect(int servernum) inspircd_cmd_server(ServerName, 0, ServerDesc); send_cmd(NULL,"BURST"); send_cmd(ServerName, "VERSION :Anope-%s %s :%s - %s -- %s", version_number, ServerName, ircd->name, version_flags, version_build); + + me_server = + new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL); } /* Events */ @@ -1320,11 +1327,11 @@ int anope_event_nick(char *source, int ac, char **av) if (ac != 1) { if (ac == 8) { inet_aton(av[6],&addy); - user = do_nick("", av[1], // nick - av[4], // username - av[2], // realhost - source, // server - av[7], // realname + user = do_nick("", av[1], /* nick */ + av[4], /* username */ + av[2], /* realhost */ + source, /* server */ + av[7], /* realname */ strtoul(av[0], NULL, 10), 0, htonl(*ad), @@ -1621,7 +1628,7 @@ void moduleAddAnopeCmds() pmodule_cmd_connect(inspircd_cmd_connect); pmodule_cmd_svshold(inspircd_cmd_svshold); pmodule_cmd_release_svshold(inspircd_cmd_release_svshold); - pmodule_cmd_unsgline(inspircd_cmd_unsgline); + pmodule_cmd_unsgline(inspircd_cmd_unsqline); pmodule_cmd_unszline(inspircd_cmd_unszline); pmodule_cmd_szline(inspircd_cmd_szline); pmodule_cmd_sgline(inspircd_cmd_sgline); |