public void writeChatLog(String data)
{
checkDateAndTime();
String filePath = "./Data/ChatLogs/" + c.playerName + ".txt";
BufferedWriter bw = null;
try
{
bw = new BufferedWriter(new FileWriter(filePath, true));
bw.write("[" + c.date + "]" + "-" + "[" + c.currentTime + " " + checkTimeOfDay() + "]: " + "[" + c.connectedFrom + "]: " + "" + data + " ");
bw.newLine();
bw.flush();
}
catch (IOException ioe)
{
ioe.printStackTrace();
}
finally
{
if (bw != null)
{
try
{
bw.close();
}
catch (IOException ioe2)
{
}
}
}
}
c.inStream.readBytes_reverseA(c.getChatText(), c.getChatTextSize(), 0);
add
c.getPA().writeChatLog(Misc.textUnpack(c.getChatText(), packetSize-2));
Copyright © 2024, NextGenUpdate.
All Rights Reserved.