Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

[ANY] CheckValve Chat Relay Plugin


owner_2019
 Udostępnij

Rekomendowane odpowiedzi

CheckValve Chat Relay (SourceMod edition)v1.0.7

Description:
Since Android has become mainstream, I'm sure you server owners out there have been looking for RCON/server management apps on Play Store. I discovered CheckValve a while back, and thought it was pretty useful. I, however, did not like the way their Chat Relay worked. You had to set up another Java-based server on the same or a different server just to relay the chat to their mobile client. I contacted the dev to see if it's alright to make a different one based on SourceMod, they agreed. I followed their documentation page and re-created the server using SourceMod and Socket. I had been in contact with the dev for months, and I'm now comfortable releasing this plugin to the public.

TL;DR - I made the relay server simple and added some extra features.

Features:
  • Full features from the original Chat Relay. (custom password, ports...etc)
  • Announce chat connection. (optional)
  • Filter unwanted words from the chat to the relay client. (optional, see Compiling below.)
  • Notify the relay client when a player has joined the server. (optional)
  • Notify the relay client when a player is killed (optional, there's even a CVAR for bot kills)
  • Steam ID tags.

CVARs:
Code:


// Should the plugin forward unwanted commands/words?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_checkvalve_filter "1"

// Should CheckValve forward player connection notifications?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_checkvalve_notify_connection "1"

// Should CheckValve forward player kill events?
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_checkvalve_notify_kill "1"

// Should CheckValve forward bot kill events?
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
sm_checkvalve_notify_kill_bots "0"

// Port to send & listen to client messages.
// -
// Default: "23456"
// Minimum: "2000.000000"
// Maximum: "65565.000000"
sm_checkvalve_port "23456"

// Password required to connect to the server. Must not be empty for security reasons.
// -
// Default: "changeme"
sm_checkvalve_pw "changeme"

Installation:
  1. Grab the plugin here.
  2. Load the plugin.
  3. Change the CVAR values to your liking under 'tf\cfg\sourcemod\CheckValve.ChatRelay.cfg'
  4. Restart the server. (Or you could reload the plugin, although I haven't tested if that will work properly with socket ports)
  5. If you haven't already, grab the CheckValve app from Play Store.

Compiling:
So the word filter works by using a pre-defined list, I haven't made this part user configurable yet. If enough people requested it, I'll do it. So right now if you wanna change the list yourself or dislike some parts of the plugin, you best to re-compile it yourself.
Source code here

Include list
Code:

#include <socket>
#include <SteamWorks>
#include <morecolors>
#include <bytebuffer>
#include <smlib>


Changelog:
Code:

       
        v1.0.7rel
        * Initial SourceMod forum release
        * Revamped ForwardToClient code (Thanks David)

        v1.0.6rel
        + Added an option to announce connection to players
        * Fixed team buffer size

        v1.0.5rel
        + Added message filter (credits to El Diablo's Admin See All Commands) along with CVAR to toggle it
        + Added ConVar change notification
        + Added IsValidClient check in OnClientSayCommand_Post
        + Added client index check in the ForwardToClient function
        + Added a fallback when the client disconnects abnormally (Typically on clients using Android M Doze feature or Airplane Mode)
                NOTE to myself: You should probably implement heartbeat. Probably.
        * Minor code change in attempt to comply with the 1.7 syntax.
        * Buffer size optimization
        * Upped short size to 256, still a bad practice I know. Still no idea how to make it adapt to the client's IP.

        v1.0.4rel
        + Added player death notification
        + Added CVARs to choose whether or not to forward connection / disconnection message
        + Added Steam ID info upon connection
        * Changed OnClientConnected to OnClientAuthorized in order to obtain Steam ID info
        * Minor ForwardToClient optimization
        * Changed char out size to MAX_BUFFER_LENGTH
        - Removed unused error messages, for now

        v1.0.3rel
        * Fixed callback not executable error
        * Added GetTeamName function to get rid of the shitty hardcoded team name code

Screenshots:
sh4QlL4.png

Wyświetl pełny artykuł

Odnośnik do komentarza
Udostępnij na innych stronach

Jeśli chcesz dodać odpowiedź, zaloguj się lub zarejestruj nowe konto

Jedynie zarejestrowani użytkownicy mogą komentować zawartość tej strony.

Zarejestruj nowe konto

Załóż nowe konto. To bardzo proste!

Zarejestruj się

Zaloguj się

Posiadasz już konto? Zaloguj się poniżej.

Zaloguj się
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...