Bläddra i källkod

* Make hosts optional for owners in PackConfig

svn: 3831
Bryan Drewery 18 år sedan
förälder
incheckning
4fae8ae81d
2 ändrade filer med 5 tillägg och 3 borttagningar
  1. 1 0
      doc/UPDATES
  2. 4 3
      src/chanprog.c

+ 1 - 0
doc/UPDATES

@@ -8,6 +8,7 @@
 * Remove 'set mean-kicks' and change to 'chanset +meankicks' (default on, does not upgrade from old .set, must unset after upgrade if wanted)
 * Don't check last/promisc unless linked.
 * Speed up botnet parsing / set lookups /cmd_help a bit
+* Fix some various issues with initial setups and new PackConfig format
 
 1.2.15 - http://wraith.botpack.net/milestone/1.2.15
 * Fix a possible segfault when binaries compiled wrong

+ 4 - 3
src/chanprog.c

@@ -412,7 +412,6 @@ void load_internal_users()
     hand = ln;
     ip = NULL;
     port = NULL;
-    hosts = NULL;
     u = NULL;
     for (i = 0; ln; i++) {
       switch (i) {
@@ -474,8 +473,10 @@ void load_internal_users()
           break;
         case 1:
           pass = ln;
-          break;
-        case 2:
+
+          if (ln && (ln = strchr(ln, ' ')))
+            *ln++ = 0;
+
           hosts = ln;
           if (owner[0])
             strlcat(owner, ",", 121);