]> jfr.im git - solanum.git/blobdiff - ircd/bandbi.c
authd/provider: do not accept clients until all providers have had a chance to run
[solanum.git] / ircd / bandbi.c
index 1e713220887ed64248f93376432c0f1a9ebe55a3..15171b646f71802c9bc99d5207dcc25c317e7677 100644 (file)
  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
- *
- * $Id$
  */
 #include "stdinc.h"
-#include "ratbox_lib.h"
+#include "rb_lib.h"
 #include "client.h"
 #include "s_conf.h"
 #include "logger.h"
@@ -82,21 +80,21 @@ start_bandb(void)
        const char *suffix = "";
 #endif
 
-       rb_setenv("BANDB_DBPATH", PKGLOCALSTATEDIR "/ban.db", 1);
+       rb_setenv("BANDB_DBPATH", ircd_paths[IRCD_PATH_BANDB], 1);
        if(bandb_path == NULL)
        {
-               rb_snprintf(fullpath, sizeof(fullpath), "%s/bandb%s", PKGLIBEXECDIR, suffix);
+               snprintf(fullpath, sizeof(fullpath), "%s%cbandb%s", ircd_paths[IRCD_PATH_LIBEXEC], RB_PATH_SEPARATOR, suffix);
 
                if(access(fullpath, X_OK) == -1)
                {
-                       rb_snprintf(fullpath, sizeof(fullpath), "%s/bin/bandb%s",
-                                   ConfigFileEntry.dpath, suffix);
+                       snprintf(fullpath, sizeof(fullpath), "%s%cbin%cbandb%s",
+                                   ConfigFileEntry.dpath, RB_PATH_SEPARATOR, RB_PATH_SEPARATOR, suffix);
 
                        if(access(fullpath, X_OK) == -1)
                        {
                                ilog(L_MAIN,
                                     "Unable to execute bandb%s in %s or %s/bin",
-                                    suffix, PKGLIBEXECDIR, ConfigFileEntry.dpath);
+                                    suffix, ircd_paths[IRCD_PATH_LIBEXEC], ConfigFileEntry.dpath);
                                return 0;
                        }
                }
@@ -127,7 +125,7 @@ bandb_add(bandb_type type, struct Client *source_p, const char *mask1,
 
        static char buf[BUFSIZE];
 
-       rb_snprintf(buf, sizeof(buf), "%c %s ", bandb_add_letter[type], mask1);
+       snprintf(buf, sizeof(buf), "%c %s ", bandb_add_letter[type], mask1);
 
        if(!EmptyString(mask2))
                rb_snprintf_append(buf, sizeof(buf), "%s ", mask2);