diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-10 17:36:27 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-10 17:36:27 +0000 |
commit | 7ddc6d8be53b7020faf88796e6d0987eb5ba2b7c (patch) | |
tree | c1293da0bdab3c31d9b9c76a9d20b032c99e7528 /src | |
parent | dd258b36d2a0274f6907d98969a551128c810acb (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/extra/atheme2anope/atheme2anope.c | 15 |
1 files changed, 5 insertions, 10 deletions
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("*"); |