Tim Felgentreff
7797fab297
fix indentation and whitespace
2020-12-10 09:01:37 +01:00
Tim Felgentreff
4e5fd6773c
do not attempt to create account multiple times
2020-12-10 09:01:37 +01:00
Tim Felgentreff
a7e93459fa
use static message buffer
2020-12-10 09:01:37 +01:00
Tim Felgentreff
0a8ed97c60
use a more compatible method to get my own address
...
This was after discussion with other developers on the BNetDocs chat. Since the
/netinfo command is a pvpgn specific thing, we instead advertise a fake game
when logging in and check what the server says our ip:port are.
2020-12-10 09:01:37 +01:00
Tim Felgentreff
17632c1baa
remove assert for compatibility with Atlas
2020-12-10 09:01:37 +01:00
Tim Felgentreff
a77a0468f9
request external address in a better place
2020-12-10 09:01:37 +01:00
Tim Felgentreff
0da52223d8
debug printing for online service
2020-12-10 09:01:36 +01:00
Tim Felgentreff
83ef848156
request our own external address in the beginning so we can udp punch without help
2020-12-10 09:01:36 +01:00
Tim Felgentreff
63f6a41678
fix udppunch whisper parsing
2020-12-10 09:01:36 +01:00
Tim Felgentreff
ab4f322c2d
fix array index oob
2020-12-10 09:01:36 +01:00
Tim Felgentreff
4bf454058b
since UDP port is shared with other network events, we need to handle incoming UDP packages differently
2020-12-10 09:01:36 +01:00
Tim Felgentreff
0b1f3157aa
fix echoreply response
2020-12-10 09:01:36 +01:00
Tim Felgentreff
d043513453
fix setting udp connection info on the server
2020-12-10 09:01:36 +01:00
Tim Felgentreff
37ee7c69fb
udp packages do not have a length
2020-12-10 09:01:36 +01:00
Tim Felgentreff
81b497d17b
move dump helper into static function
2020-12-10 09:01:36 +01:00
Tim Felgentreff
9f125d7141
tweak refresh ticks
2020-12-10 09:01:35 +01:00
Tim Felgentreff
a02f20caca
support custom /udppunch whisper message to help with NAT
2020-12-10 09:01:35 +01:00
Tim Felgentreff
f4502393da
make sure we close the UDP network when departing the online server
2020-12-10 09:01:35 +01:00
Tim Felgentreff
817121f8ab
minor tweak
2020-12-10 09:01:35 +01:00
Tim Felgentreff
91b2eb51e9
add joined channel to list if it is unlisted
2020-12-10 09:01:35 +01:00
Tim Felgentreff
bd4169420d
simplify login procedure
2020-12-10 09:01:35 +01:00
Tim Felgentreff
d529d9b0a9
use our game udp socket for bnet hole punching
2020-12-10 09:01:35 +01:00
Tim Felgentreff
8f9d2af303
minor tweaks for channel refreshes, info text color, disconnecting
2020-12-10 09:01:35 +01:00
Tim Felgentreff
eeb89e9729
do not create account automatically, expose lua function to do it
2020-12-10 09:01:35 +01:00
Tim Felgentreff
c6982ac07a
do not modify info string
2020-12-10 09:01:34 +01:00
Tim Felgentreff
2a1f8c6440
return the last info on unknown state
2020-12-10 09:01:34 +01:00
Tim Felgentreff
750b96c573
add login lua function, immediately execute stateless callbacks when they are set
2020-12-10 09:01:34 +01:00
Tim Felgentreff
e6887ef0cf
include our script.h instead of lua.h directly
2020-12-10 09:01:34 +01:00
Tim Felgentreff
3915ba622a
make OnlineContext a global lua value with functions
2020-12-10 09:01:34 +01:00
Tim Felgentreff
f136ef9ffb
disconnect handling
2020-12-10 09:01:34 +01:00
Tim Felgentreff
eff1edb158
allow disconnecting by passing empty host
2020-12-10 09:01:34 +01:00
Tim Felgentreff
469af90622
fix reading the port for a game
2020-12-10 09:01:34 +01:00
Tim Felgentreff
60b0c859bb
better debug dump
2020-12-10 09:01:34 +01:00
Tim Felgentreff
36a561459c
fix parsing and returning games
2020-12-10 09:01:33 +01:00
Tim Felgentreff
7680e9773d
minor cleanup
2020-12-10 09:01:33 +01:00
Tim Felgentreff
475588af99
fix game creation message
2020-12-10 09:01:33 +01:00
Tim Felgentreff
55eb35ebbb
implement the game advertising lua functions
2020-12-10 09:01:33 +01:00
Tim Felgentreff
710bdfca40
echo our own chat messages
2020-12-10 09:01:33 +01:00
Tim Felgentreff
6a6260d035
ignore this
2020-12-10 09:01:33 +01:00
Tim Felgentreff
bf7a825fc5
allow joining channel
2020-12-10 09:01:33 +01:00
Tim Felgentreff
404fdc6047
fix requesting user info
2020-12-10 09:01:33 +01:00
Tim Felgentreff
485db94bd0
tweak and fix lua GoOnline
2020-12-10 09:01:33 +01:00
Tim Felgentreff
9ab1d216d1
get host/port from lua
2020-12-10 09:01:33 +01:00
Tim Felgentreff
d421df2e22
better GoOnline docs and states
2020-12-10 09:01:32 +01:00
Tim Felgentreff
964317234b
return results from GoOnline
2020-12-10 09:01:32 +01:00
Tim Felgentreff
f80b13093b
rework GoOnline to leave gui control to lua
2020-12-10 09:01:32 +01:00
Tim Felgentreff
46049c2bdc
Fix warnings and build on Windows
2020-12-10 09:01:32 +01:00
Tim Felgentreff
d24c9f2535
fix compilation
2020-12-10 09:01:32 +01:00
Tim Felgentreff
7ecf62cdd6
implement reporting game result
2020-12-10 09:01:32 +01:00
Tim Felgentreff
fd8c5eb329
tighten down calls for game join/part and start/stop
2020-12-10 09:01:32 +01:00