Bots Home
|
Create an App
Memnoch Bot
Author:
memnoch91
Description
Source Code
Launch Bot
Current Users
Created by:
Memnoch91
///////////////////////////////////////////////// // PROTOTYPE ET FONCTIONS // ! Non modifiable String.prototype.format = function () { var newString = String(this); for (var i = 0; i < arguments.length; i++) { newString = newString.replace('{' + i + '}', arguments[i]); } return String(newString); } String.prototype.genre=function(){ var newString=String(this) var mS=newString.match(/\[m:.*?]/) var fS=newString.match(/\[f:.*?]/) var tS=newString.match(/\[t:.*?]/) var cS=newString.match(/\[c:.*?]/) switch (arguments[0]){ case 'c': if (!isUndefined(cS)){ if (cS.length>0){ for (var i=0;i<cS.length;i++){ newString=newString.replace(cS[i],cS[i].substring(3,cS[i].length-1)) } }else{ if (!isUndefined(mS)){ if(mS.length>0){ for (var i=0;i<mS.length;i++){ newString=newString.replace(mS[i],mS[i].substring(3,mS[i].length-1)) } } } } }else{ if (!isUndefined(mS)){ if(mS.length>0){ for (var i=0;i<mS.length;i++){ newString=newString.replace(mS[i],mS[i].substring(3,mS[i].length-1)) } } } } break; case 't': if (!isUndefined(tS)){ if (tS.length>0){ for (var i=0;i<tS.length;i++){ newString=newString.replace(tS[i],tS[i].substring(3,tS[i].length-1)) } }else{ if (!isUndefined(mS)){ if(mS.length>0){ for (var i=0;i<mS.length;i++){ newString=newString.replace(mS[i],mS[i].substring(3,mS[i].length-1)) } } } } }else{ if (!isUndefined(mS)){ if(mS.length>0){ for (var i=0;i<mS.length;i++){ newString=newString.replace(mS[i],mS[i].substring(3,mS[i].length-1)) } } } } break; case 'f': if (!isUndefined(fS)){ if (fS.length>0){ for (var i=0;i<fS.length;i++){ newString=newString.replace(fS[i],fS[i].substring(3,fS[i].length-1)) } }else{ if (!isUndefined(mS)){ if(mS.length>0){ for (var i=0;i<mS.length;i++){ newString=newString.replace(mS[i],mS[i].substring(3,mS[i].length-1)) } } } } }else{ if (!isUndefined(mS)){ if(mS.length>0){ for (var i=0;i<mS.length;i++){ newString=newString.replace(mS[i],mS[i].substring(3,mS[i].length-1)) } } } } break; case 'm': if (!isUndefined(mS)){ if(mS.length>0){ for (var i=0;i<mS.length;i++){ newString=newString.replace(mS[i],mS[i].substring(3,mS[i].length-1)) } } } break; } for (var i=0;i<mS.length;i++){ newString=newString.replace(mS[i],"") } for (var i=0;i<fS.length;i++){ newString=newString.replace(fS[i],"") } for (var i=0;i<cS.length;i++){ newString=newString.replace(cS[i],"") } for (var i=0;i<tS.length;i++){ newString=newString.replace(tS[i],"") } return String(newString) } String.prototype.isInt = function () { return isInt(this) } String.prototype.match=function(){ var regex =new RegExp(arguments[0]) var str = String(this) if (regex.test(str)==false){ var arr=[] return arr }else{ return regex.exec(str) } } function isInt (value) { return !isNaN(value) && parseInt(Number(value)) == value && !isNaN(parseInt(value, 10)); }; function valIfUndefined (test,valIf){ if (isUndefined(test)){ return valIf }else{ return test } }; function valIfTrue(test,val,valIf){ if(test==val){ return valIf }else{ return test } }; function valIfTrueElse(test,val,valIf,valElse){ if(test==val){ return valIf }else{ return valElse } } function isUndefined (test) { return (test == undefined || test == "" || test == 0 || test==null); }; function Ran (min, max) { return Math.floor(Math.random() * (max - min +1)) + min; }; function isSuperuser (username, isMod) { return (username == cb.room_slug || isMod); }; function retourLigne (strBase,newStr){ var output=strBase output+=valIfTrueElse((output!="" && newStr!=""),true,"\n","")+newStr return output } function alert(msg){ message.sendMessageToGroup(null,msg) } function isInArray(arr,i){ if (arr.length==0){ return -1 }else{ if (i<0){ return 0 }else if (i>arr.length-1){ return arr.length-1 }else{ return i } } } function nbrOccurence(chaine,occ){ var mot2 = chaine.split(occ); var nbre_de_fois_trouve = mot2.length-1; return nbre_de_fois_trouve; } var message={ sendMessageToUser(userName,mess,fontColor,backgroundColor,fontBold){ this.send(mess,userName,null,fontColor,backgroundColor,fontBold) }, sendMessageExceptUser(userName,mess,fontColor,backgroundColor,fontBold){ for (us in utilisateurs.utilisateurs){ if (us.name!=userName && us.connected==true){ this.send(mess,us.name,null,fontColor,backgroundColor,fontBold) } } }, sendMessageToGroup(group,mess,fontColor,backgroundColor,fontBold){ this.send(mess,null,group,fontColor,backgroundColor,fontBold) }, send(message,utilisateurName,group,couleurTexte,couleurFond,bold){ cb.setTimeout(function(){ var m = message var c = valIfUndefined(couleurTexte,Colours.Black) var f = valIfUndefined(couleurFond,Colours.White) var b = valIfUndefined(bold,'normal') if (!isUndefined(utilisateurName) && !isUndefined(group)) { cb.sendNotice(m, null, f, c, b, group); cb.sendNotice(m, utilisateurName, f, c, b, null); }else if (!isUndefined(utilisateurName) && isUndefined(group)){ cb.sendNotice(m, utilisateurName, f, c, b, null); }else if (isUndefined(utilisateurName) && !isUndefined(group)){ cb.sendNotice(m, null, f, c, b, group); }else if (isUndefined(utilisateurName) && isUndefined(group)) { cb.sendNotice(m, null, f, c, b, null); } },10) }, }; class TabAsso{ constructor(){ this.Tab=[] } isExist(Cle){ for (var i=0;i<this.Tab.length;i++){ if (this.Tab[i].C==Cle){ return true } } return false } add(Cle,Object){ if (this.isExist(Cle)){ this.get(Cle).O=Object }else{ this.Tab.push({C:Cle,O:Object}) } } get(Cle){ for(var i=0;i<this.Tab.length;i++){ if (this.Tab[i].C==Cle){ return this.Tab[i].O } } return undefined } remove(Cle){ for(var i=0;i<this.Tab.length;i++){ if (this.Tab[i].C==Cle){ this.Tab.splice(i,1) i=this.Tab.length } } } all(withCle){ var arr=[] if (!isUndefined(withCle)){ return this.Tab }else{ for (var i = 0;i<this.Tab.length;i++){ arr.push(this.Tab[i].O) } return arr } } index(Index){ var I = isInArray(this.Tab,Index) if (I==-1){ return undefined }else{ return this.Tab[I].O } } get length(){return this.Tab.length} } ///////////////////////////////////////////////// // VARIABLES GLOBALES // ! Non modifiable var Mod = { Name: "Memnoch Mod", Version: 1.01, Author: "memnoch91", OriginalAuthor: "memnoch91", Debug: false, StartupTime: null, Constants: { languages: 1, welcomeSentences:1, welcomeBackSentences:1, claimTokensSentences:1, tokensThanksSentences:1, incentiveSentences:1, }, }; // ! modifiable var UserConstants = { "memnoch91": { languages: 2, welcomeSentences:2, welcomeBackSentences:2, claimTokensSentences:2, tokensThanksSentences:2, incentiveSentences:2, }, }; // ! Non modifiable var Colours = { AliceBlue: "#F0F8FF", AntiqueWhite: "#FAEBD7", Aqua: "#00FFFF", Aquamarine: "#7FFFD4", Azure: "#F0FFFF", Beige: "#F5F5DC", Bisque: "#FFE4C4", Black: "#000000", BlanchedAlmond: "#FFEBCD", Blue: "#0000FF", BlueViolet: "#8A2BE2", Brown: "#A52A2A", BurlyWood: "#DEB887", CadetBlue: "#5F9EA0", Chartreuse: "#7FFF00", Chocolate: "#D2691E", Coral: "#FF7F50", CornflowerBlue: "#6495ED", Cornsilk: "#FFF8DC", Crimson: "#DC143C", Cyan: "#00FFFF", DarkBlue: "#00008B", DarkCyan: "#008B8B", DarkGoldenRod: "#B8860B", DarkGrey: "#A9A9A9", DarkGreen: "#006400", DarkKhaki: "#BDB76B", DarkMagenta: "#8B008B", DarkOliveGreen: "#556B2F", DarkOrange: "#FF8C00", DarkOrchid: "#9932CC", DarkRed: "#8B0000", DarkSalmon: "#E9967A", DarkSeaGreen: "#8FBC8F", DarkSlateBlue: "#483D8B", DarkSlateGrey: "#2F4F4F", DarkTurquoise: "#00CED1", DarkViolet: "#9400D3", DeepPink: "#FF1493", DeepSkyBlue: "#00BFFF", DimGrey: "#696969", DodgerBlue: "#1E90FF", FireBrick: "#B22222", FloralWhite: "#FFFAF0", ForestGreen: "#228B22", Fuschia: "#FF00FF", Gainsboro: "#DCDCDC", GhostWhite: "#F8F8FF", Gold: "#FFD700", GoldenRod: "#DAA520", Grey: "#808080", Green: "#008000", GreenYellow: "#ADFF2F", HoneyDew: "#F0FFF0", HotPink: "#FF69B4", IndianRed: "#CD5C5C", Indigo: "#4B0082", Ivory: "#FFFFF0", Khaki: "#F0E68C", Lavender: "#E6E6FA", LavenderBlush: "#FFF0F5", LawnGreen: "#7CFC00", LemonChiffon: "#FFFACD", LightBlue: "#ADD8E6", LightCoral: "#F08080", LightCyan: "#E0FFFF", LightGoldenRodYellow: "#FAFAD2", LightGrey: "#D3D3D3", LightGreen: "#90EE90", LightPink: "#FFB6C1", LightSalmon: "#FFA07A", LightSeaGreen: "#20B2AA", LightSkyBlue: "#87CEFA", LightSlateGrey: "#778899", LightSteelBlue: "#B0C4DE", LightYellow: "#FFFFE0", Lime: "#00FF00", LimeGreen: "#32CD32", Linen: "#FAF0E6", Magenta: "#FF00FF", Maroon: "#800000", MediumAquaMarine: "#66CDAA", MediumBlue: "#0000CD", MediumOrchid: "#BA55D3", MediumPurple: "#9370DB", MediumSeaGreen: "#3CB371", MediumSlateBlue: "#7B68EE", MediumSpringGreen: "#00FA9A", MediumTurquoise: "#48D1CC", MediumVioletRed: "#C71585", MidnightBlue: "#191970", MintCream: "#F5FFFA", MistyRose: "#FFE4E1", Moccasin: "#FFE4B5", NavajoWhite: "#FFDEAD", Navy: "#000080", OldLace: "#FDF5E6", Olive: "#808000", OliveDrab: "#6B8E23", Orange: "#FFA500", OrangeRed: "#FF4500", Orchid: "#DA70D6", PaleGoldenRod: "#EEE8AA", PaleGreen: "#98FB98", PaleTurquoise: "#AFEEEE", PaleVioletRed: "#DB7093", PapayaWhip: "#FFEFD5", PeachPuff: "#FFDAB9", Peru: "#CD853F", Pink: "#FFC0CB", Plum: "#DDA0DD", PowderBlue: "#B0E0E6", Purple: "#800080", Red: "#FF0000", RosyBrown: "#BC8F8F", RoyalBlue: "#4169E1", SaddleBrown: "#8B4513", Salmon: "#FA8072", SandyBrown: "#F4A460", SeaGreen: "#2E8B57", SeaShell: "#FFF5EE", Sienna: "#A0522D", Silver: "#C0C0C0", SkyBlue: "#87CEEB", SlateBlue: "#6A5ACD", SlateGrey: "#708090", Snow: "#FFFAFA", SpringGreen: "#00FF7F", SteelBlue: "#4682B4", Tan: "#D2B48C", Teal: "#008080", Thistle: "#D8BFD8", Tomato: "#FF6347", Turquoise: "#40E0D0", Violet: "#EE82EE", Wheat: "#F5DEB3", White: "#FFFFFF", WhiteSmoke: "#F5F5F5", Yellow: "#FFFF00", YellowGreen: "#9ACD32" }; ///////////////////////////////////////////////// // CONTROLEUR CB // ! Non modifiable if (cb != null) { if (UserConstants[cb.room_slug] != undefined) Mod.Constants = UserConstants[cb.room_slug]; } if (cb == null) { var cb = { settings_choices: [], changeRoomSubject: function (new_subject) { }, drawPanel: function () { }, log: function (message) { }, onDrawPanel: function (func) { }, onEnter: function (func) { }, onLeave: function (func) { }, onMessage: function (func) { }, onShowStatus: function (func) { }, onTip: function (func) { }, room_slug: '', sendNotice: function (message, to_user, background, foreground, weight, to_group) { }, setTimeout: function (func, msec) { }, settings: {}, tipOptions: function (func) { }, limitCam_start: function (message, allowed_users) { }, limitCam_stop: function () { }, limitCam_addUsers: function (allowed_users) { }, limitCam_removeUsers: function (removed_users) { }, limitCam_removeAllUsers: function () { }, limitCam_userHasAccess: function (user) { }, limitCam_allUsersWithAccess: function () { }, limitCam_isRunning: function () { }, }; } cb.settings_choices = [] ///////////////////////////////////////////////// // PARAMETRES PAR DEFAULT // ! Non modifiable var settings={ parseOptions:function(){}, buildHelp(msg,_utilisateur){}, onMessage:function(msg,_utilisateur){ var output="" return output }, ///////////////////////////////////////////////////////////////////////////// toString: function () { var settingsStr = ""; for (var prop in this) { if (typeof (this[prop]) == "string" || typeof (this[prop]) == "boolean" || typeof (this[prop]) == "number") { settingsStr += ", " + prop + ": '" + this[prop] + "'"; } } cb.log(settingsStr.substring(2)); return settingsStr.substring(2); }, }; ///////////////////////////////////////////////// // LES LANGUES // ! Non modifiable var languages={ Cname:"languages", Dname:function(i){return "Lang. {0}".format(i)}, Iname:function(i){return "Language_{0}".format(i)}, Sstring:"> LANGUAGE (<Abrev>,<Name>,<Description>) . . . . . . . . . . . . . . . . . . ", Settings:[], Coll:new TabAsso(), innit:function(){ for (var i=2;i<=Mod.Constants.languages;i++){ var st="" if (i==2){ st+= this.Sstring+"-> "+this.Dname(i) }else{ st="-> "+this.Dname(i) } this.Settings.push({ name: this.Iname(i), label:st, type: 'str', minLength: 0, maxLength: 255, required: false, defaultValue:'' }); } cb.settings_choices = cb.settings_choices.concat(this.Settings); }, parseOptions:function(){ var d = new _language(1,'En','English','For an English traduction',true) this.Coll.add('En',d) var z=1; for (var i = 2; i <= Mod.Constants[this.Cname]; i++) { if (!isUndefined(cb.settings[this.Iname(i)])){ var Arr= cb.settings[this.Iname(i)].split(',') if (Arr.length==3){ z++; var cl = new _language(z,Arr[0],Arr[1],Arr[2],false) this.Coll.add(Arr[0],cl) } } } }, buildHelp:function(msg,_utilisateur){ var output = "" //if (_utilisateur.isSuperuser){ output += "############# LANGUAGE COMMAND LINE #############"; output += "\n/l => display a list of all language"; if (this.All.length>1){ output += "\n/l <abrev> => change your current language to <abrev></span> (for exemple : '/l " + this.defaultLanguage.Abrev+"' for " + this.defaultLanguage.Name +" language)" } return output }, onMessage:function(msg,_utilisateur){ var output="" if (msg[0]=="l" && msg.length==1){ output+="############# LANGUAGE LIST #############"; var l=this.All for (var i=0;i<l.length;i++){ output+="\n"+l[i].Index+" -> "+l[i].Abrev+" : "+l[i].Name+" ("+l[i].Descr+")" if (l[i].Abrev==_utilisateur.Language.Abrev){ output+= " -- this is your current language --" } } _utilisateur.sentences.commandMessage(output) }else if (msg[0]=="l" && msg.length==2){ var l = languages.language(msg[1]) if (!isUndefined(l)){ _utilisateur.Language=l }else{ _utilisateur.sentences.commandMessage("'"+ msg[1] + "' is not a valide language. (type '/l' to show a list of available language)") } } }, //----------------------------------------------------------------------------- get All(){ return this.Coll.all() }, get defaultLanguage(){ var all=this.All for (var i = 0 ; i <all.length;i++){ if (all[i].Default==true){ return all[i] } } }, languageByIndex:function(args){ var all=this.All for (var i = 0 ; i <all.length;i++){ if (all[i].Index==args){ return all[i] } } }, language:function(args){ if (isUndefined(args)){ return this.defaultLanguage }else{ if (isInt(args)){ var I=isInArray(this.Coll,args-1) if (I>-1) { return this.Coll[i].O }else{ return undefined } }else{ return this.Coll.get(args) } } } } class _language{ constructor(_Index,_Abrev,_Nom,_Description,_Default){ this.Index=_Index this.Abrev=_Abrev this.Name=_Nom this.Descr=_Description this.Default=_Default } buildHelp(_msg){ var output='' return output } onMessage(_msg,_utilisateur){ var output='' if (_msg=="l" && msg.length==1){ output=this.Index+" -> "+ this.Abrev+' : '+this.Name+' ('+ this.Descr+')' } return output } } //languages.innit() ///////////////////////////////////////////////// // LES UTILISATEURS // ! Non modifiable var utilisateurs={ Coll:new TabAsso(), innit:function(){}, parseOptions:function(){}, buildHelp:function(msg,_utilisateur){ var output="" if (_utilisateur.isSuperUser){ output="############# USERS COMMAND LINE #############"; output += "\n/users => display a list of all users"; output += "\n/usersOn => display a list of all online users"; output += "\n/usersOff => display a list of all offline users"; output += "\n/user <name> => display a list of information about the user <user>"; } return output }, onMessage:function(msg,_utilisateur){ if (_utilisateur.isSuperUser){ var output="" var u = utilisateurs.All if(msg[0]=="users"){ output="########### ALL USERS ###########" for(var i=0;i<u.length;i++){ output=retourLigne(output,u[i].Name) } _utilisateur.sentences.commandMessage(output) }else if(msg[0]=="usersOn"){ output="########### ONLINE USERS ###########" for(var i=0;i<u.length;i++){ if (u[i].Connecte){ output=retourLigne(output,u[i].Name) } } _utilisateur.sentences.commandMessage(output) }else if(msg[0]=="usersOff"){ output="########### ONFFLINE USERS ###########" for(var i=0;i<u.length;i++){ if (u[i].Connecte==false){ output=retourLigne(output,u[i].Name) } } _utilisateur.sentences.commandMessage(output) }else if(msg[0]=="user" && msg.length==2){ if (!isUndefined([msg[1]])){ var u = utilisateurs.user(msg[1]) if (!isUndefined(u)){ output="########### "+u.Name+" INFORMATION ###########" output=retourLigne(output,"----------- Global Informations -----------") output=retourLigne(output,"- Name : "+u.Name) var s="visitor" if (u.isMod){s="Moderator"} if (u.isProp){s="Broadcaster"} output=retourLigne(output,"- Grad. : "+s) s="undefined" if (u.Genre=="m"){s="Male"} if (u.Genre=="f"){s="Female"} if (u.Genre=="c"){s="Couple"} if (u.Genre=="t"){s="Transgenre"} output=retourLigne(output,"- Gender : "+s) output=retourLigne(output,"- Language : "+u.Language.Name) if (u.Connecte){s="Connected"}else{s="Disconnected"} output=retourLigne(output,"- Statut : "+s) output=retourLigne(output,"----------- Tokens Informations -----------") output=retourLigne(output,"- Tokens in this cession : "+u.Tokens.currentCession) _utilisateur.sentences.commandMessage(output) } } }else if(msg[0]=="w"){ _utilisateur.sendWelcome() } } }, //----------------------------------------------------------------------------- get ParamString(){ var output="" for (var i=0;i<this.All.length;i++){ output+=this.All[i].ParamString+"|" } return output }, get All(){ return this.Coll.all() }, user:function(userName){ return this.Coll.get(userName) }, onEnter:function(user){ if (isUndefined(this.user(user.user))){ var u = new _utilisateur(user) u.Connecte=true this.Coll.add(user.user,u) u.sendWelcome() }else{ var u = this.user(user.user) u.Connecte=true } }, onLeave:function(user){ var u = this.user(user.user) u.Connecte=false }, onTip:function(tip){ var u = this.user(tip.from_user) u.Tokens.addToken(parseInt(tip.amount)) } } class _utilisateur{ constructor(user){ this._param={ user:undefined, name:undefined, genre:undefined, connecte:false, lang:'', mod:false, } this.Tokens={ util:undefined, allCession:0, currentCession:0, decompteTip:0, needForThanks:0, addToken:function(val){ this.allCession+=val this.currentCession+=val this.decompteTip+=val // alert(this.currentCession+" - "+ this.needForThanks) if (this.currentCession>=this.needForThanks){ // alert("next thank") this.util.sentences.dialMessage(tokensThanksSentences.Ran(this.util.Language.Abrev).format(this.util.Name)) while(this.needForThanks<this.currentCession+1){ this.needForThanks+=tokensThanksSentences.needed } } }, startDecompte:function(Tok){ var t t=claimTokensSentences.wichDelai(Tok.decompteTip) cb.setTimeout(function(){ if (Tok.util.Connecte){ if(Tok.decompteTip>0){ Tok.decompteTip-- } if (Tok.decompteTip==0){ if(Tok.util.isSuperUser==false){ Tok.util.sentences.dialMessage(claimTokensSentences.Ran(Tok.util.Language.Abrev).format(Tok.util.Name)) } } Tok.startDecompte(Tok) } },(t*1000)) }, } this.Tokens.util=this this.Tokens.needForThanks=tokensThanksSentences.needed this.sentences={ util:undefined, startIncentive:function(Sent){ cb.setTimeout(function(){ if (Sent.util.Connecte){ if(Sent.util.isSuperUser==false){ Sent.util.sentences.dialMessage(incentiveSentences.Ran(Sent.util.Language.Abrev).format(Sent.util.Name)) } Sent.startIncentive(Sent) } },(incentiveSentences.Interval*1000)) }, formatMessage(mess){ return mess.genre(this.util.Genre) }, dialMessage(mess,fontColor,backgroundColor,fontBold){ var f=valIfUndefined(fontColor,Colours.DarkBlue) var b= valIfUndefined(backgroundColor,Colours.white) var bo=valIfUndefined(fontBold,'bold') this.send(this.formatMessage(mess),f,b,bo) }, welcomeMessage(mess,fontColor,backgroundColor,fontBold){ var f=valIfUndefined(fontColor,Colours.White) var b= valIfUndefined(backgroundColor,Colours.DarkBlue) var bo=valIfUndefined(fontBold,'bolder') this.send(this.formatMessage(mess),f,b,bo) }, commandMessage(mess,fontColor,backgroundColor,fontBold){ var f=valIfUndefined(fontColor,Colours.Red) var b= valIfUndefined(backgroundColor,Colours.LightGrey) var bo=valIfUndefined(fontBold,'bold') this.send(this.formatMessage(mess),f,b,bo) }, send:function(mess,fontColor,backgroundColor,fontBold){ var f=valIfUndefined(fontColor,Colours.Black) var b= valIfUndefined(backgroundColor,Colours.White) var bo=valIfUndefined(fontBold,'') var m =mess.genre(this.util.Genre) message.sendMessageToUser(this.util.Name,m,f,b,bo) } } this.sentences.util=this if (!isUndefined(user)){ this._param.user=user this._param.name=user.user this._param.genre=user.gender this._param.mod=user.is_mod } } sendWelcome(){ this.sentences.welcomeMessage(welcomeSentences.Ran(this.Language.Abrev).format(this.Name)) } get Name(){return this._param.name} get Genre(){return this._param.genre} get Connecte(){return this._param.connecte} set Connecte(value){ if (value==true){ this.Tokens.startDecompte(this.Tokens) this.sentences.startIncentive(this.sentences) } this._param.connecte=value } get Language(){ if (!isUndefined(this._param.lang)){ return languages.language(this._param.lang) }else{ return languages.defaultLanguage } } set Language(value){ if(this._param.lang!=value.Abrev){ this._param.lang=value.Abrev this.sendWelcome() } } get isSuperUser(){ if (this.isProp || this.isMod){ return true }else{ return false } } get isProp(){ return (this.Name==cb.room_slug) } get isMod(){return this._param.mod} } ///////////////////////////////////////////////// // LES PHRASES // ! Non modifiable class _Emojis{ constructor(Object){ this.O=Object this.Coll=new TabAsso() } add(Cle,Emo){ this.Coll.add(Cle,Emo) } get Ran(){ var o=this.Coll.index(Ran(1,this.Coll.length)-1) if (!isUndefined(o)){ return o.Emoji }else{ return "" } } get All(){ var arr=this.Coll.all() var ret=[] for (var i=0;i<arr.length;i++){ ret.push(arr[i].Emoji) } return ret } get length(){return this.Coll.length} onMessage(){ var output="" for (var i=0;i<this.Coll.length;i++){ output=retourLigne(output," N°" +(i+1) +" -> " +this.Coll.index(i).onMessage()) } return output } } class _sentenceEmoji{ constructor(str){ this.Str=str } get Emoji(){ return this.Str } static innit(Object){ var I=[{ name: Object.Cname+"Ico", label:Object.Sstring+"-> List of random Emoji", type: 'str', defaultValue: '', required: false }] cb.settings_choices = cb.settings_choices.concat(I); } static parseOptions(Object){ var str = cb.settings[Object.Cname+"Ico"] if (!isUndefined(str)){ var arrA=str.split(" ") var arrB=[] for (var i=0;i<arrA.length;i++){ arrB=arrB.concat(arrA[i].split(";")) } for (var i=0;i<arrB.length;i++){ var im = new _sentenceEmoji(arrB[i]) Object["Emojis"].add(String(i),im) } } } onMessage(){ var output=this.Emoji return output } } class _sentences{ constructor(Object){ this.O=Object this.Coll=new TabAsso() } add(Cle,Sent){ this.Coll.add(Cle,Sent) } Ran(Lang){ var output="" var o=this.Coll.index(Ran(1,this.Coll.length)-1) if (!isUndefined(o)){ output= o.sentence(Lang) }else{ output= "" } return output } All(Lang){ var arr=this.Coll.all() var ret=[] for (var i=0;i<arr.length;i++){ ret.push(arr[i].sentence(Lang)) } return ret } get length(){return this.Coll.length} onMessage(Lang){ var output="" for (var i=0;i<this.Coll.length;i++){ output=retourLigne(output," Sentence N°" +(i+1)) output=retourLigne(output,this.Coll.index(i).onMessage(Lang)) } return output } } class _sentence{ constructor(Object,Index){ this.O=Object this.I=Index this.L=new TabAsso() var trouve=false var z=0 for (var j=1;j<=Mod.Constants.languages;j++){ if (!isUndefined(cb.settings[Object.Iname(this.I,j)])){ trouve=true var l = new _sentenceLang(Object,this.I,j) this.L.add(l.language.Abrev,l) } } if (trouve==true){ this.A=true } } get available(){ return this.A } sentence(Lang,withDefault){ if (!isUndefined(this.L.get(Lang))){ return this.L.get(Lang).sentence }else{ if (isUndefined(withDefault) || withDefault==true){ if (!isUndefined(this.L.get(languages.defaultLanguage.Abrev))){ return this.L.get(languages.defaultLanguage.Abrev).sentence }else{ return this.L.index(1).sentence } }else{ return "" } } } onMessage(Lang){ var output="" if (!isUndefined(Lang)){ var i = languages.language(Lang).Index var s = this.L.index(i) if (s.language.Abrev!=Lang){ output= retourLigne(output,Lang +" -> undefined (replaced by "+s.language.Abrev+ " : "+s.sentence+")") }else{ output= retourLigne(output,s.language.Abrev +" -> "+ s.sentence) } }else{ for (var i=0;i<this.L.length;i++){ var s = this.L.index(i) if (s.sentence==""){ output= retourLigne(output,s.language.Abrev +" -> undefined") }else{ output= retourLigne(output,s.language.Abrev +" -> "+ s.sentence) } } } return output } static innit(Object,defaultValue){ var z=0; var Settings=[]; for (var i=1;i<=Mod.Constants[Object.Cname];i++){ for (var j=1;j<=Mod.Constants.languages;j++){ var st="" if(i==1 && j==1 && Mod.Constants.languages>1){ st += "-> Sent. 1 - Lang. 1" }else if(i==1 && j>1){ st+= "Lang. "+j }else if(i>1 && j==1 && Mod.Constants.languages==1){ st+="-> Sent. "+i }else if (i>1 && j==1 && Mod.Constants.languages>1){ st+="-> Sent. "+i + " - Lang. 1" }else if(i>1 && j>1){ st+="Lang. "+j } if (i==1 && j==1){ Settings.push({ name: Object.Iname(i,j), label:st, type: 'str', minLength: 0, maxLength: 255, required: true, defaultValue:defaultValue }) }else{ Settings.push({ name: Object.Iname(i,j), label:st, type: 'str', minLength: 0, maxLength: 255, required: false, defaultValue: '' }) } } } cb.settings_choices = cb.settings_choices.concat(Settings); } static parseOptions(Object){ for (var i = 1; i <= Mod.Constants[Object.Cname]; i++) { var trouve=false var s = new _sentence(Object,i) if (s.available){ Object["Sentences"].add(String(i),s) } } } } class _sentenceLang{ constructor(Object,Index,Lang){ this.O=Object this.I=Index this.J=Lang this.L=languages.languageByIndex(Lang) } get language(){ return languages.language(this.L.Abrev) } get sentence(){ return cb.settings[this.O.Iname(this.I,this.J)] } get onMessage(){ return this.language.Abrev+" : "+ this.sentence } } ///////////////////////////////////////////////// // WELCOME SENTENCES var welcomeSentences={ //----------------------------------------------------------------------------- Cname:"welcomeSentences", Iname:function(i,j){return this.Cname+"_{0}_{1}".format(i,j)}, Sstring:"> WELCOME SENTENCES PARAMETERS . . . . . . . . . . . . . . . . . . . . . . . . . ", SDefault:"Welcome {0}! Glad to see you! [i]", //----------------------------------------------------------------------------- Emojis: new _Emojis(this), Sentences:new _sentences(this), //----------------------------------------------------------------------------- innit:function(){ _sentenceEmoji.innit(this) _sentence.innit(this,this.SDefault) }, parseOptions:function(){ _sentenceEmoji.parseOptions(this) _sentence.parseOptions(this) }, Ran(Lang){ var s = this.Sentences.Ran(Lang) var Nbr =nbrOccurence(s,("[i]")) while (Nbr >0) { s=s.replace('[i]',' '+this.Emojis.Ran+' ') Nbr =nbrOccurence(s,("[i]")) } return s }, //----------------------------------------------------------------------------- buildHelp:function(msg,_utilisateur){ var output="" if (_utilisateur.isSuperUser){ output="############# WELCOME SENTENCES COMMAND LINE #############"; output += "\n/ws => display a list of welcome sentence"; output += "\n/ws <Lang> => display a list of all welcome sentence for language <Lang>"; output += "\n/ws i => display a list of all random Emoji for welcome sentence"; output += "\n/welcome <user> => display the welcome message to user <user>" } return output }, onMessage:function(msg,_utilisateur){ if (_utilisateur.isSuperUser){ var output="" var u = utilisateurs.All if(msg[0]=="ws"){ if (msg.length==1){ var s =retourLigne("################## WELCOME SENTENCE LIST",this.Sentences.onMessage()) _utilisateur.sentences.commandMessage(s) }else if(msg[1]=="i"){ var s =retourLigne("################## WELCOME SENTENCE RANDOM EMOJI LIST",this.Emojis.onMessage()) _utilisateur.sentences.commandMessage(s) }else{ var l = languages.language(msg[1]) var s ="################## WELCOME SENTENCE LIST FOR " + msg[1] + " LANGUAGE" if (isUndefined(l)){ _utilisateur.sentences.commandMessage(retourLigne(s,"Bad command line :"+msg[1]+" is not a valid language")) }else{ _utilisateur.sentences.commandMessage(retourLigne(s,this.Sentences.onMessage(msg[1]))) } } }else if(msg[0]=="welcome"){ var u = utilisateurs.user(msg[1]) if (isUndefined(u)){ var s ="################## WELCOME SENTENCE FOR " + msg[1] + " USER " _utilisateur.sentences.commandMessage(retourLigne(s,"Bad command line :"+msg[1]+" is not a valid user")) }else{ u.sendWelcome() } } } }, } // WELCOME BACK SENTENCES var welcomeBackSentences={ //----------------------------------------------------------------------------- Cname:"welcomeBackSentences", Sstring:"> WELCOME BACK SENTENCES ({0} : user) . . . . . . . . . . . . . . . . . . . . . . . ", SDefault:"Welcome back {0}! It's a pleasure to see you again! [i]", //----------------------------------------------------------------------------- Iname:function(i,j){return this.Cname+"_{0}_{1}".format(i,j)}, Emojis: new _Emojis(this), Sentences:new _sentences(this), //----------------------------------------------------------------------------- innit:function(){ _sentenceEmoji.innit(this) _sentence.innit(this,this.SDefault) }, parseOptions:function(){ _sentenceEmoji.parseOptions(this) _sentence.parseOptions(this) }, Ran(Lang){ var s = this.Sentences.Ran(Lang) var Nbr =nbrOccurence(s,("[i]")) while (Nbr >0) { s=s.replace('[i]',' '+this.Emojis.Ran+' ') Nbr =nbrOccurence(s,("[i]")) } return s }, //----------------------------------------------------------------------------- buildHelp:function(msg,_utilisateur){ var output="" if (_utilisateur.isSuperUser){ output="############# WELCOME BACK SENTENCES COMMAND LINE #############"; output += "\n/wb => display a list of welcome back sentence"; output += "\n/wb <Lang> => display a list of all welcome back sentence for language <Lang>"; output += "\n/wb i => display a list of all random Emoji for welcome back sentence"; output += "\n/welcomeBack <user> => display the welcome back message to user <user>" } return output }, onMessage:function(msg,_utilisateur){ if (_utilisateur.isSuperUser){ var output="" var u = utilisateurs.All if(msg[0]=="wb"){ if (msg.length==1){ var s =retourLigne("################## WELCOME BACK SENTENCE LIST",this.Sentences.onMessage()) _utilisateur.sentences.commandMessage(s) }else if(msg[1]=="i"){ var s =retourLigne("################## WELCOME BACK SENTENCE RANDOM EMOJI LIST",this.Emojis.onMessage()) _utilisateur.sentences.commandMessage(s) }else{ var l = languages.language(msg[1]) var s ="################## WELCOME BACK SENTENCE LIST FOR " + msg[1] + " LANGUAGE" if (isUndefined(l)){ _utilisateur.sentences.commandMessage(retourLigne(s,"Bad command line :"+msg[1]+" is not a valid language")) }else{ _utilisateur.sentences.commandMessage(retourLigne(s,this.Sentences.onMessage(msg[1]))) } } }else if(msg[0]=="welcomeBack"){ var u = utilisateurs.user(msg[1]) if (isUndefined(u)){ var s ="################## WELCOME BACK SENTENCE FOR " + msg[1] + " USER " _utilisateur.sentences.commandMessage(retourLigne(s,"Bad command line :"+msg[1]+" is not a valid user")) }else{ u.sendWelcome() } } } }, } // CLAIM TOKEN SENTENCES var claimTokensSentences={ //----------------------------------------------------------------------------- Cname:"claimTokensSentences", Sstring:"> CLAIM TOKENS SENTENCES ({0} : user) . . . . . . . . . . . . . . . . . . . . . . . . ", SDefault:"Hey {0}! If you want too see more, Tips me! [i]", //----------------------------------------------------------------------------- Iname:function(i,j){return this.Cname+"_{0}_{1}".format(i,j)}, Emojis: new _Emojis(this), Sentences:new _sentences(this), Delai:[], //----------------------------------------------------------------------------- innit:function(){ _sentenceEmoji.innit(this) var I=[{ name: "claimTokensSentencesDelai", label:"-> List of delai (minTokens:DelaiInSec) separate by ';'", type: 'str', defaultValue: '0:60;25:50;50:45;75:40;100:35;125:30', required: false }] cb.settings_choices = cb.settings_choices.concat(I); _sentence.innit(this,this.SDefault) }, parseOptions:function(){ _sentenceEmoji.parseOptions(this) var str = cb.settings["claimTokensSentencesDelai"] if (!isUndefined(str)){ var arrA=str.split(";") var arrB=[] for (var i=0;i<arrA.length;i++){ if (arrA[i]!=""){ arrB=arrA[i].split(':') if (arrB.length=2){ if (arrB[0]!='' && arrB[1]!=''){ var o={ D:String(arrB[0]), V:parseInt(arrB[1]) } this.Delai.push(o) } } } } } _sentence.parseOptions(this) }, Ran(Lang){ var s = this.Sentences.Ran(Lang) var Nbr =nbrOccurence(s,("[i]")) while (Nbr >0) { s=s.replace('[i]',' '+this.Emojis.Ran+' ') Nbr =nbrOccurence(s,("[i]")) } return s }, wichDelai(value){ if (this.Delai.length==0){ return 60 }else{ return this.recupDelai(value,0) } }, recupDelai(value,index){ var v=value if (value>=parseInt(this.Delai[index].D)){ if(this.Delai.length>(index+1)){ if (parseInt(this.Delai[(index+1)].D)>value){ v=this.Delai[index].V }else{ v=this.recupDelai(value,(index+1)) } } }else{ v=value } return v }, //----------------------------------------------------------------------------- buildHelp:function(msg,_utilisateur){ var output="" if (_utilisateur.isSuperUser){ output="############# CLAIM TOKENS SENTENCES COMMAND LINE #############"; output += "\n/ct => display a list of claim tokens sentence"; output += "\n/ct <Lang> => display a list of all claim tokens sentence for language <Lang>"; output += "\n/ct i => display a list of all random Emoji for claim tokens sentence"; output += "\n/claimTokens <user> => display the claim tokens message to user <user>" } return output }, onMessage:function(msg,_utilisateur){ if (_utilisateur.isSuperUser){ var output="" var u = utilisateurs.All if(msg[0]=="ct"){ if (msg.length==1){ var s =retourLigne("################## CLAIM TOKENS SENTENCE LIST",this.Sentences.onMessage()) _utilisateur.sentences.commandMessage(s) }else if(msg[1]=="i"){ var s =retourLigne("################## CLAIM TOKENS SENTENCE RANDOM EMOJI LIST",this.Emojis.onMessage()) _utilisateur.sentences.commandMessage(s) }else{ var l = languages.language(msg[1]) var s ="################## CLAIM TOKENS SENTENCE LIST FOR " + msg[1] + " LANGUAGE" if (isUndefined(l)){ _utilisateur.sentences.commandMessage(retourLigne(s,"Bad command line :"+msg[1]+" is not a valid language")) }else{ _utilisateur.sentences.commandMessage(retourLigne(s,this.Sentences.onMessage(msg[1]))) } } }else if(msg[0]=="claimTokens"){ var u = utilisateurs.user(msg[1]) if (isUndefined(u)){ var s ="################## CLAIM TOKENS SENTENCE FOR " + msg[1] + " USER " _utilisateur.sentences.commandMessage(retourLigne(s,"Bad command line :"+msg[1]+" is not a valid user")) }else{ u.sendWelcome() } } } }, } // TOKENS THANKS SENTENCES var tokensThanksSentences={ //----------------------------------------------------------------------------- Cname:"tokensThanksSentences", Sstring:"> TOKENS THANKS SENTENCES ({0} : user) . . . . . . . . . . . . . . . . . . . . . . ", SDefault:"Thanks for tips {0}! [i]", //----------------------------------------------------------------------------- Iname:function(i,j){return this.Cname+"_{0}_{1}".format(i,j)}, Emojis: new _Emojis(this), Sentences:new _sentences(this), needed:10, //----------------------------------------------------------------------------- innit:function(){ _sentenceEmoji.innit(this) var I=[{ name: "tokensThanksSentencesNeeded", label:"-> Number of tokens for a thanks sentence", type: 'int', defaultValue: 10, required: true }] cb.settings_choices = cb.settings_choices.concat(I); _sentence.innit(this,this.SDefault) }, parseOptions:function(){ _sentenceEmoji.parseOptions(this) this.needed=parseInt(cb.settings["tokensThanksSentencesNeeded"]) _sentence.parseOptions(this) }, Ran(Lang){ var s = this.Sentences.Ran(Lang) var Nbr =nbrOccurence(s,("[i]")) while (Nbr >0) { s=s.replace('[i]',' '+this.Emojis.Ran+' ') Nbr =nbrOccurence(s,("[i]")) } return s }, //----------------------------------------------------------------------------- buildHelp:function(msg,_utilisateur){ var output="" if (_utilisateur.isSuperUser){ output="############# TOKENS THANKS SENTENCES COMMAND LINE #############"; output += "\n/tt => display a list of tokens thanks sentence"; output += "\n/tt <Lang> => display a list of all tokens thanks sentence for language <Lang>"; output += "\n/tt i => display a list of all random Emoji for tokens thanks sentence"; output += "\n/tokenThanks <user> => display the tokens thanks message to user <user>" } return output }, onMessage:function(msg,_utilisateur){ if (_utilisateur.isSuperUser){ var output="" var u = utilisateurs.All if(msg[0]=="tt"){ if (msg.length==1){ var s =retourLigne("################## TOKENS THANKS SENTENCE LIST",this.Sentences.onMessage()) _utilisateur.sentences.commandMessage(s) }else if(msg[1]=="i"){ var s =retourLigne("################## TOKENS THANKS SENTENCE RANDOM EMOJI LIST",this.Emojis.onMessage()) _utilisateur.sentences.commandMessage(s) }else{ var l = languages.language(msg[1]) var s ="################## TOKENS THANKS SENTENCE LIST FOR " + msg[1] + " LANGUAGE" if (isUndefined(l)){ _utilisateur.sentences.commandMessage(retourLigne(s,"Bad command line :"+msg[1]+" is not a valid language")) }else{ _utilisateur.sentences.commandMessage(retourLigne(s,this.Sentences.onMessage(msg[1]))) } } }else if(msg[0]=="tokenThanks"){ var u = utilisateurs.user(msg[1]) if (isUndefined(u)){ var s ="################## TOKENS THANKS SENTENCE FOR " + msg[1] + " USER " _utilisateur.sentences.commandMessage(retourLigne(s,"Bad command line :"+msg[1]+" is not a valid user")) }else{ u.sendWelcome() } } } }, } // INCENTIVE SENTENCES var incentiveSentences={ //----------------------------------------------------------------------------- Cname:"incentiveSentences", Sstring:"> INCENTIVE SENTENCES ({0} : user) . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", SDefault:"Come on [m:boy][f:girl][c:][t:]! If you want to see more, give me some tips! [i]", //----------------------------------------------------------------------------- Iname:function(i,j){return this.Cname+"_{0}_{1}".format(i,j)}, Emojis: new _Emojis(this), Sentences:new _sentences(this), Interval:40, //----------------------------------------------------------------------------- innit:function(){ _sentenceEmoji.innit(this) var I=[{ name: "incentiveSentencesInterval", label:"-> Number of second before next incent sentence", type: 'int', defaultValue: 40, required: true }] cb.settings_choices = cb.settings_choices.concat(I); _sentence.innit(this,this.SDefault) }, parseOptions:function(){ _sentenceEmoji.parseOptions(this) this.Interval=parseInt(cb.settings["incentiveSentencesInterval"]) _sentence.parseOptions(this) }, Ran(Lang){ var s = this.Sentences.Ran(Lang) var Nbr =nbrOccurence(s,("[i]")) while (Nbr >0) { s=s.replace('[i]',' '+this.Emojis.Ran+' ') Nbr =nbrOccurence(s,("[i]")) } return s }, //----------------------------------------------------------------------------- buildHelp:function(msg,_utilisateur){ var output="" if (_utilisateur.isSuperUser){ output="############# INCENTIVE SENTENCES COMMAND LINE #############"; output += "\n/is => display a list of tokens thanks sentence"; output += "\n/is <Lang> => display a list of all tokens thanks sentence for language <Lang>"; output += "\n/is i => display a list of all random Emoji for tokens thanks sentence"; output += "\n/incentive <user> => display the tokens thanks message to user <user>" } return output }, onMessage:function(msg,_utilisateur){ if (_utilisateur.isSuperUser){ var output="" var u = utilisateurs.All if(msg[0]=="is"){ if (msg.length==1){ var s =retourLigne("################## INCENTIVE SENTENCE LIST",this.Sentences.onMessage()) _utilisateur.sentences.commandMessage(s) }else if(msg[1]=="i"){ var s =retourLigne("################## INCENTIVE SENTENCE RANDOM EMOJI LIST",this.Emojis.onMessage()) _utilisateur.sentences.commandMessage(s) }else{ var l = languages.language(msg[1]) var s ="################## INCENTIVE SENTENCE LIST FOR " + msg[1] + " LANGUAGE" if (isUndefined(l)){ _utilisateur.sentences.commandMessage(retourLigne(s,"Bad command line :"+msg[1]+" is not a valid language")) }else{ _utilisateur.sentences.commandMessage(retourLigne(s,this.Sentences.onMessage(msg[1]))) } } }else if(msg[0]=="incentive"){ var u = utilisateurs.user(msg[1]) if (isUndefined(u)){ var s ="################## INCENTIVE SENTENCE FOR " + msg[1] + " USER " _utilisateur.sentences.commandMessage(retourLigne(s,"Bad command line :"+msg[1]+" is not a valid user")) }else{ u.sendWelcome() } } } }, } ///////////////////////////////////////////////// // DEMARRAGE DU MOD // ! Non modifiable var Modules={ M:[ languages, utilisateurs, welcomeSentences, welcomeBackSentences, claimTokensSentences, tokensThanksSentences, incentiveSentences ], innit:function(){ for (var i=0;i<this.M.length;i++){ this.M[i].innit() } }, parseOptions:function(){ for(var i=0;i<this.M.length;i++){ this.M[i].parseOptions() } }, buildHelp:function(msg,_utilisateur){ var output=settings.onMessage(msg,_utilisateur) for(var i=0;i<this.M.length;i++){ output=retourLigne(output,this.M[i].buildHelp(msg,_utilisateur)) } return output }, onMessage:function(msg,_utilisateur){ var output="" if (msg[0]=="help"){ output+= this.buildHelp(msg,_utilisateur) }else{ for(var i=0;i<this.M.length;i++){ this.M[i].onMessage(msg,_utilisateur) } } return output } } Modules.innit() cb.onTip(function (tip) { utilisateurs.onTip(tip) }); cb.onEnter(function (user) { utilisateurs.onEnter(user) }); cb.onLeave(function (user) { utilisateurs.onLeave(user) }); cb.onMessage(function (msg) { var msgString = msg['m'].trim(); // chaine de message sans les espaces avant et apres var messages = msgString.split(/\s+/g); // un tableau de tous les messages var isCommand=messages[0].substring(0,1)=="/" if (isCommand==true){ messages[0]=messages[0].substring(1) msg['X-Spam'] = true; var u =utilisateurs.user(msg.user) var output = Modules.onMessage(messages,u) if (output!=""){ u.sentences.commandMessage(output) } } //for (var i=0;i<messages.length;i++){ // // message.sendMessageToGroup(null,messages[i]) //} //message.sendMessageToGroup(null,languages.buildHelp(msg)) // var silenced = 0; //1 = user is already silenced // var messageBlocked = 0; // used to determine whether a message gets blocked based on wordlist // var graphicsBlocked = 0; // used to determine whether a user can use graphics // var imageReplaced = 0; // var symbolString = '~`!@#$%^&*()_-+={[}]|\\:;"\'<,>.?/'; // // User vars // var u = msg.user; // var utilisateur=utilisateurs.get(msg.user) // var isSilenced = utilisateur.estMuet() //var hasTipped = (utilisateur.tokenStat.TotalT>0) //var isHost = utilisateur.is_host //var isMod = utilisateur.is_mod //var isFan = utilisateur.in_fanclub //var isEmod = cbjs.arrayContains(emodArray, u); //var isNice = cbjs.arrayContains(niceArray, u); //var isGreyish = cbjs.arrayContains(greyArray, u); //var isOnVipList = cbjs.arrayContains(vipArray, u); // //var isGrey = (!msg.has_tokens && !hasTipped && !msg.tipped_recently); // technically MAY include some light blues who have tipped down to zero, but i don't think so //var isBlueUp = (msg.tipped_recently || hasTipped); //if(isSilenced && !(isHost || isMod || isEmod || isNice || isDev) && silenced == 0) { // msg['X-Spam'] = true; // silenced = 1; // utilisateur.sendMessage("Votre message n'a pas été envoyé. En effet, seul les personnes ayant des //Tokens peuvent participer au chat. Achetez des Tokens pour pouvoir //participer!",Colours.Red,Colours.DarkGrey,'bolder') //} //var i = 0; //var key = null; //if (msg.m.substring(0, 1) === "/") { // msg["X-Spam"] = true; // if (msg.m.substring(1) === "help") { // Utilisateurs.get(msg.user).sendMessage(buildHelp(msg),Colours.White,Colours.Black,'bolder'); // }else{ // language.onMessage(msg) // WelcomSentence.onMessage(msg) // } //} return msg; }); function parseOptions(){ settings.parseOptions() Modules.parseOptions() } function init() { Mod.StartupTime=new Date(); parseOptions(); } if (!Mod.Debug || (Mod.Debug && cb.room_slug == Mod.Author)) { init(); } else { }
© Copyright Chaturbate 2011- 2025. All Rights Reserved.