summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--Changes.conf26
-rw-r--r--data/example.conf25
-rw-r--r--include/extern.h4
-rw-r--r--include/services.h1
-rw-r--r--src/base64.c4
-rw-r--r--src/chanserv.c19
-rw-r--r--src/config.c26
-rw-r--r--src/misc.c22
-rw-r--r--src/modules.c5
-rw-r--r--src/nickserv.c12
-rw-r--r--src/plexus.c3
-rw-r--r--src/unreal32.c2
-rw-r--r--version.log6
14 files changed, 85 insertions, 71 deletions
diff --git a/Changes b/Changes
index 7e9f697c2..24063b81f 100644
--- a/Changes
+++ b/Changes
@@ -13,6 +13,7 @@ Provided by Anope Dev. <dev@anope.org> - 2004
11/19 A Added anope_cmd_ctcp() to code API, for sending CTCP messages. [ #00]
11/18 A Unable to use registered nicknames as bot nicks from now on. [ #00]
11/18 A NSAddAccessOnReg to control access list on registration. [ #00]
+12/23 F Several compiler errors under make strict. [ #00]
12/21 F Unsetting away would not trigger checking of memos. [#258]
12/21 F Dreamforge compile [ #00]
12/21 F Moved global about del of non-existant session inside debug() if [ #00]
diff --git a/Changes.conf b/Changes.conf
index 4127edd37..90629d4be 100644
--- a/Changes.conf
+++ b/Changes.conf
@@ -24,6 +24,32 @@ UlineServers "stats.your.network, proxy.your.network"
** DELETED CONFIGURATION DIRECTIVES **
+# NetworkDomain <name> [OPTIONAL]
+#
+# If your network has a common domain name, specify it there (for
+# example, all IRCZONE servers have a name ending in ".irczone.cl",
+# so "irczone.cl" would be set there.
+#
+# You can specify more than one Network Domain by separating each one by
+# a space: NetworkDomain "localnet.net localnet.com"
+#
+# Note that this directive is no longer used by the GLOBAL command, since
+# it uses a dynamic list of connected servers regardless of their
+# domains. However, some modules may still use this value, so you might
+# want to keep it just in case.
+
+NetworkDomain "localnet.com"
+
+# ListOpersOnly [DEPRECATED]
+# When enabled, limits use of the ChanServ and NickServ LIST commands
+# to IRC operators.
+#
+# This directive has been superseded by the NSListOpersOnly and
+# CSListOpersOnly directives.
+
+#ListOpersOnly
+
+
Anope Version 1.7.6
-------------------
** ADDED CONFIGURATION DIRECTIVES **
diff --git a/data/example.conf b/data/example.conf
index 288c694ce..060f41206 100644
--- a/data/example.conf
+++ b/data/example.conf
@@ -231,22 +231,6 @@ HelpChannel "#help"
#LogBot
-# NetworkDomain <name> [OPTIONAL]
-#
-# If your network has a common domain name, specify it there (for
-# example, all IRCZONE servers have a name ending in ".irczone.cl",
-# so "irczone.cl" would be set there.
-#
-# You can specify more than one Network Domain by separating each one by
-# a space: NetworkDomain "localnet.net localnet.com"
-#
-# Note that this directive is no longer used by the GLOBAL command, since
-# it uses a dynamic list of connected servers regardless of their
-# domains. However, some modules may still use this value, so you might
-# want to keep it just in case.
-
-NetworkDomain "localnet.com"
-
# NetworkName <name> [REQUIRED]
#
# This is the name of the network the Services are running on.
@@ -287,15 +271,6 @@ NetworkName "LocalNet"
#NoBackupOkay
-# ListOpersOnly [DEPRECATED]
-# When enabled, limits use of the ChanServ and NickServ LIST commands
-# to IRC operators.
-#
-# This directive has been superseded by the NSListOpersOnly and
-# CSListOpersOnly directives.
-
-#ListOpersOnly
-
# StrictPasswords [RECOMMENDED]
# When enabled, causes Services to perform more stringent checks on
# passwords. If this is disabled, Services will only disallow a
diff --git a/include/extern.h b/include/extern.h
index ec3243d61..5acb85ebb 100644
--- a/include/extern.h
+++ b/include/extern.h
@@ -223,8 +223,6 @@ E char *ServiceHost;
E char *HelpChannel;
E char *LogChannel;
-E char **NetworkDomains;
-E int DomainNumber;
E char *NetworkName;
E char *s_NickServ;
@@ -680,6 +678,8 @@ E u_char getrandom8(void);
E u_int16_t getrandom16(void);
E u_int32_t getrandom32(void);
+E char *str_signed(u_char *str);
+
/**** modules.c ****/
E void moduleCallBackRun(void);
E void moduleCleanStruct(ModuleData **moduleData);
diff --git a/include/services.h b/include/services.h
index 174d14e78..2e5739a0f 100644
--- a/include/services.h
+++ b/include/services.h
@@ -45,6 +45,7 @@
#include <limits.h>
#include <netdb.h>
#include <netinet/in.h>
+#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/stat.h> /* for umask() on some systems */
#include <sys/types.h>
diff --git a/src/base64.c b/src/base64.c
index 6eb8e57ac..df14f09b0 100644
--- a/src/base64.c
+++ b/src/base64.c
@@ -285,6 +285,7 @@ char *encode_ip(u_char * ip)
static char buf[25];
u_char *cp;
struct in_addr ia; /* For IPv4 */
+ char *s_ip; /* Signed ip string */
if (!ip)
return "*";
@@ -292,7 +293,8 @@ char *encode_ip(u_char * ip)
if (strchr((char *) ip, ':')) {
return NULL;
} else {
- ia.s_addr = inet_addr(ip);
+ s_ip = str_signed(ip);
+ ia.s_addr = inet_addr(s_ip);
cp = (u_char *) ia.s_addr;
b64_encode((char *) &cp, sizeof(struct in_addr), buf, 25);
}
diff --git a/src/chanserv.c b/src/chanserv.c
index 7a855e5ee..15c4df05e 100644
--- a/src/chanserv.c
+++ b/src/chanserv.c
@@ -741,10 +741,9 @@ void load_cs_dbase(void)
ci->levels = scalloc(2 * CA_SIZE, 1);
reset_levels(ci);
for (j = 0; j < n_levels; j++) {
+ SAFE(read_int16(&tmp16));
if (j < CA_SIZE)
- SAFE(read_int16(&ci->levels[j], f));
- else
- SAFE(read_int16(&tmp16, f));
+ ci->levels[j] = (int16) tmp16;
}
/* To avoid levels list silly hacks */
if (ver < 10)
@@ -775,7 +774,8 @@ void load_cs_dbase(void)
for (j = 0; j < ci->accesscount; j++) {
SAFE(read_int16(&ci->access[j].in_use, f));
if (ci->access[j].in_use) {
- SAFE(read_int16(&ci->access[j].level, f));
+ SAFE(read_int16(&tmp16, f));
+ ci->access[j].level = (int16) tmp16;
SAFE(read_string(&s, f));
if (s) {
if (ver >= 13)
@@ -900,8 +900,10 @@ void load_cs_dbase(void)
}
}
- SAFE(read_int16(&ci->memos.memocount, f));
- SAFE(read_int16(&ci->memos.memomax, f));
+ SAFE(read_int16(&tmp16, f));
+ ci->memos.memocount = (int16) tmp16;
+ SAFE(read_int16(&tmp16, f));
+ ci->memos.memomax = (int16) tmp16;
if (ci->memos.memocount) {
Memo *memos;
memos = scalloc(sizeof(Memo) * ci->memos.memocount, 1);
@@ -949,10 +951,9 @@ void load_cs_dbase(void)
n_ttb = tmp16;
ci->ttb = scalloc(2 * TTB_SIZE, 1);
for (j = 0; j < n_ttb; j++) {
+ SAFE(read_int16(&tmp16, f));
if (j < TTB_SIZE)
- SAFE(read_int16(&ci->ttb[j], f));
- else
- SAFE(read_int16(&tmp16, f));
+ ci->ttb[j] = (int16) tmp16;
}
for (j = n_ttb; j < TTB_SIZE; j++)
ci->ttb[j] = 0;
diff --git a/src/config.c b/src/config.c
index 5a68e0d99..80513547a 100644
--- a/src/config.c
+++ b/src/config.c
@@ -41,9 +41,6 @@ static char *temp_userhost;
char *HelpChannel;
char *LogChannel;
-char *NetworkDomain;
-char **NetworkDomains;
-int DomainNumber;
char *NetworkName;
char *s_NickServ;
@@ -337,11 +334,7 @@ int NumUlines;
/* Deprecated directive (dep_) and value checking (chk_) functions: */
-static void dep_ListOpersOnly(void)
-{
- NSListOpersOnly = 1;
- CSListOpersOnly = 1;
-}
+/* Hey, there are no left! -GD */
/*************************************************************************/
@@ -486,8 +479,6 @@ Directive directives[] = {
{"KillClonesAkillExpire",
{{PARAM_TIME, PARAM_RELOAD, &KillClonesAkillExpire}}},
{"LimitSessions", {{PARAM_SET, PARAM_FULLONLY, &LimitSessions}}},
- {"ListOpersOnly",
- {{PARAM_DEPRECATED, PARAM_RELOAD, dep_ListOpersOnly}}},
{"LocalAddress", {{PARAM_STRING, 0, &LocalHost},
{PARAM_PORT, PARAM_OPTIONAL, &LocalPort}}},
{"LogUsers", {{PARAM_SET, PARAM_RELOAD, &LogUsers}}},
@@ -518,7 +509,6 @@ Directive directives[] = {
{"MSNotifyAll", {{PARAM_SET, PARAM_RELOAD, &MSNotifyAll}}},
{"MSSendDelay", {{PARAM_TIME, PARAM_RELOAD, &MSSendDelay}}},
{"MSMemoReceipt", {{PARAM_POSINT, PARAM_RELOAD, &MSMemoReceipt}}},
- {"NetworkDomain", {{PARAM_STRING, PARAM_RELOAD, &NetworkDomain}}},
{"NetworkName", {{PARAM_STRING, PARAM_RELOAD, &NetworkName}}},
{"NewsCount", {{PARAM_POSINT, PARAM_RELOAD, &NewsCount}}},
{"NewsDB", {{PARAM_STRING, PARAM_RELOAD, &NewsDBName}}},
@@ -1385,20 +1375,6 @@ int read_config(int reload)
NSRExpire = 0;
}
- /* Network Domain building */
- DomainNumber = 0;
- if (NetworkDomain) {
- s = strtok(NetworkDomain, " ");
- if (s) {
- do {
- DomainNumber++;
- NetworkDomains =
- realloc(NetworkDomains, sizeof(char *) * DomainNumber);
- NetworkDomains[DomainNumber - 1] = sstrdup(s);
- } while ((s = strtok(NULL, " ")));
- }
- }
-
if (!retval) {
printf
("\n*** Support resources: Read through the services.conf self-contained \n*** documentation. Read the documentation files found in the 'docs' \n*** folder. Visit our portal located at http://www.anope.org/. Join \n*** our support channel on /server irc.anope.org channel #anope.\n\n");
diff --git a/src/misc.c b/src/misc.c
index 0b2d5af10..1d011ece5 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -1103,4 +1103,26 @@ char *host_resolve(char *host)
}
}
+/*************************************************************************/
+
+/**
+ * Change an unsigned string to a signed string, overwriting the original
+ * string.
+ * @param input string
+ * @return output string, same as input string.
+ */
+
+char *str_signed(u_char *str)
+{
+ char *nstr;
+
+ nstr = (char *)str;
+ while (*str) {
+ *nstr = (char)*str;
+ str++; nstr++;
+ }
+
+ return nstr;
+}
+/* EOF */
diff --git a/src/modules.c b/src/modules.c
index ff34ed361..107cf0bfa 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -337,10 +337,11 @@ int loadModule(Module * m, User * u)
strncpy(buf, MODULE_PATH, 4095); /* Get full path with .so extension */
len = strlen(buf);
strncat(buf, "runtime/", 4095 - len);
- len += strlen(buf);
+ len = strlen(buf);
strncat(buf, m->name, 4095 - len);
- len += strlen(buf);
+ len = strlen(buf);
strncat(buf, ".so", 4095 - len);
+ buf[4095] = '\0';
m->filename = sstrdup(buf);
#ifdef HAS_RTLD_LOCAL
diff --git a/src/nickserv.c b/src/nickserv.c
index d0a53bd72..5cc4c48d9 100644
--- a/src/nickserv.c
+++ b/src/nickserv.c
@@ -543,8 +543,10 @@ void load_old_ns_dbase(void)
SAFE(read_string(access, f));
}
- SAFE(read_int16(&nc->memos.memocount, f));
- SAFE(read_int16(&nc->memos.memomax, f));
+ SAFE(read_int16(&tmp16, f));
+ nc->memos.memocount = (int16) tmp16;
+ SAFE(read_int16(&tmp16, f));
+ nc->memos.memomax = (int16) tmp16;
if (nc->memos.memocount) {
Memo *memos;
memos = scalloc(sizeof(Memo) * nc->memos.memocount, 1);
@@ -741,8 +743,10 @@ void load_ns_dbase(void)
SAFE(read_string(access, f));
}
- SAFE(read_int16(&nc->memos.memocount, f));
- SAFE(read_int16(&nc->memos.memomax, f));
+ SAFE(read_int16(&tmp16, f));
+ nc->memos.memocount = (int16) tmp16;
+ SAFE(read_int16(&tmp16, f));
+ nc->memos.memomax = (int16) tmp16;
if (nc->memos.memocount) {
Memo *memos;
memos = scalloc(sizeof(Memo) * nc->memos.memocount, 1);
diff --git a/src/plexus.c b/src/plexus.c
index 20126b337..ddd7f5300 100644
--- a/src/plexus.c
+++ b/src/plexus.c
@@ -1353,10 +1353,11 @@ void anope_cmd_squit(char *servname, char *message)
int anope_event_mode(char *source, int ac, char **av)
{
+ Server *s;
+
if (ac < 2)
return MOD_CONT;
- Server *s;
s = findserver(servlist, source);
if (*av[0] == '#' || *av[0] == '&') {
diff --git a/src/unreal32.c b/src/unreal32.c
index 91485949a..a19ec5576 100644
--- a/src/unreal32.c
+++ b/src/unreal32.c
@@ -1506,7 +1506,7 @@ int anope_event_netinfo(char *source, int ac, char **av)
void anope_cmd_netinfo(int ac, char **av)
{
send_cmd(NULL, "%s %ld %ld %d %s 0 0 0 :%s",
- send_token("NETINFO", "AO"), maxusercnt,
+ send_token("NETINFO", "AO"), (long int) maxusercnt,
(long int) time(NULL), atoi(av[2]), av[3], av[7]);
}
diff --git a/version.log b/version.log
index df63d9e00..156f6541c 100644
--- a/version.log
+++ b/version.log
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="6"
-VERSION_BUILD="498"
+VERSION_BUILD="499"
# $Log$
#
+# BUILD : 1.7.6 (499)
+# BUGS :
+# NOTES : Fixed several compiler warnings with make strict, removed 2 deprecated config vars.
+#
# BUILD : 1.7.6 (498)
# BUGS : N/A
# NOTES : Updated plexus.c/.h as per patch from ThaPrince