package sig.modules; import java.awt.Graphics; import java.awt.Rectangle; import java.io.File; import java.io.IOException; import java.util.Calendar; import org.json.JSONException; import org.json.JSONObject; import sig.CustomSound; import sig.Module; import sig.TextRow; import sig.sigIRC; import sig.utils.FileUtils; import sig.windows.ProgramWindow; public class ScrollingChatModule extends Module{ final static int MSGTIMER = 300; final static int AUTOSAVETIMER = 600; int last_authentication_msg = MSGTIMER; int last_autosave = AUTOSAVETIMER; public static ScrollingChatModule module; public ScrollingChatModule(Rectangle bounds, String moduleName) { super(bounds, moduleName); ScrollingChatModule.module = this; String[] filedata = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/oauthToken.txt"); for (int i=0;i=MSGTIMER) { last_authentication_msg=0; if (!sigIRC.authenticated && !sigIRC.testMode) { sigIRC.panel.addMessage("SYSTEM: Your oauthToken was not successful. Please go to the sigIRC folder and make sure your oauthToken.txt file is correct!!! SwiftRage",!sigIRC.playedoAuthSoundOnce); if (!sigIRC.playedoAuthSoundOnce) { sigIRC.playedoAuthSoundOnce=true; } } else { sigIRC.panel.addMessage("SYSTEM: This is a test message for your testing convenience. mikansBox",!sigIRC.playedoAuthSoundOnce); } } if (last_autosave=AUTOSAVETIMER) { last_autosave=0; sigIRC.windowX = (int)sigIRC.window.getLocationOnScreen().getX(); sigIRC.windowY = (int)sigIRC.window.getLocationOnScreen().getY(); sigIRC.windowWidth = sigIRC.window.getWidth(); sigIRC.windowHeight = sigIRC.window.getHeight(); sigIRC.config.setInteger("windowX", sigIRC.windowX); sigIRC.config.setInteger("windowY", sigIRC.windowY); sigIRC.config.setInteger("windowWidth", sigIRC.windowWidth); sigIRC.config.setInteger("windowHeight", sigIRC.windowHeight); sigIRC.config.saveProperties(); } if (sigIRC.lastPlayedDing>0) { sigIRC.lastPlayedDing--; } } } public void UpdateScrollingText() { for (int i=0;i