Explorar o código

Removed "sechub" feature

svn: 84
Bryan Drewery %!s(int64=23) %!d(string=hai) anos
pai
achega
e1abed7261
Modificáronse 11 ficheiros con 11 adicións e 59 borrados
  1. 1 11
      src/cmds.c
  2. 1 10
      src/dcc.c
  3. 2 2
      src/flags.c
  4. 2 3
      src/flags.h
  5. 0 11
      src/misc.c
  6. 1 1
      src/mod/ctcp.mod/ctcp.c
  7. 1 1
      src/mod/module.h
  8. 1 5
      src/mod/server.mod/server.c
  9. 1 1
      src/modules.c
  10. 0 1
      src/proto.h
  11. 1 13
      src/tclmisc.c

+ 1 - 11
src/cmds.c

@@ -1900,8 +1900,6 @@ int check_dcc_attrs(struct userrec *u, int oatr)
        if (!(u->flags & USER_HUBA))        
          stat &= ~STAT_CHAT;
 #endif
-       if (issechub() && !(u->flags & USER_HUBA))
-         stat &= ~STAT_CHAT;
        if (ischanhub() && !(u->flags & USER_CHUBA))
          stat &= ~STAT_CHAT;
       }
@@ -1922,13 +1920,7 @@ Context;
       }     
 #endif
 #ifdef LEAF
