IRC Echobot Query command
#1

Well, it's hard to describe the whole question in a few words (that's why the heading sux)
Ok, is it possible to create a command which let the echobot query a user on IRC?

Example:
"<~Razor[MM]> !talkto XYZ i love cookies!"
Then the bot shall query the user XYZ and send him the message "i love cookies"!
I already tried it like that:
Код:
IRCCMD:talkto(botid, channel[], user[], host[], params[])
{
	IRC_Say(botid, "/msg %s %s",params[1], params[2]);
	return true;
}
But it fails.

Is there any way to get it working?
Reply
#2

Im not familiar with your command system your using so I cant correct you on that, but i find this interesting:

Код:
IRC_Say(botid, "/msg %s %s",params[1], params[2]);
Try:

Код:
new string[128];
format(string, sizeof(string), "/msg %s %s", params[1], parans[2]);
IRC)_Say(botid, string);
Reply
#3

Doesn't work :/
Reply
#4

Check for a IRC command named: SendCommand

and you cant use your param[1], [2], etc, system, that only works for decimals, you would have to use the split function or sscanf
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)