]> jfr.im git - irc/evilnet/x3.git/commitdiff
few fixes
authorsirvulcan <redacted>
Sun, 11 Feb 2007 05:37:34 +0000 (05:37 +0000)
committersirvulcan <redacted>
Sun, 11 Feb 2007 05:37:34 +0000 (05:37 +0000)
ChangeLog
tools/ldap/ldap_convert.php

index c500fd9ec657c34155abac00f61deb7d596014a7..e9a64498017eb137ce88013f36e68edda66ad7eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
 /***********************************************************************
 X3 ChangeLog
 
+2007-02-11  Neil Spierling  <sirvulcan@gmail.com>
+
+       * tools/ldap/ldap_convert.php: Fixes after more testing.
+
 2007-02-09  Alex Schumann  <rubin@afternet.org>
 
         * src/x3ldap.c: addid search function to get users email address from
index c5248ecdd5b455056b8e1b4d320b378372c51725..f589453fcd4aafe38182d0edec4f03541cc4c7cf 100755 (executable)
@@ -32,8 +32,8 @@ if (!extension_loaded('ldap'))
 
 $handle=fopen($db, r);
 $ns = 0;
+$bs = 0;
 $add = 0;
-$np = 0;
 $parse = 0;
 
 if ($handle) {
@@ -60,13 +60,16 @@ if ($handle) {
         $user = NULL;
         $pass = NULL;
         $email = NULL;
-        if ($line == "\"NickServ\" {") {
+        if (($line == "\"NickServ\" {") && ($bs == 0)) {
+           echo "SSTARTT\n";
             $ns = 1;
             continue;
         }
 
-        if ($line == "\"ChanServ\" {")
+        if ($line == "\"ChanServ\" {") {
+           $bs = 1;
             $ns = 0;
+       }
 
         if ($ns == 1) {
             $parse++;
@@ -102,8 +105,6 @@ if ($handle) {
                if ($pass[0] == "$") {
                        $info["userPassword"] = "";
                        echo "ALERT: $user ADDED WITH NO PASSWORD (old crypt style)\n";
-                       $alert = 1;
-                       $np++;
                } else
                        $info["userPassword"]='{MD5}'.base64_encode(pack('H*',$pass));
 
@@ -111,7 +112,6 @@ if ($handle) {
                 if ($r) {
                     $add++;
                     echo "Added $user (email: $email) (pass: $pass)\n";
-                    /* print_r($info);*/
                 } else
                     echo "Failed adding $user (email: $email) (pass: $pass) - ". ldap_error($ds) ."\n";
 
@@ -136,6 +136,5 @@ $parse--;
 $parse--;
 echo "Processed $parse accounts.\n";
 echo "Added $add accounts to the ldap server\n";
-if (($alert == 1) && ($np > 0))
-       echo "ALERT: $np ACCOUNTS ADDED WITH NO PASSWORD (old crypt style)\n";
+
 ?>