1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

Put MotDs into a array to send multiple

This commit is contained in:
amibu 2017-09-10 16:47:40 +02:00
parent f2ab6ec201
commit b9f8b06ea7
2 changed files with 9 additions and 5 deletions

View file

@ -18,7 +18,11 @@
</General> </General>
<Parameters> <Parameters>
<!-- Message players see upon logging in --> <!-- Messages players see upon logging in - These *must* be smaller than 307 characters -->
<MotDArray>
<MotD>&lt;&lt;&lt;Welcome to Sapphire&gt;&gt;&gt;</MotD> <MotD>&lt;&lt;&lt;Welcome to Sapphire&gt;&gt;&gt;</MotD>
<MotD>This is a very good server</MotD>
<MotD>You can change these messages by editing MotDArray in config/settings_zone.xml</MotD>
</MotdArray>
</Parameters> </Parameters>
</Settings> </Settings>

View file

@ -234,9 +234,9 @@ void Core::Entity::Player::eventFinish( uint32_t eventId, uint32_t freePlayer )
void Core::Entity::Player::onLogin() void Core::Entity::Player::onLogin()
{ {
; for( auto& child : g_serverZone.getConfig()->getChild( "Settings.Parameters.MotDArray" ) ) {
// TODO: Replace this with MoTD from config sendNotice( child.second.data() );
sendNotice( g_serverZone.getConfig()->getValue< std::string >( "Settings.Parameters.MotD", " <<<Welcome to Sapphire >>>" ) ); }
} }
void Core::Entity::Player::onZoneStart() void Core::Entity::Player::onZoneStart()