]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Belt and braces against flashing overload, also fix a bug in auth in conventional...
authorChris Porter <redacted>
Mon, 22 Jun 2009 21:06:45 +0000 (22:06 +0100)
committerChris Porter <redacted>
Mon, 22 Jun 2009 21:06:45 +0000 (22:06 +0100)
js/ui/notifications.js
js/ui/panes/connect.js

index a701be329db19fc9065cef8f60bbce83cf36d52a..ba7b6f5160ff09b58581c7cd5eeb56ee8ddf086c 100644 (file)
@@ -67,6 +67,8 @@ qwebirc.ui.Flasher = new Class({
       this.flashing = false;\r
     \r
       this.canFlash = true;\r
+      document.addEvent("mousedown", this.cancelFlash.bind(this));\r
+      document.addEvent("keydown", this.cancelFlash.bind(this));\r
     } else {\r
       this.canFlash = false;\r
     }    \r
@@ -128,7 +130,7 @@ qwebirc.ui.Flasher = new Class({
   },\r
   focusChange: function(value) {\r
     this.windowFocused = value;\r
-    \r
+\r
     if(value)\r
       this.cancelFlash();\r
   }\r
index 9161bfe3ea63b5491099543a8ae64746bee8614d..1f99dd954486bfb682f469b14f794783bca73c79 100644 (file)
@@ -202,28 +202,29 @@ qwebirc.ui.LoginBox = function(parentElement, callback, initialNickname, initial
     }
 
     var data = {"nickname": nickname, "autojoin": chans};
-    if(qwebirc.auth.passAuth() && authCheckBox.checked) {
-        if(!usernameBox.value || !passwordBox.value) {
-          alert("You must supply your username and password in auth mode.");
-          if(!usernameBox.value) {
-            usernameBox.focus();
-          } else {
-            passwordBox.focus();
+    if(qwebirc.auth.enabled()) {
+      if(qwebirc.auth.passAuth() && authCheckBox.checked) {
+          if(!usernameBox.value || !passwordBox.value) {
+            alert("You must supply your username and password in auth mode.");
+            if(!usernameBox.value) {
+              usernameBox.focus();
+            } else {
+              passwordBox.focus();
+            }
+            return;
           }
+          
+          data["serverPassword"] = usernameBox.value + " " + passwordBox.value;
+      } else if(qwebirc.auth.bouncerAuth()) {
+        if(!passwordBox.value) {
+          alert("You must supply a password.");
+          passwordBox.focus();
           return;
         }
         
-        data["serverPassword"] = usernameBox.value + " " + passwordBox.value;
-    } else if(qwebirc.auth.bouncerAuth()) {
-      if(!passwordBox.value) {
-        alert("You must supply a password.");
-        passwordBox.focus();
-        return;
+        data["serverPassword"] = passwordBox.value;
       }
-      
-      data["serverPassword"] = passwordBox.value;
     }
-    
     parentElement.removeChild(outerbox);
     
     callback(data);