polserver/pol-core/pol/tildecmd.cpp
turleypol 21577d8e5b
Clang Tidy concat namespaces (#855)
* tidy

* Automated clang-tidy change: modernize-concat-nested-namespaces

* compile test

* fix namespace

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-17 10:30:21 +01:00

31 lines
619 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::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 Pol::Core