File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ def msg(args):
2222import bec_rcon
2323rcon_client = bec_rcon.ARC(" 192.168.0.1" , " MyPassword" , 2302 )
2424rcon_client.add_Event(" received_ServerMessage" , msg)
25-
25+ rcon_client.loadMission(" becti_0097_z1305.Altis.pbo" )
26+ rcon_client.addBan(player_id = 1 , reason = " Rcon is watching!" , time = 0 )
2627```
2728# Known Issues:
2829* [ Outbound messages can only contain ASCII charaters] ( https://github.com/Yoshi-E/Python-BEC-RCon/issues/1 )
Original file line number Diff line number Diff line change @@ -256,8 +256,19 @@ async def getMissions(self):
256256 return await self .waitForResponse ()
257257
258258 #Loads a mission
259+ #Mission file name without .pbo at the end!
259260 async def loadMission (self , mission : str ):
260- await self .send ('mission ' + mission )
261+ await self .send ('#mission ' + mission )
262+ return await self .waitForResponse ()
263+
264+ #Loads Events
265+ async def loadEvents (self ):
266+ await self .send ('loadEvents' )
267+ return await self .waitForResponse ()
268+
269+ #Loads Scripts
270+ async def loadScripts (self ):
271+ await self .send ('loadScripts' )
261272 return await self .waitForResponse ()
262273
263274 #Ban a player's BE GUID from the server. If time is not specified or 0, the ban will be permanent.
@@ -483,6 +494,7 @@ async def listenForData(self):
483494 except Exception as e :
484495 if (type (e ) != BlockingIOError ): #ignore "no data recevied" error
485496 traceback .print_exc ()
497+ self .disconnect ()
486498 if (answer == "" ):
487499 await asyncio .sleep (0.5 )
488500
Original file line number Diff line number Diff line change 1111
1212setup (
1313 name = 'bec_rcon' ,
14- version = '0.1.0 ' ,
14+ version = '0.1.1 ' ,
1515 description = 'API for Battleye extended controls - Arma3' ,
1616 long_description = readme ,
1717 author = 'Yoshi_E' ,
You can’t perform that action at this time.
0 commit comments