fix a few unhandled errors
This commit is contained in:
parent
bc90f68f66
commit
2b9430101e
3 changed files with 90 additions and 66 deletions
|
@ -33,20 +33,30 @@ internal class Utils
|
|||
|
||||
public string[] blist = new string[1] { "" };
|
||||
|
||||
public void writetolog(string shortvr, string longvr)
|
||||
{
|
||||
if (ConfigurationManager.AppSettings["Logging"] == "On")
|
||||
{
|
||||
if (ConfigurationManager.AppSettings["Logging"] == "On")
|
||||
{
|
||||
File.AppendAllText("log.txt", shortvr);
|
||||
}
|
||||
else
|
||||
{
|
||||
File.AppendAllText("log.txt", longvr);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void writetolog(string shortvr, string longvr)
|
||||
{
|
||||
shortvr = CleanStringForLog(shortvr);
|
||||
longvr = CleanStringForLog(longvr);
|
||||
|
||||
if (ConfigurationManager.AppSettings["Logging"] == "On")
|
||||
{
|
||||
File.AppendAllText("log.txt", shortvr+ "\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
File.AppendAllText("log.txt", longvr+ "\n");
|
||||
}
|
||||
}
|
||||
|
||||
public string CleanStringForLog(string stringinput)
|
||||
{
|
||||
stringinput = Decrypt(stringinput);
|
||||
if (stringinput.EndsWith("&&&"))
|
||||
{
|
||||
stringinput = stringinput.Substring(0, stringinput.Length - 3);
|
||||
}
|
||||
return stringinput;
|
||||
}
|
||||
|
||||
public string[] GetLatestItem()
|
||||
{
|
||||
|
@ -586,7 +596,8 @@ internal class Utils
|
|||
if (inbanned)
|
||||
{
|
||||
new CustomMessage("Message contains potential bad stuff closing", "", 4, tts: false).ShowDialog();
|
||||
break;
|
||||
writetolog("Banned content found in message", what);
|
||||
break;
|
||||
}
|
||||
if (what.Substring(0, 3) == "FTP")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue