Author
|
|
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
|
Plugin ID:
|
6809
|
Plugin Version:
|
1.18
|
Plugin Category:
|
All
|
Plugin Game:
|
Any
|
Plugin Dependencies:
|
|
Servers with this Plugin:
|
|
| |
Plugin Description:
|
Allows to accept commands entered in chat in uppercase or cyrillic
|
|
|
11-17-2019
, 19:22
[ANY] !COMMAND eater
|
#1
|
Description:Allows to accept commands entered in chat in uppercase, without key trigger or in cyrillic (by accident).
Supported both, chat and console commands.
Examples:
Quote:
!ADMIN
/ADmin
!ФВЬШТ
/фвьшт
sm_ADMIn
!SM_Admin
.ADMIN
ADMIN
админ
|
Also, plugin allows you to log unknown commands. Location: logs/ cmd_unknown.log
Note: Since SourceMod v1.11.0.6725 this plugin is not much useful for English only servers, because it is already include case insensitive fix for chat commands ( Pull #1542).
Notice for ALL:"Eat" != does not mean "Hide". If you need to hide your entered command, set sm_eater_nokey_silent ConVar to 1 - this only applied to command entered without ! or / prefix.
If you want to hide really ALL commands (even those entered with ! prefix), set up your addons/sourcemod/configs/core.cfg file such a way:
PHP Code:
"PublicChatTrigger" ""
"SilentChatTrigger" "/!"
then set sm_eater_nokey_silent ConVar to 1 and reboot the server.
Settings (ConVars):Located at: cfg/sourcemod/sm_command_eater.cfg:
PHP Code:
// Enable plugin? (1 - Yes / 0 - No)
sm_eater_enable "1"
// Do you want to log not recognized commands? (1 - Yes / 0 - No)
sm_eater_unknown_logging "1"
// Do you want ability to enter commands without prepending key trigger? (1 - Yes / 0 - No)
sm_eater_nokey_allow "1"
// Commands entered without key trigger should be silent? (1 - Yes / 0 - No)
sm_eater_nokey_silent "0"
// Minimum allowed length of command entered without key trigger
sm_eater_nokey_minlength "2"
// Enable 'eating' commands entered in console? (1 - Yes / 0 - No)
sm_eater_eat_console "1"
// Do we need handle cyrillic letters? (1 - Yes / 0 - No)
sm_eater_eat_cyrillic "1"
// Allow to substitute English analogues for Russian letters, e.g. админ -> admin (1 - Yes / 0 - No)
sm_eater_transliteration "1"
// Ignore chat processor and intercept 'say' command instead? (1 - Yes / 0 - No)
sm_eater_ignore_chat_proc "0"
// Check commands of dynamically loaded plugins. Causes less gaps, but more CPU loading! (1 - Yes / 0 - No)
sm_eater_track_dyn_load "1"
in source code (.sp):
PHP Code:
// set to 1 and recompile plugin if you faced with some problems and you need to provide logs for developer (will be saved to "logs/cmd_eater_debug.log")
#define DEBUG 0
// set to 0 if want to try compile with CCP support (ccprocessor.inc); only old versions of CCP will compile.
#define _ccprocessor_disable 1" to 0.
Commands:
PHP Code:
// Refresh the list of commands. It is recommended to use it in Map Config plugins which dynamically load/unload other plugins
sm_eater_refresh
* For a more elegant and automatic implementation, I am awaiting a solution / implementation from SourceMod team of at least one of these Issues: #1480, #1481, (#890 + #1482)
Credits: - SilverShot - for "Commands enumerator" code and SMC Parser and profiler examples.
- hmmmmm - for solution to my new debug code style.
- Ilusion9 - for suggestion the correct replicating of GetCmdReplySource.
- Bacardi - for suggesting me ReadCommandIterator() to differentiate sm commands.
- Balimbanana - for suggesting me OnClientCommand() to catch unrecognized console commands.
Supported: - Chat processor by Drixevel: https://github.com/Drixevel/Chat-Processor
- Simple Chat Processor (Redux) by Mini (minimoney1): https://forums.alliedmods.net/showthread.php?t=198501
- (support suspended) Color Chat Processor by nullent?: https://github.com/rej-clown/ccprocessor
- or without chat processor at all (color tags will not be processed in that case).
Compatiblity: - Minimum supported SM v.1.9
- Recommended SM v.1.11.0.6541+ (crash free)
Notes:1. If you receive false positives, you have such options:
- increase minimal length of handled commands entered without key trigger !/ see "sm_eater_nokey_minlength" ConVar
- disable handling commands entered without key trigger !/ see "sm_eater_nokey_allow" ConVar
- add concrete command to exclude list - add it in file - data/sm_eater_exclude.txt (each command on separate line),
e.g. sm_lf will prevent replacing "да" with sm_lf (if it would exist on your server).
- disable handling cyrillic transliteration at all (in case you have no users with Russian keyboard on your server), see "sm_eater_eat_cyrillic" ConVar.
2. If you receive chat commands flood in console, you have such options:
- update your Chat Processor to the latest version
- disable interaction with Chat Processor by set "sm_eater_ignore_chat_proc" ConVar to 1. Related plugins: - [ANY] [RU] Message Filter (Censor)
DonateDonates are very appreciated and welcomed for further inspiration, make me happy, and make next updates came out more often:
- Patreon (Paypal)
- BitCoin
- Ю.Money
__________________
Last edited by Dragokas; 07-09-2022 at 14:14.
|
|
|
|