UNPKG

squelch-client

Version:
27 lines (23 loc) 639 B
// Generated by CoffeeScript 1.10.0 (function() { var getSender; getSender = require('../../util').getSender; module.exports = function() { return function(client) { client.invite = function(nick, chan) { return this.raw("INVITE " + nick + " " + chan); }; return client._.internalEmitter.on('raw', function(reply) { var chan, from; if (reply.command === 'INVITE') { from = getSender(reply); chan = reply.params[1]; return client.emit('invite', { from: from, chan: chan }); } }); }; }; }).call(this);