dev

textPage 9 of 208
50 messages on this page
Saturday, May 14, 2022
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
With webhooks, you can write a little webservice (in python or js or w/e your lang of choice) and then perform whatever actions you want... Full freedom
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
This has the benefit that we can implement it in a secure way (unlike "execute a shell script through CSMM")
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Right, so I think to support that use case, a possible feature in CSMM would be webhooks.
Eg:
User configers a http endpoint http://webhooklistener.example.com
something happens in CSMM (Could be a bunch of triggers,
chatMessage
,
zombieKilled
, ... It could even be triggered from inside a hook)
CSMM catches this, collects some data and then sends a HTTP request to http://webhooklistener.example.com with that data
User can now catch that request in a service of their choice and do whatever they want
Avatar for c0a2eec40096ba4d98bbaebd2c3399b195db246bb6596150eb11413bb2e1fb20
User c0a2ee
moving the conversation over here. The posibility to create a hook to execute a bash script through csmm after server shutdown
Avatar for 374c5d8a234dd3a84b2e7712113bccfc34abaf33083b895e688b9899a24261ca
User 374c5d
/me grabs the popcorn
Thursday, May 5, 2022
Avatar for a12f6e80e9d89b5470e3311f9d8388d6d4bc834b3825be85bf1f6a4e71dd314f
User a12f6e
ah ok! nice, thanks!
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
No I didn't update the playground data :( It's
player.crossId
Avatar for a12f6e80e9d89b5470e3311f9d8388d6d4bc834b3825be85bf1f6a4e71dd314f
User a12f6e
mmmmm I don't see it, is it shown in the data model in the Playground? if not what is it called?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
etc etc
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Eg, pushing to master branch -> builds a new image for 'latest'
pushing to a pull request -> builds an image for that specific PR
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Fyi, pretty much every commit that gets pushed to Github will create a new container is some form
Avatar for a12f6e80e9d89b5470e3311f9d8388d6d4bc834b3825be85bf1f6a4e71dd314f
User a12f6e
Woot woot, thanks! ๐Ÿ˜„
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
It always is ๐Ÿ˜‰
Avatar for a12f6e80e9d89b5470e3311f9d8388d6d4bc834b3825be85bf1f6a4e71dd314f
User a12f6e
Is the Docker image updated?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
but if you're running the master branch, you'll get the code
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
And I haven't made a release in a while so it wont show up in the official release notes (yet)
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
I implemented it without making an issue :p
Avatar for a12f6e80e9d89b5470e3311f9d8388d6d4bc834b3825be85bf1f6a4e71dd314f
User a12f6e
Oooo fancy, nice! I couldn't find any issues that mentioned EOS so I didn't think it could possibly be in. ๐Ÿ˜„
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Avatar for a12f6e80e9d89b5470e3311f9d8388d6d4bc834b3825be85bf1f6a4e71dd314f
User a12f6e
For the server manager repo, does anyone know which files contain code used to populate the built-in variables and define the data model?
Saturday, April 9, 2022
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
Might even make a
Teleport To Location
link instead.
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
I will look into adding a
copy coords
link to the player tracker:
unknown.png

unknown.png

PNG โ€ข 25.6 KB

