diff options
Diffstat (limited to 'knights/io_internet.cpp')
| -rw-r--r-- | knights/io_internet.cpp | 60 | 
1 files changed, 30 insertions, 30 deletions
diff --git a/knights/io_internet.cpp b/knights/io_internet.cpp index b8ace6f..d333b0f 100644 --- a/knights/io_internet.cpp +++ b/knights/io_internet.cpp @@ -406,7 +406,7 @@ void io_internet::readCommand(TDESocket* socket)    }    else    { -    lines = TQStringList::split( TQRegExp("\n\r?"), tmp, FALSE ); +    lines = TQStringList::split( TQRegExp("\n\r?"), tmp, false );      if(!(tmp.endsWith("\n\r") || tmp.endsWith("\n")))       {        lineBuffer = (*(--lines.end())); @@ -460,7 +460,7 @@ void io_internet::parseLoginData( TQString data )      {  			sendUserName();      } -    lines = TQStringList::split( TQRegExp("\n\r?"), data, FALSE ); +    lines = TQStringList::split( TQRegExp("\n\r?"), data, false );      for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++)      {        writeToConsole((*i), "K_STD"); @@ -497,7 +497,7 @@ void io_internet::parseLoginData( TQString data )        loginStage = LOGIN_STAGE_LOGGED_IN;        sendUserSettings();      } -    lines = TQStringList::split( TQRegExp("\n\r?"), data, FALSE ); +    lines = TQStringList::split( TQRegExp("\n\r?"), data, false );      for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++)      {        writeToConsole((*i), "K_STD"); @@ -505,7 +505,7 @@ void io_internet::parseLoginData( TQString data )    }    else    { -    lines = TQStringList::split( TQRegExp("\n\r?"), data, FALSE ); +    lines = TQStringList::split( TQRegExp("\n\r?"), data, false );      for(TQStringList::iterator i = lines.begin(); i != lines.end(); i++)      {        writeToConsole((*i), "K_STD"); @@ -629,7 +629,7 @@ void io_internet::parseLine( TQString line )        {          writeToConsole(line, lastTag);        } -      else if(line.contains(TQRegExp("^\\{?Game \\d+")) && line.contains("Creating", TRUE)) +      else if(line.contains(TQRegExp("^\\{?Game \\d+")) && line.contains("Creating", true))        {          parseMode = NEW_GAME_MODE;        } @@ -649,19 +649,19 @@ void io_internet::parseLine( TQString line )        }        else if((line.contains(TQRegExp("^\\{?Game \\d+")) || line.contains(TQRegExp("Game \\d+"))) &&                 ( -                 line.contains(" forfeits by disconnection", TRUE) || -                 line.contains(" forfeits by disconnection}", TRUE) || -                 line.contains(" forfeits on time} ", TRUE) || -                 line.contains(" forfeits on time ", TRUE) || -                 line.contains(" resigns} ", TRUE) || -                 line.contains(" resigns ", TRUE) || -                 line.contains(" Game drawn by mutual agreement ", TRUE) || -                 line.contains(" Game drawn by mutual agreement} ", TRUE) || -                 line.contains(", has lost contact or quit.", TRUE) || -                 line.contains(" checkmated ", TRUE) || -                 line.contains(" checkmated} ", TRUE) || -                 line.contains("lost connection", TRUE) || -                 line.contains("has no material to mate", TRUE) +                 line.contains(" forfeits by disconnection", true) || +                 line.contains(" forfeits by disconnection}", true) || +                 line.contains(" forfeits on time} ", true) || +                 line.contains(" forfeits on time ", true) || +                 line.contains(" resigns} ", true) || +                 line.contains(" resigns ", true) || +                 line.contains(" Game drawn by mutual agreement ", true) || +                 line.contains(" Game drawn by mutual agreement} ", true) || +                 line.contains(", has lost contact or quit.", true) || +                 line.contains(" checkmated ", true) || +                 line.contains(" checkmated} ", true) || +                 line.contains("lost connection", true) || +                 line.contains("has no material to mate", true)                 )               )        { @@ -753,7 +753,7 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)      {        /* a new game that we are playing, or observing */        param = new match_param(this->myResource); -      fields = TQStringList::split( TQChar(' '), line, FALSE ); +      fields = TQStringList::split( TQChar(' '), line, false );        /* set white time control */        TCPList tmpListWhite(param->time(WHITE)); @@ -808,7 +808,7 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)      }      case PARSE12_MODE_MOVE:      { -      fields = TQStringList::split( TQChar(' '), line, FALSE ); +      fields = TQStringList::split( TQChar(' '), line, false );        /* various ICS stuff for ChessMove */        move.ICS_ClockTicking = fields[31].toInt(); @@ -891,31 +891,31 @@ void io_internet::parseStyle12(TQString line, const unsigned int Mode)  	/* SysAdmin */  //	if( Handle.contains( TQRegExp("\\(\\*\\)") ) )  //	{ -//		player.SysAdmin = TRUE; +//		player.SysAdmin = true;  //		Handle.replace( TQRegExp("\\(\\*\\)"), TQString("") );  //	} -//	else player.SysAdmin = FALSE; +//	else player.SysAdmin = false;  	/* ServiceRep */  //	if( Handle.contains( TQRegExp("\\(SR\\)") ) )  //	{ -//		player.ServiceRep = TRUE; +//		player.ServiceRep = true;  //		Handle.replace( TQRegExp("\\(SR\\)"), TQString("") );  //	} -//	else player.ServiceRep = FALSE; +//	else player.ServiceRep = false;  	/* Computer */  //	if( Handle.contains( TQRegExp("\\(C\\)") ) )  //	{ -//		player.Computer = TRUE; +//		player.Computer = true;  //		Handle.replace( TQRegExp("\\(C\\)"), TQString("") );  //	} -//	else player.Computer = FALSE; +//	else player.Computer = false;  	/* Unregistered */  //	if( Handle.contains( TQRegExp("\\(U\\)") ) )  //	{ -//		player.Unregistered = TRUE; +//		player.Unregistered = true;  //		Handle.replace( TQRegExp("\\(U\\)"), TQString("") );  //	} -//	else player.Unregistered = FALSE; +//	else player.Unregistered = false;  //	return;  //}  /////////////////////////////////////// @@ -1018,7 +1018,7 @@ void io_internet::parseMoveList(TQString line)    int move_counter = 0;    /* white */ -  two_plys = TQStringList::split(TQRegExp("\\s+"), line, FALSE); +  two_plys = TQStringList::split(TQRegExp("\\s+"), line, false);    Command::clearMove(&move);    move_counter = two_plys[0].left(two_plys[0].length() - 1).length(); /* remove the . */    move.ICS_MoveCounter = move_counter; @@ -1055,7 +1055,7 @@ void io_internet::sendEndOfGameCommand(TQString line)    TQStringList fields;    Command command; -  fields = TQStringList::split( TQChar(' '), line, FALSE ); +  fields = TQStringList::split( TQChar(' '), line, false );    if(fields[1].endsWith(":"))    {      fields[1] = fields[1].left(fields[1].length() - 1);  | 
