Fixed NullPointerException for ChatLog module being disabled.
This commit is contained in:
parent
f86458f226
commit
6b76c8453c
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -225,12 +225,14 @@ public class ChatLogMessage {
|
||||
}
|
||||
|
||||
public static void importMessages(String...logContents) {
|
||||
for (String s : logContents) {
|
||||
if (s!=null) {
|
||||
if (ChatLogModule.chatlogmodule.messageHistory.size()>=ChatLogModule.messageHistoryCount) {
|
||||
ChatLogModule.chatlogmodule.messageHistory.remove(0).cleanup();
|
||||
if (sigIRC.chatlogmodule_enabled) {
|
||||
for (String s : logContents) {
|
||||
if (s!=null) {
|
||||
if (ChatLogModule.chatlogmodule.messageHistory.size()>=ChatLogModule.messageHistoryCount) {
|
||||
ChatLogModule.chatlogmodule.messageHistory.remove(0).cleanup();
|
||||
}
|
||||
ChatLogModule.chatlogmodule.messageHistory.add(new ChatLogMessage(s));
|
||||
}
|
||||
ChatLogModule.chatlogmodule.messageHistory.add(new ChatLogMessage(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ public class sigIRC{
|
||||
static String touhoumotherConsoleFont="Agency FB Bold";
|
||||
static boolean touhoumothermodule_enabled=false;
|
||||
static boolean twitchmodule_enabled=true;
|
||||
static boolean chatlogmodule_enabled=true;
|
||||
public static boolean chatlogmodule_enabled=true;
|
||||
static boolean downloadsComplete=false;
|
||||
static boolean hardwareAcceleration=true;
|
||||
static boolean playedoAuthSoundOnce=false;
|
||||
|
@ -21,6 +21,7 @@ import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import sig.sigIRC;
|
||||
import sig.modules.ChatLog.ChatLogMessage;
|
||||
|
||||
public class FileUtils {
|
||||
@ -256,7 +257,7 @@ public class FileUtils {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (outputToChatLog) {
|
||||
if (outputToChatLog && sigIRC.chatlogmodule_enabled) {
|
||||
ChatLogMessage.importMessages(message);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user