From ee5be7230f3f0bb1d7af75d1a472495e5a3f0196 Mon Sep 17 00:00:00 2001
From: MrBougo <mrbougo@xonotic.org>
Date: Tue, 7 Sep 2010 16:46:44 +0200
Subject: [PATCH] get a nick before pinging, servers don't seem to like it
 otherwise and return 451 (ERR_NOTREGISTERED) instead of a PONG

---
 server/rcon2irc/rcon2irc.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/rcon2irc/rcon2irc.pl b/server/rcon2irc/rcon2irc.pl
index c1c2a4ef..a29a0a15 100755
--- a/server/rcon2irc/rcon2irc.pl
+++ b/server/rcon2irc/rcon2irc.pl
@@ -1727,7 +1727,7 @@ schedule sub {
 	my ($timer) = @_;
 
 	# log on to IRC when needed
-	if(exists $store{dp_hostname} && !exists $store{irc_logged_in})
+	if(exists $store{dp_hostname} && !exists $store{irc_seen_welcome})
 	{
 		$store{irc_nick_requested} = $config{irc_nick};
 		out irc => 1, "NICK $config{irc_nick}", "USER $config{irc_user} localhost localhost :$store{dp_hostname}";
-- 
2.39.5