AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] Source Chat Relay [Discord <=> Ingame] (https://forums.alliedmods.net/showthread.php?t=311079)

RumbleFrog 10-03-2018 16:58

[Any] Source Chat Relay [Discord <=> Ingame]
 

Introduction

Communicate between Discord & In-Game, monitor server without being in-game, control the flow of messages and user base engagement!

https://raw.githubusercontent.com/ru.../preview_2.gif

Features

- Receive and send messages bidrectionally
- Channel configuration for powerful setups
- Setup is incrediblily easy with Discord bot commands and simple config files
- Upon disconnect, game servers will attempt to reconnect at a fixed interval

Prerequisites

- Server to host the relay binary on (with MySQL if not external)
- Source game server with the [socket](https://forums.alliedmods.net/showthread.php?t=67640) extension
- A Discord bot token (https://discordapp.com/developers/applications/)

Getting started

https://rumblefrog.me/source-chat-relay/setup

Source

https://github.com/rumblefrog/source-chat-relay

RumbleFrog 10-03-2018 16:59

Re: [Beta] Source Chat Relay [Discord <=> Ingame]
 
Third-Party Extensions:

AMX Client: https://forums.alliedmods.net/showthread.php?t=318610



.

RumbleFrog 10-04-2018 13:18

Re: [Beta] Source Chat Relay [Discord <=> Ingame]
 
v0.0.7 [rc7] (https://github.com/rumblefrog/source...ses/tag/v0.0.7) is now available for download.

v0.0.6-7:

- Added simple message options that let the bot send plain messages instead of embeds to reduce vertical space required in exchange for less information

- Strips symbols from message payload

- Reduced to more common chat colors that's hopefully more supported in other source games

- Note: If you have used v0.0.5 and below, you need to delete the plugin config as the convar names has been updated

ThatKidWhoGames 10-04-2018 13:46

Re: [Beta] Source Chat Relay [Discord <=> Ingame]
 
Nice work, thanks!

GnomeChompski 10-04-2018 14:45

Re: [Beta] Source Chat Relay [Discord <=> Ingame]
 
Documentation could do with a bit more detail and expansion but other than that super low latency and responds really well! Lets see how this handles 20 odd servers

RumbleFrog 10-05-2018 17:08

Re: [Beta] Source Chat Relay [Discord <=> Ingame]
 
v0.0.8 [rc8] (https://github.com/rumblefrog/source...ses/tag/v0.0.8) is now available for download.

v0.0.8:

- Added display name (through the initial testing, I have found out that entity ID confuses people too much, so I decided to add a display name to make things easier)

- Note: for this to be compatible with <= v0.0.7, you'll need to add another column named display_name with varchar(64)

RumbleFrog 10-14-2018 18:13

Re: [Beta] Source Chat Relay [Discord <=> Ingame]
 
There's new documentation available: https://rumblefrog.gitbook.io/source-chat-relay

Would be appreciated if you guys help me point out what's missing & confusing in the doc; PR is a bonus :)

RumbleFrog 10-20-2018 00:46

Re: Source Chat Relay [Discord <=> Ingame]
 
v1.0.0 [First Stable Release] (https://github.com/rumblefrog/source...ses/tag/v1.0.0) is now available for download.

v1.0.0:

- Out of beta! Thanks to everyone that help test this during the beta phase.

mlov420 10-20-2018 08:01

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Works great. Setup is straight forward. I set mine up on a Windows machine, as well as both Windows and Linux game servers.

If I could make one suggestion, I would say to have the plugin auto-generate the server name into the database. Currently it registers a unique ID for the server automatically when the plugin is loaded*, but leaves the display name field blank when it could use the hostname*. That 'display name' field doesn't populate until the server has been registered with the discord bot then has a message sent. It makes it very tedious when setting up multiple servers if you want to keep a neat order of channel #s and server names (e.g - pub server #1 / channel 1, pub server #2 / channel 2, etc.), since you're left guessing which server is which when looking at the DB during setup.

Regardless, the plugin works great, that is just an idea for improvement for people with multiple or sequentially named servers. Thank you very much for your work here.

AK978 10-20-2018 13:08

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Add robot command?
Show Map and number of players

RumbleFrog 10-20-2018 14:38

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by mlov420 (Post 2620498)
Works great. Setup is straight forward. I set mine up on a Windows machine, as well as both Windows and Linux game servers.

If I could make one suggestion, I would say to have the plugin auto-generate the server name into the database. Currently it registers a unique ID for the server automatically when the plugin is loaded*, but leaves the display name field blank when it could use the hostname*. That 'display name' field doesn't populate until the server has been registered with the discord bot then has a message sent. It makes it very tedious when setting up multiple servers if you want to keep a neat order of channel #s and server names (e.g - pub server #1 / channel 1, pub server #2 / channel 2, etc.), since you're left guessing which server is which when looking at the DB during setup.

Regardless, the plugin works great, that is just an idea for improvement for people with multiple or sequentially named servers. Thank you very much for your work here.

Thanks for the suggestion, I suppose that could be an initial design flaw, my use case is that the hostname is constantly changing on some of my servers, so I figure it'd be better if it's sent with the message payload, making it update every message.

Quote:

Originally Posted by AK978 (Post 2620535)
Add robot command?
Show Map and number of players

I'm not certain about what you mean by the robot command. But I'll have to think ways to implement map and numbers of players, it's most likely to be implemented with a2s query.

Forks to this are welcome, I have an a2s query in golang: https://github.com/rumblefrog/go-a2s

RumbleFrog 10-23-2018 01:42

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
v1.1.0 (https://github.com/rumblefrog/source...ses/tag/v1.1.0) is now available for download.

v1.0.1-1.1.0:

Transform Mentions

Channel mention

<#443915421020848129> -> #general

User mention

<@105122038586286080> -> @Fishy!

Role mention

<@&478429926995918858> -> @ Member

PR #11 (https://github.com/rumblefrog/source-chat-relay/pull/11)

Change simple message format

Name: Message -> <Name> Message

PR #10 (https://github.com/rumblefrog/source-chat-relay/pull/10)

RumbleFrog 11-16-2018 22:40

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
After a month of continuous uptime, I can confirm this is reliable enough for v1 :)

RumbleFrog 11-17-2018 16:04

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
v1.1.1 (https://github.com/rumblefrog/source...ses/tag/v1.1.1) is now available for download.

v1.1.1:

- Fixed loose regex matching for channel mentions

ToasterKritz 11-18-2018 03:40

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
I don't know if I'm an idiot, or the instructions are unclear. Under installation, by "Upload the binary file (server[.exe]) to the server" you mean the machine hosting the relay (MySQL)?

RumbleFrog 11-19-2018 15:03

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by ToasterKritz (Post 2624551)
I don't know if I'm an idiot, or the instructions are unclear. Under installation, by "Upload the binary file (server[.exe]) to the server" you mean the machine hosting the relay (MySQL)?

It could be any machine, it doesn't have to be on the one hosting the mysql server

ToasterKritz 11-19-2018 19:45

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by RumbleFrog (Post 2624791)
It could be any machine, it doesn't have to be on the one hosting the mysql server

Yeah thanks, I just didn't use the program logic.exe, I figured it out now

EDIT: It's because my tf2 server runs on a linux based server, and I downloaded the linux version of the server when trying to host it on a windows machine (my mistake :>). My only problem now is that I am having a socket errno 110 when attempting to load the plugin, and I have no clue what to do regarding Entity ID

tzzion 11-20-2018 03:15

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
My english is not very good and I do not understand much about plugins in general. My friend could not install the plugin. I am willing to pay some csgo keys if someone can help me

Obyboby 11-20-2018 15:30

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Hi!
I've read the whole thread and documentation, I have a question.
Is it possible to host this on my Raspberry Pi at home? I see you are recommending other hosts, I'm afraid the rpi won't have enough power to handle this... :(

RumbleFrog 11-23-2018 16:17

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by Obyboby (Post 2624928)
Hi!
I've read the whole thread and documentation, I have a question.
Is it possible to host this on my Raspberry Pi at home? I see you are recommending other hosts, I'm afraid the rpi won't have enough power to handle this... :(

Definitely, it can run on almost anything. The hosts I recommend are just for stability and some referrals.

RumbleFrog 11-23-2018 16:17

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by tzzion (Post 2624854)
My english is not very good and I do not understand much about plugins in general. My friend could not install the plugin. I am willing to pay some csgo keys if someone can help me

What attempts has he tried so far? I have a support server if the problem persists.

Obyboby 11-24-2018 11:55

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by RumbleFrog (Post 2625415)
Definitely, it can run on almost anything. The hosts I recommend are just for stability and some referrals.

Awesome, but I'm a bit confused with the tutorial, what should I install on the rpi? Just the server file? :oops:

RumbleFrog 11-24-2018 14:14

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by Obyboby (Post 2625517)
Awesome, but I'm a bit confused with the tutorial, what should I install on the rpi? Just the server file? :oops:

Just the server binary. I have a support server if you need help, it's on the Github repo as a badge.

NoloZeroZeroOne 12-02-2018 07:52

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Hello. Im experiencing a small problem with this bot. I managed to link it t my server, its database it also working. But I got kinda confused when tried to use r/receivechannel and r/sendchannel. if I type r/sendchannel ENTITYID #general it jus shows me an embed with entityid and says that there are no send or receive channels set up. If I try to opposite aka r/sendchannel #general ENTITYID it says the same. If I try to type r/sendchannel #general it says Unable to fetch entity. I would like to get some help with setting up this great bot.

RumbleFrog 12-23-2018 01:15

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by NoloZeroZeroOne (Post 2626381)
Hello. Im experiencing a small problem with this bot. I managed to link it t my server, its database it also working. But I got kinda confused when tried to use r/receivechannel and r/sendchannel. if I type r/sendchannel ENTITYID #general it jus shows me an embed with entityid and says that there are no send or receive channels set up. If I try to opposite aka r/sendchannel #general ENTITYID it says the same. If I try to type r/sendchannel #general it says Unable to fetch entity. I would like to get some help with setting up this great bot.

Both sendchannel and receivechannel have channelNumber for second argument, this is NOT a Discord channel, but a virtual number that you can set it to for routing.

foxsay 01-03-2019 06:52

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
how i can start server file in linux trought ssh so i can see my discord bot online? bit confused with everything + idk much about linux

RumbleFrog 01-22-2019 17:46

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by foxsay (Post 2632542)
how i can start server file in linux trought ssh so i can see my discord bot online? bit confused with everything + idk much about linux

./server

Obyboby 02-06-2019 10:43

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Can't run on Raspberry running Raspbian 8, it says exec format error. :( Sadly I am unable to compile it for it myself.

RumbleFrog 02-06-2019 14:58

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by Obyboby (Post 2638415)
Can't run on Raspberry running Raspbian 8, it says exec format error. :( Sadly I am unable to compile it for it myself.

If you could make a GitHub issue on it, I'll remember to add it for arm

RumbleFrog 02-06-2019 16:31

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Armv7 artifact added, try it out

Obyboby 02-06-2019 19:02

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by RumbleFrog (Post 2638473)
Armv7 artifact added, try it out


Works!
I still have to set the database credentials, I'll report back when I get some time to do that and complete the setup.
Thanks for now!

MAGNAT2645 02-07-2019 09:01

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
I dont know why but bot disconnects from Discord if i close opened SSH terminal (X-Shell in my case).

How i can leave socket server (Relay) working without terminal (i don't know Linux well)? (okay i found method (not the best, but...) with launching ./server & exit)

There's also "bind: address already in use" error when i'm trying to restart socket server. (fixed by using fuser)

RumbleFrog 02-07-2019 15:28

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by MAGNAT2645 (Post 2638534)
I dont know why but bot disconnects from Discord if i close opened SSH terminal (X-Shell in my case).

How i can leave socket server (Relay) working without terminal (i don't know Linux well)? (okay i found method (not the best, but...) with launching ./server & exit)

There's also "bind: address already in use" error when i'm trying to restart socket server. (fixed by using fuser)

You can use system service, screen, nohup, etc

MAGNAT2645 02-08-2019 11:22

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Ok, thank you. I've created autolaunch script (contains cd and nohup commands) for @reboot in crontab.

RumbleFrog 02-08-2019 20:53

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by MAGNAT2645 (Post 2638695)
Ok, thank you. I've created autolaunch script (contains cd and nohup commands) for @reboot in crontab.

That also works

TheBOSS 02-08-2019 21:12

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
what this bazooka plugin in video :D

RumbleFrog 02-08-2019 21:22

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Quote:

Originally Posted by TheBOSS (Post 2638782)
what this bazooka plugin in video :D

Dodgeball? It's a heavy fork from the original one which isn't available anymore.

MAGNAT2645 02-09-2019 04:25

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Idk what's the problem but autolaunch script don't work after linux boot.

My autolaunch script (works if you launch it manually):
Code:

#!/bin/bash
cd /home/SourceChatRelay
nohup ./server &

Crontab line:
@reboot /home/SourceChatRelay/autolaunch >/dev/null 2>&1

Nohup log just said this (before rebooting):
time="2019-02-09T05:00:01+03:00" level=info msg="Received exit signal. Terminating."

RumbleFrog 02-09-2019 10:51

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
I'd try system service instead

MAGNAT2645 02-09-2019 13:31

Re: [Any] Source Chat Relay [Discord <=> Ingame]
 
Is there any way to add server script without cd command (script don't see config if you're not in directory where script is located) to etc/init.d ?


All times are GMT -4. The time now is 00:46.

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