Giter VIP home page Giter VIP logo

rumblefrog / source-chat-relay Goto Github PK

View Code? Open in Web Editor NEW
85.0 5.0 23.0 35.24 MB

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

Home Page: https://rumblefrog.me/source-chat-relay/

License: GNU General Public License v3.0

Rust 58.32% C++ 28.98% Python 3.02% Shell 1.45% C 8.22%
discord source-games sourcemod plugin relay chat community advanced

source-chat-relay's Introduction

This branch is working branch for v3. For the current stable release, the readme is available in master

Table of Contents

Introduction

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

Features

  • Receive and send messages bidrectionally
  • Channel and type 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
  • Filter out certain unwanted messages using regex expressions
  • Set ingame prefixes to send a message with ability to configure flag permission for the prefix
  • Natives to expand upon the functionality of the plugin (Custom events, team chat only relays, etc)

Prerequisites

Getting started

For additional support, feel free to leave a reply on the Alliedmods Thread

Alliedmods Thread

Natives

Message dispatchers and forwards are available within client/include/

License

This project is licensed under GPL 3.0

Icons made by itim2101 from www.flaticon.com is licensed by CC 3.0 BY

source-chat-relay's People

Contributors

bors[bot] avatar dependabot[bot] avatar granny avatar imgbot[bot] avatar kossolax avatar mrskullbeef avatar nerus87 avatar ronmelkhior avatar rumblefrog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

source-chat-relay's Issues

Config for sourcemod plugin not being generated

The setup guide says to configure cfg/sourcemod/Source-Chat-Relay.cfg but it is not generated when the plugin is loaded. It's also not included in the release zip. Is there a copy i can download from anywhere?

Discord bot not responding at commands

Describe the bug
Hey, I can't configure the bot on Discord, it is not responding to any of the commands on Discord.

To Reproduce
Steps to reproduce the behavior:

  1. Create Bot
  2. Invite Bot
  3. Use commands

Expected behavior
The bot should respond to commands

Screenshots
obraz
obraz

Info (please complete the following information):

  • OS: Ubuntu 22.04
  • Sourcemod Version 1.11.0.6934
  • Relay Version v2.2.1

Messges not redirected to discord after first pattern check

Describe the bug
Like in topic.

To Reproduce
Steps to reproduce the behavior:

  1. Send from game normal message: "test"
  2. Send from game equal to regex: "!ws"
  3. Send from game normal message: "test"
  4. See that second test message not pass to the discord channel

Expected behavior
All normal messages like "test" passed to the discord channel after filter handle message with the pattern.

Info (please complete the following information):

  • OS: Ubuntu 18.04.3 LTS (4.15.0-58-generic)
  • Sourcemod Version 1.9.0.6281
  • Relay Version v2.0.0-rc13-0-geb75978

Additional context
Relay server binary for Linux:
server.zip
Filter file:
filter.txt

[AMXX] In-game chat messages with quotes are truncated when relayed to Discord

I've encountered an issue with the Discord chat bot relay, where in-game (Half-Life) chat messages that contain a quotation mark " are not fully relayed to the designated Discord channel. Specifically, any text following the quotation mark is omitted in the Discord message.

Only the portion of the message before the quotation mark is relayed to the Discord channel. Anything after the quotation mark is omitted. For example, if test"hello is typed in-game, only test appears in the Discord channel.

Error im getting.

Im using the AMXX Version but I know you made this bot so im hoping you seen or know about this error.....

I removed some personal info from it but you will see the error.

fatal error: concurrent map writes

`�[36mINFO�[0m[0000] Server is now running on version v2.1.0-0-g64768d4. Press CTRL-C to exit.
�[36mINFO�[0m[0000] Entities cache initialized �[36mlength�[0m=2
�[36mINFO�[0m[0000] Bot is now running �[36mGuild Count�[0m=1 �[36mUsername�[0m=""
�[36mINFO�[0m[0008] A client connected �[36maddress�[0m="127.0.0.1:56468"
�[36mINFO�[0m[0008] Client authenticated �[36maddress�[0m="127.0.0.1:56468" �[36mhostname�[0m=Half-Life �[36mid�[0m=""
�[36mINFO�[0m[2729] A client connected �[36maddress�[0m=""
�[36mINFO�[0m[2729] Client authenticated �[36maddress�[0m="" �[36mhostname�[0m="" �[36mid�[0m=""
�[36mINFO�[0m[5443] A client connected �[36maddress�[0m=""
�[36mINFO�[0m[5443] Client authenticated �[36maddress�[0m="" �[36mhostname�[0m="" �[36mid�[0m=""
�[36mINFO�[0m[8157] A client connected �[36maddress�[0m=""
�[36mINFO�[0m[8157] Client authenticated �[36maddress�[0m="" �[36mhostname�[0m="" �[36mid�[0m=""
�[36mINFO�[0m[10873] A client connected �[36maddress�[0m=""
�[36mINFO�[0m[10873] Client authenticated �[36maddress�[0m="" �[36mhostname�[0m="" �[36mid�[0m=""
�[36mINFO�[0m[13589] A client connected �[36maddress�[0m=""
�[36mINFO�[0m[13589] Client authenticated �[36maddress�[0m="" �[36mhostname�[0m="" �[36mid�[0m=""
�[36mINFO�[0m[16308] A client connected �[36maddress�[0m=""
�[36mINFO�[0m[16308] Client authenticated �[36maddress�[0m="" �[36mhostname�[0m="" �[36mid�[0m=""
�[36mINFO�[0m[19012] A client connected �[36maddress�[0m=""
�[36mINFO�[0m[19012] Client authenticated �[36maddress�[0m="" �[36mhostname�[0m="" �[36mid�[0m=""
�[36mINFO�[0m[21716] A client connected �[36maddress�[0m=""
�[36mINFO�[0m[21716] Client authenticated �[36maddress�[0m="" �[36mhostname�[0m="" �[36mid�[0m=""
�[36mINFO�[0m[24420] A client connected �[36maddress�[0m=""
�[36mINFO�[0m[24420] Client authenticated �[36maddress�[0m="" �[36mhostname�[0m="" �[36mid�[0m=""
fatal error: concurrent map writes

goroutine 4590 [running]:
runtime.throw(0x9cc6df, 0x15)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/runtime/panic.go:617 +0x72 fp=0xc000564f38 sp=0xc000564f08 pc=0x42c012
runtime.mapdelete_fast64(0x9162a0, 0xc000170270, 0xc000583c80)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/runtime/map_fast64.go:281 +0x328 fp=0xc000564f80 sp=0xc000564f38 pc=0x411838
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).RemoveClient(...)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:273
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ListenClientReceive(0xc000180140, 0xc000583c80)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:141 +0x15d fp=0xc000564fd0 sp=0xc000564f80 pc=0x822fad
runtime.goexit()
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/runtime/asm_amd64.s:1337 +0x1 fp=0xc000564fd8 sp=0xc000564fd0 pc=0x458691
created by github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ProcessConnections
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:129 +0x88

goroutine 1 [chan receive, 429 minutes]:
github.com/kardianos/service.(*systemd).Run.func1()
/home/travis/gopath/src/github.com/kardianos/service/service_systemd_linux.go:212 +0xbd
github.com/kardianos/service.(*systemd).Run(0xc000116a50, 0xa7cf40, 0xe568e0)
/home/travis/gopath/src/github.com/kardianos/service/service_systemd_linux.go:213 +0xbf
main.main()
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/main.go:104 +0x132

goroutine 5 [syscall, 429 minutes]:
os/signal.signal_recv(0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/runtime/sigqueue.go:139 +0x9c
os/signal.loop()
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/os/signal/signal_unix.go:23 +0x22
created by os/signal.init.0
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/os/signal/signal_unix.go:29 +0x41

goroutine 6 [select, 429 minutes]:
database/sql.(*DB).connectionOpener(0xc0000fc240, 0xa84a40, 0xc00002aa80)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/database/sql/sql.go:1000 +0xe8
created by database/sql.OpenDB
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/database/sql/sql.go:670 +0x15e

goroutine 7 [select]:
database/sql.(*DB).connectionResetter(0xc0000fc240, 0xa84a40, 0xc00002aa80)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/database/sql/sql.go:1013 +0xfb
created by database/sql.OpenDB
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/database/sql/sql.go:671 +0x194

goroutine 33 [select, 429 minutes]:
github.com/go-sql-driver/mysql.(*mysqlConn).startWatcher.func1(0xc0001300c0, 0xc000124120, 0xc00012a060)
/home/travis/gopath/src/github.com/go-sql-driver/mysql/connection.go:619 +0xbf
created by github.com/go-sql-driver/mysql.(*mysqlConn).startWatcher
/home/travis/gopath/src/github.com/go-sql-driver/mysql/connection.go:616 +0xbe

goroutine 18 [chan receive, 2 minutes]:
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).StartRouting(0xc000180140)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:75 +0x76
created by github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).Listen
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:62 +0x148

goroutine 19 [IO wait, 22 minutes]:
internal/poll.runtime_pollWait(0x7f5940e8df38, 0x72, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/runtime/netpoll.go:182 +0x56
internal/poll.(*pollDesc).wait(0xc000190198, 0x72, 0x0, 0x0, 0x9c2daf)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_poll_runtime.go:87 +0x9b
internal/poll.(*pollDesc).waitRead(...)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc000190180, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_unix.go:384 +0x1ba
net.(*netFD).accept(0xc000190180, 0xc000051c00, 0x7f59410fad98, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc000182038, 0xc000369f60, 0xc000369f68, 0x10)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc000182038, 0x9e8910, 0xc000180140, 0xc00006fc80, 0x1)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/tcpsock.go:260 +0x48
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ProcessConnections(0xc000180140)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:108 +0xd1
created by github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).Listen
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:63 +0x16d

goroutine 1240 [runnable]:
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ListenClientSend(0xc000180140, 0xc000635320)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:163 +0xc9
created by github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ProcessConnections
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:130 +0xb7

goroutine 40 [chan receive]:
github.com/rumblefrog/source-chat-relay/server/bot.Listen()
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/bot/pipeline.go:12 +0x3f0
created by github.com/rumblefrog/source-chat-relay/server/bot.ready
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/bot/bot.go:119 +0x4a

goroutine 5754 [chan receive, 158 minutes]:
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ListenClientSend(0xc000180140, 0xc00006e6c0)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:163 +0xc9
created by github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ProcessConnections
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:130 +0xb7

goroutine 28 [runnable]:
syscall.Syscall(0x3, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.Close(0x8, 0x50, 0xc0000a6ed0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/syscall/zsyscall_linux_amd64.go:310 +0x40
internal/poll.(*FD).destroy(0xc000376100, 0x1, 0x7f5940e8dcd0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_unix.go:78 +0x44
internal/poll.(*FD).decref(0xc000376100, 0x40c101, 0x50)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_mutex.go:213 +0x42
internal/poll.(*FD).Close(0xc000376100, 0xc000376100, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_unix.go:100 +0x50
net.(*netFD).Close(0xc000376100, 0x0, 0xc0000a6f90)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/fd_unix.go:184 +0x4f
net.(*conn).Close(0xc00000e0d0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/net.go:201 +0x4b
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ListenClientReceive(0xc000180140, 0xc000130a20)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:142 +0x11a
created by github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ProcessConnections
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:129 +0x88

goroutine 29 [runnable]:
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ListenClientSend(0xc000180140, 0xc000130a20)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:163 +0xc9
created by github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ProcessConnections
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:130 +0xb7

goroutine 5897 [IO wait]:
internal/poll.runtime_pollWait(0x7f5940e8d4a8, 0x72, 0xffffffffffffffff)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/runtime/netpoll.go:182 +0x56
internal/poll.(*pollDesc).wait(0xc0003ee818, 0x72, 0x1100, 0x1104, 0xffffffffffffffff)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_poll_runtime.go:87 +0x9b
internal/poll.(*pollDesc).waitRead(...)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0003ee800, 0xc000229300, 0x1104, 0x1104, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_unix.go:169 +0x19b
net.(*netFD).Read(0xc0003ee800, 0xc000229300, 0x1104, 0x1104, 0x203000, 0x0, 0x10f7)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc00000e0e0, 0xc000229300, 0x1104, 0x1104, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/net.go:177 +0x69
crypto/tls.(*atLeastReader).Read(0xc00029a0e0, 0xc000229300, 0x1104, 0x1104, 0x26, 0xa77340, 0xc0005629e0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/crypto/tls/conn.go:761 +0x60
bytes.(*Buffer).ReadFrom(0xc00012c958, 0xa771e0, 0xc00029a0e0, 0x409985, 0x9306a0, 0x9a3c60)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/bytes/buffer.go:207 +0xbd
crypto/tls.(*Conn).readFromUntil(0xc00012c700, 0xa77860, 0xc00000e0e0, 0x5, 0xc00000e0e0, 0x9)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/crypto/tls/conn.go:783 +0xf8
crypto/tls.(*Conn).readRecordOrCCS(0xc00012c700, 0x9e9400, 0xc00012c838, 0xc000562d58)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/crypto/tls/conn.go:590 +0x125
crypto/tls.(*Conn).readRecord(...)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/crypto/tls/conn.go:558
crypto/tls.(*Conn).Read(0xc00012c700, 0xc0006b6000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/crypto/tls/conn.go:1236 +0x137
bufio.(*Reader).Read(0xc000634cc0, 0xc00035e3b8, 0x9, 0x9, 0x406214, 0xc000634d80, 0xc000562d58)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/bufio/bufio.go:223 +0x23e
io.ReadAtLeast(0xa77060, 0xc000634cc0, 0xc00035e3b8, 0x9, 0x9, 0x9, 0xa77340, 0xc0003e6120, 0xc000062060)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/io/io.go:310 +0x88
io.ReadFull(...)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/io/io.go:329
net/http.http2readFrameHeader(0xc00035e3b8, 0x9, 0x9, 0xa77060, 0xc000634cc0, 0x0, 0x0, 0xc0004fe180, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/http/h2_bundle.go:1476 +0x88
net/http.(*http2Framer).ReadFrame(0xc00035e380, 0xc0004fe180, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/http/h2_bundle.go:1734 +0xa1
net/http.(*http2clientConnReadLoop).run(0xc000562fb8, 0x9e8e10, 0xc000145fb8)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/http/h2_bundle.go:8132 +0x8f
net/http.(*http2ClientConn).readLoop(0xc0001a3c80)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/http/h2_bundle.go:8060 +0x76
created by net/http.(*http2Transport).newClientConn
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/http/h2_bundle.go:7123 +0x637

goroutine 4591 [runnable]:
syscall.Syscall(0x3, 0xc, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.Close(0xc, 0xc000667b01, 0xc000506ec0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/syscall/zsyscall_linux_amd64.go:310 +0x40
internal/poll.(*FD).destroy(0xc000344780, 0x1, 0x7f5940e8d990)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_unix.go:78 +0x44
internal/poll.(*FD).decref(0xc000344780, 0x1, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_mutex.go:213 +0x42
internal/poll.(*FD).Close(0xc000344780, 0xc000344780, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_unix.go:100 +0x50
net.(*netFD).Close(0xc000344780, 0xc00007ad80, 0xa88f38)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/fd_unix.go:184 +0x4f
net.(*conn).Close(0xc0001ae648, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/net.go:201 +0x4b
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ListenClientSend(0xc000180140, 0xc000583c80)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:166 +0xe4
created by github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ProcessConnections
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:130 +0xb7

goroutine 5753 [runnable]:
syscall.Syscall(0x0, 0xe, 0xc000206c00, 0x400, 0x0, 0x400, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0xe, 0xc000206c00, 0x400, 0x400, 0x0, 0xa78a80, 0xdfa410)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/syscall/zsyscall_linux_amd64.go:732 +0x5a
syscall.Read(...)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/syscall/syscall_unix.go:172
internal/poll.(*FD).Read(0xc000460b00, 0xc000206c00, 0x400, 0x400, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_unix.go:165 +0x131
net.(*netFD).Read(0xc000460b00, 0xc000206c00, 0x400, 0x400, 0xc000566f70, 0x4419bc, 0x400)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc00000e2d8, 0xc000206c00, 0x400, 0x400, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/net.go:177 +0x69
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ListenClientReceive(0xc000180140, 0xc00006e6c0)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:138 +0x7a
created by github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ProcessConnections
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:129 +0x88

goroutine 3078 [runnable]:
github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ListenClientSend(0xc000180140, 0xc000583320)
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:163 +0xc9
created by github.com/rumblefrog/source-chat-relay/server/relay.(*Relay).ProcessConnections
/home/travis/gopath/src/github.com/rumblefrog/source-chat-relay/server/relay/relay.go:130 +0xb7

goroutine 5856 [select, 2 minutes]:
github.com/bwmarrin/discordgo.(*Session).heartbeat(0xc0001be120, 0xc0000ae580, 0xc0005eb020, 0xa122)
/home/travis/gopath/src/github.com/bwmarrin/discordgo/wsapi.go:316 +0x382
created by github.com/bwmarrin/discordgo.(*Session).Open
/home/travis/gopath/src/github.com/bwmarrin/discordgo/wsapi.go:202 +0xb2a

goroutine 5905 [IO wait]:
internal/poll.runtime_pollWait(0x7f5940e8d578, 0x72, 0xffffffffffffffff)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/runtime/netpoll.go:182 +0x56
internal/poll.(*pollDesc).wait(0xc0001a8818, 0x72, 0x1000, 0x10f3, 0xffffffffffffffff)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_poll_runtime.go:87 +0x9b
internal/poll.(*pollDesc).waitRead(...)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0001a8800, 0xc00022a600, 0x10f3, 0x10f3, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/internal/poll/fd_unix.go:169 +0x19b
net.(*netFD).Read(0xc0001a8800, 0xc00022a600, 0x10f3, 0x10f3, 0x203000, 0x0, 0x5ceae2)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc000182020, 0xc00022a600, 0x10f3, 0x10f3, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/net/net.go:177 +0x69
crypto/tls.(*atLeastReader).Read(0xc0003ba3c0, 0xc00022a600, 0x10f3, 0x10f3, 0x198, 0x200, 0xc000527a10)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/crypto/tls/conn.go:761 +0x60
bytes.(*Buffer).ReadFrom(0xc00012d758, 0xa771e0, 0xc0003ba3c0, 0x409985, 0x9306a0, 0x9a3c60)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/bytes/buffer.go:207 +0xbd
crypto/tls.(*Conn).readFromUntil(0xc00012d500, 0xa77860, 0xc000182020, 0x5, 0xc000182020, 0x29b)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/crypto/tls/conn.go:783 +0xf8
crypto/tls.(*Conn).readRecordOrCCS(0xc00012d500, 0x9e9400, 0xc00012d638, 0xc000078380)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/crypto/tls/conn.go:590 +0x125
crypto/tls.(*Conn).readRecord(...)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/crypto/tls/conn.go:558
crypto/tls.(*Conn).Read(0xc00012d500, 0xc0001b3000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/crypto/tls/conn.go:1236 +0x137
bufio.(*Reader).fill(0xc00006fec0)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/bufio/bufio.go:100 +0x10f
bufio.(*Reader).Peek(0xc00006fec0, 0x2, 0xc0002cabf0, 0xe, 0xc0003a0a01, 0x43548f, 0xc000527d28)
/home/travis/.gimme/versions/go1.12.10.linux.amd64/src/bufio/bufio.go:138 +0x4f
github.com/gorilla/websocket.(*Conn).read(0xc0000ae580, 0x2, 0xc000527db8, 0x42b631, 0x9e94a8, 0xc000527dc8, 0x42ad8f)
/home/travis/gopath/src/github.com/gorilla/websocket/conn.go:370 +0x40
github.com/gorilla/websocket.(*Conn).advanceFrame(0xc0000ae580, 0x0, 0x0, 0x0)
/home/travis/gopath/src/github.com/gorilla/websocket/conn.go:798 +0x5c
github.com/gorilla/websocket.(*Conn).NextReader(0xc0000ae580, 0xe577e0, 0x200, 0xc000182078, 0x0, 0x0)
/home/travis/gopath/src/github.com/gorilla/websocket/conn.go:980 +0xa0
github.com/gorilla/websocket.(*Conn).ReadMessage(0xc0000ae580, 0x1, 0xc00040a600, 0x297, 0x600, 0xc000180460, 0x0)
/home/travis/gopath/src/github.com/gorilla/websocket/conn.go:1064 +0x2f
github.com/bwmarrin/discordgo.(*Session).listen(0xc0001be120, 0xc0000ae580, 0xc0005eb020)
/home/travis/gopath/src/github.com/bwmarrin/discordgo/wsapi.go:217 +0x8e
created by github.com/bwmarrin/discordgo.(*Session).Open
/home/travis/gopath/src/github.com/bwmarrin/discordgo/wsapi.go:203 +0xb67
`

