\r
// Time defaults to now\r
if (!opts || typeof opts.time === 'undefined') {\r
- d = opts.date = new Date();\r
+ d = new Date();\r
opts.time = d.getHours().toString().lpad(2, "0") + ":" + d.getMinutes().toString().lpad(2, "0") + ":" + d.getSeconds().toString().lpad(2, "0");\r
}\r
\r
}\r
\r
// Run through the plugins\r
- message_obj = {"msg": msg, "date": opts.date, "time": opts.time, "nick": nick, "chan": this.get("name"), "type": type, "style": opts.style};\r
+ message_obj = {"msg": msg, "time": opts.time, "nick": nick, "chan": this.get("name"), "type": type, "style": opts.style};\r
//tmp = _kiwi.plugs.run('addmsg', message_obj);\r
if (!message_obj) {\r
return;\r
},
newMsg: function (msg) {
- var re, line_msg, $this = this.$el,
+ var template_vars, re, line_msg, $this = this.$el,
nick_colour_hex, nick_hex, is_highlight, msg_css_classes = '',
- template_vars, time_difference,
sb = this.model.get('scrollback'),
prev_msg = sb[sb.length-2];
}
template_vars = _.clone(msg);
-
- if (prev_msg) {
- time_difference = (template_vars.date.getTime() - prev_msg.date.getTime())/1000/60;
- if (prev_msg.nick === template_vars.nick && time_difference < 1) {
- template_vars.nick = '';
- }
+ if (prev_msg && prev_msg.nick === template_vars.nick) {
+ template_vars.nick = '';
}
// Build up and add the line