Untitled


SUBMITTED BY: Guest

DATE: May 8, 2014, 11:09 p.m.

FORMAT: Text only

SIZE: 3.5 kB

HITS: 1040

  1. setInterval(function () {
  2. socket.emit("chat", csrf, "/msg 88818 !hue")
  3. }, 1200000);
  4. var whitelist = {
  5. 13: 1,
  6. 52258: 1,
  7. 88818: 1,
  8. 22711: 1,
  9. 12789: 1,
  10. 114432: 1,
  11. 100100: 1,
  12. 701: 1,
  13. 1: 1,
  14. 2: 1,
  15. 41: 1
  16. };
  17. var ban_ids = [
  18. 169815,
  19. 222418,
  20. 145423,
  21. 222424,
  22. 222419,
  23. 987,
  24. 210567,
  25. 222513,
  26. 222514,
  27. 171023,
  28. 221729,
  29. 221647,
  30. 210567,
  31. 223046,
  32. 159295,
  33. 97999,
  34. ];
  35. var ban_words = {
  36. "dogeshitter": "You have been muted in Doge-Dice chat. Bashing Dogecoin is not allowed in here. ✿",
  37. "dogeshibe101@gmail": "You have been muted in Doge-Dice chat. Advertising or Scamming is not allowed in here. ✿",
  38. "discounts4doge": "You have been muted in Doge-Dice chat. Advertising is not allowed in here. ✿",
  39. "http://qoinpro.com/": "You have been muted in Doge-Dice chat. Referrer links are not allowed in here.✿",
  40. "dogefuckers": "You have been muted in Doge-Dice chat. Bashing Dogecoin is not allowed in here. ✿"
  41. };
  42. var ban_words_casesensitive = {
  43. "DOGESHIT": "Excessive CAPS + Abusive language attacking Dogecoin is not allowed in here. ✿",
  44. "CUNTCOIN": "Excessive CAPS + Abusive language attacking Dogecoin is not allowed in here. ✿",
  45. };
  46. var ban_regexs = [
  47. [/DOGE.{0,5}SHIT/i, "Abusive language attacking Dogecoin is not allowed in here. ✿"], // .*? matches any char
  48. ];
  49. socket.on("chat", function (txt, date) {
  50. if (txt.match(/^\((.*?)\) <(.*?)> (.*)/)) {
  51. c = txt.match(/^\((.*?)\) <(.*?)> (.*)/)[3];
  52. y = txt.match(/^\((.*?)\) <(.*?)> (.*)/)[2];
  53. j = txt.match(/^\((.*?)\) <(.*?)> (.*)/)[1];
  54. flag = true;
  55. for (x in ban_words) {
  56. if (c.toLowerCase().indexOf(x.toLowerCase()) != -1) {
  57. if (!(j in whitelist)) {
  58. socket.emit("chat", csrf, "/mute " + j + " 3600 ");
  59. socket.emit("chat", csrf, "✿ [AUTO BANNED] ✿ [UID: " + j + "] ✿ Reason: " + ban_words[x]);
  60. socket.emit("chat", csrf, "/mute new 600");
  61. flag = false;
  62. break;
  63. }
  64. }
  65. }
  66. if (flag) {
  67. for (x in ban_words_casesensitive) {
  68. if (c.indexOf(x) != -1) {
  69. if (!(j in whitelist)) {
  70. socket.emit("chat", csrf, "/mute " + j + " 3600 ");
  71. socket.emit("chat", csrf, "✿ [AUTO BANNED] ✿ [UID: " + j + "] ✿ Reason: " + ban_words_casesensitive[x]);
  72. socket.emit("chat", csrf, "/mute new 600");
  73. flag = false;
  74. break;
  75. }
  76. }
  77. }
  78. }
  79. if (flag) {
  80. for (x in ban_regexs) {
  81. if (c.match(ban_regexs[x][0])) {
  82. if (!(j in whitelist)) {
  83. socket.emit("chat", csrf, "/mute " + j + " 3600 ");
  84. socket.emit("chat", csrf, "✿ [AUTO BANNED] ✿ [UID: " + j + "] ✿ Reason: " + ban_regexs[x][1]);
  85. socket.emit("chat", csrf, "/mute new 600");
  86. flag = false;
  87. break;
  88. }
  89. }
  90. }
  91. }
  92. if (flag) {
  93. for (x in ban_ids) {
  94. if (j==ban_ids[x]) {
  95. if (!(j in whitelist)) {
  96. socket.emit("chat", csrf, "/mute " + j + " 3600 ");
  97. socket.emit("chat", csrf, "✿ [AUTO BANNED] ✿ [UID: " + j + "] ✿ Reason: You are no longer welcome in Doge-Dice chat.");
  98. socket.emit("chat", csrf, "/mute new 600");
  99. flag = false;
  100. break;
  101. }
  102. }
  103. }
  104. }
  105. }
  106. });

comments powered by Disqus