]> jfr.im git - solanum.git/blobdiff - ircd/bandbi.c
Support more human friendly k/d/x-line duration format
[solanum.git] / ircd / bandbi.c
index 29a3bfa27d94b0107c7c1448f3a5e38a0755cc60..5927934e38b41897d26c4e51e47d3bbe7c66016b 100644 (file)
@@ -77,27 +77,21 @@ static int
 start_bandb(void)
 {
        char fullpath[PATH_MAX + 1];
-#ifdef _WIN32
-       const char *suffix = ".exe";
-#else
-       const char *suffix = "";
-#endif
 
        rb_setenv("BANDB_DBPATH", ircd_paths[IRCD_PATH_BANDB], 1);
        if(bandb_path == NULL)
        {
-               snprintf(fullpath, sizeof(fullpath), "%s%cbandb%s", ircd_paths[IRCD_PATH_LIBEXEC], RB_PATH_SEPARATOR, suffix);
+               snprintf(fullpath, sizeof(fullpath), "%s/bandb", ircd_paths[IRCD_PATH_LIBEXEC]);
 
                if(access(fullpath, X_OK) == -1)
                {
-                       snprintf(fullpath, sizeof(fullpath), "%s%cbin%cbandb%s",
-                                   ConfigFileEntry.dpath, RB_PATH_SEPARATOR, RB_PATH_SEPARATOR, suffix);
+                       snprintf(fullpath, sizeof(fullpath), "%s/bin/bandb", ConfigFileEntry.dpath);
 
                        if(access(fullpath, X_OK) == -1)
                        {
                                ilog(L_MAIN,
-                                    "Unable to execute bandb%s in %s or %s/bin",
-                                    suffix, ircd_paths[IRCD_PATH_LIBEXEC], ConfigFileEntry.dpath);
+                                    "Unable to execute bandb in %s or %s/bin",
+                                    ircd_paths[IRCD_PATH_LIBEXEC], ConfigFileEntry.dpath);
                                return 0;
                        }
                }