Revision 5d50e7a7
Added by Leszek Koltunski over 5 years ago
| src/main/java/org/distorted/scores/RubikScoresDownloader.java | ||
|---|---|---|
| 206 | 206 |
} |
| 207 | 207 |
else |
| 208 | 208 |
{
|
| 209 |
if( row.startsWith("comm") )
|
|
| 209 |
tryDoCommand(row); |
|
| 210 |
} |
|
| 211 |
} |
|
| 212 |
|
|
| 213 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
| 214 |
|
|
| 215 |
private void tryDoCommand(String row) |
|
| 216 |
{
|
|
| 217 |
if( row.startsWith("comm") )
|
|
| 218 |
{
|
|
| 219 |
int colon = row.indexOf(':');
|
|
| 220 |
|
|
| 221 |
if( colon>0 ) |
|
| 210 | 222 |
{
|
| 211 |
int colon = row.indexOf(':');
|
|
| 223 |
String commandNumber = row.substring(4,colon); |
|
| 224 |
int number; |
|
| 225 |
|
|
| 226 |
try |
|
| 227 |
{
|
|
| 228 |
number = Integer.parseInt(commandNumber); |
|
| 229 |
} |
|
| 230 |
catch(NumberFormatException ex) |
|
| 231 |
{
|
|
| 232 |
number=0; |
|
| 233 |
} |
|
| 212 | 234 |
|
| 213 |
if( colon>0 )
|
|
| 235 |
if(number==1)
|
|
| 214 | 236 |
{
|
| 215 | 237 |
String country = row.substring(colon+1); |
| 216 | 238 |
RubikScores scores = RubikScores.getInstance(); |
Also available in: Unified diff
Allow the server to correct our notion of country (improvement)