-      if (issechub() && !(u->flags & (USER_HUBA))) {
-        /* no hub access, drop them. */
-Context;
-        dprintf(i, "-+- POOF! -+-\n");
-        dprintf(i, "You no longer have hub/sechub access.\n\n");
-        do_boot(i, botnetnick, "No hub/sechub access.\n\n");
-      } else if (ischanhub() && !(u->flags & (USER_CHUBA))) {
+      if (ischanhub() && !(u->flags & (USER_CHUBA))) {
 Context;
         /* no chanhub access, drop them. */
         dprintf(i, "-+- POOF! -+-\n");
@@ -2696,8 +2688,6 @@ static void cmd_su(struct userrec *u, int idx, char *par)
       ok = 0;
 #endif
 #ifdef LEAF
-    if (issechub() && !glob_huba(fr))
-      ok = 0;
     if (ischanhub() && !glob_chuba(fr))
       ok = 0;
 #endif

+ 1 - 10
src/dcc.c

@@ -1496,11 +1496,7 @@ static void dcc_telnet_id(int idx, char *buf, int atr)
   /* if I am a chanhub and they dont have +c then drop */
    if (ischanhub() && !glob_chuba(fr))
     ok = 0;
-  /* if I am a sechub and they dont have hub access then drop */
-   if (issechub() && !glob_huba(fr))
-    ok = 0;
-  /* if i am not a sechub and not a chanhub, DROP! */
-   if (!ischanhub() && !issechub())
+   if (!ischanhub())
     ok = 0;
 #endif
   if (!ok && glob_bot(fr))
@@ -1564,8 +1560,6 @@ static void dcc_telnet_pass(int idx, int atr)
    ok2 = 0;
 #endif
 #ifdef LEAF
-  if (issechub() && !glob_huba(fr))
-   ok2 = 0;
   if (ischanhub() && !glob_chuba(fr))
    ok2 = 0;
 #endif
@@ -2004,9 +1998,6 @@ void dcc_telnet_got_ident(int i, char *host)
   /* if I am a chanhub and they dont have +c then drop */
     if (ok && (ischanhub() && !(u->flags & USER_CHUBA)))
       ok = 0;
-  /* if I am a sechub and they dont have hub access then drop */
-    if (ok && (issechub() && !(u->flags & USER_HUBA)))
-      ok = 0;
 #endif
 /*    else if (!(u->flags & USER_PARTY))
       ok = 0; */

+ 2 - 2
src/flags.c

@@ -205,8 +205,8 @@ int sanity_check(int atr)
     atr &= ~(USER_PARTY | USER_MASTER | USER_OWNER | USER_ADMIN | USER_HUBA | USER_CHUBA);
 // only bots should be there:
   if (!(atr & USER_BOT) &&
-      (atr & (USER_DOLIMIT | USER_DOVOICE | USER_UPDATEHUB | USER_CHANHUB | USER_SECHUB)))
-    atr &= ~(USER_DOLIMIT | USER_DOVOICE | USER_UPDATEHUB | USER_CHANHUB | USER_SECHUB);
+      (atr & (USER_DOLIMIT | USER_DOVOICE | USER_UPDATEHUB | USER_CHANHUB)))
+    atr &= ~(USER_DOLIMIT | USER_DOVOICE | USER_UPDATEHUB | USER_CHANHUB);
   if ((atr & USER_OP) && (atr & USER_DEOP))
     atr &= ~(USER_OP | USER_DEOP);
   if ((atr & USER_VOICE) && (atr & USER_QUIET))

+ 2 - 3
src/flags.h

@@ -66,7 +66,7 @@ struct flag_record {
 #define USER_FRIEND        0x00000020 /* f  user is global friend             */
 #define USER_G             0x00000040 /* g  unused                            */
 #define USER_H             0x00000080 /* h  unused                            */
-#define USER_HUBA          0x00000100 /* i  access to HUBS/SECHUBS(+s)        */
+#define USER_HUBA          0x00000100 /* i  access to HUBS        */
 #define USER_CHUBA         0x00000200 /* j  access to CHANHUBS(+c)            */
 #define USER_KICK          0x00000400 /* k  user is global auto-kick          */
 #define USER_DOLIMIT       0x00000800 /* l  bot sets limit on channel(s)        */
@@ -76,7 +76,7 @@ struct flag_record {
 #define USER_PARTY         0x00008000 /* p  user can CHAT on partyline:*needs (+i or +j)    */
 #define USER_QUIET         0x00010000 /* q  user is global de-voice           */
 #define USER_R  	   0x00020000 /* r  unused    */
-#define USER_SECHUB        0x00040000 /* s  bot is a sechub                 */
+#define USER_S             0x00040000 /* s  unused             */
 #define USER_T             0x00080000 /* t  unused             */
 #define USER_UPDATEHUB     0x00100000 /* u  bot is the updatehub         */
 #define USER_VOICE         0x00200000 /* v  user is +v on all channels        */
@@ -172,7 +172,6 @@ struct flag_record {
 #define glob_noflood(x)			((x).global & USER_NOFLOOD)
 #define chan_noflood(x)			((x).chan & USER_NOFLOOD)
 #define glob_chanhub(x)			((x).global & USER_CHANHUB)
-#define glob_sechub(x)			((x).global & USER_SECHUB)
 
 //#define bot_global(x)		((x).bot & BOT_GLOBAL)
 #define bot_global(x)		(1)

+ 0 - 11
src/misc.c

@@ -1448,17 +1448,6 @@ int ischanhub()
     return 0;
 }
 
-int issechub()
-{
-
-  struct userrec *buser;
-  buser = get_user_by_handle(userlist, botnetnick);
-  if ((buser) && (buser->flags & USER_SECHUB))
-    return 1;
-  else
-    return 0;
- 
-}
 #ifdef S_DCCPASS
 int check_cmd_pass(char *cmd, char *pass) 
 {

+ 1 - 1
src/mod/ctcp.mod/ctcp.c

@@ -678,7 +678,7 @@ static int ctcp_CHAT(char *nick, char *uhost, char *handle, char *object, char *
   struct userrec *u = get_user_by_handle(userlist, handle);
   int i, ix = (-1);
 
-  if (!ischanhub() && !issechub())
+  if (!ischanhub())
     return 0;
 
     if (u_pass_match(u, "-")) {

+ 1 - 1
src/mod/module.h

@@ -457,7 +457,7 @@
 /* 277 - 280 */
 #define ischanhub ((int (*)(void))global[277])
 #define rand_dccresp ((char *(*)(void))global[278])
-#define issechub ((int (*)(void))global[279])
+/* 279 unused*
 #ifdef LEAF
 #define listen_all ((int (*)(int, int))global[280])
 #endif

+ 1 - 5
src/mod/server.mod/server.c

@@ -1562,7 +1562,7 @@ static int ctcp_DCC_CHAT(char *nick, char *from, char *handle,
   int i, ok;
   struct userrec *u = get_user_by_handle(userlist, handle);
   struct flag_record fr = {FR_GLOBAL | FR_CHAN | FR_ANYWH, 0, 0, 0, 0, 0};
-  if (!ischanhub() && !issechub())
+  if (!ischanhub())
     return 0;
   strcpy(msg, text);
   action = newsplit(&msg);
@@ -1573,8 +1573,6 @@ static int ctcp_DCC_CHAT(char *nick, char *from, char *handle,
     return 0;
   get_user_flagrec(u, &fr, 0);
   ok = 1;
-  if (issechub() && !glob_huba(fr))
-   ok = 0;
   if (ischanhub() && !glob_chuba(fr))
    ok = 0;
   if (dcc_total == max_dcc) {
@@ -1650,8 +1648,6 @@ static void dcc_chat_hostresolved(int i)
     dcc[i].status = STAT_ECHO;
     get_user_flagrec(dcc[i].user, &fr, 0);
     ok = 1;
-    if (issechub() && !glob_huba(fr))
-     ok = 0;
     if (ischanhub() && !glob_chuba(fr))
      ok = 0;
     if (ok)

+ 1 - 1
src/modules.c

@@ -503,7 +503,7 @@ Function global_table[] =
   /* 277 - 280 */
   (Function) ischanhub,        
   (Function) rand_dccresp,
-  (Function) issechub,
+  (Function) 0,
 #ifdef LEAF
   (Function) listen_all,
 #else

+ 0 - 1
src/proto.h

@@ -246,7 +246,6 @@ int egg_strcatn(char *dst, const char *src, size_t max);
 int my_strcpy(char *, char *);
 void putlog EGG_VARARGS(int, arg1);
 int ischanhub();
-int issechub();
 void flushlogs();
 void check_logsize();
 void maskhost(const char *, char *);

+ 1 - 13
src/tclmisc.c

@@ -260,18 +260,7 @@ static int tcl_ischanhub STDVAR
     Tcl_AppendResult(irp, "0", NULL);
   return TCL_OK;
 }
-static int tcl_issechub STDVAR
-{
-#ifdef HUB
-  Tcl_AppendResult(irp, "0", NULL);
-  return TCL_OK;
-#endif
-  if (issechub()) 
-    Tcl_AppendResult(irp, "1", NULL);
-  else 
-    Tcl_AppendResult(irp, "0", NULL);
-  return TCL_OK;
-}
+
 static int tcl_utimer STDVAR
 {
   unsigned long x;
@@ -615,7 +604,6 @@ tcl_cmds tclmisc_cmds[] =
   {"backup",		tcl_backup},
 #endif
   {"ischanhub",		tcl_ischanhub},
-  {"issechub",		tcl_issechub},
   {"timesync",		tcl_timesync},
   {"exit",		tcl_die},
   {"die",		tcl_die},