Add debugging messages

master
sigonasr2 5 years ago
parent cb8b325578
commit fafad3f6b9
  1. 2
      sessions
  2. BIN
      sigIRCv2.jar
  3. 1
      src/sig/modules/RabiRace/Profile.java
  4. 2
      src/sig/modules/RabiRace/SessionListWindow.java
  5. 10
      src/sig/modules/RabiRaceModule.java
  6. 37
      tmp_profile

@ -1 +1 @@
55,1584288695,1584288795,SigoNitori's Race,4,none,sigonitori,5.00,0,5,true 61,1584295899,1584297456,SigoNitori's Race,4,none,trimead;sigonitori,5.00,0,5,true

Binary file not shown.

@ -322,6 +322,7 @@ public class Profile {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
FileUtils.logToFile("["+System.currentTimeMillis()+"]Upload profile. "+"http://45.33.13.215/rabirace/send.php?key=playerdata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+sigIRC.nickname.toLowerCase()+"&data="+getDataString(), "debug.log");
//System.out.println(getDataString()); //System.out.println(getDataString());
//String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"tmp"); //String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"tmp");

@ -208,6 +208,8 @@ public class SessionListWindow extends JFrame{
} }
count++; count++;
} }
FileUtils.logToFile("["+System.currentTimeMillis()+"]Updated sessions listing.", "debug.log");
//System.out.println("Selected is "+selected); //System.out.println("Selected is "+selected);
//Try to find ID in list. //Try to find ID in list.
} }

@ -116,6 +116,10 @@ public class RabiRaceModule extends Module{
} }
private void Initialize() { private void Initialize() {
File f = new File("debug.log");
f.delete();
CheckRabiRibiClient(); CheckRabiRibiClient();
VerifyClientIsValid(); //If the client is not allowed to send data, we need to know that. VerifyClientIsValid(); //If the client is not allowed to send data, we need to know that.
@ -124,6 +128,7 @@ public class RabiRaceModule extends Module{
scheduler.scheduleWithFixedDelay(()->{ scheduler.scheduleWithFixedDelay(()->{
CheckRabiRibiClient(); CheckRabiRibiClient();
if (foundRabiRibi) { if (foundRabiRibi) {
FileUtils.logToFile("["+System.currentTimeMillis()+"]Start update cycle...", "debug.log");
myProfile.uploadProfile(); myProfile.uploadProfile();
getSessionList(); getSessionList();
getMessageUpdates(); getMessageUpdates();
@ -131,6 +136,7 @@ public class RabiRaceModule extends Module{
firstCheck=true; firstCheck=true;
if (mySession!=null) { if (mySession!=null) {
RequestData("tmp.data","key=keepalivesession&session="+mySession.getID()); RequestData("tmp.data","key=keepalivesession&session="+mySession.getID());
FileUtils.logToFile("["+System.currentTimeMillis()+"]Requested data"+"key=keepalivesession&session="+mySession.getID(), "debug.log");
} }
} }
}, 5000, 5000, TimeUnit.MILLISECONDS); }, 5000, 5000, TimeUnit.MILLISECONDS);
@ -243,6 +249,7 @@ public class RabiRaceModule extends Module{
e.printStackTrace(); e.printStackTrace();
} }
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/messages"); String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/messages");
FileUtils.logToFile("["+System.currentTimeMillis()+"]Message updates."+"http://45.33.13.215/rabirace/send.php?key=getupdates&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+myProfile.username+" Data: "+Arrays.deepToString(data), "debug.log");
//boolean message_played=false; //boolean message_played=false;
for (String s : data) { for (String s : data) {
if (s.length()>0) { if (s.length()>0) {
@ -254,6 +261,7 @@ public class RabiRaceModule extends Module{
if (mySession!=null && mySession.isCoop()) { if (mySession!=null && mySession.isCoop()) {
syncItems=true; syncItems=true;
} }
FileUtils.logToFile("Add "+s+" to message queue.", "debug.log");
} }
} }
if (mySession!=null) { if (mySession!=null) {
@ -284,6 +292,7 @@ public class RabiRaceModule extends Module{
lastreadmapdata=Math.max(i,lastreadmapdata); lastreadmapdata=Math.max(i,lastreadmapdata);
} }
} }
FileUtils.logToFile("["+System.currentTimeMillis()+"]MapUpdates:"+MapUpdatesRequired+" - "+byWhom, "debug.log");
if (MapUpdatesRequired>0) { if (MapUpdatesRequired>0) {
if (MapUpdatesRequired==1) { if (MapUpdatesRequired==1) {
@ -422,6 +431,7 @@ public class RabiRaceModule extends Module{
} else { } else {
join_button.setButtonLabel("Leave Session"); join_button.setButtonLabel("Leave Session");
} }
FileUtils.logToFile("["+System.currentTimeMillis()+"]Retrieve session list."+"http://45.33.13.215/rabirace/send.php?key=getsessions", "debug.log");
window.UpdateSessionList(); window.UpdateSessionList();
} }

@ -1,36 +1,25 @@
SigoNitori SigoNitori
10 10
1584288679 1584297434
106823 168252
0101110110000010001010100000000000000000000000000000000000000000 0000000000000000001010100000000000000000000000000000000000000000
1101010000000100000010000000000000000000000000000000000000000000 1100000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
0100000000000000000000000000000000000000000000000000000000000000 0100000000000000000000000000000000000000000000000000000000000000
0101000100100000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000
2
false
1 1
false
5
1 1
19.066666 4.1666665
11.553846 2.5846155
1584288801 1584297463
KEYITEMS: KEYITEMS:
RIBBON;1 RIBBON;1
HAMMER;1
SLIDING_POWDER;1
CARROT_BOMB;1 CARROT_BOMB;1
SPEED_BOOST;3
RABI_SLIPPERS;1
BUNNY_WHIRL;1
SUNNY_BEAM;1
BUNNY_STRIKE;1
BUNNY_AMULET;1
BADGES: BADGES:
BADGE_HEALTH_PLUS;2 BADGE_DEF_TRADE;1
BADGE_DEF_GROW;1
BADGE_ATK_TRADE;2
BADGE_WEAKEN;1
UPDATES: UPDATES:
1_1_0_0_1_1_1_0_0_1_0_0_0_0_0_0_0_0_0_0_0_0_0_0_1_1_0_1_0_0_0_0_0_0_1_0_0_0_0_0_0_0_1_0_0_0_0_0_0_0_0_1_0_0_0_1_0_0_0_0_0_0_0_0_0_1_1_1_0_0_1_1_1_1_1_1_0_0_1_0_0_1_0_0_0_0_0_0_0_0_0_0_1_0_0_1_0_1_0_0_0_1_0_0_0_0_0_0_0_0_0_1_0_0_0_0_0_1_1_0_0_1_1_0_0_0_1_0_1_0_0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