Advertisement
Guest User

Untitled

a guest
Sep 15th, 2014
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. process.stdin.resume()
  2. process.stdin.on('data', function(d){
  3.   switch(d.toString().toLowerCase()) {
  4.     case "start\n":
  5.       console.log("DONT STOP ME NOW");
  6.       break;
  7.     case "stop\n":
  8.       console.log("Stream stopped");
  9.       break;
  10.     case "restart\n":
  11.      
  12.       console.log("Stream restarted");
  13.       break;
  14.     case "help\n":
  15.       console.log("Start: Empieza a stremear lo configurado en Stream.js y actualiza los copiers\n");
  16.       console.log("Stop: Detiene el streaming en twitter\n");
  17.       console.log("Restart: Reinicia el streaming de twitter, necesario si hemos anadido copiers\n");
  18.       console.log("Tweet <whatever you want to tweet>: Tweet whatever you want\n");
  19.       console.log("Clean: Unfollow people who doesnt follow you back\n");
  20.       console.log("Follow: Follow X random people 2nd grade of communication (friend of a friend)\n");
  21.       console.log("Add: Add a new copier (name and id needed)\n");
  22.       break;
  23.     default:
  24.       var message = d.toString().toLowerCase();
  25.       console.log(message);
  26.       // if (message.slice(0,5) == "tweet"){
  27.       //   console.log("tweeted")
  28.       // };
  29.       if(message == "adder"){
  30.         console.log("aqui estoy yo");
  31.       }
  32.       else{
  33.         console.log("Comando introducido incorrecto, escribe help si necesitas ayuda.");
  34.         console.log(d.toString().slice(0,4).toLowerCase());
  35.       }
  36.   }
  37. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement