Raised This Month: $ Target: $400
 0% 

allow only few ip's to enter (lan)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mercury
Member
Join Date: Jun 2004
Old 02-12-2006 , 15:27   allow only few ip's to enter (lan)
Reply With Quote #1

can anybody show some examples (or links) on how to allow access for only a few ip ranges.

for example:
123.x.x.x
125.x.x.x
130.x.x.x

thanks in advance!
mercury is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 02-12-2006 , 21:13  
Reply With Quote #2

Search for I LOVE LAN or something like that by XxAvalanchexX
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 02-13-2006 , 02:00  
Reply With Quote #3

sv_lan 1
__________________
Um, hi.
Ramono is offline
mercury
Member
Join Date: Jun 2004
Old 02-13-2006 , 06:47  
Reply With Quote #4

Ramono, see example.

Suicid3, thank you. That's what i needed. I've modified it somewhat to suit my needs. Much thanks and (c) goes to Avalanche and his work.

Code:
/* AMX Mod Script * * AMXX I LOVE LAN by Avalanche * modified by mercury * */ #include <amxmodx> #include <cstrike> // filename of IP Access list #define FILENAME "addons/amxmodx/configs/ipaccess.ini" // set up some groundrules public plugin_natives() { set_module_filter("module_filter"); set_native_filter("native_filter"); } // load the battering ram! public plugin_init() { register_plugin("I LOVE LAN","0.20a","Avalanche"); } // don't load cstrike unless we need to public module_filter(const module[]) { if(equali(module,"cstrike")) {     return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } // I actually don't understand what I'm doing here, // I just copied and pasted from 1.60 plmenu.sma public native_filter(const name[], index, trap) { if (!trap) {     return PLUGIN_HANDLED; } return PLUGIN_CONTINUE; } // zomg someone is connecting public client_authorized(id) { // checking if(!is_user_LAN(id)) {         server_cmd("kick #%i [AMXX] Sorry, you are not in access list",get_user_userid(id)); } } // see if this player is in IP Access list public bool:is_user_LAN(id) { new ip[32]; get_user_ip(id,ip,31,0); new line, text[64], txtlen; while( (line = read_file(FILENAME,line,text,63,txtlen)) != 0 ) {     trim(text);     if( equali(ip,text,strlen(text)) ) {         return true;     } } return false; }
mercury is offline
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 02-13-2006 , 09:55  
Reply With Quote #5

Isn't it just possible to put everyone you want in the users.ini list without any flags,
and set in amxx.cfg not to allow anyone who isn't on the list?
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
mercury
Member
Join Date: Jun 2004
Old 07-15-2006 , 03:42   Re: allow only few ip's to enter (lan)
Reply With Quote #6

MaximusBrood
you should register each player then (add to users.ini)
additionaly they can't change their names without admin's help
__________________
mercury is offline
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 07-15-2006 , 21:33   Re: allow only few ip's to enter (lan)
Reply With Quote #7

Quote:
additionaly they can't change their names without admin's help
users.ini takes steamid, playername, and ip adresses...
__________________
Quote:
toe3_ left the chat room. (G-lined (AUTO Excessive connections from a single host.))
TheNewt is offline
mercury
Member
Join Date: Jun 2004
Old 07-16-2006 , 04:53   Re: allow only few ip's to enter (lan)
Reply With Quote #8

Quote:
Originally Posted by MysticDeath
users.ini takes steamid, playername, and ip adresses...
it assumes LAN, so steam not always work, ip adress can hold more than 1 player at a time (let's say some offices).
__________________
mercury is offline
TheNewt
Donor
Join Date: Jun 2006
Location: Where I live.
Old 07-16-2006 , 05:14   Re: allow only few ip's to enter (lan)
Reply With Quote #9

Or my household, anything behind a router I think.
__________________
Quote:
toe3_ left the chat room. (G-lined (AUTO Excessive connections from a single host.))
TheNewt 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 09:56.


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