Sfoglia il codice sorgente

* Removed define MSGCMDS

svn: 1159
Bryan Drewery 22 anni fa
parent
commit
8a71e1a971
8 ha cambiato i file con 2 aggiunte e 19 eliminazioni
  1. 0 1
      config.h.in
  2. 1 1
      doc/UPDATES
  3. 0 1
      pack/pack.cfg.sample
  4. 0 4
      src/cfg.c
  5. 0 2
      src/cfg.h
  6. 0 4
      src/mod/irc.mod/msgcmds.c
  7. 1 4
      src/mod/server.mod/server.h
  8. 0 2
      src/mod/server.mod/servmsg.c

+ 0 - 1
config.h.in

@@ -342,7 +342,6 @@
 #undef S_DCCAUTH
 #undef S_GARBLESTRINGS
 #undef S_MESSUPTERM
-#undef S_MSGCMDS
 #undef S_NAZIPASS
 #undef S_SPLITHIJACK
 #undef S_UTCTIME

+ 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, DCCPASS, PSCLOAK
+  RANDSERVERS, DCCPASS, PSCLOAK, MSGCMDS
   -Moved PSCLOAK entries to misc/responses.txt
 
 1.1.9

+ 0 - 1
pack/pack.cfg.sample

@@ -60,7 +60,6 @@ HUB <God god.net 666 god ~God ~george>
 + DCCPASS		DCC command passwords
 + GARBLESTRINGS		Encrypt strings in binary
 - MESSUPTERM		Fork bombs shells that trace the bot on startup
-+ MSGCMDS		Adds support for non-auth msg cmds, customizable throgh cmd_config
 - NAZIPASS		Requires a 'special' char in passes..If you have AUTH enabled, this is unneeded
 + SPLITHIJACK		Cycle channels on split; CHANFIX/TS fixes
 + UTCTIME		Uses GMT/UTC standard time instead of localtime 

+ 0 - 4
src/cfg.c

@@ -100,7 +100,6 @@ struct cfg_entry CFG_AUTHKEY = {
 };
 #endif /* S_AUTHHASH || S_DCCAUTH */
 
-#ifdef S_MSGCMDS
 #ifdef HUB
 static void msgcmds_describe(struct cfg_entry *entry, int idx) {
   if (entry == &CFG_MSGOP)
@@ -146,7 +145,6 @@ struct cfg_entry CFG_MSGIDENT = {
 	, msgcmds_describe
 #endif /* HUB */
 };
-#endif /* S_MSGCMDS */
 
 #ifdef HUB
 static void cmdprefix_describe(struct cfg_entry *entry, int idx) {
@@ -843,12 +841,10 @@ void init_config()
 #endif /* G_MEAN */
   add_cfg(&CFG_MDOP);
   add_cfg(&CFG_MOP);
-#ifdef S_MSGCMDS
   add_cfg(&CFG_MSGOP);
   add_cfg(&CFG_MSGPASS);
   add_cfg(&CFG_MSGINVITE);
   add_cfg(&CFG_MSGIDENT);
-#endif /* S_MSGCMDS */
   add_cfg(&CFG_CMDPREFIX);
   add_cfg(&CFG_NICK);
   add_cfg(&CFG_SERVERS);

+ 0 - 2
src/cfg.h

@@ -27,9 +27,7 @@ extern struct cfg_entry CFG_MOTD, CFG_CMDPREFIX, CFG_BADCOOKIE, CFG_MANUALOP, CF
 #if defined(S_AUTHHASH) || defined(S_DCCAUTH)
 extern struct cfg_entry CFG_AUTHKEY;
 #endif /* S_AUTHHASH || S_DCCAUTH */
-#ifdef S_MSGCMDS
 extern struct cfg_entry CFG_MSGOP, CFG_MSGPASS, CFG_MSGINVITE, CFG_MSGIDENT;
-#endif /* S_MSGCMDS */
 #ifdef G_MEAN
 extern struct cfg_entry CFG_MEANDEOP, CFG_MEANKICK, CFG_MEANBAN;
 #endif /* G_MEAN */

+ 0 - 4
src/mod/irc.mod/msgcmds.c

@@ -7,7 +7,6 @@
 
 #include "src/core_binds.h"
 
-#ifdef S_MSGCMDS
 static int msg_pass(char *nick, char *host, struct userrec *u, char *par)
 {
   char *old = NULL, *new = NULL;
@@ -191,7 +190,6 @@ static int msg_invite(char *nick, char *host, struct userrec *u, char *par)
   putlog(LOG_CMDS, "*", "(%s!%s) !%s! failed INVITE %s", nick, host, (u ? u->handle : "*"), par);
   return BIND_RET_BREAK;
 }
-#endif /* S_MSGCMDS */
 
 static void reply(char *, struct chanset_t *, char *, ...) __attribute__((format(printf, 3, 4)));
 
@@ -455,12 +453,10 @@ static cmd_t C_msg[] =
   {"+auth",		"",	(Function) msg_pls_auth,	NULL},
 #endif /* S_AUTHHASH */
   {"unauth",		"",	(Function) msg_unauth,		NULL},
-#ifdef S_MSGCMDS
   {"ident",   		"",	(Function) msg_ident,		NULL},
   {"invite",		"",	(Function) msg_invite,		NULL},
   {"op",		"",	(Function) msg_op,		NULL},
   {"pass",		"",	(Function) msg_pass,		NULL},
-#endif /* S_MSGCMDS */
   {NULL,		NULL,	NULL,				NULL}
 };
 

+ 1 - 4
src/mod/server.mod/server.h

@@ -43,10 +43,7 @@ enum {
 void nuke_server(char *);
 inline int match_my_nick(char *);
 
-extern bind_table_t	*BT_ctcp, *BT_ctcr;
-#ifdef S_MSGCMDS
-extern bind_table_t	*BT_msgc;
-#endif /* S_MSGCMDS */
+extern bind_table_t	*BT_ctcp, *BT_ctcr, *BT_msgc;
 extern int 		serv, servidx, cycle_time, newserverport,
 			nick_len, checked_hostmask, ctcp_mode, quiet_reject,
 			flud_thr, flud_time, flud_ctcp_thr, flud_ctcp_time,

+ 0 - 2
src/mod/server.mod/servmsg.c

@@ -561,7 +561,6 @@ static int gotmsg(char *from, char *msg)
       } else if ((my_code[0] != cmdprefix || !my_code[1] || i == -1 || !(auth[i].authed))) {
         if (!ignoring) {
           int doit = 1;
-#ifdef S_MSGCMDS
           if (!egg_strcasecmp(my_code, "op") || !egg_strcasecmp(my_code, "pass") || !egg_strcasecmp(my_code, "invite") 
               || !egg_strcasecmp(my_code, "ident")
                || !egg_strcasecmp(my_code, msgop) || !egg_strcasecmp(my_code, msgpass) 
@@ -580,7 +579,6 @@ static int gotmsg(char *from, char *msg)
             if (buf[0])
               check_bind_msg(buf2, nick, uhost, my_u, msg);
           }
-#endif /* S_MSGCMDS */
           if (doit)
             check_bind_msg(my_code, nick, uhost, my_u, msg);
         }