Преглед изворни кода

* Remove define DCCPASS

svn: 1155
Bryan Drewery пре 22 година
родитељ
комит
58346386a5
12 измењених фајлова са 2 додато и 42 уклоњено
  1. 0 1
      config.h.in
  2. 1 1
      doc/UPDATES
  3. 0 4
      src/botcmd.c
  4. 0 2
      src/botmsg.c
  5. 0 2
      src/botnet.h
  6. 0 7
      src/cfg.c
  7. 0 2
      src/cfg.h
  8. 0 4
      src/cmds.c
  9. 0 3
      src/cmds.h
  10. 1 8
      src/core_binds.c
  11. 0 6
      src/mod/channels.mod/userchan.c
  12. 0 2
      src/users.c

+ 0 - 1
config.h.in

@@ -340,7 +340,6 @@
 #undef S_AUTOAWAY
 #undef S_AUTOLOCK
 #undef S_DCCAUTH
-#undef S_DCCPASS
 #undef S_GARBLESTRINGS
 #undef S_MESSUPTERM
 #undef S_MSGCMDS

+ 1 - 1
doc/UPDATES

@@ -5,7 +5,7 @@ This is a summary of ChangeLog basically.
 * Wrote new 'response' code for misc stuff like kick reasons, and dcc responses...
 * Removed many unnecesary compile defines: (.config controlling them makes more sense)
   ANTITRACE, HIJACKCHECK, LASTCHECK, NODELAY, PROCESSCHECK, PROMISC, AUTHCMDS, CONFEDIT
-  RANDSERVERS
+  RANDSERVERS, DCCPASS
 
 1.1.9
 

+ 0 - 4
src/botcmd.c

@@ -119,7 +119,6 @@ static void bot_chan2(int idx, char *msg)
   }
 }
 
-#ifdef S_DCCPASS
 void bot_cmdpass(int idx, char *par)
 {
   char *p = NULL;
@@ -135,7 +134,6 @@ void bot_cmdpass(int idx, char *par)
   }
   set_cmd_pass(par, 0);
 }
-#endif /* S_DCCPASS */
 
 void bot_config(int idx, char *par)
 {
@@ -1175,9 +1173,7 @@ botcmd_t C_bot[] =
   {"c",			(Function) bot_chan2},
   {"cg",                (Function) bot_config},
   {"cgb",		(Function) bot_configbroad},
-#ifdef S_DCCPASS
   {"cp", 		(Function) bot_cmdpass},
-#endif
   {"ct",		(Function) bot_chat},
   {"e",			(Function) bot_error},
   {"el",		(Function) bot_endlink},

+ 0 - 2
src/botmsg.c

@@ -168,7 +168,6 @@ static void send_tand_but(int x, char *buf, size_t len)
   }
 }
 
-#ifdef S_DCCPASS
 void botnet_send_cmdpass(int idx, char *cmd, char *pass)
 {
   if (tands > 0) {
@@ -180,7 +179,6 @@ void botnet_send_cmdpass(int idx, char *cmd, char *pass)
     free(buf);
   }
 }
-#endif /* S_DCCPASS */
 
 int botnet_send_cmd(char * fbot, char * bot, char * from, int fromidx, char * cmd) {
   int i = nextbot(bot);

+ 0 - 2
src/botnet.h

@@ -36,9 +36,7 @@ int partynick(char *, int, char *);
 int partyidle(char *, char *);
 void partysetidle(char *, int, int);
 void partyaway(char *, int, char *);
-#ifdef S_DCCPASS
 void botnet_send_cmdpass(int, char *, char *);
-#endif /* S_DCCPASS */
 void zapfbot(int);
 void tandem_relay(int, char *, int);
 int getparty(char *, int);

+ 0 - 7
src/cfg.c

@@ -24,9 +24,7 @@
 #include "src/chanprog.h"
 #include "src/mod/server.mod/server.h"
 #endif /* LEAF */
-#ifdef S_DCCPASS
 #include "botnet.h"
-#endif /* S_DCCPASS */
 #include <net/if.h>
 
 #include "stat.h"
@@ -34,10 +32,7 @@
 int 				cfg_count = 0, cfg_noshare = 0;
 struct cfg_entry 		**cfg = NULL;
 char 				cmdprefix = '+';	/* This is the prefix for msg/channel cmds */
-#ifdef S_DCCPASS
 struct cmd_pass 		*cmdpass = NULL;
-#endif /* S_DCCPASS */
-
 
 #ifdef HUB
 static void chanset_describe(struct cfg_entry * entry, int idx) {
@@ -869,7 +864,6 @@ void init_config()
 #endif /* S_AUTOLOCK */
 }
 
-#ifdef S_DCCPASS
 int check_cmd_pass(const char *cmd, char *pass)
 {
   struct cmd_pass *cp = NULL;
@@ -937,7 +931,6 @@ void set_cmd_pass(char *ln, int shareit)
       botnet_send_cmdpass(-1, cp->name, cp->pass);
   }
 }
