X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=480f3a25d3b3f3bdb527b424866ee263b2267408;hb=a3111de89c89bb1a3a81e748592d26d85e4fd79d;hp=4de7753d1a8259a2fbbc9522e2620fea129308ff;hpb=3063f4d349c9e7b4f9e2cb0d939cae6388afd76e;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 4de7753..480f3a2 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -1627,7 +1627,8 @@ class Room { $user->name = $name_new; // OK - nick changed /* se nome gia' in uso, segnala cosa potrebbe capitare */ if (($user->flags & USER_FLAG_AUTH) == 0) { - $bdb = new BriskDB(); + // FIXME: now create can return FALSE + $bdb = BriskDB::create(); $bdb->users_load(); /* MLANG: "Il nickname \'%s\' è già registrato, se il suo proprietario si autentificherà verrai rinominato d\'ufficio come ghostN." */ if ($bdb->login_exists($name_new)) { @@ -1905,15 +1906,17 @@ class Room { /* if pass != FALSE verify the login with pass */ log_auth("XXX", "auth1"); - $bdb = new BriskDB(); - $bdb->users_load(); - if ($pass != FALSE) { + + // FIXME: now create can return FALSE + if (($bdb = BriskDB::create()) != FALSE) + $bdb->users_load(); + if ($pass != FALSE && $bdb != FALSE) { // TODO: here add a method to $bdb to check if the db is available. log_auth("XXX", "auth2"); $authenticate = $bdb->login_verify($name_new, $pass, $code); log_auth("XXX", "authenticate: ".($authenticate != FALSE ? "TRUE" : "FALSE")); if ($authenticate != FALSE) { - $user_type = $authenticate->typeget(); + $user_type = $authenticate->type_get(); } else { $idx = -3; @@ -2560,21 +2563,6 @@ function log_legal($curtime, &$user, $where, $mesg) } } -function log_points($curtime, &$user, $where, $mesg) -{ - GLOBAL $_SERVER; - - if (($fp = @fopen(LEGAL_PATH."/points.log", 'a')) != FALSE) { - /* Unix time | session | nickname | IP | where was | mesg */ - fwrite($fp, sprintf("%ld|%s|%s|%s|%s|%s|%s|\n", $curtime, $user->sess, - ($user->flags & USER_FLAG_AUTH ? 'A' : 'N'), - $user->name, $_SERVER['REMOTE_ADDR'], $where , $mesg)); - fclose($fp); - } -} - - - function lock_banlist() {