Custom Ban Help
#1

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:
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;
}
Thanks to anybody that can help
Reply
#2

help

its been over 12 hrs

Reply
#3

Yes, i mean irc.

heres what happens when i try it:

Код:
!lookupban Test
[ADR]Loukiinho - 79.72.*.* - money hacker and ip changer
It shouldnt be showing that ban, it only should be showing the ban that contains the name 'Test'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)