improved area messages
This commit is contained in:
parent
7ff52549f7
commit
eb8e9cb6b4
@ -38,7 +38,7 @@ AreaData::AreaData(QString p_name, int p_index, MusicManager *p_music_manager =
|
||||
m_statement(0),
|
||||
m_judgelog(),
|
||||
m_lastICMessage(),
|
||||
m_send_area_message(false),
|
||||
m_send_area_message(true),
|
||||
m_can_send_wtce(true),
|
||||
m_can_use_shouts(true)
|
||||
{
|
||||
@ -54,7 +54,7 @@ AreaData::AreaData(QString p_name, int p_index, MusicManager *p_music_manager =
|
||||
m_eviMod = QVariant(areas_ini->value("evidence_mod", "FFA").toString().toUpper()).value<EvidenceMod>();
|
||||
m_blankpostingAllowed = areas_ini->value("blankposting_allowed", "true").toBool();
|
||||
m_area_message = areas_ini->value("area_message").toString();
|
||||
m_send_area_message = areas_ini->value("send_area_message_on_join", false).toBool();
|
||||
m_send_area_message = areas_ini->value("send_area_message_on_join", true).toBool();
|
||||
m_forceImmediate = areas_ini->value("force_immediate", "false").toBool();
|
||||
m_toggleMusic = areas_ini->value("toggle_music", "true").toBool();
|
||||
m_shownameAllowed = areas_ini->value("shownames_allowed", "true").toBool();
|
||||
@ -589,7 +589,7 @@ void AreaData::changeDoc(const QString &f_newDoc_r)
|
||||
|
||||
QString AreaData::areaMessage() const
|
||||
{
|
||||
return m_area_message.isEmpty() ? "No area message set." : m_area_message;
|
||||
return m_area_message.isEmpty() ? "No area message set." : "Area Message: " + m_area_message;
|
||||
}
|
||||
|
||||
bool AreaData::sendAreaMessageOnJoin() const
|
||||
|
@ -41,6 +41,8 @@ void PacketRD::handlePacket(AreaData *area, AOClient &client) const
|
||||
client.sendPacket("BN", {area->background(), area->side()});
|
||||
|
||||
client.sendServerMessage("=== MOTD ===\r\n" + ConfigManager::motd() + "\r\n=============");
|
||||
if (client.getServer()->getAreaById(client.areaId())->sendAreaMessageOnJoin())
|
||||
client.sendServerMessage(client.getServer()->getAreaById(client.areaId())->areaMessage());
|
||||
|
||||
client.fullArup(); // Give client all the area data
|
||||
if (client.getServer()->timer->isActive()) {
|
||||
|
Loading…
Reference in New Issue
Block a user