Here is how it works:
Creating the IRC Channels & Adding the player(s)
First we create a loop, to find out who can have the irc in their rc- on Era iPhone we have a loop which runs through all the players every 5 seconds to detect certain things (in a Database NPC- We have called it PlayerControl).
HTML Code:
temp.oldrcplayers = this.rcplayers;
this.rcplayers = {};
this.clientrcplayers = {};
for (temp.pl: allplayers) {
if (temp.pl.level == NULL) {
if (temp.pl.adminlevel >= 1) {
this.rcplayers.add(temp.pl);
if (!(temp.pl in temp.oldrcplayers)) {
//Now let's add them to join the two (Feedback & Reports)
temp.pl.sendtoirc("join","Feedback");
temp.pl.sendtoirc("join","Reports");
}
}
continue;
}
//Client RC players
if (temp.pl.adminlevel >= 1)
this.clientrcplayers.add(temp.pl);
}
Now the admins have joined the IRC channels. (Check the snapshot to see how it looks)
How to add text to the IRC channel
HTML Code:
for (temp.rc: PlayerControl.rcplayers)
temp.rc.sendtoirc("privmsg", "xAndrewx", "Feedback", "Message to show in rc");
//temp.rc.sendtoirc("privmsg", "Player Account here that sent the message- it's the prefix before the : in an RC message chat", "send to which IRC", "Message here");
for (temp.rc: PlayerControl.clientrcplayers)
temp.rc.sendtorc("FEEDBACK: Message here");
Straight forward on how to use it. It will then display the chat in the IRC.
Useful Links
http://wiki.graal.net/index.php/Crea...v/Graal_v4_IRC
(Explains IRC)
http://forums.graalonline.com/forums...hp?t=134258222
(Sendtext / RequestText / onReceiveText information)
Stefan designed this system for iPhone worlds to seperate reports.