Skip to content

Commit 6f5cc28

Browse files
show simpler message when someone quits IRC completely, instead of empty ()
1 parent d28cc17 commit 6f5cc28

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

fCraft/Network/IRC.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,15 @@ void HandleIrcPartQuit(IRCMessage msg) {
458458
return;
459459
}
460460
if (!ResponsibleForInputParsing) return;
461+
461462
// Announce parts/quits of IRC people (except the bots)
462463
if (ConfigKey.IRCBotAnnounceIRCJoins.Enabled() && !IsBotNick(msg.Nick)) {
463-
Server.Message("&I(IRC) {0} left the IRC channel ({1})",
464-
msg.Nick, msg.Channel);
464+
if (String.IsNullOrEmpty(msg.Channel)) {
465+
Server.Message("&I(IRC) {0} left IRC");
466+
} else {
467+
Server.Message("&I(IRC) {0} left the IRC channel ({1})", msg.Nick, msg.Channel);
468+
}
469+
465470
string quitMsg = (msg.Message == null) ? "Quit" : msg.Message;
466471
quitMsg = IRCColorsAndNonStandardCharsExceptEmotes.Replace(quitMsg, "");
467472
Logger.Log(LogType.IrcChat, "{0} left {1} ({2})",

0 commit comments

Comments
 (0)