daily pastebin goal
3%
SHARE
TWEET

Untitled

a guest Dec 16th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. stalkwords = [];
  2. if(sys.getVal('stalkwords') !== "") {
  3.     var nstalkwords = sys.getVal('stalkwords').split(",");
  4.     stalkwords = nstalkwords.concat(stalkwords);
  5.     stalkwords = eliminateDuplicates(stalkwords);
  6. };
  7. if(command == "stalkwords") {
  8.     sys.stopEvent();
  9.     sendBotMessage("Your stalkwords are: " + stalkwords);
  10. };
  11. if(command == "addstalkword") {
  12.     sys.stopEvent();
  13.     var nstalkwords = commandData;
  14.     if(nstalkwords.search(/, /g) !== -1 || nstalkwords.search(/ ,/g) !== -1) {
  15.         nstalkwords = nstalkwords.replace(/, /g, ",").replace(/ ,/g, ",");
  16.     };
  17.     nstalkwords = nstalkwords.split(",");
  18.     stalkwords = eliminateDuplicates(nstalkwords.concat(stalkwords));
  19.     sys.saveVal('stalkwords', stalkwords.toString());
  20.     sendBotMessage("You added " + commandData + " to your stalkwords!");
  21. };
  22. if(command == "removestalkword") {
  23.     sys.stopEvent();
  24.     commandData = commandData.toLowerCase();
  25.     for(var x in stalkwords) {
  26.         if(stalkwords[x].toLowerCase() === commandData) {
  27.             stalkwords.splice(x, 1);
  28.             sys.saveVal('stalkwords', stalkwords.toString());
  29.             sendBotMessage("You removed " + commandData + " from your stalkwords!");
  30.             return;
  31.         };
  32.     };
  33.     sendBotMessage("" + commandData + " is not a stalkword!");
  34. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand