View Single Post
Plugin Info:     Modification:          Category:          Approver:   EKS (166)
KoST
Senior Member
Join Date: Jul 2005
Old 05-29-2006 , 00:22   CrossServer-AdminChat v2.0.3 (Jun 25, 2006)
Reply With Quote #1

CrossServer-AdminChat v2.0.3 - by KoST
  • Description:
    • This software allows admins to chat to other admins on other servers (which have the cross_server.amxx running and are connected to the same master-server).
      admins have to begin their chat message with a '!' sign, then it will be sent to all admins on all connected servers and vice versa. All users can use the ! to send messages to all admins and say /admins or /admin to see a list of all online admins on all servers connected to the same master-server (see below).


      [this example shows 3 connected admins on 3 different servers]
      Code:
      | Printing Online Admins:
      +-------------------------
      | (The Coffee Shop - www.myspace.co) Frag Wolf | frags:13 - deaths:5
      | (GirlPower | Popular Maps) [GirlPower]Janet | frags:4 - deaths:3
      | (DustyPlace) KoST | frags:0 - deaths:0
    • The chat messages are not sent from gameserver to gameserver and so on..
      instead you will have to set up a Master-Server for all the gameservers:

      [this example shows 4 connected game servers]
    • the number of gameservers you can connect to one master-server is not limited by the program itself; it depends on hardware/os where the master-server is running on.
      i was able to connect more than 100 test-clients on my computer.
    • The Master-Server can be installed on any computer with static ip.
      You can install it for example on one of the gameservers or on any other server.
    • The socket functions described here are part of an extension to PHP which must be enabled at compile time by giving the --enable-sockets option to configure. see phpinfo if your php has set '--enable-sockets' in configure(click here). however it is possible to get sockets running without recompile of php on windows: (click here)
    • Chat looks like this:
      • green -> incoming messages
      • team color -> outgoing messages
    • you can change the displayed hostname using server_name (see below).
    • admins must have the ADMIN_KICK flag set ! (you can change this in the source if needed 'REQUIRED_ADMIN_LEVEL')
  • Setup:
    • Master-Server: (IMPORTANT: do NOT put this under docroot of webserver, this is a php-shell-script which needs no webserver to run !!)
    • Download the ZIP file (containing the master server) and extract it to a new directory on the computer which should be the master-server for all your single gameservers.
    • Edit extracted 'cross_server.php' and find this:
      Code:
      //--------------------------------------------------------------------------------------------------
      // specify the ip, port and password for the master-server:
      //--------------------------------------------------------------------------------------------------
      define(SERVER_PWD,"lol");
      define(SERVER_IP,"xxx.xxx.xxx.xxx");
      define(SERVER_PORT,1337);
      //--------------------------------------------------------------------------------------------------
      here you have to set the ip, port and password of the master-server itself.
      SERVER_IP must be the ip of the computer running the master-server.
      SERVER_PORT you can choose.. (please do not set SERVER_PORT<=1024)
      (each gameserver must have this data to connect to your master-server)

      then you can start the master-server (you need shell access):
      linux:
      Code:
      php cross_server.php
      (you can use screen command to keep it running even after logout [help: enter 'man screen'])

      windows:
      Code:
      php.exe cross_server.php
      (you can use firedaemon for ex. to keep it running even after logout)
    • Game-Server:
    • Download the plugin by clicking on 'Get Plugin'.
    • Install it on each server (upload amxx file to amxmodx/plugins | edit configs/plugins.ini)
    • Make sure to activate sockets module in configs/modules.ini
    • Edit new file configs/cross_server.ini
      add these lines:
      Code:
      server_name "Test"
      master_password "xxxxxxxxx"
      master_ip "xxx.xxx.xxx.xxx"
      master_port "xxxx"
    • replace "xxx"s by the data you already specified when editing the cross_server.php file !
    • if you set server_name "" or remove it completely then the hostname is taken.
    • restart the gameserver after installing this plugin (no 'restart' or mapchange) !
  • Changelog:
    • May 29,2006 v2.0 - first release
    • May 30,2006 v2.0.1 - fixed: console print bug !!
    • Jun 5,2006 v2.0.2 - fixed: now only admins with the right flag (default: ADMIN_KICK) can see the chat, not all admins.
    • Jun 25,2006 v2.0.3 - fixed: a small bug where the config file was not read correctly if empty line at the end
  • AMXX < 1.71:
Attached Files
File Type: zip cross_server.zip (2.5 KB, 3468 views)
File Type: sma Get Plugin or Get Source (cross_server.sma - 5387 views - 10.4 KB)
__________________

Last edited by KoST; 05-26-2007 at 00:09.
KoST is offline