_kiwi.model = {};\r
_kiwi.view = {};\r
_kiwi.applets = {};\r
+_kiwi.utils = {};\r
\r
\r
/**\r
rpc: undefined, // Instance of WebsocketRpc\r
utils: {}, // References to misc. re-usable helpers / functions\r
\r
+ // Make public some internal utils for plugins to make use of\r
initUtils: function() {\r
this.utils.randomString = randomString;\r
this.utils.secondsToTime = secondsToTime;\r
this.utils.formatIRCMsg = formatIRCMsg;\r
this.utils.styleText = styleText;\r
this.utils.hsl2rgb = hsl2rgb;\r
+\r
+ this.utils.notifications = _kiwi.utils.notifications;\r
+ this.utils.formatDate = _kiwi.utils.formatDate;\r
},\r
\r
addMediaMessageType: function(match, buildHtml) {\r
kiwi: 'kiwi', raw: 'raw', kick: 'kick', topic: 'topic',\r
part: 'part', join: 'join', action: 'action', ctcp: 'ctcp',\r
ctcpRequest: 'ctcpRequest', ctcpResponse: 'ctcpResponse',\r
- notice: 'notice', msg: 'privmsg', changeNick: 'changeNick',\r
- channelInfo: 'channelInfo', mode: 'mode', quit: 'quit'\r
+ notice: 'notice', msg: 'privmsg', say: 'privmsg',\r
+ changeNick: 'changeNick', channelInfo: 'channelInfo',\r
+ mode: 'mode', quit: 'quit'\r
};\r
\r
_.each(funcs, function(gateway_fn, func_name) {\r
};\r
});\r
\r
+ // Give access to the control input textarea\r
+ obj.input = _kiwi.app.controlbox.$('.inp');\r
+\r
return obj;\r
}\r
},\r
_kiwi.global.plugins = new _kiwi.model.PluginManager();\r
\r
callback();\r
+\r
+ }).then(null, function(err) {\r
+ console.error(err.stack);\r
});\r
},\r
\r