Apps Home
|
Create an App
Gender/Grey Silencer
Author:
mastermonster
Description
Source Code
Launch App
Current Users
Created by:
Mastermonster
var unmuted = new Array(); cb.settings_choices = [ {name:'silence_men', type:'choice', choice1:'true', choice2:'false', defaultValue:'false', label: "Silence Men?"}, {name:'silence_women', type:'choice', choice1:'true', choice2:'false', defaultValue:'false', label: "Silence Women?"}, {name:'silence_trans', type:'choice', choice1:'true', choice2:'false', defaultValue:'false', label: "Silence Transgenders?"}, {name:'silence_couples', type:'choice', choice1:'true', choice2:'false', defaultValue:'false', label: "Silence Couples?"}, {name:'silence_greys', type:'choice', choice1:'true', choice2:'false', defaultValue:'false', label: "Silence Greys?"}, {name:'tip_to_unmute', type:'choice', choice1:'true', choice2:'false', defaultValue:'false', label: "Tip To Unmute?"}, {name:'amount_to_unmute', type:'int', minValue:1, maxValue:9999, defaultValue:25, label: "Amount of Tip To Unmute"} ]; cb.onMessage(function (message) { if(message['gender'] == 'm' && cb.settings.silence_men == 'true' && cbjs.arrayContains(unmuted, message['user']) == false){ message['X-Spam'] = true; cb.chatNotice("You are not allowed to talk in this room. Tip " + cb.settings.amount_to_unmute + " to be allowed to speak", message['user']); } else if(message['gender'] == 'f' && cb.settings.silence_women == 'true' && cbjs.arrayContains(unmuted, message['user']) == false){ message['X-Spam'] = true; cb.chatNotice("You are not allowed to talk in this room. Tip " + cb.settings.amount_to_unmute + " to be allowed to speak", message['user']); } else if(message['gender'] == 's' && cb.settings.silence_trans == 'true' && cbjs.arrayContains(unmuted, message['user']) == false){ message['X-Spam'] = true; cb.chatNotice("You are not allowed to talk in this room. Tip " + cb.settings.amount_to_unmute + " to be allowed to speak", message['user']); } else if(message['gender'] == 'c' && cb.settings.silence_couples == 'true' && cbjs.arrayContains(unmuted, message['user']) == false){ message['X-Spam'] = true; cb.chatNotice("You are not allowed to talk in this room. Tip " + cb.settings.amount_to_unmute + " to be allowed to speak, message['user']"); } else if(message['hasTokens'] == 'false' && cb.settings.silence_greys == 'true' && cbjs.arrayContains(unmuted, message['user']) == false){ message['X-Spam'] = true; cb.chatNotice("You are not allowed to talk in this room. Tip " + cb.settings.amount_to_unmute + " to be allowed to speak", message['user']); } }); cb.onTip(function (tip) { if(cb.settings.tip_to_unmute == 'true'){ if(tip['from_user_gender'] == 'm' && cb.settings.silence_men == 'true' && cbjs.arrayContains(unmuted, tip['from_user']) == false && tip['amount'] >= cb.settings.amount_to_unmute){ unmuted[unmuted.length] = tip['from_user']; cb.chatNotice("Thank you for the tip, you may now speak", tip['from_user']); } else if(tip['from_user_gender'] == 'f' && cb.settings.silence_women == 'true' && cbjs.arrayContains(unmuted, tip['from_user']) == false && tip['amount'] >= cb.settings.amount_to_unmute){ unmuted[unmuted.length] = tip['from_user']; cb.chatNotice("Thank you for the tip, you may now speak", tip['from_user']); } else if(tip['from_user_gender'] == 's' && cb.settings.silence_trans == 'true' && cbjs.arrayContains(unmuted, tip['from_user']) == false && tip['amount'] >= cb.settings.amount_to_unmute){ unmuted[unmuted.length] = tip['from_user']; cb.chatNotice("Thank you for the tip, you may now speak", tip['from_user']); } else if(tip['from_user_gender'] == 'c' && cb.settings.silence_couples == 'true' && cbjs.arrayContains(unmuted, tip['from_user']) == false && tip['amount'] >= cb.settings.amount_to_unmute){ unmuted[unmuted.length] = tip['from_user']; cb.chatNotice("Thank you for the tip, you may now speak", tip['from_user']); } else { cb.chatNotice("Thank you for the tip, but you must tip " +cb.settings.amount_to_unmute + " to speak in the room", tip['from_user']); } } else { cb.chatNotice("Thank you for the tip", tip['from_user']); } });
© Copyright Freesexcam 2011- 2024. All Rights Reserved.