Skip to content

Node.js based forum software built for the modern web

0 disables flags for ban

barisusaklifc00586f0e3a
diff --git a/src/socket.io/posts.js b/src/socket.io/posts.js
index 865c26a769..30d7f018c1 100644
--- a/src/socket.io/posts.js
+++ b/src/socket.io/posts.js
@@ -308,7 +308,7 @@ SocketPosts.flag = function(socket, pid, callback) {
return next(err);
}
- if (count >= (meta.config.flagsForBan || 3)) {
+ if (count >= (meta.config.flagsForBan || 3) && parseInt(meta.config.flagsForBan, 10) !== 0) {
var adminUser = require('./admin/user');
adminUser.banUser(post.uid, next);
return;