AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Fully Threaded Server Redirect (https://forums.alliedmods.net/showthread.php?t=150674)

bottiger 02-20-2011 04:58

Fully Threaded Server Redirect
 
5 Attachment(s)
Summary

This is a fully threaded version of Brainstorm's popular Server Redirect.
http://forums.alliedmods.net/showthread.php?p=736131

I had to fix it because if your database goes down or becomes unreachable, ALL YOUR SERVERS WILL FREEZE which is absolutely horrible and unusable in my opinion.

I was going to post it in the same thread, but I feel like I changed too much of it to be fully compatible.

How to install

Follow brainstorm's instructions except:
  • The default database used is default instead of serverredirect
  • Put your configurations in server.cfg instead of plugin.serverredirect.cfg (makes it possible to run multiple servers on 1 directory)
  • Or put "exec sourcemod/plugin.serverredirect" in server.cfg if you don't do the step above.


Changelog

  • Removed the unneeded include line.
  • Prevent players from submitting multiple requests before the first one finishes.
  • Fixed the database connection leak due to sourcemod bug.
  • Added a 5 second cache for player requests.
  • Fixed updates by putting quotes on the map name.
Differences
  • Fully Threaded.
  • Removed the ugly chat hook and turned it into a standard RegConsoleCmd.
  • Ripped out the translations because I am a 0-config kind of person and I was annoyed when I forgot to upload the translation file and I refused to change the map just to get it to reload.
  • Ripped out the natives because no one uses them anyway, and it would've taken me several more hours to thread those.
  • Bots count as taking up a slot.
  • Changed default database to "default"
  • Removed usage of config file at "plugin.serverredirect". It conflicts with running multiple servers with 1 directory.
TODO
  • Cancel the threaded query if a player logs off before it finishes. (I don't know how to do this)

namine 02-23-2011 20:29

Re: Fully Threaded Server Redirect
 
Where is the include file?

bottiger 02-24-2011 17:46

Re: Fully Threaded Server Redirect
 
Quote:

Originally Posted by namine (Post 1422439)
Where is the include file?

Ooops sorry. There's no need for the include file since I ripped out the natives.

The plugin source file is now updated to compile without it.

marvel 02-27-2011 19:04

Re: Fully Threaded Server Redirect
 
Awesome! First plugin like this that works for me on L4D2!

Btw the SQL script has the same 'bug' as the previous server redirect. It can't create the db so you have to remove the first 5 lines, then create the db yourself:

mysqladmin -u root -p create serverredirect

then import the script:

mysql -u root -p serverredirect < ./mysql_new_install.sql

Just for the people that run into problems :)

marvel 02-27-2011 19:08

Re: Fully Threaded Server Redirect
 
Btw one more request. Can you make it so that it doesn't show the current server you are playing on in the list? This can be confusing. Thanks

bottiger 02-27-2011 21:40

Re: Fully Threaded Server Redirect
 
Quote:

Originally Posted by marvel (Post 1425163)
Btw one more request. Can you make it so that it doesn't show the current server you are playing on in the list? This can be confusing. Thanks

That was already built-in.

Quote:

* sm_redirect_showcurrent - boolean, set false to hide the current server from the redirect window. Default: true.
Also the "sourcemod database name" is now "default" instead of "serverredirect" so be sure to take that into account.

marvel 02-27-2011 22:13

Re: Fully Threaded Server Redirect
 
Ah I missed that, thanks!

Zephyrus 03-06-2011 06:43

Re: Fully Threaded Server Redirect
 
what about ads?

marvel 03-06-2011 09:35

Re: Fully Threaded Server Redirect
 
Quote:

Originally Posted by Zephyrus (Post 1428662)
what about ads?

Use this?

http://forums.alliedmods.net/showthread.php?p=592536

Zephyrus 03-06-2011 10:05

Re: Fully Threaded Server Redirect
 
Quote:

Originally Posted by marvel (Post 1428787)

thank you, but isnt there something like the original plugin's ad system?


All times are GMT -4. The time now is 10:47.

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