dev

textPage 41 of 208
50 messages on this page
Tuesday, July 27, 2021
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Welp, not the full fix ^ I'll push another update later
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Pushing to prod in a few
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
This should fix the doubling ๐Ÿ˜„
Monday, July 26, 2021
Avatar for bc43431b65cc8f7fb88ae66e5cfbe175a39472cbc3db92f842c7a016ee80c451
User bc4343
I'll throw it in my ticket
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
And can you post the config of the hook you're tesitng pls?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Can you check your server log? Does it show the
chat handled by mod ...
log line? It can be caused by a couple of ways as prisma mentioned
Avatar for bc43431b65cc8f7fb88ae66e5cfbe175a39472cbc3db92f842c7a016ee80c451
User bc4343
I removed myself from all chat groups and am still getting the double ups ๐Ÿ˜ฎ
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
I have multiple w2l (half of which don't work lol)
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
sounds very plausible like that
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
So any hooks that double for you guys would have to be logLine hooks, if my hypothesis is correct
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
So chat messages are still detected once
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
It's worth noting that hooks that use 'chatMessage' as trigger (and not logLine) works as expected
Avatar for a506fee3140c1a9cb5f83c4671951bd488e90ca6dc0482bf1cbc5478a2f8fa6e
User a506fe
"handled by mod" would be there on hccp prefix (commands), ocn, groupchatcolor and indiviual chat color
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
I'll have to test later. But that does match my previous experience, yes.
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Do you guys see the same behavior or is my reproduction not the same thing you see?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
I looked into this some more and I believe it has something to do with how chat messages get handled by API mods.
When I added myself to a chat group with CPM to give myself a colour, logs start looking like this:
2021-07-26T22:11:07 2007.881 INF Chat (from '-non-player-', entity id '-1', to 'Global'): '[FF00FF]Catalysm[-]': testtt
2021-07-26T22:11:07 2007.881 INF Chat handled by mod 'CSMM Patrons': Chat (from '76561198028175941', entity id '171', to 'Global'): 'Catalysm': testtt
With a hook like in the screenshot, this hooks fires double. Builtin commands (i tested $ping) seem unaffected.
So when I remove myself from the chatgroup, the chat message is no longer handler by CPM so the log looks like
2021-07-26T22:16:11 2311.874 INF Chat (from '76561198028175941', entity id '171', to 'Global'): 'Catalysm': testtt
(notice no "chat handled by mod ...") anymore
unknown.png

unknown.png

PNG โ€ข 6.4 KB

Friday, July 23, 2021
Avatar for eca9c03b387d8b34a7734a15cfcbf357a8717a0281f3b50a255a3b48877fbb50
User eca9c0
I'm nota programmer so there ๐Ÿคฃ
Thursday, July 22, 2021
Avatar for 374c5d8a234dd3a84b2e7712113bccfc34abaf33083b895e688b9899a24261ca
User 374c5d
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
so it's editable meta data
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
you could always hard code that with a fixed date and unlock the feature down the road should you choose
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
true
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Making changes to the system later is harder since it'd break peoples already made hooks
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
but adding an expiry wouldn't be terrible either
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
ok if deleted could be a simple boolean property, pretty easy to implement
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Yeah exactly ๐Ÿ˜„
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
lol
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
I'm trying to think down the road so you're not back to the drawing board for some future feature addition
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
ok if deleted may be more practical, though less specific
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
hmm
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Think we can reuse the distinction between persistent and expiring variables for this? Or would you make a distinction between 'variables-that-must-stay' and 'variables-ok-if-deleted' ?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Would be a separate table but it is a good question which should be defined
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
For variables you could specify a lifecycle, defaulting at permanent (with your own restrictions as needed/see previous comments). But then that way if someone wanted it to be more persistent, ie. between reboots, but didn't need to keep it in the long term, just the 'most recent' it could be set to a write-over mode.
Avatar for bc43431b65cc8f7fb88ae66e5cfbe175a39472cbc3db92f842c7a016ee80c451
User bc4343
like if we deleted player profiles could this information be deleted also, could kill two birds with one stone
Avatar for bc43431b65cc8f7fb88ae66e5cfbe175a39472cbc3db92f842c7a016ee80c451
User bc4343
Would this information be stored in the actual player db?
Avatar for bc43431b65cc8f7fb88ae66e5cfbe175a39472cbc3db92f842c7a016ee80c451
User bc4343
I guess there is only one way to find out ๐Ÿ˜†
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
re: taking up space. Indeed! I don't know how much but there has to be some limit to how much can be stored per-server
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Oh those are nice use cases! PV will def make those possible
Avatar for bc43431b65cc8f7fb88ae66e5cfbe175a39472cbc3db92f842c7a016ee80c451
User bc4343
Hmm i have some idea's that this may be useful in, If we use the built in cpm "player seems to be flying" alert could we use it to write a persistent variable(s) (fired from a hook) to do a check sum? When the first hook fires set a timer of say 30 seconds and If the hook fires 3 times before the 30 seconds expires execute command/delete variables, if it only fires once or even twice but then reaches 30 seconds the variables can be deleted. This could be a neat little way to catch out cheaters that seem to be able to bypass all of the cough anti cheat the game has ๐Ÿ˜† It would also provide a lot more functionality to the alert as currently it can only work based off a triggered hook with no real way of making it "customisable" per say.
I was also thinking you could use it for rewarding/punishing players for certain actions over a certain period of time. For example if you wanted to punish a player for drop mining twice in the space of 24 hours, add the persistent variable to the hook and set the timer at 86400, If they do it once and not again within the time period the variable will be deleted but if they do it twice you could fire a jail/kick/ban or whatever command you would like to run /delete variable. Same with the reward, you could run a variable for say the duration of blood moon and if a player kills X amount of entities during that time they get a reward, if not delete variable.
My examples above (If they will work๐Ÿค— ) would not really effect the db to much as the timers would be deleting any variables after a certain period of time.
say "You have executed this command {{getVariable('player:{{player.steamId}}:counter')}} times"```

I could see theses taking up a lot of db space on high pop servers running multiple commands if you were looking to keep a track of every player & every command. 

I'll have a bit more of a look at it tomorrow with fresher eyes ๐Ÿ˜†
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
DB table most likely. It might live in Redis but so far redis is only used for caching and data which can be rebuilt. Redis would probably be faster but DB will offer more flex
I don't think where or how the data is stored should affect users though. Syntax for storing and getting these is most important
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Yeah so since you're inside the handlebars system, you can control who can access what however you want. You could add an if statement to check a players role level before doing anything for example
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Can you elaborate here? I was planning on just allowing either numbers or strings. With some max length check to prevent any weird overflows
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Yep, it can use the same error handling as the rest of the system ^^
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
As for what I would use it for, I have a few ideas for creating mini games or even full game modes using only the bot. I think I told you this before, but that's how our community got started 20 years ago, we had bot developers and we used it to essentially mod the game. The bot parsed logs like most bots do, but it ran as an application along side the game server, so it was capable of anything. With handlebars and now potentially adding persistent data, you've essentially opened it up to the limits of your creativity. ๐Ÿ˜„ But of course that comes with some risk if you're running it all on your server and allowing others to write their own code and write data into your memory.
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
how will this be stored? in a db table or flat file?
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
thought: for scope, would it be role >= permission (ie. multiple levels of donors could access it, rather than being restricted to a specific group or player)
Avatar for 42795ae8775f87b323ddccb47ea216e4840f87d53be277b09bb9f80f82ed9fc3
User 42795a
When a player tries to update a variable, CSMM will check if the player has reached the limit. If so, CSMM will find the least recently read variable and delete it to make room.
Personally, I would prefer it simply fail or throw an error than potentially delete a persistent value I may still want/need for something