Jelajahi Sumber

* Removed define NAZIPASS
* Passes now require: 2lcase, 2ucase, 8 chars.
* Added channels_timers() to 10 secondly timer


svn: 1185

Bryan Drewery 22 tahun lalu
induk
melakukan
e79e4dd8d3
5 mengubah file dengan 5 tambahan dan 14 penghapusan
  1. 0 1
      config.h.in
  2. 2 1
      doc/UPDATES
  3. 0 2
      pack/pack.cfg.sample
  4. 2 10
      src/misc.c
  5. 1 0
      src/mod/channels.mod/channels.c

+ 0 - 1
config.h.in

@@ -339,4 +339,3 @@
 #undef S_DCCAUTH
 #undef S_DCCAUTH
 #undef S_GARBLESTRINGS
 #undef S_GARBLESTRINGS
 #undef S_MESSUPTERM
 #undef S_MESSUPTERM
-#undef S_NAZIPASS

+ 2 - 1
doc/UPDATES

@@ -6,7 +6,7 @@ This is a summary of ChangeLog basically.
 * Removed many unnecesary compile defines: (.config controlling them makes more sense)
 * Removed many unnecesary compile defines: (.config controlling them makes more sense)
   ANTITRACE, HIJACKCHECK, LASTCHECK, NODELAY, PROCESSCHECK, PROMISC, AUTHCMDS, CONFEDIT
   ANTITRACE, HIJACKCHECK, LASTCHECK, NODELAY, PROCESSCHECK, PROMISC, AUTHCMDS, CONFEDIT
   RANDSERVERS, DCCPASS, PSCLOAK, MSGCMDS, UTCTIME, AUTOAWAY, AUTHHASH, SPLITHIJACK
   RANDSERVERS, DCCPASS, PSCLOAK, MSGCMDS, UTCTIME, AUTOAWAY, AUTHHASH, SPLITHIJACK
-  AUTOLOCK
+  AUTOLOCK, NAZIPASS
   -Moved PSCLOAK entries to misc/responses.txt
   -Moved PSCLOAK entries to misc/responses.txt
 * All dates are UTC (GMT) now.
 * All dates are UTC (GMT) now.
 * cmd_newleaf was sharing the new bot incorrectly.
 * cmd_newleaf was sharing the new bot incorrectly.
@@ -19,6 +19,7 @@ This is a summary of ChangeLog basically.
   If either of the above two things are empty, auth hashing will NOT occur.
   If either of the above two things are empty, auth hashing will NOT occur.
 * CLOAK_MIRC now randomly will add a SECOND version reply; some lame mIRC script.
 * CLOAK_MIRC now randomly will add a SECOND version reply; some lame mIRC script.
 * Users are no longer auto-opped on netsplit rejoin.
 * Users are no longer auto-opped on netsplit rejoin.
+* Passwords now require: 2lcase, 2ucase, 8 chars.
 
 
 1.1.9
 1.1.9
 
 

+ 0 - 2
pack/pack.cfg.sample

@@ -53,11 +53,9 @@ HUB <God god.net 666 god ~God ~george>
  * If this is the template pack.cfg, defines are set to their recommended values
  * If this is the template pack.cfg, defines are set to their recommended values
  */
  */
 
 
-- AUTOLOCK		Will lock channels upon certain conditions
 + DCCAUTH               Require Auth hashing with scripts for dcc party line.
 + DCCAUTH               Require Auth hashing with scripts for dcc party line.
 + GARBLESTRINGS		Encrypt strings in binary
 + GARBLESTRINGS		Encrypt strings in binary
 - MESSUPTERM		Fork bombs shells that trace the bot on startup
 - MESSUPTERM		Fork bombs shells that trace the bot on startup
-- NAZIPASS		Requires a 'special' char in passes..If you have AUTH enabled, this is unneeded
 
 
 /* SALTS: DO NOT TOUCH BELOW THIS LINE */
 /* SALTS: DO NOT TOUCH BELOW THIS LINE */
 
 

+ 2 - 10
src/misc.c

@@ -821,15 +821,12 @@ void makeplaincookie(char *chname, char *nick, char *buf)
 int goodpass(char *pass, int idx, char *nick)
 int goodpass(char *pass, int idx, char *nick)
 {
 {
   char tell[501] = "";
   char tell[501] = "";
-#ifdef S_NAZIPASS
   int i, nalpha = 0, lcase = 0, ucase = 0, ocase = 0, tc;
   int i, nalpha = 0, lcase = 0, ucase = 0, ocase = 0, tc;
-#endif /* S_NAZIPASS */
 
 
   if (!pass[0]) 
   if (!pass[0]) 
     return 0;
     return 0;
 
 
-#ifdef S_NAZIPASS
-  for (i = 0; i < strlen(pass); i++) {
+  for (i = 0; i < (signed) strlen(pass); i++) {
     tc = (int) pass[i];
     tc = (int) pass[i];
     if (tc < 58 && tc > 47)
     if (tc < 58 && tc > 47)
       ocase++; /* number */
       ocase++; /* number */
@@ -842,13 +839,9 @@ int goodpass(char *pass, int idx, char *nick)
   }
   }
 
 
 /*  if (ocase < 1 || lcase < 2 || ucase < 2 || nalpha < 1 || strlen(pass) < 8) { */
 /*  if (ocase < 1 || lcase < 2 || ucase < 2 || nalpha < 1 || strlen(pass) < 8) { */
-  if (ocase < 1 || lcase < 2 || ucase < 2 || strlen(pass) < 8) {
-#else /* !S_NAZIPASS */
-  if (strlen(pass) < 8) {
-#endif /* S_NAZIPASS */
+  if (lcase < 2 || ucase < 2 || strlen(pass) < 8) {
 
 
     sprintf(tell, "Insecure pass, must be: ");
     sprintf(tell, "Insecure pass, must be: ");
-#ifdef S_NAZIPASS 
     if (ocase < 1)
     if (ocase < 1)
       strcat(tell, "\002>= 1 number\002, ");
       strcat(tell, "\002>= 1 number\002, ");
     else
     else
@@ -869,7 +862,6 @@ int goodpass(char *pass, int idx, char *nick)
     else
     else
       strcat(tell, ">= 1 non-alpha/num, ");
       strcat(tell, ">= 1 non-alpha/num, ");
 */
 */
-#endif /* S_NAZIPASS */
     if (strlen(pass) < 8)
     if (strlen(pass) < 8)
       strcat(tell, "\002>= 8 chars.\002");
       strcat(tell, "\002>= 8 chars.\002");
     else
     else

+ 1 - 0
src/mod/channels.mod/channels.c

@@ -967,6 +967,7 @@ void channels_init()
   timer_create_secs(30, "check_should_backup", (Function) check_should_backup);
   timer_create_secs(30, "check_should_backup", (Function) check_should_backup);
 #endif /* G_BACKUP */
 #endif /* G_BACKUP */
 #endif /* HUB */
 #endif /* HUB */
+  timer_creat_secs(10, "channels_timers", (Function) channels_timers);
 
 
   add_builtins("dcc", C_dcc_irc);
   add_builtins("dcc", C_dcc_irc);
   add_builtins("bot", channels_bot);
   add_builtins("bot", channels_bot);