irc bot problem
#1

Код:
IRCCMD:say(botid, channel[], user[], host[], params[])
{
	// Check if the user has at least voice in the channel
	if (IRC_IsVoice(botid, channel, user))
	{
		// Check if the user entered any text
		if (!isnull(params))
		{
			// Echo the formatted message
			new msg[112];
		 	format(msg,sizeof(msg), "%s on IRC %s", user, params);
			SendClientMessageToAll(RED, msg);
			format(msg, sizeof(msg),"%s on IRC %s", user, params);
			Say(channel,msg);
		}
	}
	return 1;
}
i am using 2 irc bots but when i use any irc command 2 of the bots do it This means the messages get repeated two times. Any idea how I fix this?

Код:
15:01] <@bot[1]> RapisteR on IRC hi
[15:01] <@bot[2]> RapisteR on IRC hi
Reply
#2

I fixed his problem
Reply
#3

Try it like this
Код:
 IRCCMD:say(botid, channel[], user[], host[], params[])
{
	// Check if the user has at least voice in the channel
	if (IRC_IsVoice(botid, channel, user))
	{
		// Check if the user entered any text
		if (!isnull(params))
		{
			// Echo the formatted message
			new msg[112];
			SendClientMessageToAll(RED, msg);
			format(msg, sizeof(msg),"%s on IRC %s", user, params);
			Say(channel,msg);
		}
	}
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)