]> jfr.im git - solanum.git/blobdiff - bandb/bantool.c
reslib: really fix it this time
[solanum.git] / bandb / bantool.c
index 3bebb596466ebd3da0171d472f9d4cca42cd783d..4cd53bd73c140f2a80d40a60c9112b1006acd953 100644 (file)
@@ -22,9 +22,6 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: bantool.c 26164 2008-10-26 19:52:43Z androsyn $
- *
- *
  * The following server admins have either contributed various configs to test against,
  * or helped with debugging and feature requests. Many thanks to them.
  * stevoo / efnet.port80.se
@@ -201,8 +198,7 @@ main(int argc, char *argv[])
                rb_strlcpy(etc, ETCPATH, sizeof(ETCPATH));
 
        fprintf(stdout,
-               "* ircd-ratbox bantool v.%s ($Id: bantool.c 26164 2008-10-26 19:52:43Z androsyn $)\n",
-               BT_VERSION);
+               "* charybdis bantool v.%s\n", BT_VERSION);
 
        if(flag.pretend == NO)
        {
@@ -236,7 +232,7 @@ main(int argc, char *argv[])
        /* checking for our files to import or export */
        for(i = 0; i < LAST_BANDB_TYPE; i++)
        {
-               rb_snprintf(conf, sizeof(conf), "%s/%s.conf%s",
+               snprintf(conf, sizeof(conf), "%s/%s.conf%s",
                            etc, bandb_table[i], bandb_suffix[i]);
 
                if(flag.import && flag.pretend == NO)
@@ -297,11 +293,11 @@ export_config(const char *conf, int id)
                return;
 
        if(strstr(conf, ".perm") != 0)
-               rb_snprintf(sql, sizeof(sql),
+               snprintf(sql, sizeof(sql),
                            "SELECT DISTINCT mask1,mask2,reason,oper,time FROM %s WHERE perm = 1 ORDER BY time",
                            bandb_table[id]);
        else
-               rb_snprintf(sql, sizeof(sql),
+               snprintf(sql, sizeof(sql),
                            "SELECT DISTINCT mask1,mask2,reason,oper,time FROM %s WHERE perm = 0 ORDER BY time",
                            bandb_table[id]);
 
@@ -330,7 +326,7 @@ export_config(const char *conf, int id)
                {
                case BANDB_DLINE:
                case BANDB_DLINE_PERM:
-                       rb_snprintf(buf, sizeof(buf),
+                       snprintf(buf, sizeof(buf),
                                    "\"%s\",\"%s\",\"\",\"%s\",\"%s\",%s\n",
                                    table.row[j][mask1],
                                    mangle_reason(table.row[j][reason]),
@@ -340,7 +336,7 @@ export_config(const char *conf, int id)
 
                case BANDB_XLINE:
                case BANDB_XLINE_PERM:
-                       rb_snprintf(buf, sizeof(buf),
+                       snprintf(buf, sizeof(buf),
                                    "\"%s\",\"0\",\"%s\",\"%s\",%s\n",
                                    escape_quotes(table.row[j][mask1]),
                                    mangle_reason(table.row[j][reason]),
@@ -349,7 +345,7 @@ export_config(const char *conf, int id)
 
                case BANDB_RESV:
                case BANDB_RESV_PERM:
-                       rb_snprintf(buf, sizeof(buf),
+                       snprintf(buf, sizeof(buf),
                                    "\"%s\",\"%s\",\"%s\",%s\n",
                                    table.row[j][mask1],
                                    mangle_reason(table.row[j][reason]),
@@ -358,7 +354,7 @@ export_config(const char *conf, int id)
 
 
                default:        /* Klines */
-                       rb_snprintf(buf, sizeof(buf),
+                       snprintf(buf, sizeof(buf),
                                    "\"%s\",\"%s\",\"%s\",\"\",\"%s\",\"%s\",%s\n",
                                    table.row[j][mask1], table.row[j][mask2],
                                    mangle_reason(table.row[j][reason]),
@@ -497,9 +493,9 @@ import_config(const char *conf, int id)
 
                /* append operreason_field to reason_field */
                if(!EmptyString(f_oreason))
-                       rb_snprintf(newreason, sizeof(newreason), "%s | %s", f_reason, f_oreason);
+                       snprintf(newreason, sizeof(newreason), "%s | %s", f_reason, f_oreason);
                else
-                       rb_snprintf(newreason, sizeof(newreason), "%s", f_reason);
+                       snprintf(newreason, sizeof(newreason), "%s", f_reason);
 
                if(flag.pretend == NO)
                {
@@ -859,7 +855,7 @@ bt_smalldate(const char *string)
        lt = gmtime(&t);
        if(lt == NULL)
                return NULL;
-       rb_snprintf(buf, sizeof(buf), "%d/%d/%d %02d.%02d",
+       snprintf(buf, sizeof(buf), "%d/%d/%d %02d.%02d",
                    lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min);
        return buf;
 }
@@ -870,9 +866,8 @@ bt_smalldate(const char *string)
 void
 print_help(int i_exit)
 {
-       fprintf(stderr, "bantool v.%s - the ircd-ratbox database tool.\n", BT_VERSION);
+       fprintf(stderr, "bantool v.%s - the charybdis database tool.\n", BT_VERSION);
        fprintf(stderr, "Copyright (C) 2008 Daniel J Reidy <dubkat@gmail.com>\n");
-       fprintf(stderr, "$Id: bantool.c 26164 2008-10-26 19:52:43Z androsyn $\n\n");
        fprintf(stderr, "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"