06.01.2017, 11:24
Quote:
Look all from this: IRCCMD
![]() Any code have (botid,channel[],user[],host[],params[]) gives these errors |
PHP код:
IRCCMD:say(botid, channel[], user[], host[], params[])
{
if (IRC_IsOwner(botid, channel, user))
{
// Check if the user entered any text
if (!isnull(params))
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "02Owner(%s) on IRC: %s", user, params);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "**Owner(%s): %s", user, params);
SendClientMessageToAll(COLOR_BLUE, msg);
}
return 1;
}
if (IRC_IsAdmin(botid, channel, user))
{
// Check if the user entered any text
if (!isnull(params))
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "02Manager(%s) on IRC: %s", user, params);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "**Manager(%s): %s", user, params);
SendClientMessageToAll(COLOR_BLUE, msg);
}
return 1;
}
if (IRC_IsOp(botid, channel, user))
{
// Check if the user entered any text
if (!isnull(params))
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "02Admin(%s) on IRC: %s", user, params);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*Admin(%s): %s", user, params);
SendClientMessageToAll(COLOR_BLUE, msg);
}
return 1;
}
if (IRC_IsHalfop(botid, channel, user))
{
// Check if the user entered any text
if (!isnull(params))
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "02Moderator(%s) on IRC: %s", user, params);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "*Moderator(%s): %s", user, params);
SendClientMessageToAll(COLOR_BLUE, msg);
}
return 1;
}
// 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))
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "02*VIP(%s) on IRC: %s", user, params);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "VIP(%s): %s", user, params);
SendClientMessageToAll(COLOR_ORANGE, msg);
}
return 1;
}
else
{
if (!isnull(params))
{
new msg[128];
// Echo the formatted message
format(msg, sizeof(msg), "02[-] 07%s: %s", user, params);
IRC_GroupSay(groupID, channel, msg);
format(msg, sizeof(msg), "[-] %s: %s", user, params);
SendClientMessageToAll(-1, msg);
}
return 1;
}
}