Monthly Target: $400 Donations: $140
 35% 

[ANY] Anti server empty after restart


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Plugin ID:
3401
Plugin Version:
1.2
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    109 
    Plugin Description:
    Force retry for all clients on server restart and log the restart in a file
    Old 12-08-2012 , 13:49   [ANY] Anti server empty after restart
    Reply With Quote #1

    Description:

    Force retry for all clients on server restart, useful to not lose all players when it restarts.

    Quote:
    Originally Posted by ddhoward View Post
    Tested only on TF2, should work on other mods that support ClientCommand sending "retry".

    Running the command sm_retryandrestart will force all clients to retry, then after a 0.1 second pause, will run the _restart command. The action will be logged to the standard sourcemod log file with the admin's information.

    Running the command sm_retryandrestart 0 will cause a restart WITHOUT attempting to auto-reconnect clients. This action will be logged to the standard sourcemod log file with the admin's information.

    If the cvar sm_retryonrestart_enabled = 1, the plugin will still listen for the commands _restart or quit, and make an attempt to reconnect clients before shutting down. Setting the cvar to 0 will disable this functionality.

    Please note that it is IMPOSSIBLE to trigger a forced retry on clients upon server CRASH. The plugin only works if a restart was triggered intentionally through the server commands quit, _restart, or sm_retryonrestart.

    Credits:

    Advcommands ( https://forums.alliedmods.net/showthread.php?p=889397 ) for the code idea of sm_shutdown command
    I posted this plugin by a request



    Suggestions are welcome


    Donations (optional):

    If you apreciate my work, you can donate me via paypal or with a trade offer


    Download:

    Main repository
    Direct download
    Code changes
    __________________
    Veteran SM scripter -> Donations
    Taking paid requests -> Add me in Steam or Telegram

    I can help to large european communities for free.

    Last edited by Franc1sco; 12-26-2015 at 22:57.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    ericwilder
    Junior Member
    Join Date: Dec 2012
    Old 12-08-2012 , 16:05   Re: [ANY] Anti server empty after restart
    Reply With Quote #2

    not works in l4d2.

    Commencing connection retry to public(192.168.0.11:27015)
    FCVAR_SERVER_CAN_EXECUTE prevented server running command: connect
    ericwilder is offline
    doze
    Senior Member
    Join Date: Mar 2012
    Old 12-09-2012 , 02:51   Re: [ANY] Anti server empty after restart
    Reply With Quote #3

    Not working in hl2dm.
    doze is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 12-09-2012 , 06:35   Re: [ANY] Anti server empty after restart
    Reply With Quote #4

    Quote:
    Originally Posted by ericwilder View Post
    not works in l4d2.

    Commencing connection retry to public(192.168.0.11:27015)
    FCVAR_SERVER_CAN_EXECUTE prevented server running command: connect
    Quote:
    Originally Posted by doze View Post
    Not working in hl2dm.

    Working in CS:S and any game that can force executed "retry" on client.
    __________________
    Veteran SM scripter -> Donations
    Taking paid requests -> Add me in Steam or Telegram

    I can help to large european communities for free.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    Despirator
    Senior Member
    Join Date: Jun 2011
    Location: Kazakhstan ->Shymkent
    Old 12-09-2012 , 11:42   Re: [ANY] Anti server empty after restart
    Reply With Quote #5

    PHP Code:
    ReconnectClient

    Syntax
    :
    native ReconnectClient(client);

    Usage:
     
    client        The client index
    Notes
    :
    Reconnect a client without dropping the netchannel

    Return:
    No return.

    Version Added:
    1.4.0 
    Despirator is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 12-09-2012 , 11:59   Re: [ANY] Anti server empty after restart
    Reply With Quote #6

    Quote:
    Originally Posted by Despirator View Post
    PHP Code:
    ReconnectClient

    Syntax
    :
    native ReconnectClient(client);

    Usage:
     
    client        The client index
    Notes
    :
    Reconnect a client without dropping the netchannel

    Return:
    No return.

    Version Added:
    1.4.0 
    ok thanks but I just try it but always appear "Disconnect: Server shutting down." and no force to reconnect the client, however with "retry" on client he can reconnect
    __________________
    Veteran SM scripter -> Donations
    Taking paid requests -> Add me in Steam or Telegram

    I can help to large european communities for free.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    Dino Penis
    SourceMod Donor
    Join Date: Apr 2010
    Old 12-09-2012 , 22:46   Re: [ANY] Anti server empty after restart
    Reply With Quote #7

    I tried it on my Test server, and I don't quite get how it works. Does this go and make the clients type retry when the server is down? I'm trying this on CSS, and I don't think it works.
    Dino Penis is offline
    Franc1sco
    Veteran Member
    Join Date: Oct 2010
    Location: Spain (Madrid)
    Old 01-02-2013 , 02:26   Re: [ANY] Anti server empty after restart
    Reply With Quote #8

    Quote:
    Originally Posted by Dino Penis View Post
    I tried it on my Test server, and I don't quite get how it works. Does this go and make the clients type retry when the server is down? I'm trying this on CSS, and I don't think it works.
    The server must execute first "quit" or "_restart" command for this plugin works, if you restart the server killing the process ("quit" or "_restart" command not used) then the plugin will not work.


    The plugin is tested and works.
    __________________
    Veteran SM scripter -> Donations
    Taking paid requests -> Add me in Steam or Telegram

    I can help to large european communities for free.

    Last edited by Franc1sco; 01-02-2013 at 02:28.
    Franc1sco is offline
    Send a message via MSN to Franc1sco Send a message via Skype™ to Franc1sco
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Location: noitacoL:
    Old 01-02-2013 , 13:19   Re: [ANY] Anti server empty after restart
    Reply With Quote #9

    This probably wont work if you have any timers open, or anything that will delay the _restart command from shutting down.
    __________________
    Mitchell is offline
    C0nw0nk
    Senior Member
    Join Date: May 2011
    Location: United Kingdom
    Old 01-02-2013 , 13:31   Re: [ANY] Anti server empty after restart
    Reply With Quote #10

    Be useful if something like this could be implemented for crashes too.
    __________________
    C0nw0nk is offline
    Send a message via MSN to C0nw0nk
    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 23:37.


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