[Error] Unable to open bot session

Describe the bug
Can't parse data inside the app:
FATA[0000] Unable to open bot session error="strconv.ParseInt: parsing "1677618691.537": invalid syntax"

To Reproduce
Steps to reproduce the behavior:

  1. Run the server app

Expected behavior
Application start working successfully

Screenshots
image

Info (please complete the following information):

  • OS: Ubuntu 22.04 LTS]
  • Relay Version: Current

Additional context
Probably something changed on the Discord side

Disable tagging

Would it be possible to disable tagging for the bot on Discord? There are users abusing the bot by using a Discord user's ID as their name thus pinging the user on Discord when the message is sent.

documentation enhancement

A documentation adjustment is needed as it confuses new users with the concept.

A proposal for videos would be beautiful to help guide through the setup process.

Linux release is not actually a .tar.gz

Issue: had to install p7zip-full to unzip archive

To Reproduce

  1. Run command tar -xvf linux-amd64.tar.gz
  2. Error "gzip: stdin: not in gzip format"

Solution

  1. Install p7zip-full
  2. Run 7za x linux-amd64.tar.gz
  3. Extracts as expected

Note:
Using command file linux-amd64.tar.gz shows that it is indeed a 7zip archive

Info (please complete the following information):

  • OS: Ubuntu Server 18.04.01 LTS
  • Sourcemod Version 1.9.6261
  • Relay Version 1.1.2

Bot messages are ignored.

Hi

I was wondering if it would be possible to support other bot's messages to be sent to the csgo server too.

Practical: I am using your setup to bridge CS:GO to discord, and I use another setup to bridge discord to Riot. The forwarding works from CSGO -> Discord -> Riot. But when I try the other way around : Riot -> Discord -/> CS:GO.

Your bot ignores other bots. Is this intended behaviour, or would you consider allowing other bots' messages to be forwarded?

Kind regards.

Additional event forwards

Todo list:

  • Sourcebans++ (merge into SB Discord Forward as optional)
  • Calladmin

Excerpt for SB

g_cSBEvent = CreateConVar("rf_scr_event_sb", "0",
		"Bitwise flags value of Sourcebans++ events to enable\n"
		... "Disabled = 0\n"
		... "Ban Only = 1\n"
		... "Ban & Mute = 3\n"
		... "Ban & Report = 5 \n"
		... "Mute & Report = 6\n"
		... "Ban & Mute & Report = 7\n",
		FCVAR_NONE, true, 0.0, true, 7.0);

emojis are probably broken

this is a oddity that seems to be a bug

send any screenshot or discord default emoji

i expected it to work by sending ";thinking;", instead of showing up as "" a.k.a None or nothing showing any text at all and the color code failing and instead displaying CCCCCC in the server chat

  • OS: Windows 10 Pro (10.0.18362)
  • Sourcemod Version 1.11.0.6858
  • Relay Version v2.1.5-2-gd81f03c

there's another bug surrounding the same thing, emojis from the server show up but they get an ID by their side so :LOL:: would be displayed to the server

the solution for this problem in my opinion is ignore images completely and instead for the emojis interpret them as plain text would be fine i guess
image
this first one is a attempt to send a image
discord default emoji
this second one is an attempt to send a stock discord emoji
non-default emoji
and this one is a non-stock emoji

meta: v3

Before else, I'd like to mention v3 has no definite deadline, it could be months, or it could be years before I find time to work on it. This is purely a manifest of things I'd like to include when v3 releases.


New features to be introduced

  • Bi-directional voice-support, with audio mixing of bound channels (but note that the Discord bot could only be in one Discord voice channel at a time).
  • Real-time audio transcription to text, with TTL of the raw audio file for manual transcribing.
  • Improved logging and lookups; Discord message search has proven rather inadequate for more advanced searches, especially cases requiring filter by time, player, and origin.
  • Better routing specifiers, including routing by identifiers, type, origin, metadata, and/or combination of any.
  • Transmission encryption, it's 2021

Things being removed

  • Built-in UI - This feature is heavily underutilized and creates unnecessary complexity inside the codebase; the likely clause will be decoupling UI from the primary binary and offered separately if there's a demand for it.
  • Built-in service - While a built-in service manager is handy, it's found that debugging such is much more difficult than a pure system service manager.

Notes

  • v3 will not be compatible with v2, but upgrade steps will be provided.
  • by default, logging (audio, text), which is separate from the relay component, will be disabled, and it's up to you as the end operator to comply with any legality terms before enabling it.
  • I will attempt to provide a Heroku one-click deploy button for non-experienced users.

[Request] Translations Support

Would be good to add translations at least to client-side plugin (event names like Map Started, Map Ended, Player Connected, Player Disconnected) as i did here (for example):

public void OnClientConnected(int iClient) {
	if ( !g_cPlayerEvent.BoolValue )
		return;

	char szName[MAX_NAME_LENGTH];
	if ( !GetClientName( iClient, szName, sizeof szName) )
		return;

	char szEvent[128];
	FormatEx( szEvent, sizeof szEvent, "%T", "EVENT_PLAYER_CONNECTED", LANG_SERVER );
	EventMessage( szEvent, szName ).Dispatch();
}
	"EVENT_PLAYER_CONNECTED"
	{
		"en"			"Player Connected"
		"ru"			"К серверу подключается игрок"
	}

Server denied our token, stopping (NMRiH srcds)

Plugin fails after getting message "server denied our token, stopping" when having a valid bot token inside config.tom

Expected behavior
Plugin should recognize valid token and start

Info:

  • Windows 10
  • Sourcemod Version 1.11.0.6914
  • Relay Version 2.20

Stuck on "GameID"

So in the guide it asks me to use a game server ID that I can't seem to find. Also, I don't see any "Source-Chat-Relay.cfg" in "cfg/sourcemod/". If I was supposed to make the config file, what am I supposed to put in it exactly?

Documentation and Functionality Discrepancies

I've installed the AMXX Chat Relay plugin for a Half-Life 1 server and followed the setup instructions on the docs at https://rumblefrog.me/source-chat-relay/setup. At the bottom of the page, there is a hyperlink to the Bot Commands which is broken.

In the actual Bot Commands page, important bot commands such as r/deleteentity is missing.

r.On("deleteentity", deleteCommand).Desc("Delete an entity from database").Alias("delete", "del")

Also, there is no command for r/help, as mentioned in the documentation, instead there are commands like r/about and r/ping.

Filter not working in Windows.

The server is installed as a Windows service, installed according to the instructions.

Account: NT/System.

Bug: The Regex filter does not work if the relay server is running as a Windows service.
Specifically: Skips commands when they are strictly prescribed in the filter.txt file, the file itself is in the folder with the server.

filter.txt
The filter file is attached.

meta: v3

Discussed in #44

Originally posted by rumblefrog February 2, 2021
Before else, I'd like to mention v3 has no definite deadline, it could be months, or it could be years before I find time to work on it. This is purely a manifest of things I'd like to include when v3 releases.


New features to be introduced

  • Bi-directional voice-support, with audio mixing of bound channels (but note that the Discord bot could only be in one Discord voice channel at a time).
  • Real-time audio transcription to text, with TTL of the raw audio file for manual transcribing.
  • Improved logging and lookups; Discord message search has proven rather inadequate for more advanced searches, especially cases requiring filter by time, player, and origin.
  • Better routing specifiers, including routing by identifiers, type, origin, metadata, and/or combination of any.
  • Transmission encryption, it's 2021

Things being removed

  • Built-in UI - This feature is heavily underutilized and creates unnecessary complexity inside the codebase; the likely clause will be decoupling UI from the primary binary and offered separately if there's a demand for it.
  • Built-in service - While a built-in service manager is handy, it's found that debugging such is much more difficult than a pure system service manager.

Notes

  • v3 will not be compatible with v2, but upgrade steps will be provided.
  • by default, logging (audio, text), which is separate from the relay component, will be disabled, and it's up to you as the end operator to comply with any legality terms before enabling it.
  • I will attempt to provide a Heroku one-click deploy button for non-experienced users.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.