Raised This Month: $7 Target: $400
 1% 

[ANY] Sourcebridge (BETA)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Plugin ID:
8064
Plugin Version:
0.9 BETA
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Powered by Matterbridge, Sourcebridge is a plugin for Sourcemod that allows simple bridging between your game servers, Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, and more.
    Old 05-23-2022 , 23:50   [ANY] Sourcebridge (BETA)
    Reply With Quote #1


    Sourcebridge
    Author: gabuch2
    Powered by Matterbridge, Sourcebridge is a plugin for Sourcemod that allows simple bridging between your game servers, Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, and more.



    Description

    Using Matterbridge API, this plugin allows you to bridge your game server with a Matterbridge installation, relaying messages from/to a growing number of protocols.

    You can also bridge multiple servers together so the players can chat between each one.

    Protocols natively supported in Matterbridge
    • Mattermost
    • IRC
    • XMPP
    • Gitter
    • Slack
    • Discord
    • Telegram
    • Rocket.chat
    • Matrix
    • Steam (Bugged for now)
    • Twitch
    • Ssh-chat
    • WhatsApp
    • Zulip
    • Keybase

    Dependencies

    This plugin requires the following to work:
    Supported Games

    This plugin is supposed to be mod agnostic. All official games should work out of the box.

    Tested Games
    • Left 4 Dead 2

    Installation Instructions
    • Do not download the .smx file from here. As the webcompiler lacks the includes needed to generate the plugin correctly.
    • Download all requirements, plus the .sm file.
    • Place include files in the /scripting/includes directory.
    • Compile the plugin and install the newly generated .smx file. (Remember to install the latest version of REST in Pawn in your server)

    Setting up Sourcebridge

    This quickstart guide assumes you already have a working Matterbridge installation.

    Open your matterbridge.toml file and add the following lines:

    Code:
    [api.myserver]
    BindAddress="0.0.0.0:1337"
    Token="verysecrettoken"
    Buffer=1000
    RemoteNickFormat="{NICK}"
    Where "myserver" is goes the name of the relay, you can put anything.

    Find your gateway where you want to relay the messages.
    Quote:
    [[gateway]]
    name="cstrike"
    enable=true

    [[gateway.inout]]
    account="discord.mydiscord"
    channel="general"

    [[gateway.inout]]
    account="api.myserver"
    channel="api"
    Where cstrike is goes the gateway name. You can change it using cvars, you can add more gateway.inout entries depending on how many protocols do you want to relay messages.

    Avatar Spoofing

    It's possible to set up avatars for each user on protocols that support it. You need to get a Steam Web API key and place it in the respective cvar.

    Roadmap

    As this is a port of my previous project, MatterAMXX. The roadmap is to implement most of its features so you can enjoy Sourcebridge at its fullest. The plugin is already in an usable state but lacks most of MatterAMXX features.

    Console Variables
    Code:
    // Enable Sourcebridge. // - // Default: "1" sm_sourcebridge_enabled "1" // Matterbridge gateway on where Sourcebridge should connect to. // - // Default: "" sm_sourcebridge_gateway "" // Domain of where your Matterbridge instance is hosted. // - // Default: "localhost" sm_sourcebridge_host "localhost" // Define whether Sourcebridge should print incoming messages. // - // Default: "1" sm_sourcebridge_incoming "1" // Define whether Sourcebridge should send server chat messages. // - // Default: "1" sm_sourcebridge_outgoing "1" // Define whether the plugin should add a zero-width space after the @ sign in the messages. // - // Default: "1" sm_sourcebridge_outgoing_chat_zwsp_at "1" // Define whether the plugin should output the map name at the start of the game. // - // Default: "0" sm_sourcebridge_outgoing_display_map "0" // Define whether the plugin should output join messages. // - // Default: "1" sm_sourcebridge_outgoing_join "1" // Define whether the plugin should output leave messages. // - // Default: "1" sm_sourcebridge_outgoing_quit "1" // URL pointing to the avatar system messages should use. It takes effect after restart. // - // Default: "" sm_sourcebridge_outgoing_system_avatar "" // The name of system messages whenever they get send to the Matterbridge instance (join/leaves, kills, etc). It takes effect after restart. // - // Default: "Server" sm_sourcebridge_outgoing_system_name "Server" // Port on where your Matterbridge instance is running. // - // Default: "1337" sm_sourcebridge_port "1337" // Protocol of your Matterbridge instance. (http/https) // - // Default: "http" sm_sourcebridge_protocol "http" // Define how much Sourcebridge should wait before querying new incoming messages. It takes effect after restart. // - // Default: "3" sm_sourcebridge_retry_delay "3" // Token for Steam API queries. Required for player avatars. // - // Default: "" sm_sourcebridge_steam_token "" // Token of your Matterbridge gateway. // - // Default: "" sm_sourcebridge_token ""

    Change Log
    • 0.9.2 BETA
      • Request handles are no longer freed. Fixes an error in the plugin.
    • 0.9.1 BETA
      • Bots no longer trigger join/leave messages
    • 0.9 BETA
      • Public Beta Release

    Credits
    • 42wim
      Main developer of Matterbridge.
    • Michael Wieland
      His MatterBukkit plugin for Minecraft inspired me to create MatterAMXX and this.
    Attached Files
    File Type: sp Get Plugin or Get Source (sourcebridge.sp - 99 views - 14.2 KB)
    __________________

    Last edited by gabuch2; 05-24-2022 at 09:20. Reason: 0.9.1 BETA released
    gabuch2 is offline
    gabuch2
    AlliedModders Donor
    Join Date: Mar 2011
    Location: Chile
    Old 05-23-2022 , 23:51   Re: Sourcebridge (BETA)
    Reply With Quote #2

    Reserved for future use.

    This is my first Sourcemod plugin!
    __________________
    gabuch2 is offline
    gabuch2
    AlliedModders Donor
    Join Date: Mar 2011
    Location: Chile
    Old 05-24-2022 , 00:20   Re: [ANY] Sourcebridge (BETA)
    Reply With Quote #3

    0.9.1 BETA released A.K.A. how could I forget about bots?
    • 0.9.1 BETA
      • Bots no longer trigger join/leave messages
    __________________
    gabuch2 is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 05-24-2022 , 03:11   Re: [ANY] Sourcebridge (BETA)
    Reply With Quote #4

    Sexy
    Drixevel is offline
    AuricYoutube
    Senior Member
    Join Date: Aug 2016
    Location: Here
    Old 05-24-2022 , 06:44   Re: [ANY] Sourcebridge (BETA)
    Reply With Quote #5

    I am getting handle invalid errors.

    Quote:
    L 05/24/2022 - 14:42:08: [SM] [1] Line 141, C:\sourcemod-1.10.0-git6528-windows\addons\sourcemod\scripting\sourcebrid ge.sp::ReadMessagesFromBridge
    L 05/24/2022 - 14:42:09: [SM] Exception reported: Handle fb8b0c03 is invalid (error 3)
    L 05/24/2022 - 14:42:09: [SM] Blaming: sourcebridge.smx
    L 05/24/2022 - 14:42:09: [SM] Call stack trace:
    L 05/24/2022 - 14:42:09: [SM] [0] CloseHandle
    L 05/24/2022 - 14:42:09: [SM] [1] Line 141, C:\sourcemod-1.10.0-git6528-windows\addons\sourcemod\scripting\sourcebrid ge.sp::ReadMessagesFromBridge
    Edit: I am on CSGO.

    Last edited by AuricYoutube; 05-24-2022 at 06:46. Reason: Forgot to mention game in case it is important.
    AuricYoutube is offline
    gabuch2
    AlliedModders Donor
    Join Date: Mar 2011
    Location: Chile
    Old 05-24-2022 , 09:20   Re: [ANY] Sourcebridge (BETA)
    Reply With Quote #6

    Quote:
    Originally Posted by AuricYoutube View Post
    I am getting handle invalid errors.



    Edit: I am on CSGO.
    Looks like deleting the HTTP handle wasn't needed after all!
    • 0.9.2 BETA
      • Request handles are no longer freed. Fixes an error in the plugin.
    __________________
    gabuch2 is offline
    eyal282
    Veteran Member
    Join Date: Aug 2011
    Old 05-24-2022 , 09:29   Re: [ANY] Sourcebridge (BETA)
    Reply With Quote #7

    Can this thing be used to relay SQLite Bans from one server to the other without MySQL?

    Some servers cannot get a MySQL to themselves without a price.
    __________________
    I am available to make plugins for pay.

    Discord: Eyal282#1334
    eyal282 is offline
    mrmiki
    Junior Member
    Join Date: Mar 2021
    Old 05-24-2022 , 10:41   Re: [ANY] Sourcebridge (BETA)
    Reply With Quote #8

    Quote:
    Originally Posted by eyal282 View Post
    Can this thing be used to relay SQLite Bans from one server to the other without MySQL?

    Some servers cannot get a MySQL to themselves without a price.



    im using rcon with your plugin to add ban on other servers
    mrmiki is offline
    gabuch2
    AlliedModders Donor
    Join Date: Mar 2011
    Location: Chile
    Old 05-24-2022 , 11:11   Re: [ANY] Sourcebridge (BETA)
    Reply With Quote #9

    Quote:
    Originally Posted by eyal282 View Post
    Can this thing be used to relay SQLite Bans from one server to the other without MySQL?

    Some servers cannot get a MySQL to themselves without a price.
    I'm afraid that's out of the scope of this project.

    While in MatterAMXX (AMX Mod X's counterpart of this plugin) is possible for other plugins to interact with it via API, I don't think it would be convenient to relay bans via chat. Besides you would still need to host a Matterbridge instance.

    Adding an API to Sourcebridge is part of the roadmap.
    __________________

    Last edited by gabuch2; 05-24-2022 at 11:11.
    gabuch2 is offline
    AuricYoutube
    Senior Member
    Join Date: Aug 2016
    Location: Here
    Old 05-26-2022 , 08:32   Re: [ANY] Sourcebridge (BETA)
    Reply With Quote #10

    Suggestion: add cvar to not send messages that start with ! from game
    AuricYoutube 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 01:51.


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