| 1 | /*************************************************************************** |
| 2 | * Copyright (C) 2009 by The qGo Project * |
| 3 | * * |
| 4 | * This file is part of qGo. * |
| 5 | * * |
| 6 | * qGo is free software: you can redistribute it and/or modify * |
| 7 | * it under the terms of the GNU General Public License as published by * |
| 8 | * the Free Software Foundation; either version 2 of the License, or * |
| 9 | * (at your option) any later version. * |
| 10 | * * |
| 11 | * This program is distributed in the hope that it will be useful, * |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 14 | * GNU General Public License for more details. * |
| 15 | * * |
| 16 | * You should have received a copy of the GNU General Public License * |
| 17 | * along with this program; if not, see <http://www.gnu.org/licenses/> * |
| 18 | * or write to the Free Software Foundation, Inc., * |
| 19 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| 20 | ***************************************************************************/ |
| 21 | |
| 22 | |
| 23 | #include "tomconnection.h"cxx . . $ `<file>/src/network/tomconnection.h`/ |
| 24 | #include "room.h"cxx . . $ `<file>/src/network/room.h`/ |
| 25 | #include "playergamelistings.h"cxx . . $ `<file>/src/network/playergamelistings.h`/ |
| 26 | #include "gamedata.h"cxx . . $ `<file>/src/gamedata.h`/ |
| 27 | #include "serverlistdialog.h"cxx . . $ `<file>/src/network/serverlistdialog.h`/ |
| 28 | #include "codecwarndialog.h"cxx . . $ `<file>/src/network/codecwarndialog.h`/ |
| 29 | /* Note that Tom either has additional checks on this or simply that one cannot play against |
| 30 | * the same username meaning that sendMatchOffers may not be received. */ |
| 31 | |
| 32 | |
| 33 | TomConnectioncxx . . $ TomConnection#::TomConnectioncxx . . $ TomConnection#TomConnection(231cf4fc7da7cd6f).(const ConnectionCredentialscxx . . $ ConnectionCredentials# credentials) |
| 34 | : TygemConnectioncxx . . $ TygemConnection#(credentials) |
| 35 | { |
| 36 | serverCodeccxx . . $ TygemConnection#serverCodec. = QTextCodeccxx . . $ QTextCodec#::codecForNamecxx . . $ QTextCodec#codecForName(914382192c9ca379).(getCodecStringcxx . . $ TomConnection#getCodecString(33a1f659e94feb42).()); |
| 37 | if(!serverCodeccxx . . $ TygemConnection#serverCodec.) |
| 38 | { |
| 39 | new CodecWarnDialogcxx . . $ CodecWarnDialog#(getCodecStringcxx . . $ TomConnection#getCodecString(33a1f659e94feb42).()); |
| 40 | serverCodeccxx . . $ TygemConnection#serverCodec. = QTextCodeccxx . . $ QTextCodec#::codecForLocalecxx . . $ QTextCodec#codecForLocale(6599407a1b23811).(); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | const char * TomConnectioncxx . . $ TomConnection#::getCodecStringcxx . . $ TomConnection#getCodecString(33a1f659e94feb42).(void) |
| 45 | { |
| 46 | return "GB2312"; |
| 47 | } |
| 48 | |
| 49 | QStringcxx . . $ QString# TomConnectioncxx . . $ TomConnection#::getPlaceStringcxx . . $ TomConnection#getPlaceString(4365c3963150523e).(void) |
| 50 | { |
| 51 | return "Tom: " +cxx . . $ operator+(c75c3ae4eb9af1a8). serverListcxx . . $ TygemConnection#serverList.[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).current_server_indexcxx . . $ TygemConnection#current_server_index.]->namecxx . . $ ServerItem#name.; |
| 52 | } |
| 53 | |
| 54 | int TomConnectioncxx . . $ TomConnection#::requestServerInfocxx . . $ TomConnection#requestServerInfo(b126dc7c1de90089).(void) |
| 55 | { |
| 56 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("Requesting Tom Server Info"); |
| 57 | if(!openConnectioncxx . . $ NetworkConnection#openConnection(6f40ee5c4c30d87e).(hostnamecxx . . $ NetworkConnection#hostname., portcxx . . $ NetworkConnection#port., NOT_MAIN_CONNECTIONcxx . . $ `src/network/networkconnection.h:64:9`!)) |
| 58 | { |
| 59 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("Can't get server info"); |
| 60 | return -1; |
| 61 | } |
| 62 | unsigned int length = 0x94; |
| 63 | unsigned char * packet = new unsigned char[length]; //term 0x00 |
| 64 | snprintf((char *)packet, length, |
| 65 | "GET /service/files/livebaduk3.cfg HTTP/1.1\r\n" \ |
| 66 | "User-Agent: Tygem HTTP\r\n" \ |
| 67 | "Host: duiyi.sports.tom.com\r\n" \ |
| 68 | "Connection: Keep-Alive\r\n" \ |
| 69 | "Cache-Control: no-cache\r\n\r\n"); |
| 70 | #ifdef RE_DEBUG |
| 71 | for(int i = 0; i < length; i++) |
| 72 | printf("%02x", packet[i]); |
| 73 | printf("\n"); |
| 74 | #endif //RE_DEBUG |
| 75 | if(writecxx . . $ NetworkConnection#write(1df18506ef0a631b).((const char *)packet, length) < 0) |
| 76 | { |
| 77 | qWarningcxx . . $ `<external>/10450329605257866924/qlogging.h:166:9`!("*** failed sending server info request"); |
| 78 | return -1; |
| 79 | } |
| 80 | delete[] packet; |
| 81 | |
| 82 | setStatecxx . . $ NetworkConnection#setState(41e728cff2b23034).(Infocxx . . $ Info.); |
| 83 | return 0; |
| 84 | } |
| 85 | |
| 86 | /* We need to write a tygem parser that doesn't need to be different for tom FIXME */ |
| 87 | void TomConnectioncxx . . $ TomConnection#::handleServerInfocxx . . $ TomConnection#handleServerInfo(e1e8b00c42c42532).(unsigned char * msg, unsigned int length) |
| 88 | { |
| 89 | char * p = (char *)msg; |
| 90 | int i, j; |
| 91 | ServerItemcxx . . $ ServerItem# * si; |
| 92 | |
| 93 | #ifdef RE_DEBUG |
| 94 | for(i = 0; i < length; i++) |
| 95 | printf("%c", p[i]); |
| 96 | printf("\n"); |
| 97 | #endif //RE_DEBUG |
| 98 | |
| 99 | while(p < ((char *)msg + length)) |
| 100 | { |
| 101 | while(p < ((char *)msg + length - 1) && p[0] != '\n') |
| 102 | p++; |
| 103 | p++; |
| 104 | //FIXME, check for size |
| 105 | if(strncmp(p, "/LIVE ", 6) == 0) |
| 106 | { |
| 107 | //same as for /SERVER but with only 2 [], name and ip |
| 108 | } |
| 109 | else if(strncmp(p, "/LECTURE ", 9) == 0) |
| 110 | { |
| 111 | //same as for /SERVER but with only 2 [], name and ip |
| 112 | } |
| 113 | else if(strncmp(p, "/SERVER ", 8) == 0 || |
| 114 | strncmp(p, "/_SERVER ", 9) == 0) //whats the "_" FIXME |
| 115 | { |
| 116 | //TOM has only 2 [], name and ip |
| 117 | if(p[1] == '_') |
| 118 | p++; |
| 119 | p += 8; |
| 120 | unsigned char ipaddr[16]; |
| 121 | unsigned char name[20]; |
| 122 | i = 0; |
| 123 | while(i < 2 && p < ((char *)msg + length)) |
| 124 | { |
| 125 | if(*p != '[') |
| 126 | { |
| 127 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("Server info parse error"); |
| 128 | closeConnectioncxx . . $ NetworkConnection#closeConnection(b45ddcbc8423892c).(); |
| 129 | return; |
| 130 | } |
| 131 | p++; |
| 132 | si = new ServerItemcxx . . $ ServerItem#(); |
| 133 | unsigned char * dest; |
| 134 | if(i == 1) |
| 135 | dest = ipaddr; |
| 136 | else if(i == 0) |
| 137 | dest = name; |
| 138 | j = 0; |
| 139 | while(*p != ']' && p < ((char *)msg + length)) |
| 140 | { |
| 141 | if((i == 1 && j < 15) || (i == 0 && j < 19)) |
| 142 | dest[j++] = *p; |
| 143 | p++; |
| 144 | } |
| 145 | if(i == 0 || i == 1) |
| 146 | { |
| 147 | dest[j++] = 0x00; |
| 148 | } |
| 149 | p += 2; |
| 150 | if(i == 1) |
| 151 | { |
| 152 | strncpy(si->ipaddresscxx . . $ ServerItem#ipaddress., (const char *)ipaddr, 16); |
| 153 | si->namecxx . . $ ServerItem#name. =cxx . . $ QString#`operator=`(4f35bf974e7f8568). serverCodeccxx . . $ TygemConnection#serverCodec.->toUnicodecxx . . $ QTextCodec#toUnicode(22771b2711c76a3b).((char *)name, strlen((char *)name)); |
| 154 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("Server: %s", ipaddr); |
| 155 | serverListcxx . . $ TygemConnection#serverList..push_backcxx . . $ std/vector#push_back(77d9f17553126ecb).(si); |
| 156 | } |
| 157 | i++; |
| 158 | if(i == 7) |
| 159 | p--; //no space |
| 160 | } |
| 161 | } |
| 162 | else if(strncmp(p, "/ENCRYPT ", 9) == 0) |
| 163 | { |
| 164 | //FIXME |
| 165 | //[encode] [on] |
| 166 | } |
| 167 | } |
| 168 | /* We close here because this first time, its going to close |
| 169 | * anyway, and if we don't close here, we'll get an error |
| 170 | * and lose the object */ |
| 171 | setStatecxx . . $ NetworkConnection#setState(41e728cff2b23034).(Reconnectingcxx . . $ Reconnecting.); |
| 172 | closeConnectioncxx . . $ NetworkConnection#closeConnection(b45ddcbc8423892c).(false); |
| 173 | |
| 174 | if(reconnectToServercxx . . $ TygemConnection#reconnectToServer(b126dc7c1de90089).() < 0) |
| 175 | { |
| 176 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("User canceled"); |
| 177 | closeConnectioncxx . . $ NetworkConnection#closeConnection(b45ddcbc8423892c).(false); |
| 178 | setStatecxx . . $ NetworkConnection#setState(41e728cff2b23034).(Canceledcxx . . $ Canceled.); |
| 179 | //if(dispatch) |
| 180 | // dispatch->onError(); //not great... FIXME |
| 181 | return; |
| 182 | } |
| 183 | //sendLogin(); |
| 184 | } |
| 185 | |
| 186 | QByteArraycxx . . $ QByteArray# TomConnectioncxx . . $ TomConnection#::getTygemGameRecordQByteArraycxx . . $ TomConnection#getTygemGameRecordQByteArray(921a24916160e04).(GameDatacxx . . $ GameData# * game) |
| 187 | { |
| 188 | Roomcxx . . $ Room# * room = getDefaultRoomcxx . . $ NetworkConnection#getDefaultRoom(93e93f117be81b18).(); |
| 189 | const PlayerListingcxx . . $ PlayerListing# * black, * white; |
| 190 | int black_ordinal, white_ordinal; |
| 191 | char black_qualifier, white_qualifier; |
| 192 | QByteArraycxx . . $ QByteArray# white_qualifier_stringcxx . . $ QByteArray#QByteArray(ced63f7c635d850d)., black_qualifier_stringcxx . . $ QByteArray#QByteArray(ced63f7c635d850d).; |
| 193 | unsigned char black_level, white_level; |
| 194 | unsigned short year; |
| 195 | unsigned char month, day, hour, minute, second; |
| 196 | secondsToDatecxx . . $ TygemConnection#secondsToDate(4b79e85d1d97ff5b).(year, month, day, hour, minute, second); |
| 197 | |
| 198 | int margin = 0; |
| 199 | |
| 200 | black = room->getPlayerListingcxx . . $ Room#getPlayerListing(d3f53ac2de9f0b45).(game->black_namecxx . . $ GameData#black_name.); |
| 201 | white = room->getPlayerListingcxx . . $ Room#getPlayerListing(d3f53ac2de9f0b45).(game->white_namecxx . . $ GameData#white_name.); |
| 202 | sscanf(black->rankcxx . . $ PlayerListing#rank..toLatin1cxx . . $ QString#toLatin1(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).(), "%d%c", &black_ordinal, &black_qualifier); |
| 203 | if(black_qualifier == 'k') |
| 204 | { |
| 205 | black_level = 0x12 - black_ordinal; |
| 206 | black_qualifier_string.appendcxx . . $ QByteArray#append(715145f812399bcb).("\xbc\xb6"); |
| 207 | } |
| 208 | else if(black_qualifier == 'p') |
| 209 | black_level = black_ordinal + 0x1a; |
| 210 | else |
| 211 | { |
| 212 | black_level = black_ordinal + 0x11; |
| 213 | //double check that this isn't the pro tag? |
| 214 | black_qualifier_string.appendcxx . . $ QByteArray#append(715145f812399bcb).("\xb6\xce"); |
| 215 | } |
| 216 | sscanf(white->rankcxx . . $ PlayerListing#rank..toLatin1cxx . . $ QString#toLatin1(ef52b713090bc85a).().constDatacxx . . $ QByteArray#constData(a9f41ea0e82d88cf).(), "%d%c", &white_ordinal, &white_qualifier); |
| 217 | if(white_qualifier == 'k') |
| 218 | { |
| 219 | white_level = 0x12 - white_ordinal; |
| 220 | white_qualifier_string.appendcxx . . $ QByteArray#append(715145f812399bcb).("\xbc\xb6"); |
| 221 | } |
| 222 | else if(white_qualifier == 'p') |
| 223 | white_level = white_ordinal + 0x1a; |
| 224 | else |
| 225 | { |
| 226 | white_level = white_ordinal + 0x11; |
| 227 | white_qualifier_string.appendcxx . . $ QByteArray#append(715145f812399bcb).("\xb6\xce"); |
| 228 | } |
| 229 | |
| 230 | QByteArraycxx . . $ QByteArray# stringcxx . . $ QByteArray#QByteArray(ced63f7c635d850d).; |
| 231 | /* GIBOKIND and GAMELECNAME and maybe some others are missing |
| 232 | * from Tom record, so there's a question of whether that's only |
| 233 | * in the 0672s and is left out of the records or whether that's |
| 234 | * just not part of Tom. I do get the feeling that, except for |
| 235 | * a few particular entries, we can be pretty easy going with |
| 236 | * this */ |
| 237 | //string += "\\[GIBOKIND=China\\]\r\n"; //I don't see this in file, necessary? |
| 238 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[TYPE=0\\]\r\n"; |
| 239 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMECONDITION="; |
| 240 | string.appendcxx . . $ QByteArray#append(715145f812399bcb).("\xc8\xce\xcf\xc8"); |
| 241 | //c8c3cfc8 seems suffient for a finished |
| 242 | //game |
| 243 | //I think cbc0bbee313ab7d6 is possibly |
| 244 | //some unfinished game or something |
| 245 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\]\r\n"; |
| 246 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMETIME="; |
| 247 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\]\r\n"; |
| 248 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMERESULT="; //3f3332353f3f //w + 325 margin ONLY, no color |
| 249 | //badac6e5cab1bce4caa4 B + T |
| 250 | //b0d7c6e5d6d0c5cccaa4 W + R |
| 251 | //bada38d4d6332f34d7d3caa4 B + margin? |
| 252 | switch(game->fullresultcxx . . $ GameData#fullresult.->resultcxx . . $ GameResult#result.) |
| 253 | { |
| 254 | case GameResultcxx . . $ GameResult#::DRAWcxx . . $ GameResult#DRAW.: |
| 255 | //string += QString(0xb9ab) + QString(0xbdc2) + QString(0xbace); |
| 256 | break; |
| 257 | case GameResultcxx . . $ GameResult#::FORFEITcxx . . $ GameResult#FORFEIT.: |
| 258 | //c8e6 20 bdc3 b0a3 20 c3ca b0fa bdc2 |
| 259 | |
| 260 | break; |
| 261 | case GameResultcxx . . $ GameResult#::TIMEcxx . . $ GameResult#TIME.: |
| 262 | break; |
| 263 | case GameResultcxx . . $ GameResult#::RESIGNcxx . . $ GameResult#RESIGN.: |
| 264 | if(game->fullresultcxx . . $ GameData#fullresult.->winner_colorcxx . . $ GameResult#winner_color. == stoneWhitecxx . . $ stoneWhite.) |
| 265 | { |
| 266 | //string += QString(0xb9e9); |
| 267 | } |
| 268 | else |
| 269 | { |
| 270 | //string += QString(0xc8e6); |
| 271 | } |
| 272 | //string += " " + QString(0xbad2) + QString(0xb0e8) + QString(0xbdc2); |
| 273 | break; |
| 274 | case GameResultcxx . . $ GameResult#::SCOREcxx . . $ GameResult#SCORE.: |
| 275 | { |
| 276 | float fmargin = game->fullresultcxx . . $ GameData#fullresult.->winner_scorecxx . . $ GameResult#winner_score. = game->fullresultcxx . . $ GameData#fullresult.->loser_scorecxx . . $ GameResult#loser_score.; |
| 277 | margin = (int)fmargin; |
| 278 | if(fmargin > (float)margin) |
| 279 | margin = (margin * 10) + 5; |
| 280 | else |
| 281 | margin *= 10; |
| 282 | qDebugcxx . . $ `<external>/10450329605257866924/qlogging.h:164:9`!("FIXME margin: %d\n", margin); |
| 283 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(margin); |
| 284 | //string += QString(0x3f) + " " + QByteArray::number(margin) + |
| 285 | // QString(0x3f3f) + " " + QString(0x3f); |
| 286 | } |
| 287 | break; |
| 288 | default: |
| 289 | break; |
| 290 | } |
| 291 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\]\r\n"; |
| 292 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEZIPSU=" +cxx . . $ operator+(c76e440e68d4afec). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(margin) +cxx . . $ operator+(8f17b704cda0d21f). "\\]\r\n"; |
| 293 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMEDUM=0\\]\r\n"; |
| 294 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMEGONGJE=0\\]\r\n"; |
| 295 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMETOTALNUM="; //0xd7dc: 3335cafd" 35? |
| 296 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). " " +cxx . . $ operator+(c76e440e68d4afec). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(7a8a8d4503ae8074).(game->movescxx . . $ GameData#moves.); |
| 297 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\]\r\n"; |
| 298 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[SZAUDIO=0\\]\r\n"; |
| 299 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMENAME="; |
| 300 | string.appendcxx . . $ QByteArray#append(715145f812399bcb).("\xd3\xd1\xd2\xea\xb6\xd4\xbe\xd6\\]\r\n"); |
| 301 | //cdfd bdb5 bcb6 b6d4 bed6 5c5d //a broadcast game I saw |
| 302 | /* Be careful here also, no idea what this says, we should |
| 303 | * probably leave it blank */ |
| 304 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEDATE=" +cxx . . $ operator+(c76e440e68d4afec). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(year) +cxx . . $ operator+(8f17b704cda0d21f). "-"; |
| 305 | string.appendcxx . . $ QByteArray#append(715145f812399bcb).("\xc4\xea"); |
| 306 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(month) +cxx . . $ operator+(49e2485dc0bda598). |
| 307 | string.appendcxx . . $ QByteArray#append(715145f812399bcb).("xd4\xc2"); |
| 308 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(day); |
| 309 | string.appendcxx . . $ QByteArray#append(715145f812399bcb).("\xc8\xd5"); |
| 310 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). " "; /*+ QString(0xcfc2) + |
| 311 | QString(0xcee7) */ |
| 312 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). " " +cxx . . $ operator+(c76e440e68d4afec). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(hour % 12) +cxx . . $ operator+(8f17b704cda0d21f). |
| 313 | (minute < 10 ? ":0" : ":") +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(minute) +cxx . . $ operator+(8f17b704cda0d21f). "\\]\r\n"; |
| 314 | /* Note that its very likely that one of the above strings contains a PM versus |
| 315 | * AM */ |
| 316 | const unsigned char tom_game_place_array[] = {0x54, 0x6f, 0x6d, 0xb6, 0xd4, 0xde, 0xc4}; |
| 317 | QByteArraycxx . . $ QByteArray# tom_game_placecxx . . $ QByteArray#QByteArray(34d26762b42c433a).((const char *)tom_game_place_array, 7); |
| 318 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEPLACE=" +cxx . . $ operator+(c76e440e68d4afec). tom_game_place +cxx . . $ operator+(8f17b704cda0d21f). "\\]\r\n"; |
| 319 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMELECNAME=\\]\r\n"; |
| 320 | /* FIXME, note that this is very likely going to be different on the korean |
| 321 | * server. This is for eweiqi really */ |
| 322 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEWHITENAME=" +cxx . . $ operator+(c76e440e68d4afec). serverCodeccxx . . $ TygemConnection#serverCodec.->fromUnicodecxx . . $ QTextCodec#fromUnicode(e72629479c734b12).(white->notnicknamecxx . . $ PlayerListing#notnickname.) +cxx . . $ operator+(8f17b704cda0d21f). "(" |
| 323 | +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(white_ordinal) |
| 324 | +cxx . . $ operator+(49e2485dc0bda598). white_qualifier_string +cxx . . $ operator+(8f17b704cda0d21f). ")\\]\r\n"; |
| 325 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEWHITELEVEL=" +cxx . . $ operator+(c76e440e68d4afec). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(white_level) |
| 326 | +cxx . . $ operator+(49e2485dc0bda598). white_qualifier_string +cxx . . $ operator+(8f17b704cda0d21f). "\\]\r\n"; |
| 327 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEWHITENICK=" +cxx . . $ operator+(c76e440e68d4afec). serverCodeccxx . . $ TygemConnection#serverCodec.->fromUnicodecxx . . $ QTextCodec#fromUnicode(e72629479c734b12).(white->namecxx . . $ PlayerListing#name.) +cxx . . $ operator+(8f17b704cda0d21f). "\\]\r\n"; |
| 328 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEWHITECOUNTRY=" +cxx . . $ operator+(c76e440e68d4afec). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(white->country_idcxx . . $ PlayerListing#country_id.) +cxx . . $ operator+(8f17b704cda0d21f). "\\]\r\n"; |
| 329 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMEWAVATA=1\\]\r\n"; |
| 330 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMEWIMAGE=\\]\r\n"; |
| 331 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEBLACKNAME=" +cxx . . $ operator+(c76e440e68d4afec). serverCodeccxx . . $ TygemConnection#serverCodec.->fromUnicodecxx . . $ QTextCodec#fromUnicode(e72629479c734b12).(black->notnicknamecxx . . $ PlayerListing#notnickname.) +cxx . . $ operator+(8f17b704cda0d21f). "(" |
| 332 | +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(black_ordinal) |
| 333 | +cxx . . $ operator+(49e2485dc0bda598). black_qualifier_string +cxx . . $ operator+(8f17b704cda0d21f). ")\\]\r\n"; |
| 334 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEBLACKLEVEL=" +cxx . . $ operator+(c76e440e68d4afec). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(black_level) |
| 335 | +cxx . . $ operator+(49e2485dc0bda598). black_qualifier_string +cxx . . $ operator+(8f17b704cda0d21f). "\\]\r\n"; |
| 336 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEBLACKNICK=" +cxx . . $ operator+(c76e440e68d4afec). serverCodeccxx . . $ TygemConnection#serverCodec.->fromUnicodecxx . . $ QTextCodec#fromUnicode(e72629479c734b12).(black->namecxx . . $ PlayerListing#name.) +cxx . . $ operator+(8f17b704cda0d21f). "\\]\r\n"; |
| 337 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEBLACKCOUNTRY=" +cxx . . $ operator+(c76e440e68d4afec). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(black->country_idcxx . . $ PlayerListing#country_id.) +cxx . . $ operator+(8f17b704cda0d21f). "\\]\r\n"; |
| 338 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMEBAVATA=1\\]\r\n"; |
| 339 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMEBIMAGE=\\]\r\n"; |
| 340 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMECOMMENT=\\]\r\n"; |
| 341 | //country = 2 = gbkind = gibokind |
| 342 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[GAMEINFOMAIN=GBKIND:2,GTYPE:0,GCDT:1,GTIME:" +cxx . . $ operator+(c76e440e68d4afec). |
| 343 | QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(game->maintimecxx . . $ GameData#maintime.) +cxx . . $ operator+(8f17b704cda0d21f). "-" +cxx . . $ operator+(49e2485dc0bda598). |
| 344 | QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(game->periodtimecxx . . $ GameData#periodtime.) +cxx . . $ operator+(8f17b704cda0d21f). "-" +cxx . . $ operator+(49e2485dc0bda598). |
| 345 | QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(game->stones_periodscxx . . $ GameData#stones_periods.) +cxx . . $ operator+(8f17b704cda0d21f). ",GRLT:0"; |
| 346 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). ",ZIPSU:" +cxx . . $ operator+(c76e440e68d4afec). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(margin) +cxx . . $ operator+(8f17b704cda0d21f). |
| 347 | ",DUM:0,GONGJE:0,TCNT:" +cxx . . $ operator+(49e2485dc0bda598). |
| 348 | QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(7a8a8d4503ae8074).(game->movescxx . . $ GameData#moves.); |
| 349 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). ",AUSZ:0\\]\r\n"; |
| 350 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). "\\[GAMEINFOSUB=GNAMEF:0,GPLCF:0,GNAME:"; |
| 351 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "GDATE:" +cxx . . $ operator+(c76e440e68d4afec). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(year) +cxx . . $ operator+(8f17b704cda0d21f). "- " +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(month) |
| 352 | +cxx . . $ operator+(8f17b704cda0d21f). "- " +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(day) +cxx . . $ operator+(8f17b704cda0d21f). "-" +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(hour) |
| 353 | +cxx . . $ operator+(8f17b704cda0d21f). "-" +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(minute) +cxx . . $ operator+(8f17b704cda0d21f). "-" +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(second); |
| 354 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). ",GPLC:"; |
| 355 | string +=cxx . . $ QByteArray#`operator+=`(715145f812399bcb). ",GCMT:\\]\r\n"; |
| 356 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[WUSERINFO=WID:" +cxx . . $ operator+(c76e440e68d4afec). serverCodeccxx . . $ TygemConnection#serverCodec.->fromUnicodecxx . . $ QTextCodec#fromUnicode(e72629479c734b12).(white->notnicknamecxx . . $ PlayerListing#notnickname.) +cxx . . $ operator+(8f17b704cda0d21f). ",WLV:" +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(white_level) +cxx . . $ operator+(8f17b704cda0d21f). |
| 357 | ",WNICK:" +cxx . . $ operator+(49e2485dc0bda598). serverCodeccxx . . $ TygemConnection#serverCodec.->fromUnicodecxx . . $ QTextCodec#fromUnicode(e72629479c734b12).(white->namecxx . . $ PlayerListing#name.) +cxx . . $ operator+(8f17b704cda0d21f). ",WNCD:" +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(white->country_idcxx . . $ PlayerListing#country_id.) +cxx . . $ operator+(8f17b704cda0d21f). |
| 358 | ",WAID:60001,WIMG:\\]\r\n"; |
| 359 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). "\\[BUSERINFO=BID:" +cxx . . $ operator+(c76e440e68d4afec). serverCodeccxx . . $ TygemConnection#serverCodec.->fromUnicodecxx . . $ QTextCodec#fromUnicode(e72629479c734b12).(black->notnicknamecxx . . $ PlayerListing#notnickname.) +cxx . . $ operator+(8f17b704cda0d21f). ",BLV:" +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(black_level) +cxx . . $ operator+(8f17b704cda0d21f). |
| 360 | ",BNICK:" +cxx . . $ operator+(49e2485dc0bda598). serverCodeccxx . . $ TygemConnection#serverCodec.->fromUnicodecxx . . $ QTextCodec#fromUnicode(e72629479c734b12).(black->namecxx . . $ PlayerListing#name.) +cxx . . $ operator+(8f17b704cda0d21f). ",BNCD:" +cxx . . $ operator+(49e2485dc0bda598). QByteArraycxx . . $ QByteArray#::numbercxx . . $ QByteArray#number(4869bc8897d11479).(black->country_idcxx . . $ PlayerListing#country_id.) +cxx . . $ operator+(8f17b704cda0d21f). |
| 361 | ",BAID:60001,BIMG:\\]\r\n"; |
| 362 | /* Here, I'm thinking S0 is black wins, S1 is white wins |
| 363 | * then again, there's also W1 indicating white win with W0 as white loss */ |
| 364 | /* I've also seen W4 as indicating W + R */ |
| 365 | /* I've also seen S1 W7 as B + T also with Z0 indicating that's time remaining |
| 366 | * or something */ |
| 367 | /* T is likely time settings, 30 seconds, 3 periods, 1200 total time maybe (20min)*/ |
| 368 | string +=cxx . . $ QByteArray#`operator+=`(85c7caed82076bbb). getTygemGameTagQByteArraycxx . . $ TygemConnection#getTygemGameTagQByteArray(aa2910e9f95d7575).(game, white_level, black_level, margin); |
| 369 | //tag is simple of earlier info |
| 370 | |
| 371 | return stringcxx . . $ QByteArray#QByteArray(9f1b912973d89fea).; |
| 372 | } |