22.05.2016, 13:26
PHP код:
IRCCMD:checkip(botid, channel[], user[], host[], params[])
{
if(!IsEchoChannel(channel)) return iNotice( user, IRC_WRONG_CHANNEL);
new query[128],temp_username[35],temp_ip[40],string[128];
if(sscanf(params, "s", temp_ip)) return iEchoUse("!checkip [ IP ADRESS ]");
format(query,sizeof(query),"SELECT * FROM user WHERE regip ='%s'",temp_ip);
mysql_function_query(dbhandle,query,true,"","");
cache_get_field_content(0,"username",temp_username);
format(string,sizeof(string),"%s",temp_username);
iEcho(string);
return 1;
}
When i do !checkip 127.0.0.1, nothing happends.
(127.0.0.1 is registered to 2 users in the db)