In some servers with low exp in certain chat channels is not allowed write with "CAPS LOCK ON", this fix that, it resizes the message before send it to certain channel:
go to game.cpp
add this before function Game:layerSay:
[cpp]bool needFix(Player* player, uint16_t channelId){
uint16_t channels [] = {4, 7, 9};
uint16_t size = sizeof(channels) / sizeof(channels[0]);
for (uint16_t i = 0; i < size; i++)
{
if (channelId == channels && !player->hasFlag(PlayerFlag_CannotBeMuted))
return true;
}
return false;
}[/cpp]
then find:
[cpp]if(playerSpeakToChannel(player, type, text , channelId, statementId))[/cpp]
and replace with:
[cpp]if(playerSpeakToChannel(player, type, (needFix(player, channelId) ? asLowerCaseString(text): text) , channelId, statementId))
[/cpp]
you may add more channelIds at this line:
[cpp]uint16_t channels [] = {4, 7, 9};[/cpp]
go to game.cpp
add this before function Game:layerSay:
[cpp]bool needFix(Player* player, uint16_t channelId){
uint16_t channels [] = {4, 7, 9};
uint16_t size = sizeof(channels) / sizeof(channels[0]);
for (uint16_t i = 0; i < size; i++)
{
if (channelId == channels && !player->hasFlag(PlayerFlag_CannotBeMuted))
return true;
}
return false;
}[/cpp]
then find:
[cpp]if(playerSpeakToChannel(player, type, text , channelId, statementId))[/cpp]
and replace with:
[cpp]if(playerSpeakToChannel(player, type, (needFix(player, channelId) ? asLowerCaseString(text): text) , channelId, statementId))
[/cpp]
you may add more channelIds at this line:
[cpp]uint16_t channels [] = {4, 7, 9};[/cpp]