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

I LOVE LAN


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   twistedeuphoria (82)
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-28-2005 , 14:29   I LOVE LAN
Reply With Quote #1

This was suggested by mtxd over four months ago, but no one ever created it. He finally bumped the topic and I wrote it, and he claims that it works, so I'm posting it here.

The target audience is admittedly small, as this plugin is used for people running a server that have a LAN. Basically, if the server is full and a LAN player is connecting, it boots the "worst" non-LAN player to make way for the LAN players.

This plugin does not work with any reserved slots plugin, but it's possible that I may recreate the reserved slots plugin inside of this plugin so that they can work together. As with the reserved slots plugin this uses a dummy slot, so increase your maxplayers by 1 if you have the ability to.

A user is determined to be on your LAN if the first x amount of ranges of his IP address match any of those listed in addons/amxmodx/data/lan.ini, which must be there for this plugin to run.

An example lan.ini would look like this:

Code:
10.0
217.147.10
217.147.20
Anyone with an IP of 10.0.*.*, 217.147.10.*, or 217.147.20.* would have precedence over someone without one.

Tada.
Attached Files
File Type: sma Get Plugin or Get Source (ilovelan.sma - 2228 views - 2.8 KB)
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS

Last edited by XxAvalanchexX; 01-06-2007 at 21:59.
XxAvalanchexX is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 09-28-2005 , 17:51  
Reply With Quote #2

yeah, saw this on suggestions board. Good job including a .ini, wouldnt have thought of that.

Tip: Normal lan IPs: 192.168.?.?
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-28-2005 , 20:14  
Reply With Quote #3

Okay. If you want that then add it to lan.ini
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
mtxd
Member
Join Date: Mar 2005
Location: Lithuania
Old 09-29-2005 , 02:26  
Reply With Quote #4

What about other ip ranges
http://forums.alliedmods.net/showthr...=158457#163760
mtxd is offline
mtxd
Member
Join Date: Mar 2005
Location: Lithuania
Old 09-29-2005 , 09:47  
Reply With Quote #5

Have just tested. 0.20 version works fine under AMXX 1.60 !
P.S. You should approve it.
mtxd is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-29-2005 , 13:46  
Reply With Quote #6

I just realized that with my code it doesn't matter how many ranges you have, it'll compare the line of the file to their IP (but limited to the length of the text).

So when their IP is "1.1.1.1" and the file says "21.22", it compares the first five characters of their IP to "21.22". So technically if you put "21.22.23" it will still work, because now it will compare the first eight characters of their IP.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
mtxd
Member
Join Date: Mar 2005
Location: Lithuania
Old 10-04-2005 , 04:46  
Reply With Quote #7

217.147.10 is also working fine.
mtxd is offline
knife108
New Member
Join Date: Oct 2007
Old 10-11-2007 , 01:47   Re: I LOVE LAN
Reply With Quote #8

my server command line is +maxplayers 26 and restart the server,

i saw maxvisibleplayer =26 ,and idk it should be 25 !
knife108 is offline
P4rD0nM3
Veteran Member
Join Date: Feb 2006
Old 10-11-2007 , 03:23   Re: I LOVE LAN
Reply With Quote #9

Oh my, thanks. Awesome!
P4rD0nM3 is offline
Lnet_Bugs
Junior Member
Join Date: Dec 2007
Location: Russia, Saint-Petersburg
Old 03-18-2009 , 09:13   Re: I LOVE LAN
Reply With Quote #10

can some1 combine this plugin with the adminslots reserving?
Lnet_Bugs is offline
Send a message via ICQ to Lnet_Bugs
Reply



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 06:13.


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