spikeydragoon / Cross-Ark-Chat

Provides the ability to cross chat between all your Ark Survival Evolved Servers including discord support.
MIT License
67 stars 25 forks source link

Delay in sending and does not send every time #71

Closed ECEstal closed 1 year ago

ECEstal commented 1 year ago

Sometimes it won't send chat through RCON. And seems like a pretty big delay at times. Are there any settings to help rectify this or is this an RCON limitation?

spikeydragoon commented 1 year ago

Rcon wise there is no limits and should be instant. Only on the discord side if enabled will there be a slight delay due to ratelimits so you end up with 1 message a second but rcon will send it as quick as it receives it.

If your running more than one rcon program that can get chat(battle metrics chat/asm rcon window) ect that will cause delays and it to miss messages since due to how ark rcon chat is a buffer one one program at a time can get messages.

If its not the above it also could be a config issue depending on how you have it setup. If you remove the bot token and server password from your config you can post it here and I will take a look to make sure its not config related.

ECEstal commented 1 year ago

Hey Spike; thanks for being willing to look at this. I have multiple servers running on multiple VMs and the Arkchat runs on my Island VM. Right now I've only added The Island and Ragnarok, but here's the config. I'm not using the discord functionality. I was running ARKon to watch chat on the other side to see the messages transfer through so that could be the issue with the delay.

//For all info on config visit https://github.com/spikeydragoon/Cross-Ark-Chat and look at the readme file as it goes over all config information.
// DO NOT change anything in the Rcon settings unless you know what you are doing!!!
{
  "ApplicationSettings": {
    "VersionCheckUrl": "https://raw.githubusercontent.com/spikeydragoon/Cross-Ark-Chat/master/version.txt",
    "PatchNotesCheckUrl": "https://raw.githubusercontent.com/spikeydragoon/Cross-Ark-Chat/master/CrossArkChatPatchNotes.txt",
    "LogErrors": true,
    "LogChat": true,
    "LogAdminCommands": true,
    "LogTribeLogs": true,
    "UseDiscord": false,
    "DiscordLogSeverity": "info"
  },

  "Servers": [
    {
      "NameTag": "The Island",
      "IP": "127.0.0.1",
      "RconPort": 27020,
      "QueryPort": 27000,
      "Password": "redacted",
      "SettingToUse": 1,
      "Active": true
    },
    {
      "NameTag": "Ragnarok",
      "IP": "192.168.1.121",
      "RconPort": 27021,
      "QueryPort": 27001,
      "Password": "redacted",
      "SettingToUse": 2,
      "Active": true
    }
  ],

  "ServerSettings": [
    {
      "SettingNumber": 1,
      "ServerTag": "",
      "ServerPlayerTag": ":",
      "PlayerChatTag": ":",
      "ChatTag": "",
      "HideNameTag": false,
      "DiscordChannelId": 0
    },
    {
      "SettingNumber": 2,
      "ServerTag": "",
      "ServerPlayerTag": ":",
      "PlayerChatTag": ":",
      "ChatTag": "",
      "HideNameTag": false,
      "DiscordChannelId": 0
    }
  ],

  "PrefixGroups": [
    {
      "ChatPrefix": "/prefix",
      "ServerList": [
        "chat1",
        "chat2"
      ]
    },
    {
      "ChatPrefix": "/prefix2",
      "ServerList": [
        "chat1",
        "chat2"
      ]
    }
  ],

  "Tribes": [
    {
      "TribeId": "00000",
      "SettingToUse": 1,
      "Active": false
    },
    {
      "TribeId": "00000",
      "SettingToUse": 2,
      "Active": false
    }
  ],

  "TribeSettings": [
    {
      "SettingNumber": 1,
      "ShowFullTribeLog": false,
      "ShowTribeName": false,
      "ShowServerName": true,
      "ShowTribeId": false,
      "EmbedTribeLog": true,
      "DiscordChannelId": 0
    },
    {
      "SettingNumber": 2,
      "ShowFullTribeLog": false,
      "ShowTribeName": false,
      "ShowServerName": true,
      "ShowTribeId": false,
      "EmbedTribeLog": true,
      "DiscordChannelId": 0
    }
  ],

  "GameCommands": [
    {
      "Command": "!discord",
      "CommandReply": "https://discord.gg/",
      "Active": false
    },
    {
      "Command": "rules",
      "CommandReply": "These are the rules.",
      "Active": false
    },
    {
      "Command": "/ping",
      "CommandReply": "Pong!",
      "Active": false
    }
  ],

  "CustomTagList": [
    "ACM[CMD]",
    "SERVER: ACM[CMD]"
  ],

  "RconSettings": {
    "NoResponceTag": "Server received, But no response!!",
    "NoPlayerTag": "No Players Connected",
    "ServerRepeatTag": "SERVER:",
    "AdminCMDTag": "AdminCmd:",
    "TribeLogTag": "Tribe",
    "GetChatCmd": "getchat",
    "ListPlayersCmd": "ListPlayers",
    "ListPlayerCheckTimeInMs": 10000,
    "GetChatTimeInMs": 1000,
    "PlayerCountCheckTimeInMs": 30000,
    "VersionCheckTimeInMs": 3600000,
    "RconSendTimeoutInMs": 3000,
    "RconReceiveTimeoutInMs": 10000,
    "RconConnectionRetrys": 1
  },

  "EmbeddedTribeLogColorSettings": [
    {
      "LogType": "killed",
      "LogColor": "ff2121",
      "RoleToPing": "none"
    },
    {
      "LogType": "demolished",
      "LogColor": "ff2121",
      "RoleToPing": "none"
    },
    {
      "LogType": "claimed",
      "LogColor": "03f413",
      "RoleToPing": "none"
    },
    {
      "LogType": "unclaimed",
      "LogColor": "ff2121",
      "RoleToPing": "none"
    },
    {
      "LogType": "tamed",
      "LogColor": "03f413",
      "RoleToPing": "none"
    },
    {
      "LogType": "destroyed",
      "LogColor": "ff7400",
      "RoleToPing": "none"
    },
    {
      "LogType": "froze",
      "LogColor": "d8ddd8",
      "RoleToPing": "none"
    },
    {
      "LogType": "downloaded",
      "LogColor": "03f413",
      "RoleToPing": "none"
    },
    {
      "LogType": "uploaded",
      "LogColor": "ff2121",
      "RoleToPing": "none"
    },
    {
      "LogType": "starved",
      "LogColor": "ff2121",
      "RoleToPing": "none"
    }
  ],

  "ChatSettings": {
    "UseCustomTags": false,
    "SendChatToServers": true,
    "ShowAdminCommands": false,
    "UseGameCommands": false,
    "UsePrefixToSendChat": false,
    "UseWordReplacementList": false,
    "AllServersChatPrefix": "/all"
  },

  "DiscordSettings": {
    "DiscordBotSettings": {
      "CommandPrefix": "d!",
      "DiscordBotToken": "BotToken",
      "IgnoreOtherBots": true,
      "ShowDiscordNickName": true
    },

    "ServerChatSettings": {
      "ChatDiscordChannelID": 0,
      "SendServerChatToOwnChannel": false
    },

    "DiscordChatSettings": {
      "DiscordChatPrefix": "Discord",
      "SendChatToDiscord": true,
      "UsePrefixToSendToDiscord": false,
      "PrefixToSendToDiscord": "/discord"
    },

    "NotificationSettings": {
      "VersionDiscordChannelId": 0,
      "PatchNotesDiscordChannelId": 0,
      "JoinLeaveNotificationsDiscordChannelID": 0,
      "UseVersionChecker": false,
      "UsePatchNotesChecker": false,
      "UseJoinLeaveNotifications": false,
      "UsePlayerCountChannelUpdater": false,
      "SendJoinLeaveNotificationsToServerOwnChannel": false
    },

    "AdminCommandSettings": {
      "AdminCommandsDiscordChannelID": 0,
      "SendAdminCommandsToOwnChannel": false
    },

    "TribeLogSettings": {
      "TribeLogsDiscordChannelID": 0,
      "ShowTribelogs": false,
      "ShowFullTribeLog": false,
      "ShowTribeId": true,
      "ShowTribeName": true,
      "ShowServerName": true,
      "EmbedTribeLog": true,
      "SendTribeLogsToOwnChannel": false
    },

    "SupportSettings": {
      "SupportDiscordChannelID": 0,
      "UseSupportPrefix": false,
      "PingRoleName": false,
      "ReplyToSupportPing": true,
      "SupportPrefix": "/help",
      "SupportRoleToPing": "rolename",
      "SupportPingReply": "Your support ticket has been sent."
    }
  }
}
spikeydragoon commented 1 year ago

For the servers name tag remove that space. Currently a bug happens with spaces, so you can do TheIsland or The-Island or The_Island ect.

Everything else looks good. Yes running arkon chat would cause them to fight over who gets the messages so when thats not running it should work normally.

In case anyone reading this in future wonders how arks rcon chat works (getchat rcon command pulls all current messages from the chat buffer then deletes it so next program to call getchat gets nothing)

You can watch the bots console window to see messages flow when your not in-game. You can also watch the chat logs in the logs folder since you have logchat set to true.

ECEstal commented 1 year ago

Thanks Spike! Not sure, but if I close this as solved will it remain to answer questions for anyone else in the future?

spikeydragoon commented 1 year ago

Yes it will, I will mark it as closed but if you have any other questions related to the same issue you can just reopen it.