File tree Expand file tree Collapse file tree 4 files changed +13
-5
lines changed
Expand file tree Collapse file tree 4 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ MyNode:
3232 config : ' {instance.home}\Config\SRS.cfg'
3333 host : 127.0.0.1
3434 port : 5002
35- minimized : true # start SRS minimized (default: true)
35+ gui_server : true # Optional: use the SRS-Server.exe (GUI server) instead of the command line one
36+ minimized : true # Old SR-Server.exe: start SRS minimized (default: true)
3637 autoconnect : true # install the appropriate DCS-SRS-AutoConnectGameGUI.lua, default: true
3738 awacs : true # if you use LotAtc
3839 lotatc_export_port : 10712
Original file line number Diff line number Diff line change @@ -402,10 +402,13 @@ def get_inst_path(self) -> str:
402402
403403 def get_exe_path (self ) -> str :
404404 if parse (self .version ) >= parse ('2.2.0.0' ):
405- os_dir = 'ServerCommandLine-Windows' if sys .platform == 'win32' else 'ServerCommandLine-Linux'
406- self .exe_name = 'SRS-Server-Commandline.exe' if sys .platform == 'win32' else 'SRS-Server-Commandline'
407- return os .path .join (self .get_inst_path (), os_dir , self .exe_name )
408- #return os.path.join(self.get_inst_path(), 'Server', 'SRS-Server.exe')
405+ if self .config .get ('gui_server' , False ):
406+ self .exe_name = 'SRS-Server.exe'
407+ return os .path .join (self .get_inst_path (), 'Server' , self .exe_name )
408+ else :
409+ os_dir = 'ServerCommandLine-Windows' if sys .platform == 'win32' else 'ServerCommandLine-Linux'
410+ self .exe_name = 'SRS-Server-Commandline.exe' if sys .platform == 'win32' else 'SRS-Server-Commandline'
411+ return os .path .join (self .get_inst_path (), os_dir , self .exe_name )
409412 else :
410413 self .exe_name = 'SR-Server.exe'
411414 return os .path .join (self .get_inst_path (), self .exe_name )
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ schema;instance_srs_schema:
2929 config : {type: str, required: true, nullable: false}
3030 host : {type: str, nullable: false, range: {min: 1}}
3131 port : {type: int, nullable: false, func: unique_port}
32+ gui_server : {type: bool, nullable: false}
3233 minimized : {type: bool, nullable: false}
3334 debug : {type: bool, nullable: false}
3435 awacs : {type: bool, nullable: false}
Original file line number Diff line number Diff line change @@ -196,6 +196,9 @@ async def register_guild_name():
196196
197197 try :
198198 await self .wait_until_ready ()
199+ if not self .guilds :
200+ self .log .error ("You need to invite your bot to a Discord server!" )
201+ raise FatalException ()
199202 asyncio .create_task (register_guild_name ())
200203 if not self .synced :
201204 self .log .info (f'- Preparing Discord Bot "{ self .user .name } " ...' )
You can’t perform that action at this time.
0 commit comments