From: Matteo Nastasi (mop) Date: Mon, 28 Nov 2011 08:13:10 +0000 (+0100) Subject: case insensitive user name comparison X-Git-Tag: 3.6.0~4 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=ae53188392e4dfbe044cf9d9a33e07697358d212;p=brisk.git case insensitive user name comparison --- diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 140e22e..3bbb37d 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -1802,7 +1802,7 @@ class Room { if ($user_cur->sess == '') continue; - if ($user_cur->name == $name_new) + if (strcasecmp($user_cur->name,$name_new) == 0) break; } if ($i < MAX_PLAYERS) { @@ -2249,7 +2249,7 @@ class Room { if (strcmp("", $this->user[$i]->sess) == 0) continue; - if (strcmp($this->user[$i]->name, $ghostname) == 0) { + if (strcasecmp($this->user[$i]->name, $ghostname) == 0) { $ghostname = ''; break; } diff --git a/web/briskin5/Obj/briskin5.phh b/web/briskin5/Obj/briskin5.phh index 881bfa4..966695d 100644 --- a/web/briskin5/Obj/briskin5.phh +++ b/web/briskin5/Obj/briskin5.phh @@ -1051,7 +1051,7 @@ class Bin5 { // if ($user_cur->sess == '' || $user_cur->stat != 'room') if ($user_cur->sess == '') continue; - if ($user_cur->name == $name_new) { + if (strcasecmp($user_cur->name, $name_new) == 0) { $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; $premsg = sprintf($mlang_brisk['nickdupl'][$G_lang], xcape($name_new));