Giter VIP home page Giter VIP logo

serverredirect's Introduction

Counter-Strike 2 support

Since the release of CS2, this project would no longer be maintained and is archived.

ServerRedirect

SourceMod plugin that allows players to see and connect to other servers.

About

This plugin provides servers list menu, where you can add your servers, so players can be redirected to them while being on server. You can redirect to any server you'd like, servers you redirect to doesn't require any fixes installed or anything like that. Also this plugin comes with A2S queries, but to actually use it you would need an optional requirement (see Requirements), after that you'll see real time statistics for every server you added. This plugin also provides some api (addons/sourcemod/scripting/include/server_redirect.inc) that you can use for your needs.

Configuration

To add servers to servers menu use addons/sourcemod/configs/server_redirect.cfg file and add servers you'd like by following the description. After that take a look at convar file created after first plugin launch (cfg/sourcemod/plugin.server_redirect.cfg) and configure it to your liking by following provided description.

Note: If you don't see your servers in servers menu, make sure that config file in the right place under right name (addons/sourcemod/configs/server_redirect.cfg) and is configured properly.

Requirements

Special thanks

Screenshots

Note: All servers were taken from server browser and selection was totaly random.

Servers list menu:

screen1

Server info menu (Shown when you chose server):

screen2

Server ad:

screen3

serverredirect's People

Contributors

blueberryy avatar fedemahf avatar gammacase avatar lubricantjam avatar max1musy avatar p3net avatar vieuxgnome 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

serverredirect's Issues

Wrong filepath in README.md

I think the filepath should be: "addons/sourcemod/configs/server_redirect.cfg", not: "sourcemod/addons/configs/server_redirect.cfg" as currently mentioned.

Best,
introzen

Some errors

For some reason one of my servers throwing out these errors and plugin doesn't work there.
What could be the reason?

L 04/03/2020 - 09:00:40: [SM] Exception reported: Array index out-of-bounds (index -1, limit 32) L 04/03/2020 - 09:00:40: [SM] Blaming: server_redirect.smx L 04/03/2020 - 09:00:40: [SM] Call stack trace: L 04/03/2020 - 09:00:40: [SM] [1] Line 61, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::ServerEntry::CutIp L 04/03/2020 - 09:00:40: [SM] [2] Line 371, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::UpdateServersData L 04/03/2020 - 09:00:40: [SM] [3] Line 541, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::SM_Servers

Improvements function Display Name

It would be possible that even with the socket.ext extension installed on the server we can configure a display name for the server.

//	Server display name to show in menu
//	This will be used if there's no connection
//	to server, or if you have no socket.ext installed
//	"display_name"	"Server #1"

I have the socket.ext extension installed on my servers, but I would still like to configure a display name instead of using the server's hostname.

[Improvement] IP Alias

Id like to suggest an improvement, in some cases (like mine) servers would communicate with each other locally in network, that would cause problems when an external client try to redirect cause plugin will redirect the client with local ip (192.168.1.x for example) what will obviously result in a timeout connection, my solution involves implementing an alias in cfg file so if the admin want to put local ip for the server be able to see the others in the same local network and put an alias ip for the plugin redirect players with the public ip address.

Server_Redirect.zip

Problem with running

Hey, I commented already closed issue, and this is new one, i cannot run plugin, also get this message in server console:

L 03/28/2020 - 13:22:23: World triggered "Round_Start" L 03/28/2020 - 13:22:23: [SM] Exception reported: Array index out-of-bounds (index -1, limit 32) L 03/28/2020 - 13:22:23: [SM] Blaming: server_redirect.smx L 03/28/2020 - 13:22:23: [SM] Call stack trace: L 03/28/2020 - 13:22:23: [SM] [1] Line 61, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::ServerEntry::CutIp L 03/28/2020 - 13:22:23: [SM] [2] Line 371, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::UpdateServersData L 03/28/2020 - 13:22:23: [SM] [3] Line 311, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::OnConfigsExecuted

[Suggestion] Add automated chat display

Add a customizable automated message that shows in chat every x amount of minutes that shows other server names and how many players are on that server and the ability to only display the chat message if there is x amount of players on the server

Socket is not optional as stated in readme

Tried to build server_redirect.sp and it fatal fails with reason:

server_redirect.sp(7) : fatal error 183: cannot read from file: "socket"

I'm assuming, socket is not optional anymore? Or am I doing something wrong?

map info

Please add map info to advertisement in chat and in the !servers menu

Map is the most important part about changing server.

In the menu it could look like [64/64] de_dust2 [SERVER NAME]

Same with chat, instead of showing IP in the chat you could show the current map.

IP is irrelevant...

server_redirect/net.sp(91) : error 139: could not find type "GameData"

We use SourceMod 1.10.0.6455 and get this error while compiling server_redirect.sp:

server_redirect/net.sp(91) : error 139: could not find type "GameData"
server_redirect/net.sp(96) : error 104: cannot find any methods for int
server_redirect/net.sp(96) : warning 206: redundant test: constant expression is non-zero
server_redirect/net.sp(96) : error 029: invalid expression, assumed zero
server_redirect/net.sp(96) : error 029: invalid expression, assumed zero
server_redirect/net.sp(96) : fatal error 190: too many error messages on one line

All requirements seems to fit:

Client is not connected

last version

L 04/15/2020 - 20:07:35: [SM] Exception reported: Client 14 is not connected
L 04/15/2020 - 20:07:35: [SM] Blaming: redirect/server_redirect.smx
L 04/15/2020 - 20:07:35: [SM] Call stack trace:
L 04/15/2020 - 20:07:35: [SM] [0] GetClientUserId
L 04/15/2020 - 20:07:35: [SM] [1] Line 806, C:\Users\September-PC\Desktop\COMPILE 1.10\server_redirect.sp::ServerInfo_Menu

Crash on query?

Is it possible to stop the plugin crashing when the server it's trying to query is down ("failed to create socket") it gets rather annoying having to reload the plugin if I restart 1 server as the other is about to query it.

Plugin cannot start

Hey, after compilling last build i got this error:

L 04/30/2020 - 13:55:21: [SM] Blaming: server_redirect.smx
L 04/30/2020 - 13:55:21: [SM] Call stack trace:
L 04/30/2020 - 13:55:21: [SM]   [0] ThrowError
L 04/30/2020 - 13:55:21: [SM]   [1] Line 62, C:\BasicPawn\LAST COMPILLER\include\glib/convarutils.inc::FillConVarFile
L 04/30/2020 - 13:55:21: [SM]   [2] Line 48, C:\BasicPawn\LAST COMPILLER\include\glib/convarutils.inc::AutoExecConfigCustom
L 04/30/2020 - 13:55:21: [SM]   [3] Line 179, C:\BasicPawn\LAST COMPILLER\server_redirect.sp::OnPluginStart
L 04/30/2020 - 13:55:21: [SM] Unable to load plugin "server_redirect.smx": Error detected in plugin startup (see error logs)

how to fix that error for reason

L 01/28/2022 - 11:10:53: Info (map "de_mirage") (file "C:\steamcmd\csgo2\csgo\addons\sourcemod\logs\errors_20220128.log")
L 01/28/2022 - 11:10:53: [gv.smx] Can't add reason: , because its smaller than 3 letters. (LINE: 5)
L 01/28/2022 - 11:10:54: [server_redirect.smx] [Server Redirect] Failed to get ip for section "[ANH EM YEN BAI] PUBLIC 5v5 #1 [!ws !dao !gang !sticker]" skipping.

Well how can i fix this

A2S_INFO challenge

Hi!
After last CSGO update, A2S_INFO now requires challenge if server is using host_info_show 2. Could you fix this?

Confirmation Box

It would be helpful and nice to see an option to for a confirmation once you press 'Connect' - this is brand new behavior for players and they are likely to be caught off guard instantly connecting to another server.

Suggestions

Main "issue" I see with this plugin is that you cant see the map in the first serverlist menu. That extra click to find a server with a map u like is kinda annoying for the players.

Let's say I have 10 DM servers with rotating mapcycle or mapvote. If a player wants to play D2, he might need to click like 10 times before finding a server running D2.

I would wanna see shorter server names and less symbols to make room for mapnames (stripping out workshop/xxxx/ from the mapnames also to save room when using workshop.

Also: Mysql support with different tables. Like If I have 10 DM servers and 10 retakes servers, I might only wanna show retake servers on retake servers etc. And/or maybe having categories in the serverlist (also adds extra clicks tho..) Another idea would be to have different commands for different categories, for example !dmservers, !retakeservers, !kzservers etc.

Also: Some timer advertisement in chat showing servername, players/maps and the command to open the menu.

Servers_Menu broken after recent update

After a recent CSGO update the plugin is having issues displaying servers in the menu. (See screenshots below).

Error log:
L 11/23/2021 - 15:19:26: [SM] Exception reported: Client 13 is not connected
L 11/23/2021 - 15:19:26: [SM] Blaming: server_redirect.smx
L 11/23/2021 - 15:19:26: [SM] Call stack trace:
L 11/23/2021 - 15:19:26: [SM] [0] GetClientUserId
L 11/23/2021 - 15:19:26: [SM] [1] Line 604, server_redirect.sp::Servers_Menu
L 11/23/2021 - 15:19:27: Error log file session closed.

This is the only error I can find in the logs pertaining the server_redirect plugin.

aim_deagle_simpsons_gw0000
aim_deagle_simpsons_gw0002

Your plugin is used heavily in ours servers @ mygloveworks.com
Thanks so much for creating this amazing feature inside of CSGO!

Error `Can't get response from "XX.XXX.XX:XXXXX", socket timed out`

I'm getting the following errors on my servers:

L 09/16/2023 - 18:39:03: [server_redirect.smx] [Server Redirect] Can't get response from "XX.XXX.XX:XXXXX", socket timed out.

L 09/16/2023 - 18:39:03: [server_redirect.smx] [Server Redirect] Can't get response from "XX.XXX.XX:XXXXX", socket timed out.

L 09/16/2023 - 18:39:03: [server_redirect.smx] [Server Redirect] Can't get response from "XX.XXX.XX:XXXXX", socket timed out.

L 09/16/2023 - 18:39:03: [server_redirect.smx] [Server Redirect] Can't get response from "XX.XXX.XX:XXXXX", socket timed out.

L 09/16/2023 - 18:39:03: [server_redirect.smx] [Server Redirect] Can't get response from "XX.XXX.XX:XXXXX", socket timed out.

error after update csgo

L 04/17/2020 - 12:01:02: [SM] Exception reported: [Server Redirect] Failed to create socket (13F6099C). [ip: 188.68.252.62:27016, errType: 6, errNum: 111]
L 04/17/2020 - 12:01:02: [SM] Blaming: server_redirect.smx
L 04/17/2020 - 12:01:02: [SM] Call stack trace:
L 04/17/2020 - 12:01:02: [SM] [0] SetFailState
L 04/17/2020 - 12:01:02: [SM] [1] Line 979, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::SocketCreate_Error
L 04/17/2020 - 12:01:10: SourceMod error session started

Custom commands

Adding custom commands not work:
server_redirect_commands "sm_servers;sm_serv;sm_project;sm_list;sm_lis ta;sm_serwery;"
When I type !lista or sm_lista nothing happens.

Add non ipv4 ip variations

Right now only ipv4 ip representation is supported, but from what I see it's possible to remove that restriction.

Follow Command

Ability to see when a user hops to another server for example "Lubricant Jam has hopped to Arena #1, type !follow to join them". Would encourage people to hop servers with people.

IP is not considered valid if it's a domain name

Hello,

Since the latest update, the plugin won't load because it considers that my IP is invalid. I suspect that this is because I use a domain name instead of an actual IP adress.
Can you please remove this verification in your next release?

Thanks in advance!

PS: Here is my config:

"Servers"
{
  "server1"
	{
	"ip"			"cs.tensor.fr:27015"
  "display_name"	"AWP_LEGO_ONLY n°1"
  }
  "server2"
  {
  "ip"			"cs.tensor.fr:27065"
  "display_name"	"AWP_LEGO_ONLY n°2"
  }
}

StringMap.size.get error

hi i get this error what is that related with?

L 07/04/2020 - 17:54:33: [SM] Exception reported: Invalid Handle 0 (error 4)
L 07/04/2020 - 17:54:33: [SM] Blaming: server_redirect_core.smx
L 07/04/2020 - 17:54:33: [SM] Call stack trace:
L 07/04/2020 - 17:54:33: [SM]   [0] StringMap.Size.get
L 07/04/2020 - 17:54:33: [SM]   [1] Line 32, server_redirect/redirect.sp::ProcessConnectionlessPacket_Dhook

Компиляция плагина

Привет.
Загрузи socket.inc который ты используешь, так как видимо, у тебя он на новом синтаксисе.

Plugin not loading

L 05/15/2020 - 13:34:01: [SM] Exception reported: Can't find "CBaseServer::ProcessConnectionlessPacket" signature.
L 05/15/2020 - 13:34:01: [SM] Blaming: server_redirect.smx
L 05/15/2020 - 13:34:01: [SM] Call stack trace:
L 05/15/2020 - 13:34:01: [SM] [0] SetFailState
L 05/15/2020 - 13:34:01: [SM] [1] Line 24, server_redirect/redirect.sp::SetupDhooks
L 05/15/2020 - 13:34:01: [SM] [2] Line 184, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::OnPluginStart
L 05/15/2020 - 13:34:01: [SM] [4] ServerCommandEx
L 05/15/2020 - 13:34:01: [SM] [5] Line 402, D:\builds\build-sourcemod-msvc12\windows-1.10\build\plugins\basecommands.sp::Command_Rcon

L 05/15/2020 - 13:19:18: [SM] Exception reported: [Server Redirect] Failed to create socket (F88F0D50). [ip: 202.153.221.96:27016, errType: 6, errNum: 10061]
L 05/15/2020 - 13:19:18: [SM] Blaming: server_redirect.smx
L 05/15/2020 - 13:19:18: [SM] Call stack trace:
L 05/15/2020 - 13:19:18: [SM] [0] SetFailState
L 05/15/2020 - 13:19:18: [SM] [1] Line 979, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::SocketCreate_Error
L 05/15/2020 - 13:19:59: [SM] Exception reported: Can't find "CBaseServer::ProcessConnectionlessPacket" signature.
L 05/15/2020 - 13:19:59: [SM] Blaming: server_redirect.smx
L 05/15/2020 - 13:19:59: [SM] Call stack trace:
L 05/15/2020 - 13:19:59: [SM] [0] SetFailState
L 05/15/2020 - 13:19:59: [SM] [1] Line 24, server_redirect/redirect.sp::SetupDhooks
L 05/15/2020 - 13:19:59: [SM] [2] Line 184, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::OnPluginStart
L 05/15/2020 - 13:19:59: [SM] [4] ServerCommandEx
L 05/15/2020 - 13:19:59: [SM] [5] Line 402, D:\builds\build-sourcemod-msvc12\windows-1.10\build\plugins\basecommands.sp::Command_Rcon

Add gamedata for CS:S

Currently, the gamedata only supports offsets for CS:GO. It would be great to add support for CS:S as well as other Source games.

Exception reported: Client 21 is not connected

L 05/05/2020 - 15:27:20: [SM] Exception reported: Client 21 is not connected
L 05/05/2020 - 15:27:20: [SM] Blaming: server_redirect.smx
L 05/05/2020 - 15:27:20: [SM] Call stack trace:
L 05/05/2020 - 15:27:20: [SM] [0] GetClientUserId
L 05/05/2020 - 15:27:20: [SM] [1] Line 800, D:\Utilites\SteamCMD\aimservcsgo\csgo\addons\sourcemod\scripting\server_redirect.sp::ServerInfo_Menu

"Server redirect" (1.1.0) by GAMMA CASE

Unable To Create Socket

server_redirect.smx (Server redirect): [Server Redirect] Failed to create socket (F7B10B8F). [ip: IP:PORT, errType: 4, errNum: 1]
image

Add possibility to filter out common player names (gotvs, replay bots etc)

There's no actual 100% identification method to tell if the player is a bot/gotv or a an actual player, but it's still possible to deduce it from its playername in most cases (Although that also may lead to false positives which is a tradeoff in here). I wasn't really sure if I'd like having that built in, but I've got a few reports already, so I guess having some system to let server operators to filter player names they don't like to see would be nice to have.

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.