Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var config = {
- channels: ["#JestersCourt"],
- userName: "MozartsGhost",
- server: "<redacted>",
- botName: "MozartsGhost",
- password: "<redacted>",
- realName: "JestersCourt IRC Client",
- autoConnect: "true",
- autoRejoin: "true"
- };
- // Get the lib
- var irc = require("irc");
- var string = require('string');
- var express = require('express');
- var sleep = require('sleep');
- // Create the bot name
- bot = new irc.Client(config.server, config.botName,{
- channels: config.channels,
- userName: "MozartsGhost",
- realName: "JestersCourt IRC Client",
- autoRejoin: "true",
- password: "<redacted>"
- });
- // Listen for joins
- bot.addListener("join", function(channel, who) {
- // Welcome them in!
- bot.say(channel, who + ", welcome to JestersCourt IRC Chat Channel. Jester has asked me to scan you for anomalies. This is a security precaution. Scanning you now.... quit squirming....");
- bot.say("nickserv", "identify <redacted>");
- bot.say("/mode MozartsGhost +x");
- bot.say("/mode MozartsGhost +i");
- bot.say("/mode MozartsGhost +p");
- bot.say("/mode MozartsGhost +C");
- bot.say("/msg HostServ on");
- bot.whois(who, function(tempInfo)
- {
- var freetopass = '0';
- for (var key in tempInfo){
- if (tempInfo[key] === '<redacted>'){
- freetopassokay = '1'
- }}
- if (freetopass = '1'){
- sleep.sleep(2);
- console.log('snagged - ok'); // NOTHING BETWEEN HERE AND 'ELSE' FIRES.
- bot.say(who + ", no anomalies detected, hey @JNET do you concur?");
- sleep.sleep(1);
- bot.say("/msg botserv say #Jesterscourt @MozartsGhost I concur brosephine." + who +",Your entry scan is complete. You are free to go about your business. Be excellent to one another.");
- }else{
- sleep.sleep(2);
- console.log('snagged - NOT ok'); // BUT THIS ALSO FIRES
- }
- console.log(freetopass);
- console.log(tempInfo);
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement