From 7ddc6d8be53b7020faf88796e6d0987eb5ba2b7c Mon Sep 17 00:00:00 2001 From: Adam- Date: Mon, 10 May 2010 17:36:27 +0000 Subject: Fixed bug #1161 - Fixed setting expiry times on akills in the atheme2anope database converter git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2946 5417fbe8-f217-4b02-8779-1006273d7864 --- src/modules/extra/atheme2anope/atheme2anope.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/modules/extra/atheme2anope/atheme2anope.c b/src/modules/extra/atheme2anope/atheme2anope.c index 9de28cfe4..6430f2a6d 100644 --- a/src/modules/extra/atheme2anope/atheme2anope.c +++ b/src/modules/extra/atheme2anope/atheme2anope.c @@ -3,8 +3,7 @@ * (C) Copyright 2009, the Anope team (team@anope.org) * * - * This program is free software; you can redistribute it and/or -modify + * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (see it online * at http://www.gnu.org/copyleft/gpl.html) as published by the Free * Software Foundation; @@ -63,7 +62,7 @@ int AnopeInit(int argc, char **argv) CNicks, CChannels, CAkills); quitmsg = calloc(50, 1); - sprintf(quitmsg, "%s", "Shutting down to convert databases..."); + snprintf(quitmsg, 50, "Shutting down to convert databases..."); save_data = 1; delayed_quit = 1; @@ -550,7 +549,7 @@ void WriteAkill(char *line) { char *tok; Akill *entry; - time_t t = time(NULL), j; + time_t t = time(NULL); tok = strtok(line, " "); @@ -571,14 +570,10 @@ void WriteAkill(char *line) if (!stricmp(tok, "0")) entry->expires = 0; else - { - j = (time_t)tok; - entry->expires = (t + j); - } + entry->expires = t + atol(tok); tok = strtok(NULL, " "); - j = (time_t)tok; - entry->seton = j; + entry->seton = atol(tok); tok = strtok(NULL, " "); entry->user = sstrdup("*"); -- cgit