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