AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [NetS2S] Multi-Server Chat / Admin Utility (https://forums.alliedmods.net/showthread.php?t=84917)

Daedilus 02-02-2009 21:11

[NetS2S] Multi-Server Chat / Admin Utility
 
2 Attachment(s)
NetS2S Multi-Server Chat / Admin Utility

NetS2S gives players and admins the ability to chat with each other on different servers and in different games. The menu provides server / sorted player lists as well as messaging, instant messaging, and commands for admins that can be executed across servers (allowing admins to monitor and govern multiple servers, reducing the amount of people you have to entrust with admin).

The player list is sorted by admins with ban privileges, then by admins with kick privileges, and finally by player names.

Admins with ban privileges have an @ preceding their name
Admins with kick privileges have a + preceding their name
players are listed without tags

Dependencies:

Socket Extension: http://forums.alliedmods.net/showthread.php?t=67640

Sending Messages / Commands Using The Menu:

The menus provide options to message the server(s) or a player. Selecting a message option brings up a session menu. All 'say' is then directed to the server(s) or a player until 'End Session' is selected from the session menu. Unlike instant messaging, where a player can accept/deny an IM, sending a message will always reach its intended target. Once the session is ended, 'say' is restored to normal. The same holds true for server commands.

Instant Messaging:

Unlike sm_nsay, where a onetime message is sent to a player, instant messaging creates a private channel between both players. This allows messages from 'say' to be directed to each other. The dest player receives an accept/deny menu, while the initiating player has a cancel menu. Once the dest player accepts the session, both players will receive an end session menu. Both players 'say' gets reset back to normal when either player denies/cancels/ends the session. This may sound complicated at first, but all the details are taken care of by the menu system; making it easy to use :)

Build Options:

The following defines (Located in Core/Defines.sp) allows server admins to choose which features get built into the plugin (which can help to reduce the size of the plugin).

NETS2S_LOG (0/1, default 1) - Enables the plugin to create a log file
NETS2S_DEBUG (0/1, default 0) - Enables debug output to be displayed in the server console
NETS2S_ENABLE_PLAYER_IM (0/1, default 1) - Enables player instant message sessions
NETS2S_ENABLE_SERVER_CMDS (0/1, default 1) - Enables cmds to be sent to the server(s) using sm_ncmd
NETS2S_MENU_SERVER_CMDS (0/1, default 0) - Adds menu items to command the server(s) using 'say' (Must have NETS2S_ENABLE_SERVER_CMDS = 1)

The admin command menu (shown to admins upon selecting a player) can be extended by
adding commands to the g_menu_cmds array in NetS2S.sp - OnPluginStart():line(143)
Note: These commands are not affected by the above build options!

ex. (string format = menu_text¦cmd¦cmd_args¦admin_flag) Note: ¦ is a broken pipe

Format(cmd, MAX_CMD_LENGTH, "Kick Player¦sm_kick¦\"%%s\"¦%d", ADMFLAG_KICK);
PushArrayString(g_menu_cmds, cmd);

Format(cmd, MAX_CMD_LENGTH, "Ban One Hour¦sm_ban¦\"%%s\" 60 [NetS2S] Ban¦%d", ADMFLAG_BAN);
PushArrayString(g_menu_cmds, cmd);

CVars:

sm_nets2s_master - Set to 1 to make the server the master (master only)
sm_nets2s_ip - Set this to the master's IP address (used by the local server to connect to the master)
sm_nets2s_port - Set this to the master's port number (used by the local server to connect to the master)
sm_nets2s_pwd - Set this to the master's password (used by the local server to connect to the master)
sm_nets2s_name - The name used to register the local server with the master (used as the name of the server in the server list)
sm_nets2s_reconnect - The time to wait before reconnecting to the master
sm_nets2s_debug - Set this to 1 to enable debug trace output

Commands:

sm_nlist - Lists the local servers connected to the master (from the cmd line on the master server only)
sm_nmenu - This menu combines the functionality of sm_nsay, sm_nchat, and sm_ncmd into an easy to use GUI

sm_nsay - sends a message to the server(s) or specified player.
usage: sm_nsay msg or sm_nsay server|msg or sm_nsay server|player|msg or sm_nsay @player|msg

