Prevent a crash.
[irker.git] / 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):