11.08.2009, 06:31
pawn Код:
new string[256];
public OnRconCommand(cmd[])
{
format(string, sizeof(string), "%s", cmd);
IrcSay(string);
return 1;
}
Also, not that irc sided commands, like /quit or /ns register, wont work.
And this will also not work, if you have the irc bot implented into your gamemode
EDIT: Sorry, didn't read your reply good enough. Wait a minute
here:
pawn Код:
public ircOnUserSay(conn, channel[], user[], message[])
{
if(message[0] != '!') return 1;
irccmd(serversay,9,conn,channel,user,message);
return 1;
}
irccmd_serversay(conn, channel[], user[], params[])
{
if(!ircIsOp(conn,channel,user)) return IrcSay("Only irc ops can use this command");
new string[128];
if(!strlen(params)) return IrcSay("USAGE: !serversay <message>");
format(string,sizeof(string), "***s.a.dBOT: %s", params);
SendClientMessageToAll(0xFF0000AA, string);
IrcSay(string);
return 1;
}
pawn Код:
#define irccmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (irccmd_%1(conn,channel,user,"")))||(((%3)[(%2) + 1] == 32) && (irccmd_%1(conn,channel,user,(%3)[(%2) + 2]))))) return 1
And I doubt you could treat the bot as an actual player, to be able to register him