Raised This Month: $154 Target: $400
 38% 

Telnet Relay 0.3 - Control your server from telnet


Post New Thread Reply   
 
Thread Tools Display Modes
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:
    1 
    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, 357 views)
    __________________

    Last edited by MikeJS; 12-16-2009 at 11:13.
    MikeJS is offline
    KawMAN
    SourceMod Donor
    Join Date: Sep 2007
    Location: Cracov
    Old 03-28-2009 , 03:48   Re: ChatServ 0.1 - Control your server from telnet
    Reply With Quote #2

    Nice plugin
    Add something like allow connect from ip, deny connect from ip
    KawMAN is offline
    Send a message via ICQ to KawMAN Send a message via Skype™ to KawMAN
    shustas
    SourceMod Donor
    Join Date: May 2007
    Location: London
    Old 03-30-2009 , 11:21   Re: ChatServ 0.1 - Control your server from telnet
    Reply With Quote #3

    Why not just use hlsw
    __________________
    shustas is offline
    KawMAN
    SourceMod Donor
    Join Date: Sep 2007
    Location: Cracov
    Old 03-31-2009 , 04:10   Re: ChatServ 0.1 - Control your server from telnet
    Reply With Quote #4

    For hlsw you need windows.
    Linux l4d server have something like telnet
    -netconport <number> - Creates a remotely accessible server console on the specified port. This can be connected to with telnet or similar applications, and allows controlling of the server as if the commands were being typed in at the console
    -netconpassword "password" - It set, users must type PASS "password" to use the remote console described above
    http://developer.valvesoftware.com/w...d_Line_Options
    KawMAN is offline
    Send a message via ICQ to KawMAN Send a message via Skype™ to KawMAN
    FlyingMongoose
    Veteran Member
    Join Date: Mar 2004
    Old 03-31-2009 , 06:03   Re: ChatServ 0.1 - Control your server from telnet
    Reply With Quote #5

    Very nifty utility.
    __________________
    Please do NOT PM for support.

    Only ask for support in plugin threads.

    TunedChaos.com - Precision Tuned Game Servers
    FlyingMongoose is offline
    Icettiflow
    Senior Member
    Join Date: Jan 2009
    Old 04-05-2009 , 09:41   Re: ChatServ 0.1 - Control your server from telnet
    Reply With Quote #6

    Hi MikeJS,

    SUPERB idea and plugin. I'm running this on a Linux server and connecting from a Mac OSX box using Telnet. I connected fine, and it showed me the welcome message, but typing 'new' returned no result. I checked and there was a single error log:

    Code:
    L 04/05/2009 - 09:36:30: SourceMod error session started
    L 04/05/2009 - 09:36:30: Info (map "l4d_vs_hospital01_apartment") (file "errors_20090405.log")
    L 04/05/2009 - 09:36:30: [chatserv.smx] Child socket error: 4 (#0)
    Sockets extension IS installed. Is it better to try using SSH?

    Thanks.
    Icettiflow is offline
    clientcolor
    New Member
    Join Date: Apr 2009
    Old 04-05-2009 , 10:12   Re: ChatServ 0.1 - Control your server from telnet
    Reply With Quote #7

    i have the same error he has ^--
    clientcolor is offline
    MikeJS
    Senior Member
    Join Date: Nov 2008
    Old 04-05-2009 , 10:38   Re: ChatServ 0.1 - Control your server from telnet
    Reply With Quote #8

    Try using this version of sockets
    __________________
    MikeJS is offline
    Icettiflow
    Senior Member
    Join Date: Jan 2009
    Old 04-05-2009 , 11:35   Re: ChatServ 0.1 - Control your server from telnet
    Reply With Quote #9

    Thanks MikeJS. I was actually in the process of putting that in when I saw your reply.

    The good news: It doesn't show any additional errors in the error log
    The bad news: Still no reply after the 'NEW' command
    Icettiflow is offline
    MikeJS
    Senior Member
    Join Date: Nov 2008
    Old 04-05-2009 , 12:52   Re: ChatServ 0.1 - Control your server from telnet
    Reply With Quote #10

    Uploaded a new version, it might work.
    __________________
    MikeJS is offline
    Reply


    Thread Tools
    Display Modes

    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 10:24.


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