Fix domain URL pointers.
This commit is contained in:
parent
fad14b1843
commit
03b405afb7
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -9,7 +9,7 @@ import sig.utils.DebugUtils;
|
||||
|
||||
public class FileManager {
|
||||
String fileloc;
|
||||
final String serverURL = "http://45.33.13.215/sigIRCv2/";
|
||||
final String serverURL = "http://45.33.13.215:8080/sigIRCv2/";
|
||||
boolean folder=false;
|
||||
|
||||
public FileManager(String location) {
|
||||
|
@ -25,7 +25,11 @@ import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowListener;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.sound.sampled.AudioSystem;
|
||||
import javax.sound.sampled.LineUnavailableException;
|
||||
import javax.sound.sampled.Mixer;
|
||||
import javax.swing.JColorChooser;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPanel;
|
||||
@ -93,6 +97,12 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
||||
lastMouseY = -1;
|
||||
}*/
|
||||
//
|
||||
//AudioSystem.getMixerInfo()[0].
|
||||
/*for (Mixer.Info i : AudioSystem.getMixerInfo()) {
|
||||
System.out.println(i+": "+AudioSystem.getMixer(i).isOpen());
|
||||
}*/
|
||||
//System.out.println(Audio.getMasterOutputVolume());
|
||||
|
||||
for (Module m : sigIRC.modules) {
|
||||
m.draw(g);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public class JoinButton extends ClickableButton{
|
||||
//RabiRaceModule.module.LeaveSession();
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/tmp.data");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=leavesession&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+RabiRaceModule.module.myProfile.username+"&session="+RabiRaceModule.mySession.id),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=leavesession&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+RabiRaceModule.module.myProfile.username+"&session="+RabiRaceModule.mySession.id),file);
|
||||
RabiRaceModule.mySession=null;
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -271,7 +271,7 @@ public class Profile {
|
||||
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/tmp.data");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=addupdate&session="+RabiRaceModule.mySession.id+"&message="+string),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=addupdate&session="+RabiRaceModule.mySession.id+"&message="+string),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
@ -385,13 +385,13 @@ public class Profile {
|
||||
if (sigIRC.authenticated) {
|
||||
File file = new File(sigIRC.BASEDIR+"tmp2");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=playerdata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+sigIRC.nickname.toLowerCase()+"&data="+getDataString()),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=playerdata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+sigIRC.nickname.toLowerCase()+"&data="+getDataString()),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
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");
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Upload profile. "+"http://45.33.13.215:8080/rabirace/send.php?key=playerdata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+sigIRC.nickname.toLowerCase()+"&data="+getDataString(), "debug.log");
|
||||
|
||||
//System.out.println(getDataString());
|
||||
//String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"tmp");
|
||||
@ -403,13 +403,13 @@ public class Profile {
|
||||
if (sigIRC.authenticated) {
|
||||
File file = new File(sigIRC.BASEDIR+"tmp_profile");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=retrievedata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&retrievename="+username.toLowerCase()+"&name="+sigIRC.nickname.toLowerCase()),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=retrievedata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&retrievename="+username.toLowerCase()+"&name="+sigIRC.nickname.toLowerCase()),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Download profile w/settings: "+"http://45.33.13.215/rabirace/send.php?key=retrievedata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&retrievename="+username.toLowerCase()+"&name="+sigIRC.nickname.toLowerCase(), "debug2.log");
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Download profile w/settings: "+"http://45.33.13.215:8080/rabirace/send.php?key=retrievedata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&retrievename="+username.toLowerCase()+"&name="+sigIRC.nickname.toLowerCase(), "debug2.log");
|
||||
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"tmp_profile");
|
||||
//System.out.println(Arrays.toString(data));
|
||||
if (data.length>=23) {
|
||||
|
@ -219,9 +219,9 @@ public class SessionCreateWindow extends JFrame{
|
||||
sessionText = sessionText.replaceAll(" ", "%20");
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/tmp.data");
|
||||
try {
|
||||
//System.out.println("Write to "+"http://45.33.13.215/rabirace/send.php?key=sessioncreate&name="+sessionText+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")+"&difficulty="+((difficulty.getText().length()>0)?difficulty.getText():"-1")+"&mode="+GetModeIndex()+"&extradata="+GetModeData());
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=sessioncreate&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+RabiRaceModule.module.myProfile.username+"&roomname="+sessionText+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")+"&difficulty="+((difficulty.getText().length()>0)?difficulty.getText():"-1")+"&mode="+GetModeIndex()+"&extradata="+GetModeData()+"&coop="+GetCoopValue()),file);
|
||||
//org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=sessioncreate&name="+session_name.getText()+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")),file);
|
||||
//System.out.println("Write to "+"http://45.33.13.215:8080/rabirace/send.php?key=sessioncreate&name="+sessionText+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")+"&difficulty="+((difficulty.getText().length()>0)?difficulty.getText():"-1")+"&mode="+GetModeIndex()+"&extradata="+GetModeData());
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=sessioncreate&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+RabiRaceModule.module.myProfile.username+"&roomname="+sessionText+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")+"&difficulty="+((difficulty.getText().length()>0)?difficulty.getText():"-1")+"&mode="+GetModeIndex()+"&extradata="+GetModeData()+"&coop="+GetCoopValue()),file);
|
||||
//org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=sessioncreate&name="+session_name.getText()+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")),file);
|
||||
String[] contents = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/tmp.data");
|
||||
int sessionID=-1;
|
||||
if (contents.length>=2) {
|
||||
|
@ -148,7 +148,7 @@ public class SessionListWindow extends JFrame{
|
||||
hashedPass="none";
|
||||
}
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/tmp_session.data");
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=joinsession&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+RabiRaceModule.module.myProfile.username+"&session="+session.id+"&password="+hashedPass),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=joinsession&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+RabiRaceModule.module.myProfile.username+"&session="+session.id+"&password="+hashedPass),file);
|
||||
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/tmp_session.data");
|
||||
|
||||
if (data.length==1) {
|
||||
|
@ -244,7 +244,7 @@ public class RabiRaceModule extends Module{
|
||||
private void RequestData(String filename,String requestString) {
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/"+filename);
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?"+requestString),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?"+requestString),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
@ -281,14 +281,14 @@ public class RabiRaceModule extends Module{
|
||||
private void getMessageUpdates() {
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/messages");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=getupdates&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+myProfile.username),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=getupdates&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+myProfile.username),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
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");
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Message updates."+"http://45.33.13.215:8080/rabirace/send.php?key=getupdates&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+myProfile.username+" Data: "+Arrays.deepToString(data), "debug.log");
|
||||
//boolean message_played=false;
|
||||
for (String s : data) {
|
||||
if (s.length()>0) {
|
||||
@ -306,7 +306,7 @@ public class RabiRaceModule extends Module{
|
||||
if (mySession!=null) {
|
||||
File file2 = new File(sigIRC.BASEDIR+"mapdata");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/maps/"+mySession.getID()),file2);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/maps/"+mySession.getID()),file2);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
@ -356,7 +356,7 @@ public class RabiRaceModule extends Module{
|
||||
mapdata.put(id,color);
|
||||
File file2 = new File(sigIRC.BASEDIR+"tmp_mapdata");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?session="+mySession.getID()+"&key=addmappoint&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&mappoint="+myProfile.username+";"+id+";"+color),file2);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?session="+mySession.getID()+"&key=addmappoint&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&mappoint="+myProfile.username+";"+id+";"+color),file2);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
@ -480,7 +480,7 @@ public class RabiRaceModule extends Module{
|
||||
public void getSessionList() {
|
||||
File file = new File(sigIRC.BASEDIR+"sessions");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=getsessions"),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=getsessions"),file);
|
||||
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"sessions");
|
||||
//System.out.println("Data is "+Arrays.toString(data));
|
||||
session_listing.UpdateData(data);
|
||||
@ -492,7 +492,7 @@ public class RabiRaceModule extends Module{
|
||||
} else {
|
||||
join_button.setButtonLabel("Leave Session");
|
||||
}
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Retrieve session list."+"http://45.33.13.215/rabirace/send.php?key=getsessions", "debug.log");
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Retrieve session list."+"http://45.33.13.215:8080/rabirace/send.php?key=getsessions", "debug.log");
|
||||
window.UpdateSessionList();
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,7 @@ public class TwitchModule extends Module{
|
||||
Follower user = new Follower("0","I am an awesome test subject.",
|
||||
new Date().toString(),
|
||||
"Test User"+((int)Math.random()*100000),
|
||||
"http://45.33.13.215/sigIRCv2/sigIRC/sigIRCicon.png",
|
||||
"http://45.33.13.215:8080/sigIRCv2/sigIRC/sigIRCicon.png",
|
||||
"Test User",
|
||||
"",
|
||||
new Date().toString());
|
||||
|
@ -8,8 +8,11 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Reader;
|
||||
import java.io.Writer;
|
||||
import java.net.ConnectException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
@ -17,6 +20,7 @@ import java.nio.channels.Channels;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.channels.ReadableByteChannel;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -250,7 +254,6 @@ public class FileUtils {
|
||||
logToFile(message,filename,false);
|
||||
}
|
||||
}
|
||||
|
||||
public static void logToFile(String message, String filename, boolean outputToChatLog) {
|
||||
File file = new File(filename);
|
||||
try {
|
||||
@ -258,9 +261,9 @@ public class FileUtils {
|
||||
if (!file.exists()) {
|
||||
file.createNewFile();
|
||||
}
|
||||
|
||||
FileWriter fw = new FileWriter(file, true);
|
||||
PrintWriter pw = new PrintWriter(fw);
|
||||
OutputStream out = new FileOutputStream(file,true);
|
||||
Writer writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);
|
||||
PrintWriter pw = new PrintWriter(writer);
|
||||
|
||||
pw.println(message);
|
||||
pw.flush();
|
||||
|
Loading…
x
Reference in New Issue
Block a user