Raised This Month: $12 Target: $400
 3% 

Fully Threaded Server Redirect


Post New Thread Reply   
 
Thread Tools Display Modes
Author
bottiger
AlliedModders Donor
Join Date: Dec 2010
Plugin ID:
2233
Plugin Version:
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A fully threaded version of Brainstorm's Server Redirect (won't lock up your servers if the DB goes down!)
    Old 02-20-2011 , 04:58   Fully Threaded Server Redirect
    Reply With Quote #1

    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)
    Attached Files
    File Type: txt mysql_new_install.sql.txt (1.2 KB, 1939 views)
    File Type: sp Get Plugin or Get Source (serverredirect.sp - 3384 views - 15.1 KB)
    __________________

    Last edited by bottiger; 08-24-2011 at 20:30.
    bottiger is offline
    namine
    SourceMod Donor
    Join Date: Jul 2010
    Old 02-23-2011 , 20:29   Re: Fully Threaded Server Redirect
    Reply With Quote #2

    Where is the include file?
    __________________
    namine is offline
    bottiger
    AlliedModders Donor
    Join Date: Dec 2010
    Old 02-24-2011 , 17:46   Re: Fully Threaded Server Redirect
    Reply With Quote #3

    Quote:
    Originally Posted by namine View Post
    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.
    bottiger is offline
    marvel
    BANNED
    Join Date: Dec 2009
    Old 02-27-2011 , 19:04   Re: Fully Threaded Server Redirect
    Reply With Quote #4

    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 is offline
    marvel
    BANNED
    Join Date: Dec 2009
    Old 02-27-2011 , 19:08   Re: Fully Threaded Server Redirect
    Reply With Quote #5

    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
    marvel is offline
    bottiger
    AlliedModders Donor
    Join Date: Dec 2010
    Old 02-27-2011 , 21:40   Re: Fully Threaded Server Redirect
    Reply With Quote #6

    Quote:
    Originally Posted by marvel View Post
    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.
    __________________
    bottiger is offline
    marvel
    BANNED
    Join Date: Dec 2009
    Old 02-27-2011 , 22:13   Re: Fully Threaded Server Redirect
    Reply With Quote #7

    Ah I missed that, thanks!
    marvel is offline
    Zephyrus
    Cool Pig B)
    Join Date: Jun 2010
    Location: Hungary
    Old 03-06-2011 , 06:43   Re: Fully Threaded Server Redirect
    Reply With Quote #8

    what about ads?
    Zephyrus is offline
    marvel
    BANNED
    Join Date: Dec 2009
    Old 03-06-2011 , 09:35   Re: Fully Threaded Server Redirect
    Reply With Quote #9

    Quote:
    Originally Posted by Zephyrus View Post
    what about ads?
    Use this?

    http://forums.alliedmods.net/showthread.php?p=592536
    marvel is offline
    Zephyrus
    Cool Pig B)
    Join Date: Jun 2010
    Location: Hungary
    Old 03-06-2011 , 10:05   Re: Fully Threaded Server Redirect
    Reply With Quote #10

    Quote:
    Originally Posted by marvel View Post
    thank you, but isnt there something like the original plugin's ad system?
    Zephyrus 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:23.


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