Whats wrong here?
#1

Код:
irccmd_bans(conn, channel[], user[], params[])
{
  #pragma unused conn,channel,user
  	new string[200],list;
	if(!strlen(params)) return IrcSay("USAGE: !bans <ip>");
	if(!ircIsOp(conn,channel,user)) return IrcSay(""IRC_AUTH_MSG"");
 	new File:myFilez = fopen("badips.txt", io_read);
	if(myFilez)
    {
    while(fread(myFilez, string, sizeof(string)))
    {
      if(strcmp(params,string, true) == 0)
      {
        list++;
       }
    }

		if(list == 0)
		  {
	  	  format(string,sizeof(string),"3 The Server has found no bans for the ip '%s'",params);
	      IrcSay(string);
		  }
		  else
		  {
		  format(string,sizeof(string),"3 The Server has found %d bans for the ip '%s'",list,params);
	      IrcSay(string);
		  }

    fclose(myFilez);
  }
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)