initial cs-lua merge work
This commit is contained in:
@@ -104,7 +104,7 @@ namespace Barotrauma.Networking
|
||||
|
||||
bool isOwner = GameMain.Server.OwnerConnection != null && c.Connection == GameMain.Server.OwnerConnection;
|
||||
|
||||
if (similarity + c.ChatSpamSpeed > 5.0f && !isOwner && !GameMain.Lua.game.disableSpamFilter)
|
||||
if (similarity + c.ChatSpamSpeed > 5.0f && !isOwner && !GameMain.LuaCs.game.disableSpamFilter)
|
||||
{
|
||||
GameMain.Server.KarmaManager.OnSpamFilterTriggered(c);
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace Barotrauma.Networking
|
||||
|
||||
c.ChatSpamSpeed += similarity + 0.5f;
|
||||
|
||||
if (c.ChatSpamTimer > 0.0f && !isOwner && !GameMain.Lua.game.disableSpamFilter)
|
||||
if (c.ChatSpamTimer > 0.0f && !isOwner && !GameMain.LuaCs.game.disableSpamFilter)
|
||||
{
|
||||
ChatMessage denyMsg = Create("", TextManager.Get("SpamFilterBlocked").Value, ChatMessageType.Server, null);
|
||||
c.ChatSpamTimer = 10.0f;
|
||||
@@ -133,8 +133,7 @@ namespace Barotrauma.Networking
|
||||
return;
|
||||
}
|
||||
|
||||
var should = new LuaResult(GameMain.Lua.hook.Call("chatMessage", new object[] { txt, c, type }));
|
||||
|
||||
var should = new LuaResult(GameMain.LuaCs.hook.Call("chatMessage", txt, c, type));
|
||||
|
||||
if (should.Bool())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user