Uhhmmm.... have you looked into stopforumspam?
Not a silver bullet but never hurts to have one more arrow in yer' quiver, eh?
Might be worth a gander? 🤔 🌴 🌴
I need to get all users when that plugin is installed so I used this hook ( in my plugin.json):
"hook": "action:plugin.activate", "method": "caricaVecchiBookmark"
In my library.js
converter.caricaVecchiBookmark = function(data, callback) {
console.log("ENTRARE QUI DENTRO");
async.waterfall([
function(next) {
db.getSortedSetRangeWithScores('username:uid', start, stop, next);
}
], function(err, array_uid) {
if (err) {
return callback(err);
}
console.log("ARRAY UDI " + JSON.stringify(array_uid));
return callback(null,data);
});
};
The problem is that in the shell I can't read the console.log and I don't know why. When I click the activate button in my admin panel, I don't read the console.log. Anyone can help me?
@Doppy Ciao Doppy!
At first sight, you're trying to access to uid
, that is not declared anywhere. So probably if you check in the log of nodebb, it says that cannot load the plugin (or that there were errors). Instead if it's loaded correctly, I don't know what's happening .
Probably you should use data.uid
?
I don't really get what you want to do to be honest. Or probably I just don't know how the action:plugin.activate
hooks works ^^'
@Doppy make sure you're running with ./nodebb dev
, so you get a realtime log.
This could be why