Raised This Month: $12 Target: $400
 3% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Synthesis
New Member
Join Date: Mar 2020
Old 03-22-2020 , 16:05   Re: [Any] Source Chat Relay [Discord <=> Ingame]
Reply With Quote #231

Quote:
Originally Posted by RumbleFrog View Post
The person configuring the bot needs manage server to configure it.



The only two different formatting mode is simple or the embedded, in which you can toggle simple in the config, there was a PR #32 that tried to make the simple more configurable but went unfinished.
Are you able to tell me what the config setting would be to enable simple instead of embedded? It's not in the docs, and I am unable to find a good example of this online.

Quote:
Originally Posted by RumbleFrog View Post
For the documentation, the related files are housed in the repo under docs/ directory.
As much detail as you have in the documentation, it is not easy to follow for your average everyday non-technical person and is missing very important information, such as the fact that a user must have "Manage Server" as a permission in Discord. I was attempting to add this to zureal's discord with his support. He owns the server, and he was getting the same results as I was, with access denied.

I'm willing to setup a step by step guide for this for you, current as of 2.1.5 if you'd like. I just want to ensure that I fully understand the application and how it works before I do. I am a very firm believer in documenting even the simplest of things, providing screenshots and example configurations to make things work.

Quote:
Originally Posted by RumbleFrog View Post
The server went private because I use it for multiple projects, and it was getting to the point that I'm getting hundreds of questions a day, and I alone cannot handle that quantity. So, I prefer to use the forum, Sourcemod discord or Keybase for questions.
I understand this.
Synthesis is offline
Hailee
BANNED
Join Date: Feb 2019
Location: https://t.me/pump_upp
Old 03-23-2020 , 20:42   Re: [Any] Source Chat Relay [Discord <=> Ingame]
Reply With Quote #232

Can someone help me set this up? discord: Coolio#6191
Hailee is offline
Send a message via ICQ to Hailee Send a message via AIM to Hailee Send a message via Yahoo to Hailee
belgvr
Member
Join Date: Dec 2008
Location: Brazil
Old 03-31-2020 , 16:11   Re: [Any] Source Chat Relay [Discord <=> Ingame]
Reply With Quote #233

This is happening to me, it echoes any message i type in game:



On discord channel #hl2dm-chat, nothing happens when I type any message except for: r/entities and those bot commands.

On discord channel #hl2dm-chat i typed this:
r/sendchannel hl2dm-chat 8
r/receivechannel hl2dm-chat 8
The config.toml has the channel token configured correctly and the DB info are correct as well.

I don't really know what to do... any help would be much appreciated.

My discord: belgvr#6747
steam: https://steamcommunity.com/id/ribasgabe/

Thanks in advance.

Last edited by belgvr; 03-31-2020 at 16:15.
belgvr is offline
freak.exe_uLow
AlliedModders Donor
Join Date: Jul 2012
Location: Germany
Old 03-31-2020 , 19:08   Re: [Any] Source Chat Relay [Discord <=> Ingame]
Reply With Quote #234

Hello RumbleFrog,
is it possible to test socket as well? On 2 servers the system runs, on the other 7 servers this error always occurs:

L 04/01/2020 - 01:09:28: [Source-Chat-Relay.smx] Source Chat Relay socket error 3 (errno 111)
L 04/01/2020 - 01:09:28: [Source-Chat-Relay.smx] Source Chat Relay socket error 6 (errno 107)
L 04/01/2020 - 01:09:28: [Source-Chat-Relay.smx] Source Chat Relay socket error 6 (errno 107)
L 04/01/2020 - 01:09:28: [Source-Chat-Relay.smx] Source Chat Relay socket error 4 (errno 32)

Fulllog: https://hastebin.com/luronoyego.pl

Old: https://forums.alliedmods.net/showthread.php?t=67640
new: https://github.com/JoinedSenses/sm-ext-socket

sm exts list
Socket (3.0.2): Socket extension for SourceMod

sm version
SourceMod Version: 1.10.0.6478
SourcePawn Engine: 1.10.0.6478, jit-x86 (build 1.10.0.647

And yes, Source Chat Relay runs on the same machine. Did I miss anything? I've been trying to fix this problem myself for the last two hours, but I haven't been able to fix it.

Edit: fuck my life, its now fixed. I had problems with the port at the time and had changed the last number :/

Last edited by freak.exe_uLow; 04-01-2020 at 16:12.
freak.exe_uLow is offline
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 04-24-2020 , 18:30   Re: [Any] Source Chat Relay [Discord <=> Ingame]
Reply With Quote #235

A friend could make this work, where do we change the format so that the bot shows a different chat room?



Off: ok i can see the discord format, add in config.toml and work fine.

Last edited by Tonblader; 05-22-2020 at 06:23. Reason: Discord Format on config.toml
Tonblader is offline
Lunreth
BANNED
Join Date: Dec 2019
Location: Argentina, Buenos Aires
Old 04-28-2020 , 23:04   Re: [Any] Source Chat Relay [Discord <=> Ingame]
Reply With Quote #236

Great news, turns out that the reason why message was cut in certain parts was because the "else" method to display colors, by doing this and recompiling plugin i could fix the issue:

Code:
#if defined DEBUG
			PrintToConsoleAll("====== Chat Message Packet =====");
			PrintToConsoleAll("sEntity: %s", sEntity);
			PrintToConsoleAll("sName: %s", sName);
			PrintToConsoleAll("sMessage: %s", sMessage);
			PrintToConsoleAll("====== Chat Message Packet =====");
			#endif
			CPrintToChatAll("{gold}[%s] {azure}%s{white}: {grey}%s", sEntity, sName, sMessage);
			//if (SupportsHexColor(g_evEngine))
				//CPrintToChatAll("{gold}[%s] {azure}%s{white}: {grey}%s", sEntity, sName, sMessage);
			//else
				//CPrintToChatAll("\x10[%s] \x0C%s\x01: \x08%s", sEntity, sName, sMessage);
I don't know what engine NMRiH uses but the plugin didn't use morecolors INC by default, i had to force it
Lunreth is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 04-29-2020 , 00:28   Re: [Any] Source Chat Relay [Discord <=> Ingame]
Reply With Quote #237

Quote:
Originally Posted by Lunreth View Post
Great news, turns out that the reason why message was cut in certain parts was because the "else" method to display colors, by doing this and recompiling plugin i could fix the issue:

Code:
#if defined DEBUG
			PrintToConsoleAll("====== Chat Message Packet =====");
			PrintToConsoleAll("sEntity: %s", sEntity);
			PrintToConsoleAll("sName: %s", sName);
			PrintToConsoleAll("sMessage: %s", sMessage);
			PrintToConsoleAll("====== Chat Message Packet =====");
			#endif
			CPrintToChatAll("{gold}[%s] {azure}%s{white}: {grey}%s", sEntity, sName, sMessage);
			//if (SupportsHexColor(g_evEngine))
				//CPrintToChatAll("{gold}[%s] {azure}%s{white}: {grey}%s", sEntity, sName, sMessage);
			//else
				//CPrintToChatAll("\x10[%s] \x0C%s\x01: \x08%s", sEntity, sName, sMessage);
I don't know what engine NMRiH uses but the plugin didn't use morecolors INC by default, i had to force it
Thanks, if possible, could you tell me what GetEngineVersion returns for NMRIH?
__________________
RumbleFrog is offline
Lunreth
BANNED
Join Date: Dec 2019
Location: Argentina, Buenos Aires
Old 04-29-2020 , 13:31   Re: [Any] Source Chat Relay [Discord <=> Ingame]
Reply With Quote #238

Quote:
Originally Posted by RumbleFrog View Post
Thanks, if possible, could you tell me what GetEngineVersion returns for NMRIH?
NMRiH uses SDK 2013, very similar to HL2DM i think, since it started as a mod for that game

Code:
[SourceMod] Engine version: SDK2013
L 04/29/2020 - 14:28:55: [engine_version.smx] [SourceMod] Engine version: SDK2013
Another question, if i want to send messages to Discord when certain events happen, should i add "HookEvent" inside OnPluginStart and follow the same structure showed for OnClientDisconnect or Connect?

Example:
Code:
public Action Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast)
{
	int userid = event.GetInt("userid");
	int iClient = GetClientOfUserId(userid);
	char sName[MAX_NAME_LENGTH];
	
	if (!GetClientName(iClient, sName, sizeof sName))
	{
		return;
	}
	
	EventMessage("Player died", sName).Dispatch();
	return Plugin_Continue;
}

Last edited by Lunreth; 04-29-2020 at 13:51.
Lunreth is offline
RumbleFrog
Great Tester of Whatever
Join Date: Dec 2016
Location: Fish Tank
Old 04-29-2020 , 13:56   Re: [Any] Source Chat Relay [Discord <=> Ingame]
Reply With Quote #239

Quote:
Originally Posted by Lunreth View Post
NMRiH uses SDK 2013, very similar to HL2DM i think, since it started as a mod for that game

Code:
[SourceMod] Engine version: SDK2013
L 04/29/2020 - 14:28:55: [engine_version.smx] [SourceMod] Engine version: SDK2013
Another question, if i want to send messages to Discord when certain events happen, should i add "HookEvent" inside OnPluginStart and follow the same structure showed for OnClientDisconnect or Connect?

Example:
Code:
public Action Event_PlayerDeath(Event event, const char[] name, bool dontBroadcast)
{
	int userid = event.GetInt("userid");
	int iClient = GetClientOfUserId(userid);
	char sName[MAX_NAME_LENGTH];
	
	if (!GetClientName(iClient, sName, sizeof sName))
	{
		return;
	}
	
	EventMessage("Player died", sName).Dispatch();
	return Plugin_Continue;
}
Yeah, following that structure should work.
__________________
RumbleFrog is offline
xkonsole
AlliedModders Donor
Join Date: Mar 2018
Old 05-06-2020 , 10:36   Re: [Any] Source Chat Relay [Discord <=> Ingame]
Reply With Quote #240

Hello, for some reason when I am starting binary with
Code:
SimpleMessage = true
, messages from gameservers are not transfered to the discord channels. Works fine with
Code:
SimpleMessage = false
, but in this way chat is barely readable, alas.

It was fine until I switched from version v2.0.0-rc12-0-g2f57a26 to version v2.1.5-2-gd81f03c

Any suggestions? Thanks in advance.

P.S. Just discovered that for some reason relay v2.0.0 is working again. Tho gets instant crash when r/entities is requested via PM to bot itself.

Crash

Last edited by xkonsole; 05-06-2020 at 10:42.
xkonsole is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:33.


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