mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-05 20:03:20 +00:00
50 lines
No EOL
2 KiB
SourcePawn
50 lines
No EOL
2 KiB
SourcePawn
/**
|
|
* @brief Called when an RCon session auth is processed
|
|
*
|
|
* @param rconId RCon listener ID, unique per session.
|
|
* @param address Originating IP address.
|
|
* @param password Password sent by RCon client.
|
|
* @param allow True to grant auth, false otherwise.
|
|
* @return Plugin_Changed to use given allow value, Plugin_Continue to let engine process.
|
|
*/
|
|
forward Action SMRCon_OnAuth(int rconId, const char[] address, const char[] password, bool &allow);
|
|
|
|
/**
|
|
* @brief Called when an RCon command is processed.
|
|
*
|
|
* @note Rejection here does not count as a bad password attempt;
|
|
* however, the RCon log line will be annotated in the form
|
|
* of 'command (rejected) "%s"' rather than just 'command "%s"'
|
|
*
|
|
* @param rconId RCon listener ID, unique per session.
|
|
* @param address Originating IP address.
|
|
* @param command Command sent by RCon client.
|
|
* @param allow True to allow command to be processed, false otherwise.
|
|
* @return Plugin_Changed to use given allow value, Plugin_Continue to let engine process.
|
|
*/
|
|
forward Action SMRCon_OnCommand(int rconId, const char[] address, const char[] command, bool &allow);
|
|
|
|
/**
|
|
* @brief Called when an RCon session is disconnected.
|
|
*
|
|
* @param rconId RCon listener ID, unique per session.
|
|
*/
|
|
forward void SMRCon_OnDisconnect(int rconId);
|
|
|
|
/**
|
|
* @brief Called when an RCon log line is written
|
|
*
|
|
* @param rconId RCon listener ID, unique per session.
|
|
* @param address Originating IP address.
|
|
* @param logdata Log data (usually either "Bad Password" or "command"
|
|
* followed by the command.
|
|
* @return Plugin_Continue to log, Plugin_Handled to block.
|
|
*/
|
|
forward Action SMRCon_OnLog(int rconId, const char[] address, const char[] logdata);
|
|
|
|
/**
|
|
* @brief Determines whether current server command originated from an RCon session.
|
|
*
|
|
* @return True if command originated from RCon session, false if from console or not in server command callback.
|
|
*/
|
|
native bool SMRCon_IsCmdFromRCon(); |