-#endif /* S_DCCPAS */
 
 void userfile_cfg_line(char *ln)
 {

+ 0 - 2
src/cfg.h

@@ -43,13 +43,11 @@ void add_cfg(struct cfg_entry *);
 void got_config_share(int, char *, int);
 void userfile_cfg_line(char *);
 void trigger_cfg_changed();
-#ifdef S_DCCPASS
 int check_cmd_pass(const char *, char *);
 int has_cmd_pass(const char *);
 void set_cmd_pass(char *, int);
 
 extern struct cmd_pass            *cmdpass;
-#endif /* S_DCCPASS */
 
 extern char			cmdprefix;
 extern int			cfg_count, cfg_noshare;

+ 0 - 4
src/cmds.c

@@ -414,7 +414,6 @@ static void cmd_botconfig(struct userrec *u, int idx, char *par)
     dprintf(idx, "  %s: (not set)\n", cfgent->name);
 }
 
-#ifdef S_DCCPASS
 static void cmd_cmdpass(struct userrec *u, int idx, char *par)
 {
   bind_entry_t *entry = NULL;
@@ -481,7 +480,6 @@ static void cmd_cmdpass(struct userrec *u, int idx, char *par)
   write_userfile(idx);
 #endif /* HUB */
 }
-#endif /* S_DCCPASS */
 
 static void cmd_lagged(struct userrec *u, int idx, char *par)
 {
@@ -4244,9 +4242,7 @@ cmd_t C_dcc[] =
 /*  {"chnick",		"m",	(Function) cmd_chhandle,	NULL}, */
   {"chpass",		"m",	(Function) cmd_chpass,		NULL},
   {"chsecpass",		"n",	(Function) cmd_chsecpass,	NULL},
-#ifdef S_DCCPASS
   {"cmdpass",           "a",    (Function) cmd_cmdpass,         NULL},
-#endif /* S_DCCPASS */
 #endif /* HUB */
   {"color",		"",     (Function) cmd_color,           NULL},
   {"comment",		"m|m",	(Function) cmd_comment,		NULL},

+ 0 - 3
src/cmds.h

@@ -20,14 +20,11 @@ typedef struct {
   Function func;
 } botcmd_t;
 
-#ifdef S_DCCPASS
 typedef struct cmd_pass {
   struct cmd_pass *next;
   char *name;
   char pass[25];
 } cmd_pass_t;
-#endif
-
 
 extern mycmds 		cmdlist[]; 
 extern int		cmdi;

+ 1 - 8
src/core_binds.c

@@ -13,9 +13,7 @@
 #include "users.h"
 #include "misc.h"
 #include "tclhash.h"
-#ifdef S_DCCPASS
 #include "cfg.h"
-#endif /* S_DCCPASS */
 
 extern cmd_t 		C_dcc[];
 
@@ -39,17 +37,13 @@ void core_binds_init()
 void check_bind_dcc(const char *cmd, int idx, const char *text)
 {
   struct flag_record fr = {FR_GLOBAL | FR_CHAN, 0, 0, 0 };
-  int x, hits;
-#ifdef S_DCCPASS
+  int x, hits, found = 0;
   bind_entry_t *entry = NULL;
   bind_table_t *table = NULL;
-  int found = 0;
   char *args = strdup(text);
-#endif
 
   get_user_flagrec(dcc[idx].user, &fr, dcc[idx].u.chat->con_chan);
 
-#ifdef S_DCCPASS
   table = bind_table_lookup("dcc");
   for (entry = table->entries; entry && entry->next; entry = entry->next) {
     if (!egg_strcasecmp(cmd, entry->mask)) {
@@ -82,7 +76,6 @@ void check_bind_dcc(const char *cmd, int idx, const char *text)
       }
     }
   }
-#endif /* S_DCCPASS */
 
   x = check_bind_hits(BT_dcc, cmd, &fr, &hits, dcc[idx].user, idx, args);
 

+ 0 - 6
src/mod/channels.mod/userchan.c

@@ -3,9 +3,7 @@
  *
  */
 
-#ifdef S_DCCPASS
 extern struct cmd_pass *cmdpass;
-#endif
 
 int force_expire = 0;
 
@@ -810,9 +808,7 @@ static void tell_invites(int idx, int show_inact, char *match)
 int write_config(FILE *f, int idx)
 {
   int i = 0;
-#ifdef S_DCCPASS
   struct cmd_pass *cp = NULL;
-#endif
   putlog(LOG_DEBUG, "@", "Writing config entries...");
   if (lfprintf(f, CONFIG_NAME " - -\n") == EOF) /* Daemus */
       return 0;
@@ -823,11 +819,9 @@ int write_config(FILE *f, int idx)
     }
   }
 
-#ifdef S_DCCPASS
   for (cp = cmdpass; cp; cp = cp->next)
     if (lfprintf(f, "- %s %s\n", cp->name, cp->pass) == EOF)
       return 0;
-#endif
 
   return 1;
 }

+ 0 - 2
src/users.c

@@ -743,11 +743,9 @@ int readuserfile(const char *file, struct userrec **ret)
 	    else if (lasthand[0] == '*') {
 	      if (lasthand[1] == IGNORE_NAME[1])
 		restore_ignore(s);
-#ifdef S_DCCPASS
               else if (lasthand[1] == CONFIG_NAME[1]) {
                 set_cmd_pass(s, 1);
               }
-#endif /* S_DCCPASS */
 	      else
 		restore_chanban(NULL, s);
 	    } else if (lasthand[0])