This plugin requires the Socket extension
that s shouldn't be there
This plugin is not completely stable. I'm releasing it here to make it easier to find bugs and add features.
for md5.sp from IRC Relay
for code to get a player's ping
This plugin allows you to control your server from a telnet client, similar to HLSW.
It has been made to be as secure as possible. None of the plugin's settings are stored in cvars (so people can't go to game monitor and find them), they are set by commands. It is best if you modify the source to remove the public cvar so the plugin is completely invisible.
- Sets the key needed to create an account
- Sets the port the plugin uses. Needed for the plugin to start running.
- Sets the welcome message people are sent when they connect.
sm_telnetrelay_createuser <name> <password> <flags>
- Creates a user with specified details.
Install the Socket extension
Put the .smx in your plugins folder. If you want to compile it yourself, download both .sp files.
(Optional) Add a database called chatserv in databases.cfg
When you first connect, you should see something like this:
Let's do as it says...
Ignore the debug text and version
Now that you're logged in, you can use the following commands:
- Sends a message to other people who are connected
/flags <name> [flags]
- Set a user's flags (needs root flag)
- List connected users
- Disconnect with optional reason
You can also install telnetrelay-chat to have server chat printed to telnet or telnetrelay-server to get /rcon and /status (self explanatory) as commands.
Add support for multiple servers?
Add per user option to disable colours
Add more commands to the base plugin
Make more addon plugins
I have tested this with Telnet and PuTTY with connection type set to raw.
Plugin doesn't compile on the forums as it requires sockets.
Telnet_CommandCallback public(Handle:socket, const String:argstr);
Telnet_RegisterCommand(const String:name, const String:desc, const flags, Telnet_CommandCallback:function);
Register a command with telnet relay. name is the command (eg /flags), description doesn't do anything yet, flags are required flags to use the command and the last parameter is the callback.
Unregister a command. name is the command (eg /flags).
Check if a command is regstered. Returns true or false. name is the command (eg /flags).
Get a user's connection index from socket handle. I doubt this is of any use outside the base plugin though, so it'll probably be removed.
Get a user's connection index from name (works like FindTarget(), for an example see the /flags command in telnetrelay-main). Returns -1 on no match and -2 on multiple matches.
Telnet_PrintToAll(const String:format, any:...);
Print to everyone.
Telnet_PrintToFlags(const flags, const String:format, any:...);
Print to users with certain flags.
Telnet_PrintToSettings(const settings, const String:format, any:...);
Print to users with certain settings.
Telnet_PrintToOne(Handle:socket, const String:format, any:...);
Print to user with specified socket handle.
Telnet_KillConnection(Handle:socket, const String:reason="");
Kills a user's connection with an optional reason.