]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - js/irc/ircclient.js
Merge.
[irc/quakenet/qwebirc.git] / js / irc / ircclient.js
index c801f3a264bffc52920fa946ee6188c0fc928467..6206a033b5194e7e7d0e3c637b4d9b7ff5a81624 100644 (file)
@@ -753,5 +753,22 @@ qwebirc.irc.IRCClient = new Class({
   },
   isIgnored: function(nick, host) {
     return this.ignoreController.isIgnored(nick, host);
+  },
+  qwebircImage: function(target, url) {
+    var w;
+    if(target == "-STATUS") {
+      w = this.statusWindow;
+    } else {
+      w = this.getWindow(target);
+    }
+
+    if(!w)
+      w = this.getActiveWindow();
+
+    var img = new Element("img", {src: qwebirc.global.dynamicBaseURL + "image?filename=" + url});
+    var d = new Element("div", {styles: {"paddingTop": "2px", "paddingBottom": "2px", "paddingLeft": "9px"}});
+    d.appendChild(img);
+    w.scrollAdd(d);
+    return true;
   }
 });