Author: Isomer <perry@coders.net>
authorBleep <twhelvey1@home.com>
Thu, 25 Nov 1999 02:07:53 +0000 (02:07 +0000)
committerBleep <twhelvey1@home.com>
Thu, 25 Nov 1999 02:07:53 +0000 (02:07 +0000)
Log message:
Remove STAT_MASTER and BOOT_OPER functionality.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@6 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
include/ircd.h
include/s_debug.h
include/s_serv.h
ircd/ircd.c
ircd/s_bsd.c
ircd/s_user.c

index d295e4bf3d7f972d636cec2a3d1f25d303faeb8f..c4782e384325539e41df0d73680995b24d8db7d4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,11 +1,14 @@
 #
 # ChangeLog for Undernet ircu Servers
 #
-# $Id: ChangeLog,v 1.1.1.1 1999-11-16 05:13:14 codercom Exp $
+# $Id: ChangeLog,v 1.2 1999-11-25 02:07:53 bleep Exp $
 #
 # Please insert new entries on the top of the list, a one or two line comment
 # is sufficient. Please include your name on the entries we know who to blame.
 # Please keep lines < 80 chars.
 #-------------------------------------------------------------------------------
+* ircd.h, s_serv.h, s_debug.h, ircd.c, s_user.c, s_bsd.c:
+  removed STAT_MASTER/BOOT_OPER code, original patch by Isomer --Bleep
+* s_user.c (m_nick): removed redundant check for acptr --Bleep
 * ChangeLog (file): added ChangeLog, and BUGS files, import to ircu2.10 --Bleep
 
index e62ea9dd87bf5499291e9799bbadbaaca8ff3047..f9340434fa52672e4564936bf6fdedc8a0e59396 100644 (file)
@@ -22,8 +22,7 @@
 #define BOOT_DEBUG     4
 #define BOOT_INETD     8
 #define BOOT_TTY       16
-#define BOOT_OPER      32
-#define BOOT_AUTODIE   64
+#define BOOT_AUTODIE   32
 
 /*=============================================================================
  * Proto types
index 80872a119d54d185dc2327ebf6d8c77f8d62317e..8f93fca6fe184fac249966d3dde9996dd6575183 100644 (file)
@@ -100,7 +100,6 @@ extern char serveropts[];
 /* Logging mask, selection on type of connection */
 #define LOG_PING       (0x8000 >> (8 + STAT_PING))
 #define LOG_LOG                (0x8000 >> (8 + STAT_LOG))
-#define LOG_MASTER     (0x8000 >> (8 + STAT_MASTER))
 #define LOG_CONNECTING (0x8000 >> (8 + STAT_CONNECTING))
 #define LOG_HANDSHAKE  (0x8000 >> (8 + STAT_HANDSHAKE))
 #define LOG_ME         (0x8000 >> (8 + STAT_ME))
@@ -113,7 +112,7 @@ extern char serveropts[];
  * Default is to log messages coming from any connection.
  */
 #define LOG_MASK_TYPE \