Thursday, April 7, 2022
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
Aight will have a look into it.
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
You would need to populate the
time
property with those values
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
Instead of having separate functions:
fromNow
,
hasPassed
, etc.
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
Is there anyway to do this in handle bars:
time.fromNow
,
time.hasPassed
, etc?
Tuesday, April 5, 2022
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Extending that to support embeds seems like a nice feature tho ๐Ÿ˜„ Or make a similar function that lives next to it for embeds (cause the data structure for embeds is quite a bit more complicated than a message)
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
Too easy, I'm looking into adding the functionality for custom embed notifications for discord.
sendNotification(<channelId>,<notification>)
Does this exist already?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
There's not really a document that outlines everything though
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
There's the linter which takes care of code styling mostly. A bunch of styling rules get automatically checked and reported.
Then there's the tests which do functional checks
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
The flow generally is that any new features get merged into the develop branch first. This branch gets automatically deployed to the staging instance (staging.csmm.app).
Then, when everything is well tested and stable, it gets merged to the master branch which will trigger deploys to production.
Usually I do that dev -> master thing pretty quick but I haven't had time to do much lately
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
Also is there a codding standards document for the repo?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
What are the rules for pinging, is it allowed?
Yeah no worries man. General rule (for anything here) is don't be a dick about it. :)
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
What are the rules for pinging, is it allowed? Don't want to get nuked lol.
Also how do I become a contributor on the main branch? Just keep adding stuff to the dev branch and I'll eventually be added to the main branch?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Will need quite a few tests I imagine to account for a bunch of edge cases (time and date do be like that)
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Sorry for late response, been a hectic few days for me :(
That helper looks really useful, I like it!
Monday, April 4, 2022
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
No content
unknown.png

unknown.png

PNG โ€ข 14.2 KB

Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
@User 22055452 Sorry for the ping man, what do you think of the helper?
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
Just finished making a helper to use with
timePassed date
:
Handlebars.registerHelper('timeLeft', function (date) {
  //Get milliseconds from Date.now()
  var ms = Date.now() - Date.parse(date);
  //Return 0 if there is no time left
  if (ms >= 0) {
      return 0;
  }
  //Get the absolute value of ms
  ms = Math.abs(ms);
  //Convert ms into d h m s
  var d = Math.floor(ms / (24 * 60 * 60 * 1000));
  var h = Math.floor((ms - d * (24 * 60 * 60 * 1000)) / (60 * 60 * 1000));
  var m = Math.floor((ms - d * (24 * 60 * 60 * 1000) - h * (60 * 60 * 1000)) / 60000);
  var s = Math.floor((ms - d * (24 * 60 * 60 * 1000) - h * (60 * 60 * 1000) - m * 60000) / 1000);
  //Prepare the result string
  var result = '';
  //Convert overflowing s into m
  if (s === 60) {
      m++;
      s = 0;
  }
  //Convert overflowing m into h
  if (m === 60) {
      h++;
      m = 0;
  }
  //Convert overflowing h into d
  if (h === 24) {
      d++;
      h = 0;
  }
  //Concat d to result if it is greater the 0
  if (d > 0) {
      result = result.concat((d > 1) ? d + ' days ' : d + ' day ');
  }
  //Concat h to result if it is greater the 0
  if (h > 0) {
      result = result.concat((h > 1) ? h + ' hours ' : h + ' hour ');
  }
  //Concat m to result if it is greater the 0
  if (m > 0) {
      result = result.concat((m > 1) ? m + ' minutes ' : m + ' minute ');
  }
  //Concat s to result if it is greater the 0
  if (s > 0) {
      result = result.concat((s > 1) ? 'and ' + s + ' seconds ' : ' and ' + s + ' second ');
  }
  return result;
});```
Usage:
{{#if (datePassed )}}
say "The date has passed!"
{{else}}
say "{{timeLeft }}"
{{/if}}
Example:
{{#if (datePassed "2022-04-06T17:04:51.074Z")}}
say "The date has passed!"
{{else}}
say "Time left: {{timeLeft "2022-04-06T17:04:51.074Z"}}."
{{/if}}
Output:
"Time left: 1 day 20 hours 14 minutes and 13 seconds."
Sunday, April 3, 2022
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
Too easy, will have a look at it.
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
I use vscode and a bunch of extensions for the different stuff I need
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
but other extension because these are async versions of the templates
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
They are actually https://ejs.co/ files
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
What IDE can I use to edit the
sejs
files?
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
It's not a great solution but yeh
Avatar for bddf696212701f4e2e40cc177bb39c1f9c5f0a4ce49c307b79e8101c2a98158e
User bddf69
Avatar for 8824204d34fee76f1f051c762fb24388fc6c1d4a38e0210fd1a6c9e5a0c1572e
User 882420
Got the buttons done.
unknown.png

unknown.png

PNG โ€ข 5.7 KB