aboutsummaryrefslogtreecommitdiffstats
path: root/sircbot.c
diff options
context:
space:
mode:
Diffstat (limited to 'sircbot.c')
-rw-r--r--sircbot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sircbot.c b/sircbot.c
index ebe2d34..6ac9122 100644
--- a/sircbot.c
+++ b/sircbot.c
@@ -8,7 +8,9 @@ Intended usage is git hook that sends commits, etc.
#include <sys/socket.h>
#include <sys/un.h>
+#include <sys/wait.h>
+#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
@@ -18,6 +20,7 @@ Intended usage is git hook that sends commits, etc.
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
+#include <time.h>
#include <unistd.h>
#include "irc.h"
@@ -82,7 +85,6 @@ static int write_pid(const char *file)
int daemonize(const char *pidfile, const char *logfile)
{
- int devnull, f;
int pid = fork();
if (pid < 0) {
perror("fork");
@@ -508,7 +510,7 @@ static int join_channels(struct sircbot_session *sb)
static int irc_loop(struct sircbot_session *sb)
{
- int i, r, n, joined = 0;
+ int i, r, n;
const int maxconn = sb->numchan * 128;
const int maxfds = 1 + sb->numchan + maxconn;
struct pollfd fds[maxfds];
@@ -669,7 +671,6 @@ int main(int argc, char *argv[])
while (1) {
sb.sess = irc_connect(server, port, nick, pass);
- char buf[256];
if (sb.sess == NULL) {
log_err(server);