Advertisement
Guest User

Untitled

a guest
Jun 25th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var config = {
  2.  
  3.     channels: ["#JestersCourt"],
  4.    
  5.     userName: "MozartsGhost",
  6.  
  7.     server: "<redacted>",
  8.  
  9.     botName: "MozartsGhost",
  10.        
  11.     password: "<redacted>",
  12.  
  13.     realName: "JestersCourt IRC Client",
  14.  
  15.     autoConnect: "true",
  16.  
  17.     autoRejoin: "true"
  18.  
  19. };
  20.  
  21. // Get the lib
  22.  
  23. var irc = require("irc");
  24. var string = require('string');
  25. var express = require('express');
  26. var sleep = require('sleep');
  27.  
  28.  
  29. // Create the bot name
  30.  
  31.     bot = new irc.Client(config.server, config.botName,{
  32.  
  33.     channels: config.channels,
  34.     userName: "MozartsGhost",
  35.     realName: "JestersCourt IRC Client",
  36.     autoRejoin: "true",
  37.     password: "<redacted>"
  38.    
  39.  
  40. });
  41.  
  42. // Listen for joins
  43.  
  44.  
  45.  
  46. bot.addListener("join", function(channel, who) {
  47.  
  48.     // Welcome them in!
  49.  
  50.     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....");
  51.    
  52.     bot.say("nickserv", "identify <redacted>");
  53.     bot.say("/mode MozartsGhost +x");
  54.     bot.say("/mode MozartsGhost +i");
  55.     bot.say("/mode MozartsGhost +p");
  56.     bot.say("/mode MozartsGhost +C");
  57.     bot.say("/msg HostServ on");
  58.    
  59.    
  60.    
  61.      bot.whois(who, function(tempInfo)
  62.    {
  63.        
  64.     var freetopass = '0';
  65.        
  66.    for (var key in tempInfo){
  67.    
  68.    if (tempInfo[key] === '<redacted>'){
  69.    
  70.     freetopassokay = '1'
  71.    
  72.    }}
  73.    
  74.     if (freetopass = '1'){
  75.        
  76.         sleep.sleep(2);
  77.         console.log('snagged - ok'); // NOTHING BETWEEN HERE AND 'ELSE' FIRES.
  78.         bot.say(who + ", no anomalies detected, hey @JNET do you concur?");
  79.         sleep.sleep(1);
  80.         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.");
  81.        
  82.     }else{
  83.        
  84.        
  85.     sleep.sleep(2);
  86.     console.log('snagged - NOT ok'); // BUT THIS ALSO FIRES
  87.    
  88.    }
  89.    
  90.    
  91.    
  92.    
  93.     console.log(freetopass);
  94.     console.log(tempInfo);
  95.    });
  96.    
  97.    
  98.  
  99.    
  100.    
  101.  
  102. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement