},\r
\r
addMsg: function (nick, msg, type, opts) {\r
- var message_obj, bs, d;\r
+ var message_obj, bs, d,\r
+ scrollback = (parseInt(_kiwi.global.settings.get('scrollback'), 10) || 250);\r
\r
opts = opts || {};\r
\r
bs.push(message_obj);\r
\r
// Keep the scrolback limited\r
- if (bs.length > 250) {\r
- bs.splice(250);\r
+ if (bs.length > scrollback) {\r
+ bs.splice(scrollback);\r
}\r
this.set({"scrollback": bs}, {silent: true});\r
\r
\r
// Make sure our DOM isn't getting too large (Acts as scrollback)\r
this.msg_count++;\r
- if (this.msg_count > 250) {\r
+ if (this.msg_count > (parseInt(_kiwi.global.settings.get('scrollback'), 10) || 250)) {\r
$('.msg:first', this.$el).remove();\r
this.msg_count--;\r
}\r