-    ( LOG_PING | LOG_LOG | LOG_MASTER | LOG_CONNECTING | \
+    ( LOG_PING | LOG_LOG | LOG_CONNECTING | \
       LOG_HANDSHAKE | LOG_ME | LOG_UNKNOWN | LOG_SERVER | LOG_CLIENT )
 
 /*=============================================================================
index 4c7fdd1687232d7fdb6d6fc93dd1a412ef48cfee..8d407975bdcdf79111fa78130cc1d2c3f15bb872 100644 (file)
 
 #define STAT_PING              0
 #define STAT_LOG               1       /* logfile for -x */
-#define STAT_MASTER            2       /* Local ircd master before identification */
-#define STAT_CONNECTING                3
-#define STAT_HANDSHAKE         4
-#define STAT_ME                        5
-#define STAT_UNKNOWN           6
-#define STAT_UNKNOWN_USER      7       /* Connect to client port */
-#define STAT_UNKNOWN_SERVER    8       /* Connect to server port */
-#define STAT_SERVER            9
-#define STAT_USER              10
+#define STAT_CONNECTING                2
+#define STAT_HANDSHAKE         3
+#define STAT_ME                        4
+#define STAT_UNKNOWN           5
+#define STAT_UNKNOWN_USER      6       /* Connect to client port */
+#define STAT_UNKNOWN_SERVER    7       /* Connect to server port */
+#define STAT_SERVER            8
+#define STAT_USER              9
 
 /* 
  * for when you wanna create a bitmask of status values
 #define IsUnknown(x)           (IsStatMask(x, \
                                        StatusMask(STAT_UNKNOWN)|\
                                        StatusMask(STAT_UNKNOWN_USER)|\
-                                       StatusMask(STAT_UNKNOWN_SERVER)|\
-                                       StatusMask(STAT_MASTER)))
+                                       StatusMask(STAT_UNKNOWN_SERVER)))
 #define IsServerPort(x)                ((x)->status == STAT_UNKNOWN_SERVER )
 #define IsUserPort(x)          ((x)->status == STAT_UNKNOWN_USER )
-#define IsMaster(x)            ((x)->status == STAT_MASTER)
 #define IsClient(x)            (IsStatMask(x, \
-                                       StatusMask(STAT_MASTER)|\
                                        StatusMask(STAT_HANDSHAKE)|\
                                        StatusMask(STAT_ME)|\
                                        StatusMask(STAT_UNKNOWN)|\
@@ -74,7 +70,6 @@
 #define IsLog(x)               ((x)->status == STAT_LOG)
 #define IsPing(x)              ((x)->status == STAT_PING)
 
-#define SetMaster(x)           ((x)->status = STAT_MASTER)
 #define SetConnecting(x)       ((x)->status = STAT_CONNECTING)
 #define SetHandshake(x)                ((x)->status = STAT_HANDSHAKE)
 #define SetServer(x)           ((x)->status = STAT_SERVER)
index 745a9e5cf739eb68c5040f200f20f18af79a4d27..6d361f28c93d6b2a854fbb6ca4fbac23b7d2cfcb 100644 (file)
@@ -188,7 +188,7 @@ void server_reboot(void)
   close(1);
   if ((bootopt & BOOT_CONSOLE) || isatty(0))
     close(0);
-  if (!(bootopt & (BOOT_INETD | BOOT_OPER)))
+  if (!(bootopt & BOOT_INETD))
     execv(SPATH, myargv);
 #ifdef USE_SYSLOG
   /* Have to reopen since it has been closed above */
@@ -646,11 +646,6 @@ int main(int argc, char *argv[])
          setuid((uid_t) uid);
        dpath = p;
        break;
-      case 'o':                /* Per user local daemon... */
-       if (euid != uid)
-         setuid((uid_t) uid);
-       bootopt |= BOOT_OPER;
-       break;
 #ifdef CMDLINE_CONFIG
       case 'f':
        if (euid != uid)
@@ -886,16 +881,7 @@ int main(int argc, char *argv[])
   hAddClient(&me);
 
   check_class();
-  if ((bootopt & BOOT_OPER))
-  {
-    aClient *tmp = add_connection(&me, 0, ADCON_TTY);
-
-    if (!tmp)
-      exit(1);
-    SetMaster(tmp);
-  }
-  else
-    write_pidfile();
+  write_pidfile();
 
   init_counters();
 
index e1606c2ae655e3f6ee098cb65fad3aefa49e3e6c..0fe5702ef05902a649bcceefe20506aa92bd7ab4 100644 (file)
@@ -575,7 +575,7 @@ void init_sys(void)
     close(2);
 
   if (((bootopt & BOOT_CONSOLE) || isatty(0)) &&
-      !(bootopt & (BOOT_INETD | BOOT_OPER)))
+      !(bootopt & BOOT_INETD))
   {
     if (fork())
       exit(0);
index cbfb5997e88e23352aa3e1db2c3c6e4bb242187d..6cce3293f6a96dbcb783212472c05c9370bedcee 100644 (file)
@@ -387,7 +387,8 @@ static int register_user(aClient *cptr, aClient *sptr,
   Reg1 aConfItem *aconf;
   char *parv[3], *tmpstr, *tmpstr2;
   char c = 0 /* not alphanum */ , d = 'a' /* not a digit */ ;
-  short oldstatus_ismaster = IsMaster(sptr), upper = 0, lower = 0;
+  short upper = 0;
+  short lower = 0;
   short pos = 0, leadcaps = 0, other = 0, digits = 0, badid = 0;
   short digitgroups = 0;
   anUser *user = sptr->user;
@@ -560,10 +561,6 @@ static int register_user(aClient *cptr, aClient *sptr,
          me.name, ERR_INVALIDUSERNAME, cptr->name);
       return exit_client(cptr, sptr, &me, "USER: Bad username");
     }
-
-    if (oldstatus_ismaster && MyConnect(sptr))
-      m_oper(&me, sptr, 1, parv);
-
     Count_unknownbecomesclient(sptr, nrof);
   }
   else
@@ -755,13 +752,13 @@ static int user_modes[] = {
  */
 int m_nick(aClient *cptr, aClient *sptr, int parc, char *parv[])
 {
-  aClient *acptr;
-  aClient *server = NULL;
-  char nick[NICKLEN + 2];
-  char *s;
-  Link *lp;
-  time_t lastnick = (time_t) 0;
-  int differ = 1;
+  aClientacptr;
+  aClientserver = NULL;
+  char     nick[NICKLEN + 2];
+  char*    s;
+  Link*    lp;
+  time_t   lastnick = (time_t) 0;
+  int      differ = 1;
 
   if (parc < 2)
   {
@@ -839,18 +836,13 @@ int m_nick(aClient *cptr, aClient *sptr, int parc, char *parv[])
    * is present in the nicklist (due to the way the below for loop is
    * constructed). -avalon
    */
-  if ((acptr = FindServer(nick)))
+  if ((acptr = FindServer(nick))) {
     if (MyConnect(sptr))
     {
       sendto_one(sptr, err_str(ERR_NICKNAMEINUSE), me.name,
          BadPtr(parv[0]) ? "*" : parv[0], nick);
       return 0;                        /* NICK message ignored */
     }
-  /*
-   * acptr already has result from previous FindServer()
-   */
-  if (acptr)
-  {
     /*
      * We have a nickname trying to use the same name as
      * a server. Send out a nick collision KILL to remove