Raised This Month: $51 Target: $400
 12% 

Telnet Relay 0.3 - Control your server from telnet


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
MikeJS
Senior Member
Join Date: Nov 2008
Plugin ID:
825
Plugin Version:
0.3
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Control a server using telnet.
    Old 03-27-2009 , 14:16   Telnet Relay 0.3 - Control your server from telnet
    Reply With Quote #1

    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.

    Thanks to:
    Olly for md5.sp from IRC Relay
    Liam 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.

    Commands:
    sm_telnetrelay_setkey <key> - Sets the key needed to create an account
    sm_telnetrelay_setport <port> - Sets the port the plugin uses. Needed for the plugin to start running.
    sm_telnetrelay_setwelcome <msg> - Sets the welcome message people are sent when they connect.
    sm_telnetrelay_createuser <name> <password> <flags> - Creates a user with specified details.

    Installation:
    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:
    <anything> - Sends a message to other people who are connected
    /flags <name> [flags] - Set a user's flags (needs root flag)
    /users - List connected users
    /quit [reason] - 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.


    To do:
    Add support for multiple servers?
    Add per user option to disable colours
    Logging?
    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.

    Natives:
    Code:
    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.
    
    Telnet_UnregisterCommand(const String:name[]);
    Unregister a command. name is the command (eg /flags).
    
    Telnet_IsRegistered(const String:name[]);
    Check if a command is regstered. Returns true or false. name is the command (eg /flags).
    
    Telnet_FindTarget(Handle:socket);
    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.
    
    Telnet_FindTargetByName(const String:name[]);
    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.
    Attached Files
    File Type: zip tr03.zip (30.5 KB, 560 views)
    __________________

    Last edited by MikeJS; 12-16-2009 at 11:13.
    MikeJS is offline
     



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 15:17.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode