adds OBJECT_CHAT toggle
This commit is contained in:
parent
237405a6a7
commit
90319671b7
4 changed files with 10 additions and 1 deletions
|
|
@ -223,6 +223,10 @@ namespace BetterSecondBot.bottypes
|
||||||
}
|
}
|
||||||
protected void On_MessageEvent(MessageEventArgs e)
|
protected void On_MessageEvent(MessageEventArgs e)
|
||||||
{
|
{
|
||||||
|
if((myconfig.OBJECT_CHAT == false) && (e.avatar == false) && (e.group == false) && (e.localchat == true))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
EventHandler<MessageEventArgs> handler = _MessageEvent;
|
EventHandler<MessageEventArgs> handler = _MessageEvent;
|
||||||
handler?.Invoke(this, e);
|
handler?.Invoke(this, e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ ENV Log2File_Level='1'
|
||||||
ENV Setting_LogCommands='false'
|
ENV Setting_LogCommands='false'
|
||||||
ENV Agent_Channel='auto'
|
ENV Agent_Channel='auto'
|
||||||
ENV Agent_Version='auto'
|
ENV Agent_Version='auto'
|
||||||
|
ENV OBJECT_CHAT='false'
|
||||||
ENV SQLDB_Enabled='false'
|
ENV SQLDB_Enabled='false'
|
||||||
ENV SQLDB_Host='127.0.0.1'
|
ENV SQLDB_Host='127.0.0.1'
|
||||||
ENV SQLDB_Port='3306'
|
ENV SQLDB_Port='3306'
|
||||||
|
|
|
||||||
|
|
@ -107,8 +107,10 @@ namespace BetterSecondBotShared.Json
|
||||||
public string Agent_Channel { get; set; }
|
public string Agent_Channel { get; set; }
|
||||||
public string Agent_Version { get; set; }
|
public string Agent_Version { get; set; }
|
||||||
|
|
||||||
// Database
|
// Object Chat
|
||||||
|
public bool OBJECT_CHAT { get; set; }
|
||||||
|
|
||||||
|
// Database
|
||||||
public bool SQLDB_Enabled { get; set; }
|
public bool SQLDB_Enabled { get; set; }
|
||||||
public string SQLDB_Host { get; set; }
|
public string SQLDB_Host { get; set; }
|
||||||
public int SQLDB_Port { get; set; }
|
public int SQLDB_Port { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -171,6 +171,7 @@ namespace BetterSecondBotShared.Json
|
||||||
+ "3: +Warnings\n"
|
+ "3: +Warnings\n"
|
||||||
+ "4: +Debug\n";
|
+ "4: +Debug\n";
|
||||||
}
|
}
|
||||||
|
else if (cmd == "OBJECT_CHAT") { return "Enable object chat to be passed over messages event"; }
|
||||||
else if (cmd == "Agent_Channel") { return "What channel to use for the client - should only be used if badly coded grids that are unable to accept custom clients: leave auto otherwise"; }
|
else if (cmd == "Agent_Channel") { return "What channel to use for the client - should only be used if badly coded grids that are unable to accept custom clients: leave auto otherwise"; }
|
||||||
else if (cmd == "Agent_Version") { return "What version to use for the client - should only be used if badly coded grids that are unable to accept custom clients: leave auto otherwise"; }
|
else if (cmd == "Agent_Version") { return "What version to use for the client - should only be used if badly coded grids that are unable to accept custom clients: leave auto otherwise"; }
|
||||||
return "Unknown value:" + cmd;
|
return "Unknown value:" + cmd;
|
||||||
|
|
@ -302,6 +303,7 @@ namespace BetterSecondBotShared.Json
|
||||||
else if (cmd == "Log2File_Level") { return "1"; }
|
else if (cmd == "Log2File_Level") { return "1"; }
|
||||||
else if (cmd == "Agent_Channel") { return "auto"; }
|
else if (cmd == "Agent_Channel") { return "auto"; }
|
||||||
else if (cmd == "Agent_Version") { return "auto"; }
|
else if (cmd == "Agent_Version") { return "auto"; }
|
||||||
|
else if (cmd == "OBJECT_CHAT") { return "False"; }
|
||||||
return "Unknown value:" + cmd;
|
return "Unknown value:" + cmd;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue