summaryrefslogtreecommitdiff
path: root/src/plugins/db2sql.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-16 17:16:56 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-16 17:16:56 +0300
commitd39250a6d5bb8987fcc8d7e8961680f9802fb2e7 (patch)
tree2a0d54139c31f2858bf1e934c57c83bce4de626f /src/plugins/db2sql.c
parent7a3971571ac2590c6f43a1494b6fcdb6ae632e27 (diff)
parentd4832df6929653561e6867149e4ecaa63a860cbe (diff)
downloadhercules-d39250a6d5bb8987fcc8d7e8961680f9802fb2e7.tar.gz
hercules-d39250a6d5bb8987fcc8d7e8961680f9802fb2e7.tar.bz2
hercules-d39250a6d5bb8987fcc8d7e8961680f9802fb2e7.tar.xz
hercules-d39250a6d5bb8987fcc8d7e8961680f9802fb2e7.zip
Merge pull request #876 from MishimaHaruna/gpl
GPL Headers
Diffstat (limited to 'src/plugins/db2sql.c')
-rw-r--r--src/plugins/db2sql.c47
1 files changed, 43 insertions, 4 deletions
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index 6d4a7789c..5b5d79bac 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -1,6 +1,22 @@
-// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
-// See the LICENSE file
-
+/**
+ * This file is part of Hercules.
+ * http://herc.ws - http://github.com/HerculesWS/Hercules
+ *
+ * Copyright (C) 2013-2015 Hercules Dev Team
+ *
+ * Hercules is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include "config/core.h"
#include "common/hercules.h"
@@ -238,7 +254,30 @@ int db2sql(config_setting_t *entry, int n, const char *source) {
return it?it->nameid:0;
}
void totable(void) {
+ time_t t;
+ struct tm *lt;
+ t = time(NULL);
+ lt = localtime(&t);
+ int year = lt->tm_year+1900;
fprintf(tosql.fp,
+ "-- This file is part of Hercules.\n"
+ "-- http://herc.ws - http://github.com/HerculesWS/Hercules\n"
+ "--\n"
+ "-- Copyright (C) 2013-%d Hercules Dev Team\n"
+ "--\n"
+ "-- Hercules is free software: you can redistribute it and/or modify\n"
+ "-- it under the terms of the GNU General Public License as published by\n"
+ "-- the Free Software Foundation, either version 3 of the License, or\n"
+ "-- (at your option) any later version.\n"
+ "--\n"
+ "-- This program is distributed in the hope that it will be useful,\n"
+ "-- but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+ "-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
+ "-- GNU General Public License for more details.\n"
+ "--\n"
+ "-- You should have received a copy of the GNU General Public License\n"
+ "-- along with this program. If not, see <http://www.gnu.org/licenses/>.\n\n"
+
"-- NOTE: This file was auto-generated and should never be manually edited,\n"
"-- as it will get overwritten. If you need to modify this file,\n"
"-- please consider modifying the corresponding .conf file inside\n"
@@ -287,7 +326,7 @@ void totable(void) {
" `unequip_script` text,\n"
" PRIMARY KEY (`id`)\n"
") ENGINE=MyISAM;\n"
- "\n",tosql.db_name,tosql.db_name,tosql.db_name);
+ "\n", year, tosql.db_name,tosql.db_name,tosql.db_name);
}
void do_db2sql(void) {
/* link */