X-Git-Url: https://jfr.im/git/irc/quakenet/qwebirc.git/blobdiff_plain/83d2124308a28050aca90b21c993c05c10ad4613..f63006ab1aac07357148022344625257f0b7fd3f:/js/ui/baseuiwindow.js diff --git a/js/ui/baseuiwindow.js b/js/ui/baseuiwindow.js index 22200ad..1466907 100644 --- a/js/ui/baseuiwindow.js +++ b/js/ui/baseuiwindow.js @@ -98,8 +98,10 @@ qwebirc.ui.Window = new Class({ addLine: function(type, line, colour, element) { var hilight = qwebirc.ui.HILIGHT_NONE; var lhilight = false; - + if(type) { + var selectMe = function() { this.parentObject.selectWindow(this); }.bind(this); + var message = $defined(line) ? line["m"] : null; hilight = qwebirc.ui.HILIGHT_ACTIVITY; if(type.match(/(NOTICE|ACTION|MSG)$/)) { @@ -108,15 +110,13 @@ qwebirc.ui.Window = new Class({ hilight = qwebirc.ui.HILIGHT_ACTIVITY; } else { hilight = qwebirc.ui.HILIGHT_US; - this.parentObject.beep(); - this.parentObject.flash(); + this.parentObject.notify("Private message from " + this.name, message, selectMe); } } - if(!type.match(/^OUR/) && this.client.hilightController.match(line["m"])) { + if(!type.match(/^OUR/) && this.client.hilightController.match(message)) { lhilight = true; hilight = qwebirc.ui.HILIGHT_US; - this.parentObject.beep(); - this.parentObject.flash(); + this.parentObject.notify("Hilighted in " + this.name, message, selectMe); } else if(hilight != qwebirc.ui.HILIGHT_US) { hilight = qwebirc.ui.HILIGHT_SPEECH; }