sourcebans-pp icon indicating copy to clipboard operation
sourcebans-pp copied to clipboard

Cyrillic letters in the engine

Open BlagoYar opened this issue 6 years ago • 2 comments

What are the steps to reproduce this issue?

  1. I right click on the player in the "Servers" section
  2. I choose "Send a private message"
  3. I enter the text in Russian (even consisting of one word without special characters)
  4. Click send Screenshot

What happens?

I get a notification in the game (see screenshot), but the content is empty Screenshot

What were you expecting to happen?

I expected that the text will be sent in Russian will be displayed :)

Any logs, error output, etc.?

List plugins & exts Lists

In the log cmd_ [date].log only one stroke Mon Jan 21 01:33:50 2019: Console<0><Console><Console> executes: sm_psay "-=? Ватник ?=-" "" In th log L20190121.log L 01/21/2019 - 01:33:50: [basechat.smx] "Console<0><Console><Console>" triggered sm_psay to "-=? Ватник ?=-<624><[U:1:17784030]><>" (text ) That's all

Any other comments?

Also, if I create a group in SB for admins with the Russian name "Админ" or with a special character, for example "Админ +", then in the game it is displayed as: NickOfAdmin[Outside the group]

If I call in English, example "Admin", it is displayed normally: NickOfAdmin [Admin]

If even in English, but with a special symbol, for example "Admin +", then in the game it is displayed as: NickOfAdmin[Outside the group]

What versions of software are you using?

Operating System: Windows 7 x64 SP1 SourceBans++ Version: 1.6.3 PHP Version: 5.5.38 MySQL Version: 5.5.60-MariaDB Link to your project: https://bans.nkm18.ru Link to a phpinfo() output: Archive with phpinfo Or Link to site with phpinfo

BlagoYar avatar Jan 20 '19 22:01 BlagoYar

Changing line 3031 in includes/sb-callback.php from

$ret = $r->sendCommand('sm_psay "'.$name.'" "'.preg_replace('/[^A-Za-z0-9\ ]/', '', $message).'"');

to

$ret = $r->sendCommand('sm_psay "'.$name.'" "'.$message.'"');

should fix that.

Not sure why this preg_replace was added in this commit https://github.com/sbpp/sourcebans-pp/commit/39301095a13dea67fab939e5fb69ef6c3501daba#diff-27b6220c6123f6104a1c5f84f772d0deR3039 and why only in this function.

Groruk avatar Jan 20 '19 23:01 Groruk

Very big thanks! That work with messege to game.

And how to solve the problem with groups of admins?

BlagoYar avatar Jan 21 '19 01:01 BlagoYar