*** infobot <infobot!ibot@c-174-52-60-165.hsd1.ut.comcast.net> has quit IRC (Remote host closed the connection) | 00:16 | |
*** infobot <infobot!ibot@c-174-52-60-165.hsd1.ut.comcast.net> has joined #bzflag | 00:17 | |
*** ChanServ sets mode: +v infobot | 00:17 | |
*** Zehra <Zehra!~Zehra@unaffiliated/zehra> has quit IRC (Quit: Gone for now.) | 01:09 | |
*** spldart <spldart!~james@bzflag/contributor/spldart> has quit IRC (Ping timeout: 264 seconds) | 01:35 | |
allejo | are URL jobs sent via bzfs guaranteed to be in the same order as they were sent? | 03:50 |
---|---|---|
blast007 | I would think they could finish in any order | 03:53 |
blast007 | that should be easy enough to test though - make a webpage that has a 30 second sleep and add that one first | 03:54 |
allejo | ooo i hadn't thought of that | 03:57 |
allejo | looks like they do come back in order | 04:09 |
allejo | sent a request to a 30 sec slow end point and immediately after sent a request to a normal endpoint. fast wouldn't come back until after slow returned | 04:10 |
allejo | s/fast/normal/ | 04:11 |
*** The_Noah_ <The_Noah_!~The_Noah@47.185.193.111> has joined #bzflag | 05:08 | |
*** The_Noah <The_Noah!~The_Noah@47.185.197.62> has quit IRC (Ping timeout: 244 seconds) | 05:10 | |
*** infobot <infobot!ibot@c-174-52-60-165.hsd1.ut.comcast.net> has quit IRC (Ping timeout: 268 seconds) | 05:34 | |
blast007 | hmm... okay.. but I wouldn't count on that behavior | 10:27 |
blast007 | doesn't our system have a way to associate a response with the request? | 10:28 |
*** alfa1 <alfa1!~alfa1@host63.186-125-30.telecom.net.ar> has joined #bzflag | 11:34 | |
alfa1 | allejo: hello. What was the name of that plugin of yours that silenced the entire messages and also kicked the player when he used bad words? I can't find it. | 11:36 |
blast007 | SwearSupressor (if I spelled that right, which it doesn't feel like I did) | 11:39 |
alfa1 | I found that but I think allejo made another one or improved it, if I remember well | 11:41 |
alfa1 | I remember being kicked on urban jungle when I used some words like "God" :) | 11:41 |
alfa1 | it gave 3 attemps and kicked | 11:42 |
alfa1 | (religion words were forbidden at certain time) | 11:44 |
alfa1 | unless he used 2 plug-ins at once; I will see... | 11:45 |
*** alfa1 <alfa1!~alfa1@host63.186-125-30.telecom.net.ar> has quit IRC (Remote host closed the connection) | 12:02 | |
*** spldart <spldart!~james@2601:2c5:c600:2365::1a12> has joined #bzflag | 12:12 | |
*** spldart <spldart!~james@2601:2c5:c600:2365::1a12> has quit IRC (Changing host) | 12:12 | |
*** spldart <spldart!~james@bzflag/contributor/spldart> has joined #bzflag | 12:12 | |
*** ChanServ sets mode: +v spldart | 12:12 | |
*** The_Noah_ is now known as The_Noah | 13:36 | |
allejo | blast007: yea, V2 of the URL handler has a "token" field where you can assign it data | 15:06 |
*** alfa1 <alfa1!~alfa1@host182.190-136-196.telecom.net.ar> has joined #bzflag | 15:14 | |
alfa1 | what would be an easy way to learn how to manage plugin parameters (not with a config file but simple ones)? It's getting hard to see (already checked TimeLimit). Or any help? | 15:17 |
alfa1 | (also checked allejo's guides) | 15:17 |
allejo | each plugin handles its settings in their own way | 15:18 |
allejo | what are you trying to do? | 15:18 |
alfa1 | hi allejo; already made a plugin to replace swearSuppressor with kicking feature | 15:19 |
alfa1 | just wanting to add 1 simple parameter to config file (BZ server one not plugin one) just like Timelimit does: comma and parameter | 15:20 |
alfa1 | this param is to set the amount of filtered phrases before kicking the player | 15:20 |
allejo | in a plug-in's Init(), it takes a const char* argument | 15:21 |
alfa1 | TimeLimit uses parseCommand function/method it seems in some way; not sure it that is what I should use | 15:21 |
allejo | use that argument and that's what's available after the first comma | 15:21 |
allejo | -loadplugin test.so,50 | 15:22 |
allejo | the const char* would be "50" | 15:22 |
alfa1 | ah the config argument... it was simple :) | 15:22 |
alfa1 | I will try... | 15:23 |
allejo | timelimit has a parseCommand because it has additional logic on what it handles | 15:23 |
alfa1 | I should use atoi right? | 15:25 |
allejo | yah | 15:25 |
alfa1 | error: config was not declared in this scope | 15:27 |
alfa1 | I guess I should create my own variable | 15:28 |
allejo | make sure that the Init function has the argument | 15:29 |
allejo | sometimes it can be commented out | 15:29 |
alfa1 | virtual void Init (const char* config); | 15:29 |
allejo | that's correct. check the implementation | 15:30 |
alfa1 | I am using atoi(config) into my case bz_eMessageFilteredEvent: is this right? | 15:31 |
allejo | nope. config is only available inside of the Init() | 15:32 |
alfa1 | or should I do it into the Init implementacion and assigniing it to another variable? | 15:32 |
allejo | you're going to have to save that value in init | 15:32 |
allejo | yup | 15:32 |
alfa1 | ok | 15:32 |
alfa1 | nice, it works, ty allejo | 15:36 |
allejo | :) | 15:36 |
alfa1 | having problems to know if config is [void] (it is not asigned to NULL anywhere) | 15:42 |
allejo | check if config is null | 15:43 |
allejo | if it is, give it a default value | 15:43 |
alfa1 | did it but seems not to be initialized in NULL; can it be? | 15:44 |
alfa1 | (should have a default value into brackets) | 15:44 |
allejo | it can be null if you load the plugin without giving it anything after | 15:45 |
allejo | -loadplugin test.so | 15:45 |
alfa1 | yes, will try it again | 15:45 |
alfa1 | doesn't work | 15:48 |
alfa1 | if (config != NULL) | 15:48 |
alfa1 | n=atoi(config); | 15:48 |
alfa1 | else | 15:48 |
alfa1 | n=3; | 15:48 |
allejo | what about it doesn't work? | 15:50 |
allejo | you could also simplify that to just `if (config)` | 15:50 |
alfa1 | the player is not kicked | 15:51 |
alfa1 | let me see if I try assigning a default value | 15:51 |
alfa1 | NULL | 15:51 |
alfa1 | ok, apparently config is loaded with something different from NULL (even a default value is not taken) | 16:00 |
alfa1 | did this and didn't work: void suprimirMensaje::Init (const char* config=NULL) | 16:00 |
alfa1 | but did config=NULL inside and worked | 16:01 |
alfa1 | with zero arguments, ofc | 16:01 |
allejo | does `if (config)` not work? | 16:02 |
alfa1 | will try it (I did != NULL) | 16:02 |
alfa1 | nope | 16:03 |
alfa1 | will try other options | 16:03 |
alfa1 | BZ shows ""; but I tried with "", " " and "\0" and no results | 16:17 |
alfa1 | (to see what is inside config) | 16:17 |
alfa1 | anyway, I can workaround it just setting someting in server config file (not letting it void) | 16:18 |
alfa1 | I did: | 16:19 |
alfa1 | const char *cad; | 16:19 |
alfa1 | cad = config; | 16:20 |
alfa1 | bz_sendTextMessagef(BZ_SERVER, data->playerID, "config: %sX", cad); | 16:20 |
alfa1 | (in different locations of the code) | 16:20 |
allejo | printf isn't a reliable way of knowing what the value is | 16:29 |
alfa1 | into plugin_config.cpp I found this: whitespace = " \t\r"; tried it too but didn't work; maybe useful? | 16:33 |
alfa1 | what would you suggest me instead? | 16:34 |
allejo | if you got it to work with setting the default value to null, just do that. i can't debug bz right now and see what value is being given. given it's a pointer, it could be null or some garbage data | 16:35 |
alfa1 | no, the default value to NULL didn't work; the workaround is to set something non void into the server config file; but thanks for your time | 16:37 |
allejo | i'll take a look later and see | 16:39 |
alfa1 | ty | 16:41 |
blast007 | look at other plugins and see what they do | 17:07 |
alfa1 | ok, reviewing TimeLimit; I will try to use that now | 17:19 |
alfa1 | ok I copied this from Timelimit and worked on mine (I was a bit confused at the start with the meaning of "commandLine" while it is "config" lately, apart of general complexity): | 17:29 |
alfa1 | const size_t len = strlen(commandLine); | 17:30 |
alfa1 | if (len != 0) { | 17:30 |
blast007 | the variable name is just that - a name | 17:32 |
blast007 | the signature of a function doesn't care what you *call* a variable | 17:33 |
blast007 | you could have void YourPlugin::Init(const char* BoatyMcBoatface); and it would work just the same | 17:34 |
alfa1 | yes, just it confused me a bit because used also "parseCommand(commandLine);" in the Init implementation | 17:38 |
*** alfa1 <alfa1!~alfa1@host182.190-136-196.telecom.net.ar> has quit IRC (Remote host closed the connection) | 17:42 | |
blast007 | https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/ https://news.ycombinator.com/item?id=20646350 | 18:31 |
allejo | you have no idea how happy that just made me | 20:13 |
*** galileo <galileo!~QUJAAAAAA@24.224.250.196> has quit IRC (Ping timeout: 268 seconds) | 20:16 | |
*** Zehra <Zehra!~Zehra@unaffiliated/zehra> has joined #bzflag | 21:07 | |
*** galileo <galileo!~QUJAAAAAA@142.176.13.194> has joined #bzflag | 22:18 | |
*** Delusional <Delusional!~Delusiona@unaffiliated/delusional> has quit IRC (Quit: Delusional) | 23:51 | |
*** Delusional <Delusional!~Delusiona@unaffiliated/delusional> has joined #bzflag | 23:54 |
Generated by irclog2html.py 2.17.3.dev0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!