IRC question(s)
#3

Just to add to Genuines post.
1.)
You add whatever you want to add.

pawn Код:
public AdIRC(msg[])
{
    IRC_GroupSay(gGroupID, IRC_ADMINCHANNEL, msg);
    return 1;
}

public IRC(msg[])
{
    IRC_GroupSay(gGroupID, IRC_CHANNEL, msg);
    return 1;
}

public allIRC(msg[])
{
    IRC(msg);
    AdIRC(msg);
    return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    new string[128], pname[34], rand;
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "10[SPAWN] %s (%d) has spawned.", pname, playerid);
    IRC_GroupSay(gGroupID, IRC_CHANNEL, string);
} //my original onplayerspawn is bigger, but you get the idea.

public OnPlayerText(playerid, text[])
{
    new string[128], pname[MAX_PLAYER_NAME];
    pname = plname(playerid);
    if(PlayerInfo[playerid][pMuted] == 1)
    {
        format(string, sizeof(string), "04[MUTED | CHAT] %s%s (%d) - %s", GetPlayerIRCColor(playerid), pname, playerid, text);
        AdIRC(string);
        return SendClientMessage(playerid, COLOR_ERROR, "You are muted, you cannot talk!");
    }
}


2.)
You can add a anticheat like anti-airbreak, and let them notify "X MAY BE AIRBREAKING, SPEED _SPEED_, blablabla
Using IRC_GroupSay(gGroupID, IRC_ADMINCHANNEL, string);
Should be straightforward once you get the hang of it.

3.)
You first /ns register <password> <email> yourself; I recommend using IRC.tl or a irc network of your friend.
Now you do /join <yourchannel>, /cs register channel channelpassword description, /cs set #channel xop off, /cs access #channel add BOT_NAME level (5 = op).

Having this done, get your bots to identify,
my personal code is this:
pawn Код:
public IRC_OnConnect(botid, ip[], port)
{
    new string[100];
    printf("*** IRC_OnConnect: Bot ID %d connected!", botid);

    format(string,sizeof(string),"PRIVMSG NickServ :identify %s",IRC_BOT_PASSWORD);
    IRC_SendRaw(botid, string);
    if(botid == 1 || botid == 2)
    {
        IRC_JoinChannel(botid, IRC_CHANNEL);
        IRC_JoinChannel(botid, IRC_ADMINCHANNEL);
        IRC_AddToGroup(gGroupID, botid);
    }

    return 1;
}
Your bots will now automatically get +o whenever they join your channel.

* I realise the code I posted isn't optimal, as its a very outdated script i got it from o.o
Reply


Messages In This Thread
IRC question(s) - by Couch Potatoe - 17.06.2012, 04:28
Re: IRC question(s) - by Genuine - 17.06.2012, 05:45
Re: IRC question(s) - by Revo - 17.06.2012, 07:15
Re: IRC question(s) - by [MM]IKKE - 17.06.2012, 10:13
Re: IRC question(s) - by Couch Potatoe - 17.06.2012, 12:19
Re: IRC question(s) - by Vince - 17.06.2012, 12:42
Re: IRC question(s) - by Couch Potatoe - 17.06.2012, 12:55

Forum Jump:


Users browsing this thread: 3 Guest(s)