X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2FObj%2Fbrisk.phh;h=959fd1a9068a4fbc819c81f4381b0a82109cfc6f;hb=9603235381668b55449b18a108e85ee27726d596;hp=ed630cebf734b6efbfb7bd1e94f27b4eae86d217;hpb=9b4aaeb974e7f92e6e124bde29c78a1f5f8fb2b0;p=brisk.git
diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh
index ed630ce..959fd1a 100644
--- a/web/Obj/brisk.phh
+++ b/web/Obj/brisk.phh
@@ -292,6 +292,11 @@ function eschtml($s)
return htmlentities($s);
}
+function esclfhtml($s)
+{
+ return str_replace("\n", "
\n", htmlentities($s));
+}
+
function langtolng($lang)
{
@@ -1614,9 +1619,10 @@ 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) {
- $userdb = new LoginDB();
+ $bdb = new BriskDB();
+ $bdb->users_load();
/* MLANG: "Il nickname \'%s\' è già registrato, se il suo proprietario si autentificherà verrai rinominato d\'ufficio come ghostN." */
- if ($userdb->login_exists($name_new)) {
+ if ($bdb->login_exists($name_new)) {
$prestr = sprintf($mlang_brisk['nickjust'][$G_lang], xcape($name_new));
$to_user .= sprintf('chatt_sub("%s", [2, "%s"],"%s");', $dt, NICKSERV, $prestr);
}
@@ -1890,10 +1896,11 @@ class Room {
/* if pass != FALSE verify the login with pass */
log_auth("XXX", "auth1");
- $userdb = new LoginDB();
+ $bdb = new BriskDB();
+ $bdb->users_load();
if ($pass != FALSE) {
log_auth("XXX", "auth2");
- $authenticate = $userdb->login_verify($name_new, $pass);
+ $authenticate = $bdb->login_verify($name_new, $pass, $code);
log_auth("XXX", "authenticate: ".($authenticate != FALSE ? "TRUE" : "FALSE"));
if ($authenticate != FALSE) {
@@ -1905,7 +1912,7 @@ class Room {
}
}
else {
- $login_exists = $userdb->login_exists($name_new);
+ $login_exists = $bdb->login_exists($name_new);
}
for ($i = 0 ; $i < MAX_PLAYERS ; $i++) {
/* free user ? */