polserver/pol-core/pol/help.cpp

29 lines
594 B
C++
Raw Permalink Normal View History

/** @file
*
* @par History
*/
2016-02-11 22:54:43 +01:00
#include <stddef.h>
2018-01-01 21:49:30 +01:00
#include "../bscript/eprog.h"
#include "../clib/refptr.h"
2016-02-11 22:54:43 +01:00
#include "../plib/systemstate.h"
#include "mobile/charactr.h"
#include "network/client.h"
2018-12-30 21:35:54 +01:00
#include "network/pktin.h"
2016-02-11 22:54:43 +01:00
#include "scrstore.h"
namespace Pol::Core
{
void handle_help( Network::Client* client, PKTIN_9B* /*msg*/ )
{
ref_ptr<Bscript::EScriptProgram> prog =
find_script( "misc/help", true, Plib::systemstate.config.cache_interactive_scripts );
2018-07-31 14:30:29 +02:00
if ( prog.get() != nullptr )
{
client->chr->start_script( prog.get(), false );
2016-02-11 22:54:43 +01:00
}
}
} // namespace Pol::Core