Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie

[ANY] CheckValve Chat Relay Plugin


  • Nie możesz napisać tematu
  • Zaloguj się, aby dodać odpowiedź
Brak odpowiedzi do tego tematu

#1 Adminek AMXX.PL

    Admin :)

  • Bot

Reputacja: 156
Profesjonalista

  • Postów:7 489
  • Lokalizacja:AMXX.PL
Offline

Napisano 21.05.2016 07:07

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:

  • Grab the plugin here.
  • Load the plugin.
  • Change the CVAR values to your liking under 'tfcfgsourcemodCheckValve.ChatRelay.cfg'
  • Restart the server. (Or you could reload the plugin, although I haven't tested if that will work properly with socket ports)
  • 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:

Dołączona grafika

Wyświetl pełny artykuł




Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych