2015-01-16 17:45:37 -05:00
|
|
|
var FFZ = window.FrankerFaceZ;
|
|
|
|
|
2015-01-19 15:27:10 -05:00
|
|
|
|
2015-02-10 01:34:23 -05:00
|
|
|
// -----------------
|
|
|
|
// Log Export
|
|
|
|
// -----------------
|
|
|
|
|
|
|
|
FFZ.ffz_commands.log = function(room, args) {
|
|
|
|
this._pastebin(this._log_data.join("\n"), function(url) {
|
|
|
|
if ( ! url )
|
|
|
|
return this.room_message(room, "There was an error uploading the FrankerFaceZ log.");
|
|
|
|
|
|
|
|
this.room_message(room, "Your FrankerFaceZ log has been pasted to: " + url);
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-01-16 17:45:37 -05:00
|
|
|
// -----------------
|
2015-01-19 15:27:10 -05:00
|
|
|
// Mass Moderation
|
2015-01-16 17:45:37 -05:00
|
|
|
// -----------------
|
|
|
|
|
2015-02-10 01:34:23 -05:00
|
|
|
FFZ.ffz_commands.massunmod = function(room, args) {
|
2015-01-16 17:45:37 -05:00
|
|
|
args = args.join(" ").trim();
|
|
|
|
|
|
|
|
if ( ! args.length )
|
|
|
|
return "You must provide a list of users to unmod.";
|
|
|
|
|
|
|
|
args = args.split(/\W*,\W*/);
|
|
|
|
|
|
|
|
var user = this.get_user();
|
|
|
|
if ( ! user || ! user.login == room.id )
|
|
|
|
return "You must be the broadcaster to use massunmod.";
|
|
|
|
|
|
|
|
if ( args.length > 50 )
|
|
|
|
return "Each user you unmod counts as a single message. To avoid being globally banned, please limit yourself to 50 at a time and wait between uses.";
|
|
|
|
|
|
|
|
var count = args.length;
|
|
|
|
while(args.length) {
|
|
|
|
var name = args.shift();
|
|
|
|
room.room.tmiRoom.sendMessage("/unmod " + name);
|
|
|
|
}
|
|
|
|
|
|
|
|
return "Sent unmod command for " + count + " users.";
|
|
|
|
}
|
|
|
|
|
2015-02-10 01:34:23 -05:00
|
|
|
FFZ.ffz_commands.massunmod.help = "Usage: /ffz massunmod <list, of, users>\nBroadcaster only. Unmod all the users in the provided list.";
|
2015-01-16 17:45:37 -05:00
|
|
|
|
|
|
|
|
2015-02-10 01:34:23 -05:00
|
|
|
FFZ.ffz_commands.massmod = function(room, args) {
|
2015-01-16 17:45:37 -05:00
|
|
|
args = args.join(" ").trim();
|
|
|
|
|
|
|
|
if ( ! args.length )
|
|
|
|
return "You must provide a list of users to mod.";
|
|
|
|
|
|
|
|
args = args.split(/\W*,\W*/);
|
|
|
|
|
|
|
|
var user = this.get_user();
|
|
|
|
if ( ! user || ! user.login == room.id )
|
|
|
|
return "You must be the broadcaster to use massmod.";
|
|
|
|
|
|
|
|
if ( args.length > 50 )
|
|
|
|
return "Each user you mod counts as a single message. To avoid being globally banned, please limit yourself to 50 at a time and wait between uses.";
|
|
|
|
|
|
|
|
var count = args.length;
|
|
|
|
while(args.length) {
|
|
|
|
var name = args.shift();
|
|
|
|
room.room.tmiRoom.sendMessage("/mod " + name);
|
|
|
|
}
|
|
|
|
|
|
|
|
return "Sent mod command for " + count + " users.";
|
|
|
|
}
|
|
|
|
|
2015-07-13 21:52:44 -04:00
|
|
|
FFZ.ffz_commands.massmod.help = "Usage: /ffz massmod <list, of, users>\nBroadcaster only. Mod all the users in the provided list.";
|
|
|
|
|
|
|
|
|
|
|
|
/*FFZ.ffz_commands.massunban = function(room, args) {
|
|
|
|
args = args.join(" ").trim();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}*/
|