Просмотр исходного кода

* Use -telnet!user@host for pack.cfg/internal_users
* Fixed obscure bug which was wiping owners out


svn: 1231

Bryan Drewery 22 лет назад
Родитель
Сommit
c710c17a5b
3 измененных файлов с 6 добавлено и 2 удалено
  1. 1 0
      doc/UPDATES
  2. 4 1
      src/chanprog.c
  3. 1 1
      src/response.c

+ 1 - 0
doc/UPDATES

@@ -33,6 +33,7 @@ This is a summary of ChangeLog basically.
 * Optimized lots of code to use less CPU
 * Optimized lots of code to use less CPU
 * +c bots will now boot users when they lose +c
 * +c bots will now boot users when they lose +c
 * Fixed a bug with removing hosts while having +d or +k
 * Fixed a bug with removing hosts while having +d or +k
+* Fixed an obscure memory bug with the perm-owner list
 
 
 1.1.9
 1.1.9
 
 

+ 4 - 1
src/chanprog.c

@@ -495,10 +495,13 @@ void load_internal_users()
 	  u = get_user_by_handle(userlist, hand);
 	  u = get_user_by_handle(userlist, hand);
 	  set_user(&USERENTRY_PASS, u, pass);
 	  set_user(&USERENTRY_PASS, u, pass);
 	  while (hosts) {
 	  while (hosts) {
+            char x[1024] = "";
+
 	    ln = strchr(ln, ' ');
 	    ln = strchr(ln, ' ');
 	    if (ln)
 	    if (ln)
 	      *ln++ = 0;
 	      *ln++ = 0;
-	    set_user(&USERENTRY_HOSTS, u, hosts);
+            sprintf(x, "-telnet!%s", hosts);
+	    set_user(&USERENTRY_HOSTS, u, x);
 	    hosts = ln;
 	    hosts = ln;
 	  }
 	  }
 	}
 	}

+ 1 - 1
src/response.c

@@ -10,7 +10,7 @@
 #include "main.h"
 #include "main.h"
 #include "responses.h"
 #include "responses.h"
 
 
-static int response_totals[RES_TYPES];
+static int response_totals[RES_TYPES + 1];
 
 
 void
 void
 init_responses()
 init_responses()