Преглед на файлове

Fixed issue where chat wouldn't work.

KrisVos130 преди 9 години
родител
ревизия
12fdf90a39
променени са 1 файла, в които са добавени 12 реда и са изтрити 12 реда
  1. 12 12
      app/server/server.js

+ 12 - 12
app/server/server.js

@@ -773,10 +773,10 @@ Meteor.methods({
                 throw new Meteor.Error(406, "Message length cannot be more than 300 characters long..");
                 throw new Meteor.Error(406, "Message length cannot be more than 300 characters long..");
             }
             }
             else if (user.profile.rank === "admin") {
             else if (user.profile.rank === "admin") {
-                HTTP.call("GET", "http://www.wdyl.com/profanity?q=" + encodeURIComponent(message), function (err, res) {
+                /*HTTP.call("GET", "http://www.wdyl.com/profanity?q=" + encodeURIComponent(message), function (err, res) {
                     if (res.content.indexOf("true") > -1) {
                     if (res.content.indexOf("true") > -1) {
                         return true;
                         return true;
-                    } else {
+                    } else {*/
                         Chat.insert({
                         Chat.insert({
                             type: type,
                             type: type,
                             rawrank: rawrank,
                             rawrank: rawrank,
@@ -785,15 +785,15 @@ Meteor.methods({
                             time: time,
                             time: time,
                             username: username
                             username: username
                         });
                         });
-                    }
-                });
+                    /*}
+                });*/
                 return true;
                 return true;
             }
             }
             else if (user.profile.rank === "moderator") {
             else if (user.profile.rank === "moderator") {
-                HTTP.call("GET", "http://www.wdyl.com/profanity?q=" + encodeURIComponent(message), function (err, res) {
+                /*HTTP.call("GET", "http://www.wdyl.com/profanity?q=" + encodeURIComponent(message), function (err, res) {
                     if (res.content.indexOf("true") > -1) {
                     if (res.content.indexOf("true") > -1) {
                         return true;
                         return true;
-                    } else {
+                    } else {*/
                         Chat.insert({
                         Chat.insert({
                             type: type,
                             type: type,
                             rawrank: rawrank,
                             rawrank: rawrank,
@@ -802,15 +802,15 @@ Meteor.methods({
                             time: time,
                             time: time,
                             username: username
                             username: username
                         });
                         });
-                    }
-                });
+                    /*}
+                });*/
                 return true;
                 return true;
             }
             }
             else {
             else {
-                HTTP.call("GET", "http://www.wdyl.com/profanity?q=" + encodeURIComponent(message), function (err, res) {
+                /*HTTP.call("GET", "http://www.wdyl.com/profanity?q=" + encodeURIComponent(message), function (err, res) {
                     if (res.content.indexOf("true") > -1) {
                     if (res.content.indexOf("true") > -1) {
                         return true;
                         return true;
-                    } else {
+                    } else {*/
                         Chat.insert({
                         Chat.insert({
                             type: type,
                             type: type,
                             rawrank: rawrank,
                             rawrank: rawrank,
@@ -819,8 +819,8 @@ Meteor.methods({
                             time: time,
                             time: time,
                             username: username
                             username: username
                         });
                         });
-                    }
-                });
+                    /*}
+                });*/
                 return true;
                 return true;
             }
             }
         } else {
         } else {