Meteor: ReferenceError: IRC is not defined

178 views Asked by At

I am trying to use mrt:meteor-node-irc. AFAIK its meteorized npm package of IRC.

I have tried initializing using:

client = new IRC().Client(serverURL, nickname, params);
        client.connect();

I get a ReferenceError saying IRC not defined.

I have tried using

var IRC = Meteor.npmRequire('IRC');

to no avail.

The package can be added with

meteor add mrt:meteor-node-irc

Been struggling with this for last couple of days but unable to figure out.

Any help would be appreciated.

1

There are 1 answers

0
Kuba Wyrobek On

Consider using: meteor add pent:irc

Usage :

var params = {
  server: 'irc.freenode.net',
  port: 6667,
  nick: 'meteorirc',
  password: false,
  realname: 'Meteor IRC',
  username: 'Meteor-IRC',
  channels: ['#meteor'],
  debug: false,
  stripColors: true
};
client = new IRC(params);
client.connect();

Meteor.setTimeout(function() {
  client.say('#meteor', 'HI THERE I JUST COPY AND PASTA'd ALL THIS');
}, 20000);