IRC question(s)
#1

Hey guys, I'm just curious about adding IRC to a gamemode and I have some questions about it.
1. When you finish adding IRC to the gamemode, does the IRC need to have certain pawn codes to tell the IRC user of what's happening in the server?

2. When the IRC is added, how do you make it so that, when someone makes a report on the hosts website about a cheater/hacker, it lets the IRC admins know?

3. How do you register the IRC bots on the channel and make them +op when they join?

Thanks in advanced!
Reply
#2

Answer for 1) Yes, you can see what they're saying on the IRC in-game, the bots do.
Answer for 2) There's actually no sugh thing like that, but you could add specific in-game cheats to let them notify on IRC
Answer for 3) It'd be hard if you aren't a server op for the IRC, since you don't have access to it, I'm guessing It's impossible to register it without "Network Administrator"

Hope this helped you.
Reply
#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
#4

I only know the third part. You can indeed do what BuuGhost said. However I'd do it otherwise.

Register on the irc server (irc.tl is the most commonly used network for echo's) using /ns register <password> <email>. Join your channel - most likely #servername.echo (or without the .echo). Register the channel as described above. You will now personnally be the channel owner.

Change your nickname to any name you want for your echo bots. Register them using the same stuff (/ns register). Change your name back to your original one, and add the bots to your +o list (/cs aop #channel add <botnick>).

Here, at this last point, I'm working different than BuuGhost, as I personnally think this system is easier for those who are not familiar with IRC.

If you need any other help regarding IRC - NOT the bots themselves -, there is a #help channel in "irc.tl" server. Just ask your question and we'll be more than glad to help you.
Reply
#5

Quote:
Originally Posted by [MM]IKKE
Посмотреть сообщение
I only know the third part. You can indeed do what BuuGhost said. However I'd do it otherwise.

Register on the irc server (irc.tl is the most commonly used network for echo's) using /ns register <password> <email>. Join your channel - most likely #servername.echo (or without the .echo). Register the channel as described above. You will now personnally be the channel owner.

Change your nickname to any name you want for your echo bots. Register them using the same stuff (/ns register). Change your name back to your original one, and add the bots to your +o list (/cs aop #channel add <botnick>).

Here, at this last point, I'm working different than BuuGhost, as I personnally think this system is easier for those who are not familiar with IRC.

If you need any other help regarding IRC - NOT the bots themselves -, there is a #help channel in "irc.tl" server. Just ask your question and we'll be more than glad to help you.
Well, thanks for the answer, I do already have a registered channel and I'm op on it.

What I want to know is if there's a way to make the irc bots tell you if there's a report on the forums. I was in an IRC channel when someone reported something on the forums and the bot forwarded a notice.
Reply
#6

Maybe through php sockets. Not sure. It will be hard, because you will need to know the IRC handshake protocol and that kind of stuff.

Edit: More likely is that this server stores data in their MySQL database, which is then polled regularly (say, every minute) by the samp-server for updates. If there are updates, they are relayed to the IRC channel.
Reply
#7

Thanks for the answer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)