IRC logs of Freenode #BZFlag for Thursday, 2019-08-08

*** 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 #bzflag00:17
*** ChanServ sets mode: +v infobot00: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
allejoare URL jobs sent via bzfs guaranteed to be in the same order as they were sent?03:50
blast007I would think they could finish in any order03:53
blast007that should be easy enough to test though - make a webpage that has a 30 second sleep and add that one first03:54
allejoooo i hadn't thought of that03:57
allejolooks like they do come back in order04:09
allejosent 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 returned04:10
allejos/fast/normal/04:11
*** The_Noah_ <The_Noah_!~The_Noah@47.185.193.111> has joined #bzflag05: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
blast007hmm... okay..  but I wouldn't count on that behavior10:27
blast007doesn'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 #bzflag11:34
alfa1allejo: 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
blast007SwearSupressor (if I spelled that right, which it doesn't feel like I did)11:39
alfa1I found that but I think allejo made another one or improved it, if I remember well11:41
alfa1I remember being kicked on urban jungle when I used some words like "God" :)11:41
alfa1it gave 3 attemps and kicked11:42
alfa1(religion words were forbidden at certain time)11:44
alfa1unless 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 #bzflag12:12
*** spldart <spldart!~james@2601:2c5:c600:2365::1a12> has quit IRC (Changing host)12:12
*** spldart <spldart!~james@bzflag/contributor/spldart> has joined #bzflag12:12
*** ChanServ sets mode: +v spldart12:12
*** The_Noah_ is now known as The_Noah13:36
allejoblast007: yea, V2 of the URL handler has a "token" field where you can assign it data15:06
*** alfa1 <alfa1!~alfa1@host182.190-136-196.telecom.net.ar> has joined #bzflag15:14
alfa1what 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
allejoeach plugin handles its settings in their own way15:18
allejowhat are you trying to do?15:18
alfa1hi allejo; already made a plugin to replace swearSuppressor with kicking feature15:19
alfa1just wanting to add 1 simple parameter to config file (BZ server one not plugin one) just like Timelimit does: comma and parameter15:20
alfa1this param is to set the amount of filtered phrases before kicking the player15:20
allejoin a plug-in's Init(), it takes a const char* argument15:21
alfa1TimeLimit uses parseCommand function/method it seems in some way; not sure it that is what I should use15:21
allejouse that argument and that's what's available after the first comma15:21
allejo-loadplugin test.so,5015:22
allejothe const char* would be "50"15:22
alfa1ah the config argument... it was simple :)15:22
alfa1I will try...15:23
allejotimelimit has a parseCommand because it has additional logic on what it handles15:23
alfa1I should use atoi right?15:25
allejoyah15:25
alfa1error: config was not declared in this scope15:27
alfa1I guess I should create my own variable15:28
allejomake sure that the Init function has the argument15:29
allejosometimes it can be commented out15:29
alfa1virtual void Init (const char* config);15:29
allejothat's correct. check the implementation15:30
alfa1I am using atoi(config) into my case bz_eMessageFilteredEvent: is this right?15:31
allejonope. config is only available inside of the Init()15:32
alfa1or should I do it into the Init implementacion and assigniing it to another variable?15:32
allejoyou're going to have to save that value in init15:32
allejoyup15:32
alfa1ok15:32
alfa1nice, it works, ty allejo15:36
allejo:)15:36
alfa1having problems to know if config is [void] (it is not asigned to NULL anywhere)15:42
allejocheck if config is null15:43
allejoif it is, give it a default value15:43
alfa1did it but seems not to be initialized in NULL; can it be?15:44
alfa1(should have a default value into brackets)15:44
allejoit can be null if you load the plugin without giving it anything after15:45
allejo-loadplugin test.so15:45
alfa1yes, will try it again15:45
alfa1doesn't work15:48
alfa1if (config != NULL)15:48
alfa1n=atoi(config);15:48
alfa1else15:48
alfa1n=3;15:48
allejowhat about it doesn't work?15:50
allejoyou could also simplify that to just `if (config)`15:50
alfa1the player is not kicked15:51
alfa1let me see if I try assigning a default value15:51
alfa1NULL15:51
alfa1ok, apparently config is loaded with something different from NULL (even a default value is not taken)16:00
alfa1did this and didn't work: void suprimirMensaje::Init (const char* config=NULL)16:00
alfa1but did config=NULL inside and worked16:01
alfa1with zero arguments, ofc16:01
allejodoes `if (config)` not work?16:02
alfa1will try it (I did != NULL)16:02
alfa1nope16:03
alfa1will try other options16:03
alfa1BZ shows ""; but I tried with "", " " and "\0" and no results16:17
alfa1(to see what is inside config)16:17
alfa1anyway, I can workaround it just setting someting in server config file (not letting it void)16:18
alfa1I did:16:19
alfa1const char *cad;16:19
alfa1cad = config;16:20
alfa1bz_sendTextMessagef(BZ_SERVER, data->playerID, "config: %sX", cad);16:20
alfa1(in different locations of the code)16:20
allejoprintf isn't a reliable way of knowing what the value is16:29
alfa1into plugin_config.cpp I found this: whitespace = " \t\r"; tried it too but didn't work; maybe useful?16:33
alfa1what would you suggest me instead?16:34
allejoif 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 data16:35
alfa1no, 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 time16:37
allejoi'll take a look later and see16:39
alfa1ty16:41
blast007look at other plugins and see what they do17:07
alfa1ok, reviewing TimeLimit; I will try to use that now17:19
alfa1ok 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
alfa1const size_t len = strlen(commandLine);17:30
alfa1  if (len != 0) {17:30
blast007the variable name is just that - a name17:32
blast007the signature of a function doesn't care what you *call* a variable17:33
blast007you could have  void YourPlugin::Init(const char* BoatyMcBoatface); and it would work just the same17:34
alfa1yes, just it confused me a bit because used also "parseCommand(commandLine);" in the Init implementation17:38
*** alfa1 <alfa1!~alfa1@host182.190-136-196.telecom.net.ar> has quit IRC (Remote host closed the connection)17:42
blast007https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/   https://news.ycombinator.com/item?id=2064635018:31
allejoyou have no idea how happy that just made me20:13
*** galileo <galileo!~QUJAAAAAA@24.224.250.196> has quit IRC (Ping timeout: 268 seconds)20:16
*** Zehra <Zehra!~Zehra@unaffiliated/zehra> has joined #bzflag21:07
*** galileo <galileo!~QUJAAAAAA@142.176.13.194> has joined #bzflag22:18
*** Delusional <Delusional!~Delusiona@unaffiliated/delusional> has quit IRC (Quit: Delusional)23:51
*** Delusional <Delusional!~Delusiona@unaffiliated/delusional> has joined #bzflag23:54

Generated by irclog2html.py 2.17.3.dev0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!