AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] Cross-Server Chat (https://forums.alliedmods.net/showthread.php?t=232924)

Hawk552 01-06-2014 18:06

[ANY] Cross-Server Chat
 
1 Attachment(s)
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

StayOx 01-06-2014 22:39

Re: [ANY] Cross-Server Chat
 
I was looking for something like this... thanks for sharing :bacon!:

Hawk552 01-06-2014 22:43

Re: [ANY] Cross-Server Chat
 
Quote:

Originally Posted by StayOx (Post 2082269)
I was looking for something like this... thanks for sharing :bacon!:

No problem!

I deleted the attachments and re-uploaded everything inside a zip, with a compiled binary for the plugin.

Drixevel 01-06-2014 22:50

Re: [ANY] Cross-Server Chat
 
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.

Hawk552 01-06-2014 23:32

Re: [ANY] Cross-Server Chat
 
Quote:

Originally Posted by r3dw3r3w0lf (Post 2082273)
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/

StayOx 01-07-2014 11:14

Re: [ANY] Cross-Server Chat
 
Quote:

Originally Posted by Hawk552 (Post 2082280)
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]

Hawk552 01-07-2014 11:46

Re: [ANY] Cross-Server Chat
 
Quote:

Originally Posted by StayOx (Post 2082520)
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.

StayOx 01-09-2014 10:36

Re: [ANY] Cross-Server Chat
 
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

Rads 01-09-2014 16:04

Re: [ANY] Cross-Server Chat
 
Quote:

Originally Posted by r3dw3r3w0lf (Post 2082273)
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 :)

Hawk552 01-09-2014 17:55

Re: [ANY] Cross-Server Chat
 
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/


All times are GMT -4. The time now is 09:47.

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