]> jfr.im git - irc/thales.git/blobdiff - src/main.c
added support for NOQUIT
[irc/thales.git] / src / main.c
index 9740bf20cd85197a3dd0ebe5056084e2dc5d06f1..9d7caa807ea41771bb2639558d6fffc497da5bf3 100644 (file)
@@ -1,4 +1,4 @@
-/*  Thales - IRC to Relational Database Gateway
+/*  GNU Thales - IRC to Relational Database Gateway
  *  Copyright (C) 2002 Lucas Nussbaum <lucas@lucas-nussbaum.net>
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -15,7 +15,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-/* Thales - main file */
+/* GNU Thales - main file */
 
 #include "thales.h"
 #include "conf.h"
@@ -74,7 +74,7 @@ void write_pidfile(void)
        }
        else
        {
-               log_perror("Warning: cannot write to PID file %s", PIDFilename);
+               mylog_perror("Warning: cannot write to PID file %s", PIDFilename);
        }
 }
 
@@ -99,7 +99,7 @@ int main(int argc, char **argv)
                        verbose = 1;
                        break;
                case 'V':
-                       printf("Thales v.%s\n", VERSION);
+                       printf("GNU Thales v.%s\n", VERSION);
                        exit(0);
                        break;
                default:
@@ -141,13 +141,11 @@ int main(int argc, char **argv)
        write_pidfile();
 
        /* Announce ourselves to the logfile. */
-       log("Thales %s starting up with %s support%s", VERSION,
+       mylog("GNU Thales %s starting up with %s support%s", VERSION,
 #if defined(IRCD_UNREAL)
                 "unreal",
 #elif defined(IRCD_HYBRID)
                 "hybrid",
-#elif defined(IRCD_SEQUANA)
-                "sequana",
 #elif defined (IRCD_BAHAMUT)
                 "bahamut",
 #elif defined (IRCD_IRCDRU)
@@ -180,16 +178,14 @@ int main(int argc, char **argv)
        }
 #if defined(IRCD_UNREAL)
        send_cmd(NULL, "PROTOCTL NICKv2 SJOIN SJOIN2 SJ3");
+       send_cmd(NULL, "CAPAB NOQUIT");
 #endif
-#if defined(IRCD_SEQUANA)
-       send_cmd(NULL, "PASS %s :TS", RemotePassword);
-       send_cmd(NULL, "CAPAB NICKIP SSJOIN TS3");
-#elif defined(IRCD_HYBRID)
+#if defined(IRCD_HYBRID)
        send_cmd(NULL, "PASS %s :TS", RemotePassword);
        send_cmd(NULL, "CAPAB :HOPS TBURST");
 #elif defined (IRCD_BAHAMUT)
        send_cmd(NULL, "PASS %s :TS", RemotePassword);
-       send_cmd(NULL, "CAPAB TS3 SSJOIN NICKIP");
+       send_cmd(NULL, "CAPAB TS3 SSJOIN NICKIP NOQUIT");
 #elif defined (IRCD_IRCDRU)
        send_cmd(NULL, "PASS %s :TS", RemotePassword);
        send_cmd(NULL, "CAPAB TS3 SSJOIN 8BNCI NICKIP");
@@ -209,10 +205,13 @@ int main(int argc, char **argv)
        send_cmd(NULL, "SERVER %s 1 :%s", ServerName, ServerDesc);
 #endif
 
-#if defined(IRCD_SEQUANA)||defined(IRCD_BAHAMUT)||defined(IRCD_IRCDRU)
+#if defined(IRCD_BAHAMUT)||defined(IRCD_IRCDRU)
        send_cmd(NULL, "SVINFO 3 1 0 :%ld", time(NULL));
 #elif defined(IRCD_ULTIMATE)
        send_cmd(NULL, "SVINFO 5 3 0 :%ld", time(NULL));
+#endif
+#if defined(IRCD_UNREAL)
+   send_cmd(NULL, ":%s EOS", ServerName);
 #endif
        sgets2(inbuf, sizeof(inbuf), servsock);
        if (strnicmp(inbuf, "ERROR", 5) == 0)