sm_nchat - Sends a message to the admins on the server(s).
usage: sm_nchat msg or sm_nchat server|msg

sm_ncmd - Executes a command on the server(s).
usage: sm_ncmd cmd or sm_ncmd server|cmd

How To Install:

Copy the NetS2S.smx file into your "addons\sourcemod\plugins" directory.
Next, add the following to the server.cfg file for each server:

(You only need to configure one server to be the master server.
This can be any server except "Left 4 Dead” as pointed out by Mosalar.)

Master Server:

sm_nets2s_master 1
sm_nets2s_port <Port Number>
sm_nets2s_pwd <Password>
sm_nets2s_name <Name>
sm_nets2s_debug 0

Local Server:

sm_nets2s_master 0
sm_nets2s_ip <Master’s IP Address>
sm_nets2s_port <Master’s Port Number>
sm_nets2s_pwd <Password>
sm_nets2s_name <Name>
sm_nets2s_reconnect <Seconds>
sm_nets2s_debug 0

Source Code:

NetS2S was built with Visual Studio 2005 using SourcePawn for Visual Studio: http://wiki.alliedmods.net/Building_..._Visual_Studio

You can use whatever tool you want to build the plugin. Just open NetS2S.sp with your favorite IDE or console and compile. Enjoy...

Credits:

Based on the Server Chat Relay plugin by FLOOR_MASTER
using the Socket Extension created by sfPlayer

Special thanks to Mosalar and budznetwork.com
This plugin would not be possible without his help


Icettiflow 02-02-2009 22:30

Re: NetS2S
 
This is a genius plugin.

Mosalar 02-03-2009 06:14

Re: NetS2S
 
Woot! I is special!

Anyone who wants to see/use/test this can see it in action on any of our servers. Hit our main page for a server list, www.budznetwork.com.

One thing Daedilus forgot to mention, you can not use a L4D server for the master. Because of the hibernation mode it no worky :-) And if you have L4D servers in the array, they will not show in the list if they are hibernating. They will only show and be accessible if they have players on them.

This was also tested on DoDS, CSS, TF2, FoF, L4D, HL2DM, and Hidden servers with perfect results.

SAMURAI16 02-04-2009 09:00

Re: NetS2S
 
really nice job

I wonder how Liam approved this, is still on New Plugins

Daedilus 02-04-2009 09:47

Re: NetS2S
 
Liam accidentally approved it when he was looking at it.

{7~11} TROLL 02-04-2009 15:05

Re: NetS2S
 
this is cool one feature if its possible would be cool to add an xfire message sender into it

NedStar 02-06-2009 13:06

Re: NetS2S
 
Quote:

Originally Posted by Icettiflow (Post 754708)
This is a genius plugin.


Mosalar 02-07-2009 01:16

Re: NetS2S
 
It's beyond genius...

I'm really surprised to see the lack of posts and kudos. I realize that it's very in depth, but it has made life so easy for our community.

flubber 02-11-2009 15:48

Re: [NetS2S] Multi-Server Chat / Admin Utility
 
I don't get it i've got installed on 2 serveurs this plugin it's launching fine, but i got a lot of :
Quote:

L 02/11/2009 - 21:35:20: [NetS2S] Connected to master @ 217.70.189.000:27016
L 02/11/2009 - 21:35:20: [NetS2S] Disconnected from the master @ 217.70.189.000:27016
L 02/11/2009 - 21:35:25: [NetS2S] Connected to master @ 217.70.189.000:27016
after debug set to 1 - i got that :

L 02/11/2009 - 22:04:51: [NetS2S Error] OnLocalSocketError() : Socket Error - Name: Spy, Type: CONNECT_ERROR, Number: 111

Server side i got this :
L 02/11/2009 - 22:31:03: [NetS2S] Master server start on port 27016
L 02/11/2009 - 22:31:03: [NetS2S Error] OnMasterError() : Socket Error - Name: Uber, Type: BIND_ERROR, Number: 98

After some time the master is banning the other machine for rcon spamming. Is the password the rcon? cause i've tried that doesn't work either.

recon0 02-11-2009 20:34

Re: [NetS2S] Multi-Server Chat / Admin Utility
 
This looks really cool.


All times are GMT -4. The time now is 21:45.

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