本文整理汇总了C++中Seperator::isHexNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ Seperator::isHexNumber方法的具体用法?C++ Seperator::isHexNumber怎么用?C++ Seperator::isHexNumber使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Seperator
的用法示例。
在下文中一共展示了Seperator::isHexNumber方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Command_unban
PyResult Command_unban( Client* who, CommandDB* db, PyServiceMgr* services, const Seperator& args )
{
if( args.argCount() == 2 )
{
if( !args.isNumber( 1 ) )
{
const char *name = args.arg( 1 ).c_str();
services->serviceDB().SetAccountBanStatus(db->GetAccountID(name),false);
}
else
throw PyException( MakeCustomError("Correct Usage: /ban [Character Name]") );
}
//support for characters with first and last names
else if( args.argCount() == 3 )
{
if( args.isHexNumber( 1 ) )
throw PyException( MakeCustomError("Unknown arguments") );
std::string name = args.arg( 1 ) + " " + args.arg( 2 );
services->serviceDB().SetAccountBanStatus(db->GetAccountID(name),false);
}
else
throw PyException( MakeCustomError("Correct Usage: /unban [Character Name / Character ID]") );
return NULL;
}
示例2: Command_ban
PyResult Command_ban( Client* who, CommandDB* db, PyServiceMgr* services, const Seperator& args )
{
Client *target;
if( args.argCount() == 2 )
{
if( !args.isNumber( 1 ) )
{
const char *name = args.arg( 1 ).c_str();
target = services->entity_list.FindCharacter( name );
}
else
throw PyException( MakeCustomError("Correct Usage: /ban [Character Name]") );
}
//support for characters with first and last names
else if( args.argCount() == 3 )
{
if( args.isHexNumber( 1 ) )
throw PyException( MakeCustomError("Unknown arguments") );
std::string name = args.arg( 1 ) + " " + args.arg( 2 );
target = services->entity_list.FindCharacter( name.c_str() ) ;
}
else
throw PyException( MakeCustomError("Correct Usage: /ban [Character Name]") );
//ban client
target->BanClient();
//disconnect client
target->DisconnectClient();
return NULL;
}