28.02.2010, 16:41
Today i found out my ban system has a problem. 
So im turning to this forum for help, i cant think of anyway to fix this.
I have a system where all bans are put into a file /scriptfiles/config/bans.txt
But if i go ingame and lookup a ban, it wont give me the right stuff..
Heres the format for the bans in the bans.txt file:
Thanks to anybody that can help

So im turning to this forum for help, i cant think of anyway to fix this.
I have a system where all bans are put into a file /scriptfiles/config/bans.txt
But if i go ingame and lookup a ban, it wont give me the right stuff..
Heres the format for the bans in the bans.txt file:
Quote:
|
Name - IP - Reason |
Код:
IRCCMD:lookupban(botid, channel[], user[], host[], params[])
{
new tmp[25],Index;
tmp = strtok(params,Index);
new File:msg = fopen("/config/bans.txt",io_read);
new st[80],string[158];
if(!fexist("/config/bans.txt")) return IrcSay("* Sorry, cannot find the Bans file.");
while(fread(msg,st,sizeof st))
{
if(strfind(st,params,false,0))
{
return IrcSay(st);
}
}
fclose(msg);
return 1;
}


