Browse files

activation du bot dans l'appli + connexion au bot irc

  • Loading branch information...
1 parent 75ad9ac commit 828e6b003ca16166499695fe8ef3f2e114b2ccee Sebastien Vitry committed Mar 27, 2012
Showing with 7 additions and 2 deletions.
  1. +6 −1 lib/irc.js
  2. +1 −1 server.js
View
7 lib/irc.js
@@ -21,7 +21,12 @@ irc.init = function() {
};
irc.start = function(callback) {
- client = new irc.Client(config.irc.server, config.irc.botName, { channels: [config.irc.channel] });
+ client = new ircAPI.Client(config.irc.server, config.irc.botName);
+ client.join(config.irc.channel, (function(){
+ client.say(config.irc.channel, "Hello I'm a bot!!!");
+ client.say(config.irc.redmineBot, config.irc.passPhrase);
+ client.say(config.irc.redmineBot, "sk");
+ }));
client.addListener('pm', function (from, message){
console.log(from + ' => ME: ' + message);
});
View
2 server.js
@@ -80,7 +80,7 @@ redmine.init();
//mongo.initObjects( null, function(){} );
var irc = require('./lib/irc.js');
-
+irc.init();
///////////////////////////////////////////
// Routes //
///////////////////////////////////////////

0 comments on commit 828e6b0

Please sign in to comment.