16.07.2014, 00:48
(
Последний раз редактировалось mkdim9z6; 16.07.2014 в 20:23.
)
I have added those commands for irc,
it works, and theres no error in compiling.
The problem is, when I enter !pcmds or !hcmds or !acmds or !ocmds the commands display to all IRC clients, not only me.
How can I hide them from other clients and only the person who enters the commands can see them.
I also want to know, to prevent spam on the channel.
pawn Код:
IRCCMD:hcmds(botid, channel[], user[], host[], params[])
{
if (IRC_IsHalfop(botid, channel, user))
{
new string[65];
new string2[65];
new string3[65];
new string4[65];
new string5[65];
new string6[65];
new string7[65];
format(string, sizeof(string), "IRC COMMANDS: Admins Level 1");
format(string2, sizeof(string2), "!h ---- To talk as a moderator.");
format(string3, sizeof(string3), "!hi ---- To talk as a strange moderator.");
format(string4, sizeof(string4), "!kick ---- To kick a player.");
format(string5, sizeof(string5), "!warn ---- To warn a player.");
format(string6, sizeof(string6), "!explode ---- To explode a player.");
format(string7, sizeof(string7), "!getinfo ---- To get more information about a player.");
IRC_Say(botid, channel, string);
IRC_Say(botid, channel, string2);
IRC_Say(botid, channel, string3);
IRC_Say(botid, channel, string4);
IRC_Say(botid, channel, string5);
IRC_Say(botid, channel, string6);
IRC_Say(botid, channel, string7);
}
if (!IRC_IsHalfop(botid, channel, user))
{
new string[50];
format(string, sizeof(string), "04>> Error: 01You are not authorized to do that!");
IRC_Say(botid, channel, string);
}
return 1;
}
IRCCMD:pcmds(botid, channel[], user[], host[], params[])
{
if (IRC_IsOp(botid, channel, user))
{
new string[43];
new string2[43];
new string3[43];
new string4[43];
new string5[43];
new string6[43];
new string7[43];
format(string, sizeof(string), "IRC COMMANDS: Admins Level 2 & 3");
format(string2, sizeof(string2), "!p ---- To talk as an operator.");
format(string3, sizeof(string3), "!pi ---- To talk as a strange operator.");
format(string4, sizeof(string4), "!ban ---- To ban a player.");
format(string5, sizeof(string5), "!slap ---- To slap a player.");
format(string6, sizeof(string6), "!freeze ---- To freeze a player.");
format(string7, sizeof(string7), "!unfreeze ---- To unfreeze a player.");
IRC_Say(botid, channel, string);
IRC_Say(botid, channel, string2);
IRC_Say(botid, channel, string3);
IRC_Say(botid, channel, string4);
IRC_Say(botid, channel, string5);
IRC_Say(botid, channel, string6);
IRC_Say(botid, channel, string7);
}
if (!IRC_IsOp(botid, channel, user))
{
new string[50];
format(string, sizeof(string), "04>> Error: 01You are not authorized to do that!");
IRC_Say(botid, channel, string);
}
return 1;
}
IRCCMD:acmds(botid, channel[], user[], host[], params[])
{
if (IRC_IsAdmin(botid, channel, user))
{
new string[50];
new string2[50];
new string3[50];
new string4[50];
new string5[50];
new string6[50];
new string7[50];
new string8[50];
new string9[50];
new string10[50];
new string11[50];
format(string, sizeof(string), "IRC COMMANDS: Admins Level 4");
format(string2, sizeof(string2), "!a ---- To talk as an administrator.");
format(string3, sizeof(string3), "!ai ---- To talk as a strange administrator.");
format(string4, sizeof(string4), "!RCON ---- To execute a RCON command.");
format(string5, sizeof(string5), "!fu ---- To fuckup a player.");
format(string6, sizeof(string6), "!disarm ---- To disarm a player.");
format(string7, sizeof(string7), "!resetcash ---- To reset the cash of a player.");
format(string8, sizeof(string8), "!giveallcash ---- To give cash to all players.");
format(string9, sizeof(string9), "!spawn ---- To (re)spawn a player.");
format(string10, sizeof(string10), "!fuck ---- To fuck anally fuck a player.");
format(string11, sizeof(string11), "!givecar ---- To give a car to a player.");
IRC_Say(botid, channel, string);
IRC_Say(botid, channel, string2);
IRC_Say(botid, channel, string3);
IRC_Say(botid, channel, string4);
IRC_Say(botid, channel, string5);
IRC_Say(botid, channel, string6);
IRC_Say(botid, channel, string7);
IRC_Say(botid, channel, string8);
IRC_Say(botid, channel, string9);
IRC_Say(botid, channel, string10);
IRC_Say(botid, channel, string11);
}
if (!IRC_IsAdmin(botid, channel, user))
{
new string[50];
format(string, sizeof(string), "04>> Error: 01You are not authorized to do that!");
IRC_Say(botid, channel, string);
}
return 1;
}
IRCCMD:ocmds(botid, channel[], user[], host[], params[])
{
if (IRC_IsOwner(botid, channel, user))
{
new string[50];
new string2[50];
new string3[50];
new string4[50];
new string5[50];
format(string, sizeof(string), "IRC COMMANDS: Admins Level 5");
format(string2, sizeof(string2), "!allowweaps ---- To allow weapons in game.");
format(string3, sizeof(string3), "!nametagson ---- To switchon nametags.");
format(string4, sizeof(string4), "!nametagsoff ---- To switchoff nametags.");
format(string5, sizeof(string5), "!disallowweaps ---- To disallow weapons in game.");
IRC_Say(botid, channel, string);
IRC_Say(botid, channel, string2);
IRC_Say(botid, channel, string3);
IRC_Say(botid, channel, string4);
IRC_Say(botid, channel, string5);
}
if (!IRC_IsOwner(botid, channel, user))
{
new string[50];
format(string, sizeof(string), "04>> Error: 01You are not authorized to do that!");
IRC_Say(botid, channel, string);
}
return 1;
}
The problem is, when I enter !pcmds or !hcmds or !acmds or !ocmds the commands display to all IRC clients, not only me.
How can I hide them from other clients and only the person who enters the commands can see them.
I also want to know, to prevent spam on the channel.