]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - js/qwebircinterface.js
enhancements:
[irc/quakenet/qwebirc.git] / js / qwebircinterface.js
index c290d947c3ccab1a5810c698d5f065ba72eb7c5d..c451287177b03efa404674c5c98fd946d5447f9c 100644 (file)
@@ -1,9 +1,11 @@
 function qwebirc_ui_onbeforeunload(e) { /* IE sucks */
-  var message = "This action will close all active IRC connections.";
-  var e = e || window.event;
-  if(e)
-    e.returnValue = message;
-  return message;
+  if(qwebirc.connected) {
+    var message = "This action will close all active IRC connections.";
+    var e = e || window.event;
+    if(e)
+      e.returnValue = message;
+    return message;
+  }
 }
 
 qwebirc.ui.Interface = new Class({
@@ -86,8 +88,9 @@ qwebirc.ui.Interface = new Class({
           
             for(var i=0;i<chans.length;i++) {
               chans2[i] = chans[i];
-            
-              if(chans[i].charAt(0) != '#')
+
+                var prefix = chans[i].charAt(0);
+                if(prefix != '#' && prefix != '&')
                 chans2[i] = "#" + chans2[i]
             }
             cdata[0] = chans2.join(",");