18.03.2015, 22:53
(
Последний раз редактировалось Abagail; 19.03.2015 в 01:27.
)
RemoteRCON - Managing External RCON Packets!
This include simply takes advantage of the OnRemoteRCONPacket callback in YSF r11(kurta999). It allows you to enable / disable the RCON system completely, whitelist IP addresses, log detailed access attempts, drop RCON packets and more.This include solely depends on rcon being set to 1 in server.cfg so make sure it's enabled. You can simply use ToggleRCON with the include to disable it. The functions and their uses can be found below:
Functions:
pawn Код:
WhitelistIPAddress(ipaddr[])
pawn Код:
UnwhitelistIPAddress(ipaddr[])
pawn Код:
ToggleRemoteRCON(bool: toggle)
pawn Код:
ToggleRemoteWhitelist(bool: toggle)
pawn Код:
IsIPWhitelisted(ipaddr[])
pawn Код:
ToggleLogging(bool: toggle)
Callbacks:
pawn Код:
forward OnRemoteRCONFail(ipaddr[], port, password[], command[], reason);
Reasons:
0 - Never called, ever(unless the callback is called outside of the include)
1 - Unwhitelisted IP address
2 - Unsuccessful login / request.
3 - RCON system is disabled.
pawn Код:
forward OnRemoteRCONExecuted(ipaddr[], port, password[], command[]);
REQUIREMENTS
Ofcourse this needs YSF r11 or above by Kurta999. It should be noted that this has only been tested on a local windows machine within a 20 minute testing session. This has never been tested on any linux machines although it should be identical to a windows system.
DOWNLOAD
The include can be found on github:
https://github.com/Abagail/RemoteRCON/
An example can additionally be found in the git repository. I have also written a tutorial about how you can use this include here:
http://forum.sa-mp.com/showthread.ph...wpost&t=568062