forked from viviicat/rcon-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrcontool.otl
55 lines (51 loc) · 1.94 KB
/
rcontool.otl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Goals
Python/Glade-based UI which will allow for simple, easy server management using the RCON protocol.
All Valve games supported (servers running any supported platforms)
L4D2 supported as priority (since it's going to be the first linux game)
Elegant, intuitive UI
Future Goals/Expansions
Other rcon protocol support for working with alternate server setups
Advanced features
Sourcemod command support
Easy-use buttons for kicking/banning, all that jazz
Logging tools
Bots & a bot API!
Synchronized commands across a set of servers (so like server groups)
Link to FTP, so you can right click to open an ftp connection?
Windows support (as an OSS alternative to HLSW)
#Query subsystem
On load:
Begin net thread
loop:
lock:
check list of new servers
add to existing servers list
for all existing servers, establish query connection
send query info to rcontool via gobject.idle_add()
On server add:
gui thread locks list of new servers
adds new server
main thread will get new server next time it comes to top of loop
Caveats:
servers are queried in order
Solution: randomize order of query
but that's silly
Query selected server first perhaps
cannot query one server (e.g. the currently-selected server) more
But:
It shouldn't matter too much as queries are fast
we should get through all servers pretty quickly
Set any timeouts to be relatively quick
#How an rcon command runs:
Don't make it asyncronous just yet as that's a huge pain
maybe use twisted later?
server.rcon_cmd called
Calls sourcelib and gets a response
calls self.manager.log_rcon(self, query, response)
Problems
Need a better query-failure triage system
servers that are fine but don't work at the moment should be in the list but be 'unselectable'
Items should empty the cur_server var when clicked
display disconnect icon in field?
continue to ping them on a slower timescale (5s)
when they return, allow them to be clicked