Created
November 5, 2017 07:40
-
-
Save CoryChaplin/f7ffdb6ac1b2078c5e3ff125712df567 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var IRC = require('../'); | |
var bot = new IRC.Client(), | |
nicklist = ['Clara-', 'Tatiana', 'Morgane', 'Celine', | |
'Carrie', 'Solene', 'Rebecca', 'Krystel', 'fanny', 'lucy', | |
'Clelia', 'Emma', 'Angie', 'Oria', 'Fanny', 'Anna', | |
'Annette', 'Lisa', 'Krista', 'Barbie', 'Nyma', 'Jenna', | |
'Kristin', 'Sandy', 'Imaya', 'Tessa', 'Tessie', ' Olivia', 'Alienor', | |
'Alix', 'Izabella', 'Celina', 'Maureen', 'Simone', 'Camillia', | |
'Julia', 'Vally', 'Ouria', 'Elena', 'Bianca'], | |
city = ['Lyon', 'Paris', 'Bordeaux', 'Marseille', 'Toulouse'], | |
age = '3' + Math.floor((Math.random() * 10)); | |
bot.connect({ | |
host: 'irc.europnet.org', | |
nick: nicklist[Math.floor(Math.random() * nicklist.length)], // random nick | |
gecos: age + ' F ' + city[Math.floor(Math.random() * city.length)] // random ASL | |
}); | |
var frontchan = bot.channel('#trentaine'), | |
backchan = bot.channel('#op30'); | |
// Join channels | |
bot.on('registered', function() { | |
//console.log('Connected!'); | |
frontchan.join(); | |
backchan.join(); | |
}); | |
// Forward privmsg's to backchan | |
bot.on('privmsg', function(event) { | |
if(event.target === bot.options.nick) { | |
//console.log('New message'); | |
backchan.say( | |
event.nick +'( ' + event.ident + '@' + | |
event.hostname + ' ) me dit en privé : ' + event.message | |
); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment