Skip to content

Add banners & discord configs and send through query - #831

Merged
AmyrAhmady merged 3 commits into
masterfrom
amir/omp-customs
Jan 11, 2024
Merged

AmyrAhmady merged 3 commits into
masterfrom
amir/omp-customs

Conversation

@AmyrAhmady

Copy link
Copy Markdown
Member

new configs are now available, example:

{
    "discord": "https://discord.gg/samp",
    "banner_light": "https://github.com/openmultiplayer/graphics/blob/master/rendered/wordmark-light-mono.png?raw=true",
    "banner_dark": "https://github.com/openmultiplayer/graphics/blob/master/rendered/wordmark-coloured.png?raw=true"
}

then with query o, instead of sending same receiving back, we send these.
max. banner url length is 120 chars.
max. discord url length is 50 chars.

@edgyaf

edgyaf commented Jan 4, 2024

Copy link
Copy Markdown
Contributor

discord connector already uses the discord section in config.json. would this by any chance cause a conflict?

"discord": {
    "bot_token": "MYBOTTOKEN"
}

@Y-Less

Y-Less commented Jan 4, 2024

Copy link
Copy Markdown
Collaborator

So obviously Discord is the chat program du-jour, but there are others, notably Telegram. It would be good if this was more generic, so you could specify some meta-data for any program - name, link, graphics, etc. Even an array of them. Rather than hard-coding to just one.

@AmyrAhmady

Copy link
Copy Markdown
Member Author

This is only to make it appear on launcher like this in bottombar if available
image

We do not have any design or space to put different social links there. Since this is for a gaming community, most of them already use discord, a gamers targeting platform, and it's the first go-to option for gaming communities. For any other social links players can just go to their websites (like facebook? why would we show a facebook link?), but for discord for players (gamers) it's now really an easy way to just access their discord.

Also we want to keep the packet as small as possible because query requests are not authenticated and tied to a player and anyone from anywhere can send a request. having big packet data can be a problem.

Hual
Hual previously requested changes Jan 5, 2024
@Hual

Hual commented Jan 6, 2024 •

Copy link
Copy Markdown
Collaborator

discord connector already uses the discord section in config.json. would this by any chance cause a conflict?

"discord": {
    "bot_token": "MYBOTTOKEN"
}

As long as the leaf properties are different it wouldn't

@Y-Less

Y-Less commented Jan 6, 2024

Copy link
Copy Markdown
Collaborator

We do not have any design or space to put different social links there. Since this is for a gaming community, most of them already use discord, a gamers targeting platform, and it's the first go-to option for gaming communities. For any other social

That's why I mentioned telegram. It and VK are still very popular alternatives in Russia and other places.

@AmyrAhmady

Copy link
Copy Markdown
Member Author

That's why I mentioned telegram. It and VK are still very popular alternatives in Russia and other places.

I'll do it in another PR, merging this one as of now

@AmyrAhmady

Copy link
Copy Markdown
Member Author

Current format for configs are:

{
    "discord": {
        "invite": "https://discord.gg/samp"
    },
    "banners": {
        "light": "https://github.com/openmultiplayer/graphics/blob/master/rendered/wordmark-inverse.png?raw=true",
        "dark": "https://github.com/openmultiplayer/graphics/blob/master/rendered/wordmark-inverse.png?raw=true"
    }
}

@AmyrAhmady
AmyrAhmady merged commit 25f8a91 into master Jan 11, 2024
@AmyrAhmady
AmyrAhmady deleted the amir/omp-customs branch January 11, 2024 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants