From 7741f762e2b743116ef9d90224c3db348402a34a Mon Sep 17 00:00:00 2001 From: John McLear Date: Tue, 19 Mar 2013 02:21:53 +0000 Subject: [PATCH] hook for chat msg --- src/static/js/chat.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/static/js/chat.js b/src/static/js/chat.js index 83a487dee..bba3d87e5 100644 --- a/src/static/js/chat.js +++ b/src/static/js/chat.js @@ -17,6 +17,7 @@ var padutils = require('./pad_utils').padutils; var padcookie = require('./pad_cookie').padcookie; var Tinycon = require('tinycon/tinycon'); +var hooks = require('./pluginfw/hooks'); var chat = (function() { @@ -162,7 +163,18 @@ var chat = (function() time: '4000' }); Tinycon.setBubble(count); - + var msg = { + "authorName" : authorName, + "text" : text, + "sticky" : false, + "time" : timeStr + }; + hooks.aCallAll("chatNewMessage", { + "authorName" : authorName, + "text" : text, + "sticky" : false, + "time" : timeStr + }); } } }