]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Fix hilight query bug.
authorChris Porter <redacted>
Mon, 20 Oct 2008 17:57:09 +0000 (18:57 +0100)
committerChris Porter <redacted>
Mon, 20 Oct 2008 17:57:09 +0000 (18:57 +0100)
TODO.txt
js/ui/baseuiwindow.js

index 35fa380052b6520c4114bb8f91198b004bc1eea4..0dd607b7256617b55d8e7aaa1d860a5217006f01 100644 (file)
--- a/TODO.txt
+++ b/TODO.txt
@@ -5,4 +5,3 @@ tab completion
 options for notices and stuff\r
 noscript\r
 @+ in nick shown in text\r
-hilight in query bug fix
\ No newline at end of file
index ded43fda2bda65df0e0cfb0bdb05a178af9285cf..62e54750f5cccf7b3c83cc1b186e96fb6bb6c076 100644 (file)
@@ -53,15 +53,19 @@ qwebirc.ui.Window = new Class({
   },
   addLine: function(type, line, colour, element) {
     var hilight = qwebirc.ui.HILIGHT_NONE;
+    var lhilight = false;
+    
     if(type) {
       hilight = qwebirc.ui.HILIGHT_ACTIVITY;
       
       if(type.match(/(NOTICE|ACTION|MSG)$/)) {
         if(this.type == qwebirc.ui.WINDOW_QUERY) {
-          hilight = qwebirc.ui.HILIGHT_US
-        } else if(!type.match(/^OUR/) && this.client.hilightController.match(line["m"])) {
           hilight = qwebirc.ui.HILIGHT_US;
-        } else {
+        }
+        if(!type.match(/^OUR/) && this.client.hilightController.match(line["m"])) {
+          lhilight = true;
+          hilight = qwebirc.ui.HILIGHT_US;
+        } else if(hilight != qwebirc.ui.HILIGHT_US) {
           hilight = qwebirc.ui.HILIGHT_SPEECH;
         }
       }
@@ -71,7 +75,7 @@ qwebirc.ui.Window = new Class({
       this.setHilighted(hilight);
 
     if(type)
-      line = this.parentObject.theme.message(type, line, hilight == qwebirc.ui.HILIGHT_US);
+      line = this.parentObject.theme.message(type, line, lhilight);
     
     qwebirc.ui.Colourise(qwebirc.irc.IRCTimestamp(new Date()) + " " + line, element, this.client.exec, this.parentObject.urlDispatcher.bind(this.parentObject), this);
     this.scrollAdd(element);