Home

Awesome

SourceComms

A sourcemod plugin, which provides extended, temporary and permanent punishments with full history storing in sourcebans system. Also includes files and instructions to integration to existing sourcebans web-pages.


Important note: If you has installed web part before 16th March 2013, please follow the instructions to update it to actual version.


Requirements

##Compatibility:

Features

Server plugin

Web part provides the following functionality:

Sample of web-part you may look there (Login/pass test/test)

##Commands:

The player parameter could be Name (only as single word, without whitespaces), UserID (#127) or magic targets (like @all or @red). Look at sourcemod wiki for more details about targets.<br/> The time parameter controls how long the player is punished. (< 0 == Temporary, 0 == Permanent, # == Minutes). If not specified it will be "DefaultTime" minutes (default value is 30).

##Cvars:

##Config settings:

##Installation instructions First of all, download this repository as a zip file. ###Installation of server part

  1. Upload all the contents of game_upload directory from the zip file to your gameserver into /addons/sourcemod folder.

  2. Edit addons/sourcemod/configs/databases.cfg on your gameserver and add an entry for SourceComms. It should have the following general format:

     "sourcecomms"
     {
     	"driver"			"mysql"
     	"host"				"your_mysql_host"
     	"database"			"your_sourcebans_database"
     	"user"				"your_mysql_login"
     	"pass"				"your_mysql_password"
     	//"timeout"			"0"
     	"port"				"your_database_port(default_3306)"
     }
    
  3. (Optional) Edit /addons/sourcemod/configs/adminmenu_sorting.txt. Find } at the end of file and add before:

     "sourcecomm_cmds"
     {
     	"item" "sourcecomm_gag"
     	"item" "sourcecomm_mute"
     	"item" "sourcecomm_silence"
     	"item" "sourcecomm_ungag"
     	"item" "sourcecomm_unmute"
     	"item" "sourcecomm_unsilence"
     	"item" "sourcecomm_list"
     }
    

Installation of database part

  1. Check your sourcebans tables prefix! Replace in query bellow prefix sb to yours, if you use another. Execute the following query on your sourcebans database:

     CREATE TABLE `sb_comms` (
     `bid` int(6) NOT NULL AUTO_INCREMENT,
     `authid` varchar(64) NOT NULL,
     `name` varchar(128) NOT NULL DEFAULT 'unnamed',
     `created` int(11) NOT NULL DEFAULT '0',
     `ends` int(11) NOT NULL DEFAULT '0',
     `length` int(10) NOT NULL DEFAULT '0',
     `reason` text NOT NULL,
     `aid` int(6) NOT NULL DEFAULT '0',
     `adminIp` varchar(32) NOT NULL DEFAULT '',
     `sid` int(6) NOT NULL DEFAULT '0',
     `RemovedBy` int(8) DEFAULT NULL,
     `RemoveType` varchar(3) DEFAULT NULL,
     `RemovedOn` int(11) DEFAULT NULL,
     `type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '1 - Mute, 2 - Gag',
     `ureason` text,
     PRIMARY KEY (`bid`),
     KEY `authid` (`authid`),
     KEY `created` (`created`),
     KEY `RemoveType` (`RemoveType`),
     KEY `type` (`type`),
     KEY `sid` (`sid`),
     KEY `aid` (`aid`),
     FULLTEXT KEY `authid_2` (`authid`),
     FULLTEXT KEY `name` (`name`),
     FULLTEXT KEY `reason` (`reason`)
     ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;
    

or you could import sb_comms.sql file (please check table prefix in file!) to database instead of copying code from this manual. 2. If you want to import punishments from ExtendedComm plugin:

Installation of Web part

  1. Upload all the contents of web_upload directory from the zip file to your webserver into root sourcebans folder (which contains such files as index.php, config.php, getdemo.php). Place files from sourcecomms-web.zip archive to your sourcebans web folder.
  2. You need to edit a few files (make backup before you doing this!!!) Instructions for editing are placed in files_to_edit.txt from zip. Example from this file: <pre><code>\includes\page-builder.php

At line 38 -- case "servers": -- Add BEFORE

case "commslist":
	RewritePageTitle("Communications Block List");
	$page = TEMPLATES_PATH ."/page.commslist.php";
	break;</code></pre>

This means, that you need to open file <sourcebans_web_folder>\includes\page-builder.php from your webserver, find in it case "servers": on 38th line (or near from it) and add before this line next code:

<pre><code>case "commslist": RewritePageTitle("Communications Block List"); $page = TEMPLATES_PATH ."/page.commslist.php"; break;</code></pre>

For plugin developers

SourceComms releases several natives to provide compatibility with other plugins and for additional functionality.

These natives to set client status:

Natives to get client status:

Special thanks to