Prevent a crash.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 1 Oct 2012 06:17:51 +0000 (02:17 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 1 Oct 2012 06:17:51 +0000 (02:17 -0400)
irkerd

diff --git a/irkerd b/irkerd
index 598017b55801ede85bdbd6c46515ef7649c98feb..91199dc73d3e336fd92efb7bdbb79a7cf69c0df9 100755 (executable)
--- a/irkerd
+++ b/irkerd
@@ -237,7 +237,7 @@ class Target():
             ircport = 6667
         self.servername = irchost
         self.channel = parsed.path.lstrip('/')
-        if self.channel[0] not in "#&+":
+        if self.channel and self.channel[0] not in "#&+":
             self.channel = "#" + self.channel
         self.port = int(ircport)
     def valid(self):