Staff IRC channel
Staff IRC channel
Have the option to have all staff-chat forwarded to a separate IRC channel. This would allow for people on IRC (which is usually mostly server staff) to communicate privately to staff members in-game without the people in-game having to switch between IRC and Minecraft. You could then set the IRC channel up to be invite-only or whatever.
nope__avi
- Sanjar Khan
- Trustee
- Offline
- Posts: 1766
- Joined: May 24th, 2011, 1:40 pm
- Location: Leiden, Zuid Holland
Re: Staff IRC channel
We did that with a bot
Ferrisbuler2: i will stay but i might not post cus of ollieboy
Re: Staff IRC channel
It's an interesting idea for sure, though it may be insecure when not configured well.
Though, the security on the IRC network end isn't really fCraft's problem.
Though, the security on the IRC network end isn't really fCraft's problem.
Sanjar, I am sometimes completely baffled and confused by your replies.Sanjar Khan wrote:We did that with a bot
A = {x ∈ P(U) | x ∉ x}
Mods:
- /Su - Allows players to temporarily become a different rank
- /Snap - Like /Line but only draws straight or diagonal lines.
- pre-0.630 skip/none block
- Sanjar Khan
- Trustee
- Offline
- Posts: 1766
- Joined: May 24th, 2011, 1:40 pm
- Location: Leiden, Zuid Holland
Re: Staff IRC channel
Just saying, you could use a bot to forward it like Hafnium did with HBOT.
Ferrisbuler2: i will stay but i might not post cus of ollieboy
Re: Staff IRC channel
It would be up to the server owner to configure the IRC channel to keep it secure.Hellenion wrote:Though, the security on the IRC network end isn't really fCraft's problem.
Not everyone knows how to set up a bot to do it (I certainly don't). Also, just because you can do it with a bot doesn't mean it shouldn't be integrated with fCraft.Sanjar Khan wrote:We did that with a bot
nope__avi
- boblol0909
- SupOP
- Offline
- Posts: 314
- Joined: June 24th, 2011, 10:27 pm
Re: Staff IRC channel
If you are able to mod your fcraft and want a quick fix, this will send public messages to all the channels that do not end in "staff" and all the staff messages to channels that end in "staff" (e.g. you could have two channels #myserver and #myserver.staff).
(I'm not sure if this is the latest version, but I assume IRC code hasnt been changed recently.)
On line 570 of IRC.cs, find this:
and immediately after it on the next line add:
On line 482 of the same file, find:
Delete it and paste the following right there:
(I'm not sure if this is the latest version, but I assume IRC code hasnt been changed recently.)
On line 570 of IRC.cs, find this:
Code: Select all
case ChatMessageType.Global:
if( enabled ) {
SendChannelMessage( args.Player.ClassyName + Color.IRCReset + ": " + args.Message );
} else if( args.Message.StartsWith( "#" ) ) {
SendChannelMessage( args.Player.ClassyName + Color.IRCReset + ": " + args.Message.Substring( 1 ) );
}
break;
Code: Select all
case ChatMessageType.Staff:
if( enabled ) {
SendStaffChannelMessage( args.Player.ClassyName + Color.IRCReset + ": " + args.Message );
} else if( args.Message.StartsWith( "#" ) ) {
SendStaffChannelMessage( args.Player.ClassyName + Color.IRCReset + ": " + args.Message.Substring( 1 ) );
}
break;
Code: Select all
public static void SendChannelMessage( [NotNull] string line ) {
if( line == null ) throw new ArgumentNullException( "line" );
if( channelNames == null ) return; // in case IRC bot is disabled.
if( ConfigKey.IRCUseColor.Enabled() ) {
line = Color.ToIRCColorCodes( line );
} else {
line = NonPrintableChars.Replace( line, "" ).Trim();
}
for( int i = 0; i < channelNames.Length; i++ ) {
SendRawMessage(IRCCommands.Privmsg(channelNames[i], line));
}
}
Code: Select all
public static void SendChannelMessage( [NotNull] string line ) {
if( line == null ) throw new ArgumentNullException( "line" );
if( channelNames == null ) return; // in case IRC bot is disabled.
if( ConfigKey.IRCUseColor.Enabled() ) {
line = Color.ToIRCColorCodes( line );
} else {
line = NonPrintableChars.Replace( line, "" ).Trim();
}
for( int i = 0; i < channelNames.Length; i++ ) {
if (!channelNames[i].EndsWith("staff")) {
SendRawMessage(IRCCommands.Privmsg(channelNames[i], line));
}
}
}
public static void SendStaffChannelMessage(string line) {
if (line == null) throw new ArgumentNullException("line");
if (channelNames == null) return;
if (ConfigKey.IRCUseColor.Enabled()) {
line = Color.ToIRCColorCodes(line);
}
else {
line = NonPrintableChars.Replace(line, "").Trim();
}
for (int i = 0; i < channelNames.Length; i++) {
if (channelNames[i].EndsWith("staff")) {
SendRawMessage(IRCCommands.Privmsg(channelNames[i], line));
}
}
}
Re: Staff IRC channel
(Note that modded copies of fCraft are not supported. Use at your own risk.)