1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 23:37:41 +00:00

Add getEmotes method to simplify getting a list of sets. Make the /ffz command with no arguments display the UI. Add analytics support. Restructured emoticons file. Fix cache bug with Feature Friday. Add massmod and massunmod commands.

This commit is contained in:
SirStendec 2015-01-16 17:45:37 -05:00
parent 2ee748dc6f
commit 2c3af2d51e
12 changed files with 611 additions and 121 deletions

59
src/commands.js Normal file
View file

@ -0,0 +1,59 @@
var FFZ = window.FrankerFaceZ;
// -----------------
// Mass Unmod
// -----------------
FFZ.chat_commands.massunmod = function(room, args) {
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.";
}
FFZ.chat_commands.massunmod.help = "Usage: /ffz massunmod <list, of, users>\nBroadcaster only. Unmod all the users in the provided list.";
FFZ.chat_commands.massmod = function(room, args) {
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.";
}
FFZ.chat_commands.massmod.help = "Usage: /ffz massmod <list, of, users>\nBroadcaster only. Mod all the users in the provided list.";