Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add banners & discord configs and send through query #831

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

AmyrAhmady
Copy link
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
Copy link
Contributor

edgyaf commented Jan 4, 2024

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

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

@Y-Less
Copy link
Collaborator

Y-Less commented Jan 4, 2024

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
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
Server/Components/LegacyNetwork/Query/query.cpp Outdated Show resolved Hide resolved
@Hual
Copy link
Collaborator

Hual commented Jan 6, 2024

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
Copy link
Collaborator

Y-Less commented Jan 6, 2024

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
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
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
14 checks passed
@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