AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [Any] New IP Redirect (v1.1.0, 3-27-14) (https://forums.alliedmods.net/showthread.php?t=153769)

Bubka3 03-28-2011 21:59

[Any] New IP Redirect (v1.1.0, 3-27-14)
 
[Any] New IP Redirect (v1.1.0, 3-27-14)

Description: This plugin can be placed on your server to redirect players to your new server.

CVAR / Command List:
  • sm_redirect_newip - Set to your new IP. (Default 0.0.0.0)
  • sm_redirect_kicktimer - Seconds to kick after not leaving. (Default 120)
  • sm_redirect_showtimer - Seconds to show connection display box. (Default 120)
Installation: Place the newipredirect.smx into addons/sourcemod/plugins and the cvars into your server.cfg.

Reporting Issues
Please open a new issue for any bugs here. Please don't use this area for general support, that belongs in this thread.

Change Log:
v1.1.0, 3-27-14
* General clean up of plugin and post.
* Made kick message more understandable.
v1.0.1, 3-25-13
* Removed useless string (thanks Dr!fter).
* Updated to new website. :)
v1.0, 3-28-11
* Initial release.

Special Thanks:
Monkey, and twistedpanda. They helped me basically put this together. I have gotten a lot more advanced since that time.

Download the Plugin (newipredirect.smx)
View the Source (newipredirect.sp)

nightrider 03-30-2011 18:19

Re: [B3] New IP Redirect (v1.0, 3-28-11)
 
Interesting, thanks for sharing.

deathcurse 12-01-2011 12:15

Re: [B3] New IP Redirect (v1.0, 3-28-11)
 
Good plugin, helping us move players over to our new servers. :)

Thanks!

Dr!fter 12-28-2012 11:26

Re: [B3] New IP Redirect (v1.0, 3-28-11)
 
Nice plugin.

PHP Code:

public EventSpawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    
decl String:buffer[32];
    
GetConVarString(NewIPbuffersizeof(buffer));
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    new 
Float:time GetConVarFloat(STime); 
    new 
String:ip[32]; 
    
GetConVarString(NewIPipsizeof(ip));
    
DisplayAskConnectBox(clienttimeip);
    
PrintToChat(client"[SM] We have a new server at IP: %s"ip);
    
PrintToChat(client"[SM] Press F3 to connect to the new server.");
    
PrintToChat(client"[SM] If you do not connect, you will be kicked from this server.");


You declare buffer and set its value but never use it you then grab the same value but store it in ip so remove the buffer one. Other than that looks good and approved!

Bubka3 03-25-2013 00:41

Re: [B3] New IP Redirect (v1.0, 3-28-11)
 
Quote:

Originally Posted by Dr!fter (Post 1861923)
You declare buffer and set its value but never use it you then grab the same value but store it in ip so remove the buffer one. Other than that looks good and approved!

Whoops, might be 2 years late, but fixed.

Donski 04-13-2013 12:53

Re: [B3] New IP Redirect (v1.0.1, 3-25-13)
 
What if our server is not on the default port 27015? Will it use the same port or can we set it using the re_newip cvar (eg. 0.0.0.0:27016)?

Thanks!

Donski 04-13-2013 19:50

Re: [B3] New IP Redirect (v1.0.1, 3-25-13)
 
Hmm, it shows the notice but pressing F3 doesn't seem to do anything. F3 is binded to askconnect_accept. Any thoughts? :\

Also getting these errors:

Code:

L 04/14/2013 - 07:56:43: [SM] Native "CloseHandle" reported: Handle 1e300e3 is invalid (error 3)
L 04/14/2013 - 07:56:43: [SM] Displaying call stack trace for plugin "bub_redirect.smx":
L 04/14/2013 - 07:56:43: [SM]  [0]  Line 35, /home/groups/alliedmodders/forums/files/6/8/6/3/1/117612.attach::OnClientDisconnect()


me-Shoe 04-14-2013 08:53

Re: [B3] New IP Redirect (v1.0.1, 3-25-13)
 
Is this Plugin still up to date (protobuf and so) and approved with CS:GO?

vodka00 04-27-2013 14:04

Re: [B3] New IP Redirect (v1.0.1, 3-25-13)
 
Nice plugin. I think anyone with admin flag shouldn't get kicked.

narugo 05-24-2013 21:07

Re: [B3] New IP Redirect (v1.0.1, 3-25-13)
 
How to protect admins and bots, and set maxslots like redirector. smx or hreserved_slots?

I liked more this plugin because this function "re_stime" keep box asking to a new server.


All times are GMT -4. The time now is 01:30.

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