Change refresh boundaries of modules. Remove spammy debug message.

Remove spammy follower messages from chat log module.
dev
sigonasr2 7 years ago
parent 38c354df54
commit 4dba8e502a
  1. BIN
      sigIRCv2.jar
  2. 2
      src/sig/Module.java
  3. 2
      src/sig/ScrollingText.java
  4. 2
      src/sig/modules/ChatLog/ChatLogMessage.java
  5. 2
      src/sig/modules/TwitchModule.java
  6. 8
      src/sig/utils/FileUtils.java

Binary file not shown.

@ -149,7 +149,7 @@ public class Module {
} }
private Rectangle2D getDrawBounds() { private Rectangle2D getDrawBounds() {
Rectangle2D drawBounds = new Rectangle((int)position.getX(),(int)position.getY()-titleHeight+3,(int)position.getWidth(),(int)position.getHeight()+titleHeight); Rectangle2D drawBounds = new Rectangle((int)position.getX()-2,(int)position.getY()-titleHeight+3-1,(int)position.getWidth()+2,(int)position.getHeight()+titleHeight+1);
return drawBounds; return drawBounds;
} }

@ -118,7 +118,7 @@ public class ScrollingText {
private void LogMessageToFile(String message) { private void LogMessageToFile(String message) {
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
FileUtils.logToFile(message, sigIRC.BASEDIR+"sigIRC/logs/log_"+(cal.get(Calendar.MONTH)+1)+"_"+cal.get(Calendar.DAY_OF_MONTH)+"_"+cal.get(Calendar.YEAR)+".txt"); FileUtils.logToFile(message, sigIRC.BASEDIR+"sigIRC/logs/log_"+(cal.get(Calendar.MONTH)+1)+"_"+cal.get(Calendar.DAY_OF_MONTH)+"_"+cal.get(Calendar.YEAR)+".txt",true);
} }
private Color GetUserNameColor(String username) { private Color GetUserNameColor(String username) {

@ -180,7 +180,7 @@ public class ChatLogMessage {
if (textWidth<maxWidth) { if (textWidth<maxWidth) {
marker = tempmarker+1; marker = tempmarker+1;
} }
System.out.println(msg.substring(0, marker)+" | "+textWidth); //System.out.println(msg.substring(0, marker)+" | "+textWidth);
} else { } else {
marker=msg.length(); marker=msg.length();
break; break;

@ -414,7 +414,7 @@ public class TwitchModule extends Module{
private void LogMessageToFile(String message) { private void LogMessageToFile(String message) {
Calendar cal = Calendar.getInstance(); Calendar cal = Calendar.getInstance();
FileUtils.logToFile(message, sigIRC.BASEDIR+"sigIRC/logs/log_"+(cal.get(Calendar.MONTH)+1)+"_"+cal.get(Calendar.DAY_OF_MONTH)+"_"+cal.get(Calendar.YEAR)+".txt"); FileUtils.logToFile(message, sigIRC.BASEDIR+"sigIRC/logs/log_"+(cal.get(Calendar.MONTH)+1)+"_"+cal.get(Calendar.DAY_OF_MONTH)+"_"+cal.get(Calendar.YEAR)+".txt",true);
} }
public void draw(Graphics g){ public void draw(Graphics g){

@ -236,6 +236,10 @@ public class FileUtils {
} }
public static void logToFile(String message, String filename) { public static void logToFile(String message, String filename) {
logToFile(message,filename,false);
}
public static void logToFile(String message, String filename, boolean outputToChatLog) {
File file = new File(filename); File file = new File(filename);
try { try {
@ -252,7 +256,9 @@ public class FileUtils {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
ChatLogMessage.importMessages(message); if (outputToChatLog) {
ChatLogMessage.importMessages(message);
}
} }
public static void writetoFile(String[] data, String filename) { public static void writetoFile(String[] data, String filename) {

Loading…
Cancel
Save