diff options
author | lassulus <lassulus@googlemail.com> | 2013-11-11 20:16:45 +0100 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2013-11-11 20:16:45 +0100 |
commit | c6a7cd9027150fca42500b3bbc78be01993856f6 (patch) | |
tree | 0fbf009f8cbec49087f1621553a5fa4e92ce16dd /webchat/public/handler.js | |
parent | 52ee854fa72607eb00229f5c251393ac392fd4f8 (diff) |
webchat: request handling
Diffstat (limited to 'webchat/public/handler.js')
-rw-r--r-- | webchat/public/handler.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/webchat/public/handler.js b/webchat/public/handler.js index 4c13ba80..0930646d 100644 --- a/webchat/public/handler.js +++ b/webchat/public/handler.js @@ -1,32 +1,32 @@ var handler = {} -handler.message = function(object) { +handler.message = function(settings, object) { var safe_message = $('<div/>').text(object.msg).html(); safe_message = replaceURLWithHTMLLinks(safe_message); var safe_from = $('<div/>').text(object.nick).html(); return chatboxAppend(safe_from, safe_message, 'msg') }; -handler.join = function(object) { +handler.join = function(settings, object) { var safe_from = $('<div/>').text(object.from).html(); $('#nicklist').append('<div class="name">' + safe_from + '</div>') ; return chatboxAppend(safe_from, 'joined', 'join') }; -handler.quit = function(object) { +handler.quit = function(settings, object) { var safe_from = $('<div/>').text(object.from).html(); $(getNicklistElement(safe_from)).remove(); return chatboxAppend(safe_from, 'quit', 'quit') }; -handler.nicklist = function(object) { +handler.nicklist = function(settings, object) { Object.keys(object.nicklist).forEach(function (nick) { var hash_from = btoa(nick).replace(/=/g,'_'); $('#nicklist').append('<div class="name">' + nick + '</div>') ; }); }; -handler.nickchange = function(object) { +handler.nickchange = function(settings, object) { var safe_from = $('<div/>').text(object.nick).html(); var safe_newnick = $('<div/>').text(object.newnick).html(); $(getNicklistElement(safe_from)).remove(); |