Bots Home
|
Create an App
Carps Bot
Author:
katysmod
Description
Source Code
Launch Bot
Current Users
Created by:
Katysmod
var autoBot = { // Commands the room owner and moderators can use unsilenceCommand: '/unsil', silenceCommand: '/silence', silenceListCommand: '/silencelist', silenceManyCommand: '/silenceMany', statsCommand: '/amstats', addCommand: '/add', addManyCommand: '/addManyWords', deleteCommand: '/del', modeCommand: '/mode', protectCommand: '/protect', unProtectCommand: '/unprotect', protectListCommand: '/protectlist', // Commands that everyone can use helpCommand: '/amhelp', listCommand: '/list', // Useful globals wordBoundary: "(\\s|\\b)", // Data structures for silenced and warned lists silenced: { }, warned: { }, protected: { }, maxWarnings: 1, totalWarnings: 0, totalSilenced: 0, totalMessagesBlocked: 0, // Default patterns for single word matches (covers the three cases) wordPatternStart: '', wordPatternEnd: '', wordPatternMiddle: '', // Default pattern for phrase matches (not as rigorous as the word matcher phrasePatternStart: '', phrasePatternEnd: '', phrasePatternMiddle: '', // Pattern to find phrases in the bad word list phraseFinder: /\s+/i, repeatedCharPattern: /(([:]*)[^\s]*([^\s])\3{6,})/ig, emotePattern: /^:/, capitalised: /^[A-Z][^A-Z]*$/, repeatedCharWhiteListPattern: /(e+w+)/i, actualBanList: "", actualBannedWords: { }, actualBannedPhrases: { }, haveBadWords: false, haveBadPhrases: false } ; // CB app settings cb.settings_choices = [ {name: 'silenced', label: 'Users you want permanently silenced (separated by commas)', type: 'str', minLength: 0, maxLength: 10240, required: false}, {name: 'badwords', label: 'Words or phrases you want to silence users for saying (separated by commas)', type: 'str', minLength: 0, maxLength: 10240, defaultValue: 'bb,baby,babe,show,feet,:goat,:alisricky,:epicake,:speakerlove,:attachment3,:michelleshhh,:tip,:bigsip,:starhot,:HELLO,:alinasquirt4u,:Rocsito,:778787,:lmfao,:jack,:fantastic,:assholeplz,:peanut,:penisdance,:pico,:penis,:hellodick,:fap,:elelol,:chakka,:tokens,:plow,:Tipb2,:plow,:con_2,:778787,:penisdance,:blow,:handjobs,:hello2,:trollface,:sextoy,Erovix,CRACK,Erosbb,nazi,:dickhead,:wang,:wanker,:smilejerk2,:wandky2,:errect,:smilejerk,:shadow,:bj,:dance,:almost,:megusta,:dickhead,:hairypussy,:bigsip,:lmao,:oo,:kissy,:gangsta,:yawn,:innocent,:help,:rofl,:bow,:upset,:what,:hearts,:yes,:thumbsup,:hello,:crazy,:smoke,:bounce,:angel,:woot,:wink,:thumbup,:thumbdown,:smile,:sad,:ohmy,:mellow,:roll,:huh,:drool,:cry,:cool,:confused,:curse,:blush,EvaCam,Top Games Crack,twitter,skype,sky pe,facebook,:tip,:follow,:follo,:iambmg,:iambmg2,:iambmg3,:iambmg4,:whower,:whower2,:dickplease,:rubmycock,:ophelia'}, {name: 'blockRepeatedChars', type: 'choice', label: 'Also block messages with lots of repeated letters (e.g. mmmmmmmmmmmm)', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'allCapsChanger', type: 'choice', label: 'Also change all caps messages to lowercase (doesn\'t affect emotes e.g. :HELLO)', choice1: 'Yes', choice2: 'No', defaultValue: 'Yes'}, {name: 'maxWarnings', label: 'Number of times to warn users before permanently silencing them (enter 0 to silence on first offence)', type: 'int', minValue: 0, maxValue: 10, defaultValue: 5}, {name: 'hideOrSilence', type: 'choice', label: 'Just Hide messages with the bad words, or completely Silence users who use the the bad words after being warned', choice1: 'Hide', choice2: 'Silence', defaultValue: 'Hide'}, {name: 'allowTipToUnsilence', type: 'choice', label: 'Allow users to tip to become unsilenced', choice1: 'Yes', choice2: 'No', defaultValue: 'No'}, {name: 'tokensToBeUnsilenced', label: 'Minimum size of tip to become unsilenced', type: 'int', minValue: 0, defaultValue: 50}, {name: 'usersToProcess', label: 'User groups whose messages will be moderated (fan club members are always safe, users who have tipped within the last 24hrs are counted as blues)', type: 'choice', choice1: 'Greys only', choice2: 'Greys & Blues', defaultValue: 'Greys & Blues'} ]; cb.onMessage(function (msg) { return autoBot.onMessage(msg); }); cb.onTip(function (tip) { autoBot.onTip(tip); }); // Main on message callback function autoBot.onMessage = function (msg) { // vars for ease of use var m = msg['m']; var u = msg['user']; // check for action if (m[0] == '/') { // don't print commands msg['X-Spam'] = true; // Remove trailing spaces m = m.replace(/\s+$/, ''); // Find command parameters var commandParts = m.split(/\s+/); var commandName = commandParts[0]; cb.log(u + ' issued command: ' + commandName); // check if controller (owner or moderator) if (!this.canControlBot(msg)) { if (commandName == this.listCommand) { this.printBannedItemsMessage(u); } else if (commandName == this.helpCommand) { this.usage(msg); } else { // cb.chatNotice('Only the broadcaster and moderators can use that command!', u); } } else { if (commandName == this.unsilenceCommand && commandParts.length > 1) // unsilence with username parameter { var commandParam = commandParts[1]; if (this.unSilenceUser(commandParam)) { cb.chatNotice('User ' + commandParam + ' has been unsilenced by ' + u); cb.chatNotice('You have been unsilenced by ' + u + ' however if you break the rules again, you will be warned and/or silenced.', commandParam); } else { cb.chatNotice('User ' + commandParam + ' was not on the unsilence list.', u); } } else if (commandName == this.silenceCommand && commandParts.length > 1) // silence with username parameter { var commandParam = commandParts[1]; if (this.silenceUser(commandParam)) { cb.chatNotice('User ' + commandParam + ' has been silenced by ' + u + ' probably for breaking room rules.'); cb.chatNotice('You have been silenced by ' + u + ' probably for breaking room rules.', commandParam); if (cb.settings.allowTipToUnsilence == "Yes") { cb.chatNotice('You can tip ' + cb.settings.tokensToBeUnsilenced + ' tokens or more in one tip to become unsilenced.', commandParam); } } else { cb.chatNotice('User ' + commandParam + ' was already on the silence list.', u); } } else if (commandName == this.protectCommand && commandParts.length > 1) // protect with username parameter { var commandParam = commandParts[1]; if (this.protectUser(commandParam)) { cb.chatNotice('You have been protected by ' + u + ' so your messages won\'t be moderated by the auto-moderator bot however if you behave badly you may be unprotected.', commandParam); cb.chatNotice('You have protected ' + commandParam, u); } else { cb.chatNotice('User ' + commandParam + ' was already on the protect list.', u); } } else if (commandName == this.unProtectCommand && commandParts.length > 1) // unprotect with username parameter { var commandParam = commandParts[1]; if (this.unProtectUser(commandParam)) { cb.chatNotice('You have been unprotected by ' + u + ' so your messages will now be moderated by the auto-moderator bot.', commandParam); cb.chatNotice('You have unprotected ' + commandParam, u); } else { cb.chatNotice('User ' + commandParam + ' was not on the protect list.', u); } } else if (commandName == this.protectListCommand) // show protect list { cb.chatNotice('Protect list: ' + Object.keys(autoBot.protected), u); } else if (commandName == this.silenceListCommand) // show protect list { cb.chatNotice('Silence list: ' + Object.keys(autoBot.silenced), u); } else if (commandName == this.modeCommand && commandParts.length > 1) // mode command with parameter { var commandParam = commandParts[1]; if (commandParam == 'silence') { if (cb.settings.hideOrSilence == 'Hide') { cb.chatNotice('Changing to silence mode', u); cb.settings.hideOrSilence = 'Silence'; } else { cb.chatNotice('Already in silence mode', u); } } else if (commandParam == 'hide') { if (cb.settings.hideOrSilence == 'Silence') { cb.chatNotice('Changing to hide mode', u); cb.settings.hideOrSilence = 'Hide'; } else { cb.chatNotice('Already in hide mode', u); } } else { cb.chatNotice('Unrecognised mode: ' + commandParam, u); this.usage(msg); } } else if (commandName == this.statsCommand) // stats { cb.chatNotice('Auto-moderator stats', u); cb.chatNotice('Messages blocked: ' + this.totalMessagesBlocked, u); if (cb.settings.hideOrSilence == 'Silence') { cb.chatNotice('Warnings issued: ' + this.totalWarnings, u); cb.chatNotice('Users silenced: ' + this.totalSilenced, u); } } else if (commandParts[0] == this.helpCommand) // help { this.usage(msg); } else if (commandParts[0] == this.listCommand) // help { this.printBannedItemsMessage(u); } else if (commandParts[0] == this.addCommand && commandParts.length > 1) // add word/phrase { if (commandParts.length > 2) { // phrase commandParts.shift(); var localPhrase = commandParts.join(' '); this.addToActualBanList(localPhrase, 'phrase'); this.buildBanLists(); cb.chatNotice("Added new phrase [" + localPhrase + "] to banned list", u); } else { this.addToActualBanList(commandParts[1], 'word'); this.buildBanLists(); cb.chatNotice("Added new word [" + commandParts[1] + "] to banned list", u); } } else if (commandParts[0] == this.addManyCommand && commandParts.length > 1) // add many words { if (/,/.test(m)) { cb.chatNotice("You must use spaces not commas as the separator for the /addManyWords command, not processing"); } else { commandParts.shift(); for (var jj = 0; jj < commandParts.length; jj++) { this.addToActualBanList(commandParts[jj], 'word'); } this.buildBanLists(); cb.chatNotice("Added new words [" + commandParts.join(',') + "] to banned list", u); } } else if (commandParts[0] == this.deleteCommand && commandParts.length > 1) // delete word/phrase { if (commandParts.length > 2) { // phrase commandParts.shift(); var localPhrase = commandParts.join(' '); if (this.removeFromActualBanList(localPhrase, 'phrase')) { this.buildBanLists(); cb.chatNotice("Deleted phrase [" + localPhrase + "] from banned list", u); } else { cb.chatNotice("Phrase [" + localPhrase + "] was not found in banned list, can't remove", u); } } else { if (this.removeFromActualBanList(commandParts[1], 'word')) { this.buildBanLists(); cb.chatNotice("Deleted word [" + commandParts[1] + "] from banned list", u); } else { cb.chatNotice("Word [" + commandParts[1] + "] was not found in banned list, can't remove", u); } } } // else { // cb.chatNotice('Command \'' + commandName + '\' not recognised.', u); // this.usage(msg); // } } } else if (this.isSilenced(u)) { cb.chatNotice('Your message was rejected because you have been silenced because you ignored the warnings about banned words or behaviour (either this session on or a previous occasion), your messages won\'t be seen by anyone else', u); msg['X-Spam'] = true; this.totalMessagesBlocked++; if (cb.settings.allowTipToUnsilence == "Yes") { cb.chatNotice('You can tip ' + cb.settings.tokensToBeUnsilenced + ' tokens or more in one tip to become unsilenced.', u); } } else { if (!autoBot.canControlBot(msg)) { // Block all caps for everyone except controllers // All caps changer if (cb.settings.allCapsChanger == "Yes") { var parts = m.split(" "); var cleaned = []; for (var kk = 0; kk < parts.length; kk++) { var word = parts[kk]; if (this.emotePattern.test(word) || this.capitalised.test(word)) { cleaned.push(word); } else { cleaned.push(word.toLowerCase()); } } m = cleaned.join(' '); } } if (this.canProcessContent(msg)) { //cb.log('Checking content of message'); // Not room owner or moderator and not silenced so test message content against patterns // Special unicode blocker for cunning spammers for (var i = 0; i < msg['m'].length; i++) { if (msg['m'].charCodeAt(i) >= 65280 && msg['m'].charCodeAt(i) <= 65519) { msg['X-Spam'] = true; break; } } var bannedWord = this.hasBannedWord(m); if (bannedWord) { msg['X-Spam'] = true; this.totalMessagesBlocked++; this.doBanOrSilence(u, bannedWord); } else { var bannedPhrase = this.hasBannedPhrase(m); if (bannedPhrase) { msg['X-Spam'] = true; this.totalMessagesBlocked++; this.doBanOrSilence(u, bannedPhrase); } else { var repeatedChars = this.hasRepeatedChars(m); if (repeatedChars) { msg['X-Spam'] = true; this.totalMessagesBlocked++; this.doBanOrSilence(u, repeatedChars); } } } } else { //cb.log('Not checking content of message because user is a controller, or settings set to greys only or on protected list'); } } msg['m'] = m; return msg; } ; autoBot.canProcessContent = function (msg) { if (this.canControlBot(msg) || msg['in_fanclub'] || autoBot.isProtected(msg['user'])) { // Owner, moderator or fan club or protected return false; } else { if (cb.settings.usersToProcess == 'Greys only') { if (msg['has_tokens'] || msg['tipped_recently']) { // Blue or recently blue return false; } // Greys are the only ones left by this point return true; } else { // Everyone left return true; } } }; autoBot.protectUser = function (username) { if (this.isProtected(username)) { return false; } else { this.protected[username] = 1; this.unSilenceUser(username); return true; } }; autoBot.unProtectUser = function (username) { if (this.isProtected(username)) { delete this.protected[username]; return true; } else { return false; } }; autoBot.isProtected = function (username) { return username in autoBot.protected; }; autoBot.doBanOrSilence = function (u, badThing) { // Used a bad word or phrase if (cb.settings.hideOrSilence == 'Silence') { // cb.log("Doing silence routine"); if (u in this.warned) { this.warned[u] = {'warnedScore': this.warned[u].warnedScore + 1}; } else { this.warned[u] = {'warnedScore': 1}; } // cb.log("Warned: " + u + " " + this.warned[u].warnedScore + " times."); this.totalWarnings++; // Actually silence users who have been warned more than threshold if (this.warned[u].warnedScore > cb.settings.maxWarnings) { // Silence the user this.silenceUser(u); cb.chatNotice('You have been silenced because you ignored the warnings and said "' + badThing + '" which is on the banned list, your messages won\'t be seen by anyone else', u); cb.chatNotice('User ' + u + ' has been silenced by the autosilence bot'); cb.chatNotice('Broadcaster: you can unsilence this user by typing the following:\n' + this.unsilenceCommand + ' ' + u, cb.room_slug); } else { // Actually warn the user var remainingWarnings = (cb.settings.maxWarnings - this.warned[u].warnedScore) + 1; if (remainingWarnings > 1) { cb.chatNotice('Your last message was rejected because you said "' + badThing + '" which is on the banned list. If you do this ' + remainingWarnings + ' more times, you will be permanently silenced and all of you messages will be rejected.', u); cb.chatNotice('To see the full banned list, type /list', u); } else { cb.chatNotice('Your last message was rejected because you said "' + badThing + '" which is on the banned list. If you do this again, you will be permanently silenced and all of you messages will be rejected.', u); cb.chatNotice('To see the full banned list, type /list', u); } } } else { // Just hide this message cb.chatNotice('Your last message was rejected because you said "' + badThing + '" which is on the banned list.', u); cb.chatNotice('To see the full banned list, type /list', u); } }; autoBot.onTip = function (tip) { var amountTipped = parseInt(tip['amount']); if (cb.settings.allowTipToUnsilence == "Yes" && this.isSilenced(tip['from_user'])) { if (amountTipped >= cb.settings.tokensToBeUnsilenced) { this.unSilenceUser(tip['from_user']); cb.chatNotice('User ' + tip['from_user'] + ' has been unsilenced because they tipped at least ' + cb.settings.tokensToBeUnsilenced + ' tokens'); } } }; autoBot.hasBannedWord = function (text) { if (!this.haveBadWords) { // No banned words return false; } else { var match; while (match = this.wordPatternStart.exec(text)) { if (match[1] != cb.room_slug) { cb.log("Matched " + match[1] + " on word start"); this.wordPatternStart.lastIndex = 0; return match[1]; } } while (match = this.wordPatternEnd.exec(text)) { if (match[2] != cb.room_slug) { cb.log("Matched " + match[2] + " on word end"); this.wordPatternEnd.lastIndex = 0; return match[2]; } } while (match = this.wordPatternMiddle.exec(text)) { if (match[2] != cb.room_slug) { cb.log("Matched " + match[2] + " on word middle"); this.wordPatternMiddle.lastIndex = 0; return match[2]; } } } // cb.log("No banned words found"); return false; }; autoBot.hasBannedPhrase = function (text) { if (!this.haveBadPhrases) { // No banned words return false; } else { var match; while (match = this.phrasePatternStart.exec(text)) { if (match[1] != cb.room_slug) { cb.log("Matched " + match[1] + " on phrase start"); this.phrasePatternStart.lastIndex = 0; return match[1]; } } while (match = this.phrasePatternEnd.exec(text)) { if (match[2] != cb.room_slug) { cb.log("Matched " + match[2] + " on phrase end"); this.phrasePatternEnd.lastIndex = 0; return match[2]; } } while (match = this.phrasePatternMiddle.exec(text)) { if (match[2] != cb.room_slug) { cb.log("Matched " + match[2] + " on phrase middle"); this.phrasePatternMiddle.lastIndex = 0; return match[2]; } } } // cb.log("No banned phrases found"); return false; }; autoBot.hasRepeatedChars = function (text) { if (cb.settings.blockRepeatedChars == 'Yes') { var match; while (match = this.repeatedCharPattern.exec(text)) { if (!match[2] && !(match[1] == cb.room_slug)) { // Only return true if the 'word' isn't an emoticon code // Check whitelist if (autoBot.repeatedCharWhiteListPattern.test(match[1])) { // cb.log("Whitelisted repeated word"); return false; } // Didn't hit whitelist so this is a rejection // cb.log("Found repeated letters"); this.repeatedCharPattern.lastIndex = 0; return match[1]; } } // None found so ok return false; } // feature turned off so ok return false; }; autoBot.printBannedItemsMessage = function (user) { cb.chatNotice('Banned words and phrases: ' + this.actualBanList, user); if (cb.settings.blockRepeatedChars == 'Yes') { cb.chatNotice('Messages with lots of repeated characters (e.g. mmmmmmm) are also banned', user); } }; autoBot.usage = function (msg) { var u = msg['user']; cb.chatNotice('Available commands:', u); if (this.canControlBot(msg)) { cb.chatNotice(this.unsilenceCommand + ' <username> - unsilence <username>', u); cb.chatNotice(this.silenceCommand + ' <username> - silence <username>', u); cb.chatNotice(this.silenceListCommand + ' show list of silenced users', u); cb.chatNotice(this.protectCommand + ' <username> - protect <username> (they won\'t be moderated by the bot, automatically unsilences them)', u); cb.chatNotice(this.unProtectCommand + ' <username> - unprotect <username> (they will be moderated by the bot again', u); cb.chatNotice(this.protectListCommand + ' show list of protected users', u); cb.chatNotice(this.statsCommand + ' - show stats on total messages blocked, users silenced etc.', u); cb.chatNotice(this.addCommand + ' <word/phrase> - add word or phrase to banned list for this session only', u); cb.chatNotice(this.deleteCommand + ' <word/phrase> - delete word or phrase from banned list for this session only', u); cb.chatNotice(this.modeCommand + ' hide - change to hide mode', u); cb.chatNotice(this.modeCommand + ' silence - change to silence mode', u); } cb.chatNotice(this.listCommand + ' - print list of current banned words', u); cb.chatNotice(this.helpCommand + ' - show this help message', u); }; autoBot.silenceUser = function (username) { if (this.isSilenced(username)) { return false; } else { this.silenced[username] = 1; this.totalSilenced++; return true; } }; autoBot.unSilenceUser = function (username) { if (this.isSilenced(username)) { delete this.silenced[username]; delete this.warned[username]; return true; } else { return false; } }; autoBot.isSilenced = function (username) { return (username in this.silenced); }; autoBot.canControlBot = function (msg) { return (msg['user'] == cb.room_slug || msg.is_mod); }; autoBot.grabSettings = function () { if (cb.settings.silenced) { var silencedSettings = cb.settings.silenced.replace(/\s+/, ",").split(','); for (var ii = 0; ii < silencedSettings.length; ii++) { this.silenced[silencedSettings[ii]] = {'u': 1}; } } if (cb.settings.badwords) { var badWordsSettings = cb.settings.badwords.split(','); for (var ii = 0; ii < badWordsSettings.length; ii++) { // Trim leading and following spaces var clean = badWordsSettings[ii].replace(/^\s+/, ""); clean = clean.replace(/\s+$/, ""); // Check still something left to add! if (clean.length > 1) { if (this.phraseFinder.test(clean)) { // Only add phrases which are long enough (likely to have 2 chars in each word) if (clean.length > 4) { this.addToActualBanList(clean, 'phrase'); } else { cb.chatNotice("WARNING: This phrase was too short (must be at least 4 letters long), didn't add to list: " + clean, cb.room_slug); } } else { this.addToActualBanList(clean, 'word'); } } else { cb.chatNotice("WARNING: This word was too short (must be at least 2 letters long), didn't add to list: " + clean, cb.room_slug) } } this.buildBanLists(); } }; autoBot.addToActualBanList = function (item, type) { if (type == 'phrase') { var lengthBefore = this.actualBannedPhrases.length; this.actualBannedPhrases[item] = {u: 1}; var diff = this.actualBannedPhrases.length - lengthBefore; if (diff > 0) { return true; } } else if (type == 'word') { var lengthBefore = this.actualBannedWords.length; this.actualBannedWords[item] = {u: 1}; var diff = this.actualBannedWords.length - lengthBefore; if (diff > 0) { return true; } } else { cb.log("Unrecognised type [" + type + "] for item [" + item + "]"); return false; } }; autoBot.removeFromActualBanList = function (item, type) { if (type == 'phrase') { var lengthBefore = Object.keys(this.actualBannedPhrases).length; delete this.actualBannedPhrases[item]; var diff = Object.keys(this.actualBannedPhrases).length - lengthBefore; if (diff < 0) { return true; } } else if (type == 'word') { var lengthBefore = Object.keys(this.actualBannedWords).length; delete this.actualBannedWords[item]; var diff = Object.keys(this.actualBannedWords).length - lengthBefore; if (diff < 0) { return true; } } else { cb.log("Unrecognised type [" + type + "] for item [" + item + "]"); return false; } return false; }; autoBot.buildBanLists = function () { this.actualBanList = ""; var maxLineLength = 60; var currentLineLength = 0; if (Object.keys(this.actualBannedWords).length > 0) { // cb.log("have banned words"); this.haveBadWords = true; var localBadWordPattern = '(' + Object.keys(this.actualBannedWords).join('|') + ')'; // cb.log("Builder: " + localBadWordPattern); this.wordPatternStart = new RegExp('^' + localBadWordPattern + '' + this.wordBoundary, 'ig'); this.wordPatternEnd = new RegExp(this.wordBoundary + localBadWordPattern + '$', 'ig'); this.wordPatternMiddle = new RegExp(this.wordBoundary + localBadWordPattern + this.wordBoundary, 'ig'); // this.actualBanList += localBadWordPattern; for (var word in this.actualBannedWords) { if (currentLineLength == 0) { this.actualBanList += word; currentLineLength = word.length; } else if ((currentLineLength + word.length) > maxLineLength) { this.actualBanList += '\n' + word; currentLineLength = word.length; } else { this.actualBanList += ',' + word; currentLineLength += word.length; } } } if (Object.keys(this.actualBannedPhrases).length > 0) { this.haveBadPhrases = true; // cb.log("have banned phrases"); var localBadPhrasePattern = '(' + Object.keys(this.actualBannedPhrases).join('|') + ')'; // cb.log("Builder" + localBadPhrasePattern); this.phrasePatternStart = new RegExp('^' + localBadPhrasePattern + this.wordBoundary, 'ig'); this.phrasePatternEnd = new RegExp(this.wordBoundary + localBadPhrasePattern + '$', 'ig'); this.phrasePatternMiddle = new RegExp(this.wordBoundary + localBadPhrasePattern + this.wordBoundary, 'ig'); // this.actualBanList += localBadPhrasePattern; for (var word in this.actualBannedPhrases) { if (currentLineLength == 0) { this.actualBanList += word; currentLineLength = word.length; } else if ((currentLineLength + word.length) > maxLineLength) { this.actualBanList += '\n' + word; currentLineLength = word.length; } else { this.actualBanList += ',' + word; currentLineLength += word.length; } } } }; autoBot.wrapText = function (item, pre, suf) { return pre + item + suf; }; autoBot.init = function () { this.grabSettings(); cb.chatNotice('The auto-moderator bot hides messages containing words or phrases that the broadcaster has banned. It may also automatically silence all messages from users who repeatedly use these words.\nIf one of your messages is hidden you will be notified to help you avoid it in future.'); this.printBannedItemsMessage(); cb.chatNotice('To see the available commands, type /help into the chat window', cb.room_slug); cb.chatNotice('The auto-moderator bot was written by asdfghjkl28 but modified by Andro.') }; autoBot.init();
© Copyright Chaturbate 2011- 2026. All Rights Reserved.