]> jfr.im git - solanum.git/blobdiff - bandb/bandb.c
refuse opers setting an invalidly long k-line reason
[solanum.git] / bandb / bandb.c
index 2a0f1a048e6c59f801982bd7e6fa6517ea8fa0a2..85487447ab562c9f15977bf7458daa2775718a28 100644 (file)
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include "setup.h"
-#include <ratbox_lib.h>
+#include <rb_lib.h>
 #include <stdio.h>
 #include "rsdb.h"
-#include "common.h"
+#include "ircd_defs.h"
 
 
 #define MAXPARA 10
@@ -236,6 +236,9 @@ parse_request(rb_helper *helper)
 }
 
 
+static void
+error_cb(rb_helper *helper) __attribute__((noreturn));
+
 static void
 error_cb(rb_helper *helper)
 {
@@ -244,18 +247,15 @@ error_cb(rb_helper *helper)
        exit(1);
 }
 
-#ifndef WINDOWS
 static void
 dummy_handler(int sig)
 {
        return;
 }
-#endif
 
 static void
 setup_signals(void)
 {
-#ifndef WINDOWS
        struct sigaction act;
 
        act.sa_flags = 0;
@@ -278,17 +278,19 @@ setup_signals(void)
 
        act.sa_handler = dummy_handler;
        sigaction(SIGALRM, &act, 0);
-#endif
 }
 
 
+static void
+db_error_cb(const char *errstr) __attribute__((noreturn));
+
 static void
 db_error_cb(const char *errstr)
 {
        char buf[256];
        snprintf(buf, sizeof(buf), "! :%s", errstr);
        rb_helper_write(bandb_helper, "%s", buf);
-       rb_sleep(2 << 30, 0);
+       rb_sleep(1 << 30, 0);
        exit(1);
 }
 
@@ -300,9 +302,9 @@ main(int argc, char *argv[])
        if(bandb_helper == NULL)
        {
                fprintf(stderr,
-                       "This is the charybdis bandb for internal ircd use.\n");
+                       "This is the solanum bandb for internal ircd use.\n");
                fprintf(stderr,
-                       "You aren't supposed to run me directly (did you want bantool?). Exiting.\n");
+                       "You aren't supposed to run me directly (did you want solanum-bantool?). Exiting.\n");
                exit(1);
        }
        rsdb_init(db_error_cb);