getip irc command
#1

Hello.
I have this command, but when i enter My_Name inside the command, nothing happends.
What did i do wrong?

PHP код:
forward GetIP(temp_name[]);
public 
GetIP(temp_name[])
{
    new 
num_rows,num_fields;
    
cache_get_data(num_rows,num_fields,dbhandle);
    if(
num_rows==0)
    {
    return 
iEchoUse("That name isn't found in our database!");
    }
    else
    {
    new 
string[420],temp_ip[35];
    
    
cache_get_field_content(0"regip"temp_ip);
    
format(string,sizeof(string),"%s's ip is %s",temp_name,temp_ip);
    
iEcho(string);
    }
    return 
true;

PHP код:
IRCCMD:getip(botidchannel[], user[], host[], params[])
{
if(!
IsEchoChannel(channel)) return iNoticeuserIRC_WRONG_CHANNEL);
new 
query[128],temp_name[35];
if(
sscanf(params"s"temp_name)) return iEchoUse("!getip [ Exact_Name ]");
format(query,sizeof(query),"SELECT * FROM user WHERE username ='%s'",temp_name);
mysql_function_query(dbhandle,query,true,"GetIp","s",temp_name);
return 
1;

Reply


Messages In This Thread
getip irc command - by justjamie - 23.05.2016, 14:30
Re: getip irc command - by justjamie - 23.05.2016, 14:33
Re: getip irc command - by Pavintharan - 23.05.2016, 14:33

Forum Jump:


Users browsing this thread: 2 Guest(s)