AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Server Chat Relay v0.2 (2/18) (https://forums.alliedmods.net/showthread.php?t=73779)

FLOOR_MASTER 07-06-2008 01:33

Server Chat Relay v0.2 (2/18)
 
2 Attachment(s)
Server Chat Relay (SCR) enables players on different servers to chat with each other.

Configuration
  • sm_scr_server (default "0")
    • When non-zero, this game server becomes the Server Chat Relay server
  • sm_scr_ip (default "127.0.0.1")
    • IP of the Server Chat Relay server (ignored when sm_scr_server is 0)
  • sm_scr_port (default "51000")
    • Port of the Server Chat Relay server
  • sm_scr_tag (default "Server 1")
    • Tag to prefix messages broadcast from this server
  • sm_scr_relaysay (default "0")
    • When non-zero, broadcast all say messages from this server (except those that begin with '!')
  • sm_scr_clients_file (default "scr_clients.txt")
    • Specifies the filename to open with a list of allowed SCR client IP addresses. For TF2, the default value resolves to the location "orangebox/tf/scr_clients.txt". The file should contain a list of allowed IP addresses (no ports), one per line. Whitespace is trimmed. If the file cannot be opened, any client is allowed.
Commands
  • !bc [text]
    • Broadcast the specified text to all servers. This is useful if sm_scr_relaysay is 0. Available to all players.
Example Setup
Exactly one game server must be an SCR server. For example, let's say you run two TF2 Servers with IPs 1.1.1.1 and 2.2.2.2, and one DOD server with IP 3.3.3.3. I'll designate the first TF2 server as the SCR server with the following config:
Code:

sm_scr_server    "1"
sm_scr_port      "51000"
sm_scr_tag      "2f2f (TF2)"
sm_scr_relaysay  "1"

(relaysay is optional) All remaining servers must be SCR clients (sm_scr_server 0). For the 2nd TF2 server, I'll use the following config:
Code:

sm_scr_server    "0"
sm_scr_ip        "1.1.1.1"
sm_scr_port      "51000"
sm_scr_tag      "2f2f2 (TF2)"
sm_scr_relaysay  "1"

And for the DOD server, I'll use the following config:
Code:

sm_scr_server    "0"
sm_scr_ip        "1.1.1.1"
sm_scr_port      "51000"
sm_scr_tag      "2f2f3 (DOD)"
sm_scr_relaysay  "1"

Load the plugin on the SCR server first, then load the plugin on the SCR clients in any order. Pay attention to the console messages to make sure the SCR server starts correctly before starting the SCR clients. If you have trouble starting the SCR server, make sure you unload the plugin on all the SCR clients first.

After setup, the inter-server chat looks like this (as seen on the DOD server):
http://www.2fort2furious.com/images/scr.jpg

Installation
  1. Ensure that the sockets extension is installed on your servers.
  2. Copy scr.smx to your servers' SourceMod plugins directories (addons/sourcemod/plugins). Because the plugin relies on sockets, online compile will fail. I compiled scr.smx on sourcemod-1.2.0-hg2562, but I recommend that you compile the source on your own setup.
Version History
  • 2008-07-05 - v0.1
    • Initial release
  • 2009-02-18 - v0.2
    • Added client whitelist
I wrote this quickly without thorough testing, so please be aware of that. There are a lot of potential features to add to this, so feel free to request them here. I'm sorry to say due to time constraints I can't spend time helping novice users get things up and running.

Note that if you receive socket errors (e.g. error 3 or error 5), you should unload the plugin on both the SCR server and clients, wait at least 30 seconds or so, then load the plugin on the server first, followed by the clients. This is a process I hope to automate soon.

FlyingMongoose 07-06-2008 11:28

Re: Server Chat Relay v0.1 (7/05)
 
That's awesome dude, 2 feature suggestions:

Trigger based relay, IE: requiring a preceding 'command' for the relay to operate (perhaps an optional feature the preceding string could be a cvar if not set all are relayed)
example:
/scr this sends to other servers
this does not

if scr_start_command "/scr" or something along those lines.

Other idea is to include a command as follows
/admin

This could also be used in conjunction with irc relay to send a message to only admins on all servers with the relay as well as send a message to IRC.

SixSicSix 07-06-2008 11:41

Re: Server Chat Relay v0.1 (7/05)
 
Floor master, you finally made it! I remember making this plugin but it never wanted to work properly! Thanks much! :)

FLOOR_MASTER 07-07-2008 05:57

Re: Server Chat Relay v0.1 (7/05)
 
Quote:

Originally Posted by FLOOR_MASTER (Post 648458)
...I wrote this quickly without thorough testing, so please be aware of that...

I've been running this system on three busy servers and it's worked flawlessly, albeit with a tendency to be a bit spammy. One thing I'm finding necessary is a connection timeout detection/retry feature, which I'll make a priority.

flubber 07-07-2008 11:27

Re: Server Chat Relay v0.1 (7/05)
 
1 - How about a admin version? i mean i'm playing on server 1 cheater on server 2, people can alert me with for example : !bca cheater inside.

2 - Does it work between different game server (tf2 & dod:s for instance)?

MoggieX 07-07-2008 14:43

Re: Server Chat Relay v0.1 (7/05)
 
Quote:

Originally Posted by flubber (Post 649086)
1 - How about a admin version? i mean i'm playing on server 1 cheater on server 2, people can alert me with for example : !bca cheater inside.

2 - Does it work between different game server (tf2 & dod:s for instance)?

#1 Agree on that, need something just for admins, although I've just added an override so that admins with ADMIN_GENERIC (b) only have access to sm_bc


#2 Yup, tested with CS:S (3 servers), DOD:S and 2x TF2

Did I mention I love you FLOOR_MASTER ?

Matt

MoggieX 07-08-2008 03:51

Re: Server Chat Relay v0.1 (7/05)
 
Small suggestion: Print the chat message back to the user including the entire server the original message was sent on.

Not so small suggestion: Add the ability to run a server command across ALL servers (with ROOT access only)

Matt

MoggieX 07-08-2008 04:32

Re: Server Chat Relay v0.1 (7/05)
 
Actually, thinking aloud, why not pack the message with a identifier?

Then when the message is received, it picks up the identifier and then processes the message accordingly.

Such as

identifier = 0 - sm_bc - Prints chat to all
identifier = 1 - sm_bcc - runs server command
identifier = 2 - sm_bca - Admin only messages
identifier = N - sm_bcx - What ever you want

Should be a simple set of IF statements or a select case, to process the options differently, but still maintaining the same broadcast code??

Matt

blik 07-08-2008 05:56

Re: Server Chat Relay v0.1 (7/05)
 
Wow, really nice FLOOR_MASTER might give this a go.

FLOOR_MASTER 07-08-2008 08:51

Re: Server Chat Relay v0.1 (7/05)
 
MoggieX - extending the type of messages beyond broadcasting chat is definitely the next step, but only after adding some form of SCR client authentication. Ideally, the system would also permit targeting specific servers and way (way down the road) remote administration via admin menus.


All times are GMT -4. The time now is 02:10.

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