11:37 < Learath2> @Dune since chiller and fookonauts clients are caught up to master most of the time, people are actually indirectly playing on the nightly, is his point I guess 11:43 < Learath2> CChat just has a lot of behaviour that's not very easy to refactor 11:53 < bridge> [teeworlds] It does 13:14 < bridge> [teeworlds] Learath2: chat commands bug, you can't use server-sided commands anymore... 13:45 < bridge> [teeworlds] @Dune are you sure it isn't a bug with the server? it works fine on fokkonaut's server and on Law's server 13:46 < bridge> [teeworlds] @Learath2 I press return and it doesn't close the chat 13:46 < bridge> [teeworlds] that's not normal to me 13:46 < bridge> [teeworlds] it doesn't for me either, but it working fine on other servers suggests to me that they are doing something wrong, rather then the client doing something wrong 13:46 < bridge> [teeworlds] that's strange 13:47 < bridge> [teeworlds] because again, even if the server does some shit, the command should send and the chat input should close 13:47 < bridge> [teeworlds] have you tested on the suggested IP? 13:48 < bridge> [teeworlds] yes, they are registering the commands in a weird way 13:49 < bridge> [teeworlds] `[chat_commands]: adding server chat command: name='cmdlist' args='(null)' help='show the cmd list'` 13:49 < bridge> [teeworlds] Not my fault they aren't sending the arglist correctly 13:50 < bridge> [teeworlds] shouldn't chat input still work? 13:50 < bridge> [teeworlds] even though the args format is invalid 13:51 < bridge> [teeworlds] I can clear the chat if you want 13:52 < bridge> [teeworlds] we can't send the message as is as the command list is still up, it's conflicting requirements 13:52 < bridge> [teeworlds] I mean, from a user it looks strange, and shouldn't happen right? 13:52 < bridge> [teeworlds] I don't remember what the printed argument list was, I think it was empty? 13:52 < bridge> [teeworlds] I guess I could patch it to just send it if the argument list is empty, but imho that's not great 13:52 < bridge> [teeworlds] or I can treat null argument list as "" 13:53 < bridge> [teeworlds] I don't know what's the best solution, but the current situation is not desirable 13:53 < bridge> [teeworlds] You could also discard the command entirely I guess or treat it as "" 13:53 < bridge> [teeworlds] Again, I don't quite get why the client needs to compensate for the mistake of the server, but as said, we have a couple of choices 13:54 < bridge> [teeworlds] The server doing things wrong shouldn't glitch the user interface 13:54 < bridge> [teeworlds] Do you disagree? 13:56 < bridge> [teeworlds] Yeah sure, but at that point all our assumptions are invalid 13:56 < bridge> [teeworlds] How do we know the server conforms to the protocol after it sends malformed data? 13:57 < bridge> [teeworlds] If the server reacts poorly to the command, I feel like that is fine 13:57 < bridge> [teeworlds] But it shouldn't block the GUI 13:57 < bridge> [teeworlds] Okay, I'll treat nulls as an empty arglist and I'll clear out the chat even if parsing fails 13:57 < bridge> [teeworlds] Isn't one of the two enough? 13:58 < bridge> [teeworlds] well the null fix would work for that alivefng server 13:58 < bridge> [teeworlds] however if a server sends a malformed argtext, or the user just enters something wrong it still gets the interface stuck 13:59 < bridge> [teeworlds] wait, the fng server sends literally "null"? I thought that's something that the parser does when the arglist is malformed 13:59 < bridge> [teeworlds] e.g. the same exact alivefng server sends `[chat_commands]: adding server chat command: name='help' args='' help='show the cmd list or get more information to any command'` 13:59 < bridge> [teeworlds] this is also wrong 14:00 < bridge> [teeworlds] it should be "s" or "r" for an old server and a new server can add a description with "s[command]" 14:00 < bridge> [teeworlds] @Dune that message is literally printed out as soon as we unpack the msg 14:00 < bridge> [teeworlds] ah, okay 14:00 < bridge> [teeworlds] it sends 0x0 somehow 14:00 < bridge> [teeworlds] (i don't even know how it manages to pack that) 14:01 < bridge> [teeworlds] so with that fix, what would happen if you do `/help rank`? 14:01 < bridge> [teeworlds] it'd still get stuck 14:02 < bridge> [teeworlds] well with both fixes it'd clear out the input and close chat atleast 14:02 < bridge> [teeworlds] but it's just a malformed argument list, that's the best we can do 14:02 < bridge> [teeworlds] I see 14:03 < bridge> [teeworlds] maybe an indication that a failure occured? 14:03 < bridge> [teeworlds] Yeah, I don't know, that's trickty 14:03 < bridge> [teeworlds] small flash behind the chat after we clear? 14:04 < bridge> [teeworlds] This kind of broken server commands never worked right? not like we broke compatibility somewhere 14:04 < bridge> [teeworlds] The way to make it work in that case would be to send plain text to the server, but you don't want to set that as a fallback in case the server doesn't catch the command, right, that's dangerous 14:10 < bridge> [teeworlds] well worst case it'd print it out 14:10 < bridge> [teeworlds] if parsing fails for something that appears to be a command, just try sending it? 14:10 < bridge> [teeworlds] well it could expose something like a login though 14:10 < bridge> [teeworlds] that's a no no 14:12 < bridge> [teeworlds] @Dune I'm not sure how it worked before, if it worked at all that is 14:12 < bridge> [teeworlds] yeah 14:12 < bridge> [teeworlds] Ah, I remember, ryozuki never even parsed the arguments 14:15 < bridge> [teeworlds] hm, as a fallback maybe we could just send it as is, even if parsing fails? 14:15 < bridge> [teeworlds] yeah, as long as it's not straight in chat 14:15 < bridge> [teeworlds] I mean as a command, that wouldn't display on chat 14:25 < bridge> [teeworlds] I really don't want to touch this anymore... 14:27 < bridge> [teeworlds] adding features tends to bring twice the work as debugging :D 14:27 < bridge> [teeworlds] you're doing the dirty work 14:32 < bridge> [teeworlds] oh, the null fix wont help at all 14:32 < bridge> [teeworlds] I thought it was my libc outputting the (null) 14:33 < bridge> [teeworlds] @Dune they pack "(null)" for the arglist 14:33 < bridge> [teeworlds] ah, makes sense 14:33 < bridge> [teeworlds] was wondering how they were packing 0x0 14:33 < bridge> [teeworlds] I'll just do the fallback send 14:33 < bridge> [teeworlds] cool, thanks <3 14:33 < bridge> [teeworlds] or I can just clear and ignore it instead 14:34 < bridge> [teeworlds] both fine by me 14:43 < bridge> [teeworlds] @Dune what is supposed to happen when you press enter with an incomplete command? 14:44 < bridge> [teeworlds] client side: do nothing 14:44 < bridge> [teeworlds] server side: I say do nothing, but you could also send that garbage to the server 14:44 < bridge> [teeworlds] do nothing as in don't even clear the chat? 14:44 < bridge> [teeworlds] yeah 14:45 < bridge> [teeworlds] imo it's only a problem in the case of the fng server because there is no visible errors 14:48 < bridge> [teeworlds] and for an invalid command? 14:49 < bridge> [teeworlds] I'm guessing do nothing is fine for that too 14:50 < bridge> [teeworlds] invalid in what way? 14:51 < bridge> [teeworlds] invalid is not even a substring of a command 14:52 < bridge> [teeworlds] so /sfjsdfslf ? 14:52 < bridge> [teeworlds] yep 14:52 < bridge> [teeworlds] I think we send it at the moment? because the commands menu is not open 14:52 < bridge> [teeworlds] fng doesn't even respond to the fallback, I guess I won't bother sending it 14:52 < bridge> [teeworlds] @Dune yes, that's the current behaviour 14:52 < bridge> [teeworlds] if the commands menu is not open, we send 14:53 < bridge> [teeworlds] this was designed to minimize friction with servers that use old-styled chat commands (directly in chat) 14:53 < bridge> [teeworlds] so you can open chat, type /help, and have it work regardless of how it is implemented 14:54 < bridge> [teeworlds] well then I don't think we can fix this issue 14:55 < bridge> [teeworlds] the (null)s mean that if we want it to work, we need to send even if parsing fails 14:55 < bridge> [teeworlds] however the command menu will be open 14:55 < bridge> [teeworlds] yeah, but that's a special case where the server did garbage 14:55 < bridge> [teeworlds] some friction is unavoidable, right 14:55 < bridge> [teeworlds] currently it works with servers that are up to date with the latest standard, and servers behaving correctly at 0.7.3 14:56 < bridge> [teeworlds] yes 14:57 < bridge> [teeworlds] Okay how about this, if parsing fails, I check that the currently selected command is registered by the server, if it is, I just send the command and arguments as is in a command packet 14:57 < bridge> [teeworlds] I think your fix is fine? 14:58 < bridge> [teeworlds] Well the way we detect a parsing fail in the command itself is no different to the way we detect a parsing fail in the arguments 14:59 < bridge> [teeworlds] (so the naive fix of sending a fallback if parsing fails ends up sending incomplete commands too) 14:59 < bridge> [teeworlds] right, yeah 14:59 < bridge> [teeworlds] sounds good 15:19 < bridge> [teeworlds] okay, the behaviour is sane but it won't work for that server as it doesn't even seem to accept command messages 15:20 < bridge> [teeworlds] I don't think we want a fallback to a chat message either 15:20 < bridge> [teeworlds] yeah I agree 15:24 < bridge> [teeworlds] I made a pull request with the fallback anyway, incase you want it merged 15:25 < bridge> [teeworlds] well, it still fixes the weird UI glitch, so we should merge it 15:27 < bridge> [teeworlds] yeah the UI glitch is my biggest concern 16:03 < bridge> [teeworlds] note that the UI glitches for quite a bit of weird server input 16:03 < bridge> [teeworlds] (incomplete snapshots, etc.) 16:06 < bridge> [teeworlds] @heinrich5991 the UI itself? 16:07 < bridge> [teeworlds] yes 16:07 < bridge> [teeworlds] but most server modifications start from vanilla, they don't get to send weird snapshots 16:08 < bridge> [teeworlds] founds those bugs while writing the server not based on teeworlds code 16:13 < bridge> [teeworlds] Some games offload responsibility of some part of the UI on mods 16:17 < bridge> [teeworlds] is there some unban command that takes an IP instead of an index as argument in vanilla? 16:44 < bridge> [teeworlds] @Dune turns out 0.7.4 sends the entire command string as "arguments" do you want to keep that behaviour aswell? 17:07 < bridge> [teeworlds] @Learath2 that sounds useless, right? 17:08 < bridge> [teeworlds] Well turns out fng2 relies on that, that's why the fallback doesn't work there 17:08 < bridge> [teeworlds] that's the only mod I could find that relies on that behaviour 17:08 < bridge> [teeworlds] well that is online 23:18 < bridge> [teeworlds] now that I think more about it, if we are going to cave in and send a fallback, why even bother parsing the command line?