polserver/pol-core/pol/tildecmd.cpp
turleypol d848deae18
POLLOG* macros use the new formatting (#598)
* POLLOG* macros use the new formatting
removed all old logging functions

* removed old fmt lib from everything except StreamWriter
removed unneeded functions

* fixed review comments
2024-01-16 17:55:42 +01:00

34 lines
645 B
C++

/** @file
*
* @par History
*/
#include "tildecmd.h"
#include <iostream>
#include <stdlib.h>
#include <string>
#include "../clib/logfacility.h"
#include "../plib/systemstate.h"
#include "spells.h"
namespace Pol
{
namespace Core
{
bool process_tildecommand( Network::Client* client, const std::string& textbuf )
{
if ( textbuf.size() > 3 && textbuf[1] == 'I' && textbuf[2] == 'N' )
{
INFO_PRINTLN_TRACE( 6 )( "INVOKE: {}", textbuf );
u16 spellnum = static_cast<u16>( strtoul( textbuf.c_str() + 3, nullptr, 0 ) );
do_cast( client, spellnum );
return true;
}
return false;
}
} // namespace Core
} // namespace Pol