From ae53188392e4dfbe044cf9d9a33e07697358d212 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Mon, 28 Nov 2011 09:13:10 +0100 Subject: [PATCH] case insensitive user name comparison --- web/Obj/brisk.phh | 4 ++-- web/briskin5/Obj/briskin5.phh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)); -- 2.17.1