]> jfr.im git - solanum.git/blobdiff - src/bandbi.c
server: As per the TS6 spec, require QS and ENCAP capabilities.
[solanum.git] / src / bandbi.c
index 4de44225306518a1c57e9b24f649b0d093867c9d..e861b98ecfc5ea1eba7d70aa0e02da9ca58e7b9d 100644 (file)
@@ -46,6 +46,7 @@
 #include "send.h"
 #include "ircd.h"
 #include "msg.h"       /* XXX: MAXPARA */
+#include "operhash.h"
 
 static char bandb_add_letter[LAST_BANDB_TYPE] = {
        'K', 'D', 'X', 'R'
@@ -81,10 +82,10 @@ start_bandb(void)
        const char *suffix = "";
 #endif
 
-       rb_setenv("BANDB_DPATH", ConfigFileEntry.dpath, 1);
+       rb_setenv("BANDB_DBPATH", PKGLOCALSTATEDIR "/ban.db", 1);
        if(bandb_path == NULL)
        {
-               rb_snprintf(fullpath, sizeof(fullpath), "%s/bandb%s", BINPATH, suffix);
+               rb_snprintf(fullpath, sizeof(fullpath), "%s/bandb%s", PKGLIBEXECDIR, suffix);
 
                if(access(fullpath, X_OK) == -1)
                {
@@ -94,8 +95,8 @@ start_bandb(void)
                        if(access(fullpath, X_OK) == -1)
                        {
                                ilog(L_MAIN,
-                                    "Unable to execute bandb in %s or %s/bin",
-                                    BINPATH, ConfigFileEntry.dpath);
+                                    "Unable to execute bandb%s in %s or %s/bin",
+                                    suffix, PKGLIBEXECDIR, ConfigFileEntry.dpath);
                                return 0;
                        }
                }
@@ -170,8 +171,7 @@ bandb_handle_ban(char *parv[], int parc)
                aconf->user = rb_strdup(parv[para++]);
 
        aconf->host = rb_strdup(parv[para++]);
-       /* We do not have the 'oper' field yet. */
-       para++;
+       aconf->info.oper = operhash_add(parv[para++]);
 
        switch (parv[0][0])
        {