diff options
author | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-12-27 03:22:46 +0000 |
---|---|---|
committer | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-12-27 03:22:46 +0000 |
commit | d0b1978f623a3b1b9401f69142ea2e2032758c2f (patch) | |
tree | c20f14924eb6dbcdacc164309c8897716c9c7c52 /src | |
parent | 0607b8c2b2a0510207a73320f4532844863ec9a0 (diff) |
BUILD : 1.7.6 (505) BUGS : N/A NOTES : Some documentation updated, fixed compiler errors with ptlink, and fixed a segfault with some options when set with just quotes
git-svn-id: svn://svn.anope.org/anope/trunk@505 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@359 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 5 | ||||
-rw-r--r-- | src/config.c | 23 | ||||
-rw-r--r-- | src/ptlink.c | 4 |
3 files changed, 22 insertions, 10 deletions
diff --git a/src/Makefile b/src/Makefile index 98074f2b2..40ff6ceb9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -44,6 +44,7 @@ services: $(OBJS) $(OBJS): Makefile actions.o: actions.c $(INCLUDES) +base64.o: base64.c $(INCLUDES) botserv.o: botserv.c $(INCLUDES) channels.o: channels.c $(INCLUDES) chanserv.o: chanserv.c $(INCLUDES) @@ -54,6 +55,7 @@ converter.o: converter.c $(INCLUDES) datafiles.o: datafiles.c $(INCLUDES) encrypt.o: encrypt.c $(INCLUDES) init.o: init.c $(INCLUDES) +helpserv.o: helpserv.c $(INCLUDES) hostserv.o: hostserv.c $(INCLUDES) language.o: language.c $(INCLUDES) list.o: list.c $(INCLUDES) @@ -63,14 +65,15 @@ main.o: main.c $(INCLUDES) memory.o: memory.c $(INCLUDES) memoserv.o: memoserv.c $(INCLUDES) messages.o: messages.c $(INCLUDES) +modules.o: modules.c $(INCLUDES) misc.o: misc.c $(INCLUDES) news.o: news.c $(INCLUDES) nickserv.o: nickserv.c $(INCLUDES) operserv.o: operserv.c $(INCLUDES) process.o: process.c $(INCLUDES) -protocol.o: protocol.c $(INCLUDES) proxy.o: proxy.c $(INCLUDES) send.o: send.c $(INCLUDES) +servers.o: servers.c $(INCLUDES) sessions.o: sessions.c $(INCLUDES) slist.o: slist.c $(INCLUDES) sockutil.o: sockutil.c $(INCLUDES) diff --git a/src/config.c b/src/config.c index 87c959a59..11a772832 100644 --- a/src/config.c +++ b/src/config.c @@ -1189,13 +1189,20 @@ int read_config(int reload) s = strtok(ServicesRoot, " "); do { - RootNumber++; - ServicesRoots = - realloc(ServicesRoots, sizeof(char *) * RootNumber); - ServicesRoots[RootNumber - 1] = sstrdup(s); + if (s) { + RootNumber++; + ServicesRoots = + realloc(ServicesRoots, sizeof(char *) * RootNumber); + ServicesRoots[RootNumber - 1] = sstrdup(s); + } } while ((s = strtok(NULL, " "))); } + if (!RootNumber) { + error(0, "No ServicesRoot defined"); + retval = 0; + } + /* Ulines */ if (UlineServers) { @@ -1203,9 +1210,11 @@ int read_config(int reload) s = strtok(UlineServers, " "); do { - NumUlines++; - Ulines = realloc(Ulines, sizeof(char *) * NumUlines); - Ulines[NumUlines - 1] = sstrdup(s); + if (s) { + NumUlines++; + Ulines = realloc(Ulines, sizeof(char *) * NumUlines); + Ulines[NumUlines - 1] = sstrdup(s); + } } while ((s = strtok(NULL, " "))); } diff --git a/src/ptlink.c b/src/ptlink.c index 098b5bf9f..28d05c47e 100644 --- a/src/ptlink.c +++ b/src/ptlink.c @@ -646,7 +646,7 @@ void anope_cmd_unsqline(char *user) void anope_cmd_join(char *user, char *channel, time_t chantime) { - send_cmd(ServerName, "SJOIN %ld %s + :%s", (long int) time(null), + send_cmd(ServerName, "SJOIN %ld %s + :%s", (long int) time(NULL), channel, user); } @@ -1590,7 +1590,7 @@ void anope_cmd_chg_nick(char *oldnick, char *newnick) return; } - send_cmd(oldnick, "NICK %s %ld", newnick, (long int) time(null)); + send_cmd(oldnick, "NICK %s %ld", newnick, (long int) time(NULL)); } /* |