Download the PHP package dsg/postscriptum-rcon-php without Composer
On this page you can find all versions of the php package dsg/postscriptum-rcon-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dsg/postscriptum-rcon-php
More information about dsg/postscriptum-rcon-php
Files in dsg/postscriptum-rcon-php
Package postscriptum-rcon-php
Short Description Post Scriptum Server RCON library
License MIT
Informations about the package postscriptum-rcon-php
Join the Squad RCON Community
If you have any questions or need help with getting started with RCON in OWI games you should make sure to join the Squad RCON Community on Discord.
Installation
You can install this package by using composer and the following command:
The code will then be available under the DSG\PostScriptumRCON
namespace.
Commands
- [x] ListPlayers
- [x] AdminListDisconnectedPlayers
- [x] ShowNextMap
- [x] AdminKick "\<NameOrSteamId>" \<KickReason>
- [x] AdminKickById \<PlayerId> \<KickReason>
- [x] AdminBan "\<NameOrSteamId>" "\<BanLength>" \<BanReason>
- [x] AdminBanById \<PlayerId> "\<BanLength>" \<BanReason>
- [x] AdminBroadcast \<Message>
- [x] AdminRestartMatch
- [x] AdminEndMatch
- [x] AdminChangeMap \<MapName>
- [x] AdminSetNextMap \<MapName>
- [x] AdminSetMaxNumPlayers \<NumPlayers>
- [x] AdminSetServerPassword \<Password>
- [x] AdminForceTeamChange \<NameOrSteamId>
- [x] AdminForceTeamChangeById \<PlayerId>
- [ ] AdminDemoteCommander \<PlayerName>
- [ ] AdminDemoteCommanderById \<PlayerId>
- [x] AdminDisbandSquad \<TeamId> \<SquadId>
- [x] AdminRemovePlayerFromSquad \<PlayerName>
- [x] AdminRemovePlayerFromSquadById \<PlayerId>
- [x] AdminWarn \<NameOrSteamId> \<WarnReason>
- [x] AdminWarnById \<PlayerId> \<WarnReason>
USAGE
Create an instance
Instanciate the PostScriptumServer class to open a new RCON connection. This will throw an Exception if no connection can be made.
ListPlayers
Get the current Player list using the ListPlayers command. This does not include disconnected players.
Get disconnected Players
Get disconnected players using the ListPlayers command.
AdminKick
Kick a player by name, SteamId or ingame id.
AdminBan
Ban a player by name, SteamId or ingame id.
Get the current map
Get the current map using the ShowNextMap command
Get the next map
Get the next map using the ShowNextMap command
AdminRestartMatch
Restart the current match
AdminEndMatch
End the current match
AdminBroadcast
Broadcast message to all players on the server
AdminChangeMap
Set the next map and end the current game immediately.
AdminSetNextMap
Sets next map
AdminSetMaxNumPlayers
Set the maximum amount of players / slots
AdminSetServerPassword
Set the server password
AdminForceTeamChange
Forces a player to the opposite team by providing the name or steamid.
AdminForceTeamChangeById
Forces a player to the opposite team by providing the ingame Player id.
AdminDisbandSquad command.
Disbands a Squad by providing the Team id / index & Squad id / index.
AdminRemovePlayerFromSquad
Removes a Player from his Squad by providing the Player name.
AdminRemovePlayerFromSquadById
Removes a player from his Squad by providing the ingame Player id.
AdminWarn
Warns a Player by providing his name / steamid and a message.
AdminWarnById
Warns a Player by id.
Important Note
Make sure to always close the connection manually or trigger a disconnect by destructing the object to preventt blocking the RCON server by using up it'S available connections.
Special Thanks
- SquadSlovenia (Intial creators)
- Brozowski (Major contributor)
- [ToG] subtlerod (Major contributions to the used SquadRcon implementation)
- Thomas Smyth (Creator of SquadJS, a great resource for Squad RCON).