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

[ANY] Cross-Server Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Plugin ID:
4033
Plugin Version:
1.1
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Networked chat between any number of servers.
    Old 01-06-2014 , 18:06   [ANY] Cross-Server Chat
    Reply With Quote #1

    Cross-Server Chat

    Description
    This plugin and Python script allows you to chat between any number of servers without actually playing in them. For example, you could connect 3 servers together using this, and then talk with people in the 2nd and 3rd servers while you're in the 1st server.

    How it Works
    A Python script is provided which acts as the master server to receive all server messages. Each server pings the master server every second, with a payload including all messages that have been sent on this server in the last second, and the master server replies with all messages sent by other servers in the last second.

    Requirements
    You must install the SteamTools extension to use this.
    You must also have access to a server capable of running Python 2.7.x scripts, with an open port that is not in use.

    ConVars
    • sm_csc_host (string) (def. "http://YOURHOST.com:8000) - The host and port that the master server Python script resides at.
    • sm_csc_prefix (string) (def. "") - The prefix to use for sending messages. A blank prefix means that all messages are networked. An example prefix is "#", which would mean that all messages you want networked must be of the format "#message", e.g. "#hi hawk".
    • sm_csc_admin_only (string) (def. "0") - Whether or not cross-server chat should be restricted to admins only. For this to be "1", sm_csc_prefix must also be set to something non-blank (e.g. "#").

    Installation
    1. Install the SteamTools extension, if you haven't already.
    2. Install the plugin on every game server you want networked. See installing plugins.
    3. Install the Python script on the server you want to be the master server.
      1. Copy the cross-server-chat.py script to somewhere that you can run it.
      2. Edit it and be sure to change the following:
        Code:
        HOST_NAME = 'YOURHOSTNAME.com'
        PORT_NUMBER = 8000
      3. Run it by typing:
        Code:
        python cross-server-chat.py
        You may consider running it in a Screen session or as a daemon so that it doesn't get terminated when you close the terminal.
    4. Restart the game server(s).

    Changelog
    • 1.0, Jan 6, 2014
      • Initial version.
    • 1.1, Jan 9, 2014
      • Added sm_csc_admin_only cvar.
      • Added chat flooding detection for non-admins.

    On GitHub
    https://github.com/DouglasSherk/Sour...ss-server-chat
    Attached Files
    File Type: zip cross-server-chat.zip (11.5 KB, 534 views)
    __________________

    Last edited by Hawk552; 01-10-2014 at 14:07. Reason: Updated SteamTools thread.
    Hawk552 is offline
    Send a message via AIM to Hawk552
    StayOx
    SourceMod Donor
    Join Date: Jun 2012
    Location: Gliese 581g
    Old 01-06-2014 , 22:39   Re: [ANY] Cross-Server Chat
    Reply With Quote #2

    I was looking for something like this... thanks for sharing

    Last edited by StayOx; 01-06-2014 at 22:42.
    StayOx is offline
    Hawk552
    AMX Mod X Moderator
    Join Date: Aug 2005
    Old 01-06-2014 , 22:43   Re: [ANY] Cross-Server Chat
    Reply With Quote #3

    Quote:
    Originally Posted by StayOx View Post
    I was looking for something like this... thanks for sharing
    No problem!

    I deleted the attachments and re-uploaded everything inside a zip, with a compiled binary for the plugin.
    __________________
    Hawk552 is offline
    Send a message via AIM to Hawk552
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 01-06-2014 , 22:50   Re: [ANY] Cross-Server Chat
    Reply With Quote #4

    I'm going to assume this works on Windows but I'm not sure because I can't seem to run the script by normal means using Windows 2008. Assumption: Linux-only.
    Drixevel is offline
    Hawk552
    AMX Mod X Moderator
    Join Date: Aug 2005
    Old 01-06-2014 , 23:32   Re: [ANY] Cross-Server Chat
    Reply With Quote #5

    Quote:
    Originally Posted by r3dw3r3w0lf View Post
    I'm going to assume this works on Windows but I'm not sure because I can't seem to run the script by normal means using Windows 2008. Assumption: Linux-only.
    You need to have Python installed. I haven't done this, but you could try it: http://www.python.org/getit/windows/
    __________________
    Hawk552 is offline
    Send a message via AIM to Hawk552
    StayOx
    SourceMod Donor
    Join Date: Jun 2012
    Location: Gliese 581g
    Old 01-07-2014 , 11:14   Re: [ANY] Cross-Server Chat
    Reply With Quote #6

    Quote:
    Originally Posted by Hawk552 View Post
    You need to have Python installed. I haven't done this, but you could try it: http://www.python.org/getit/windows/

    was exactly what I tried, however apparently there is a problem with the syntax of python script

    [IMG]http://s18.************/qbwsa8qdl/image.png[/IMG]
    StayOx is offline
    Hawk552
    AMX Mod X Moderator
    Join Date: Aug 2005
    Old 01-07-2014 , 11:46   Re: [ANY] Cross-Server Chat
    Reply With Quote #7

    Quote:
    Originally Posted by StayOx View Post
    was exactly what I tried, however apparently there is a problem with the syntax of python script
    It sounds like it's not importing the time library. I'll test it out myself later.
    __________________

    Last edited by Hawk552; 01-07-2014 at 11:46.
    Hawk552 is offline
    Send a message via AIM to Hawk552
    StayOx
    SourceMod Donor
    Join Date: Jun 2012
    Location: Gliese 581g
    Old 01-09-2014 , 10:36   Re: [ANY] Cross-Server Chat
    Reply With Quote #8

    I still was unable to test the plugin, however I have two suggestions for convars:

    * Add restricted access to cross-chat for admins only

    * Add a timer in seconds that determines how long the users, can they use cross-chat again to prevent spam, admins be immune to the timer
    StayOx is offline
    Rads
    AlliedModders Donor
    Join Date: Feb 2008
    Location: Achievement what
    Old 01-09-2014 , 16:04   Re: [ANY] Cross-Server Chat
    Reply With Quote #9

    Quote:
    Originally Posted by r3dw3r3w0lf View Post
    I'm going to assume this works on Windows but I'm not sure because I can't seem to run the script by normal means using Windows 2008. Assumption: Linux-only.
    yeah cant see why not but the is problem a with the syntax..

    this will come in handy if it works
    __________________
    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    4UHost.UK - Global Hosting.
    -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

    Last edited by Rads; 01-09-2014 at 16:05.
    Rads is offline
    Hawk552
    AMX Mod X Moderator
    Join Date: Aug 2005
    Old 01-09-2014 , 17:55   Re: [ANY] Cross-Server Chat
    Reply With Quote #10

    Okay, I think the issue is that this script was written for Python 2.7.x, but you probably downloaded Python 3.3.3. Download 2.7.6 from here instead: http://www.python.org/getit/
    __________________
    Hawk552 is offline
    Send a message via AIM to Hawk552
    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 12:50.


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