00:21.23 | *** join/#bzflag spldart (~spldart@bzflag/contributor/spldart) |
00:21.24 | *** mode/#bzflag [+v spldart] by ChanServ |
00:43.41 | *** join/#bzflag nadir (~nadir@unaffiliated/znadir) |
00:47.13 | alezakos | ~allejo++ |
01:00.25 | *** join/#bzflag Periapsis (~nadir@173.46.77.148) |
01:00.26 | *** join/#bzflag Periapsis (~nadir@unaffiliated/znadir) |
01:56.34 | allejo | :D |
03:11.10 | *** join/#bzflag Shuist (~Shuist@ppp203-122-213-220.static.internode.on.net) |
04:02.33 | *** join/#bzflag Shuist (~Shuist@ppp203-122-213-220.static.internode.on.net) |
04:31.14 | *** join/#bzflag Shuist (~Shuist@ppp203-122-213-220.static.internode.on.net) |
04:55.49 | *** join/#bzflag blast007 (~blast007@bzflag/developer/Blast) |
05:28.34 | *** join/#bzflag RoscoePColtrane (~flash@c-71-205-162-253.hsd1.co.comcast.net) |
06:01.46 | macsforme | can anyone help me understand what this does? https://github.com/BZFlag-Dev/bzflag/blob/2.4/misc/Makefile.am#L52-L53 |
06:02.31 | macsforme | I understand the substitution, but when would that be executed? during the build? during make dist? |
06:38.35 | BulletCatcher | It doesn't get executed by default. |
06:39.06 | BulletCatcher | The bzflag.desktop file we install is in the data dir, so maybe we should just remove the one in the misc dir. |
06:40.37 | BulletCatcher | It doesn't get executed because the top-level Makefile doesn't descend into the misc directory at all. |
06:41.20 | BulletCatcher | Not while building, anyway. It does descend into misc when doing a make dist. |
06:51.37 | macsforme | okay, thanks |
07:02.54 | *** join/#bzflag nadir|mobile (uid134094@gateway/web/irccloud.com/x-wfxrexscyvkavxup) |
08:45.02 | *** join/#bzflag DTRemenak|RDP (~DTRemenak@cpe-172-112-10-183.socal.res.rr.com) |
08:45.02 | *** join/#bzflag DTRemenak|RDP (~DTRemenak@about/essy/CrazyCoder/DTRemenak) |
08:45.02 | *** mode/#bzflag [+v DTRemenak|RDP] by ChanServ |
11:28.10 | *** join/#bzflag zuii (~zuii@BC0663EF.catv.pool.telekom.hu) |
12:47.54 | *** join/#bzflag nadir (uid134094@gateway/web/irccloud.com/x-oijcnyemdqldutry) |
14:42.49 | *** join/#bzflag arkascha (~arkascha@2a02:8108:4a40:6c4:226:4aff:fe06:ea38) |
14:42.53 | arkascha | I experience a strange issue, maybe someone has a hint for me: |
14:43.19 | arkascha | I try to play bzflag on a system that I setup a fresh operating system (Linux / openSUSE) and all is great, but: |
14:43.40 | arkascha | My tank is locked into driving a sharp left turn all the time, it does not react to the mouse at all. |
14:44.05 | arkascha | I check the input settings but failed to see anything related. |
14:44.12 | arkascha | I also checked a different mouse, same result. |
15:04.23 | *** join/#bzflag alpha1-2 (~alpha1@host15.186-125-142.telecom.net.ar) |
15:17.41 | zuii | @arkascha I experienced the same with one SDL(I think it was SDL2) version compiled bzflag |
15:19.51 | zuii | and one workaround was to go to windowed mode and back to fullscreen |
15:20.04 | zuii | 2x F4 |
15:22.02 | *** mode/#bzflag [+o blast007] by ChanServ |
15:22.36 | *** mode/#bzflag [+v alpha1-2] by blast007 |
15:22.37 | alpha1-2 | my second report was wrong, when one rejoins, Kills has to restart, because it's related to oneself, not in general |
15:34.43 | alpha1-2 | zuii: what did arkascha asked? |
15:34.49 | alpha1-2 | ask* |
15:36.53 | zuii | sorry im using weechat irc clientfirst time...so: |
15:37.18 | alpha1-2 | NP |
15:37.41 | blast007 | alpha1-2: they're having an issue where the tank spins in a sharp left and doesn't react to the mouse |
15:37.43 | zuii | arkascha said: I experience a strange issue, maybe someone has a hint for me: I try to play bzflag on a system that I setup a fresh operating system (Linux / openSUSE) and all is great, but: |
15:37.53 | blast007 | wonder if it's thinking that a joystick is attached |
15:38.41 | zuii | My tank is locked into driving a sharp left turn all the time, it does not react to the mouse at all. I check the input settings but failed to see anything related. I also checked a different mouse, same result. " |
15:40.21 | alpha1-2 | what does "a sharp left" mean? (no look with dictionary) |
15:40.50 | zuii | i experienced the same on plasma with qt rendering but not on other DE, it's sdl2 related problem I think. Soultion for me was to twice press F4 |
15:41.00 | alpha1-2 | ah "sharp left turn"... |
15:41.17 | zuii | I was turning left all, and couldn't move just |
15:42.28 | zuii | round and around |
15:42.48 | blast007 | some laptops have an orientation sensor (gyroscope) and/or accelerometer that linux treats as a joystick https://wiki.debian.org/InstallingDebianOn/Thinkpad/T500#HDAPS |
15:44.23 | blast007 | hmm, though I guess that'd require selecting a joystick in the input settings |
15:45.35 | alpha1-2 | then you compiled using SDL2 you think; I have issues (BZ crashing; I am also using linux but SDL 1) but it seems it's because I have somewhat old graphic drivers (some years ago); it happens to me when I run several clients and use windowed mode (F1) (or maybe when I iconize them too (F4)) |
15:46.17 | alpha1-2 | they didn't happen time ago, though |
15:46.47 | alpha1-2 | (also, before crashing, screens start shacking a lot) |
15:46.56 | alpha1-2 | (in fullscreen) |
15:47.25 | alpha1-2 | maybe I should compile with SDL 2 and see |
15:47.40 | alpha1-2 | it's possible right? |
15:47.49 | alpha1-2 | or it's better SDL 1 in my case? |
15:48.57 | alpha1-2 | oh, sorry, did he mean moving the machine to left or turning into BZ? |
15:50.32 | alpha1-2 | no, I don't have the possibility to install SDL 2 (easily) anyway |
15:55.54 | *** join/#bzflag KaadmY (uid135503@gateway/web/irccloud.com/x-bkduxkyfivwhbkas) |
16:24.56 | *** join/#bzflag arkascha (~arkascha@ip5f5be3e9.dynamic.kabel-deutschland.de) |
17:06.05 | *** join/#bzflag nitroxis (n@ipv6.nxs.re) |
17:17.45 | JeffM | allejo: you just added an event? |
17:18.42 | allejo | 5 events |
17:18.57 | JeffM | did you modify any contructors or objects? |
17:19.16 | JeffM | any existing ones I mean? |
17:19.54 | JeffM | or change arguments to any functions? |
17:22.11 | allejo | not to the API. only new functions and classes |
17:23.13 | JeffM | then you don't need to bump the API version |
17:23.26 | JeffM | it's really just when stuff goes incompatiible |
17:23.39 | allejo | so the fact that I modified the enum for events doesn't matter in this case? |
17:23.42 | JeffM | if someone tries to load your plugin in an old BZFS it just won't load |
17:23.45 | JeffM | naw |
17:23.51 | JeffM | enum is just a number |
17:23.57 | JeffM | it's not a binary signature |
17:24.19 | allejo | if I do add to the enum, does it matter where I add it? |
17:24.26 | JeffM | YES |
17:24.31 | JeffM | it must go at the end |
17:24.43 | allejo | ok that's what I just realized |
17:24.47 | JeffM | or it'll change the numbers of the items after where you add it |
17:24.58 | JeffM | then already built plugins won't work right |
17:25.06 | JeffM | did I do a "last" enum? |
17:25.35 | blast007 | yes |
17:25.45 | JeffM | then put it right before the last |
17:25.51 | JeffM | the last one is the count of enums for containers |
17:25.58 | JeffM | it's the only one that can move |
17:26.48 | JeffM | do I need to read the huge list of comments? |
17:27.40 | allejo | not really, i only tagged you in that to ask about the API version bump |
17:27.58 | allejo | you're more than welcome to read it and give feedback though |
17:27.59 | allejo | :p |
17:29.59 | JeffM | oh gods no |
17:30.02 | JeffM | that's too much reading |
17:30.13 | JeffM | I just wanted to make sure you got the answer you were looking for |
17:30.22 | blast007 | ain't nobody got time for that |
17:30.45 | JeffM | oh, and it's a good idea to just init ALL your members |
17:30.54 | JeffM | just so it's clear |
17:31.35 | KaadmY | <allejo> if I do add to the enum, does it matter where I add it? |
17:31.35 | KaadmY | <JeffM> YES |
17:31.36 | KaadmY | lol |
17:31.47 | JeffM | well it does |
17:31.50 | KaadmY | ikr :D |
17:31.55 | KaadmY | i have dealt with that too many times too |
17:32.32 | JeffM | it's a valid question. It doesn't matter if it's an intenral enum, but for an API that you want to maintain binary compatiblity on it does. |
17:33.10 | allejo | if you have thoughts on this too, that'd be helpful: https://github.com/BZFlag-Dev/bzflag/pull/61#discussion_r96328229 |
17:33.14 | JeffM | if you DID shift the enums arround, that is a reason to bump the API version, so old plugins will die cleanly and the owner will know they need to recimplile. |
17:33.59 | allejo | makes sense |
17:34.08 | JeffM | what is the basic question wiht all that? |
17:34.29 | JeffM | is PollOption part of the API? |
17:35.10 | allejo | for specific types of polls, there's an extra "field" or attribute of information, which is just a player's IP but not all poll options will have that |
17:35.27 | JeffM | I mean is that specific structure exposed outside of BZFS? |
17:35.47 | allejo | was debating on whether or not exposing that, flash recommended having a struct |
17:35.58 | JeffM | yeah that can't go in the API like that |
17:36.01 | allejo | no, it'd be a new structure |
17:36.15 | JeffM | make it a class, export the class, get rid of the std::String, etc.. |
17:36.24 | JeffM | what is your API design, can you describe it to me? |
17:38.24 | allejo | before a poll is started, throw an event to allow a plug-in to prevent it from starting. throw an event when a poll has started and have information regarding that poll (requestor, action, value), a vote event, veto event, and poll close event with info about results and whether or not it was successful |
17:38.56 | allejo | as for custom poll options, i'm following the same way custom slash commands are handled and map objects (iirc) |
17:39.16 | JeffM | I'm not sure that's the best way |
17:39.27 | JeffM | custom commands have a "name" and persist |
17:39.36 | JeffM | a poll option is only valid for that one poll right? |
17:39.39 | blast007 | so do custom polls |
17:39.44 | blast007 | you're registering a keyword |
17:39.49 | JeffM | oh ok, |
17:39.57 | blast007 | so, /poll <customkeyword> <arguments here> |
17:40.00 | allejo | ^ |
17:40.03 | JeffM | so you can say "start poll MY_CUSTOM_POLL"? |
17:40.19 | JeffM | and the contents of MY_CUSTOM_POLL are registered at startup? |
17:41.00 | allejo | yes |
17:41.07 | JeffM | ok, |
17:41.07 | allejo | well at plug-in init |
17:41.14 | JeffM | yeah that's what I mean |
17:41.34 | JeffM | ok, so you should register a custom poll handler with the poll name |
17:42.09 | JeffM | and that takes a poll handler class, with several methods, Poll Start, Poll Finish, at least I'd think |
17:42.24 | JeffM | do you want a custom poll to be able to have dynamic arguments? |
17:42.46 | blast007 | meaning what? |
17:42.55 | JeffM | each time it runs there are different options |
17:43.04 | blast007 | that's how it would be |
17:43.09 | blast007 | passed as a string |
17:43.10 | JeffM | ok |
17:43.17 | allejo | oh yea, already have a poll handler class with PollOpen and PollClose functions that are left to be implemented by plug-in devs |
17:43.25 | JeffM | does the poll list the options available to the voters? |
17:43.38 | JeffM | methods, not functions ;) |
17:43.47 | blast007 | oh, by 'options' do you mean choices like 'yes' and 'no'? |
17:43.49 | allejo | both functions have an "action" which is a keyword and then a "value" which would be left for the plugin dev to figure out how to handle it |
17:44.07 | allejo | methods* :p |
17:44.09 | JeffM | well I guess what do people vote on when a poll is run, what answers can they give? |
17:44.16 | allejo | yes or no |
17:44.25 | JeffM | is it just yes no, or a,b,c,d, |
17:44.35 | blast007 | just boolean |
17:45.00 | JeffM | ok, so a poll asks a question, and then gets back how many Yes, how many no, and how many abstain, right? |
17:45.20 | blast007 | it's the same as how the current polls work since it's using that code |
17:45.32 | blast007 | it's just added hooks to allow custom poll types |
17:45.33 | JeffM | yeah, remember I haven't played in ages :) |
17:45.47 | allejo | and whose fault is that? :p |
17:45.49 | blast007 | yes, no, abstain (counted as no) are shown |
17:45.59 | JeffM | allejo: yours |
17:46.05 | JeffM | you didn't make the game better ;) |
17:46.10 | allejo | :( |
17:46.41 | blast007 | we just need PR |
17:46.50 | JeffM | ok so you are going to register a handler for your custom name, it's start method will be given the argument list |
17:46.57 | allejo | blast, and a mobile app |
17:47.02 | JeffM | the method needs to give back the question to ask right? |
17:47.14 | blast007 | BZ2GO, the new mobile app! |
17:48.06 | allejo | could you elaborate? |
17:48.06 | JeffM | I'm just trying to understand what you are trying to do, what the end results need to be |
17:48.28 | JeffM | so the input to a poll is a name and a list of arguments right? |
17:48.36 | allejo | yes |
17:48.43 | JeffM | the name tells you what handler to call |
17:48.49 | allejo | yes |
17:48.50 | JeffM | you have to give the handler the arguments |
17:49.08 | JeffM | since it's a custom poll, bzfs doesn't know what to do next right? it needs the handler to tell it |
17:49.17 | allejo | sorta |
17:49.35 | JeffM | so what info does bzfs need? the question to send to all the users? or are you expecting the plugin to send that using existing functions? |
17:49.53 | allejo | the way I have it right now to implement something like: /poll my_custom_poll param1 param2 |
17:50.16 | allejo | my_custom_poll is how it's registered and "param1 param2" is stored as a string |
17:50.22 | JeffM | what happens in a non custom pol? |
17:50.37 | allejo | left to the plug-in dev to implement and handle the space separated string if they need to |
17:51.07 | allejo | same thing, for example /poll set _mirror black. it's "set" for the action and "_mirror black" as the value |
17:51.16 | allejo | that value is sent to BZDB to do its magic |
17:51.31 | JeffM | so after you do that, what is displayed to the clients? |
17:52.17 | blast007 | "You are not authorized to run this command" hopefully, since poll set sucks ;) |
17:52.26 | JeffM | heh |
17:52.30 | JeffM | well lets say they are |
17:52.37 | JeffM | but that is a valid thing |
17:52.50 | allejo | at the start, it displays the standard poll message and any other messages could be added through the handler. same thing for the poll close |
17:52.53 | JeffM | do you want each plugin to manage it's own perms? or use the existing perm system? |
17:53.19 | JeffM | ok, so the handler has to give some info to the standard poll message right? |
17:53.22 | JeffM | like what to ask |
17:53.35 | JeffM | when you do a set poll, bzfs builds up the text to send to the clients right? |
17:53.54 | allejo | yes |
17:53.55 | JeffM | user blahah wants to set asdfasdf to fugrldere |
17:54.06 | JeffM | ok, do you want custom polls to hook into that same system? |
17:54.28 | blast007 | snprintf(reply, MessageLen, "A poll to %s %s has been requested by %s", cmd.c_str(), target.c_str(), callsign.c_str()); |
17:54.32 | blast007 | snprintf(reply, MessageLen, "%d player%s available, %d additional affirming vote%s required to pass the poll (%f %%)", available, available==1?" is":"s are", necessaryToSucceed, necessaryToSucceed==1?"":"s", clOptions->votePercentage); |
17:55.07 | allejo | it's currently already hooking into that ^ |
17:55.17 | JeffM | ok |
17:55.32 | JeffM | I'm not concerened about what you HAVE done, I'm concerened about what you WANT to do ;) |
17:55.46 | JeffM | so those args are passed back from your poll open right? |
17:55.47 | blast007 | I don't think we need to go too crazy with it |
17:56.03 | blast007 | we'll save the crazy refactoring for when we have a poll GUI |
17:56.06 | JeffM | you just want to make sure it's integrated cleanly |
17:56.19 | JeffM | so you can refeactor and not break plugins |
17:56.36 | blast007 | I'm not too concerned about that, really |
17:56.45 | allejo | the only issue I have right now is incorrect grammar with poll messages but... that's not worth the effort |
17:56.47 | JeffM | so once the poll is displayed, then bzfs tallies votes right? |
17:57.33 | blast007 | yup, there's a time limit on the poll, but if enough votes are sent before then it will end early (at least for enough 'yes' votes - not sure about 'no' votes) |
17:58.00 | JeffM | is the time limit variable for each poll? |
17:58.13 | blast007 | nope |
17:58.16 | JeffM | cool |
17:58.42 | blast007 | set from the bzfs config - not even BZDB |
17:58.52 | JeffM | so can the plugin decide if there were enough votes? or do you just want it to be told, "Do the thing" or "Don't do the thing" ? |
17:59.22 | blast007 | should use the same poll configuration as the built-ins |
17:59.28 | allejo | ^ |
17:59.34 | JeffM | ok, so the plugin has no logic |
17:59.42 | JeffM | so 3 virtual methods in your handler |
17:59.54 | JeffM | I don't see why you'd need to expose any kind of structure |
18:00.04 | JeffM | you've just got some arguments to methods and return values |
18:00.08 | JeffM | or maybe some pass by ref args |
18:00.40 | blast007 | was IP address mentioned? cuz you can get that other ways if you really need it |
18:00.56 | blast007 | or the voting system itself could be set to limit voting by IP |
18:00.59 | JeffM | of the requester? or the voters? |
18:01.03 | blast007 | either |
18:01.11 | allejo | well it's kind of a two part thing. 1st part is the custom poll options which we just discussed. the other part are API events that plugins can hook into without using custom poll options |
18:01.25 | allejo | the IP is exposed only when the poll is a kick, ban, or kill |
18:01.40 | allejo | any other polls don't have that value set |
18:02.00 | JeffM | the other events are for all poils, the alllow/disallow/notificaitons |
18:02.08 | JeffM | they have nothing to do with custom poll handlers |
18:02.22 | allejo | correct |
18:02.30 | JeffM | sure you MAY use them together, but you don't have to |
18:02.37 | JeffM | so I'd make those seperate pull requests |
18:02.40 | allejo | though those events would still occur when custom polls happen |
18:02.43 | JeffM | sure |
18:02.49 | JeffM | custom polls are still polls |
18:05.02 | JeffM | should only be 3 events I'd think, poll started, approved, or denied |
18:05.23 | JeffM | unless you want notification when each vote is entered |
18:05.52 | JeffM | and poll started should just have an "Allow" boolean and a reason string |
18:06.06 | JeffM | well ok, I'd break it into 2 events |
18:06.11 | JeffM | an allow poll, and a started |
18:06.20 | JeffM | then notification is sepeate from aproval |
18:07.05 | JeffM | so 4 events, 2 functions and a pure virtual handler class with 3 methods |
18:07.21 | allejo | got a veto event too |
18:07.39 | JeffM | what is a "Veto"? |
18:07.42 | allejo | i wanted to combine the allow and start events, but the way bzfs happens... it's not possible |
18:07.44 | JeffM | who can veto? |
18:07.53 | allejo | a poll is canceled by an admin or through an API call |
18:07.53 | JeffM | no, don't combine them |
18:07.56 | JeffM | keep them seperate |
18:08.00 | JeffM | ok sure |
18:08.15 | JeffM | some plugins may not want to approve/deny, just be notified |
18:08.22 | JeffM | don't make them deal with approvals |
18:08.32 | JeffM | seperate is a better design |
18:08.38 | JeffM | so 5 events |
18:08.51 | blast007 | plus you might want/need logic between the two events |
18:09.02 | JeffM | yeah you will NEED something between them |
18:09.13 | JeffM | there is no advantage in combining them |
18:09.16 | JeffM | none at all |
18:10.05 | JeffM | https://www.irccloud.com/pastebin/t84P8Gp7/ |
18:10.13 | JeffM | that's all I'd think you'd need for the handler |
18:11.01 | JeffM | you could pass the poller in as a player record if you wanted |
18:11.15 | allejo | take a look at the first post in my PR. i have two virtual methods in the poll handler |
18:11.20 | JeffM | but it may be nice to let the custom poll set the string that is displayed |
18:11.53 | JeffM | I don't think that will work |
18:12.01 | JeffM | that requres you to know the params at the start |
18:12.05 | JeffM | oh I forgot params |
18:12.24 | JeffM | https://www.irccloud.com/pastebin/8v1URl2S/ |
18:12.56 | JeffM | custom poll option makes it sound like it's somethign that can be combined with other options |
18:13.01 | JeffM | like you can choose A,B,C |
18:13.07 | JeffM | I'd just name it a custom poll |
18:13.20 | JeffM | then you have standard polls, set, ban, kick, etc.. |
18:13.26 | blast007 | or custom poll type |
18:13.28 | JeffM | and then custom polls, dance, potato |
18:13.32 | JeffM | sure ether one |
18:14.02 | JeffM | once there IS a poll interace, there may actualy be A/B/C choices then you will really have custom poll options |
18:14.10 | JeffM | so I'd not get in the way of that |
18:17.17 | allejo | i have no objections to renaming it to a poll type or something |
18:17.38 | allejo | https://github.com/allejo/bzflag/blob/feature/poll_wip/plugins/customPollOptionSample/customPollOptionSample.cpp#L35-L72 |
18:18.23 | allejo | that's how I was envisioning implementing it. follows same pattern as slash commands and generic callbacks |
18:21.44 | JeffM | so you want the plugin to handle the perm check? |
18:21.56 | JeffM | not use the existing system? |
18:22.29 | JeffM | also you are passing the strings by value, you need to pass them by pointer |
18:22.33 | JeffM | you are making a copy of them |
18:22.58 | allejo | it uses the existing system but say you want to introduce a "pollmute" perm, then the plugin would check for it. say way custom slash commands check for perms |
18:23.31 | JeffM | don't assume custom slash commands are the best design :) |
18:24.02 | allejo | never said they were, but might as well keep things consistent |
18:24.09 | JeffM | true |
18:24.35 | JeffM | well for any string that ISN'T edited by plugin you can pass it as a const char* |
18:24.51 | JeffM | what is "value" ? |
18:25.45 | allejo | would be the "parameters" of the poll |
18:25.49 | JeffM | can multiple variants of the same poll be "open" at the same time? |
18:26.04 | allejo | nope, bzfs can only handle one poll at a time |
18:26.22 | JeffM | then why do you need the args on close? |
18:26.41 | allejo | for example: "/poll mute annoying_player" then annoying_player would be the "value" |
18:26.47 | JeffM | sure the argument |
18:26.57 | JeffM | I'd use the word "argument" :) |
18:27.21 | allejo | seems apt |
18:27.28 | JeffM | none of those get edited, they can all be const char* |
18:28.00 | JeffM | you could also send in a player record instead of playerID |
18:28.04 | JeffM | to the open |
18:28.44 | JeffM | also you did "bz_removeCustomMapObject" not poll option ;) |
18:29.47 | allejo | grumbles |
18:30.28 | allejo | only reason I went with the player ID was because of slash commands |
18:30.39 | JeffM | meh |
18:30.45 | JeffM | everyone's going to get a record anyway |
18:31.06 | JeffM | can you get help on a poll? |
18:31.27 | allejo | and true, I could use const char* but const char* doesn't have "==" :( |
18:31.44 | blast007 | there's probably a usage output, but I don't think there's a good way to add to that currently |
18:31.46 | JeffM | it's the plugins job to assign it to a local std::string if it wants to |
18:32.30 | JeffM | you are making it use a lot more ram by forcing it into a bzapi str |
18:33.07 | allejo | well, custom poll types are displayed after the /poll usage output when an invalid poll type is used |
18:33.39 | JeffM | ok, so you do need a useage callback |
18:35.49 | allejo | well when you type an invalid poll, it'll display the available types. custom ones are appended to that list |
18:36.01 | allejo | any more detail could fit in a /help message, no? |
18:40.15 | JeffM | https://www.irccloud.com/pastebin/DmWMaHBA/ |
18:40.20 | JeffM | that's how i'd do it |
18:40.36 | JeffM | there is no need to register the agrument |
18:40.40 | JeffM | the argument is variable |
18:40.50 | JeffM | all you have to do is register the name |
18:41.30 | JeffM | there really isn't a NEED to check the action ether, it's best to make a handler per poll |
18:41.59 | JeffM | providing the argument just allows people to write crappy plugins if they have to, but the samples should do one handler per thing |
18:46.08 | allejo | what's the reasoning for wanting one handler per poll or command? out of curiosity |
18:59.04 | *** join/#bzflag zuii (~zuii@BC0663EF.catv.pool.telekom.hu) |
19:05.26 | JeffM | code cleanlyness |
19:05.37 | JeffM | so you don't end up wiht a bunch of IF ELSE ELSE ELSE |
19:05.52 | JeffM | and if a handler needs global data, you attach it to the handler |
19:05.59 | JeffM | make each "THING" do one thing |
19:06.14 | JeffM | it's just cleaner from an oop design |
19:06.20 | JeffM | I mean your car isn't also a blender |
19:06.30 | JeffM | but both have motor controllers |
19:12.50 | allejo | well that's a good analogy |
19:13.37 | blast007 | related: https://youtu.be/niegc7QcilM |
19:20.21 | *** join/#bzflag zuii (~zuii@BC0663EF.catv.pool.telekom.hu) |
19:22.05 | *** join/#bzflag zuii (~zuii@BC0663EF.catv.pool.telekom.hu) |
19:28.35 | *** join/#bzflag Zehra (~Zehra@unaffiliated/zehra) |
19:42.34 | *** join/#bzflag Zehra (~Zehra@unaffiliated/zehra) |
20:42.34 | JeffM | I'm not a huge fan of making things like command or map handlers be part of the plug-in |
20:42.38 | JeffM | I'd rather do sub classes |
20:42.50 | JeffM | then you don't go down the multiple inheritance rabbit hole |
20:43.07 | JeffM | really all the pure virtual handlers should be interfaces |
20:43.57 | JeffM | but I'm more used to the managed way of doing stuff these days |
20:44.02 | JeffM | and sub classes are easier |
20:57.33 | JeffM | if I was going to rewrite bzfs in C#, this is what your plugin would look like |
20:57.41 | JeffM | https://www.irccloud.com/pastebin/89VDS57a/ |
21:00.41 | allejo | but then comments would be in XML |
21:00.47 | JeffM | heh |
21:00.54 | allejo | docs* |
21:00.58 | JeffM | you don't have to do the tripple /// comments |
21:01.11 | JeffM | I just do them by habbit |
21:03.44 | JeffM | if I wanted to support multiple polls at the same time (like when there is a real poll GUI), I'd do something ike this, |
21:03.53 | JeffM | https://www.irccloud.com/pastebin/3OuzyJB7/ |
21:06.17 | *** join/#bzflag Notify (~notify@104.225.5.10) |
21:06.19 | allejo | so you'd have the plugins handle multiple polls, not bzfs? |
21:06.40 | JeffM | no, I'd have bzfs handle multiple polls and assign each poll an ID, then pass that ID to the plugin |
21:06.46 | JeffM | so it knows what poll it's talking about |
21:07.04 | JeffM | so you could have 2 sepeate "mute" polls at the same time |
21:07.07 | JeffM | each with it's own ID |
21:07.27 | JeffM | unless you wanted to go the factory route |
21:07.31 | allejo | ah |
21:07.39 | JeffM | then it'd be a little different |
21:07.50 | JeffM | you don't register a handler, you register a handler factory |
21:08.00 | JeffM | so bzfs creates an object per poll instance |
21:12.22 | JeffM | that'd be a better method if you wanted to use scripting langauges for API hooks |
21:12.36 | JeffM | make the factory run the script each time the thing is needed |
21:16.07 | *** join/#bzflag a_meteorite (~a_meteori@unaffiliated/ameteorite/x-000000001) |
21:21.18 | blast007 | even when there's a proper UI, I don't think we'd want multiple polls at the same time |
21:22.38 | blast007 | voting in polls shouldn't interrupt the game, so it'd be in the corner of the screen and voting would use two or more hotkeys that were not used for other things |
21:35.38 | JeffM | fair enough |
21:36.27 | JeffM | I derive enjoyment from developing useful APIs, not playing silly tank games :) |
21:52.49 | JeffM | events would be so much cooler with language support for events :) |
22:30.31 | *** join/#bzflag zuii (~zuii@BC0663EF.catv.pool.telekom.hu) |
23:34.34 | *** join/#bzflag quantumdot (~quantum@unaffiliated/quantumdot) |
23:35.17 | *** join/#bzflag blast007_ (~blast007@bzflag/developer/Blast) |
23:37.59 | quantumdot | is it the nameserver down or is it only my end? |
23:38.20 | Zehra | it's on my end too |
23:38.27 | quantumdot | ah ok |
23:38.36 | Zehra | was on ziggurat map and i didn't get auth |
23:38.52 | quantumdot | not server list either |
23:39.16 | Zehra | nope |
23:39.44 | Zehra | btw |
23:39.50 | Zehra | check urban jungle atm |
23:39.55 | quantumdot | ok, all fine, I can justify to be back to work |
23:39.56 | Zehra | this is a little odd |
23:40.03 | Zehra | ok |
23:40.38 | Zehra | i'm able to spawn without auth |
23:40.45 | Zehra | and i'm using my own nick |
23:41.01 | Zehra | it seems to think it's unregistered or something :P |
23:41.08 | blast007 | nameserver? you mean list server? |
23:41.13 | quantumdot | yes blast007 |
23:41.19 | quantumdot | list server |
23:41.28 | blast007 | it was down for a little bit, at least |
23:42.43 | quantumdot | blast007: I dont get response yet, just wanted to tell here in case your were not unaware |
23:43.07 | Zehra | i think auth might be back |
23:43.09 | quantumdot | *..you were unaware* |
23:44.11 | *** part/#bzflag Cobra_Fast_ (~coprah@wtwrp.de) |
23:44.20 | blast007 | may just be some wonkyness with a network somewhere right now |
23:44.27 | *** join/#bzflag Cobra_Fast (~coprah@wtwrp.de) |
23:45.27 | quantumdot | ok, np |
23:46.05 | quantumdot | I'll be back to work for a while and try later, thx |
23:47.29 | blast007 | should be better now |
23:47.52 | blast007 | there was some DNS resolution issue, so DNS requests were timing out, delaying other stuff |
23:52.17 | blast007 | more specifically, seems like my host's IPv6 is down, so the IPv6 nameservers I had set couldn't be reached |