[DGD]access.deny

Lord Lerkista lerkista at hotmail.com
Tue Nov 28 14:42:10 CET 2000


Well i implement an access.deny that works!! =)

in user.c

--------

static void open(){
string archivo,*ips,ip,mensaje,a,a1,b,b1,c,c1,d,d1;
int i;
rlimits(MAXDEPTH;MAXTICKS){
timestamp=time();
echo=1;
set_this_player(player);
HNAME->request_ip_name(query_ip_number(player));
ip=query_ip_number(player);
archivo=read_file("/txt/access.deny");
if(archivo){
ips=explode(archivo,"\n");
for(i=0;i<sizeof(ips);i++){
if(sscanf(ips[i],"%s.%s.%s.%s:%s",a,b,c,d,mensaje)==5){
sscanf(ip,"%s.%s.%s.%s",a1,b1,c1,d1);
if(a==a1&&b==b1&&c==c1&&d==d1){player->catch_tell(mensaje+"\n");
call_out("destruye",1);return;}
if(a==a1&&b==b1&&c==c1&&d=="*"){player->catch_tell(mensaje+"\n");
call_out("destruye",1);return;}
if(a==a1&&b==b1&&c=="*"){player->catch_tell(mensaje+"\n");
call_out("destruye",1);return;}
if(a==a1&&b=="*"){player->catch_tell(mensaje+"\n");
call_out("destruye",1);return;}}}}
player->_F_call("logon");}}

destruye(){player=0;destruct(this_object());return 1;}

----------------

i have to use a call_out() because if i only use destruct(this_object()); it 
don't show the text!!

=)

_____________________________________________________________________________________
Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list