[UNSOLVED!!]Talking as a channel bot...
#2

pawn Код:
new string[256];
public OnRconCommand(cmd[])
{
  format(string, sizeof(string), "%s", cmd);
  IrcSay(string);
  return 1;
}
The bot will say everything you type in the console, except you type any console commands.
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;
}
also, here's irccmd. It's a slight modiffication of dcmd
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
Reply


Messages In This Thread
[UNSOLVED!!]Talking as a channel bot... - by DEJORDZTA - 11.08.2009, 04:50
Re: Talking as a channel bot... - by dice7 - 11.08.2009, 06:31
Re: Talking as a channel bot... - by Ez - 11.08.2009, 06:44
Re: Talking as a channel bot... - by DEJORDZTA - 27.08.2009, 04:38
Re: Talking as a channel bot... - by DEJORDZTA - 27.08.2009, 05:29
Re: Talking as a channel bot... - by DEJORDZTA - 29.08.2009, 09:41
Re: [SOLVED!!]Talking as a channel bot... - by Abernethy - 29.08.2009, 09:44
Re: [SOLVED!!]Talking as a channel bot... - by DEJORDZTA - 30.08.2009, 04:52
Re: [UNSOLVED!!]Talking as a channel bot... - by DEJORDZTA - 11.09.2009, 22:04

Forum Jump:


Users browsing this thread: 3 Guest(s)