mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
Core/Chat: Add config to mute player first login. (#234)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
INSERT INTO version_db_world(`sql_rev`) VALUES ('1478948588825091300');
|
||||
|
||||
-- Mute for player
|
||||
DELETE FROM trinity_string WHERE entry = 30000;
|
||||
INSERT INTO trinity_string(`entry`,`content_default`,`content_loc6`,`content_loc7`,`content_loc8`) VALUES
|
||||
(30000, 'Speaking is allowed after playing for at least %d. You may use party and guild chat.','Podrás hablar cuando hayas jugado durante al menos %d. Puedes usar el chat de grupo y de hermandad.','Podrás hablar cuando hayas jugado durante al menos %d. Puedes usar el chat de grupo y de hermandad','Вы сможете говорить после %d проведенных минут в игре, но можете использовать чат гильдии и группы.');
|
||||
@@ -66,14 +66,17 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recvData)
|
||||
case CHAT_MSG_PARTY_LEADER:
|
||||
break;
|
||||
default:
|
||||
/*[AC] we should enable it using a conf
|
||||
if (sender->GetTotalPlayedTime() < 2*HOUR)
|
||||
if (!sWorld->getBoolConfig(CONFIG_CHAT_MUTE_FIRST_LOGIN))
|
||||
{
|
||||
SendNotification("Speaking is allowed after playing for at least 2 hours. You may use party and guild chat.");
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}*/
|
||||
break;
|
||||
uint32 minutes = sWorld->getIntConfig(CONFIG_CHAT_TIME_MUTE_FIRST_LOGIN);
|
||||
|
||||
if (sender->GetTotalPlayedTime() < minutes * MINUTE)
|
||||
{
|
||||
SendNotification(LANG_MUTED_PLAYER, minutes);
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// pussywizard:
|
||||
|
||||
@@ -1297,5 +1297,7 @@ enum TrinityStrings
|
||||
LANG_INSTANCE_BIND_MISMATCH = 11014,
|
||||
LANG_CREATURE_NOT_AI_ENABLED = 11015,
|
||||
LANG_SELECT_PLAYER_OR_PET = 11016,
|
||||
|
||||
LANG_MUTED_PLAYER = 30000, // Mute for player 2 hour
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -976,6 +976,8 @@ void World::LoadConfigSettings(bool reload)
|
||||
m_int_configs[CONFIG_CHATFLOOD_MESSAGE_COUNT] = sConfigMgr->GetIntDefault("ChatFlood.MessageCount", 10);
|
||||
m_int_configs[CONFIG_CHATFLOOD_MESSAGE_DELAY] = sConfigMgr->GetIntDefault("ChatFlood.MessageDelay", 1);
|
||||
m_int_configs[CONFIG_CHATFLOOD_MUTE_TIME] = sConfigMgr->GetIntDefault("ChatFlood.MuteTime", 10);
|
||||
m_bool_configs[CONFIG_CHAT_MUTE_FIRST_LOGIN] = sConfigMgr->GetBoolDefault("Chat.MuteFirstLogin", false);
|
||||
m_int_configs[CONFIG_CHAT_TIME_MUTE_FIRST_LOGIN] = sConfigMgr->GetIntDefault("Chat.MuteTimeFirstLogin", 120);
|
||||
|
||||
m_int_configs[CONFIG_EVENT_ANNOUNCE] = sConfigMgr->GetIntDefault("Event.Announce", 0);
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ enum WorldBoolConfigs
|
||||
CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL,
|
||||
CONFIG_TALENTS_INSPECTING,
|
||||
CONFIG_CHAT_FAKE_MESSAGE_PREVENTING,
|
||||
CONFIG_CHAT_MUTE_FIRST_LOGIN,
|
||||
CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP,
|
||||
CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE,
|
||||
CONFIG_DEATH_BONES_WORLD,
|
||||
@@ -257,6 +258,7 @@ enum WorldIntConfigs
|
||||
CONFIG_CHAT_CHANNEL_LEVEL_REQ,
|
||||
CONFIG_CHAT_WHISPER_LEVEL_REQ,
|
||||
CONFIG_CHAT_SAY_LEVEL_REQ,
|
||||
CONFIG_CHAT_TIME_MUTE_FIRST_LOGIN,
|
||||
CONFIG_TRADE_LEVEL_REQ,
|
||||
CONFIG_TICKET_LEVEL_REQ,
|
||||
CONFIG_AUCTION_LEVEL_REQ,
|
||||
|
||||
@@ -1859,6 +1859,21 @@ ChatFlood.MessageDelay = 1
|
||||
|
||||
ChatFlood.MuteTime = 10
|
||||
|
||||
#
|
||||
# Chat.MuteFirstLogin
|
||||
# Description: Speaking is allowed after playing for Chat.MuteTimeFirstLogin minutes. You may use party and guild chat.
|
||||
# Default: 0 - (Disabled)
|
||||
# 1 - (Enabled)
|
||||
|
||||
Chat.MuteFirstLogin = 0
|
||||
|
||||
#
|
||||
# Chat.MuteTimeFirstLogin
|
||||
# Description: The time after which the player will be able to speak.
|
||||
# Default: 120 - (Minutes)
|
||||
|
||||
Chat.MuteTimeFirstLogin = 120
|
||||
|
||||
#
|
||||
# Channel.RestrictedLfg
|
||||
# Description: Restrict LookupForGroup channel to characters registered in the LFG tool.
|
||||
|
||||
Reference in New Issue
Block a user