adding developer console connect with 'dev bl bla bla lb' command.
This commit is contained in:
parent
4e46d65c27
commit
ed32f515a3
11 changed files with 211 additions and 32 deletions
|
|
@ -3,11 +3,10 @@
|
|||
#include "session.hpp"
|
||||
#include "game.hpp"
|
||||
#include "state/commands.hpp"
|
||||
#include "util.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
void trim(std::string &str)
|
||||
{
|
||||
const std::string ws = " \t\r\n";
|
||||
|
|
@ -28,13 +27,10 @@ bool Session::parse(std::string s)
|
|||
// strip leading/trailing whitespace/newlines as they are always unintional
|
||||
trim(s);
|
||||
|
||||
std::istringstream iss(s);
|
||||
|
||||
std::string token;
|
||||
iss >> token;
|
||||
std::string rest;
|
||||
|
||||
// skip token + next whitespace
|
||||
std::string rest = s.substr(std::min(s.size(), token.size()+1));
|
||||
util::splitIntoTokenAndRest(s, token, rest);
|
||||
|
||||
//std::cout<<"[session] token='" << token << "' rest='" << rest << "'" << std::endl;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue