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

Fully Threaded Server Redirect


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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, 1941 views)
    File Type: sp Get Plugin or Get Source (serverredirect.sp - 3395 views - 15.1 KB)
    __________________

    Last edited by bottiger; 08-24-2011 at 20:30.
    bottiger is offline
     



    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 08:31.


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