vacla / Watson

Updated Watson that displays LogBlock and CoreProtect query results in 3D.
MIT License
84 stars 8 forks source link

Chat Timeout does not seem to work #40

Closed zicy closed 1 year ago

zicy commented 1 year ago

I am trying to use Watson on our, server were we use logblock.

When doing a lookup, and there are not to many pages, then i works great. But if there are "to many" pages, then the server then see the commands from autopage as spam.

I have tried to set the "chatTimeoutSeconds" to its higest value of 5.0, but it look like Watson does not actually use this setting. image

This is what i look like on the server, where i can see that it does not wait the configured 5 seconds image

Am i missing something to make the "chat timeout" function work ?

Here is my config

{
  "Generic": {
    "actionReverse": false,
    "annotationShown": true,
    "billboardBackground": "#A8000000",
    "billboardForeground": "#7FFFFFFF",
    "chatTimeoutSeconds": 5.0,
    "debugWatson": false,
    "displayed": true,
    "enabled": true,
    "ssDateDirectory": "yyyy-MM-dd HH:mm:ss",
    "ssKeyCustom": false,
    "ssPlayerDirectory": true,
    "ssPlayerSuffix": true,
    "teleportCommand": "tppos {x:d} {y:d} {z:d} {world}",
    "watsonPrefix": "watson"
  },
  "Messages": {
    "disableCPMessages": false,
    "disableJoinMessages": false,
    "disableLBMessages": false,
    "disablePRMessages": false
  },
  "Outlines": {
    "onlyOreBlock": true,
    "oreLinewidth": 3,
    "oreOutlineThicker": true,
    "outlineshown": true
  },
  "Plugin": {
    "amountRowes": 5,
    "autopage": true,
    "coreprotectCommand": "co",
    "maxAutoPages": 100,
    "maxAutoPagesLoop": 100,
    "pagelines": 50,
    "plugin": "LogBlock",
    "recolourQueryResults": true,
    "reformatQueryResults": false,
    "regionInfoTimeoutSeconds": 5.0
  },
  "Highlights": {
    "highlightCaseSensitive": true,
    "highlightSound": "",
    "highlightSoundEnable": false,
    "highlightSoundVolume": 1.0,
    "useChatHighlights": false
  },
  "Edits": {
    "groupingOresInCreative": true,
    "labelshown": true,
    "linkedcreation": false,
    "linkeddestruction": true,
    "postCount": 45,
    "precount": 45,
    "selectionShown": true,
    "timeOrderedDeposits": true,
    "vectorFloat": 0.0,
    "vectorShown": true
  },
  "Analysis": {
    "cp busy": "^CoreProtect - Database busy. Please try again later.$",
    "cp details": "^(?:\\s+)?(\\d+[.,]\\d+\\/[mhd] ago|\\d{1,2}-\\d{1,2} \\d{1,2}:\\d{2}:\\d{2}) - #?(\\w+) ((?!.*logged).*?) ((?:x(\\d+) )?\\w+(?::\\w+)?)\\.$",
    "cp details session": "^(\\d+[.,]\\d+\\/[mhd] ago|\\d{1,2}-\\d{1,2} \\d{1,2}:\\d{2}:\\d{2}) - (\\w+) (logged \\w+)\\.$",
    "cp details sign": "^(\\d+[.,]\\d+\\/[mhd] ago|\\d{1,2}-\\d{1,2} \\d{1,2}:\\d{2}:\\d{2}) - (\\w+): ([\\s\\w+\\W]+)",
    "cp inspector coords": "^-{5} \\w+(?:\\s\\w+)* -{5} \\(x(-?\\d+)\\/y(-?\\d+)\\/z(-?\\d+)\\)$",
    "cp lookup coords": "^ +\\^ \\(x(-?\\d+)\\/y(-?\\d+)\\/z(-?\\d+)\\/([^\\)]+)\\)(?: \\(.+\\))?$",
    "cp lookup header": "^----- CoreProtect Lookup Results -----$",
    "cp no result": "^CoreProtect - No results found.$",
    "cp page": "^(?:.\\s)*Page (\\d+)\\/(\\d+) (?:.\\s)*",
    "cp search": "^CoreProtect - Lookup searching. Please wait...$",
    "duty mode disable": "^\\[Duties\\] Duty mode disabled.*",
    "duty mode enable": "^\\[Duties\\] Duty mode enabled.*",
    "lb data": "(?:\\((\\d+)\\) )?\\[((?:\\d{2,4}-)?\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2})?] (\\w+) (\\w+\\s?\\w) ((?:(\\d+)x )?[A-Z_]+)(?:(?: with)? (\\w+[A-Z]))?(?:(?: to )? \\[(.*[^\\[\\]])] \\[(.*[^\\[\\]])] \\[(.*[^\\[\\]])] \\[(.*[^\\[\\]])])?(?: at (-?\\d+), (-?\\d+), (-?\\d+)| (?:from|into) \\w+)?(?: with (\\w+))?",
    "lb header block": "^(?!STONE and DIAMOND_ORE)(?: |,|\\w)+ from player \\w+ (?:in the last \\d+ minutes |between \\d+ and \\d+ minutes ago |more than -?\\d+ minutes ago )?(?:within \\d+ blocks of you )?in .+ summed up by (?:players|blocks):$",
    "lb header blocks": "^\\d+ blocks? found\\.$",
    "lb header changes": "^\\d+ changes? found\\.$",
    "lb header no results": "^No results found\\.$",
    "lb header ratio": "^STONE and DIAMOND_ORE changes from player \\w+ between (\\d+) and (\\d+) minutes ago in .+ summed up by blocks:$",
    "lb header ratio current": "^Stone and diamond ore changes from player \\w+ in the last (\\d+) minutes in .+ summed up by blocks:$",
    "lb header searching": "^Searching Block changes from player \\w+ in the last \\d+ minutes (?:within \\d+ blocks of you )?in .+:$",
    "lb header sum blocks": "^Created - Destroyed - Block$",
    "lb header sum players": "^Created - Destroyed - Player$",
    "lb header time check": "Block changes from player \\w+ between (\\d+) and \\d+ minutes ago in .+:",
    "lb page": "^Page (\\d+)/(\\d+)$",
    "lb position": "^(?:[\\w ]+) in the last \\d+ \\w+ (?:at (-?\\d+):(-?\\d+):(-?\\d+) |within .+ blocks of location )?in (.+):$",
    "lb sum": "^(\\d+)[ ]{6,}(\\d+)[ ]{6,}((?:\\w| )+)$",
    "lb tp": "^Teleported to (-?\\d+):(\\d+):(-?\\d+)$",
    "modmode disable": "^You are no longer in ModMode!$",
    "modmode enable": "^You are now in ModMode!$",
    "prism data": ".*?[-+] \\[([0-9]+)\\]\\s+(?\u003cinstigator\u003e.*) (?\u003ccause\u003egrew|killed|picked up|placed|grew|ignited|set a fire|used|threw potion|sheared|dispensed|blew up|formed|poured|broke|filled a|accessed|ate|(?:un)?leashed|launched|hung|wrote|entered|exited|removed|dropped|inserted|ran command|said|spawned|quit|joined)\\s+(?\u003ctarget\u003e.*)\\s+(?\u003cwhen\u003ejust now|(?:\\d+d)?(?:\\d+h)?(?:\\d+m)?\\sago) \\(a:(?\u003caction\u003e.*)\\)\\s-\\d+- (?\u003cdate\u003e\\d+\\/\\d+\\/\\d+) (?\u003ctime\u003e\\d+:\\d+:\\d+\\w+) - (?\u003cworld\u003e\\w+) @ (?\u003cx\u003e-?\\d+) (?\u003cy\u003e-?\\d+) (?\u003cz\u003e-?\\d+).*?",
    "prism page": "Showing\\s+\\d+ results\\. Page\\s+(?\u003ccurrent\u003e\\d+) of\\s+(?\u003cmax\u003e\\d+)",
    "prism pagination": "(?:\\s+\\[\u003c\u003c Prev] \\|)?\\s+\\[Next \u003e\u003e\\]",
    "wg regions": "^Applicable regions: ([a-zA-Z0-9_-]+(?:, [a-zA-Z0-9_-]+)*)$"
  },
  "Lists": {
    "highlight": [],
    "overriding actions": [],
    "Smaller render box": [],
    "watson blocks": []
  },
  "Hotkeys": {
    "autopage": {
      "keys": ""
    },
    "coreInspect": {
      "keys": ""
    },
    "cursornext": {
      "keys": ""
    },
    "cursorprev": {
      "keys": ""
    },
    "queryafter": {
      "keys": ""
    },
    "querybefore": {
      "keys": ""
    },
    "screenshot": {
      "keys": "F12"
    },
    "tpcursor": {
      "keys": ""
    },
    "tpnext": {
      "keys": ""
    },
    "tpnextanno": {
      "keys": ""
    },
    "tpprev": {
      "keys": ""
    },
    "tpprevanno": {
      "keys": ""
    },
    "watsonClear": {
      "keys": "O"
    },
    "openGuiMainMenu": {
      "keys": "J"
    },
    "openGuiSettings": {
      "keys": "J,C"
    }
  }
}
vacla commented 1 year ago

Thanks for reporting this bug, this is an oversight of the original implementation, this will be fixed in next version

vacla commented 1 year ago

Fixed in 1.20.2