summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile5
-rw-r--r--src/config.c23
-rw-r--r--src/ptlink.c4
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));
}
/*