Networking
By intercepting http requests a majority of DRMs will stop working for security reasons. If addons like VCMod doesn't work any more, try disabling http.Fetch and http.Post inspection.
Hooks
swatch_networking_playerauthenticated
Called after player spawned and responded to the sWatch authentication.
After this you can use sWatch.sendLua.
Arguments
(Player) player
swatch_networking_runconsolecommand
Called when RunConsoleCommand is executed serverside.
Arguments
(String) command
(Vararg) arguments
Returns
(Boolean) block -
falseto block the command from running
swatch_networking_fetch
Analogue to swatch_networking_post
Functions
sWatch.isPlayerAuthenticated
A player is marked authenticated as soon as we receive our first response netmessage. This may took some time and happens after the PlayerInitialSpawn hook is called.
This can be used together with sWatch.sendLua (see a example in section below).
Arguments
(Player|SteamID|SteamID64) player
Returns
(Boolean) isAuthenticated
sWatch.sendLua
This addon is fileless for the client. So no code is visible via a conventional filestealer. Every code gets send over netmessages and is then run via RunString on the client. If protected is set true, the code is compiled, compressed and encrypted to prevent manipulation and no RunString is used.
Arguments
(Player|SteamID32|SteamID64) player
(String) code
(Boolean) protected (optional, default=false) - protection against code manipulation
(Boolean) cache (optional, default=false) - only necessary if protected=true. Makes protection faster for large payloads.
Example
sWatch.takeScreenshot
This is usually called via admin menu. If you want to call it manually on the server, the screenshot will get saved in the data folder. See the ingame options under 'Networking' and 'Screenshot' for more details. Make sure to enable this feature in your settings.
Arguments
(Player) player
(Player) creator -
nilif not called via admin menu)
sWatch.netmessage
This functions creates a netmessage. The real message name gets randomized.
We can restrict the netmessage to our groups ("staff", "protected). If we recieve a message by player that is not allowed to, the message will get blocked and he will get (depending on your settings) punished.
Only use this when necessary, as you have to send the ransomized message name to the client. It is idealy for admin menu and anticheat payload.
Arguments
(String) messageName
(String) restrictedTo - ("staff", "protected" or leave empty for no restrictions)
Returns
(String) randomizedMessageName
Example
sWatch.getNetmessage
Returns the original name of a netmessage
Arguments
(String) randomizedMessage
Returns
(String) originalMessageName (first argument of sWatch.netmessage)
sWatch.isInternalNetmessage
Returns true if the message was created with sWatch.netmessage.
Arguments
(String) netmessageName - can be eighter randomized or internal name
Returns
(Boolean) isInternal
sWatch.getExistingExploits
Analogue to sWatch.getExistingBackdoors. Returns a list of all exploits on your server.
Returns
(Table) exploits
Last updated