Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var irc = require('irc');
- var os = require('os');
- var bot = new irc.Client('irc.pc-logix.com', 'ShuuBot', {
- userName: 'ShuuBot',
- channels: ['#Shuu'],
- port: 6667,
- realName: 'ShuuBot ',
- debug: false,
- showErrors: true,
- autoRejoin: true,
- });
- bot.addListener('error', function(message) {
- console.log('ERROR: %s: %s', message.command, message.args.join(' '));
- });
- bot.addListener('message#', function (from, to, message) {
- console.log('%s => %s: %s', to, from, message);
- if(message.toLowerCase() == '*ram')
- {
- bot.say(to, 'Free RAM: '+Math.round(os.freemem()/1048576)+'/'+Math.round(os.totalmem()/1048576)+'MB');
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement