1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 15:53:13 +02:00

Applied Trystans patch, fixed other issues he pointed out.

Note: make strict will still show a couple of warnings, i think we should leave it as is.



git-svn-id: svn://svn.anope.org/anope/trunk@885 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@632 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b
2005-09-13 16:59:11 +00:00
parent 2a5d384b07
commit 56d21793fc
7 changed files with 249 additions and 1287 deletions
+4
View File
@@ -8,6 +8,8 @@ Provided by Anope Dev. <dev@anope.org> - 2005
07/01 A Events for channel access/xop updates. [ #00]
06/26 A New module pack module: hs_request. [ #00]
06/03 A Protocol files can now fill mod_current_buffer with custom code. [#389]
13/09 F make strict/profile now work for core and protocol files. [ #00]
13/09 F Unused variables removed from modules.c. [ #00]
09/11 F Disallow botnicks longer than the net's max nick length. [ #00]
09/09 F Giving some more error output when opening a database fails. [ #00]
09/04 F Protocol module for plexus called wrong UNSGLINE function. [ #00]
@@ -45,6 +47,8 @@ Provided by Ricardo <ricardoltdb@gmail.com> - 2005
05/30 F Updated Portuguese language file. And bundled modules language. [ #00]
Provided by Trystan <trystan@nomadirc.net> - 2005
09/13 F Reduntant IRCD defines removed. [ #00]
09/13 F Double Makedile generation. [ #00]
09/06 F Memory for vHosts/vIdents was not (always) being freed. [ #00]
06/04 F Removed ircd-file related code from configure(.in) [#384]
+18 -2
View File
@@ -22,8 +22,8 @@ SHARED=@SHARED@
MODULEFLAGS=@MODULEFLAGS@
all: language headers build core protocols tools modules
strict: language headers strict_build core protocols tools strict_modules
profile: language headers profile_build core protocols tools profile_modules
strict: language headers strict_build strict_core strict_protocols tools strict_modules
profile: language headers profile_build profile_core profile_protocols tools profile_modules
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
'LDFLAGS=${LDFLAGS}' 'BINDEST=${BINDEST}' 'INSTALL=${INSTALL}' \
@@ -64,10 +64,26 @@ protocols: build
@echo "*** Building protocol support";
(cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} all; )
strict_protocols: build
@echo "*** Building protocol support";
(cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(STRICT)' all; )
profile_protocols: build
@echo "*** Building protocol support";
(cd src/protocol ; ./configure ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all; )
core: build
@echo "*** Building Core modules";
(cd src/ ; ${MAKE} ${MAKEARGS} core; )
strict_core: build
@echo "*** Building Core modules";
(cd src/ ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} $(STRICT)' core; )
profile_core: build
@echo "*** Building Core modules";
(cd src/ ; ${MAKE} ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' core; )
tools: build
(cd src/tools ; ${MAKE} ${MAKEARGS} all; )
@echo "*** All done, now (g)make install to install Anope/Modules/Tools";
Vendored
+157 -1174
View File
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -220,8 +220,12 @@ AC_ARG_WITH(encryption, [ --with-encryption Use md5 database encryption], [
AC_DEFINE_UNQUOTED(ENCRYPT_MD5,,"Use md5")
])
AC_OUTPUT(Makefile)
AC_OUTPUT(src/bin/anoperc)
AC_CONFIG_FILES( \
Makefile \
src/bin/anoperc \
)
AC_OUTPUT
cat <<EOT
+1 -43
View File
@@ -90,48 +90,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* "First IRCD type" */
#undef IRC_DREAMFORGE
/* "First IRCD type" */
#undef IRC_BAHAMUT
/* "First IRCD type" */
#undef IRC_HYBRID
/* "First IRCD type" */
#undef IRC_PLEXUS
/* "First IRCD type" */
#undef IRC_PTLINK
/* "First IRCD type" */
#undef IRC_RAGE2
/* "First IRCD type" */
#undef IRC_SOLID
/* "First IRCD type" */
#undef IRC_ULTIMATE2
/* "First IRCD type" */
#undef IRC_ULTIMATE3
/* "First IRCD type" */
#undef IRC_UNREAL31
/* "First IRCD type" */
#undef IRC_UNREAL32
/* "First IRCD type" */
#undef IRC_VIAGRA
/* "First IRCD type" */
#undef IRC_RATBOX
/* "First IRCD type" */
#undef IRC_SHADOWIRCD
/* "Module dir" */
#undef MODULE_PATH
@@ -219,7 +177,7 @@
#include <stdio.h>
/* We KNOW these are not ansi, we are defining them here to suppress the warning
s messages on a "make strict" compile */
* s messages on a "make strict" compile */
int snprintf(char *str, size_t size, const char *format, ...);
int vprintf(const char *format, va_list ap);
int vfprintf(FILE *stream, const char *format, va_list ap);
+1 -5
View File
@@ -518,7 +518,7 @@ int loadModule(Module * m, User * u)
strncat(buf, "XXXXXX", 4095 - len);
buf[4095] = '\0';
/* Don't skip return value checking! -GD */
if (ret = moduleCopyFile(m->name, buf) != MOD_ERR_OK)
if ((ret = moduleCopyFile(m->name, buf)) != MOD_ERR_OK)
return ret;
m->filename = sstrdup(buf);
@@ -2535,11 +2535,7 @@ void moduleNoticeLang(char *source, User * u, int number, ...)
**/
char *moduleGetLangString(User * u, int number)
{
va_list va;
char buffer[4096], outbuf[4096];
char *fmt = NULL;
int lang = NSDefLanguage;
char *s, *t, *buf;
if ((mod_current_module_name) && (!mod_current_module || strcmp(mod_current_module_name, mod_current_module->name)))
mod_current_module = findModule(mod_current_module_name);
+62 -61
View File
@@ -441,40 +441,40 @@ int anope_event_servermode(char *source, int ac, char **av);
void moduleAddIRCDMsgs(void) {
Message *m;
// user has no choice but to use tokens with InspIRCd :)
/* user has no choice but to use tokens with InspIRCd :) */
UseTokens = 1;
updateProtectDetails("PROTECT","PROTECTME","!protect","!deprotect","AUTOPROTECT","+a","-a");
m = createMessage("$", anope_event_null); addCoreMessage(IRCD,m); // send routing table
m = createMessage("X", anope_event_null); addCoreMessage(IRCD,m); // begin netburst NOW
m = createMessage("Y", anope_event_eob); addCoreMessage(IRCD,m); // end of UPLINK netburst
m = createMessage("H", anope_event_null); addCoreMessage(IRCD,m); // local sync start
m = createMessage("F", anope_event_null); addCoreMessage(IRCD,m); // local sync end
m = createMessage("f", anope_event_null); addCoreMessage(IRCD,m); // local U-lined sync end
m = createMessage("*", anope_event_null); addCoreMessage(IRCD,m); // no operation
m = createMessage("|", anope_event_null); addCoreMessage(IRCD,m); // oper type
m = createMessage("-", anope_event_null); addCoreMessage(IRCD,m); // start mesh operation
m = createMessage("s", anope_event_server); addCoreMessage(IRCD,m); // passive server response
m = createMessage("U", anope_event_null); addCoreMessage(IRCD,m); // active service connect
m = createMessage("J", anope_event_join); addCoreMessage(IRCD,m); // join
m = createMessage("k", anope_event_kick); addCoreMessage(IRCD,m); // kick
m = createMessage("K", anope_event_kill); addCoreMessage(IRCD,m); // kill
m = createMessage("M", anope_event_servermode); addCoreMessage(IRCD,m); // servermode
m = createMessage("m", anope_event_mode); addCoreMessage(IRCD,m); // mode
m = createMessage("N", anope_event_nick); addCoreMessage(IRCD,m); // nick (introduce)
m = createMessage("n", anope_event_nickchange); addCoreMessage(IRCD,m); // nick (change)
m = createMessage("V", anope_event_null); addCoreMessage(IRCD,m); // notice
m = createMessage("L", anope_event_part); addCoreMessage(IRCD,m); // part
m = createMessage("?", anope_event_ping); addCoreMessage(IRCD,m); // ping
m = createMessage("P", anope_event_privmsg); addCoreMessage(IRCD,m); // privmsg
m = createMessage("Q", anope_event_quit); addCoreMessage(IRCD,m); // quit
m = createMessage("&", anope_event_squit); addCoreMessage(IRCD,m); // squit
m = createMessage("t", anope_event_topic); addCoreMessage(IRCD,m); // topic (user)
m = createMessage("T", anope_event_servertopic); addCoreMessage(IRCD,m); // topic (server)
m = createMessage("@", anope_event_null); addCoreMessage(IRCD,m); // wallops
m = createMessage("b", anope_event_chghost); addCoreMessage(IRCD,m); // change displayed host
m = createMessage("a", anope_event_chgname); addCoreMessage(IRCD,m); // change gecos
m = createMessage("$", anope_event_null); addCoreMessage(IRCD,m); /* send routing table */
m = createMessage("X", anope_event_null); addCoreMessage(IRCD,m); /* begin netburst NOW */
m = createMessage("Y", anope_event_eob); addCoreMessage(IRCD,m); /* end of UPLINK netburst */
m = createMessage("H", anope_event_null); addCoreMessage(IRCD,m); /* local sync start */
m = createMessage("F", anope_event_null); addCoreMessage(IRCD,m); /* local sync end */
m = createMessage("f", anope_event_null); addCoreMessage(IRCD,m); /* local U-lined sync end */
m = createMessage("*", anope_event_null); addCoreMessage(IRCD,m); /* no operation */
m = createMessage("|", anope_event_null); addCoreMessage(IRCD,m); /* oper type */
m = createMessage("-", anope_event_null); addCoreMessage(IRCD,m); /* start mesh operation */
m = createMessage("s", anope_event_server); addCoreMessage(IRCD,m); /* passive server response */
m = createMessage("U", anope_event_null); addCoreMessage(IRCD,m); /* active service connect */
m = createMessage("J", anope_event_join); addCoreMessage(IRCD,m); /* join */
m = createMessage("k", anope_event_kick); addCoreMessage(IRCD,m); /* kick */
m = createMessage("K", anope_event_kill); addCoreMessage(IRCD,m); /* kill */
m = createMessage("M", anope_event_servermode); addCoreMessage(IRCD,m); /* servermode */
m = createMessage("m", anope_event_mode); addCoreMessage(IRCD,m); /* mode */
m = createMessage("N", anope_event_nick); addCoreMessage(IRCD,m); /* nick (introduce) */
m = createMessage("n", anope_event_nickchange); addCoreMessage(IRCD,m); /* nick (change) */
m = createMessage("V", anope_event_null); addCoreMessage(IRCD,m); /* notice */
m = createMessage("L", anope_event_part); addCoreMessage(IRCD,m); /* part */
m = createMessage("?", anope_event_ping); addCoreMessage(IRCD,m); /* ping */
m = createMessage("P", anope_event_privmsg); addCoreMessage(IRCD,m); /* privmsg */
m = createMessage("Q", anope_event_quit); addCoreMessage(IRCD,m); /* quit */
m = createMessage("&", anope_event_squit); addCoreMessage(IRCD,m); /* squit */
m = createMessage("t", anope_event_topic); addCoreMessage(IRCD,m); /* topic (user) */
m = createMessage("T", anope_event_servertopic); addCoreMessage(IRCD,m); /* topic (server) */
m = createMessage("@", anope_event_null); addCoreMessage(IRCD,m); /* wallops */
m = createMessage("b", anope_event_chghost); addCoreMessage(IRCD,m); /* change displayed host */
m = createMessage("a", anope_event_chgname); addCoreMessage(IRCD,m); /* change gecos */
}
char* xsumtable = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
@@ -566,7 +566,7 @@ void inspircd_cmd_376(char *source)
void inspircd_cmd_nick(char *nick, char *name, char *modes)
{
// N <time> <nick> <host> <displayed-host> <ident> <modes> <ipaddress> <server> :<GECOS>
/* N <time> <nick> <host> <displayed-host> <ident> <modes> <ipaddress> <server> :<GECOS> */
send_cmd(CreateSum(), "N %lu %s %s %s %s %s 0.0.0.0 %s :%s",(long int) time(NULL),nick,ServiceHost,ServiceHost,ServiceUser,modes,ServerName,name);
}
@@ -863,7 +863,7 @@ void inspircd_cmd_sqline(char *mask, char *reason)
if (!mask || !reason) {
return;
}
// { <mask> <who-set-it> <time-set> <duration> :<reason>
/* { <mask> <who-set-it> <time-set> <duration> :<reason> */
send_cmd(CreateSum(), "{ %s %s %lu 0 :%s", mask, ServerName, (unsigned long)time(NULL), reason);
}
@@ -953,13 +953,13 @@ int anope_event_servertopic(char *source, int ac, char **av)
v[1] = av[1];
v[2] = av[0];
v[3] = av[3];
do_topic(NULL, 4, v); // no source (server set)
do_topic(NULL, 4, v); /* no source (server set) */
return MOD_CONT;
}
int anope_event_topic(char *source, int ac, char **av)
{
// t [Brain] #chatspike :this is a topic test fsfdsfsdfds
/* t [Brain] #chatspike :this is a topic test fsfdsfsdfds */
char *v[32];
if (ac != 3)
return MOD_CONT;
@@ -1049,7 +1049,7 @@ int anope_event_kill(char *source, int ac, char **av)
int anope_event_kick(char *source, int ac, char **av)
{
// Syntax: k <source> <dest> <channel> :<reason>
/* Syntax: k <source> <dest> <channel> :<reason> */
char *v[32];
if (ac != 4)
return MOD_CONT; v[0] = av[1];
@@ -1070,12 +1070,12 @@ int anope_event_join(char *source, int ac, char **av)
char thismodes[256];
cumodes[0] = thismodes;
// some sanity checks
/* some sanity checks */
if (ac < 2) {
return MOD_CONT;
}
u = finduser(av[0]); // get the user info
u = finduser(av[0]); /* get the user info */
if (!u) {
return MOD_CONT;
@@ -1083,13 +1083,13 @@ int anope_event_join(char *source, int ac, char **av)
cumodes[1] = av[0];
// iterate through each channel the user is joining
/* iterate through each channel the user is joining */
for (i = 1; i < ac; i++)
{
// the channel name
/* the channel name */
new_av[0] = av[i];
// strip off the permissions
/* strip off the permissions */
strcpy(thismodes,"");
if (*new_av[0] != '#')
{
@@ -1195,20 +1195,20 @@ int anope_event_nick(char *source, int ac, char **av)
struct in_addr addy;
uint32* ad = (uint32*)&addy;
// someone really should comment this -- Brain
/* someone really should comment this -- Brain
// 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)
// Syntax: N <time> <nick> <host> <displayed-host> <ident> <modes> <ipaddress> <server> :<GECOS>
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)
Syntax: N <time> <nick> <host> <displayed-host> <ident> <modes> <ipaddress> <server> :<GECOS>
*/
if (ac == 9) {
// fix by brain - 27 apr 2005
// During a net merge between two meshed clients there may be some spurious "bouncing"
// nick introductions (e.g. introductions for clients we already have). If this happens,
// we should ignore any that claim to be from us as these are just confirmations of the
// services "complement" - processing them will cause all kinds of session limit oddities.
/* fix by brain - 27 apr 2005
During a net merge between two meshed clients there may be some spurious "bouncing"
nick introductions (e.g. introductions for clients we already have). If this happens,
we should ignore any that claim to be from us as these are just confirmations of the
services "complement" - processing them will cause all kinds of session limit oddities.*/
if ((strcmp(av[7],ServerName)) && (!finduser(av[1])))
{
inet_aton(av[6],&addy);
@@ -1246,10 +1246,11 @@ int anope_event_chghost(char *source, int ac, char **av)
/* EVENT: SERVER */
int anope_event_server(char *source, int ac, char **av)
{
// to shield anope from the intricacies of the mesh,
// anope only sees the uplink at all times (and receives
// all nick introductions etc as if they'd come from the
// uplink directly, 1 hop away.
/*
to shield anope from the intricacies of the mesh,
anope only sees the uplink at all times (and receives
all nick introductions etc as if they'd come from the
uplink directly, 1 hop away. */
if (!uplink)
{
uplink = sstrdup(av[0]);
@@ -1272,8 +1273,8 @@ int anope_event_part(char *source, int ac, char **av)
char *v[32];
if (ac != 3)
return MOD_CONT;
v[0] = av[1]; // channel
v[1] = av[2]; // reason
v[0] = av[1]; /* channel */
v[1] = av[2]; /* reason */
do_part(av[0], 2, v);
return MOD_CONT;
}
@@ -1304,14 +1305,14 @@ void inspircd_cmd_unsgline(char *mask)
/* UNSZLINE */
void inspircd_cmd_unszline(char *mask)
{
// ] <mask> <who>
/* ] <mask> <who> */
send_cmd(CreateSum(), "] %s %s", mask, s_OperServ);
}
/* SZLINE */
void inspircd_cmd_szline(char *mask, char *reason, char *whom)
{
// } <mask> <who-set-it> <time-set> <duration> :<reason>
/* } <mask> <who-set-it> <time-set> <duration> :<reason> */
send_cmd(CreateSum(), "} %s %s %lu %lu :%s",mask,whom,(unsigned long)time(NULL),(unsigned long)86400 * 2, reason);
}
@@ -1397,7 +1398,7 @@ int anope_event_admin(char *source, int ac, char **av)
int inspircd_flood_mode_check(char *value)
{
// no +f mode!
/* no +f mode! */
return 1;
}
@@ -1414,7 +1415,7 @@ void inspircd_cmd_global_legacy(char *source, char *fmt)
int inspircd_valid_nick(char *nick)
{
// no special nicks
/* no special nicks */
return 1;
}