Found 27 repositories(showing 27)
Leandropesao
// Generated by CoffeeScript 1.6.2 (function() { var Command, RoomHelper, User, addCommand, afkCheck, afksCommand, allAfksCommand, announceCurate, antispam, apiHooks, avgVoteRatioCommand, chatCommandDispatcher, chatUniversals, cmds, data, dieCommand, disconnectLookupCommand, fans, handleNewSong, handleUserJoin, handleUserLeave, handleVote, hook, initEnvironment, initHooks, initialize, lockCommand, lockskipCommand, msToStr, newSongsCommand, newsCommand, populateUserData, channelCommand, pupOnline, reloadCommand, removeCommand, roomHelpCommand, rulesCommand, settings, skipCommand, staffCommand, statusCommand, themeCommand, undoHooks, unhook, unlockCommand, updateVotes, versionCommand, voteRatioCommand, ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref21, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (_hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; settings = (function() { function settings() { this.implode = __bind(this.implode, this); this.intervalMessages = __bind(this.intervalMessages, this); this.startAfkInterval = __bind(this.startAfkInterval, this); this.setInternalWaitlist = __bind(this.setInternalWaitlist, this); this.userJoin = __bind(this.userJoin, this); this.getRoomUrlPath = __bind(this.getRoomUrlPath, this); this.startup = __bind(this.startup, this); } settings.prototype.currentsong = {}; settings.prototype.users = {}; settings.prototype.djs = []; settings.prototype.mods = []; settings.prototype.host = []; settings.prototype.hasWarned = false; settings.prototype.currentwoots = 0; settings.prototype.currentmehs = 0; settings.prototype.currentcurates = 0; settings.prototype.roomUrlPath = null; settings.prototype.internalWaitlist = []; settings.prototype.userDisconnectLog = []; settings.prototype.voteLog = {}; settings.prototype.seshOn = false; settings.prototype.forceSkip = false; settings.prototype.seshMembers = []; settings.prototype.launchTime = null; settings.prototype.totalVotingData = { woots: 0, mehs: 0, curates: 0 }; settings.prototype.pupScriptUrl = 'https://dl.dropbox.com/u/21023321/TastycatBot.js'; settings.prototype.afkTime = 666 * 60 * 1000; settings.prototype.songIntervalMessages = [ { interval: 7, offset: 0, msg: "Entrem na nossa pagina: http://www.facebook.com/EspecialistasDasZoeiras?ref=hl" }, { interval: 5, offset: 0, msg: "Mantenha-se ativo no bate-papo e Votando. Ser não sera Retirado da Lista de DJ e da Cabine!" } ]; settings.prototype.songCount = 0; settings.prototype.startup = function() { this.launchTime = new Date(); return this.roomUrlPath = this.getRoomUrlPath(); }; settings.prototype.getRoomUrlPath = function() { return window.location.pathname.replace(/\//g, ''); }; settings.prototype.newSong = function() { this.totalVotingData.woots += this.currentwoots; this.totalVotingData.mehs += this.currentmehs; this.totalVotingData.curates += this.currentcurates; this.setInternalWaitlist(); this.currentsong = API.getMedia(); if (this.currentsong !== null) { return this.currentsong; } else { return false; } }; settings.prototype.userJoin = function(u) { var userIds, _ref; userIds = Object.keys(this.users); if (_ref = u.id, __indexOf.call(userIds, _ref) >= 0) { return this.users[u.id].inRoom(true); } else { this.users[u.id] = new User(u); return this.voteLog[u.id] = {}; } }; settings.prototype.setInternalWaitlist = function() { var boothWaitlist, fullWaitList, lineWaitList; boothWaitlist = API.getDJs().slice(1); lineWaitList = API.getWaitList(); fullWaitList = boothWaitlist.concat(lineWaitList); return this.internalWaitlist = fullWaitList; }; settings.prototype.activity = function(obj) { if (obj.type === 'message') { return this.users[obj.fromID].updateActivity(); } }; settings.prototype.startAfkInterval = function() { return this.afkInterval = setInterval(afkCheck, 2000); }; settings.prototype.intervalMessages = function() { var msg, _i, _len, _ref, _results; this.songCount++; _ref = this.songIntervalMessages; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { msg = _ref[_i]; if (((this.songCount + msg['offset']) % msg['interval']) === 0) { _results.push(API.sendChat(msg['msg'])); } else { _results.push(void 0); } } return _results; }; settings.prototype.implode = function() { var item, val; for (item in this) { val = this[item]; if (typeof this[item] === 'object') { delete this[item]; } } return clearInterval(this.afkInterval); }; settings.prototype.lockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": true, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; settings.prototype.unlockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": false, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; return settings; })(); data = new settings(); User = (function() { User.prototype.afkWarningCount = 0; User.prototype.lastWarning = null; User.prototype["protected"] = false; User.prototype.isInRoom = true; function User(user) { this.user = user; this.updateVote = __bind(this.updateVote, this); this.inRoom = __bind(this.inRoom, this); this.notDj = __bind(this.notDj, this); this.warn = __bind(this.warn, this); this.getIsDj = __bind(this.getIsDj, this); this.getWarningCount = __bind(this.getWarningCount, this); this.getUser = __bind(this.getUser, this); this.getLastWarning = __bind(this.getLastWarning, this); this.getLastActivity = __bind(this.getLastActivity, this); this.getLastDrinkTime = __bind(this.getLastDrinkTime, this); this.updateDrinkTime = __bind(this.updateDrinkTime, this); this.updateActivity = __bind(this.updateActivity, this); this.init = __bind(this.init, this); this.init(); } User.prototype.init = function() { this.lastActivity = new Date(); return this.drinkTime = new Date(); }; User.prototype.updateActivity = function() { this.lastActivity = new Date(); this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.updateDrinkTime = function() { return this.drinkTime = new Date(); }; User.prototype.getLastDrinkTime = function() { return this.drinkTime; }; User.prototype.getLastActivity = function() { return this.lastActivity; }; User.prototype.getLastWarning = function() { if (this.lastWarning === null) { return false; } else { return this.lastWarning; } }; User.prototype.getUser = function() { return this.user; }; User.prototype.getWarningCount = function() { return this.afkWarningCount; }; User.prototype.getIsDj = function() { var DJs, dj, _i, _len; DJs = API.getDJs(); for (_i = 0, _len = DJs.length; _i < _len; _i++) { dj = DJs[_i]; if (this.user.id === dj.id) { return true; } } return false; }; User.prototype.warn = function() { this.afkWarningCount++; return this.lastWarning = new Date(); }; User.prototype.notDj = function() { this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.inRoom = function(online) { return this.isInRoom = online; }; User.prototype.updateVote = function(v) { if (this.isInRoom) { return data.voteLog[this.user.id][data.currentsong.id] = v; } }; return User; })(); RoomHelper = (function() { function RoomHelper() {} RoomHelper.prototype.lookupUser = function(username) { var id, u, _ref; _ref = data.users; for (id in _ref) { u = _ref[id]; if (u.getUser().username === username) { return u.getUser(); } } return false; }; RoomHelper.prototype.userVoteRatio = function(user) { var songId, songVotes, vote, votes; songVotes = data.voteLog[user.id]; votes = { 'woot': 0, 'meh': 0 }; for (songId in songVotes) { vote = songVotes[songId]; if (vote === 1) { votes['woot']++; } else if (vote === -1) { votes['meh']++; } } votes['positiveRatio'] = (votes['woot'] / (votes['woot'] + votes['meh'])).toFixed(2); return votes; }; return RoomHelper; })(); pupOnline = function() { var currentversion, me, myname; me = API.getSelf(); myname = me.username; currentversion = "1.0.0"; log("BOT editado pelo Rafal Moraes versão " + currentversion + " Chupa Jô"); return API.sendChat("/me on"); }; populateUserData = function() { var u, users, _i, _len; users = API.getUsers(); for (_i = 0, _len = users.length; _i < _len; _i++) { u = users[_i]; data.users[u.id] = new User(u); data.voteLog[u.id] = {}; } }; initEnvironment = function() { document.getElementById("button-vote-positive").click(); document.getElementById("button-sound").click(); Playback.streamDisabled = true; return Playback.stop(); }; initialize = function() { pupOnline(); populateUserData(); initEnvironment(); initHooks(); data.startup(); data.newSong(); return data.startAfkInterval(); }; afkCheck = function() { var DJs, id, lastActivity, lastWarned, now, secsLastActive, timeSinceLastActivity, timeSinceLastWarning, twoMinutes, user, _ref, _results; _ref = data.users; _results = []; for (id in _ref) { user = _ref[id]; now = new Date(); lastActivity = user.getLastActivity(); timeSinceLastActivity = now.getTime() - lastActivity.getTime(); if (timeSinceLastActivity > data.afkTime) { if (user.getIsDj()) { secsLastActive = timeSinceLastActivity / 1000; if (user.getWarningCount() === 0) { user.warn(); _results.push(API.sendChat("@" + user.getUser().username + ", Você não falou no chat nos ultimos 30 minutos, por favor fale alguma coisa em 4 minutos ou será kickado da line de dj.")); } else if (user.getWarningCount() === 1) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); twoMinutes = 4 * 60 * 1000; if (timeSinceLastWarning > twoMinutes) { DJs = API.getDJs(); if (DJs.length > 0 && DJs[0].id !== user.getUser().id) { API.sendChat("@" + user.getUser().username + ", você foi avisado, fique ativo enquanto está na line."); API.moderateRemoveDJ(id); _results.push(user.warn()); } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(user.notDj()); } } else { _results.push(void 0); } } return _results; }; msToStr = function(msTime) { var ms, msg, timeAway; msg = ''; timeAway = { 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 0 }; ms = { 'day': 24 * 60 * 60 * 1000, 'hour': 60 * 60 * 1000, 'minute': 60 * 1000, 'second': 1000 }; if (msTime > ms['day']) { timeAway['days'] = Math.floor(msTime / ms['day']); msTime = msTime % ms['day']; } if (msTime > ms['hour']) { timeAway['hours'] = Math.floor(msTime / ms['hour']); msTime = msTime % ms['hour']; } if (msTime > ms['minute']) { timeAway['minutes'] = Math.floor(msTime / ms['minute']); msTime = msTime % ms['minute']; } if (msTime > ms['second']) { timeAway['seconds'] = Math.floor(msTime / ms['second']); } if (timeAway['days'] !== 0) { msg += timeAway['days'].toString() + 'd'; } if (timeAway['hours'] !== 0) { msg += timeAway['hours'].toString() + 'h'; } if (timeAway['minutes'] !== 0) { msg += timeAway['minutes'].toString() + 'm'; } if (timeAway['seconds'] !== 0) { msg += timeAway['seconds'].toString() + 's'; } if (msg !== '') { return msg; } else { return false; } }; Command = (function() { function Command(msgData) { this.msgData = msgData; this.init(); } Command.prototype.init = function() { this.parseType = null; this.command = null; return this.rankPrivelege = null; }; Command.prototype.functionality = function(data) {}; Command.prototype.hasPrivelege = function() { var user; user = data.users[this.msgData.fromID].getUser(); switch (this.rankPrivelege) { case 'host': return user.permission >= 5; case 'cohost': return user.permission >= 4; case 'mod': return user.permission >= 3; case 'manager': return user.permission >= 3; case 'bouncer': return user.permission >= 2; case 'featured': return user.permission >= 1; default: return true; } }; Command.prototype.commandMatch = function() { var command, msg, _i, _len, _ref; msg = this.msgData.message; if (typeof this.command === 'string') { if (this.parseType === 'exact') { if (msg === this.command) { return true; } else { return false; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, this.command.length) === this.command) { return true; } else { return false; } } else if (this.parseType === 'contains') { if (msg.indexOf(this.command) !== -1) { return true; } else { return false; } } } else if (typeof this.command === 'object') { _ref = this.command; for (_i = 0, _len = _ref.length; _i < _len; _i++) { command = _ref[_i]; if (this.parseType === 'exact') { if (msg === command) { return true; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, command.length) === command) { return true; } } else if (this.parseType === 'contains') { if (msg.indexOf(command) !== -1) { return true; } } } return false; } }; Command.prototype.evalMsg = function() { if (this.commandMatch() && this.hasPrivelege()) { this.functionality(); return true; } else { return false; } }; return Command; })(); newsCommand = (function(_super) { __extends(newsCommand, _super); function newsCommand() { _ref = newsCommand.__super__.constructor.apply(this, arguments); return _ref; } newsCommand.prototype.init = function() { this.command = '!cotas'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newsCommand.prototype.functionality = function() { var msg; msg = "/me Acaba de Ativar modo Cota e roubou sua vaga na Faculdade e sua vez na Cabine de DJ!"; return API.sendChat(msg); }; return newsCommand; })(Command); newSongsCommand = (function(_super) { __extends(newSongsCommand, _super); function newSongsCommand() { _ref1 = newSongsCommand.__super__.constructor.apply(this, arguments); return _ref1; } newSongsCommand.prototype.init = function() { this.command = '!musicanovas'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newSongsCommand.prototype.functionality = function() { var arts, cMedia, chans, chooseRandom, mChans, msg, selections, u, _ref2; mChans = this.memberChannels.slice(0); chans = this.channels.slice(0); arts = this.artists.slice(0); chooseRandom = function(list) { var l, r; l = list.length; r = Math.floor(Math.random() * l); return list.splice(r, 1); }; selections = { channels: [], artist: '' }; u = data.users[this.msgData.fromID].getUser().username; if (u.indexOf("MistaDubstep") !== -1) { selections['channels'].push('MistaDubstep'); } else if (u.indexOf("Underground Promotions") !== -1) { selections['channels'].push('UndergroundDubstep'); } else { selections['channels'].push(chooseRandom(mChans)); } selections['channels'].push(chooseRandom(chans)); selections['channels'].push(chooseRandom(chans)); cMedia = API.getMedia(); if (_ref2 = cMedia.author, __indexOf.call(arts, _ref2) >= 0) { selections['artist'] = cMedia.author; } else { selections['artist'] = chooseRandom(arts); } msg = "Querem musica de Dubstep do " + selections['artist'] + " entre! Tem musicas nova sempre em http://youtube.com/" + selections['channels'][0] + " http://youtube.com/" + selections['channels'][1] + " ou http://youtube.com/" + selections['channels'][2]; return API.sendChat(msg); }; newSongsCommand.prototype.memberChannels = ["MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.channels = ["BassRape", "MonstercatMedia", "UKFdubstep", "DropThatBassline", "VitalDubstep", "AirwaveDubstepTV", "InspectorDubplate", "TehDubstepChannel", "UNITEDubstep", "LuminantNetwork", "TheSoundIsle", "PandoraMuslc", "MrSuicideSheep", "HearTheSensation", "bassoutletpromos", "MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.artists = ["Doctor P", "Excision", "Flux Pavilion", "Knife Party", "Rusko", "Bassnectar", "Nero", "Deadmau5", "Borgore", "Zomboy"]; return newSongsCommand; })(Command); themeCommand = (function(_super) { __extends(themeCommand, _super); function themeCommand() { _ref2 = themeCommand.__super__.constructor.apply(this, arguments); return _ref2; } themeCommand.prototype.init = function() { this.command = '!tema'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; themeCommand.prototype.functionality = function() { var msg; msg = "Temas permitidos aqui na sala. electro, techno, "; msg += "dubstep."; return API.sendChat(msg); }; return themeCommand; })(Command); rulesCommand = (function(_super) { __extends(rulesCommand, _super); function rulesCommand() { _ref3 = rulesCommand.__super__.constructor.apply(this, arguments); return _ref3; } rulesCommand.prototype.init = function() { this.command = '!regras'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; rulesCommand.prototype.functionality = function() { var msg1, msg2; msg1 = " 1) Video no Maximo 6 minutos. "; msg1 += " 2) Sem Flood! "; msg1 += " 3) Nao escrever em colorido "; msg1 += " 4) Respeitar os Adms e Mods;s "; msg1 += " 5) Nao Fiquem Pedindo Cargos "; msg2 = "Curta: http://www.facebook.com/EspecialistasDasZoeiras?ref=hl"; msg2 += ""; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return rulesCommand; })(Command); roomHelpCommand = (function(_super) { __extends(roomHelpCommand, _super); function roomHelpCommand() { _ref4 = roomHelpCommand.__super__.constructor.apply(this, arguments); return _ref4; } roomHelpCommand.prototype.init = function() { this.command = '!ajuda'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; roomHelpCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "Bem vindo a Sala! Para ser o DJ, Criar uma lista de reprodução e coloque Musica do Youtube ou soundcloud. "; msg1 += "Se é novo procure pelo seu nome na sua tela (do lado da cabine de dj e clique) e depois mude o nome."; msg2 = "Para Ganhar Pontos é só clica em Bacana. "; msg2 += "Digite !regras pare ler as porra das regras."; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return roomHelpCommand; })(Command); afksCommand = (function(_super) { __extends(afksCommand, _super); function afksCommand() { _ref5 = afksCommand.__super__.constructor.apply(this, arguments); return _ref5; } afksCommand.prototype.init = function() { this.command = '!afks'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; afksCommand.prototype.functionality = function() { var dj, djAfk, djs, msg, now, _i, _len; msg = ''; djs = API.getDJs(); for (_i = 0, _len = djs.length; _i < _len; _i++) { dj = djs[_i]; now = new Date(); djAfk = now.getTime() - data.users[dj.id].getLastActivity().getTime(); if (djAfk > (5 * 60 * 1000)) { if (msToStr(djAfk) !== false) { msg += dj.username + ' - ' + msToStr(djAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Se fudeu não tem ninguém AFK."); } else { return API.sendChat('AFKs: ' + msg); } }; return afksCommand; })(Command); allAfksCommand = (function(_super) { __extends(allAfksCommand, _super); function allAfksCommand() { _ref6 = allAfksCommand.__super__.constructor.apply(this, arguments); return _ref6; } allAfksCommand.prototype.init = function() { this.command = '!todosafks'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; allAfksCommand.prototype.functionality = function() { var msg, now, u, uAfk, usrs, _i, _len; msg = ''; usrs = API.getUsers(); for (_i = 0, _len = usrs.length; _i < _len; _i++) { u = usrs[_i]; now = new Date(); uAfk = now.getTime() - data.users[u.id].getLastActivity().getTime(); if (uAfk > (10 * 60 * 1000)) { if (msToStr(uAfk) !== false) { msg += u.username + ' - ' + msToStr(uAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Se fudeu não tem ninguém AFK."); } else { return API.sendChat('AFKs: ' + msg); } }; return allAfksCommand; })(Command); statusCommand = (function(_super) { __extends(statusCommand, _super); function statusCommand() { _ref7 = statusCommand.__super__.constructor.apply(this, arguments); return _ref7; } statusCommand.prototype.init = function() { this.command = '!status'; this.parseType = 'exact'; return this.rankPrivelege = 'featured'; }; statusCommand.prototype.functionality = function() { var day, hour, launch, lt, meridian, min, month, msg, t, totals; lt = data.launchTime; month = lt.getMonth() + 1; day = lt.getDate(); hour = lt.getHours(); meridian = hour % 12 === hour ? 'AM' : 'PM'; min = lt.getMinutes(); min = min < 10 ? '0' + min : min; t = data.totalVotingData; t['songs'] = data.songCount; launch = 'Iniciada em ' + month + '/' + day + ' ' + hour + ':' + min + ' ' + meridian + '. '; totals = '' + t.songs + ' Teve: :+1: ' + t.woots + ',:-1: ' + t.mehs + ',:heart: ' + t.curates + '.' msg = launch + totals; return API.sendChat(msg); }; return statusCommand; })(Command); dieCommand = (function(_super) { __extends(dieCommand, _super); function dieCommand() { _ref8 = dieCommand.__super__.constructor.apply(this, arguments); return _ref8; } dieCommand.prototype.init = function() { this.command = '!adeus'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; dieCommand.prototype.functionality = function() { API.sendChat("Acho que fui envenenado!"); undoHooks(); API.sendChat("Vish,"); data.implode(); return API.sendChat("Morri! x_x"); }; return dieCommand; })(Command); reloadCommand = (function(_super) { __extends(reloadCommand, _super); function reloadCommand() { _ref9 = reloadCommand.__super__.constructor.apply(this, arguments); return _ref9; } reloadCommand.prototype.init = function() { this.command = '!reload'; this.parseType = 'exact'; return this.rankPrivelege = 'Host'; }; reloadCommand.prototype.functionality = function() { var pupSrc; API.sendChat('/me Não se Preocupe o Papai Chegou'); undoHooks(); pupSrc = data.pupScriptUrl; data.implode(); return $.getScript(pupSrc); }; return reloadCommand; })(Command); lockCommand = (function(_super) { __extends(lockCommand, _super); function lockCommand() { _ref10 = lockCommand.__super__.constructor.apply(this, arguments); return _ref10; } lockCommand.prototype.init = function() { this.command = '!trava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; lockCommand.prototype.functionality = function() { return data.lockBooth(); }; return lockCommand; })(Command); unlockCommand = (function(_super) { __extends(unlockCommand, _super); function unlockCommand() { _ref11 = unlockCommand.__super__.constructor.apply(this, arguments); return _ref11; } unlockCommand.prototype.init = function() { this.command = '!destrava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; unlockCommand.prototype.functionality = function() { return data.unlockBooth(); }; return unlockCommand; })(Command); removeCommand = (function(_super) { __extends(removeCommand, _super); function removeCommand() { _ref12 = removeCommand.__super__.constructor.apply(this, arguments); return _ref12; } removeCommand.prototype.init = function() { this.command = '!remove'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; removeCommand.prototype.functionality = function() { var djs, popDj; djs = API.getDJs(); popDj = djs[djs.length - 1]; return API.moderateRemoveDJ(popDj.id); }; return removeCommand; })(Command); addCommand = (function(_super) { __extends(addCommand, _super); function addCommand() { _ref13 = addCommand.__super__.constructor.apply(this, arguments); return _ref13; } addCommand.prototype.init = function() { this.command = '!add'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; addCommand.prototype.functionality = function() { var msg, name, r, user; msg = this.msgData.message; if (msg.length > this.command.length + 2) { name = msg.substr(this.command.length + 2); r = new RoomHelper(); user = r.lookupUser(name); if (user !== false) { API.moderateAddDJ(user.id); return setTimeout((function() { return data.unlockBooth(); }), 5000); } } }; return addCommand; })(Command); skipCommand = (function(_super) { __extends(skipCommand, _super); function skipCommand() { _ref14 = skipCommand.__super__.constructor.apply(this, arguments); return _ref14; } skipCommand.prototype.init = function() { this.command = '!pula'; this.parseType = 'exact'; this.rankPrivelege = 'bouncer'; return window.lastSkipTime; }; skipCommand.prototype.functionality = function() { var currentTime, millisecondsPassed; currentTime = new Date(); if (!window.lastSkipTime) { API.moderateForceSkip(); return window.lastSkipTime = currentTime; } else { millisecondsPassed = Math.round(currentTime.getTime() - window.lastSkipTime.getTime()); if (millisecondsPassed > 10000) { window.lastSkipTime = currentTime; return API.moderateForceSkip(); } } }; return skipCommand; })(Command); disconnectLookupCommand = (function(_super) { __extends(disconnectLookupCommand, _super); function disconnectLookupCommand() { _ref15 = disconnectLookupCommand.__super__.constructor.apply(this, arguments); return _ref15; } disconnectLookupCommand.prototype.init = function() { this.command = '!dcmembros'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; disconnectLookupCommand.prototype.functionality = function() { var cmd, dcHour, dcLookupId, dcMeridian, dcMins, dcSongsAgo, dcTimeStr, dcUser, disconnectInstances, givenName, id, recentDisconnect, resp, u, _i, _len, _ref16, _ref17; cmd = this.msgData.message; if (cmd.length > 11) { givenName = cmd.slice(11); _ref16 = data.users; for (id in _ref16) { u = _ref16[id]; if (u.getUser().username === givenName) { dcLookupId = id; disconnectInstances = []; _ref17 = data.userDisconnectLog; for (_i = 0, _len = _ref17.length; _i < _len; _i++) { dcUser = _ref17[_i]; if (dcUser.id === dcLookupId) { disconnectInstances.push(dcUser); } } if (disconnectInstances.length > 0) { resp = u.getUser().username + ' disconectou ' + disconnectInstances.length.toString() + ' '; if (disconnectInstances.length === 1) { resp += '. '; } else { resp += 's. '; } recentDisconnect = disconnectInstances.pop(); dcHour = recentDisconnect.time.getHours(); dcMins = recentDisconnect.time.getMinutes(); if (dcMins < 10) { dcMins = '0' + dcMins.toString(); } dcMeridian = dcHour % 12 === dcHour ? 'AM' : 'PM'; dcTimeStr = '' + dcHour + ':' + dcMins + ' ' + dcMeridian; dcSongsAgo = data.songCount - recentDisconnect.songCount; resp += 'O seu disconect mais recente foi á ' + dcTimeStr + ' (' + dcSongsAgo + ' músicas atras). '; if (recentDisconnect.waitlistPosition !== void 0) { resp += 'Ele estava ' + recentDisconnect.waitlistPosition + ' música'; if (recentDisconnect.waitlistPosition > 1) { resp += 's'; } resp += ' atras da cabine de dj.'; } else { resp += 'Ele não estava na cabine de dj.'; } API.sendChat(resp); return; } else { API.sendChat(" " + u.getUser().username + " não disconectou."); return; } } } return API.sendChat("Eu não vejo essa pessoa na sala '" + givenName + "'."); } }; return disconnectLookupCommand; })(Command); voteRatioCommand = (function(_super) { __extends(voteRatioCommand, _super); function voteRatioCommand() { _ref16 = voteRatioCommand.__super__.constructor.apply(this, arguments); return _ref16; } voteRatioCommand.prototype.init = function() { this.command = '!voteratio'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; voteRatioCommand.prototype.functionality = function() { var msg, name, r, u, votes; r = new RoomHelper(); msg = this.msgData.message; if (msg.length > 12) { name = msg.substr(12); u = r.lookupUser(name); if (u !== false) { votes = r.userVoteRatio(u); msg = u.username + " :+1: " + votes['woot'].toString() + " vez"; if (votes['woot'] === 1) { msg += ', '; } else { msg += 'es, '; } msg += "e :-1: " + votes['meh'].toString() + " veze"; if (votes['meh'] === 1) { msg += '. '; } else { msg += 'es. '; } msg += "O seu vote ratio é: " + votes['positiveRatio'].toString() + "."; return API.sendChat(msg); } else { return API.sendChat("Não parece ter alguém com esse nome de'" + name + "'"); } } else { return API.sendChat("Você quer alguma coisa? Ou você está apenas tentando me irritar."); } }; return voteRatioCommand; })(Command); avgVoteRatioCommand = (function(_super) { __extends(avgVoteRatioCommand, _super); function avgVoteRatioCommand() { _ref17 = avgVoteRatioCommand.__super__.constructor.apply(this, arguments); return _ref17; } avgVoteRatioCommand.prototype.init = function() { this.command = '!avgvoteratio'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; avgVoteRatioCommand.prototype.functionality = function() { var averageRatio, msg, r, ratio, roomRatios, uid, user, userRatio, votes, _i, _len, _ref18; roomRatios = []; r = new RoomHelper(); _ref18 = data.voteLog; for (uid in _ref18) { votes = _ref18[uid]; user = data.users[uid].getUser(); userRatio = r.userVoteRatio(user); roomRatios.push(userRatio['positiveRatio']); } averageRatio = 0.0; for (_i = 0, _len = roomRatios.length; _i < _len; _i++) { ratio = roomRatios[_i]; averageRatio += ratio; } averageRatio = averageRatio / roomRatios.length; msg = "Accounting for " + roomRatios.length.toString() + " user ratios, the average room ratio is " + averageRatio.toFixed(2).toString() + "."; return API.sendChat(msg); }; return avgVoteRatioCommand; })(Command); staffCommand = (function(_super) { __extends(staffCommand, _super); function staffCommand() { _ref18 = staffCommand.__super__.constructor.apply(this, arguments); return _ref18; } staffCommand.prototype.init = function() { this.command = '!staff'; this.parseType = 'exact'; this.rankPrivelege = 'user'; return window.lastActiveStaffTime; }; staffCommand.prototype.staff = function() { var now, staff, staffAfk, stringstaff, user, _i, _len; staff = API.getStaff(); now = new Date(); stringstaff = ""; for (_i = 0, _len = staff.length; _i < _len; _i++) { user = staff[_i]; if (user.permission > 1) { staffAfk = now.getTime() - data.users[user.id].getLastActivity().getTime(); if (staffAfk < (60 * 60 * 1000)) { stringstaff += "@" + user.username + " "; } } } if (stringstaff.length === 0) { stringstaff = "Aff pqp não tem staff ativo :'("; } return stringstaff; }; staffCommand.prototype.functionality = function() { var currentTime, millisecondsPassed, thestaff; thestaff = this.staff(); currentTime = new Date(); if (!window.lastActiveStaffTime) { API.sendChat(thestaff); return window.lastActiveStaffTime = currentTime; } else { millisecondsPassed = currentTime.getTime() - window.lastActiveStaffTime.getTime(); if (millisecondsPassed > 10000) { window.lastActiveStaffTime = currentTime; return API.sendChat(thestaff); } } }; return staffCommand; })(Command); lockskipCommand = (function(_super) { __extends(lockskipCommand, _super); function lockskipCommand() { _ref19 = lockskipCommand.__super__.constructor.apply(this, arguments); return _ref19; } lockskipCommand.prototype.init = function() { this.command = '!repetida'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; lockskipCommand.prototype.functionality = function() { return data.lockBooth(function() { return setTimeout(function() {}, API.moderateForceSkip(), setTimeout(function() { return data.unlockBooth(); }, 5000), 5000); }); }; return lockskipCommand; })(Command); channelCommand = (function(_super) { __extends(channelCommand, _super); function channelCommand() { _ref20 = channelCommand.__super__.constructor.apply(this, arguments); return _ref20; } channelCommand.prototype.init = function() { this.command = '!comandos'; this.parseType = 'startsWith'; return this.rankPrivelege = 'user'; }; channelCommand.prototype.functionality = function() { return API.sendChat("/em: Lista de comandos: https://www.google.com.br/ _|_"); }; return channelCommand; })(Command); versionCommand = (function(_super) { __extends(versionCommand, _super); function versionCommand() { _ref21 = versionCommand.__super__.constructor.apply(this, arguments); return _ref21; } versionCommand.prototype.init = function() { this.command = '!version'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; versionCommand.prototype.functionality = function() { return API.sendChat("/me BOT editado 1.0 " + currentversion); }; return versionCommand; })(Command); cmds = [newSongsCommand, themeCommand, rulesCommand, roomHelpCommand, afksCommand, allAfksCommand, statusCommand, dieCommand, reloadCommand, lockCommand, unlockCommand, removeCommand, addCommand, skipCommand, disconnectLookupCommand, voteRatioCommand, avgVoteRatioCommand, staffCommand, lockskipCommand, versionCommand, newsCommand, channelCommand]; chatCommandDispatcher = function(chat) { var c, cmd, _i, _len, _results; chatUniversals(chat); _results = []; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(chat); if (c.evalMsg()) { break; } else { _results.push(void 0); } } return _results; }; updateVotes = function(obj) { data.currentwoots = obj.positive; data.currentmehs = obj.negative; return data.currentcurates = obj.curates; }; announceCurate = function(obj) { return APIsendChat("/em: " + obj.user.username + " Gostou dessa Musica!"); }; handleUserJoin = function(user) { data.userJoin(user); return data.users[user.id].updateActivity(); }; handleNewSong = function(obj) { var songId; data.intervalMessages(); if (data.currentsong === null) { data.newSong(); } else { API.sendChat("/em: " + data.currentsong.title + " por " + data.currentsong.author + ". :+1: " + data.currentwoots + ", :-1: " + data.currentmehs + ", :heart: " + data.currentcurates + "."); data.newSong(); document.getElementById("button-vote-positive").click(); } if (data.forceSkip) { songId = obj.media.id; return setTimeout(function() { var cMedia; cMedia = API.getMedia(); if (cMedia.id === songId) { return API.moderateForceSkip(); } }, obj.media.duration * 1000); } }; handleVote = function(obj) { return data.users[obj.user.id].updateVote(obj.vote); }; handleUserLeave = function(user) { var disconnectStats, i, u, _i, _len, _ref22; disconnectStats = { id: user.id, time: new Date(), songCount: data.songCount }; i = 0; _ref22 = data.internalWaitlist; for (_i = 0, _len = _ref22.length; _i < _len; _i++) { u = _ref22[_i]; if (u.id === user.id) { disconnectStats['waitlistPosition'] = i - 1; data.setInternalWaitlist(); break; } else { i++; } } data.userDisconnectLog.push(disconnectStats); return data.users[user.id].inRoom(false); }; antispam = function(chat) { var plugRoomLinkPatt, sender; plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; if (plugRoomLinkPatt.exec(chat.message)) { sender = API.getUser(chat.fromID); if (!sender.ambassador && !sender.moderator && !sender.owner && !sender.superuser) { if (!data.users[chat.fromID]["protected"]) { API.sendChat("Sem spam seu preto"); return API.moderateDeleteChat(chat.chatID); } else { return API.sendChat("Eu deveria expulsá-lo, mas estamos aqui para se diverti!"); } } } }; fans = function(chat) { var msg; msg = chat.message.toLowerCase(); if (msg.indexOf('eowkreowr') !== -1 || msg.indexOf('dsjaodas') !== -1 || msg.indexOf('poekpower') !== -1 || msg.indexOf('fokdsofsdpof') !== -1 || msg.indexOf(':trollface:') !== -1 || msg.indexOf('autowoot:') !== -1) { return API.moderateDeleteChat(chat.chatID); } }; chatUniversals = function(chat) { data.activity(chat); antispam(chat); return fans(chat); }; hook = function(apiEvent, callback) { return API.addEventListener(apiEvent, callback); }; unhook = function(apiEvent, callback) { return API.removeEventListener(apiEvent, callback); }; apiHooks = [ { 'event': API.ROOM_SCORE_UPDATE, 'callback': updateVotes }, { 'event': API.CURATE_UPDATE, 'callback': announceCurate }, { 'event': API.USER_JOIN, 'callback': handleUserJoin }, { 'event': API.DJ_ADVANCE, 'callback': handleNewSong }, { 'event': API.VOTE_UPDATE, 'callback': handleVote }, { 'event': API.CHAT, 'callback': chatCommandDispatcher }, { 'event': API.USER_LEAVE, 'callback': handleUserLeave } ]; initHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(hook(pair['event'], pair['callback'])); } return _results; }; undoHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(unhook(pair['event'], pair['callback'])); } return _results; }; initialize(); }).call(this); delay(); loadDammit(); function delay() { setTimeout("load();", 6000); } function load() { var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://cookies.googlecode.com/svn/trunk/jaaulde.cookies.js'; script.onreadystatechange = function() { if (this.readyState == 'complete') { loaded(); } } script.onload = readCookies; head.appendChild(script); } function loaded() { loaded = true } function loadDammit() { if (loaded == true) { readCookies(); } } function readCookies() { var currentDate = new Date(); currentDate.setFullYear(currentDate.getFullYear() + 1); var newOptions = { expiresAt: currentDate } jaaulde.utils.cookies.setOptions(newOptions); var value = jaaulde.utils.cookies.get(COOKIE_WOOT); autowoot = value != null ? value : false; value = jaaulde.utils.cookies.get(COOKIE_QUEUE); autoqueue = value != null ? value : false; value = jaaulde.utils.cookies.set(COOKIE_STREAM); stream = value != null ? value : true; value = jaaulde.utils.cookies.get(COOKIE_HIDE_VIDEO); hideVideo = value != null ? value : false; onCookiesLoaded(); } function onCookiesLoaded() { if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6005); } if (autoqueue && !isInQueue()) { joinQueue(); } if (hideVideo) { $('#yt-frame').animate({'height': (hideVideo ? '0px' : '271px')}, {duration: 'fast'}); $('#playback .frame-background').animate({'opacity': (hideVideo ? '0' : '0.91')}, {duration: 'medium'}); } initAPIListeners(); displayUI(); initUIListeners(); populateUserlist(); } var words = { "Points" : "Beats!", "Now Playing" : "Now Spinning!", "Time Remaining" : "Time Remaining!", "Volume" : "Crank the Volume!", "Current DJ" : "Disk Jockey", "Crowd Response" : "Crowd Reaction!", "Fans":"Stalkers!"}; String.prototype.prepareRegex = function() { return this.replace(/([[]^&\$.()\?\/\+{}|])/g, "\$1"); }; function isOkTag(tag) { return (",pre,blockquote,code,input,button,textarea".indexOf(","+tag) == -1); } var regexs=new Array(), replacements=new Array(); for(var word in words) { if(word != "") { regexs.push(new RegExp("\b"+word.prepareRegex().replace(/*/g,'[^ ]*')+"\b", 'gi')); replacements.push(words[word]); } } var texts = document.evaluate(".//text()[normalize-space(.)!='']",document.body,null,6,null), text=""; for(var i=0,l=texts.snapshotLength; (this_text=texts.snapshotItem(i)); i++) { if(isOkTag(this_text.parentNode.tagName.toLowerCase()) && (text=this_text.textContent)) { for(var x=0,l=regexs.length; x<l; x++) { text = text.replace(regexs[x], replacements[x]); this_text.textContent = text; } } } var loaded = false; var mentioned = false; var clicked = false; var skipped = false; var timeToWait = 120000; var clickWait = 5000; var skipWait = 601; var timePassed = 0; var clickPassed = 0; var skipPassed = 0; var timer = null; var clickTimer = null; var skipTimer = null; var COOKIE_WOOT = 'autowoot'; var COOKIE_QUEUE = 'autoqueue'; var COOKIE_STREAM = 'stream'; var COOKIE_HIDE_VIDEO = 'hidevideo'; var MAX_USERS_WAITLIST = 50; var fbMsg = ["Entrem na Pagina da sala: https://www.facebook.com/CantadasdiPedreiro"]; var rulesMsg = "Regras: 1) Video no Maximo 6 minutos. 2) Sem Flood! 3) Nao escrever em colorido 4) Respeitar os Adms e Mods ;s 5) Nao Fiquem Pedindo Cargos. "; var skipMsg = ["por favor não pedir para pular as músicas, quer pular da deslike."]; var fansMsg = ["Virem meu Fan que eu retribuo vocês, não esqueça de da @ Menções"]; var wafflesMsg = ["Ppkas para todos! # - (> _ <) - # "," Alguém disse ppkas? # - (> _ <) - #"]; var bhvMsg = ["por favor, não sejam gays no bate-papo "," por favor, não fale assim, controlar a si mesmo! "," por favor, seja maduros fdps"]; var sleepMsg = ["Ta na hora de dormi, Fui virjs! "," Indo dormir agora "," estou tão cansado, durmi é necessário, fui me cama. "," cansaço ... sono ... e ... fui me dormir."]; var workMsg = ["Estou ocupado não sou Vagabundo igual a vocês."]; var afkMsg = ["Eu estou indo embora e um Vão se foderem."," Vou fica AFK por um tempo, volto em breve! "," Indo embora, volto em breve! "," Vou Viaja nas galáxia, estarei de volta em breve !"]; var backMsg = ["Estou de volta minhas putinhas! "," Adivinha quem está de volta? Quem sera? Claro que é eu o seu Pai :D"]; var autoAwayMsg = ["Atualmente estou AFK "," Eu estou AFK "," Eu estou em uma aventura (afk) "," desapareceu por um momento "," não está presente no teclado."]; var autoSlpMsg = ["Atualmente estou dormindo "," Estou comendo ppkas em meus sonhos"]; var autoWrkMsg = ["Atualmente estou ocupado "," estou ocupado "," fazendo um trabalho relacionado a ppkas."]; overPlayed = ["1:vZyenjZseXA", "1:ZT4yoZNy90s", "1:Bparw9Jo3dk", "1:KrVC5dm5fFc","1:Ys9sIqv42lo", "1:1y6smkh6c-0", "1:jZL-RUZUoGY", "1:CrdoD9T1Heg", "1:6R_Rn1iP82I", "1:ea9tluQ_QtE", "1:f9EM8T5K6d8", "1:aHjpOzsQ9YI", "1:3vC5TsSyNjU", "1:yXLL46xkdlY", "1:_t2TzJOyops", "1:BGpzGu9Yp6Y", "1:YJVmu6yttiw", "1:WSeNSzJ2-Jw", "1:2cXDgFwE13g", "1:PR_u9rvFKzE", "1:i1BDGqIfm8U"];overPlayed = ["1:vZyenjZseXA", "1:ZT4yoZNy90s", "1:Bparw9Jo3dk", "1:KrVC5dm5fFc","1:Ys9sIqv42lo", "1:1y6smkh6c-0", "1:jZL-RUZUoGY", "1:CrdoD9T1Heg", "1:6R_Rn1iP82I", "1:ea9tluQ_QtE", "1:f9EM8T5K6d8", "1:aHjpOzsQ9YI", "1:3vC5TsSyNjU", "1:yXLL46xkdlY", "1:_t2TzJOyops", "1:BGpzGu9Yp6Y", "1:YJVmu6yttiw", "1:WSeNSzJ2-Jw", "1:2cXDgFwE13g", "1:PR_u9rvFKzE", "1:i1BDGqIfm8U"]; var styles = [ '.sidebar {position: fixed; top: 0; height: 100%; width: 200px; z-index: 99999; background-image: linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -o-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -moz-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -webkit-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -ms-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000000),color-stop(1, #3B5678));}', '.sidebar#side-right {right: -190px;z-index: 99999;}', '.sidebar#side-left {left: -190px; z-index: 99999; }', '.sidebar-handle {width: 12px;height: 100%;z-index: 99999;margin: 0;padding: 0;background: rgb(96, 141, 197);box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .9);cursor: "ne-resize";}', '.sidebar-handle span {display: block;position: absolute;width: 10px;top: 50%;text-align: center;letter-spacing: -1px;color: #000;}', '.sidebar-content {position: absolute;width: 185px;height: 100%; padding-left: 15px}', '.sidebar-content2 {position: absolute;width: 185px;height: 100%;}', '.sidebar-content2 h3 {font-weight: bold; padding-left: 5px; padding-bottom: 5px; margin: 0;}', '.sidebar-content2 a {font-weight: bold; font-size: 13px; padding-left: 5px;}', '#side-right .sidebar-handle {float: left;}', '#side-left .sidebar-handle {float: right;}', '#side-right a {display: block;min-width: 100%;cursor: pointer;padding: 4px 5px 8px 5px;border-radius: 4px;font-size: 13px;}', '.sidebar-content2 span {display: block; min-width: 94%;cursor: pointer;border-radius: 4px; padding: 0 5px 0 5px; font-size: 12px;}', '#side-right a span {padding-right: 8px;}', '#side-right a:hover {background-color: rgba(97, 146, 199, 0.65);text-decoration: none;}', '.sidebar-content2 span:hover {background-color: rgba(97, 146, 199, 0.65);text-decoration: none;}', '.sidebar-content2 a:hover {text-decoration: none;}', 'html{background: url("http://i.imgur.com/a75C9wE.jpg") no-repeat scroll center top #000000;}', '#room-wheel {z-index: 2;position: absolute;top: 2px;left: 0;width: 1044px;height: 394px;background: url(http://) no-repeat;display: none;}', '.chat-bouncer {background: url(http://i.imgur.com/9qWWO4L.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '.chat-manager{background: url(http://i.imgur.com/hqqhTcp.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '.chat-cohost {background: url(https://dl.dropbox.com/u/67634625/chat-bouncer-icon.png) no-repeat 0 5px;padding-left: 17px;width:292px;}', '.chat-host{background: url(https://dl.dropbox.com/u/67634625/chat-bouncer-icon.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '#dj-console, #dj-console {background-image: url(http://s8.postimage.org/wpugb8gc5/Comp_2.gif);min-height:33px;min-width:131px;}', '.chat-from-you{color: #0099FF;font-weight: bold;margin-top: 0px; padding-top: 0px;}', '.chat-from-bouncer{color: #800080; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-manager{color: #FFDAB9; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-cohost{color: #FF4500; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-host{color: #32CD32;font-weight: bold;margin-top: 0px; padding-top: 0px;}', '#user-points-title{color: #FFFFFF; position: absolute; left: 36px; font-size: 10px;}', '#user-fans-title{color: #FFFFFF; position: absolute; left: 29px; font-size: 10px;}', '.meta-header span{color: rgba(255, 255, 255, 0.79); position: absolute; left: 15px; font-size: 10px;}', '#button-lobby {background-image: url("http://i.imgur.com/brpRaSY.png");}', '#volume-bar-value{background-image: url("http://i.imgur.com/xmyonON.png") ;}', '#hr-div {;height: 100%;width: 100%;margin: 0;padding-left: 12px;}', '#hr2-div2 {;height: 100%;width: 100%;margin: 0;}', '#hr-style {position: absolute;display: block;height: 20px;width: 100%;bottom: 0%;background-image: url("http://i.imgur.com/gExgamX.png");}', '#hr2-style2 {position: absolute;display: block;height: 20px;width: 94%%;bottom: 0%;background-image: url("http://i.imgur.com/gExgamX.png");}', '#side-left h3 {padding-left: 5px}', ]; var scripts = [ "(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind('mousemove',track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=='mouseenter'){pX=ev.pageX;pY=ev.pageY;$(ob).bind('mousemove',track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind('mousemove',track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);", 'if (jQuery.easing.easeOutQuart === undefined) jQuery.easing.easeOutQuart = function (a,b,c,d,e) { return -d*((b=b/e-1)*b*b*b-1)+c; }', '$("#side-right")', ' .hoverIntent(function() {', ' var timeout_r = $(this)', ' .data("timeout_r");', ' if (timeout_r) {', ' clearTimeout(timeout_r);', ' }', ' $(this)', ' .animate({', ' "right": "0px"', ' }, 300, "easeOutQuart");', ' }, function() {', ' $(this)', ' .data("timeout_r", setTimeout($.proxy(function() {', ' $(this)', ' .animate({', ' "right": "-190px"', ' }, 300, "easeOutQuart");', ' }, this), 500));', ' });', '$("#side-left")', ' .hoverIntent(function() {', ' var timeout_r = $(this)', ' .data("timeout_r");', ' if (timeout_r) {', ' clearTimeout(timeout_r);', ' }', ' $(this)', ' .animate({', ' "left": "0px"', ' }, 300, "easeOutQuart");', ' }, function() {', ' $(this)', ' .data("timeout_r", setTimeout($.proxy(function() {', ' $(this)', ' .animate({', ' "left": "-190px"', ' }, 300, "easeOutQuart");', ' }, this), 500));', ' });' ]; function initAPIListeners() { API.addEventListener(API.DJ_ADVANCE, djAdvanced); API.addEventListener(API.CHAT, autoRespond); API.addEventListener(API.DJ_UPDATE, queueUpdate); API.addEventListener(API.VOTE_UPDATE, function (obj) { populateUserlist(); }); API.addEventListener(API.USER_JOIN, function (user) { populateUserlist(); }); API.addEventListener(API.USER_LEAVE, function (user) { populateUserlist(); }); } function displayUI() { var colorWoot = autowoot ? '#3FFF00' : '#ED1C24'; var colorQueue = autoqueue ? '#3FFF00' : '#ED1C24'; var colorStream = stream ? '#3FFF00' : '#ED1C24'; var colorVideo = hideVideo ? '#3FFF00' : '#ED1C24'; $('#side-right .sidebar-content').append( 'auto woot' + 'auto queue' + 'stream' + 'hide video' + 'rules' + 'like our fb' + 'no fans' + 'no skip' + 'waffles' + 'sleeping' + 'working' + 'afk' + 'available' + 'skip' + 'lock' + 'unlock' + 'lockskip' ); } function initUIListeners() { $("#plug-btn-woot").on("click", function() { autowoot = !autowoot; $(this).css("color", autowoot ? "#3FFF00" : "#ED1C24"); if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6001); } jaaulde.utils.cookies.set(COOKIE_WOOT, autowoot); }); $("#plug-btn-queue").on("click", function() { autoqueue = !autoqueue; $(this).css('color', autoqueue ? '#3FFF00' : '#ED1C24'); if (autoqueue && !isInQueue()) { joinQueue(); } jaaulde.utils.cookies.set(COOKIE_QUEUE, autoqueue); }); $("#plug-btn-stream").on("click", function() { stream = !stream; $(this).css("color", stream ? "#3FFF00" : "#ED1C24"); if (stream == true) { API.sendChat("/stream on"); } else { API.sendChat("/stream off"); } jaaulde.utils.cookies.set(COOKIE_STREAM, stream); }); $("#plug-btn-hidevideo").on("click", function() { hideVideo = !hideVideo; $(this).css("color", hideVideo ? "#3FFF00" : "#ED1C24"); $("#yt-frame").animate({"height": (hideVideo ? "0px" : "271px")}, {duration: "fast"}); $("#playback .frame-background").animate({"opacity": (hideVideo ? "0" : "0.91")}, {duration: "medium"}); jaaulde.utils.cookies.set(COOKIE_HIDE_VIDEO, hideVideo); }); $("#plug-btn-face").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(fbMsg[Math.floor(Math.random() * fbMsg.length)]); } }); $("#plug-btn-rules").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(rulesMsg); } }); $("#plug-btn-fans").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(fansMsg[Math.floor(Math.random() * fansMsg.length)]); } }); $("#plug-btn-noskip").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(skipMsg[Math.floor(Math.random() * skipMsg.length)]); } }); $("#plug-btn-waffles").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(wafflesMsg[Math.floor(Math.random() * wafflesMsg.length)]); } }); $("#plug-btn-sleeping").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 3) { API.sendChat(sleepMsg[Math.floor(Math.random() * sleepMsg.length)]); Models.user.changeStatus(3); } } }); $("#plug-btn-working").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 2) { API.sendChat(workMsg[Math.floor(Math.random() * workMsg.length)]); Models.user.changeStatus(2); } } }); $("#plug-btn-afk").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 1) { API.sendChat(afkMsg[Math.floor(Math.random() * afkMsg.length)]); Models.user.changeStatus(1); } } }); $("#plug-btn-back").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 0) { API.sendChat(backMsg[Math.floor(Math.random() * backMsg.length)]); Models.user.changeStatus(0); } } }); $("#plug-btn-skip").on("click", function() { if (skipped == false) { skipped = true; skipTimer = setInterval("checkSkipped();", 500); new ModerationForceSkipService; } }); $("#plug-btn-lock").on("click", function() { new RoomPropsService(document.location.href.split('/')[3],true,true,1,5); }); $("#plug-btn-unlock").on("click", function() { new RoomPropsService(document.location.href.split('/')[3],false,true,1,5); }); $("#plug-btn-lockskip").on("click", function() { if (skipped == false) { skipped = true; skipTimer = setInterval("checkSkipped();", 500); new RoomPropsService(document.location.href.split('/')[3],true,true,1,5); new ModerationForceSkipService; new RoomPropsService(document.location.href.split('/')[3],false,true,1,5); } }); } function queueUpdate() { if (autoqueue && !isInQueue()) { joinQueue(); } } function isInQueue() { var self = API.getSelf(); return API.getWaitList().indexOf(self) !== -1 || API.getDJs().indexOf(self) !== -1; } function joinQueue() { if ($('#button-dj-play').css('display') === 'block') { $('#button-dj-play').click(); } else if (API.getWaitList().length < MAX_USERS_WAITLIST) { API.waitListJoin(); } } function autoRespond(data) { var a = data.type == "mention" && Models.room.data.staff[data.fromID] && Models.room.data.staff[data.fromID] >= Models.user.BOUNCER, b = data.message.indexOf('@') >0; if (data.type == "mention" && mentioned == false) { if (API.getUser(data.fromID).status == 0) { mentioned = true; timer = setInterval("checkMentioned();", 1000); if (Models.user.data.status == 1) { API.sendChat("@" + data.from + " automsg: " + autoAwayMsg[Math.floor(Math.random() * autoAwayMsg.length)]); } if (Models.user.data.status ==2) { API.sendChat("@" + data.from + " automsg: " + autoWrkMsg[Math.floor(Math.random() * autoWrkMsg.length)]); } if (Models.user.data.status ==3) { API.sendChat("@" + data.from + " automsg: " + autoSlpMsg[Math.floor(Math.random() * autoSlpMsg.length)]); } } } } function djAdvanced(obj) { if (hideVideo) { $("#yt-frame").css("height", "0px"); $("#playback .frame-background").css("opacity", "0.0"); } if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6001); } setTimeout("overPlayedSongs();", 3000); } function overPlayedSongs(data) { if (overPlayed.indexOf(Models.room.data.media.id) > -1) { API.sendChat("/me auto skip ligado, Musica Repetida. Fuck you baby!"); setTimeout("new RoomPropsService(document.location.href.split('/')[3],true,true,1,5);", 300); setTimeout("new ModerationForceSkipService;", 600); setTimeout("new RoomPropsService(document.location.href.split('/')[3],false,true,1,5);", 900); } if (Models.room.data.media.duration > 481) { API.sendChat("/me auto skip ligado, música com mais de 6 minutos seram puladas."); setTimeout("new RoomPropsService(document.location.href.split('/')[3],true,true,1,5);", 300); setTimeout("new ModerationForceSkipService;", 600); setTimeout("new RoomPropsService(document.location.href.split('/')[3],false,true,1,5);", 900); } } function populateUserlist() { var mehlist = ''; var wootlist = ''; var undecidedlist = ''; var a = API.getUsers(); var totalMEHs = 0; var totalWOOTs = 0; var totalUNDECIDEDs = 0; var str = ''; var users = API.getUsers(); var myid = API.getSelf(); for (i in a) { str = '' + a[i].username + ''; if (typeof (a[i].vote) !== 'undefined' && a[i].vote == -1) { totalMEHs++; mehlist += str; } else if (typeof (a[i].vote) !== 'undefined' && a[i].vote == +1) { totalWOOTs++; wootlist += str; } else { totalUNDECIDEDs++; undecidedlist += str; } } var totalDECIDED = totalWOOTs + totalMEHs; var totalUSERS = totalDECIDED + totalUNDECIDEDs; var totalMEHsPercentage = Math.round((totalMEHs / totalUSERS) * 100); var totalWOOTsPercentage = Math.round((totalWOOTs / totalUSERS) * 100); if (isNaN(totalMEHsPercentage) || isNaN(totalWOOTsPercentage)) { totalMEHsPercentage = totalWOOTsPercentage = 0; } mehlist = ' ' + totalMEHs.toString() + ' (' + totalMEHsPercentage.toString() + '%)' + mehlist; wootlist = ' ' + totalWOOTs.toString() + ' (' + totalWOOTsPercentage.toString() + '%)' + wootlist; undecidedlist = ' ' + totalUNDECIDEDs.toString() + undecidedlist; if ($('#side-left .sidebar-content').children().length > 0) { $('#side-left .sidebar-content2').append(); } $('#side-left .sidebar-content2').html(' users: ' + API.getUsers().length + ' '); var spot = Models.room.getWaitListPosition(); var waitlistDiv = $(' ').addClass('waitlistspot').text('waitlist: ' + (spot !== null ? spot + ' / ' : '') + Models.room.data.waitList.length); $('#side-left .sidebar-content2').append(waitlistDiv); $('#side-left .sidebar-content2').append(' '); $(".meanlist").append( ' meh list:' + mehlist + ' ' + ' woot list:' + wootlist + ' ' ); } function checkMentioned() { if(timePassed >= timeToWait) { clearInterval(timer); mentioned = false; timePassed = 0; } else { timePassed = timePassed + 601; } } function checkClicked() { if (clickPassed >= clickWait) { clearInterval(clickTimer); clicked = false; clickPassed = 0; } else { clickPassed = clickPassed + 601; } } function checkSkipped() { if (skipPassed >= skipWait) { clearInterval(skipTimer); skipped = false; skipPassed = 600; } else { skipPassed = skipPassed + 500; } } $('#plugbot-css').remove(); $('#plugbot-js').remove(); $('#chat-messages').append(' Bem vindo auto-skip editado pelo Rafael Moraes 1.0 '); $('body').prepend('' + "\n" + styles.join("\n") + "\n" + ''); $('body').append(' ' + ' ||| ' + ' ' + ' ' + ' ' + ' ||| ' + ' ' + ' ' + ' '); $('body').append('');
Luciana45
------------------ System Information ------------------ Time of this report: 8/20/2013, 21:40:50 Machine name: SONY-PC Operating System: Windows 7 Professional 64-bit (6.1, Build 7601) Service Pack 1 (7601.win7sp1_rtm.101119-1850) Language: Portuguese (Regional Setting: Portuguese) System Manufacturer: Sony Corporation System Model: VGN-FZ420E BIOS: Ver 1.00PARTTBL Processor: Intel(R) Core(TM)2 Duo CPU T5550 @ 1.83GHz (2 CPUs), ~1.8GHz Memory: 3072MB RAM Available OS Memory: 3062MB RAM Page File: 1806MB used, 4316MB available Windows Dir: C:\Windows DirectX Version: DirectX 11 DX Setup Parameters: Not found User DPI Setting: Using System DPI System DPI Setting: 96 DPI (100 percent) DWM DPI Scaling: Disabled DxDiag Version: 6.01.7601.17514 32bit Unicode ------------ DxDiag Notes ------------ Display Tab 1: No problems found. Sound Tab 1: No problems found. Input Tab: No problems found. -------------------- DirectX Debug Levels -------------------- Direct3D: 0/4 (retail) DirectDraw: 0/4 (retail) DirectInput: 0/5 (retail) DirectMusic: 0/5 (retail) DirectPlay: 0/9 (retail) DirectSound: 0/5 (retail) DirectShow: 0/6 (retail) --------------- Display Devices --------------- Card name: Mobile Intel(R) 965 Express Chipset Family (Microsoft Corporation - WDDM 1.1) Manufacturer: Intel Corporation Chip type: Mobile Intel(R) 965 Express Chipset Family DAC type: Internal Device Key: Enum\PCI\VEN_8086&DEV_2A02&SUBSYS_9005104D&REV_0C Display Memory: 358 MB Dedicated Memory: 0 MB Shared Memory: 358 MB Current Mode: 1280 x 800 (32 bit) (59Hz) Monitor Name: Monitor Genérico PnP Monitor Model: unknown Monitor Id: MS_0040 Native Mode: 1280 x 800(p) (59.940Hz) Output Type: Internal Driver Name: igdumd64.dll,igd10umd64.dll Driver File Version: 8.15.0010.1749 (English) Driver Version: 8.15.10.1749 DDI Version: 10 Driver Model: WDDM 1.1 Driver Attributes: Final Retail Driver Date/Size: 7/13/2009 22:41:07, 5437952 bytes WHQL Logo'd: Yes WHQL Date Stamp: Device Identifier: {D7B78E66-6942-11CF-2875-0FB0ACC2C535} Vendor ID: 0x8086 Device ID: 0x2A02 SubSys ID: 0x9005104D Revision ID: 0x000C Driver Strong Name: igdlh.inf:Intel.Mfg.NTamd64...1:i965GM0:8.15.10.1749:pci\ven_8086&dev_2a02 Rank Of Driver: 00EC2001 Video Accel: ModeMPEG2_A ModeMPEG2_C ModeWMV9_B ModeVC1_B Deinterlace Caps: {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(YUY2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(UYVY,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(UYVY,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(UYVY,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(YV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(YV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(YV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(NV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(NV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(NV12,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(IMC1,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC1,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC1,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(IMC2,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC2,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(IMC3,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC3,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC3,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend {BF752EF6-8CC4-457A-BE1B-08BD1CAEEE9F}: Format(In/Out)=(IMC4,YUY2) Frames(Prev/Fwd/Back)=(0,0,1) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_EdgeFiltering {335AA36E-7884-43A4-9C91-7F87FAF3E37E}: Format(In/Out)=(IMC4,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend DeinterlaceTech_BOBVerticalStretch {5A54A0C9-C7EC-4BD9-8EDE-F3C75DC4393B}: Format(In/Out)=(IMC4,YUY2) Frames(Prev/Fwd/Back)=(0,0,0) Caps=VideoProcess_YUV2RGB VideoProcess_StretchX VideoProcess_StretchY VideoProcess_AlphaBlend D3D9 Overlay: Supported DXVA-HD: Not Supported DDraw Status: Enabled D3D Status: Enabled AGP Status: Enabled ------------- Sound Devices ------------- Description: Alto-falantes (Dispositivo de High Definition Audio) Default Sound Playback: Yes Default Voice Playback: Yes Hardware ID: HDAUDIO\FUNC_01&VEN_8384&DEV_7662&SUBSYS_104D2300&REV_1002 Manufacturer ID: 1 Product ID: 65535 Type: WDM Driver Name: HdAudio.sys Driver Version: 6.01.7601.17514 (Portuguese) Driver Attributes: Final Retail WHQL Logo'd: Yes Date and Size: 11/20/2010 02:44:24, 350208 bytes Other Files: Driver Provider: Microsoft HW Accel Level: Basic Cap Flags: 0xF1F Min/Max Sample Rate: 100, 200000 Static/Strm HW Mix Bufs: 1, 0 Static/Strm HW 3D Bufs: 0, 0 HW Memory: 0 Voice Management: No EAX(tm) 2.0 Listen/Src: No, No I3DL2(tm) Listen/Src: No, No Sensaura(tm) ZoomFX(tm): No --------------------- Sound Capture Devices --------------------- Description: Microfone (Dispositivo de High Definition Audio) Default Sound Capture: Yes Default Voice Capture: Yes Driver Name: HdAudio.sys Driver Version: 6.01.7601.17514 (Portuguese) Driver Attributes: Final Retail Date and Size: 11/20/2010 02:44:24, 350208 bytes Cap Flags: 0x1 Format Flags: 0xFFFFF Description: Microfone (Dispositivo de High Definition Audio) Default Sound Capture: No Default Voice Capture: No Driver Name: HdAudio.sys Driver Version: 6.01.7601.17514 (Portuguese) Driver Attributes: Final Retail Date and Size: 11/20/2010 02:44:24, 350208 bytes Cap Flags: 0x1 Format Flags: 0xFFFFF ------------------- DirectInput Devices ------------------- Device Name: Mouse Attached: 1 Controller ID: n/a Vendor/Product ID: n/a FF Driver: n/a Device Name: Teclado Attached: 1 Controller ID: n/a Vendor/Product ID: n/a FF Driver: n/a Device Name: USB Receiver Attached: 1 Controller ID: 0x0 Vendor/Product ID: 0x046D, 0xC51B FF Driver: n/a Poll w/ Interrupt: No ----------- USB Devices ----------- + USB Root Hub | Vendor/Product ID: 0x8086, 0x2830 | Matching Device ID: usb\root_hub | Service: usbhub ---------------- Gameport Devices ---------------- ------------ PS/2 Devices ------------ + Teclado Padrão PS/2 | Matching Device ID: *pnp0303 | Service: i8042prt | + Terminal Server Keyboard Driver | Matching Device ID: root\rdp_kbd | Upper Filters: kbdclass | Service: TermDD | + Mouse compatível com PS/2 | Matching Device ID: *pnp0f13 | Service: i8042prt | + Mouse compatível com HID | Vendor/Product ID: 0x046D, 0xC51B | Matching Device ID: hid_device_system_mouse | Service: mouhid | + Terminal Server Mouse Driver | Matching Device ID: root\rdp_mou | Upper Filters: mouclass | Service: TermDD ------------------------ Disk & DVD/CD-ROM Drives ------------------------ Drive: C: Free Space: 386.5 GB Total Space: 476.8 GB File System: NTFS Model: SAMSUNG HM500JI ATA Device Drive: D: Model: Optiarc DVD RW AD-7560A ATA Device Driver: c:\windows\system32\drivers\cdrom.sys, 6.01.7601.17514 (Portuguese), , 0 bytes -------------- System Devices -------------- Name: Mobile Intel(R) 965 Express Chipset Family (Microsoft Corporation - WDDM 1.1) Device ID: PCI\VEN_8086&DEV_2A03&SUBSYS_9005104D&REV_0C\3&33FD14CA&0&11 Driver: n/a Name: Intel(R) ICH8 Family PCI Express Root Port 1 - 283F Device ID: PCI\VEN_8086&DEV_283F&SUBSYS_9005104D&REV_03\3&33FD14CA&0&E0 Driver: n/a Name: Intel(R) ICH8 Family USB Universal Host Controller - 2830 Device ID: PCI\VEN_8086&DEV_2830&SUBSYS_9005104D&REV_03\3&33FD14CA&0&E8 Driver: n/a Name: Mobile Intel(R) 965 Express Chipset Family (Microsoft Corporation - WDDM 1.1) Device ID: PCI\VEN_8086&DEV_2A02&SUBSYS_9005104D&REV_0C\3&33FD14CA&0&10 Driver: n/a Name: Intel(R) ICH8 Family SMBus Controller - 283E Device ID: PCI\VEN_8086&DEV_283E&SUBSYS_9005104D&REV_03\3&33FD14CA&0&FB Driver: n/a Name: Intel(R) ICH8M SATA AHCI Controller - 2829 Device ID: PCI\VEN_8086&DEV_2829&SUBSYS_9005104D&REV_03\3&33FD14CA&0&FA Driver: n/a Name: Mobile Intel(R) PM965/GM965/GL960/GS965 Express Processor to DRAM Controller - 2A00 Device ID: PCI\VEN_8086&DEV_2A00&SUBSYS_9005104D&REV_0C\3&33FD14CA&0&00 Driver: n/a Name: Intel(R) ICH8 Family USB2 Enhanced Host Controller - 283A Device ID: PCI\VEN_8086&DEV_283A&SUBSYS_9005104D&REV_03\3&33FD14CA&0&D7 Driver: n/a Name: Intel(R) ICH8M LPC Interface Controller - 2815 Device ID: PCI\VEN_8086&DEV_2815&SUBSYS_9005104D&REV_03\3&33FD14CA&0&F8 Driver: n/a Name: Intel(R) ICH8M Ultra ATA Storage Controllers - 2850 Device ID: PCI\VEN_8086&DEV_2850&SUBSYS_9005104D&REV_03\3&33FD14CA&0&F9 Driver: n/a Name: Intel(R) ICH8 Family USB2 Enhanced Host Controller - 2836 Device ID: PCI\VEN_8086&DEV_2836&SUBSYS_9005104D&REV_03\3&33FD14CA&0&EF Driver: n/a Name: Intel(R) 82801 PCI Bridge - 2448 Device ID: PCI\VEN_8086&DEV_2448&SUBSYS_9005104D&REV_F3\3&33FD14CA&0&F0 Driver: n/a Name: Controlador de High Definition Audio Device ID: PCI\VEN_8086&DEV_284B&SUBSYS_9005104D&REV_03\3&33FD14CA&0&D8 Driver: n/a Name: Intel(R) ICH8 Family USB Universal Host Controller - 2835 Device ID: PCI\VEN_8086&DEV_2835&SUBSYS_9005104D&REV_03\3&33FD14CA&0&D1 Driver: n/a Name: Marvell Yukon 88E8036 PCI-E Fast Ethernet Controller Device ID: PCI\VEN_11AB&DEV_4351&SUBSYS_9005104D&REV_16\4&16BEB6B9&0&00E4 Driver: n/a Name: Intel(R) ICH8 Family PCI Express Root Port 5 - 2847 Device ID: PCI\VEN_8086&DEV_2847&SUBSYS_9005104D&REV_03\3&33FD14CA&0&E4 Driver: n/a Name: Intel(R) ICH8 Family USB Universal Host Controller - 2834 Device ID: PCI\VEN_8086&DEV_2834&SUBSYS_9005104D&REV_03\3&33FD14CA&0&D0 Driver: n/a Name: Controlador de armazenamento em massa Device ID: PCI\VEN_104C&DEV_803B&SUBSYS_9005104D&REV_00\4&3A867C58&0&1AF0 Driver: n/a Name: Intel(R) ICH8 Family PCI Express Root Port 3 - 2843 Device ID: PCI\VEN_8086&DEV_2843&SUBSYS_9005104D&REV_03\3&33FD14CA&0&E2 Driver: n/a Name: Intel(R) ICH8 Family USB Universal Host Controller - 2832 Device ID: PCI\VEN_8086&DEV_2832&SUBSYS_9005104D&REV_03\3&33FD14CA&0&EA Driver: n/a Name: Texas Instruments 1394 OHCI Compliant Host Controller Device ID: PCI\VEN_104C&DEV_803A&SUBSYS_9005104D&REV_00\4&3A867C58&0&19F0 Driver: n/a Name: Intel(R) Wireless WiFi Link 4965AGN Device ID: PCI\VEN_8086&DEV_4229&SUBSYS_11008086&REV_61\4&17422A72&0&00E2 Driver: n/a Name: Intel(R) ICH8 Family PCI Express Root Port 2 - 2841 Device ID: PCI\VEN_8086&DEV_2841&SUBSYS_9005104D&REV_03\3&33FD14CA&0&E1 Driver: n/a Name: Intel(R) ICH8 Family USB Universal Host Controller - 2831 Device ID: PCI\VEN_8086&DEV_2831&SUBSYS_9005104D&REV_03\3&33FD14CA&0&E9 Driver: n/a Name: Texas Instruments PCI-8x12/7x12/6x12 CardBus Controller Device ID: PCI\VEN_104C&DEV_8039&SUBSYS_9005104D&REV_00\4&3A867C58&0&18F0 Driver: n/a ------------------ DirectShow Filters ------------------ DirectShow Filters: WMAudio Decoder DMO,0x00800800,1,1,WMADMOD.DLL,6.01.7601.17514 WMAPro over S/PDIF DMO,0x00600800,1,1,WMADMOD.DLL,6.01.7601.17514 WMSpeech Decoder DMO,0x00600800,1,1,WMSPDMOD.DLL,6.01.7601.17514 MP3 Decoder DMO,0x00600800,1,1,mp3dmod.dll,6.01.7600.16385 Mpeg4s Decoder DMO,0x00800001,1,1,mp4sdecd.dll,6.01.7600.16385 WMV Screen decoder DMO,0x00600800,1,1,wmvsdecd.dll,6.01.7601.17514 WMVideo Decoder DMO,0x00800001,1,1,wmvdecod.dll,6.01.7601.17514 Mpeg43 Decoder DMO,0x00800001,1,1,mp43decd.dll,6.01.7600.16385 Mpeg4 Decoder DMO,0x00800001,1,1,mpg4decd.dll,6.01.7600.16385 Nero Audible Decoder,0x00200000,1,1,NeAudible.ax,4.11.0003.0007 Nero Subpicture Decoder,0x00400000,1,1,NeSubpicture.ax,4.11.0003.0007 ArcSoft TimeShift2.0 Client Filter,0x00400000,0,1,TimeShift2.ax,1.00.0000.0015 Nero Scene Detector 2,0x00200000,2,0,NeSceneDetector.ax,4.11.0003.0007 Nero Stream Buffer Sink,0x00200000,0,0,NeSBE.ax,4.11.0003.0007 Nero Subtitle,0x00200000,1,1,NeSubtitle.ax,4.11.0003.0007 DV Muxer,0x00400000,0,0,qdv.dll,6.06.7601.17514 DV Scenes,0x00200000,1,1,NVDV.dll,3.00.0004.0000 Color Space Converter,0x00400001,1,1,quartz.dll,6.06.7601.17514 WM ASF Reader,0x00400000,0,0,qasf.dll,12.00.7601.17514 Screen Capture filter,0x00200000,0,1,wmpsrcwp.dll,12.00.7601.17514 AVI Splitter,0x00600000,1,1,quartz.dll,6.06.7601.17514 VGA 16 Color Ditherer,0x00400000,1,1,quartz.dll,6.06.7601.17514 SBE2MediaTypeProfile,0x00200000,0,0,sbe.dll,6.06.7601.17514 Arcsoft PutDataSample Filter 1.0,0x00200000,1,1,ArcPutDataSample.ax,1.00.0000.0005 CyberLink AudioCD Filter (PDVD7),0x00600000,0,1,CLAudioCD.ax,5.00.0000.4417 Nero FTC,0x00200000,1,1,NeFTC.ax,1.00.0000.0000 Microsoft DTV-DVD Video Decoder,0x005fffff,2,4,msmpeg2vdec.dll,6.01.7140.0000 AC3 Parser Filter,0x00600000,1,1,mpg2splt.ax,6.06.7601.17514 CyberLink Audio Decoder (PDVD7),0x00201000,1,1,CLAud.ax,6.01.0000.4227 StreamBufferSink,0x00200000,0,0,sbe.dll,6.06.7601.17514 Nero Resize,0x00400000,1,1,NeResize.ax,4.11.0003.0007 MJPEG Decompressor,0x00600000,1,1,quartz.dll,6.06.7601.17514 CyberLink Audio Effect (PDVD7),0x00200000,1,1,CLAudFx.ax,6.00.0000.4111 MPEG-I Stream Splitter,0x00600000,1,2,quartz.dll,6.06.7601.17514 ArcSoft Mpeg Encoder Filter,0x00200000,2,0,ArcMpegCodec.ax,2.05.0000.0013 MPEG-2 PSI Reader Filter,0x00200000,0,0,Mpeg2PsiReader.ax,1.00.0000.0004 SAMI (CC) Parser,0x00400000,1,1,quartz.dll,6.06.7601.17514 Nero AV Synchronizer,0x00200000,1,1,NeAVSync.ax,4.11.0003.0007 VBI Codec,0x00600000,1,4,VBICodec.ax,6.06.7601.17514 Nero Audio Stream Renderer,0x00200000,1,0,NeRender.ax,4.11.0003.0007 MPEG-2 Splitter,0x005fffff,1,0,mpg2splt.ax,6.06.7601.17514 Closed Captions Analysis Filter,0x00200000,2,5,cca.dll,6.06.7601.17514 SBE2FileScan,0x00200000,0,0,sbe.dll,6.06.7601.17514 Microsoft MPEG-2 Video Encoder,0x00200000,1,1,msmpeg2enc.dll,6.01.7601.17514 Nero Digital AVC Audio Encoder,0x00200000,1,2,NeNDAud.ax,4.11.0003.0007 Nero Digital AVC File Writer,0x00200000,1,0,NeNDMux.ax,4.11.0003.0007 Nero Digital AVC Video Enc,0x00200000,1,2,NeNDVid.ax,4.11.0003.0007 Nero Digital AVC Null Renderer,0x00200000,1,0,NeNDMux.ax,4.11.0003.0007 Nero Digital AVC Muxer,0x00200000,2,1,NeNDMux.ax,4.11.0003.0007 CyberLink Video/SP Decoder(PDVD7 HomeNetwork),0x00200000,2,3,CLVSD.ax,6.00.0000.3313 Arcsoft GetDataSample Filter 1.0,0x00200000,1,1,ArcGetDataSample.ax,1.00.0000.0012 ArcSoft MPEG Audio Decoder,0x00600000,1,1,mpgaudio.ax,2.04.0002.0016 Nero QuickTime(tm) Video Decoder,0x00400000,1,1,NeQTDec.ax,4.11.0003.0007 Internal Script Command Renderer,0x00800001,1,0,quartz.dll,6.06.7601.17514 MPEG Audio Decoder,0x03680001,1,1,quartz.dll,6.06.7601.17514 Nero Digital AVC Subpicture Enc,0x00200000,1,0,NeNDMux.ax,4.11.0003.0007 Nero Format Converter,0x00200000,1,1,NeroFormatConv.ax,4.11.0003.0007 Nero Overlay Mixer,0x00200000,1,1,NeOverlayMixer.ax,4.11.0003.0007 Nero MP4 Splitter,0x00600000,1,1,NeMP4Splitter.ax,4.11.0003.0007 DV Splitter,0x00600000,1,2,qdv.dll,6.06.7601.17514 HighMAT and MPV Navigator Filter,0x00200000,0,3,HMNavigator.ax,4.11.0003.0007 Video Mixing Renderer 9,0x00200000,1,0,quartz.dll,6.06.7601.17514 Nero Photo Source,0x00200000,0,1,NePhotoSource.ax,4.11.0003.0007 CyberLink Demux (PDVD7),0x00602000,1,0,CLDemuxer.ax,1.00.0000.4528 CyberLink MPEG Splitter,0x00200000,1,2,CLSplter.ax,3.01.0000.3022 ArcSoft TimeShift2.0 Server Filter,0x00200000,1,0,TimeShift2.ax,1.00.0000.0015 Nero Video Analyzer,0x00200000,2,0,NeVideoAnalyzer.ax,4.11.0003.0007 Nero ES Video Reader,0x00600000,0,1,NDParser.ax,4.11.0003.0007 CyberLink Line21 Decoder (PDVD7),0x00200000,0,2,CLLine21.ax,4.00.0000.7602 Microsoft MPEG-2 Encoder,0x00200000,2,1,msmpeg2enc.dll,6.01.7601.17514 DV Source Filter,0x00400000,0,1,NVDV.dll,3.00.0004.0000 MPEG-2 Stream Reader Filter,0x00200000,0,0,Mpeg2StreamReader.ax,1.04.0000.0000 Nero Audio CD Filter,0x00200000,0,1,NeAudCD.ax,4.11.0003.0007 Nero Video Renderer,0x00200000,1,0,NeVideoRenderer.ax,4.11.0003.0007 Nero PresentationGraphics Decoder,0x00600000,2,1,NeBDGraphic.ax,4.11.0003.0007 ACM Wrapper,0x00600000,1,1,quartz.dll,6.06.7601.17514 Video Renderer,0x00800001,1,0,quartz.dll,6.06.7601.17514 ArcSoft File Dump,0x00200000,1,0,FileDump.ax,2.00.0000.0008 MPEG-2 Video Stream Analyzer,0x00200000,0,0,sbe.dll,6.06.7601.17514 Line 21 Decoder,0x00600000,1,1,qdvd.dll,6.06.7601.17514 Nero InteractiveGraphics Decoder,0x00600000,1,1,NeBDGraphic.ax,4.11.0003.0007 Video Port Manager,0x00600000,2,1,quartz.dll,6.06.7601.17514 CyberLink Push-Mode CLStream (PDVD7),0x00200000,0,1,CLStream(PushMode).ax,1.00.0000.1627 CyberLink Audio Decoder (PDVD7 UPnP),0x00200000,1,1,CLAud.ax,6.01.0000.3816 Video Renderer,0x00400000,1,0,quartz.dll,6.06.7601.17514 Nero Sound Processor,0x00200000,1,1,NeSoundProc.ax,4.11.0003.0007 Nero Audio Sample Renderer,0x00200000,1,0,NeRender.ax,4.11.0003.0007 CyberLink Audio Spectrum Analyzer (PDVD7),0x00200000,1,1,CLAudSpa.ax,1.00.0000.0924 Nero Vcd Navigator,0x00600000,0,2,NeVCD.ax,4.11.0003.0007 ArcSoft VideoEffect Filter,0x00200000,1,1,ArcVideoEffect.ax,1.00.0000.0010 VPS Decoder,0x00200000,0,0,WSTPager.ax,6.06.7601.17514 WM ASF Writer,0x00400000,0,0,qasf.dll,12.00.7601.17514 Nero Mpeg2 Encoder,0x00200000,2,1,NeVCR.ax,4.11.0003.0007 VBI Surface Allocator,0x00600000,1,1,vbisurf.ax,6.01.7601.17514 ArcSoft Null Render,0x00200000,1,0,ArcNullRender.ax,1.00.0000.0001 Nero Video Stream Renderer,0x00200000,1,0,NeRender.ax,4.11.0003.0007 File writer,0x00200000,1,0,qcap.dll,6.06.7601.17514 iTV Data Sink,0x00600000,1,0,itvdata.dll,6.06.7601.17514 Nero FLV Splitter,0x00600000,1,1,NeFLVSplitter.ax,4.11.0003.0007 iTV Data Capture filter,0x00600000,1,1,itvdata.dll,6.06.7601.17514 CyberLink Video/SP Decoder (PDVD7),0x00602000,2,3,CLVsd.ax,8.00.0000.1918 Nero Stream Buffer Source,0x00200000,0,0,NeSBE.ax,4.11.0003.0007 Nero PS Muxer,0x00200000,1,1,NePSMuxer.ax,4.11.0003.0007 CyberLink Audio Wizard,0x00201010,1,1,CLAudWizard.ax,1.00.0000.1730 DVD Navigator,0x00200000,0,3,qdvd.dll,6.06.7601.17514 CyberLink DVD Navigator (PDVD7),0x00600000,0,3,CLNavX.ax,7.00.0000.3112 CyberLink TimeStretch Filter (PDVD7),0x00200000,1,1,clauts.ax,1.00.0000.5423 Overlay Mixer2,0x00200000,1,1,qdvd.dll,6.06.7601.17514 Cyberlink SubTitle Importor (PDVD7),0x00200000,1,1,CLSubTitle.ax,1.00.0000.1604 Nero Splitter,0x00600000,1,3,NeSplitter.ax,4.11.0003.0007 Nero Deinterlace,0x00200000,1,1,NeDeinterlace.ax,4.11.0003.0007 AVI Draw,0x00600064,9,1,quartz.dll,6.06.7601.17514 RDP DShow Redirection Filter,0xffffffff,1,0,DShowRdpFilter.dll, Nero File Source / Splitter,0x00600000,0,3,NeFSource.ax,4.11.0003.0007 Microsoft MPEG-2 Audio Encoder,0x00200000,1,1,msmpeg2enc.dll,6.01.7601.17514 WST Pager,0x00200000,1,1,WSTPager.ax,6.06.7601.17514 MPEG-2 Demultiplexer,0x00600000,1,1,mpg2splt.ax,6.06.7601.17514 DV Video Decoder,0x00800000,1,1,qdv.dll,6.06.7601.17514 CyberLink MPEG-4 Splitter (PDVD7),0x00600000,1,2,clm4splt.ax,1.00.0000.3229 ArcSoft Realtime Capture Encoder Filter,0x00200000,2,0,ArcCaptureEncoder.ax,2.05.0000.0032 Nero Video Processor,0x00200000,1,1,NeroVideoProc.ax,4.11.0003.0007 SampleGrabber,0x00200000,1,1,qedit.dll,6.06.7601.17514 Null Renderer,0x00200000,1,0,qedit.dll,6.06.7601.17514 Nero Sound Switcher,0x00200000,1,1,NeSoundSwitch.ax,4.11.0003.0007 Arcsoft WMV/ASF Splitter,0x00200000,1,0,ArcWmvSpl.ax,1.00.0000.0012 MPEG-2 Sections and Tables,0x005fffff,1,0,Mpeg2Data.ax,6.06.7601.17514 Microsoft AC3 Encoder,0x00200000,1,1,msac3enc.dll,6.01.7601.17514 Nero Audio CD Navigator,0x00200000,0,1,NeAudCD.ax,4.11.0003.0007 StreamBufferSource,0x00200000,0,0,sbe.dll,6.06.7601.17514 Video MotionDetect,0x00200000,1,1,motiondetect.ax,1.00.0000.0005 Smart Tee,0x00200000,1,2,qcap.dll,6.06.7601.17514 Nero Thumbnail Decoder,0x00600000,1,1,NeBDThumbnail.ax,4.11.0003.0007 Overlay Mixer,0x00200000,0,0,qdvd.dll,6.06.7601.17514 Nero Scene Detector,0x00200000,1,0,NeSceneDetector.ax,4.11.0003.0007 Nero Stream Control,0x00200000,1,1,NeStreamControl.ax,1.00.0000.0000 AVI Decompressor,0x00600000,1,1,quartz.dll,6.06.7601.17514 Nero Sample Queue,0x00200000,1,1,NeSampleQueue.ax,1.00.0000.0000 AVI/WAV File Source,0x00400000,0,2,quartz.dll,6.06.7601.17514 Arcsoft Snapshot Filter 1.0,0x00200000,1,1,ArcSnap.ax,1.00.0000.0024 Wave Parser,0x00400000,1,1,quartz.dll,6.06.7601.17514 MIDI Parser,0x00400000,1,1,quartz.dll,6.06.7601.17514 Multi-file Parser,0x00400000,1,1,quartz.dll,6.06.7601.17514 File stream renderer,0x00400000,1,1,quartz.dll,6.06.7601.17514 ArcSoft MPEG Splitter,0x00400000,1,2,ArcSpl.ax,2.04.0002.0045 Nero File Source,0x00200000,0,1,NeFileSrc.ax,4.11.0003.0007 Nero QuickTime(tm) Audio Decoder,0x00400000,1,1,NeQTDec.ax,4.11.0003.0007 Nero File Source (Async.),0x00400000,0,1,NeFileSourceAsync.ax,4.11.0003.0007 Nero Ogg Splitter,0x00400000,1,1,NeOggSplitter.ax,4.11.0003.0007 Microsoft DTV-DVD Audio Decoder,0x005fffff,1,1,msmpeg2adec.dll,6.01.7140.0000 Nero Digital Parser,0x00600000,0,3,NDParser.ax,4.11.0003.0007 StreamBufferSink2,0x00200000,0,0,sbe.dll,6.06.7601.17514 AVI Mux,0x00200000,1,0,qcap.dll,6.06.7601.17514 Line 21 Decoder 2,0x00600002,1,1,quartz.dll,6.06.7601.17514 File Source (Async.),0x00400000,0,1,quartz.dll,6.06.7601.17514 File Source (URL),0x00400000,0,1,quartz.dll,6.06.7601.17514 Nero MP3 Encoder,0x00200000,1,1,NeMp3Encoder.ax,4.11.0003.0007 ArcSoft Time Stamp,0x00200000,1,1,ArcTimeStamp.ax,1.00.0000.0003 CyberLink Demux (PDVD7 UPnP),0x00200000,1,0,CLDemuxer.ax,1.00.0000.4513 Nero Frame Capture,0x00200000,1,1,NeCapture.ax,4.11.0003.0007 Nero Video Sample Renderer,0x00200000,1,0,NeRender.ax,4.11.0003.0007 ArcSoft MPEG Video Decoder,0x00600000,1,1,mpgvideo.ax,2.04.0000.0048 HighMAT/MPV Navigator Client Filter,0x00200000,0,0,HMNavigator.ax,4.11.0003.0007 Infinite Pin Tee Filter,0x00200000,1,1,qcap.dll,6.06.7601.17514 Nero DV Splitter,0x00200000,1,2,NeDVSplitter.ax,4.11.0003.0007 Enhanced Video Renderer,0x00200000,1,0,evr.dll,6.01.7601.17514 CyberLink Streamming Filter (PDVD7),0x00200000,0,1,CLStream.ax,1.01.0000.2902 BDA MPEG2 Transport Information Filter,0x00200000,2,0,psisrndr.ax,6.06.7601.17514 MPEG Video Decoder,0x40000001,1,1,quartz.dll,6.06.7601.17514 WDM Streaming Tee/Splitter Devices: Conversor em T entre Coletores,0x00200000,1,1,ksproxy.ax,6.01.7601.17514 Video Compressors: WMVideo8 Encoder DMO,0x00600800,1,1,wmvxencd.dll,6.01.7600.16385 WMVideo9 Encoder DMO,0x00600800,1,1,wmvencod.dll,6.01.7600.16385 MSScreen 9 encoder DMO,0x00600800,1,1,wmvsencd.dll,6.01.7600.16385 ArcSoft Mpeg Encode Filter,0x00200000,0,0,ArcMpegCodec.ax,2.05.0000.0013 ArcSoft Realtime Capture Encoder Filter,0x00200000,0,0,ArcCaptureEncoder.ax,2.05.0000.0032 DV Video Encoder,0x00200000,0,0,qdv.dll,6.06.7601.17514 MJPEG Compressor,0x00200000,0,0,quartz.dll,6.06.7601.17514 Cinepak Codec by Radius,0x00200000,1,1,qcap.dll,6.06.7601.17514 Codec IYUV Intel,0x00200000,1,1,qcap.dll,6.06.7601.17514 Codec IYUV Intel,0x00200000,1,1,qcap.dll,6.06.7601.17514 Microsoft RLE,0x00200000,1,1,qcap.dll,6.06.7601.17514 Microsoft Video 1,0x00200000,1,1,qcap.dll,6.06.7601.17514 Audio Compressors: WM Speech Encoder DMO,0x00600800,1,1,WMSPDMOE.DLL,6.01.7600.16385 WMAudio Encoder DMO,0x00600800,1,1,WMADMOE.DLL,6.01.7600.16385 IMA ADPCM,0x00200000,1,1,quartz.dll,6.06.7601.17514 PCM,0x00200000,1,1,quartz.dll,6.06.7601.17514 Microsoft ADPCM,0x00200000,1,1,quartz.dll,6.06.7601.17514 GSM 6.10,0x00200000,1,1,quartz.dll,6.06.7601.17514 CCITT A-Law,0x00200000,1,1,quartz.dll,6.06.7601.17514 CCITT u-Law,0x00200000,1,1,quartz.dll,6.06.7601.17514 MPEG Layer-3,0x00200000,1,1,quartz.dll,6.06.7601.17514 Audio Capture Sources: Microfone (Dispositivo de High ,0x00200000,0,0,qcap.dll,6.06.7601.17514 PBDA CP Filters: PBDA DTFilter,0x00600000,1,1,CPFilters.dll,6.06.7601.17514 PBDA ETFilter,0x00200000,0,0,CPFilters.dll,6.06.7601.17514 PBDA PTFilter,0x00200000,0,0,CPFilters.dll,6.06.7601.17514 Midi Renderers: Default MidiOut Device,0x00800000,1,0,quartz.dll,6.06.7601.17514 Microsoft GS Wavetable Synth,0x00200000,1,0,quartz.dll,6.06.7601.17514 WDM Streaming Capture Devices: Captura Mista de HD Audio,0x00200000,1,1,ksproxy.ax,6.01.7601.17514 Dispositivo de vídeo USB,0x00200000,1,1,ksproxy.ax,6.01.7601.17514 WDM Streaming Rendering Devices: Alto-falante de HD Audio,0x00200000,1,1,ksproxy.ax,6.01.7601.17514 BDA Network Providers: Microsoft ATSC Network Provider,0x00200000,0,1,MSDvbNP.ax,6.06.7601.17514 Microsoft DVBC Network Provider,0x00200000,0,1,MSDvbNP.ax,6.06.7601.17514 Microsoft DVBS Network Provider,0x00200000,0,1,MSDvbNP.ax,6.06.7601.17514 Microsoft DVBT Network Provider,0x00200000,0,1,MSDvbNP.ax,6.06.7601.17514 Microsoft Network Provider,0x00200000,0,1,MSNP.ax,6.06.7601.17514 Video Capture Sources: Dispositivo de vídeo USB,0x00200000,1,1,ksproxy.ax,6.01.7601.17514 Multi-Instance Capable VBI Codecs: VBI Codec,0x00600000,1,4,VBICodec.ax,6.06.7601.17514 BDA Transport Information Renderers: BDA MPEG2 Transport Information Filter,0x00600000,2,0,psisrndr.ax,6.06.7601.17514 MPEG-2 Sections and Tables,0x00600000,1,0,Mpeg2Data.ax,6.06.7601.17514 BDA CP/CA Filters: Decrypt/Tag,0x00600000,1,1,EncDec.dll,6.06.7601.17514 Encrypt/Tag,0x00200000,0,0,EncDec.dll,6.06.7601.17514 PTFilter,0x00200000,0,0,EncDec.dll,6.06.7601.17514 XDS Codec,0x00200000,0,0,EncDec.dll,6.06.7601.17514 WDM Streaming Communication Transforms: Conversor em T entre Coletores,0x00200000,1,1,ksproxy.ax,6.01.7601.17514 Audio Renderers: Alto-falantes (Dispositivo de H,0x00200000,1,0,quartz.dll,6.06.7601.17514 CyberLink Audio Renderer (PDVD7),0x00200000,1,0,cladr.ax,6.00.0000.3916 Default DirectSound Device,0x00800000,1,0,quartz.dll,6.06.7601.17514 Default WaveOut Device,0x00200000,1,0,quartz.dll,6.06.7601.17514 DirectSound: Alto-falantes (Dispositivo de High Definition Audio),0x00200000,1,0,quartz.dll,6.06.7601.17514 --------------- EVR Power Information --------------- Current Setting: {5C67A112-A4C9-483F-B4A7-1D473BECAFDC} (Quality) Quality Flags: 2576 Enabled: Force throttling Allow half deinterlace Allow scaling Decode Power Usage: 100 Balanced Flags: 1424 Enabled: Force throttling Allow batching Force half deinterlace Force scaling Decode Power Usage: 50 PowerFlags: 1424 Enabled: Force throttling Allow batching Force half deinterlace Force scaling Decode Power Usage: 0
Leandropesao
// Generated by CoffeeScript 1.6.2 (function() { var Command, RoomHelper, User, addCommand, afkCheck, afksCommand, allAfksCommand, announceCurate, antispam, apiHooks, avgVoteRatioCommand, chatCommandDispatcher, chatUniversals, cmds, data, dieCommand, disconnectLookupCommand, fans, handleNewSong, handleUserJoin, handleUserLeave, handleVote, hook, initEnvironment, initHooks, initialize, lockCommand, lockskipCommand, msToStr, newSongsCommand, newsCommand, populateUserData, channelCommand, pupOnline, reloadCommand, removeCommand, roomHelpCommand, rulesCommand, settings, skipCommand, staffCommand, statusCommand, themeCommand, undoHooks, unhook, unlockCommand, updateVotes, versionCommand, voteRatioCommand, ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref21, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (_hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; settings = (function() { function settings() { this.implode = __bind(this.implode, this); this.intervalMessages = __bind(this.intervalMessages, this); this.startAfkInterval = __bind(this.startAfkInterval, this); this.setInternalWaitlist = __bind(this.setInternalWaitlist, this); this.userJoin = __bind(this.userJoin, this); this.getRoomUrlPath = __bind(this.getRoomUrlPath, this); this.startup = __bind(this.startup, this); } settings.prototype.currentsong = {}; settings.prototype.users = {}; settings.prototype.djs = []; settings.prototype.mods = []; settings.prototype.host = []; settings.prototype.hasWarned = false; settings.prototype.currentwoots = 0; settings.prototype.currentmehs = 0; settings.prototype.currentcurates = 0; settings.prototype.roomUrlPath = null; settings.prototype.internalWaitlist = []; settings.prototype.userDisconnectLog = []; settings.prototype.voteLog = {}; settings.prototype.seshOn = false; settings.prototype.forceSkip = false; settings.prototype.seshMembers = []; settings.prototype.launchTime = null; settings.prototype.totalVotingData = { woots: 0, mehs: 0, curates: 0 }; settings.prototype.pupScriptUrl = 'https://dl.dropbox.com/u/21023321/TastycatBot.js'; settings.prototype.afkTime = 666 * 60 * 1000; settings.prototype.songIntervalMessages = [ { interval: 7, offset: 0, msg: "Entrem na nossa pagina: http://www.facebook.com/EspecialistasDasZoeiras?ref=hl" }, { interval: 5, offset: 0, msg: "Mantenha-se ativo no bate-papo e Votando. Ser não sera Retirado da Lista de DJ e da Cabine!" } ]; settings.prototype.songCount = 0; settings.prototype.startup = function() { this.launchTime = new Date(); return this.roomUrlPath = this.getRoomUrlPath(); }; settings.prototype.getRoomUrlPath = function() { return window.location.pathname.replace(/\//g, ''); }; settings.prototype.newSong = function() { this.totalVotingData.woots += this.currentwoots; this.totalVotingData.mehs += this.currentmehs; this.totalVotingData.curates += this.currentcurates; this.setInternalWaitlist(); this.currentsong = API.getMedia(); if (this.currentsong !== null) { return this.currentsong; } else { return false; } }; settings.prototype.userJoin = function(u) { var userIds, _ref; userIds = Object.keys(this.users); if (_ref = u.id, __indexOf.call(userIds, _ref) >= 0) { return this.users[u.id].inRoom(true); } else { this.users[u.id] = new User(u); return this.voteLog[u.id] = {}; } }; settings.prototype.setInternalWaitlist = function() { var boothWaitlist, fullWaitList, lineWaitList; boothWaitlist = API.getDJs().slice(1); lineWaitList = API.getWaitList(); fullWaitList = boothWaitlist.concat(lineWaitList); return this.internalWaitlist = fullWaitList; }; settings.prototype.activity = function(obj) { if (obj.type === 'message') { return this.users[obj.fromID].updateActivity(); } }; settings.prototype.startAfkInterval = function() { return this.afkInterval = setInterval(afkCheck, 2000); }; settings.prototype.intervalMessages = function() { var msg, _i, _len, _ref, _results; this.songCount++; _ref = this.songIntervalMessages; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { msg = _ref[_i]; if (((this.songCount + msg['offset']) % msg['interval']) === 0) { _results.push(API.sendChat(msg['msg'])); } else { _results.push(void 0); } } return _results; }; settings.prototype.implode = function() { var item, val; for (item in this) { val = this[item]; if (typeof this[item] === 'object') { delete this[item]; } } return clearInterval(this.afkInterval); }; settings.prototype.lockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": true, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; settings.prototype.unlockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": false, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; return settings; })(); data = new settings(); User = (function() { User.prototype.afkWarningCount = 0; User.prototype.lastWarning = null; User.prototype["protected"] = false; User.prototype.isInRoom = true; function User(user) { this.user = user; this.updateVote = __bind(this.updateVote, this); this.inRoom = __bind(this.inRoom, this); this.notDj = __bind(this.notDj, this); this.warn = __bind(this.warn, this); this.getIsDj = __bind(this.getIsDj, this); this.getWarningCount = __bind(this.getWarningCount, this); this.getUser = __bind(this.getUser, this); this.getLastWarning = __bind(this.getLastWarning, this); this.getLastActivity = __bind(this.getLastActivity, this); this.getLastDrinkTime = __bind(this.getLastDrinkTime, this); this.updateDrinkTime = __bind(this.updateDrinkTime, this); this.updateActivity = __bind(this.updateActivity, this); this.init = __bind(this.init, this); this.init(); } User.prototype.init = function() { this.lastActivity = new Date(); return this.drinkTime = new Date(); }; User.prototype.updateActivity = function() { this.lastActivity = new Date(); this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.updateDrinkTime = function() { return this.drinkTime = new Date(); }; User.prototype.getLastDrinkTime = function() { return this.drinkTime; }; User.prototype.getLastActivity = function() { return this.lastActivity; }; User.prototype.getLastWarning = function() { if (this.lastWarning === null) { return false; } else { return this.lastWarning; } }; User.prototype.getUser = function() { return this.user; }; User.prototype.getWarningCount = function() { return this.afkWarningCount; }; User.prototype.getIsDj = function() { var DJs, dj, _i, _len; DJs = API.getDJs(); for (_i = 0, _len = DJs.length; _i < _len; _i++) { dj = DJs[_i]; if (this.user.id === dj.id) { return true; } } return false; }; User.prototype.warn = function() { this.afkWarningCount++; return this.lastWarning = new Date(); }; User.prototype.notDj = function() { this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.inRoom = function(online) { return this.isInRoom = online; }; User.prototype.updateVote = function(v) { if (this.isInRoom) { return data.voteLog[this.user.id][data.currentsong.id] = v; } }; return User; })(); RoomHelper = (function() { function RoomHelper() {} RoomHelper.prototype.lookupUser = function(username) { var id, u, _ref; _ref = data.users; for (id in _ref) { u = _ref[id]; if (u.getUser().username === username) { return u.getUser(); } } return false; }; RoomHelper.prototype.userVoteRatio = function(user) { var songId, songVotes, vote, votes; songVotes = data.voteLog[user.id]; votes = { 'woot': 0, 'meh': 0 }; for (songId in songVotes) { vote = songVotes[songId]; if (vote === 1) { votes['woot']++; } else if (vote === -1) { votes['meh']++; } } votes['positiveRatio'] = (votes['woot'] / (votes['woot'] + votes['meh'])).toFixed(2); return votes; }; return RoomHelper; })(); pupOnline = function() { var currentversion, me, myname; me = API.getSelf(); myname = me.username; currentversion = "1.0.0"; log("BOT editado pelo Rafal Moraes versão " + currentversion + " Chupa Jô"); return API.sendChat("/me on"); }; populateUserData = function() { var u, users, _i, _len; users = API.getUsers(); for (_i = 0, _len = users.length; _i < _len; _i++) { u = users[_i]; data.users[u.id] = new User(u); data.voteLog[u.id] = {}; } }; initEnvironment = function() { document.getElementById("button-vote-positive").click(); document.getElementById("button-sound").click(); Playback.streamDisabled = true; return Playback.stop(); }; initialize = function() { pupOnline(); populateUserData(); initEnvironment(); initHooks(); data.startup(); data.newSong(); return data.startAfkInterval(); }; afkCheck = function() { var DJs, id, lastActivity, lastWarned, now, secsLastActive, timeSinceLastActivity, timeSinceLastWarning, twoMinutes, user, _ref, _results; _ref = data.users; _results = []; for (id in _ref) { user = _ref[id]; now = new Date(); lastActivity = user.getLastActivity(); timeSinceLastActivity = now.getTime() - lastActivity.getTime(); if (timeSinceLastActivity > data.afkTime) { if (user.getIsDj()) { secsLastActive = timeSinceLastActivity / 1000; if (user.getWarningCount() === 0) { user.warn(); _results.push(API.sendChat("@" + user.getUser().username + ", Você não falou no chat nos ultimos 30 minutos, por favor fale alguma coisa em 4 minutos ou será kickado da line de dj.")); } else if (user.getWarningCount() === 1) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); twoMinutes = 4 * 60 * 1000; if (timeSinceLastWarning > twoMinutes) { DJs = API.getDJs(); if (DJs.length > 0 && DJs[0].id !== user.getUser().id) { API.sendChat("@" + user.getUser().username + ", você foi avisado, fique ativo enquanto está na line."); API.moderateRemoveDJ(id); _results.push(user.warn()); } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(user.notDj()); } } else { _results.push(void 0); } } return _results; }; msToStr = function(msTime) { var ms, msg, timeAway; msg = ''; timeAway = { 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 0 }; ms = { 'day': 24 * 60 * 60 * 1000, 'hour': 60 * 60 * 1000, 'minute': 60 * 1000, 'second': 1000 }; if (msTime > ms['day']) { timeAway['days'] = Math.floor(msTime / ms['day']); msTime = msTime % ms['day']; } if (msTime > ms['hour']) { timeAway['hours'] = Math.floor(msTime / ms['hour']); msTime = msTime % ms['hour']; } if (msTime > ms['minute']) { timeAway['minutes'] = Math.floor(msTime / ms['minute']); msTime = msTime % ms['minute']; } if (msTime > ms['second']) { timeAway['seconds'] = Math.floor(msTime / ms['second']); } if (timeAway['days'] !== 0) { msg += timeAway['days'].toString() + 'd'; } if (timeAway['hours'] !== 0) { msg += timeAway['hours'].toString() + 'h'; } if (timeAway['minutes'] !== 0) { msg += timeAway['minutes'].toString() + 'm'; } if (timeAway['seconds'] !== 0) { msg += timeAway['seconds'].toString() + 's'; } if (msg !== '') { return msg; } else { return false; } }; Command = (function() { function Command(msgData) { this.msgData = msgData; this.init(); } Command.prototype.init = function() { this.parseType = null; this.command = null; return this.rankPrivelege = null; }; Command.prototype.functionality = function(data) {}; Command.prototype.hasPrivelege = function() { var user; user = data.users[this.msgData.fromID].getUser(); switch (this.rankPrivelege) { case 'host': return user.permission >= 5; case 'cohost': return user.permission >= 4; case 'mod': return user.permission >= 3; case 'manager': return user.permission >= 3; case 'bouncer': return user.permission >= 2; case 'featured': return user.permission >= 1; default: return true; } }; Command.prototype.commandMatch = function() { var command, msg, _i, _len, _ref; msg = this.msgData.message; if (typeof this.command === 'string') { if (this.parseType === 'exact') { if (msg === this.command) { return true; } else { return false; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, this.command.length) === this.command) { return true; } else { return false; } } else if (this.parseType === 'contains') { if (msg.indexOf(this.command) !== -1) { return true; } else { return false; } } } else if (typeof this.command === 'object') { _ref = this.command; for (_i = 0, _len = _ref.length; _i < _len; _i++) { command = _ref[_i]; if (this.parseType === 'exact') { if (msg === command) { return true; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, command.length) === command) { return true; } } else if (this.parseType === 'contains') { if (msg.indexOf(command) !== -1) { return true; } } } return false; } }; Command.prototype.evalMsg = function() { if (this.commandMatch() && this.hasPrivelege()) { this.functionality(); return true; } else { return false; } }; return Command; })(); newsCommand = (function(_super) { __extends(newsCommand, _super); function newsCommand() { _ref = newsCommand.__super__.constructor.apply(this, arguments); return _ref; } newsCommand.prototype.init = function() { this.command = '!cotas'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newsCommand.prototype.functionality = function() { var msg; msg = "/me Acaba de Ativar modo Cota e roubou sua vaga na Faculdade e sua vez na Cabine de DJ!"; return API.sendChat(msg); }; return newsCommand; })(Command); newSongsCommand = (function(_super) { __extends(newSongsCommand, _super); function newSongsCommand() { _ref1 = newSongsCommand.__super__.constructor.apply(this, arguments); return _ref1; } newSongsCommand.prototype.init = function() { this.command = '!musicanovas'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newSongsCommand.prototype.functionality = function() { var arts, cMedia, chans, chooseRandom, mChans, msg, selections, u, _ref2; mChans = this.memberChannels.slice(0); chans = this.channels.slice(0); arts = this.artists.slice(0); chooseRandom = function(list) { var l, r; l = list.length; r = Math.floor(Math.random() * l); return list.splice(r, 1); }; selections = { channels: [], artist: '' }; u = data.users[this.msgData.fromID].getUser().username; if (u.indexOf("MistaDubstep") !== -1) { selections['channels'].push('MistaDubstep'); } else if (u.indexOf("Underground Promotions") !== -1) { selections['channels'].push('UndergroundDubstep'); } else { selections['channels'].push(chooseRandom(mChans)); } selections['channels'].push(chooseRandom(chans)); selections['channels'].push(chooseRandom(chans)); cMedia = API.getMedia(); if (_ref2 = cMedia.author, __indexOf.call(arts, _ref2) >= 0) { selections['artist'] = cMedia.author; } else { selections['artist'] = chooseRandom(arts); } msg = "Querem musica de Dubstep do " + selections['artist'] + " entre! Tem musicas nova sempre em http://youtube.com/" + selections['channels'][0] + " http://youtube.com/" + selections['channels'][1] + " ou http://youtube.com/" + selections['channels'][2]; return API.sendChat(msg); }; newSongsCommand.prototype.memberChannels = ["MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.channels = ["BassRape", "MonstercatMedia", "UKFdubstep", "DropThatBassline", "VitalDubstep", "AirwaveDubstepTV", "InspectorDubplate", "TehDubstepChannel", "UNITEDubstep", "LuminantNetwork", "TheSoundIsle", "PandoraMuslc", "MrSuicideSheep", "HearTheSensation", "bassoutletpromos", "MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.artists = ["Doctor P", "Excision", "Flux Pavilion", "Knife Party", "Rusko", "Bassnectar", "Nero", "Deadmau5", "Borgore", "Zomboy"]; return newSongsCommand; })(Command); themeCommand = (function(_super) { __extends(themeCommand, _super); function themeCommand() { _ref2 = themeCommand.__super__.constructor.apply(this, arguments); return _ref2; } themeCommand.prototype.init = function() { this.command = '!tema'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; themeCommand.prototype.functionality = function() { var msg; msg = "Temas permitidos aqui na sala. electro, techno, "; msg += "dubstep."; return API.sendChat(msg); }; return themeCommand; })(Command); rulesCommand = (function(_super) { __extends(rulesCommand, _super); function rulesCommand() { _ref3 = rulesCommand.__super__.constructor.apply(this, arguments); return _ref3; } rulesCommand.prototype.init = function() { this.command = '!regras'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; rulesCommand.prototype.functionality = function() { var msg1, msg2; msg1 = " 1) Video no Maximo 6 minutos. "; msg1 += " 2) Sem Flood! "; msg1 += " 3) Nao escrever em colorido "; msg1 += " 4) Respeitar os Adms e Mods;s "; msg1 += " 5) Nao Fiquem Pedindo Cargos "; msg2 = "Curta: http://www.facebook.com/EspecialistasDasZoeiras?ref=hl"; msg2 += ""; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return rulesCommand; })(Command); roomHelpCommand = (function(_super) { __extends(roomHelpCommand, _super); function roomHelpCommand() { _ref4 = roomHelpCommand.__super__.constructor.apply(this, arguments); return _ref4; } roomHelpCommand.prototype.init = function() { this.command = '!ajuda'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; roomHelpCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "Bem vindo a Sala! Para ser o DJ, Criar uma lista de reprodução e coloque Musica do Youtube ou soundcloud. "; msg1 += "Se é novo procure pelo seu nome na sua tela (do lado da cabine de dj e clique) e depois mude o nome."; msg2 = "Para Ganhar Pontos é só clica em Bacana. "; msg2 += "Digite !regras pare ler as porra das regras."; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return roomHelpCommand; })(Command); afksCommand = (function(_super) { __extends(afksCommand, _super); function afksCommand() { _ref5 = afksCommand.__super__.constructor.apply(this, arguments); return _ref5; } afksCommand.prototype.init = function() { this.command = '!afks'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; afksCommand.prototype.functionality = function() { var dj, djAfk, djs, msg, now, _i, _len; msg = ''; djs = API.getDJs(); for (_i = 0, _len = djs.length; _i < _len; _i++) { dj = djs[_i]; now = new Date(); djAfk = now.getTime() - data.users[dj.id].getLastActivity().getTime(); if (djAfk > (5 * 60 * 1000)) { if (msToStr(djAfk) !== false) { msg += dj.username + ' - ' + msToStr(djAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Se fudeu não tem ninguém AFK."); } else { return API.sendChat('AFKs: ' + msg); } }; return afksCommand; })(Command); allAfksCommand = (function(_super) { __extends(allAfksCommand, _super); function allAfksCommand() { _ref6 = allAfksCommand.__super__.constructor.apply(this, arguments); return _ref6; } allAfksCommand.prototype.init = function() { this.command = '!todosafks'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; allAfksCommand.prototype.functionality = function() { var msg, now, u, uAfk, usrs, _i, _len; msg = ''; usrs = API.getUsers(); for (_i = 0, _len = usrs.length; _i < _len; _i++) { u = usrs[_i]; now = new Date(); uAfk = now.getTime() - data.users[u.id].getLastActivity().getTime(); if (uAfk > (10 * 60 * 1000)) { if (msToStr(uAfk) !== false) { msg += u.username + ' - ' + msToStr(uAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Se fudeu não tem ninguém AFK."); } else { return API.sendChat('AFKs: ' + msg); } }; return allAfksCommand; })(Command); statusCommand = (function(_super) { __extends(statusCommand, _super); function statusCommand() { _ref7 = statusCommand.__super__.constructor.apply(this, arguments); return _ref7; } statusCommand.prototype.init = function() { this.command = '!status'; this.parseType = 'exact'; return this.rankPrivelege = 'featured'; }; statusCommand.prototype.functionality = function() { var day, hour, launch, lt, meridian, min, month, msg, t, totals; lt = data.launchTime; month = lt.getMonth() + 1; day = lt.getDate(); hour = lt.getHours(); meridian = hour % 12 === hour ? 'AM' : 'PM'; min = lt.getMinutes(); min = min < 10 ? '0' + min : min; t = data.totalVotingData; t['songs'] = data.songCount; launch = 'Iniciada em ' + month + '/' + day + ' ' + hour + ':' + min + ' ' + meridian + '. '; totals = '' + t.songs + ' Teve: :+1: ' + t.woots + ',:-1: ' + t.mehs + ',:heart: ' + t.curates + '.' msg = launch + totals; return API.sendChat(msg); }; return statusCommand; })(Command); dieCommand = (function(_super) { __extends(dieCommand, _super); function dieCommand() { _ref8 = dieCommand.__super__.constructor.apply(this, arguments); return _ref8; } dieCommand.prototype.init = function() { this.command = '!adeus'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; dieCommand.prototype.functionality = function() { API.sendChat("Acho que fui envenenado!"); undoHooks(); API.sendChat("Vish,"); data.implode(); return API.sendChat("Morri! x_x"); }; return dieCommand; })(Command); reloadCommand = (function(_super) { __extends(reloadCommand, _super); function reloadCommand() { _ref9 = reloadCommand.__super__.constructor.apply(this, arguments); return _ref9; } reloadCommand.prototype.init = function() { this.command = '!reload'; this.parseType = 'exact'; return this.rankPrivelege = 'Host'; }; reloadCommand.prototype.functionality = function() { var pupSrc; API.sendChat('/me Não se Preocupe o Papai Chegou'); undoHooks(); pupSrc = data.pupScriptUrl; data.implode(); return $.getScript(pupSrc); }; return reloadCommand; })(Command); lockCommand = (function(_super) { __extends(lockCommand, _super); function lockCommand() { _ref10 = lockCommand.__super__.constructor.apply(this, arguments); return _ref10; } lockCommand.prototype.init = function() { this.command = '!trava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; lockCommand.prototype.functionality = function() { return data.lockBooth(); }; return lockCommand; })(Command); unlockCommand = (function(_super) { __extends(unlockCommand, _super); function unlockCommand() { _ref11 = unlockCommand.__super__.constructor.apply(this, arguments); return _ref11; } unlockCommand.prototype.init = function() { this.command = '!destrava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; unlockCommand.prototype.functionality = function() { return data.unlockBooth(); }; return unlockCommand; })(Command); removeCommand = (function(_super) { __extends(removeCommand, _super); function removeCommand() { _ref12 = removeCommand.__super__.constructor.apply(this, arguments); return _ref12; } removeCommand.prototype.init = function() { this.command = '!remove'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; removeCommand.prototype.functionality = function() { var djs, popDj; djs = API.getDJs(); popDj = djs[djs.length - 1]; return API.moderateRemoveDJ(popDj.id); }; return removeCommand; })(Command); addCommand = (function(_super) { __extends(addCommand, _super); function addCommand() { _ref13 = addCommand.__super__.constructor.apply(this, arguments); return _ref13; } addCommand.prototype.init = function() { this.command = '!add'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; addCommand.prototype.functionality = function() { var msg, name, r, user; msg = this.msgData.message; if (msg.length > this.command.length + 2) { name = msg.substr(this.command.length + 2); r = new RoomHelper(); user = r.lookupUser(name); if (user !== false) { API.moderateAddDJ(user.id); return setTimeout((function() { return data.unlockBooth(); }), 5000); } } }; return addCommand; })(Command); skipCommand = (function(_super) { __extends(skipCommand, _super); function skipCommand() { _ref14 = skipCommand.__super__.constructor.apply(this, arguments); return _ref14; } skipCommand.prototype.init = function() { this.command = '!pula'; this.parseType = 'exact'; this.rankPrivelege = 'bouncer'; return window.lastSkipTime; }; skipCommand.prototype.functionality = function() { var currentTime, millisecondsPassed; currentTime = new Date(); if (!window.lastSkipTime) { API.moderateForceSkip(); return window.lastSkipTime = currentTime; } else { millisecondsPassed = Math.round(currentTime.getTime() - window.lastSkipTime.getTime()); if (millisecondsPassed > 10000) { window.lastSkipTime = currentTime; return API.moderateForceSkip(); } } }; return skipCommand; })(Command); disconnectLookupCommand = (function(_super) { __extends(disconnectLookupCommand, _super); function disconnectLookupCommand() { _ref15 = disconnectLookupCommand.__super__.constructor.apply(this, arguments); return _ref15; } disconnectLookupCommand.prototype.init = function() { this.command = '!dcmembros'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; disconnectLookupCommand.prototype.functionality = function() { var cmd, dcHour, dcLookupId, dcMeridian, dcMins, dcSongsAgo, dcTimeStr, dcUser, disconnectInstances, givenName, id, recentDisconnect, resp, u, _i, _len, _ref16, _ref17; cmd = this.msgData.message; if (cmd.length > 11) { givenName = cmd.slice(11); _ref16 = data.users; for (id in _ref16) { u = _ref16[id]; if (u.getUser().username === givenName) { dcLookupId = id; disconnectInstances = []; _ref17 = data.userDisconnectLog; for (_i = 0, _len = _ref17.length; _i < _len; _i++) { dcUser = _ref17[_i]; if (dcUser.id === dcLookupId) { disconnectInstances.push(dcUser); } } if (disconnectInstances.length > 0) { resp = u.getUser().username + ' disconectou ' + disconnectInstances.length.toString() + ' '; if (disconnectInstances.length === 1) { resp += '. '; } else { resp += 's. '; } recentDisconnect = disconnectInstances.pop(); dcHour = recentDisconnect.time.getHours(); dcMins = recentDisconnect.time.getMinutes(); if (dcMins < 10) { dcMins = '0' + dcMins.toString(); } dcMeridian = dcHour % 12 === dcHour ? 'AM' : 'PM'; dcTimeStr = '' + dcHour + ':' + dcMins + ' ' + dcMeridian; dcSongsAgo = data.songCount - recentDisconnect.songCount; resp += 'O seu disconect mais recente foi á ' + dcTimeStr + ' (' + dcSongsAgo + ' músicas atras). '; if (recentDisconnect.waitlistPosition !== void 0) { resp += 'Ele estava ' + recentDisconnect.waitlistPosition + ' música'; if (recentDisconnect.waitlistPosition > 1) { resp += 's'; } resp += ' atras da cabine de dj.'; } else { resp += 'Ele não estava na cabine de dj.'; } API.sendChat(resp); return; } else { API.sendChat(" " + u.getUser().username + " não disconectou."); return; } } } return API.sendChat("Eu não vejo essa pessoa na sala '" + givenName + "'."); } }; return disconnectLookupCommand; })(Command); voteRatioCommand = (function(_super) { __extends(voteRatioCommand, _super); function voteRatioCommand() { _ref16 = voteRatioCommand.__super__.constructor.apply(this, arguments); return _ref16; } voteRatioCommand.prototype.init = function() { this.command = '!voteratio'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; voteRatioCommand.prototype.functionality = function() { var msg, name, r, u, votes; r = new RoomHelper(); msg = this.msgData.message; if (msg.length > 12) { name = msg.substr(12); u = r.lookupUser(name); if (u !== false) { votes = r.userVoteRatio(u); msg = u.username + " :+1: " + votes['woot'].toString() + " vez"; if (votes['woot'] === 1) { msg += ', '; } else { msg += 'es, '; } msg += "e :-1: " + votes['meh'].toString() + " veze"; if (votes['meh'] === 1) { msg += '. '; } else { msg += 'es. '; } msg += "O seu vote ratio é: " + votes['positiveRatio'].toString() + "."; return API.sendChat(msg); } else { return API.sendChat("Não parece ter alguém com esse nome de'" + name + "'"); } } else { return API.sendChat("Você quer alguma coisa? Ou você está apenas tentando me irritar."); } }; return voteRatioCommand; })(Command); avgVoteRatioCommand = (function(_super) { __extends(avgVoteRatioCommand, _super); function avgVoteRatioCommand() { _ref17 = avgVoteRatioCommand.__super__.constructor.apply(this, arguments); return _ref17; } avgVoteRatioCommand.prototype.init = function() { this.command = '!avgvoteratio'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; avgVoteRatioCommand.prototype.functionality = function() { var averageRatio, msg, r, ratio, roomRatios, uid, user, userRatio, votes, _i, _len, _ref18; roomRatios = []; r = new RoomHelper(); _ref18 = data.voteLog; for (uid in _ref18) { votes = _ref18[uid]; user = data.users[uid].getUser(); userRatio = r.userVoteRatio(user); roomRatios.push(userRatio['positiveRatio']); } averageRatio = 0.0; for (_i = 0, _len = roomRatios.length; _i < _len; _i++) { ratio = roomRatios[_i]; averageRatio += ratio; } averageRatio = averageRatio / roomRatios.length; msg = "Accounting for " + roomRatios.length.toString() + " user ratios, the average room ratio is " + averageRatio.toFixed(2).toString() + "."; return API.sendChat(msg); }; return avgVoteRatioCommand; })(Command); staffCommand = (function(_super) { __extends(staffCommand, _super); function staffCommand() { _ref18 = staffCommand.__super__.constructor.apply(this, arguments); return _ref18; } staffCommand.prototype.init = function() { this.command = '!staff'; this.parseType = 'exact'; this.rankPrivelege = 'user'; return window.lastActiveStaffTime; }; staffCommand.prototype.staff = function() { var now, staff, staffAfk, stringstaff, user, _i, _len; staff = API.getStaff(); now = new Date(); stringstaff = ""; for (_i = 0, _len = staff.length; _i < _len; _i++) { user = staff[_i]; if (user.permission > 1) { staffAfk = now.getTime() - data.users[user.id].getLastActivity().getTime(); if (staffAfk < (60 * 60 * 1000)) { stringstaff += "@" + user.username + " "; } } } if (stringstaff.length === 0) { stringstaff = "Aff pqp não tem staff ativo :'("; } return stringstaff; }; staffCommand.prototype.functionality = function() { var currentTime, millisecondsPassed, thestaff; thestaff = this.staff(); currentTime = new Date(); if (!window.lastActiveStaffTime) { API.sendChat(thestaff); return window.lastActiveStaffTime = currentTime; } else { millisecondsPassed = currentTime.getTime() - window.lastActiveStaffTime.getTime(); if (millisecondsPassed > 10000) { window.lastActiveStaffTime = currentTime; return API.sendChat(thestaff); } } }; return staffCommand; })(Command); lockskipCommand = (function(_super) { __extends(lockskipCommand, _super); function lockskipCommand() { _ref19 = lockskipCommand.__super__.constructor.apply(this, arguments); return _ref19; } lockskipCommand.prototype.init = function() { this.command = '!repetida'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; lockskipCommand.prototype.functionality = function() { return data.lockBooth(function() { return setTimeout(function() {}, API.moderateForceSkip(), setTimeout(function() { return data.unlockBooth(); }, 5000), 5000); }); }; return lockskipCommand; })(Command); channelCommand = (function(_super) { __extends(channelCommand, _super); function channelCommand() { _ref20 = channelCommand.__super__.constructor.apply(this, arguments); return _ref20; } channelCommand.prototype.init = function() { this.command = '!comandos'; this.parseType = 'startsWith'; return this.rankPrivelege = 'user'; }; channelCommand.prototype.functionality = function() { return API.sendChat("/em: Lista de comandos: https://www.google.com.br/ _|_"); }; return channelCommand; })(Command); versionCommand = (function(_super) { __extends(versionCommand, _super); function versionCommand() { _ref21 = versionCommand.__super__.constructor.apply(this, arguments); return _ref21; } versionCommand.prototype.init = function() { this.command = '!version'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; versionCommand.prototype.functionality = function() { return API.sendChat("/me BOT editado 1.0 " + currentversion); }; return versionCommand; })(Command); cmds = [newSongsCommand, themeCommand, rulesCommand, roomHelpCommand, afksCommand, allAfksCommand, statusCommand, dieCommand, reloadCommand, lockCommand, unlockCommand, removeCommand, addCommand, skipCommand, disconnectLookupCommand, voteRatioCommand, avgVoteRatioCommand, staffCommand, lockskipCommand, versionCommand, newsCommand, channelCommand]; chatCommandDispatcher = function(chat) { var c, cmd, _i, _len, _results; chatUniversals(chat); _results = []; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(chat); if (c.evalMsg()) { break; } else { _results.push(void 0); } } return _results; }; updateVotes = function(obj) { data.currentwoots = obj.positive; data.currentmehs = obj.negative; return data.currentcurates = obj.curates; }; announceCurate = function(obj) { return APIsendChat("/em: " + obj.user.username + " Gostou dessa Musica!"); }; handleUserJoin = function(user) { data.userJoin(user); return data.users[user.id].updateActivity(); }; handleNewSong = function(obj) { var songId; data.intervalMessages(); if (data.currentsong === null) { data.newSong(); } else { API.sendChat("/em: " + data.currentsong.title + " por " + data.currentsong.author + ". :+1: " + data.currentwoots + ", :-1: " + data.currentmehs + ", :heart: " + data.currentcurates + "."); data.newSong(); document.getElementById("button-vote-positive").click(); } if (data.forceSkip) { songId = obj.media.id; return setTimeout(function() { var cMedia; cMedia = API.getMedia(); if (cMedia.id === songId) { return API.moderateForceSkip(); } }, obj.media.duration * 1000); } }; handleVote = function(obj) { return data.users[obj.user.id].updateVote(obj.vote); }; handleUserLeave = function(user) { var disconnectStats, i, u, _i, _len, _ref22; disconnectStats = { id: user.id, time: new Date(), songCount: data.songCount }; i = 0; _ref22 = data.internalWaitlist; for (_i = 0, _len = _ref22.length; _i < _len; _i++) { u = _ref22[_i]; if (u.id === user.id) { disconnectStats['waitlistPosition'] = i - 1; data.setInternalWaitlist(); break; } else { i++; } } data.userDisconnectLog.push(disconnectStats); return data.users[user.id].inRoom(false); }; antispam = function(chat) { var plugRoomLinkPatt, sender; plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; if (plugRoomLinkPatt.exec(chat.message)) { sender = API.getUser(chat.fromID); if (!sender.ambassador && !sender.moderator && !sender.owner && !sender.superuser) { if (!data.users[chat.fromID]["protected"]) { API.sendChat("Sem spam seu preto"); return API.moderateDeleteChat(chat.chatID); } else { return API.sendChat("Eu deveria expulsá-lo, mas estamos aqui para se diverti!"); } } } }; fans = function(chat) { var msg; msg = chat.message.toLowerCase(); if (msg.indexOf('eowkreowr') !== -1 || msg.indexOf('dsjaodas') !== -1 || msg.indexOf('poekpower') !== -1 || msg.indexOf('fokdsofsdpof') !== -1 || msg.indexOf(':trollface:') !== -1 || msg.indexOf('autowoot:') !== -1) { return API.moderateDeleteChat(chat.chatID); } }; chatUniversals = function(chat) { data.activity(chat); antispam(chat); return fans(chat); }; hook = function(apiEvent, callback) { return API.addEventListener(apiEvent, callback); }; unhook = function(apiEvent, callback) { return API.removeEventListener(apiEvent, callback); }; apiHooks = [ { 'event': API.ROOM_SCORE_UPDATE, 'callback': updateVotes }, { 'event': API.CURATE_UPDATE, 'callback': announceCurate }, { 'event': API.USER_JOIN, 'callback': handleUserJoin }, { 'event': API.DJ_ADVANCE, 'callback': handleNewSong }, { 'event': API.VOTE_UPDATE, 'callback': handleVote }, { 'event': API.CHAT, 'callback': chatCommandDispatcher }, { 'event': API.USER_LEAVE, 'callback': handleUserLeave } ]; initHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(hook(pair['event'], pair['callback'])); } return _results; }; undoHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(unhook(pair['event'], pair['callback'])); } return _results; }; initialize(); }).call(this); delay(); loadDammit(); function delay() { setTimeout("load();", 6000); } function load() { var head = document.getElementsByTagName('head')[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://cookies.googlecode.com/svn/trunk/jaaulde.cookies.js'; script.onreadystatechange = function() { if (this.readyState == 'complete') { loaded(); } } script.onload = readCookies; head.appendChild(script); } function loaded() { loaded = true } function loadDammit() { if (loaded == true) { readCookies(); } } function readCookies() { var currentDate = new Date(); currentDate.setFullYear(currentDate.getFullYear() + 1); var newOptions = { expiresAt: currentDate } jaaulde.utils.cookies.setOptions(newOptions); var value = jaaulde.utils.cookies.get(COOKIE_WOOT); autowoot = value != null ? value : false; value = jaaulde.utils.cookies.get(COOKIE_QUEUE); autoqueue = value != null ? value : false; value = jaaulde.utils.cookies.set(COOKIE_STREAM); stream = value != null ? value : true; value = jaaulde.utils.cookies.get(COOKIE_HIDE_VIDEO); hideVideo = value != null ? value : false; onCookiesLoaded(); } function onCookiesLoaded() { if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6005); } if (autoqueue && !isInQueue()) { joinQueue(); } if (hideVideo) { $('#yt-frame').animate({'height': (hideVideo ? '0px' : '271px')}, {duration: 'fast'}); $('#playback .frame-background').animate({'opacity': (hideVideo ? '0' : '0.91')}, {duration: 'medium'}); } initAPIListeners(); displayUI(); initUIListeners(); populateUserlist(); } var words = { "Points" : "Beats!", "Now Playing" : "Now Spinning!", "Time Remaining" : "Time Remaining!", "Volume" : "Crank the Volume!", "Current DJ" : "Disk Jockey", "Crowd Response" : "Crowd Reaction!", "Fans":"Stalkers!"}; String.prototype.prepareRegex = function() { return this.replace(/([[]^&\$.()\?\/\+{}|])/g, "\$1"); }; function isOkTag(tag) { return (",pre,blockquote,code,input,button,textarea".indexOf(","+tag) == -1); } var regexs=new Array(), replacements=new Array(); for(var word in words) { if(word != "") { regexs.push(new RegExp("\b"+word.prepareRegex().replace(/*/g,'[^ ]*')+"\b", 'gi')); replacements.push(words[word]); } } var texts = document.evaluate(".//text()[normalize-space(.)!='']",document.body,null,6,null), text=""; for(var i=0,l=texts.snapshotLength; (this_text=texts.snapshotItem(i)); i++) { if(isOkTag(this_text.parentNode.tagName.toLowerCase()) && (text=this_text.textContent)) { for(var x=0,l=regexs.length; x<l; x++) { text = text.replace(regexs[x], replacements[x]); this_text.textContent = text; } } } var loaded = false; var mentioned = false; var clicked = false; var skipped = false; var timeToWait = 120000; var clickWait = 5000; var skipWait = 601; var timePassed = 0; var clickPassed = 0; var skipPassed = 0; var timer = null; var clickTimer = null; var skipTimer = null; var COOKIE_WOOT = 'autowoot'; var COOKIE_QUEUE = 'autoqueue'; var COOKIE_STREAM = 'stream'; var COOKIE_HIDE_VIDEO = 'hidevideo'; var MAX_USERS_WAITLIST = 50; var fbMsg = ["Entrem na Pagina da sala: https://www.facebook.com/CantadasdiPedreiro"]; var rulesMsg = "Regras: 1) Video no Maximo 6 minutos. 2) Sem Flood! 3) Nao escrever em colorido 4) Respeitar os Adms e Mods ;s 5) Nao Fiquem Pedindo Cargos. "; var skipMsg = ["por favor não pedir para pular as músicas, quer pular da deslike."]; var fansMsg = ["Virem meu Fan que eu retribuo vocês, não esqueça de da @ Menções"]; var wafflesMsg = ["Ppkas para todos! # - (> _ <) - # "," Alguém disse ppkas? # - (> _ <) - #"]; var bhvMsg = ["por favor, não sejam gays no bate-papo "," por favor, não fale assim, controlar a si mesmo! "," por favor, seja maduros fdps"]; var sleepMsg = ["Ta na hora de dormi, Fui virjs! "," Indo dormir agora "," estou tão cansado, durmi é necessário, fui me cama. "," cansaço ... sono ... e ... fui me dormir."]; var workMsg = ["Estou ocupado não sou Vagabundo igual a vocês."]; var afkMsg = ["Eu estou indo embora e um Vão se foderem."," Vou fica AFK por um tempo, volto em breve! "," Indo embora, volto em breve! "," Vou Viaja nas galáxia, estarei de volta em breve !"]; var backMsg = ["Estou de volta minhas putinhas! "," Adivinha quem está de volta? Quem sera? Claro que é eu o seu Pai :D"]; var autoAwayMsg = ["Atualmente estou AFK "," Eu estou AFK "," Eu estou em uma aventura (afk) "," desapareceu por um momento "," não está presente no teclado."]; var autoSlpMsg = ["Atualmente estou dormindo "," Estou comendo ppkas em meus sonhos"]; var autoWrkMsg = ["Atualmente estou ocupado "," estou ocupado "," fazendo um trabalho relacionado a ppkas."]; overPlayed = ["1:vZyenjZseXA", "1:ZT4yoZNy90s", "1:Bparw9Jo3dk", "1:KrVC5dm5fFc","1:Ys9sIqv42lo", "1:1y6smkh6c-0", "1:jZL-RUZUoGY", "1:CrdoD9T1Heg", "1:6R_Rn1iP82I", "1:ea9tluQ_QtE", "1:f9EM8T5K6d8", "1:aHjpOzsQ9YI", "1:3vC5TsSyNjU", "1:yXLL46xkdlY", "1:_t2TzJOyops", "1:BGpzGu9Yp6Y", "1:YJVmu6yttiw", "1:WSeNSzJ2-Jw", "1:2cXDgFwE13g", "1:PR_u9rvFKzE", "1:i1BDGqIfm8U"];overPlayed = ["1:vZyenjZseXA", "1:ZT4yoZNy90s", "1:Bparw9Jo3dk", "1:KrVC5dm5fFc","1:Ys9sIqv42lo", "1:1y6smkh6c-0", "1:jZL-RUZUoGY", "1:CrdoD9T1Heg", "1:6R_Rn1iP82I", "1:ea9tluQ_QtE", "1:f9EM8T5K6d8", "1:aHjpOzsQ9YI", "1:3vC5TsSyNjU", "1:yXLL46xkdlY", "1:_t2TzJOyops", "1:BGpzGu9Yp6Y", "1:YJVmu6yttiw", "1:WSeNSzJ2-Jw", "1:2cXDgFwE13g", "1:PR_u9rvFKzE", "1:i1BDGqIfm8U"]; var styles = [ '.sidebar {position: fixed; top: 0; height: 100%; width: 200px; z-index: 99999; background-image: linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -o-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -moz-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -webkit-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -ms-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000000),color-stop(1, #3B5678));}', '.sidebar#side-right {right: -190px;z-index: 99999;}', '.sidebar#side-left {left: -190px; z-index: 99999; }', '.sidebar-handle {width: 12px;height: 100%;z-index: 99999;margin: 0;padding: 0;background: rgb(96, 141, 197);box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .9);cursor: "ne-resize";}', '.sidebar-handle span {display: block;position: absolute;width: 10px;top: 50%;text-align: center;letter-spacing: -1px;color: #000;}', '.sidebar-content {position: absolute;width: 185px;height: 100%; padding-left: 15px}', '.sidebar-content2 {position: absolute;width: 185px;height: 100%;}', '.sidebar-content2 h3 {font-weight: bold; padding-left: 5px; padding-bottom: 5px; margin: 0;}', '.sidebar-content2 a {font-weight: bold; font-size: 13px; padding-left: 5px;}', '#side-right .sidebar-handle {float: left;}', '#side-left .sidebar-handle {float: right;}', '#side-right a {display: block;min-width: 100%;cursor: pointer;padding: 4px 5px 8px 5px;border-radius: 4px;font-size: 13px;}', '.sidebar-content2 span {display: block; min-width: 94%;cursor: pointer;border-radius: 4px; padding: 0 5px 0 5px; font-size: 12px;}', '#side-right a span {padding-right: 8px;}', '#side-right a:hover {background-color: rgba(97, 146, 199, 0.65);text-decoration: none;}', '.sidebar-content2 span:hover {background-color: rgba(97, 146, 199, 0.65);text-decoration: none;}', '.sidebar-content2 a:hover {text-decoration: none;}', 'html{background: url("http://i.imgur.com/a75C9wE.jpg") no-repeat scroll center top #000000;}', '#room-wheel {z-index: 2;position: absolute;top: 2px;left: 0;width: 1044px;height: 394px;background: url(http://) no-repeat;display: none;}', '.chat-bouncer {background: url(http://i.imgur.com/9qWWO4L.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '.chat-manager{background: url(http://i.imgur.com/hqqhTcp.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '.chat-cohost {background: url(https://dl.dropbox.com/u/67634625/chat-bouncer-icon.png) no-repeat 0 5px;padding-left: 17px;width:292px;}', '.chat-host{background: url(https://dl.dropbox.com/u/67634625/chat-bouncer-icon.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}', '#dj-console, #dj-console {background-image: url(http://s8.postimage.org/wpugb8gc5/Comp_2.gif);min-height:33px;min-width:131px;}', '.chat-from-you{color: #0099FF;font-weight: bold;margin-top: 0px; padding-top: 0px;}', '.chat-from-bouncer{color: #800080; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-manager{color: #FFDAB9; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-cohost{color: #FF4500; font-weight: bold; margin-top: 0px; padding-top: 0px;}', '.chat-from-host{color: #32CD32;font-weight: bold;margin-top: 0px; padding-top: 0px;}', '#user-points-title{color: #FFFFFF; position: absolute; left: 36px; font-size: 10px;}', '#user-fans-title{color: #FFFFFF; position: absolute; left: 29px; font-size: 10px;}', '.meta-header span{color: rgba(255, 255, 255, 0.79); position: absolute; left: 15px; font-size: 10px;}', '#button-lobby {background-image: url("http://i.imgur.com/brpRaSY.png");}', '#volume-bar-value{background-image: url("http://i.imgur.com/xmyonON.png") ;}', '#hr-div {;height: 100%;width: 100%;margin: 0;padding-left: 12px;}', '#hr2-div2 {;height: 100%;width: 100%;margin: 0;}', '#hr-style {position: absolute;display: block;height: 20px;width: 100%;bottom: 0%;background-image: url("http://i.imgur.com/gExgamX.png");}', '#hr2-style2 {position: absolute;display: block;height: 20px;width: 94%%;bottom: 0%;background-image: url("http://i.imgur.com/gExgamX.png");}', '#side-left h3 {padding-left: 5px}', ]; var scripts = [ "(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind('mousemove',track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev])}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev])};var handleHover=function(e){var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t)}if(e.type=='mouseenter'){pX=ev.pageX;pY=ev.pageY;$(ob).bind('mousemove',track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob)},cfg.interval)}}else{$(ob).unbind('mousemove',track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob)},cfg.timeout)}}};return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover)}})(jQuery);", 'if (jQuery.easing.easeOutQuart === undefined) jQuery.easing.easeOutQuart = function (a,b,c,d,e) { return -d*((b=b/e-1)*b*b*b-1)+c; }', '$("#side-right")', ' .hoverIntent(function() {', ' var timeout_r = $(this)', ' .data("timeout_r");', ' if (timeout_r) {', ' clearTimeout(timeout_r);', ' }', ' $(this)', ' .animate({', ' "right": "0px"', ' }, 300, "easeOutQuart");', ' }, function() {', ' $(this)', ' .data("timeout_r", setTimeout($.proxy(function() {', ' $(this)', ' .animate({', ' "right": "-190px"', ' }, 300, "easeOutQuart");', ' }, this), 500));', ' });', '$("#side-left")', ' .hoverIntent(function() {', ' var timeout_r = $(this)', ' .data("timeout_r");', ' if (timeout_r) {', ' clearTimeout(timeout_r);', ' }', ' $(this)', ' .animate({', ' "left": "0px"', ' }, 300, "easeOutQuart");', ' }, function() {', ' $(this)', ' .data("timeout_r", setTimeout($.proxy(function() {', ' $(this)', ' .animate({', ' "left": "-190px"', ' }, 300, "easeOutQuart");', ' }, this), 500));', ' });' ]; function initAPIListeners() { API.addEventListener(API.DJ_ADVANCE, djAdvanced); API.addEventListener(API.CHAT, autoRespond); API.addEventListener(API.DJ_UPDATE, queueUpdate); API.addEventListener(API.VOTE_UPDATE, function (obj) { populateUserlist(); }); API.addEventListener(API.USER_JOIN, function (user) { populateUserlist(); }); API.addEventListener(API.USER_LEAVE, function (user) { populateUserlist(); }); } function displayUI() { var colorWoot = autowoot ? '#3FFF00' : '#ED1C24'; var colorQueue = autoqueue ? '#3FFF00' : '#ED1C24'; var colorStream = stream ? '#3FFF00' : '#ED1C24'; var colorVideo = hideVideo ? '#3FFF00' : '#ED1C24'; $('#side-right .sidebar-content').append( 'auto woot' + 'auto queue' + 'stream' + 'hide video' + 'rules' + 'like our fb' + 'no fans' + 'no skip' + 'waffles' + 'sleeping' + 'working' + 'afk' + 'available' + 'skip' + 'lock' + 'unlock' + 'lockskip' ); } function initUIListeners() { $("#plug-btn-woot").on("click", function() { autowoot = !autowoot; $(this).css("color", autowoot ? "#3FFF00" : "#ED1C24"); if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6001); } jaaulde.utils.cookies.set(COOKIE_WOOT, autowoot); }); $("#plug-btn-queue").on("click", function() { autoqueue = !autoqueue; $(this).css('color', autoqueue ? '#3FFF00' : '#ED1C24'); if (autoqueue && !isInQueue()) { joinQueue(); } jaaulde.utils.cookies.set(COOKIE_QUEUE, autoqueue); }); $("#plug-btn-stream").on("click", function() { stream = !stream; $(this).css("color", stream ? "#3FFF00" : "#ED1C24"); if (stream == true) { API.sendChat("/stream on"); } else { API.sendChat("/stream off"); } jaaulde.utils.cookies.set(COOKIE_STREAM, stream); }); $("#plug-btn-hidevideo").on("click", function() { hideVideo = !hideVideo; $(this).css("color", hideVideo ? "#3FFF00" : "#ED1C24"); $("#yt-frame").animate({"height": (hideVideo ? "0px" : "271px")}, {duration: "fast"}); $("#playback .frame-background").animate({"opacity": (hideVideo ? "0" : "0.91")}, {duration: "medium"}); jaaulde.utils.cookies.set(COOKIE_HIDE_VIDEO, hideVideo); }); $("#plug-btn-face").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(fbMsg[Math.floor(Math.random() * fbMsg.length)]); } }); $("#plug-btn-rules").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(rulesMsg); } }); $("#plug-btn-fans").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(fansMsg[Math.floor(Math.random() * fansMsg.length)]); } }); $("#plug-btn-noskip").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(skipMsg[Math.floor(Math.random() * skipMsg.length)]); } }); $("#plug-btn-waffles").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); API.sendChat(wafflesMsg[Math.floor(Math.random() * wafflesMsg.length)]); } }); $("#plug-btn-sleeping").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 3) { API.sendChat(sleepMsg[Math.floor(Math.random() * sleepMsg.length)]); Models.user.changeStatus(3); } } }); $("#plug-btn-working").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 2) { API.sendChat(workMsg[Math.floor(Math.random() * workMsg.length)]); Models.user.changeStatus(2); } } }); $("#plug-btn-afk").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 1) { API.sendChat(afkMsg[Math.floor(Math.random() * afkMsg.length)]); Models.user.changeStatus(1); } } }); $("#plug-btn-back").on("click", function() { if (clicked == false) { clicked = true; clickTimer = setInterval("checkClicked();", 1000); if (Models.user.data.status != 0) { API.sendChat(backMsg[Math.floor(Math.random() * backMsg.length)]); Models.user.changeStatus(0); } } }); $("#plug-btn-skip").on("click", function() { if (skipped == false) { skipped = true; skipTimer = setInterval("checkSkipped();", 500); new ModerationForceSkipService; } }); $("#plug-btn-lock").on("click", function() { new RoomPropsService(document.location.href.split('/')[3],true,true,1,5); }); $("#plug-btn-unlock").on("click", function() { new RoomPropsService(document.location.href.split('/')[3],false,true,1,5); }); $("#plug-btn-lockskip").on("click", function() { if (skipped == false) { skipped = true; skipTimer = setInterval("checkSkipped();", 500); new RoomPropsService(document.location.href.split('/')[3],true,true,1,5); new ModerationForceSkipService; new RoomPropsService(document.location.href.split('/')[3],false,true,1,5); } }); } function queueUpdate() { if (autoqueue && !isInQueue()) { joinQueue(); } } function isInQueue() { var self = API.getSelf(); return API.getWaitList().indexOf(self) !== -1 || API.getDJs().indexOf(self) !== -1; } function joinQueue() { if ($('#button-dj-play').css('display') === 'block') { $('#button-dj-play').click(); } else if (API.getWaitList().length < MAX_USERS_WAITLIST) { API.waitListJoin(); } } function autoRespond(data) { var a = data.type == "mention" && Models.room.data.staff[data.fromID] && Models.room.data.staff[data.fromID] >= Models.user.BOUNCER, b = data.message.indexOf('@') >0; if (data.type == "mention" && mentioned == false) { if (API.getUser(data.fromID).status == 0) { mentioned = true; timer = setInterval("checkMentioned();", 1000); if (Models.user.data.status == 1) { API.sendChat("@" + data.from + " automsg: " + autoAwayMsg[Math.floor(Math.random() * autoAwayMsg.length)]); } if (Models.user.data.status ==2) { API.sendChat("@" + data.from + " automsg: " + autoWrkMsg[Math.floor(Math.random() * autoWrkMsg.length)]); } if (Models.user.data.status ==3) { API.sendChat("@" + data.from + " automsg: " + autoSlpMsg[Math.floor(Math.random() * autoSlpMsg.length)]); } } } } function djAdvanced(obj) { if (hideVideo) { $("#yt-frame").css("height", "0px"); $("#playback .frame-background").css("opacity", "0.0"); } if (autowoot) { setTimeout("$('#button-vote-positive').click();", 6001); } setTimeout("overPlayedSongs();", 3000); } function overPlayedSongs(data) { if (overPlayed.indexOf(Models.room.data.media.id) > -1) { API.sendChat("/me auto skip ligado, Musica Repetida. Fuck you baby!"); setTimeout("new RoomPropsService(document.location.href.split('/')[3],true,true,1,5);", 300); setTimeout("new ModerationForceSkipService;", 600); setTimeout("new RoomPropsService(document.location.href.split('/')[3],false,true,1,5);", 900); } if (Models.room.data.media.duration > 481) { API.sendChat("/me auto skip ligado, música com mais de 6 minutos seram puladas."); setTimeout("new RoomPropsService(document.location.href.split('/')[3],true,true,1,5);", 300); setTimeout("new ModerationForceSkipService;", 600); setTimeout("new RoomPropsService(document.location.href.split('/')[3],false,true,1,5);", 900); } } function populateUserlist() { var mehlist = ''; var wootlist = ''; var undecidedlist = ''; var a = API.getUsers(); var totalMEHs = 0; var totalWOOTs = 0; var totalUNDECIDEDs = 0; var str = ''; var users = API.getUsers(); var myid = API.getSelf(); for (i in a) { str = '' + a[i].username + ''; if (typeof (a[i].vote) !== 'undefined' && a[i].vote == -1) { totalMEHs++; mehlist += str; } else if (typeof (a[i].vote) !== 'undefined' && a[i].vote == +1) { totalWOOTs++; wootlist += str; } else { totalUNDECIDEDs++; undecidedlist += str; } } var totalDECIDED = totalWOOTs + totalMEHs; var totalUSERS = totalDECIDED + totalUNDECIDEDs; var totalMEHsPercentage = Math.round((totalMEHs / totalUSERS) * 100); var totalWOOTsPercentage = Math.round((totalWOOTs / totalUSERS) * 100); if (isNaN(totalMEHsPercentage) || isNaN(totalWOOTsPercentage)) { totalMEHsPercentage = totalWOOTsPercentage = 0; } mehlist = ' ' + totalMEHs.toString() + ' (' + totalMEHsPercentage.toString() + '%)' + mehlist; wootlist = ' ' + totalWOOTs.toString() + ' (' + totalWOOTsPercentage.toString() + '%)' + wootlist; undecidedlist = ' ' + totalUNDECIDEDs.toString() + undecidedlist; if ($('#side-left .sidebar-content').children().length > 0) { $('#side-left .sidebar-content2').append(); } $('#side-left .sidebar-content2').html(' users: ' + API.getUsers().length + ' '); var spot = Models.room.getWaitListPosition(); var waitlistDiv = $(' ').addClass('waitlistspot').text('waitlist: ' + (spot !== null ? spot + ' / ' : '') + Models.room.data.waitList.length); $('#side-left .sidebar-content2').append(waitlistDiv); $('#side-left .sidebar-content2').append(' '); $(".meanlist").append( ' meh list:' + mehlist + ' ' + ' woot list:' + wootlist + ' ' ); } function checkMentioned() { if(timePassed >= timeToWait) { clearInterval(timer); mentioned = false; timePassed = 0; } else { timePassed = timePassed + 601; } } function checkClicked() { if (clickPassed >= clickWait) { clearInterval(clickTimer); clicked = false; clickPassed = 0; } else { clickPassed = clickPassed + 601; } } function checkSkipped() { if (skipPassed >= skipWait) { clearInterval(skipTimer); skipped = false; skipPassed = 600; } else { skipPassed = skipPassed + 500; } } $('#plugbot-css').remove(); $('#plugbot-js').remove(); $('#chat-messages').append(' Bem vindo auto-skip editado pelo Rafael Moraes 1.0 '); $('body').prepend('' + "\n" + styles.join("\n") + "\n" + ''); $('body').append(' ' + ' ||| ' + ' ' + ' ' + ' ' + ' ||| ' + ' ' + ' ' + ' '); $('body').append('');
Northeastern-Electric-Racing
Our vehicle dashboard, written in C++ with QT framework
li55a
// Generated by CoffeeScript 1.6.2 (function() { var Command, RoomHelper, User, addCommand, afkCheck, afksCommand, allAfksCommand, announceCurate, antispam, apiHooks, avgVoteRatioCommand, chatCommandDispatcher, chatUniversals, cmds, data, dieCommand, disconnectLookupCommand, fans, handleNewSong, handleUserJoin, handleUserLeave, handleVote, hook, initEnvironment, initHooks, initialize, lockCommand, lockskipCommand, msToStr, newSongsCommand, newsCommand, populateUserData, promoCommand, pupOnline, reloadCommand, removeCommand, roomHelpCommand, rulesCommand, settings, skipCommand, staffCommand, statusCommand, themeCommand, undoHooks, unhook, unlockCommand, updateVotes, versionCommand, voteRatioCommand, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref21, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; settings = (function() { function settings() { this.implode = __bind(this.implode, this); this.intervalMessages = __bind(this.intervalMessages, this); this.startAfkInterval = __bind(this.startAfkInterval, this); this.setInternalWaitlist = __bind(this.setInternalWaitlist, this); this.userJoin = __bind(this.userJoin, this); this.getRoomUrlPath = __bind(this.getRoomUrlPath, this); this.startup = __bind(this.startup, this); } settings.prototype.currentsong = {}; settings.prototype.users = {}; settings.prototype.djs = []; settings.prototype.mods = []; settings.prototype.host = []; settings.prototype.hasWarned = false; settings.prototype.currentwoots = 0; settings.prototype.currentmehs = 0; settings.prototype.currentcurates = 0; settings.prototype.roomUrlPath = null; settings.prototype.internalWaitlist = []; settings.prototype.userDisconnectLog = []; settings.prototype.voteLog = {}; settings.prototype.seshOn = false; settings.prototype.forceSkip = false; settings.prototype.seshMembers = []; settings.prototype.launchTime = null; settings.prototype.totalVotingData = { woots: 0, mehs: 0, curates: 0 }; settings.prototype.pupScriptUrl = 'https://dl.dropbox.com/u/21023321/TastycatBot.js'; settings.prototype.afkTime = 60 * 60 * 1000; settings.prototype.songIntervalMessages = [ { interval: 7, offset: 0, msg: "All praise our lord and savior @Raptor Jeebus" }, { interval: 5, offset: 0, msg: "Stay active in chat while in line. We remove AFK DJ's at the booth!" } ]; settings.prototype.songCount = 0; settings.prototype.startup = function() { this.launchTime = new Date(); return this.roomUrlPath = this.getRoomUrlPath(); }; settings.prototype.getRoomUrlPath = function() { return window.location.pathname.replace(/\//g, ''); }; settings.prototype.newSong = function() { this.totalVotingData.woots += this.currentwoots; this.totalVotingData.mehs += this.currentmehs; this.totalVotingData.curates += this.currentcurates; this.setInternalWaitlist(); this.currentsong = API.getMedia(); if (this.currentsong !== null) { return this.currentsong; } else { return false; } }; settings.prototype.userJoin = function(u) { var userIds, _ref; userIds = Object.keys(this.users); if (_ref = u.id, __indexOf.call(userIds, _ref) >= 0) { return this.users[u.id].inRoom(true); } else { this.users[u.id] = new User(u); return this.voteLog[u.id] = {}; } }; settings.prototype.setInternalWaitlist = function() { var boothWaitlist, fullWaitList, lineWaitList; boothWaitlist = API.getDJs().slice(1); lineWaitList = API.getWaitList(); fullWaitList = boothWaitlist.concat(lineWaitList); return this.internalWaitlist = fullWaitList; }; settings.prototype.activity = function(obj) { if (obj.type === 'message') { return this.users[obj.fromID].updateActivity(); } }; settings.prototype.startAfkInterval = function() { return this.afkInterval = setInterval(afkCheck, 2000); }; settings.prototype.intervalMessages = function() { var msg, _i, _len, _ref, _results; this.songCount++; _ref = this.songIntervalMessages; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { msg = _ref[_i]; if (((this.songCount + msg['offset']) % msg['interval']) === 0) { _results.push(API.sendChat(msg['msg'])); } else { _results.push(void 0); } } return _results; }; settings.prototype.implode = function() { var item, val; for (item in this) { val = this[item]; if (typeof this[item] === 'object') { delete this[item]; } } return clearInterval(this.afkInterval); }; settings.prototype.lockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": true, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; settings.prototype.unlockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": false, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; return settings; })(); data = new settings(); User = (function() { User.prototype.afkWarningCount = 0; User.prototype.lastWarning = null; User.prototype["protected"] = false; User.prototype.isInRoom = true; function User(user) { this.user = user; this.updateVote = __bind(this.updateVote, this); this.inRoom = __bind(this.inRoom, this); this.notDj = __bind(this.notDj, this); this.warn = __bind(this.warn, this); this.getIsDj = __bind(this.getIsDj, this); this.getWarningCount = __bind(this.getWarningCount, this); this.getUser = __bind(this.getUser, this); this.getLastWarning = __bind(this.getLastWarning, this); this.getLastActivity = __bind(this.getLastActivity, this); this.getLastDrinkTime = __bind(this.getLastDrinkTime, this); this.updateDrinkTime = __bind(this.updateDrinkTime, this); this.updateActivity = __bind(this.updateActivity, this); this.init = __bind(this.init, this); this.init(); } User.prototype.init = function() { this.lastActivity = new Date(); return this.drinkTime = new Date(); }; User.prototype.updateActivity = function() { this.lastActivity = new Date(); this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.updateDrinkTime = function() { return this.drinkTime = new Date(); }; User.prototype.getLastDrinkTime = function() { return this.drinkTime; }; User.prototype.getLastActivity = function() { return this.lastActivity; }; User.prototype.getLastWarning = function() { if (this.lastWarning === null) { return false; } else { return this.lastWarning; } }; User.prototype.getUser = function() { return this.user; }; User.prototype.getWarningCount = function() { return this.afkWarningCount; }; User.prototype.getIsDj = function() { var DJs, dj, _i, _len; DJs = API.getDJs(); for (_i = 0, _len = DJs.length; _i < _len; _i++) { dj = DJs[_i]; if (this.user.id === dj.id) { return true; } } return false; }; User.prototype.warn = function() { this.afkWarningCount++; return this.lastWarning = new Date(); }; User.prototype.notDj = function() { this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.inRoom = function(online) { return this.isInRoom = online; }; User.prototype.updateVote = function(v) { if (this.isInRoom) { return data.voteLog[this.user.id][data.currentsong.id] = v; } }; return User; })(); RoomHelper = (function() { function RoomHelper() {} RoomHelper.prototype.lookupUser = function(username) { var id, u, _ref; _ref = data.users; for (id in _ref) { u = _ref[id]; if (u.getUser().username === username) { return u.getUser(); } } return false; }; RoomHelper.prototype.userVoteRatio = function(user) { var songId, songVotes, vote, votes; songVotes = data.voteLog[user.id]; votes = { 'woot': 0, 'meh': 0 }; for (songId in songVotes) { vote = songVotes[songId]; if (vote === 1) { votes['woot']++; } else if (vote === -1) { votes['meh']++; } } votes['positiveRatio'] = (votes['woot'] / (votes['woot'] + votes['meh'])).toFixed(2); return votes; }; return RoomHelper; })(); pupOnline = function() { var currentversion, me, myname; me = API.getSelf(); myname = me.username; currentversion = "1.1.0"; log("TastycatBOT version " + currentversion + " started"); return API.sendChat("Have no fear, " + myname + " is here!"); }; populateUserData = function() { var u, users, _i, _len; users = API.getUsers(); for (_i = 0, _len = users.length; _i < _len; _i++) { u = users[_i]; data.users[u.id] = new User(u); data.voteLog[u.id] = {}; } }; initEnvironment = function() { document.getElementById("button-vote-positive").click(); document.getElementById("button-sound").click(); Playback.streamDisabled = true; return Playback.stop(); }; initialize = function() { pupOnline(); populateUserData(); initEnvironment(); initHooks(); data.startup(); data.newSong(); return data.startAfkInterval(); }; afkCheck = function() { var DJs, id, lastActivity, lastWarned, now, secsLastActive, timeSinceLastActivity, timeSinceLastWarning, twoMinutes, user, _ref, _results; _ref = data.users; _results = []; for (id in _ref) { user = _ref[id]; now = new Date(); lastActivity = user.getLastActivity(); timeSinceLastActivity = now.getTime() - lastActivity.getTime(); if (timeSinceLastActivity > data.afkTime) { if (user.getIsDj()) { secsLastActive = timeSinceLastActivity / 1000; if (user.getWarningCount() === 0) { user.warn(); _results.push(API.sendChat("@" + user.getUser().username + ", I haven't seen you chat in 1 hour. Are you AFK? If you don't show activity in 4 minutes I will remove you from the booth.")); } else if (user.getWarningCount() === 1) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); twoMinutes = 4 * 60 * 1000; if (timeSinceLastWarning > twoMinutes) { DJs = API.getDJs(); if (DJs.length > 0 && DJs[0].id !== user.getUser().id) { API.sendChat("@" + user.getUser().username + ", you had 1 warning. Please stay active by chatting."); API.moderateRemoveDJ(id); _results.push(user.warn()); } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(user.notDj()); } } else { _results.push(void 0); } } return _results; }; msToStr = function(msTime) { var ms, msg, timeAway; msg = ''; timeAway = { 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 0 }; ms = { 'day': 24 * 60 * 60 * 1000, 'hour': 60 * 60 * 1000, 'minute': 60 * 1000, 'second': 1000 }; if (msTime > ms['day']) { timeAway['days'] = Math.floor(msTime / ms['day']); msTime = msTime % ms['day']; } if (msTime > ms['hour']) { timeAway['hours'] = Math.floor(msTime / ms['hour']); msTime = msTime % ms['hour']; } if (msTime > ms['minute']) { timeAway['minutes'] = Math.floor(msTime / ms['minute']); msTime = msTime % ms['minute']; } if (msTime > ms['second']) { timeAway['seconds'] = Math.floor(msTime / ms['second']); } if (timeAway['days'] !== 0) { msg += timeAway['days'].toString() + 'd'; } if (timeAway['hours'] !== 0) { msg += timeAway['hours'].toString() + 'h'; } if (timeAway['minutes'] !== 0) { msg += timeAway['minutes'].toString() + 'm'; } if (timeAway['seconds'] !== 0) { msg += timeAway['seconds'].toString() + 's'; } if (msg !== '') { return msg; } else { return false; } }; Command = (function() { function Command(msgData) { this.msgData = msgData; this.init(); } Command.prototype.init = function() { this.parseType = null; this.command = null; return this.rankPrivelege = null; }; Command.prototype.functionality = function(data) {}; Command.prototype.hasPrivelege = function() { var user; user = data.users[this.msgData.fromID].getUser(); switch (this.rankPrivelege) { case 'host': return user.permission >= 5; case 'cohost': return user.permission >= 4; case 'mod': return user.permission >= 3; case 'manager': return user.permission >= 3; case 'bouncer': return user.permission >= 2; case 'featured': return user.permission >= 1; default: return true; } }; Command.prototype.commandMatch = function() { var command, msg, _i, _len, _ref; msg = this.msgData.message; if (typeof this.command === 'string') { if (this.parseType === 'exact') { if (msg === this.command) { return true; } else { return false; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, this.command.length) === this.command) { return true; } else { return false; } } else if (this.parseType === 'contains') { if (msg.indexOf(this.command) !== -1) { return true; } else { return false; } } } else if (typeof this.command === 'object') { _ref = this.command; for (_i = 0, _len = _ref.length; _i < _len; _i++) { command = _ref[_i]; if (this.parseType === 'exact') { if (msg === command) { return true; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, command.length) === command) { return true; } } else if (this.parseType === 'contains') { if (msg.indexOf(command) !== -1) { return true; } } } return false; } }; Command.prototype.evalMsg = function() { if (this.commandMatch() && this.hasPrivelege()) { this.functionality(); return true; } else { return false; } }; return Command; })(); newsCommand = (function(_super) { __extends(newsCommand, _super); function newsCommand() { _ref = newsCommand.__super__.constructor.apply(this, arguments); return _ref; } newsCommand.prototype.init = function() { this.command = '/news'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; newsCommand.prototype.functionality = function() { var msg; msg = "No news at this moment in time. "; return API.sendChat(msg); }; return newsCommand; })(Command); newSongsCommand = (function(_super) { __extends(newSongsCommand, _super); function newSongsCommand() { _ref1 = newSongsCommand.__super__.constructor.apply(this, arguments); return _ref1; } newSongsCommand.prototype.init = function() { this.command = '/newsongs'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newSongsCommand.prototype.functionality = function() { var arts, cMedia, chans, chooseRandom, mChans, msg, selections, u, _ref2; mChans = this.memberChannels.slice(0); chans = this.channels.slice(0); arts = this.artists.slice(0); chooseRandom = function(list) { var l, r; l = list.length; r = Math.floor(Math.random() * l); return list.splice(r, 1); }; selections = { channels: [], artist: '' }; u = data.users[this.msgData.fromID].getUser().username; if (u.indexOf("MistaDubstep") !== -1) { selections['channels'].push('MistaDubstep'); } else if (u.indexOf("Underground Promotions") !== -1) { selections['channels'].push('UndergroundDubstep'); } else { selections['channels'].push(chooseRandom(mChans)); } selections['channels'].push(chooseRandom(chans)); selections['channels'].push(chooseRandom(chans)); cMedia = API.getMedia(); if (_ref2 = cMedia.author, __indexOf.call(arts, _ref2) >= 0) { selections['artist'] = cMedia.author; } else { selections['artist'] = chooseRandom(arts); } msg = "Everyone's heard that " + selections['artist'] + " track! Get new music from http://youtube.com/" + selections['channels'][0] + " http://youtube.com/" + selections['channels'][1] + " or http://youtube.com/" + selections['channels'][2]; return API.sendChat(msg); }; newSongsCommand.prototype.memberChannels = ["MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.channels = ["BassRape", "MonstercatMedia", "UKFdubstep", "DropThatBassline", "VitalDubstep", "AirwaveDubstepTV", "InspectorDubplate", "TehDubstepChannel", "UNITEDubstep", "LuminantNetwork", "TheSoundIsle", "PandoraMuslc", "MrSuicideSheep", "HearTheSensation", "bassoutletpromos", "MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.artists = ["Doctor P", "Excision", "Flux Pavilion", "Knife Party", "Rusko", "Bassnectar", "Nero", "Deadmau5", "Borgore", "Zomboy"]; return newSongsCommand; })(Command); themeCommand = (function(_super) { __extends(themeCommand, _super); function themeCommand() { _ref2 = themeCommand.__super__.constructor.apply(this, arguments); return _ref2; } themeCommand.prototype.init = function() { this.command = '/theme'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; themeCommand.prototype.functionality = function() { var msg; msg = "Any type of Bass Music is allowed here. Including Dubstep, Complextro, Drum and Bass, Glitch-Hop, Trap, "; msg += "Garage, Breakbeat, Hardstyle, Moombahton, HEAVY EDM, House, Electro, and Trance!!"; return API.sendChat(msg); }; return themeCommand; })(Command); rulesCommand = (function(_super) { __extends(rulesCommand, _super); function rulesCommand() { _ref3 = rulesCommand.__super__.constructor.apply(this, arguments); return _ref3; } rulesCommand.prototype.init = function() { this.command = '/rules'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; rulesCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "1) Don't complain! we are all here to have fun!. "; msg1 += "2) Tastycat DJ's have priority!. "; msg1 += "3) The bot will remove you from the booth if you are AFK for 1 hour. "; msg1 += "4) skips will be decided by staff. "; msg1 += "5) Do not play mixes. "; msg2 = "6) Do not use the /em or /me commands( yellow text ) ...using this twice will get you kicked from the room. "; msg2 += "7) Do not ask for fans. "; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return rulesCommand; })(Command); roomHelpCommand = (function(_super) { __extends(roomHelpCommand, _super); function roomHelpCommand() { _ref4 = roomHelpCommand.__super__.constructor.apply(this, arguments); return _ref4; } roomHelpCommand.prototype.init = function() { this.command = '/roomhelp'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; roomHelpCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "Welcome to #TASTYCAT! Create a playlist and populate it with songs from either YouTube or Soundcloud. "; msg1 += "Click the 'Join Waitlist' button and wait your turn to play music. All forms of EDM are allowed."; msg2 = "Play good quality music. "; msg2 += "Ask staff if you're unsure about your song choice"; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return roomHelpCommand; })(Command); afksCommand = (function(_super) { __extends(afksCommand, _super); function afksCommand() { _ref5 = afksCommand.__super__.constructor.apply(this, arguments); return _ref5; } afksCommand.prototype.init = function() { this.command = '/afks'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; afksCommand.prototype.functionality = function() { var dj, djAfk, djs, msg, now, _i, _len; msg = ''; djs = API.getDJs(); for (_i = 0, _len = djs.length; _i < _len; _i++) { dj = djs[_i]; now = new Date(); djAfk = now.getTime() - data.users[dj.id].getLastActivity().getTime(); if (djAfk > (5 * 60 * 1000)) { if (msToStr(djAfk) !== false) { msg += dj.username + ' - ' + msToStr(djAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("No one is AFK"); } else { return API.sendChat('AFKs: ' + msg); } }; return afksCommand; })(Command); allAfksCommand = (function(_super) { __extends(allAfksCommand, _super); function allAfksCommand() { _ref6 = allAfksCommand.__super__.constructor.apply(this, arguments); return _ref6; } allAfksCommand.prototype.init = function() { this.command = '/allafks'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; allAfksCommand.prototype.functionality = function() { var msg, now, u, uAfk, usrs, _i, _len; msg = ''; usrs = API.getUsers(); for (_i = 0, _len = usrs.length; _i < _len; _i++) { u = usrs[_i]; now = new Date(); uAfk = now.getTime() - data.users[u.id].getLastActivity().getTime(); if (uAfk > (10 * 60 * 1000)) { if (msToStr(uAfk) !== false) { msg += u.username + ' - ' + msToStr(uAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("No one is AFK"); } else { return API.sendChat('AFKs: ' + msg); } }; return allAfksCommand; })(Command); statusCommand = (function(_super) { __extends(statusCommand, _super); function statusCommand() { _ref7 = statusCommand.__super__.constructor.apply(this, arguments); return _ref7; } statusCommand.prototype.init = function() { this.command = '/status'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; statusCommand.prototype.functionality = function() { var day, hour, launch, lt, meridian, min, month, msg, t, totals; lt = data.launchTime; month = lt.getMonth() + 1; day = lt.getDate(); hour = lt.getHours(); meridian = hour % 12 === hour ? 'AM' : 'PM'; min = lt.getMinutes(); min = min < 10 ? '0' + min : min; t = data.totalVotingData; t['songs'] = data.songCount; launch = 'Initiated ' + month + '/' + day + ' ' + hour + ':' + min + ' ' + meridian + '. '; totals = '' + t.songs + ' songs have been played, accumulating ' + t.woots + ' woots, ' + t.mehs + ' mehs, and ' + t.curates + ' queues.'; msg = launch + totals; return API.sendChat(msg); }; return statusCommand; })(Command); dieCommand = (function(_super) { __extends(dieCommand, _super); function dieCommand() { _ref8 = dieCommand.__super__.constructor.apply(this, arguments); return _ref8; } dieCommand.prototype.init = function() { this.command = '/die'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; dieCommand.prototype.functionality = function() { API.sendChat("Noooo, don't kill me!"); undoHooks(); API.sendChat("Arrggh"); data.implode(); return API.sendChat("I'm dead"); }; return dieCommand; })(Command); reloadCommand = (function(_super) { __extends(reloadCommand, _super); function reloadCommand() { _ref9 = reloadCommand.__super__.constructor.apply(this, arguments); return _ref9; } reloadCommand.prototype.init = function() { this.command = '/reload'; this.parseType = 'exact'; return this.rankPrivelege = 'manager'; }; reloadCommand.prototype.functionality = function() { var pupSrc; API.sendChat('brb'); undoHooks(); pupSrc = data.pupScriptUrl; data.implode(); return $.getScript(pupSrc); }; return reloadCommand; })(Command); lockCommand = (function(_super) { __extends(lockCommand, _super); function lockCommand() { _ref10 = lockCommand.__super__.constructor.apply(this, arguments); return _ref10; } lockCommand.prototype.init = function() { this.command = '/lock'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; lockCommand.prototype.functionality = function() { return data.lockBooth(); }; return lockCommand; })(Command); unlockCommand = (function(_super) { __extends(unlockCommand, _super); function unlockCommand() { _ref11 = unlockCommand.__super__.constructor.apply(this, arguments); return _ref11; } unlockCommand.prototype.init = function() { this.command = '/unlock'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; unlockCommand.prototype.functionality = function() { return data.unlockBooth(); }; return unlockCommand; })(Command); removeCommand = (function(_super) { __extends(removeCommand, _super); function removeCommand() { _ref12 = removeCommand.__super__.constructor.apply(this, arguments); return _ref12; } removeCommand.prototype.init = function() { this.command = '/remove'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; removeCommand.prototype.functionality = function() { var djs, popDj; djs = API.getDJs(); popDj = djs[djs.length - 1]; return API.moderateRemoveDJ(popDj.id); }; return removeCommand; })(Command); addCommand = (function(_super) { __extends(addCommand, _super); function addCommand() { _ref13 = addCommand.__super__.constructor.apply(this, arguments); return _ref13; } addCommand.prototype.init = function() { this.command = '/add'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; addCommand.prototype.functionality = function() { var msg, name, r, user; msg = this.msgData.message; if (msg.length > this.command.length + 2) { name = msg.substr(this.command.length + 2); r = new RoomHelper(); user = r.lookupUser(name); if (user !== false) { API.moderateAddDJ(user.id); return setTimeout((function() { return data.unlockBooth(); }), 5000); } } }; return addCommand; })(Command); skipCommand = (function(_super) { __extends(skipCommand, _super); function skipCommand() { _ref14 = skipCommand.__super__.constructor.apply(this, arguments); return _ref14; } skipCommand.prototype.init = function() { this.command = '/skip'; this.parseType = 'exact'; this.rankPrivelege = 'bouncer'; return window.lastSkipTime; }; skipCommand.prototype.functionality = function() { var currentTime, millisecondsPassed; currentTime = new Date(); if (!window.lastSkipTime) { API.moderateForceSkip(); return window.lastSkipTime = currentTime; } else { millisecondsPassed = Math.round(currentTime.getTime() - window.lastSkipTime.getTime()); if (millisecondsPassed > 10000) { window.lastSkipTime = currentTime; return API.moderateForceSkip(); } } }; return skipCommand; })(Command); disconnectLookupCommand = (function(_super) { __extends(disconnectLookupCommand, _super); function disconnectLookupCommand() { _ref15 = disconnectLookupCommand.__super__.constructor.apply(this, arguments); return _ref15; } disconnectLookupCommand.prototype.init = function() { this.command = '/dclookup'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; disconnectLookupCommand.prototype.functionality = function() { var cmd, dcHour, dcLookupId, dcMeridian, dcMins, dcSongsAgo, dcTimeStr, dcUser, disconnectInstances, givenName, id, recentDisconnect, resp, u, _i, _len, _ref16, _ref17; cmd = this.msgData.message; if (cmd.length > 11) { givenName = cmd.slice(11); _ref16 = data.users; for (id in _ref16) { u = _ref16[id]; if (u.getUser().username === givenName) { dcLookupId = id; disconnectInstances = []; _ref17 = data.userDisconnectLog; for (_i = 0, _len = _ref17.length; _i < _len; _i++) { dcUser = _ref17[_i]; if (dcUser.id === dcLookupId) { disconnectInstances.push(dcUser); } } if (disconnectInstances.length > 0) { resp = u.getUser().username + ' has disconnected ' + disconnectInstances.length.toString() + ' time'; if (disconnectInstances.length === 1) { resp += '. '; } else { resp += 's. '; } recentDisconnect = disconnectInstances.pop(); dcHour = recentDisconnect.time.getHours(); dcMins = recentDisconnect.time.getMinutes(); if (dcMins < 10) { dcMins = '0' + dcMins.toString(); } dcMeridian = dcHour % 12 === dcHour ? 'AM' : 'PM'; dcTimeStr = '' + dcHour + ':' + dcMins + ' ' + dcMeridian; dcSongsAgo = data.songCount - recentDisconnect.songCount; resp += 'Their most recent disconnect was at ' + dcTimeStr + ' (' + dcSongsAgo + ' songs ago). '; if (recentDisconnect.waitlistPosition !== void 0) { resp += 'They were ' + recentDisconnect.waitlistPosition + ' song'; if (recentDisconnect.waitlistPosition > 1) { resp += 's'; } resp += ' away from the DJ booth.'; } else { resp += 'They were not on the waitlist.'; } API.sendChat(resp); return; } else { API.sendChat("I haven't seen " + u.getUser().username + " disconnect."); return; } } } return API.sendChat("I don't see a user in the room named '" + givenName + "'."); } }; return disconnectLookupCommand; })(Command); voteRatioCommand = (function(_super) { __extends(voteRatioCommand, _super); function voteRatioCommand() { _ref16 = voteRatioCommand.__super__.constructor.apply(this, arguments); return _ref16; } voteRatioCommand.prototype.init = function() { this.command = '/voteratio'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; voteRatioCommand.prototype.functionality = function() { var msg, name, r, u, votes; r = new RoomHelper(); msg = this.msgData.message; if (msg.length > 12) { name = msg.substr(12); u = r.lookupUser(name); if (u !== false) { votes = r.userVoteRatio(u); msg = u.username + " has wooted " + votes['woot'].toString() + " time"; if (votes['woot'] === 1) { msg += ', '; } else { msg += 's, '; } msg += "and meh'd " + votes['meh'].toString() + " time"; if (votes['meh'] === 1) { msg += '. '; } else { msg += 's. '; } msg += "Their woot:vote ratio is " + votes['positiveRatio'].toString() + "."; return API.sendChat(msg); } else { return API.sendChat("I don't recognize a user named '" + name + "'"); } } else { return API.sendChat("I'm not sure what you want from me..."); } }; return voteRatioCommand; })(Command); avgVoteRatioCommand = (function(_super) { __extends(avgVoteRatioCommand, _super); function avgVoteRatioCommand() { _ref17 = avgVoteRatioCommand.__super__.constructor.apply(this, arguments); return _ref17; } avgVoteRatioCommand.prototype.init = function() { this.command = '/avgvoteratio'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; avgVoteRatioCommand.prototype.functionality = function() { var averageRatio, msg, r, ratio, roomRatios, uid, user, userRatio, votes, _i, _len, _ref18; roomRatios = []; r = new RoomHelper(); _ref18 = data.voteLog; for (uid in _ref18) { votes = _ref18[uid]; user = data.users[uid].getUser(); userRatio = r.userVoteRatio(user); roomRatios.push(userRatio['positiveRatio']); } averageRatio = 0.0; for (_i = 0, _len = roomRatios.length; _i < _len; _i++) { ratio = roomRatios[_i]; averageRatio += ratio; } averageRatio = averageRatio / roomRatios.length; msg = "Accounting for " + roomRatios.length.toString() + " user ratios, the average room ratio is " + averageRatio.toFixed(2).toString() + "."; return API.sendChat(msg); }; return avgVoteRatioCommand; })(Command); staffCommand = (function(_super) { __extends(staffCommand, _super); function staffCommand() { _ref18 = staffCommand.__super__.constructor.apply(this, arguments); return _ref18; } staffCommand.prototype.init = function() { this.command = '/staff'; this.parseType = 'exact'; this.rankPrivelege = 'user'; return window.lastActiveStaffTime; }; staffCommand.prototype.staff = function() { var now, staff, staffAfk, stringstaff, user, _i, _len; staff = API.getStaff(); now = new Date(); stringstaff = ""; for (_i = 0, _len = staff.length; _i < _len; _i++) { user = staff[_i]; if (user.permission > 2) { staffAfk = now.getTime() - data.users[user.id].getLastActivity().getTime(); if (staffAfk < (20 * 60 * 1000)) { stringstaff += "@" + user.username + " "; } } } if (stringstaff.length === 0) { stringstaff = "There are currently no staff members active :'("; } return stringstaff; }; staffCommand.prototype.functionality = function() { var currentTime, millisecondsPassed, thestaff; thestaff = this.staff(); currentTime = new Date(); if (!window.lastActiveStaffTime) { API.sendChat(thestaff); return window.lastActiveStaffTime = currentTime; } else { millisecondsPassed = currentTime.getTime() - window.lastActiveStaffTime.getTime(); if (millisecondsPassed > 10000) { window.lastActiveStaffTime = currentTime; return API.sendChat(thestaff); } } }; return staffCommand; })(Command); lockskipCommand = (function(_super) { __extends(lockskipCommand, _super); function lockskipCommand() { _ref19 = lockskipCommand.__super__.constructor.apply(this, arguments); return _ref19; } lockskipCommand.prototype.init = function() { this.command = '/lockskip'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; lockskipCommand.prototype.functionality = function() { return data.lockBooth(function() { return setTimeout(function() {}, API.moderateForceSkip(), setTimeout(function() { return data.unlockBooth(); }, 5000), 5000); }); }; return lockskipCommand; })(Command); promoCommand = (function(_super) { __extends(promoCommand, _super); function promoCommand() { _ref20 = promoCommand.__super__.constructor.apply(this, arguments); return _ref20; } promoCommand.prototype.init = function() { this.command = '/tastycat'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; promoCommand.prototype.functionality = function() { return API.sendChat("/em: " + "Promo code = tastycat " + "http://community.edmspotlight.com/forum.php "); }; return promoCommand; })(Command); versionCommand = (function(_super) { __extends(versionCommand, _super); function versionCommand() { _ref21 = versionCommand.__super__.constructor.apply(this, arguments); return _ref21; } versionCommand.prototype.init = function() { this.command = '/version'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; versionCommand.prototype.functionality = function() { return API.sendChat("/me is running TastycatBot version " + currentversion); }; return versionCommand; })(Command); cmds = [newSongsCommand, themeCommand, rulesCommand, roomHelpCommand, afksCommand, allAfksCommand, statusCommand, dieCommand, reloadCommand, lockCommand, unlockCommand, removeCommand, addCommand, skipCommand, disconnectLookupCommand, voteRatioCommand, avgVoteRatioCommand, staffCommand, lockskipCommand, versionCommand, newsCommand, promoCommand]; chatCommandDispatcher = function(chat) { var c, cmd, _i, _len, _results; chatUniversals(chat); _results = []; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(chat); if (c.evalMsg()) { break; } else { _results.push(void 0); } } return _results; }; updateVotes = function(obj) { data.currentwoots = obj.positive; data.currentmehs = obj.negative; return data.currentcurates = obj.curates; }; announceCurate = function(obj) { return APIsendChat("/em: " + obj.user.username + " loves this song!"); }; handleUserJoin = function(user) { data.userJoin(user); return data.users[user.id].updateActivity(); }; handleNewSong = function(obj) { var songId; data.intervalMessages(); if (data.currentsong === null) { data.newSong(); } else { API.sendChat("/em: " + data.currentsong.title + " by " + data.currentsong.author + ". Stats: Woots: " + data.currentwoots + ", Mehs: " + data.currentmehs + ", Loves: " + data.currentcurates + "."); data.newSong(); document.getElementById("button-vote-positive").click(); } if (data.forceSkip) { songId = obj.media.id; return setTimeout(function() { var cMedia; cMedia = API.getMedia(); if (cMedia.id === songId) { return API.moderateForceSkip(); } }, obj.media.duration * 1000); } }; handleVote = function(obj) { return data.users[obj.user.id].updateVote(obj.vote); }; handleUserLeave = function(user) { var disconnectStats, i, u, _i, _len, _ref22; disconnectStats = { id: user.id, time: new Date(), songCount: data.songCount }; i = 0; _ref22 = data.internalWaitlist; for (_i = 0, _len = _ref22.length; _i < _len; _i++) { u = _ref22[_i]; if (u.id === user.id) { disconnectStats['waitlistPosition'] = i - 1; data.setInternalWaitlist(); break; } else { i++; } } data.userDisconnectLog.push(disconnectStats); return data.users[user.id].inRoom(false); }; antispam = function(chat) { var plugRoomLinkPatt, sender; plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; if (plugRoomLinkPatt.exec(chat.message)) { sender = API.getUser(chat.fromID); if (!sender.ambassador && !sender.moderator && !sender.owner && !sender.superuser) { if (!data.users[chat.fromID]["protected"]) { API.sendChat("Don't spam room links you ass clown"); return API.moderateDeleteChat(chat.chatID); } else { return API.sendChat("I'm supposed to kick you, but you're just too darn pretty."); } } } }; fans = function(chat) { var msg; msg = chat.message.toLowerCase(); if (msg.indexOf('fan me') !== -1 || msg.indexOf('fan for fan') !== -1 || msg.indexOf('fan pls') !== -1 || msg.indexOf('fan4fan') !== -1 || msg.indexOf('add me to fan') !== -1 || msg.indexOf('autowoot:') !== -1) { return API.moderateDeleteChat(chat.chatID); } }; chatUniversals = function(chat) { data.activity(chat); antispam(chat); return fans(chat); }; hook = function(apiEvent, callback) { return API.addEventListener(apiEvent, callback); }; unhook = function(apiEvent, callback) { return API.removeEventListener(apiEvent, callback); }; apiHooks = [ { 'event': API.ROOM_SCORE_UPDATE, 'callback': updateVotes }, { 'event': API.CURATE_UPDATE, 'callback': announceCurate }, { 'event': API.USER_JOIN, 'callback': handleUserJoin }, { 'event': API.DJ_ADVANCE, 'callback': handleNewSong }, { 'event': API.VOTE_UPDATE, 'callback': handleVote }, { 'event': API.CHAT, 'callback': chatCommandDispatcher }, { 'event': API.USER_LEAVE, 'callback': handleUserLeave } ]; initHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(hook(pair['event'], pair['callback'])); } return _results; }; undoHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(unhook(pair['event'], pair['callback'])); } return _results; }; initialize(); }).call(this);
// Generated by CoffeeScript 1.6.3 (function() { var Command, RoomHelper, User, afkCheck, afksCommand, allAfksCommand, announceCurate, antispam, apiHooks, avgVoteRatioCommand, badQualityCommand, beggar, chatCommandDispatcher, chatUniversals, cmds, commandsCommand, cookieCommand, data, dieCommand, disconnectLookupCommand, downloadCommand, forceSkipCommand, handleNewSong, handleUserJoin, handleUserLeave, handleVote, hook, initEnvironment, initHooks, initialize, lockCommand, msToStr, newSongsCommand, overplayedCommand, popCommand, populateUserData, pupOnline, pushCommand, reloadCommand, resetAfkCommand, roomHelpCommand, rulesCommand, settings, skipCommand, sourceCommand, statusCommand, swapCommand, themeCommand, undoHooks, unhook, unhookCommand, unlockCommand, updateVotes, uservoiceCommand, voteRatioCommand, whyMehCommand, whyWootCommand, wootCommand, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref3, _ref30, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; settings = (function() { function settings() { this.implode = __bind(this.implode, this); this.intervalMessages = __bind(this.intervalMessages, this); this.startAfkInterval = __bind(this.startAfkInterval, this); this.setInternalWaitlist = __bind(this.setInternalWaitlist, this); this.userJoin = __bind(this.userJoin, this); this.getRoomUrlPath = __bind(this.getRoomUrlPath, this); this.startup = __bind(this.startup, this); } settings.prototype.currentsong = {}; settings.prototype.users = {}; settings.prototype.djs = []; settings.prototype.mods = []; settings.prototype.host = []; settings.prototype.hasWarned = false; settings.prototype.currentwoots = 0; settings.prototype.currentmehs = 0; settings.prototype.currentcurates = 0; settings.prototype.roomUrlPath = null; settings.prototype.internalWaitlist = []; settings.prototype.userDisconnectLog = []; settings.prototype.voteLog = {}; settings.prototype.seshOn = false; settings.prototype.forceSkip = false; settings.prototype.seshMembers = []; settings.prototype.launchTime = null; settings.prototype.totalVotingData = { woots: 0, mehs: 0, curates: 0 }; settings.prototype.pupScriptUrl = ''; settings.prototype.afkTime = 12 * 60 * 1000; settings.prototype.songIntervalMessages = [ { interval: 15, offset: 0, msg: "I'm a bot!" } ]; settings.prototype.songCount = 0; settings.prototype.startup = function() { this.launchTime = new Date(); return this.roomUrlPath = this.getRoomUrlPath(); }; settings.prototype.getRoomUrlPath = function() { return window.location.pathname.replace(/\//g, ''); }; settings.prototype.newSong = function() { this.totalVotingData.woots += this.currentwoots; this.totalVotingData.mehs += this.currentmehs; this.totalVotingData.curates += this.currentcurates; this.setInternalWaitlist(); this.currentsong = API.getMedia(); if (this.currentsong !== null) { return this.currentsong; } else { return false; } }; settings.prototype.userJoin = function(u) { var userIds, _ref; userIds = Object.keys(this.users); if (_ref = u.id, __indexOf.call(userIds, _ref) >= 0) { return this.users[u.id].inRoom(true); } else { this.users[u.id] = new User(u); return this.voteLog[u.id] = {}; } }; settings.prototype.setInternalWaitlist = function() { var boothWaitlist, fullWaitList, lineWaitList; boothWaitlist = API.getDJs().slice(1); lineWaitList = API.getWaitList(); fullWaitList = boothWaitlist.concat(lineWaitList); return this.internalWaitlist = fullWaitList; }; settings.prototype.activity = function(obj) { if (obj.type === 'message') { return this.users[obj.fromID].updateActivity(); } }; settings.prototype.startAfkInterval = function() { return this.afkInterval = setInterval(afkCheck, 2000); }; settings.prototype.intervalMessages = function() { var msg, _i, _len, _ref, _results; this.songCount++; _ref = this.songIntervalMessages; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { msg = _ref[_i]; if (((this.songCount + msg['offset']) % msg['interval']) === 0) { _results.push(API.sendChat(msg['msg'])); } else { _results.push(void 0); } } return _results; }; settings.prototype.implode = function() { var item, val; for (item in this) { val = this[item]; if (typeof this[item] === 'object') { delete this[item]; } } return clearInterval(this.afkInterval); }; settings.prototype.lockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": true, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; settings.prototype.unlockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": false, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; return settings; })(); data = new settings(); User = (function() { User.prototype.afkWarningCount = 0; User.prototype.lastWarning = null; User.prototype["protected"] = false; User.prototype.isInRoom = true; function User(user) { this.user = user; this.updateVote = __bind(this.updateVote, this); this.inRoom = __bind(this.inRoom, this); this.notDj = __bind(this.notDj, this); this.warn = __bind(this.warn, this); this.getIsDj = __bind(this.getIsDj, this); this.getWarningCount = __bind(this.getWarningCount, this); this.getUser = __bind(this.getUser, this); this.getLastWarning = __bind(this.getLastWarning, this); this.getLastActivity = __bind(this.getLastActivity, this); this.updateActivity = __bind(this.updateActivity, this); this.init = __bind(this.init, this); this.init(); } User.prototype.init = function() { return this.lastActivity = new Date(); }; User.prototype.updateActivity = function() { this.lastActivity = new Date(); this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.getLastActivity = function() { return this.lastActivity; }; User.prototype.getLastWarning = function() { if (this.lastWarning === null) { return false; } else { return this.lastWarning; } }; User.prototype.getUser = function() { return this.user; }; User.prototype.getWarningCount = function() { return this.afkWarningCount; }; User.prototype.getIsDj = function() { var DJs, dj, _i, _len; DJs = API.getDJs(); for (_i = 0, _len = DJs.length; _i < _len; _i++) { dj = DJs[_i]; if (this.user.id === dj.id) { return true; } } return false; }; User.prototype.warn = function() { this.afkWarningCount++; return this.lastWarning = new Date(); }; User.prototype.notDj = function() { this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.inRoom = function(online) { return this.isInRoom = online; }; User.prototype.updateVote = function(v) { if (this.isInRoom) { return data.voteLog[this.user.id][data.currentsong.id] = v; } }; return User; })(); RoomHelper = (function() { function RoomHelper() {} RoomHelper.prototype.lookupUser = function(username) { var id, u, _ref; _ref = data.users; for (id in _ref) { u = _ref[id]; if (u.getUser().username === username) { return u.getUser(); } } return false; }; RoomHelper.prototype.userVoteRatio = function(user) { var songId, songVotes, vote, votes; songVotes = data.voteLog[user.id]; votes = { 'woot': 0, 'meh': 0 }; for (songId in songVotes) { vote = songVotes[songId]; if (vote === 1) { votes['woot']++; } else if (vote === -1) { votes['meh']++; } } votes['positiveRatio'] = (votes['woot'] / (votes['woot'] + votes['meh'])).toFixed(2); return votes; }; return RoomHelper; })(); pupOnline = function() { return API.sendChat("Bot Online!"); }; populateUserData = function() { var u, users, _i, _len; users = API.getUsers(); for (_i = 0, _len = users.length; _i < _len; _i++) { u = users[_i]; data.users[u.id] = new User(u); data.voteLog[u.id] = {}; } }; initEnvironment = function() { document.getElementById("button-vote-positive").click(); return document.getElementById("button-sound").click(); }; initialize = function() { pupOnline(); populateUserData(); initEnvironment(); initHooks(); data.startup(); data.newSong(); return data.startAfkInterval(); }; afkCheck = function() { var DJs, id, lastActivity, lastWarned, now, oneMinute, secsLastActive, timeSinceLastActivity, timeSinceLastWarning, twoMinutes, user, warnMsg, _ref, _results; _ref = data.users; _results = []; for (id in _ref) { user = _ref[id]; now = new Date(); lastActivity = user.getLastActivity(); timeSinceLastActivity = now.getTime() - lastActivity.getTime(); if (timeSinceLastActivity > data.afkTime) { if (user.getIsDj()) { secsLastActive = timeSinceLastActivity / 1000; if (user.getWarningCount() === 0) { user.warn(); _results.push(API.sendChat("@" + user.getUser().username + ", I haven't seen you chat or vote in at least 12 minutes. Are you AFK? If you don't show activity in 2 minutes I will remove you.")); } else if (user.getWarningCount() === 1) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); twoMinutes = 2 * 60 * 1000; if (timeSinceLastWarning > twoMinutes) { user.warn(); warnMsg = "@" + user.getUser().username; warnMsg += ", I haven't seen you chat or vote in at least 14 minutes now. This is your second and FINAL warning. If you do not chat or vote in the next minute I will remove you."; _results.push(API.sendChat(warnMsg)); } else { _results.push(void 0); } } else if (user.getWarningCount() === 2) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); oneMinute = 1 * 60 * 1000; if (timeSinceLastWarning > oneMinute) { DJs = API.getDJs(); if (DJs.length > 0 && DJs[0].id !== user.getUser().id) { API.sendChat("@" + user.getUser().username + ", you had 2 warnings. Please stay active by chatting or voting."); API.moderateRemoveDJ(id); _results.push(user.warn()); } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(user.notDj()); } } else { _results.push(void 0); } } return _results; }; msToStr = function(msTime) { var ms, msg, timeAway; msg = ''; timeAway = { 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 0 }; ms = { 'day': 24 * 60 * 60 * 1000, 'hour': 60 * 60 * 1000, 'minute': 60 * 1000, 'second': 1000 }; if (msTime > ms['day']) { timeAway['days'] = Math.floor(msTime / ms['day']); msTime = msTime % ms['day']; } if (msTime > ms['hour']) { timeAway['hours'] = Math.floor(msTime / ms['hour']); msTime = msTime % ms['hour']; } if (msTime > ms['minute']) { timeAway['minutes'] = Math.floor(msTime / ms['minute']); msTime = msTime % ms['minute']; } if (msTime > ms['second']) { timeAway['seconds'] = Math.floor(msTime / ms['second']); } if (timeAway['days'] !== 0) { msg += timeAway['days'].toString() + 'd'; } if (timeAway['hours'] !== 0) { msg += timeAway['hours'].toString() + 'h'; } if (timeAway['minutes'] !== 0) { msg += timeAway['minutes'].toString() + 'm'; } if (timeAway['seconds'] !== 0) { msg += timeAway['seconds'].toString() + 's'; } if (msg !== '') { return msg; } else { return false; } }; Command = (function() { function Command(msgData) { this.msgData = msgData; this.init(); } Command.prototype.init = function() { this.parseType = null; this.command = null; return this.rankPrivelege = null; }; Command.prototype.functionality = function(data) {}; Command.prototype.hasPrivelege = function() { var user; user = data.users[this.msgData.fromID].getUser(); switch (this.rankPrivelege) { case 'host': return user.permission === 5; case 'cohost': return user.permission >= 4; case 'mod': return user.permission >= 3; case 'manager': return user.permission >= 3; case 'bouncer': return user.permission >= 2; case 'featured': return user.permission >= 1; default: return true; } }; Command.prototype.commandMatch = function() { var command, msg, _i, _len, _ref; msg = this.msgData.message; if (typeof this.command === 'string') { if (this.parseType === 'exact') { if (msg === this.command) { return true; } else { return false; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, this.command.length) === this.command) { return true; } else { return false; } } else if (this.parseType === 'contains') { if (msg.indexOf(this.command) !== -1) { return true; } else { return false; } } } else if (typeof this.command === 'object') { _ref = this.command; for (_i = 0, _len = _ref.length; _i < _len; _i++) { command = _ref[_i]; if (this.parseType === 'exact') { if (msg === command) { return true; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, command.length) === command) { return true; } } else if (this.parseType === 'contains') { if (msg.indexOf(command) !== -1) { return true; } } } return false; } }; Command.prototype.evalMsg = function() { if (this.commandMatch() && this.hasPrivelege()) { this.functionality(); return true; } else { return false; } }; return Command; })(); cookieCommand = (function(_super) { __extends(cookieCommand, _super); function cookieCommand() { _ref = cookieCommand.__super__.constructor.apply(this, arguments); return _ref; } cookieCommand.prototype.init = function() { this.command = 'cookie'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; cookieCommand.prototype.getCookie = function() { var c, cookies; cookies = ["a chocolate chip cookie", "a sugar cookie", "an oatmeal raisin cookie", "a 'special' brownie", "an animal cracker", "a scooby snack", "a blueberry muffin", "a cupcake"]; c = Math.floor(Math.random() * cookies.length); return cookies[c]; }; cookieCommand.prototype.functionality = function() { var msg, r, user; msg = this.msgData.message; r = new RoomHelper(); if (msg.substring(7, 8) === "@") { user = r.lookupUser(msg.substr(8)); if (user === false) { API.sendChat("/em doesn't see '" + msg.substr(8) + "' in room and eats cookie himself"); return false; } else { return API.sendChat("@" + user.username + ", @" + this.msgData.from + " has rewarded you with " + this.getCookie() + ". Enjoy."); } } }; return cookieCommand; })(Command); newSongsCommand = (function(_super) { __extends(newSongsCommand, _super); function newSongsCommand() { _ref1 = newSongsCommand.__super__.constructor.apply(this, arguments); return _ref1; } newSongsCommand.prototype.init = function() { this.command = '!newsongs'; this.parseType = 'startsWith'; return this.rankPrivelege = 'user'; }; newSongsCommand.prototype.functionality = function() { var arts, cMedia, chans, chooseRandom, mChans, msg, selections, u, _ref2; mChans = this.memberChannels.slice(0); chans = this.channels.slice(0); arts = this.artists.slice(0); chooseRandom = function(list) { var l, r; l = list.length; r = Math.floor(Math.random() * l); return list.splice(r, 1); }; selections = { channels: [], artist: '' }; u = data.users[this.msgData.fromID].getUser().username; if (u.indexOf("MistaDubstep") !== -1) { selections['channels'].push('MistaDubstep'); } else if (u.indexOf("Underground Promotions") !== -1) { selections['channels'].push('UndergroundDubstep'); } else { selections['channels'].push(chooseRandom(mChans)); } selections['channels'].push(chooseRandom(chans)); selections['channels'].push(chooseRandom(chans)); cMedia = API.getMedia(); if ((cMedia != null) && (_ref2 = cMedia.author, __indexOf.call(arts, _ref2) >= 0)) { selections['artist'] = cMedia.author; } else { selections['artist'] = chooseRandom(arts); } msg = "Everyone's heard that " + selections['artist'] + " track! Get new music from http://youtube.com/" + selections['channels'][0] + " http://youtube.com/" + selections['channels'][1] + " or http://youtube.com/" + selections['channels'][2]; return API.sendChat(msg); }; newSongsCommand.prototype.memberChannels = ["JitterStep", "MistaDubstep", "DubStationPromotions", "UndergroundDubstep", "JesusDied4Dubstep", "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.channels = ["BassRape", "Mudstep", "WobbleCraftDubz", "MonstercatMedia", "UKFdubstep", "DropThatBassline", "Dubstep", "VitalDubstep", "AirwaveDubstepTV", "EpicNetworkMusic", "NoOffenseDubstep", "InspectorDubplate", "ReptileDubstep", "MrMoMDubstep", "FrixionNetwork", "IcyDubstep", "DubstepWeed", "VhileMusic", "LessThan3Dubstep", "PleaseMindTheDUBstep", "ClownDubstep", "TheULTRADUBSTEP", "DuBM0nkeyz", "DubNationUK", "TehDubstepChannel", "BassDropMedia", "USdubstep", "UNITEDubstep"]; newSongsCommand.prototype.artists = ["Skrillex", "Doctor P", "Excision", "Flux Pavilion", "Knife Party", "Krewella", "Rusko", "Bassnectar", "Nero", "Deadmau5", "Borgore", "Zomboy"]; return newSongsCommand; })(Command); whyWootCommand = (function(_super) { __extends(whyWootCommand, _super); function whyWootCommand() { _ref2 = whyWootCommand.__super__.constructor.apply(this, arguments); return _ref2; } whyWootCommand.prototype.init = function() { this.command = '!whywoot'; this.parseType = 'startsWith'; return this.rankPrivelege = 'user'; }; whyWootCommand.prototype.functionality = function() { var msg, nameIndex; msg = "We dislike AFK djs. We calculate your AFK status by checking the last time you Woot'd or spoke. If you don't woot, I'll automagically remove you. Use our AutoWoot script to avoid being removed: http://bit.ly/McZdWw"; if ((nameIndex = this.msgData.message.indexOf('@')) !== -1) { return API.sendChat(this.msgData.message.substr(nameIndex) + ', ' + msg); } else { return API.sendChat(msg); } }; return whyWootCommand; })(Command); themeCommand = (function(_super) { __extends(themeCommand, _super); function themeCommand() { _ref3 = themeCommand.__super__.constructor.apply(this, arguments); return _ref3; } themeCommand.prototype.init = function() { this.command = '!theme'; this.parseType = 'startsWith'; return this.rankPrivelege = 'user'; }; themeCommand.prototype.functionality = function() { var msg; msg = "Any type of Bass Music is allowed here. Including Dubstep, Complextro, Drum and Bass, "; msg += "Garage, Breakbeat, Hardstyle, Moombahton, HEAVY EDM, House, Electro, and Trance!!"; return API.sendChat(msg); }; return themeCommand; })(Command); rulesCommand = (function(_super) { __extends(rulesCommand, _super); function rulesCommand() { _ref4 = rulesCommand.__super__.constructor.apply(this, arguments); return _ref4; } rulesCommand.prototype.init = function() { this.command = '!rules'; this.parseType = 'startsWith'; return this.rankPrivelege = 'user'; }; rulesCommand.prototype.functionality = function() { var msg; msg = "1) Play good sound quality music. "; msg += "2) Don't replay a song on the room history. 3) Max song limit 8 minutes. "; msg += "4) DO NOT GO AWAY FROM KEYBOARD ON DECK! Please WOOT on DJ Booth and respect your fellow DJs!"; return API.sendChat(msg); }; return rulesCommand; })(Command); roomHelpCommand = (function(_super) { __extends(roomHelpCommand, _super); function roomHelpCommand() { _ref5 = roomHelpCommand.__super__.constructor.apply(this, arguments); return _ref5; } roomHelpCommand.prototype.init = function() { this.command = '!roomhelp'; this.parseType = 'startsWith'; return this.rankPrivelege = 'user'; }; roomHelpCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "Welcome to the Dubstep Den! Create a playlist and populate it with songs from either YouTube or Soundcloud. "; msg1 += "Click the 'Join Waitlist' button and wait your turn to play music. Most electronic music allowed, type '/theme' for specifics."; msg2 = "Stay active while waiting to play your song or I'll remove you. Play good quality music that hasn't been played recently (check room history). "; msg2 += "Avoid over played artists like Skrillex. Ask a mod if you're unsure about your song choice"; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return roomHelpCommand; })(Command); sourceCommand = (function(_super) { __extends(sourceCommand, _super); function sourceCommand() { _ref6 = sourceCommand.__super__.constructor.apply(this, arguments); return _ref6; } sourceCommand.prototype.init = function() { this.command = ['/source', '/sourcecode', '/author']; this.parseType = 'exact'; return this.rankPrivelege = 'user'; }; sourceCommand.prototype.functionality = function() { var msg; msg = 'Backus wrote me in CoffeeScript. A generalized version of me should be available on github soon!'; return API.sendChat(msg); }; return sourceCommand; })(Command); wootCommand = (function(_super) { __extends(wootCommand, _super); function wootCommand() { _ref7 = wootCommand.__super__.constructor.apply(this, arguments); return _ref7; } wootCommand.prototype.init = function() { this.command = '!woot'; this.parseType = 'startsWith'; return this.rankPrivelege = 'user'; }; wootCommand.prototype.functionality = function() { var msg, nameIndex; msg = "Please WOOT on DJ Booth and support your fellow DJs! AutoWoot: http://bit.ly/Lwcis0"; if ((nameIndex = this.msgData.message.indexOf('@')) !== -1) { return API.sendChat(this.msgData.message.substr(nameIndex) + ', ' + msg); } else { return API.sendChat(msg); } }; return wootCommand; })(Command); badQualityCommand = (function(_super) { __extends(badQualityCommand, _super); function badQualityCommand() { _ref8 = badQualityCommand.__super__.constructor.apply(this, arguments); return _ref8; } badQualityCommand.prototype.init = function() { this.command = '.128'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; badQualityCommand.prototype.functionality = function() { var msg; msg = "Flagged for bad sound quality. Where do you get your music? The garbage can? Don't play this low quality tune again!"; return API.sendChat(msg); }; return badQualityCommand; })(Command); downloadCommand = (function(_super) { __extends(downloadCommand, _super); function downloadCommand() { _ref9 = downloadCommand.__super__.constructor.apply(this, arguments); return _ref9; } downloadCommand.prototype.init = function() { this.command = '!download'; this.parseType = 'exact'; return this.rankPrivelege = 'user'; }; downloadCommand.prototype.functionality = function() { var e, eAuthor, eTitle, msg; if (data.currentsong == null) { return; } e = encodeURIComponent; eAuthor = e(data.currentsong.author); eTitle = e(data.currentsong.title); msg = "Try this link for HIGH QUALITY DOWNLOAD: http://google.com/#hl=en&q="; msg += eAuthor + "%20-%20" + eTitle; msg += "%20site%3Azippyshare.com%20OR%20site%3Asoundowl.com%20OR%20site%3Ahulkshare.com%20OR%20site%3Asoundcloud.com"; return API.sendChat(msg); }; return downloadCommand; })(Command); afksCommand = (function(_super) { __extends(afksCommand, _super); function afksCommand() { _ref10 = afksCommand.__super__.constructor.apply(this, arguments); return _ref10; } afksCommand.prototype.init = function() { this.command = '!afks'; this.parseType = 'exact'; return this.rankPrivelege = 'user'; }; afksCommand.prototype.functionality = function() { var dj, djAfk, djs, msg, now, _i, _len; msg = ''; djs = API.getDJs(); for (_i = 0, _len = djs.length; _i < _len; _i++) { dj = djs[_i]; now = new Date(); djAfk = now.getTime() - data.users[dj.id].getLastActivity().getTime(); if (djAfk > (5 * 60 * 1000)) { if (msToStr(djAfk) !== false) { msg += dj.username + ' - ' + msToStr(djAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("No one is AFK"); } else { return API.sendChat('AFKs: ' + msg); } }; return afksCommand; })(Command); allAfksCommand = (function(_super) { __extends(allAfksCommand, _super); function allAfksCommand() { _ref11 = allAfksCommand.__super__.constructor.apply(this, arguments); return _ref11; } allAfksCommand.prototype.init = function() { this.command = '!allafks'; this.parseType = 'exact'; return this.rankPrivelege = 'user'; }; allAfksCommand.prototype.functionality = function() { var msg, now, u, uAfk, usrs, _i, _len; msg = ''; usrs = API.getUsers(); for (_i = 0, _len = usrs.length; _i < _len; _i++) { u = usrs[_i]; now = new Date(); uAfk = now.getTime() - data.users[u.id].getLastActivity().getTime(); if (uAfk > (10 * 60 * 1000)) { if (msToStr(uAfk) !== false) { msg += u.username + ' - ' + msToStr(uAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("No one is AFK"); } else { return API.sendChat('AFKs: ' + msg); } }; return allAfksCommand; })(Command); statusCommand = (function(_super) { __extends(statusCommand, _super); function statusCommand() { _ref12 = statusCommand.__super__.constructor.apply(this, arguments); return _ref12; } statusCommand.prototype.init = function() { this.command = '!status'; this.parseType = 'exact'; return this.rankPrivelege = 'user'; }; statusCommand.prototype.functionality = function() { var day, hour, launch, lt, meridian, min, month, msg, t, totals; lt = data.launchTime; month = lt.getMonth() + 1; day = lt.getDate(); hour = lt.getHours(); meridian = hour % 12 === hour ? 'AM' : 'PM'; min = lt.getMinutes(); min = min < 10 ? '0' + min : min; t = data.totalVotingData; t['songs'] = data.songCount; launch = 'Initiated ' + month + '/' + day + ' ' + hour + ':' + min + ' ' + meridian + '. '; totals = '' + t.songs + ' songs have been played, accumulating ' + t.woots + ' woots, ' + t.mehs + ' mehs, and ' + t.curates + ' queues.'; msg = launch + totals; return API.sendChat(msg); }; return statusCommand; })(Command); unhookCommand = (function(_super) { __extends(unhookCommand, _super); function unhookCommand() { _ref13 = unhookCommand.__super__.constructor.apply(this, arguments); return _ref13; } unhookCommand.prototype.init = function() { this.command = '!unhook events all'; this.parseType = 'exact'; return this.rankPrivelege = 'host'; }; unhookCommand.prototype.functionality = function() { API.sendChat('Unhooking all events...'); return undoHooks(); }; return unhookCommand; })(Command); dieCommand = (function(_super) { __extends(dieCommand, _super); function dieCommand() { _ref14 = dieCommand.__super__.constructor.apply(this, arguments); return _ref14; } dieCommand.prototype.init = function() { this.command = '!die'; this.parseType = 'exact'; return this.rankPrivelege = 'host'; }; dieCommand.prototype.functionality = function() { API.sendChat('Unhooking Events...'); undoHooks(); API.sendChat('Deleting bot data...'); data.implode(); return API.sendChat('Consider me dead'); }; return dieCommand; })(Command); reloadCommand = (function(_super) { __extends(reloadCommand, _super); function reloadCommand() { _ref15 = reloadCommand.__super__.constructor.apply(this, arguments); return _ref15; } reloadCommand.prototype.init = function() { this.command = '!reload'; this.parseType = 'exact'; return this.rankPrivelege = 'host'; }; reloadCommand.prototype.functionality = function() { var pupSrc; API.sendChat('brb'); undoHooks(); pupSrc = data.pupScriptUrl; data.implode(); return $.getScript(pupSrc); }; return reloadCommand; })(Command); lockCommand = (function(_super) { __extends(lockCommand, _super); function lockCommand() { _ref16 = lockCommand.__super__.constructor.apply(this, arguments); return _ref16; } lockCommand.prototype.init = function() { this.command = '!lock'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; lockCommand.prototype.functionality = function() { return data.lockBooth(); }; return lockCommand; })(Command); unlockCommand = (function(_super) { __extends(unlockCommand, _super); function unlockCommand() { _ref17 = unlockCommand.__super__.constructor.apply(this, arguments); return _ref17; } unlockCommand.prototype.init = function() { this.command = '!unlock'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; unlockCommand.prototype.functionality = function() { return data.unlockBooth(); }; return unlockCommand; })(Command); swapCommand = (function(_super) { __extends(swapCommand, _super); function swapCommand() { _ref18 = swapCommand.__super__.constructor.apply(this, arguments); return _ref18; } swapCommand.prototype.init = function() { this.command = '!swap'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; swapCommand.prototype.functionality = function() { var msg, r, swapRegex, userAdd, userRemove, users; msg = this.msgData.message; swapRegex = new RegExp("^/swap @(.+) for @(.+)$"); users = swapRegex.exec(msg).slice(1); r = new RoomHelper(); if (users.length === 2) { userRemove = r.lookupUser(users[0]); userAdd = r.lookupUser(users[1]); if (userRemove === false || userAdd === false) { API.sendChat('Error parsing one or both names'); return false; } else { return data.lockBooth(function() { API.moderateRemoveDJ(userRemove.id); API.sendChat("Removing " + userRemove.username + "..."); return setTimeout(function() { API.moderateAddDJ(userAdd.id); API.sendChat("Adding " + userAdd.username + "..."); return setTimeout(function() { return data.unlockBooth(); }, 1500); }, 1500); }); } } else { return API.sendChat("Command didn't parse into two seperate usernames"); } }; return swapCommand; })(Command); popCommand = (function(_super) { __extends(popCommand, _super); function popCommand() { _ref19 = popCommand.__super__.constructor.apply(this, arguments); return _ref19; } popCommand.prototype.init = function() { this.command = '!pop'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; popCommand.prototype.functionality = function() { var djs, popDj; djs = API.getDJs(); popDj = djs[djs.length - 1]; return API.moderateRemoveDJ(popDj.id); }; return popCommand; })(Command); pushCommand = (function(_super) { __extends(pushCommand, _super); function pushCommand() { _ref20 = pushCommand.__super__.constructor.apply(this, arguments); return _ref20; } pushCommand.prototype.init = function() { this.command = '!push'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; pushCommand.prototype.functionality = function() { var msg, name, r, user; msg = this.msgData.message; if (msg.length > this.command.length + 2) { name = msg.substr(this.command.length + 2); r = new RoomHelper(); user = r.lookupUser(name); if (user !== false) { return API.moderateAddDJ(user.id); } } }; return pushCommand; })(Command); resetAfkCommand = (function(_super) { __extends(resetAfkCommand, _super); function resetAfkCommand() { _ref21 = resetAfkCommand.__super__.constructor.apply(this, arguments); return _ref21; } resetAfkCommand.prototype.init = function() { this.command = '!resetafk'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; resetAfkCommand.prototype.functionality = function() { var id, name, u, _ref22; if (this.msgData.message.length > 10) { name = this.msgData.message.substring(11); _ref22 = data.users; for (id in _ref22) { u = _ref22[id]; if (u.getUser().username === name) { u.updateActivity(); API.sendChat('@' + u.getUser().username + '\'s AFK time has been reset.'); return; } } API.sendChat('Not sure who ' + name + ' is'); } else { API.sendChat('Yo Gimme a name r-tard'); } }; return resetAfkCommand; })(Command); forceSkipCommand = (function(_super) { __extends(forceSkipCommand, _super); function forceSkipCommand() { _ref22 = forceSkipCommand.__super__.constructor.apply(this, arguments); return _ref22; } forceSkipCommand.prototype.init = function() { this.command = '!forceskip'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; forceSkipCommand.prototype.functionality = function() { var msg, param; msg = this.msgData.message; if (msg.length > 11) { param = msg.substr(11); if (param === 'enable') { data.forceSkip = true; return API.sendChat("Forced skipping enabled."); } else if (param === 'disable') { data.forceSkip = false; return API.sendChat("Forced skipping disabled."); } } }; return forceSkipCommand; })(Command); overplayedCommand = (function(_super) { __extends(overplayedCommand, _super); function overplayedCommand() { _ref23 = overplayedCommand.__super__.constructor.apply(this, arguments); return _ref23; } overplayedCommand.prototype.init = function() { this.command = '!overplayed'; this.parseType = 'exact'; return this.rankPrivelege = 'user'; }; overplayedCommand.prototype.functionality = function() { return API.sendChat("View the list of songs we consider overplayed and suggest additions at http://den.johnback.us/overplayed_tracks"); }; return overplayedCommand; })(Command); uservoiceCommand = (function(_super) { __extends(uservoiceCommand, _super); function uservoiceCommand() { _ref24 = uservoiceCommand.__super__.constructor.apply(this, arguments); return _ref24; } uservoiceCommand.prototype.init = function() { this.command = ['/uservoice', '/idea']; this.parseType = 'exact'; return this.rankPrivelege = 'user'; }; uservoiceCommand.prototype.functionality = function() { var msg; msg = 'Have an idea for the room, our bot, or an event? Awesome! Submit it to our uservoice and we\'ll get started on it: http://is.gd/IzP4bA'; msg += ' (please don\'t ask for mod)'; return API.sendChat(msg); }; return uservoiceCommand; })(Command); skipCommand = (function(_super) { __extends(skipCommand, _super); function skipCommand() { _ref25 = skipCommand.__super__.constructor.apply(this, arguments); return _ref25; } skipCommand.prototype.init = function() { this.command = '!skip'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; skipCommand.prototype.functionality = function() { return API.moderateForceSkip(); }; return skipCommand; })(Command); whyMehCommand = (function(_super) { __extends(whyMehCommand, _super); function whyMehCommand() { _ref26 = whyMehCommand.__super__.constructor.apply(this, arguments); return _ref26; } whyMehCommand.prototype.init = function() { this.command = '!whymeh'; this.parseType = 'exact'; return this.rankPrivelege = 'user'; }; whyMehCommand.prototype.functionality = function() { var msg; msg = "Reserve Mehs for songs that are a) extremely overplayed b) off genre c) absolutely god awful or d) troll songs. "; msg += "If you simply aren't feeling a song, then remain neutral"; return API.sendChat(msg); }; return whyMehCommand; })(Command); commandsCommand = (function(_super) { __extends(commandsCommand, _super); function commandsCommand() { _ref27 = commandsCommand.__super__.constructor.apply(this, arguments); return _ref27; } commandsCommand.prototype.init = function() { this.command = '!commands'; this.parseType = 'exact'; return this.rankPrivelege = 'user'; }; commandsCommand.prototype.functionality = function() { var allowedUserLevels, c, cc, cmd, msg, user, _i, _j, _len, _len1, _ref28, _ref29; allowedUserLevels = []; user = API.getUser(this.msgData.fromID); window.capturedUser = user; if (user.permission > 5) { allowedUserLevels = ['user', 'mod', 'host']; } else if (user.permission > 2) { allowedUserLevels = ['user', 'mod']; } else { allowedUserLevels = ['user']; } msg = ''; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(''); if (_ref28 = c.rankPrivelege, __indexOf.call(allowedUserLevels, _ref28) >= 0) { if (typeof c.command === "string") { msg += c.command + ', '; } else if (typeof c.command === "object") { _ref29 = c.command; for (_j = 0, _len1 = _ref29.length; _j < _len1; _j++) { cc = _ref29[_j]; msg += cc + ', '; } } } } msg = msg.substring(0, msg.length - 2); return API.sendChat(msg); }; return commandsCommand; })(Command); disconnectLookupCommand = (function(_super) { __extends(disconnectLookupCommand, _super); function disconnectLookupCommand() { _ref28 = disconnectLookupCommand.__super__.constructor.apply(this, arguments); return _ref28; } disconnectLookupCommand.prototype.init = function() { this.command = '!dclookup'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; disconnectLookupCommand.prototype.functionality = function() { var cmd, dcHour, dcLookupId, dcMeridian, dcMins, dcSongsAgo, dcTimeStr, dcUser, disconnectInstances, givenName, id, recentDisconnect, resp, u, _i, _len, _ref29, _ref30; cmd = this.msgData.message; if (cmd.length > 11) { givenName = cmd.slice(11); _ref29 = data.users; for (id in _ref29) { u = _ref29[id]; if (u.getUser().username === givenName) { dcLookupId = id; disconnectInstances = []; _ref30 = data.userDisconnectLog; for (_i = 0, _len = _ref30.length; _i < _len; _i++) { dcUser = _ref30[_i]; if (dcUser.id === dcLookupId) { disconnectInstances.push(dcUser); } } if (disconnectInstances.length > 0) { resp = u.getUser().username + ' has disconnected ' + disconnectInstances.length.toString() + ' time'; if (disconnectInstances.length === 1) { resp += '. '; } else { resp += 's. '; } recentDisconnect = disconnectInstances.pop(); dcHour = recentDisconnect.time.getHours(); dcMins = recentDisconnect.time.getMinutes(); if (dcMins < 10) { dcMins = '0' + dcMins.toString(); } dcMeridian = dcHour % 12 === dcHour ? 'AM' : 'PM'; dcTimeStr = '' + dcHour + ':' + dcMins + ' ' + dcMeridian; dcSongsAgo = data.songCount - recentDisconnect.songCount; resp += 'Their most recent disconnect was at ' + dcTimeStr + ' (' + dcSongsAgo + ' songs ago). '; if (recentDisconnect.waitlistPosition !== void 0) { resp += 'They were ' + recentDisconnect.waitlistPosition + ' song'; if (recentDisconnect.waitlistPosition > 1) { resp += 's'; } resp += ' away from the DJ booth.'; } else { resp += 'They were not on the waitlist.'; } API.sendChat(resp); return; } else { API.sendChat("I haven't seen " + u.getUser().username + " disconnect."); return; } } } return API.sendChat("I don't see a user in the room named '" + givenName + "'."); } }; return disconnectLookupCommand; })(Command); voteRatioCommand = (function(_super) { __extends(voteRatioCommand, _super); function voteRatioCommand() { _ref29 = voteRatioCommand.__super__.constructor.apply(this, arguments); return _ref29; } voteRatioCommand.prototype.init = function() { this.command = '!voteratio'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; voteRatioCommand.prototype.functionality = function() { var msg, name, r, u, votes; r = new RoomHelper(); msg = this.msgData.message; if (msg.length > 12) { name = msg.substr(12); u = r.lookupUser(name); if (u !== false) { votes = r.userVoteRatio(u); msg = u.username + " has wooted " + votes['woot'].toString() + " time"; if (votes['woot'] === 1) { msg += ', '; } else { msg += 's, '; } msg += "and meh'd " + votes['meh'].toString() + " time"; if (votes['meh'] === 1) { msg += '. '; } else { msg += 's. '; } msg += "Their woot:vote ratio is " + votes['positiveRatio'].toString() + "."; return API.sendChat(msg); } else { return API.sendChat("I don't recognize a user named '" + name + "'"); } } else { return API.sendChat("I'm not sure what you want from me..."); } }; return voteRatioCommand; })(Command); avgVoteRatioCommand = (function(_super) { __extends(avgVoteRatioCommand, _super); function avgVoteRatioCommand() { _ref30 = avgVoteRatioCommand.__super__.constructor.apply(this, arguments); return _ref30; } avgVoteRatioCommand.prototype.init = function() { this.command = '!avgvoteratio'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; avgVoteRatioCommand.prototype.functionality = function() { var averageRatio, msg, r, ratio, roomRatios, uid, user, userRatio, votes, _i, _len, _ref31; roomRatios = []; r = new RoomHelper(); _ref31 = data.voteLog; for (uid in _ref31) { votes = _ref31[uid]; user = data.users[uid].getUser(); userRatio = r.userVoteRatio(user); roomRatios.push(userRatio['positiveRatio']); } averageRatio = 0.0; for (_i = 0, _len = roomRatios.length; _i < _len; _i++) { ratio = roomRatios[_i]; averageRatio += ratio; } averageRatio = averageRatio / roomRatios.length; msg = "Accounting for " + roomRatios.length.toString() + " user ratios, the average room ratio is " + averageRatio.toFixed(2).toString() + "."; return API.sendChat(msg); }; return avgVoteRatioCommand; })(Command); cmds = [cookieCommand, newSongsCommand, whyWootCommand, themeCommand, rulesCommand, roomHelpCommand, sourceCommand, wootCommand, badQualityCommand, downloadCommand, afksCommand, allAfksCommand, statusCommand, unhookCommand, dieCommand, reloadCommand, lockCommand, unlockCommand, swapCommand, popCommand, pushCommand, overplayedCommand, uservoiceCommand, whyMehCommand, skipCommand, commandsCommand, resetAfkCommand, forceSkipCommand, disconnectLookupCommand, voteRatioCommand, avgVoteRatioCommand]; chatCommandDispatcher = function(chat) { var c, cmd, _i, _len, _results; chatUniversals(chat); _results = []; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(chat); if (c.evalMsg()) { break; } else { _results.push(void 0); } } return _results; }; updateVotes = function(obj) { data.currentwoots = obj.positive; data.currentmehs = obj.negative; return data.currentcurates = obj.curates; }; announceCurate = function(obj) { return API.sendChat("/em: " + obj.user.username + " loves this song!"); }; handleUserJoin = function(user) { data.userJoin(user); data.users[user.id].updateActivity(); return API.sendChat("/em: " + user.username + " has joined the Room!"); }; handleNewSong = function(obj) { var songId; data.intervalMessages(); if (data.currentsong === null) { data.newSong(); } else { API.sendChat("/em: Just played " + data.currentsong.title + " by " + data.currentsong.author + ". Stats: Woots: " + data.currentwoots + ", Mehs: " + data.currentmehs + ", Loves: " + data.currentcurates + "."); data.newSong(); document.getElementById("button-vote-positive").click(); } if (data.forceSkip) { songId = obj.media.id; return setTimeout(function() { var cMedia; cMedia = API.getMedia(); if (cMedia.id === songId) { return API.moderateForceSkip(); } }, obj.media.duration * 1000); } }; handleVote = function(obj) { data.users[obj.user.id].updateActivity(); return data.users[obj.user.id].updateVote(obj.vote); }; handleUserLeave = function(user) { var disconnectStats, i, u, _i, _len, _ref31; disconnectStats = { id: user.id, time: new Date(), songCount: data.songCount }; i = 0; _ref31 = data.internalWaitlist; for (_i = 0, _len = _ref31.length; _i < _len; _i++) { u = _ref31[_i]; if (u.id === user.id) { disconnectStats['waitlistPosition'] = i - 1; data.setInternalWaitlist(); break; } else { i++; } } data.userDisconnectLog.push(disconnectStats); return data.users[user.id].inRoom(false); }; antispam = function(chat) { var plugRoomLinkPatt, sender; plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; if (plugRoomLinkPatt.exec(chat.message)) { sender = API.getUser(chat.fromID); if (!sender.ambassador && !sender.moderator && !sender.owner && !sender.superuser) { if (!data.users[chat.fromID]["protected"]) { API.sendChat("Don't spam room links you ass clown"); return API.moderateDeleteChat(chat.chatID); } else { return API.sendChat("I'm supposed to kick you, but you're just too darn pretty."); } } } }; beggar = function(chat) { var msg, r, responses; msg = chat.message.toLowerCase(); responses = ["Good idea @{beggar}! Don't earn your fans or anything thats so yesterday", "Guys @{beggar} asked us to fan him! Lets all totally do it! ಠ_ಠ", "srsly @{beggar}? ಠ_ಠ", "@{beggar}. Earning his fans the good old fashioned way. Hard work and elbow grease. A true american."]; r = Math.floor(Math.random() * responses.length); if (msg.indexOf('fan me') !== -1 || msg.indexOf('fan for fan') !== -1 || msg.indexOf('fan pls') !== -1 || msg.indexOf('fan4fan') !== -1 || msg.indexOf('add me to fan') !== -1) { return API.sendChat(responses[r].replace("{beggar}", chat.from)); } }; chatUniversals = function(chat) { data.activity(chat); antispam(chat); return beggar(chat); }; hook = function(apiEvent, callback) { return API.on(apiEvent, callback); }; unhook = function(apiEvent, callback) { return API.off(apiEvent, callback); }; apiHooks = [ { 'event': API.ROOM_SCORE_UPDATE, 'callback': updateVotes }, { 'event': API.CURATE_UPDATE, 'callback': announceCurate }, { 'event': API.USER_JOIN, 'callback': handleUserJoin }, { 'event': API.DJ_ADVANCE, 'callback': handleNewSong }, { 'event': API.VOTE_UPDATE, 'callback': handleVote }, { 'event': API.CHAT, 'callback': chatCommandDispatcher }, { 'event': API.USER_LEAVE, 'callback': handleUserLeave } ]; initHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(hook(pair['event'], pair['callback'])); } return _results; }; undoHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(unhook(pair['event'], pair['callback'])); } return _results; }; initialize(); }).call(this);
Rildson
// Generated by CoffeeScript 1.6.3 (function() { var Command, RoomHelper, User, addCommand, afkCheck, afksCommand, allAfksCommand, announceCurate, antispam, apiHooks, avgVoteRatioCommand, badQualityCommand, beggar, chatCommandDispatcher, chatUniversals, cmds, commandsCommand, cookieCommand, data, dieCommand, disconnectLookupCommand, downloadCommand, forceSkipCommand, handleNewSong, handleUserJoin, handleUserLeave, handleVote, hook, initEnvironment, initHooks, initialize, lockCommand, lockskipCommand, msToStr, newSongsCommand, overplayedCommand, popCommand, populateUserData, pupOnline, pushCommand, reloadCommand, resetAfkCommand, roomHelpCommand, rulesCommand, settings, skipCommand, staffCommand, sourceCommand, statusCommand, swapCommand, themeCommand, undoHooks, unhook, unhookCommand, unlockCommand, updateVotes, uservoiceCommand, voteRatioCommand, whyMehCommand, whyWootCommand, wootCommand, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref3, _ref30, _ref32, ref33, _ref34, ref35, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; settings = (function() { function settings() { this.implode = __bind(this.implode, this); this.intervalMessages = __bind(this.intervalMessages, this); this.startAfkInterval = __bind(this.startAfkInterval, this); this.setInternalWaitlist = __bind(this.setInternalWaitlist, this); this.userJoin = __bind(this.userJoin, this); this.getRoomUrlPath = __bind(this.getRoomUrlPath, this); this.startup = __bind(this.startup, this); } settings.prototype.currentsong = {}; settings.prototype.users = {}; settings.prototype.djs = []; settings.prototype.mods = []; settings.prototype.host = []; settings.prototype.hasWarned = false; settings.prototype.currentwoots = 0; settings.prototype.currentmehs = 0; settings.prototype.currentcurates = 0; settings.prototype.roomUrlPath = null; settings.prototype.internalWaitlist = []; settings.prototype.userDisconnectLog = []; settings.prototype.voteLog = {}; settings.prototype.seshOn = false; settings.prototype.forceSkip = false; settings.prototype.seshMembers = []; settings.prototype.launchTime = null; settings.prototype.totalVotingData = { woots: 0, mehs: 0, curates: 0 }; settings.prototype.pupScriptUrl = 'https://raw.github.com/Brutos/chatbotvm/master/.gitignore'; settings.prototype.afkTime = 15 * 60 * 1000; settings.prototype.songIntervalMessages = [ { interval: 7, offset: 0, msg: "/em: Mantenha-se sempre votando, se não será removido da lista de espera e da cabine de DJ." },{ interval: 5, offset: 0, msg: "/em: Make sure that you're voting or you will be removed from the wait list and from the DJ Booth." },{ interval: 12, offset: 0, msg: "/em: Curte musica eletrônica? Estar na sala cerat , bem vindo ;)" } ]; settings.prototype.songCount = 0; settings.prototype.startup = function() { this.launchTime = new Date(); return this.roomUrlPath = this.getRoomUrlPath(); }; settings.prototype.getRoomUrlPath = function() { return window.location.pathname.replace(/\//g, ''); }; settings.prototype.newSong = function() { this.totalVotingData.woots += this.currentwoots; this.totalVotingData.mehs += this.currentmehs; this.totalVotingData.curates += this.currentcurates; this.setInternalWaitlist(); this.currentsong = API.getMedia(); if (this.currentsong !== null) { return this.currentsong; } else { return false; } }; settings.prototype.userJoin = function(u) { var userIds, _ref; userIds = Object.keys(this.users); if (_ref = u.id, __indexOf.call(userIds, _ref) >= 0) { return this.users[u.id].inRoom(true); } else { this.users[u.id] = new User(u); return this.voteLog[u.id] = {}; } }; settings.prototype.setInternalWaitlist = function() { var boothWaitlist, fullWaitList, lineWaitList; boothWaitlist = API.getDJs().slice(1); lineWaitList = API.getWaitList(); fullWaitList = boothWaitlist.concat(lineWaitList); return this.internalWaitlist = fullWaitList; }; settings.prototype.activity = function(obj) { if (obj.type === 'message') { return this.users[obj.fromID].updateActivity(); } }; settings.prototype.startAfkInterval = function() { return this.afkInterval = setInterval(afkCheck, 2000); }; settings.prototype.intervalMessages = function() { var msg, _i, _len, _ref, _results; this.songCount++; _ref = this.songIntervalMessages; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { msg = _ref[_i]; if (((this.songCount + msg['offset']) % msg['interval']) === 0) { _results.push(API.sendChat(msg['msg'])); } else { _results.push(void 0); } } return _results; }; settings.prototype.implode = function() { var item, val; for (item in this) { val = this[item]; if (typeof this[item] === 'object') { delete this[item]; } } return clearInterval(this.afkInterval); }; settings.prototype.lockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": true, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; settings.prototype.unlockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": false, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; return settings; })(); data = new settings(); User = (function() { User.prototype.afkWarningCount = 0; User.prototype.lastWarning = null; User.prototype["protected"] = false; User.prototype.isInRoom = true; function User(user) { this.user = user; this.updateVote = __bind(this.updateVote, this); this.inRoom = __bind(this.inRoom, this); this.notDj = __bind(this.notDj, this); this.warn = __bind(this.warn, this); this.getIsDj = __bind(this.getIsDj, this); this.getWarningCount = __bind(this.getWarningCount, this); this.getUser = __bind(this.getUser, this); this.getLastWarning = __bind(this.getLastWarning, this); this.getLastActivity = __bind(this.getLastActivity, this); this.updateActivity = __bind(this.updateActivity, this); this.init = __bind(this.init, this); this.init(); } User.prototype.init = function() { return this.lastActivity = new Date(); }; User.prototype.updateActivity = function() { this.lastActivity = new Date(); this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.getLastActivity = function() { return this.lastActivity; }; User.prototype.getLastWarning = function() { if (this.lastWarning === null) { return false; } else { return this.lastWarning; } }; User.prototype.getUser = function() { return this.user; }; User.prototype.getWarningCount = function() { return this.afkWarningCount; }; User.prototype.getIsDj = function() { var DJs, dj, _i, _len; DJs = API.getDJs(); for (_i = 0, _len = DJs.length; _i < _len; _i++) { dj = DJs[_i]; if (this.user.id === dj.id) { return true; } } return false; }; User.prototype.warn = function() { this.afkWarningCount++; return this.lastWarning = new Date(); }; User.prototype.notDj = function() { this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.inRoom = function(online) { return this.isInRoom = online; }; User.prototype.updateVote = function(v) { if (this.isInRoom) { return data.voteLog[this.user.id][data.currentsong.id] = v; } }; return User; })(); RoomHelper = (function() { function RoomHelper() {} RoomHelper.prototype.lookupUser = function(username) { var id, u, _ref; _ref = data.users; for (id in _ref) { u = _ref[id]; if (u.getUser().username === username) { return u.getUser(); } } return false; }; RoomHelper.prototype.userVoteRatio = function(user) { var songId, songVotes, vote, votes; songVotes = data.voteLog[user.id]; votes = { 'woot': 0, 'meh': 0 }; for (songId in songVotes) { vote = songVotes[songId]; if (vote === 1) { votes['woot']++; } else if (vote === -1) { votes['meh']++; } } votes['positiveRatio'] = (votes['woot'] / (votes['woot'] + votes['meh'])).toFixed(2); return votes; }; return RoomHelper; })(); pupOnline = function() { return API.sendChat("/me: Não deu pra chamar o patati nem o patata , então chora por que o bot chego"); }; populateUserData = function() { var u, users, _i, _len; users = API.getUsers(); for (_i = 0, _len = users.length; _i < _len; _i++) { u = users[_i]; data.users[u.id] = new User(u); data.voteLog[u.id] = {}; } }; initEnvironment = function() { document.getElementById("button-vote-positive").click(); return document.getElementById("button-sound").click(); }; initialize = function() { pupOnline(); populateUserData(); initEnvironment(); initHooks(); data.startup(); data.newSong(); return data.startAfkInterval(); }; afkCheck = function() { var DJs, id, lastActivity, lastWarned, now, oneMinute, secsLastActive, timeSinceLastActivity, timeSinceLastWarning, twoMinutes, user, warnMsg, _ref, _results; _ref = data.users; _results = []; for (id in _ref) { user = _ref[id]; now = new Date(); lastActivity = user.getLastActivity(); timeSinceLastActivity = now.getTime() - lastActivity.getTime(); if (timeSinceLastActivity > data.afkTime) { if (user.getIsDj()) { secsLastActive = timeSinceLastActivity / 1000; if (user.getWarningCount() === 0) { user.warn(); _results.push(API.sendChat("@" + user.getUser().username + ", Eu não vi você votar durante 30 minutos. Vote nos próximos 2 minutos, se não será removido.")); } else if (user.getWarningCount() === 1) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); twoMinutes = 2 * 60 * 1000; if (timeSinceLastWarning > twoMinutes) { user.warn(); warnMsg = "@" + user.getUser().username; warnMsg += ", Eu não vi você votar durante 32 minutos. Vote no próximo minuto ou eu o removerei, este é seu ultimo aviso."; _results.push(API.sendChat(warnMsg)); } else { _results.push(void 0); } } else if (user.getWarningCount() === 2) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); oneMinute = 1 * 60 * 1000; if (timeSinceLastWarning > oneMinute) { DJs = API.getDJs(); if (DJs.length > 0 && DJs[0].id !== user.getUser().id) { API.sendChat("@" + user.getUser().username + ", Você teve 2 avisos. Por favor, mantenha-se sempre votando."); API.moderateRemoveDJ(id); _results.push(user.warn()); } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(user.notDj()); } } else { _results.push(void 0); } } return _results; }; msToStr = function(msTime) { var ms, msg, timeAway; msg = ''; timeAway = { 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 0 }; ms = { 'day': 24 * 60 * 60 * 1000, 'hour': 60 * 60 * 1000, 'minute': 60 * 1000, 'second': 1000 }; if (msTime > ms['day']) { timeAway['days'] = Math.floor(msTime / ms['day']); msTime = msTime % ms['day']; } if (msTime > ms['hour']) { timeAway['hours'] = Math.floor(msTime / ms['hour']); msTime = msTime % ms['hour']; } if (msTime > ms['minute']) { timeAway['minutes'] = Math.floor(msTime / ms['minute']); msTime = msTime % ms['minute']; } if (msTime > ms['second']) { timeAway['seconds'] = Math.floor(msTime / ms['second']); } if (timeAway['days'] !== 0) { msg += timeAway['days'].toString() + 'd'; } if (timeAway['hours'] !== 0) { msg += timeAway['hours'].toString() + 'h'; } if (timeAway['minutes'] !== 0) { msg += timeAway['minutes'].toString() + 'm'; } if (timeAway['seconds'] !== 0) { msg += timeAway['seconds'].toString() + 's'; } if (msg !== '') { return msg; } else { return false; } }; Command = (function() { function Command(msgData) { this.msgData = msgData; this.init(); } Command.prototype.init = function() { this.parseType = null; this.command = null; return this.rankPrivelege = null; }; Command.prototype.functionality = function(data) {}; Command.prototype.hasPrivelege = function() { var user; user = data.users[this.msgData.fromID].getUser(); switch (this.rankPrivelege) { case 'host': return user.permission === 5; case 'cohost': return user.permission >= 4; case 'mod': return user.permission >= 3; case 'manager': return user.permission >= 3; case 'bouncer': return user.permission >= 2; case 'featured': return user.permission >= 1; default: return true; } }; Command.prototype.commandMatch = function() { var command, msg, _i, _len, _ref; msg = this.msgData.message; if (typeof this.command === 'string') { if (this.parseType === 'exact') { if (msg === this.command) { return true; } else { return false; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, this.command.length) === this.command) { return true; } else { return false; } } else if (this.parseType === 'contains') { if (msg.indexOf(this.command) !== -1) { return true; } else { return false; } } } else if (typeof this.command === 'object') { _ref = this.command; for (_i = 0, _len = _ref.length; _i < _len; _i++) { command = _ref[_i]; if (this.parseType === 'exact') { if (msg === command) { return true; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, command.length) === command) { return true; } } else if (this.parseType === 'contains') { if (msg.indexOf(command) !== -1) { return true; } } } return false; } }; Command.prototype.evalMsg = function() { if (this.commandMatch() && this.hasPrivelege()) { this.functionality(); return true; } else { return false; } }; return Command; })(); cookieCommand = (function(_super) { __extends(cookieCommand, _super); function cookieCommand() { _ref = cookieCommand.__super__.constructor.apply(this, arguments); return _ref; } cookieCommand.prototype.init = function() { this.command = 'cookie'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; cookieCommand.prototype.getCookie = function() { var c, cookies; cookies = ["muita aveia", "um cafesinho", "um toddynho", "um copo de coca-cola", "uma dose de Ipioca", "limões", "um danoninho", "um cafe extra forte", "maçãs", "bananas", "um brinquedinho", "amendoins", "muita aveia"]; c = Math.floor(Math.random() * cookies.length); return cookies[c]; }; cookieCommand.prototype.functionality = function() { var msg, r, user; msg = this.msgData.message; r = new RoomHelper(); if (msg.substring(7, 8) === "@") { user = r.lookupUser(msg.substr(8)); if (user === false) { API.sendChat("/em: não encontrei ' " + msg.substr(8) + "' na sala. Então, sobra mais pra mim! d(>_<)b "); return false; } else { return API.sendChat("/em: @" + user.username + ", @" + this.msgData.from + " o recompensou com " + this.getCookie() + ". Aproveite!"); } } }; return cookieCommand; })(Command); newSongsCommand = (function(_super) { __extends(newSongsCommand, _super); function newSongsCommand() { _ref1 = newSongsCommand.__super__.constructor.apply(this, arguments); return _ref1; } newSongsCommand.prototype.init = function() { this.command = '!musicanova'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newSongsCommand.prototype.functionality = function() { var arts, cMedia, chans, chooseRandom, mChans, msg, selections, u, _ref2; mChans = this.memberChannels.slice(0); chans = this.channels.slice(0); arts = this.artists.slice(0); chooseRandom = function(list) { var l, r; l = list.length; r = Math.floor(Math.random() * l); return list.splice(r, 1); }; selections = { channels: [], artist: '' }; u = data.users[this.msgData.fromID].getUser().username; if (u.indexOf("MistaDubstep") !== -1) { selections['channels'].push('MistaDubstep'); } else if (u.indexOf("Underground Promotions") !== -1) { selections['channels'].push('UndergroundDubstep'); } else { selections['channels'].push(chooseRandom(mChans)); } selections['channels'].push(chooseRandom(chans)); selections['channels'].push(chooseRandom(chans)); cMedia = API.getMedia(); if ((cMedia != null) && (_ref2 = cMedia.author, __indexOf.call(arts, _ref2) >= 0)) { selections['artist'] = cMedia.author; } else { selections['artist'] = chooseRandom(arts); } msg = "Todo mundo já ouviu aquela musica do " + selections['artist'] + " obtenha novas musicas em http://youtube.com/" + selections['channels'][0] + " http://youtube.com/" + selections['channels'][1] + " ou http://youtube.com/" + selections['channels'][2]; return API.sendChat(msg); }; newSongsCommand.prototype.memberChannels = ["JitterStep", "MistaDubstep", "DubStationPromotions", "UndergroundDubstep",, "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.channels = ["UltraRecords", "kontor", "SpinninRec", "PandoraMuslc", "ITacMusic", "Liquicity", "FunkyyPanda", "BassRape", "WobbleCraftDubz", "UKFdubstep", "DropThatBassline", "VitalDubstep", "AirwaveDubstepTV", "EpicNetworkMusic", "NoOffenseDubstep", "InspectorDubplate", "ReptileDubstep", "MrMoMDubstep", "FrixionNetwork", "IcyDubstep", "DubstepWeed", "VhileMusic", "LessThan3Dubstep", "PleaseMindTheDUBstep", "ClownDubstep", "TheULTRADUBSTEP", "DuBM0nkeyz", "DubNationUK", "TehDubstepChannel", "BassDropMedia", "USdubstep", "UNITEDubstep"]; newSongsCommand.prototype.artists = ["Skrillex", "Doctor P", "Excision", "Flux Pavilion", "Knife Party", "Krewella", "Rusko", "Bassnectar", "Nero", "Deadmau5", "Borgore", "Zomboy"]; return newSongsCommand; })(Command); whyWootCommand = (function(_super) { __extends(whyWootCommand, _super); function whyWootCommand() { _ref2 = whyWootCommand.__super__.constructor.apply(this, arguments); return _ref2; } whyWootCommand.prototype.init = function() { this.command = '!up'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; whyWootCommand.prototype.functionality = function() { var msg, nameIndex; msg = "Se tu não entrar na linha, vai tomar um ban!";; if ((nameIndex = this.msgData.message.indexOf('@')) !== -1) { return API.sendChat(this.msgData.message.substr(nameIndex) + ', ' + msg); } else { return API.sendChat(msg); } }; return whyWootCommand; })(Command); themeCommand = (function(_super) { __extends(themeCommand, _super); function themeCommand() { _ref3 = themeCommand.__super__.constructor.apply(this, arguments); return _ref3; } themeCommand.prototype.init = function() { this.command = '!temas'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; themeCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "Todo tipo de musica eletronica de boa qualidade é permitida aqui. Incluindo Electro, Dubstep, Techno, Trap, EDM, "; msg1 += "Hardstyle, House e Trance. "; msg2 = "All kinds of electronic song of good quality is allowed here. Including Electro, Dubstep, Techno, Trap, EDM, "; msg2 += "Hardstyle, House and Trance. "; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return themeCommand; })(Command); rulesCommand = (function(_super) { __extends(rulesCommand, _super); function rulesCommand() { _ref4 = rulesCommand.__super__.constructor.apply(this, arguments); return _ref4; } rulesCommand.prototype.init = function() { this.command = '!regras'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; rulesCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "1) Tempo máximo 6 min e 30 seg. "; msg1 += "2) Não escrever em /me ou /em. "; msg1 += "3) Respeitar os moderadores da sala."; msg1 += "4) Sem flood no chat . "; msg1 += "5) Não fique pedindo cargos e Sem pornografia. "; msg2 = "1) Maximum time 6 minutes and 30 seconds. "; msg2 += "2) Can't write in /me or /em. "; msg2 += "3) Respect the moderators of the room. "; msg2 += "4) Without flood in the chat. "; msg2 += "5) Can't ask positions, And without porn ."; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return rulesCommand; })(Command); roomHelpCommand = (function(_super) { __extends(roomHelpCommand, _super); function roomHelpCommand() { _ref5 = roomHelpCommand.__super__.constructor.apply(this, arguments); return _ref5; } roomHelpCommand.prototype.init = function() { this.command = '!ajuda'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; roomHelpCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "Bem vindo a sala Electro, Trap e Dubstep Br! Ser DJ: Crie uma lista de reprodução e coloque Musica do Youtube ou soundcloud. "; msg1 += "Se é novo procure pelo seu nome na sua tela (próximo a cabine do DJ) e depois mude o nome. "; msg1 += "Para Ganhar Pontos clique em Bacana. "; msg2 = "Divirta-se! Qualquer outra duvida chame um adm da sala "; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return roomHelpCommand; })(Command); sourceCommand = (function(_super) { __extends(sourceCommand, _super); function sourceCommand() { _ref6 = sourceCommand.__super__.constructor.apply(this, arguments); return _ref6; } sourceCommand.prototype.init = function() { this.command = ['!autor', '!author', '!autor']; this.parseType = 'exact'; return this.rankPrivelege = 'featured'; }; sourceCommand.prototype.functionality = function() { var msg; msg = ' BOT criado por Backus e editado por !4sharεd..PrᎧ ϟ para a Electro, Trap e Dubstep Brasil '; return API.sendChat(msg); }; return sourceCommand; })(Command); wootCommand = (function(_super) { __extends(wootCommand, _super); function wootCommand() { _ref7 = wootCommand.__super__.constructor.apply(this, arguments); return _ref7; } wootCommand.prototype.init = function() { this.command = '!autowoot'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; wootCommand.prototype.functionality = function() { var msg, nameIndex; msg = "Use o auto woot para evitar remoção da cabine de DJ por não estar votando. http://migre.me/fCWA2"; if ((nameIndex = this.msgData.message.indexOf('@')) !== -1) { return API.sendChat(this.msgData.message.substr(nameIndex) + ', ' + msg); } else { return API.sendChat(msg); } }; return wootCommand; })(Command); badQualityCommand = (function(_super) { __extends(badQualityCommand, _super); function badQualityCommand() { _ref8 = badQualityCommand.__super__.constructor.apply(this, arguments); return _ref8; } badQualityCommand.prototype.init = function() { this.command = '.ruim'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; badQualityCommand.prototype.functionality = function() { var msg; msg = "Não gostei da sua musica, tente melhorar da proxima vez"; return API.sendChat(msg); }; return badQualityCommand; })(Command); downloadCommand = (function(_super) { __extends(downloadCommand, _super); function downloadCommand() { _ref9 = downloadCommand.__super__.constructor.apply(this, arguments); return _ref9; } downloadCommand.prototype.init = function() { this.command = '!dte'; this.parseType = 'exact'; return this.rankPrivelege = 'featured'; }; downloadCommand.prototype.functionality = function() { var msg; msg = " Participe do grupo e e fique por dentro de tudo "; msg += "https://www.facebook.com/groups/215513185293081/ "; msg += " "; return API.sendChat(msg); }; return downloadCommand; })(Command); afksCommand = (function(_super) { __extends(afksCommand, _super); function afksCommand() { _ref10 = afksCommand.__super__.constructor.apply(this, arguments); return _ref10; } afksCommand.prototype.init = function() { this.command = '!afks'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; afksCommand.prototype.functionality = function() { var dj, djAfk, djs, msg, now, _i, _len; msg = ''; djs = API.getDJs(); for (_i = 0, _len = djs.length; _i < _len; _i++) { dj = djs[_i]; now = new Date(); djAfk = now.getTime() - data.users[dj.id].getLastActivity().getTime(); if (djAfk > (10 * 60 * 1000)) { if (msToStr(djAfk) !== false) { msg += dj.username + ' - ' + msToStr(djAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Ninguém está AFK"); } else { return API.sendChat('AFKs: ' + msg); } }; return afksCommand; })(Command); allAfksCommand = (function(_super) { __extends(allAfksCommand, _super); function allAfksCommand() { _ref11 = allAfksCommand.__super__.constructor.apply(this, arguments); return _ref11; } allAfksCommand.prototype.init = function() { this.command = '!allafks'; this.parseType = 'exact'; return this.rankPrivelege = 'manager'; }; allAfksCommand.prototype.functionality = function() { var msg, now, u, uAfk, usrs, _i, _len; msg = ''; usrs = API.getUsers(); for (_i = 0, _len = usrs.length; _i < _len; _i++) { u = usrs[_i]; now = new Date(); uAfk = now.getTime() - data.users[u.id].getLastActivity().getTime(); if (uAfk > (30 * 60 * 1000)) { if (msToStr(uAfk) !== false) { msg += u.username + ' - ' + msToStr(uAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Ninguém está AFK"); } else { return API.sendChat('AFKs: ' + msg); } }; return allAfksCommand; })(Command); statusCommand = (function(_super) { __extends(statusCommand, _super); function statusCommand() { _ref12 = statusCommand.__super__.constructor.apply(this, arguments); return _ref12; } statusCommand.prototype.init = function() { this.command = '!status'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; statusCommand.prototype.functionality = function() { var day, hour, launch, lt, meridian, min, month, msg, t; lt = data.launchTime; month = lt.getMonth() + 1; day = lt.getDate(); hour = lt.getHours(); meridian = hour % 12 === hour ? 'AM' : 'PM'; min = lt.getMinutes(); min = min < 10 ? '0' + min : min; t = data.totalVotingData; t['songs'] = data.songCount; launch = 'Iniciado em ' + day + '/' + month + ' ' + hour + ':' + min + ' ' + meridian + '. '; msg = launch; return API.sendChat(msg); }; return statusCommand; })(Command); unhookCommand = (function(_super) { __extends(unhookCommand, _super); function unhookCommand() { _ref13 = unhookCommand.__super__.constructor.apply(this, arguments); return _ref13; } unhookCommand.prototype.init = function() { this.command = '!unhook events all()'; this.parseType = 'exact'; return this.rankPrivelege = 'host'; }; unhookCommand.prototype.functionality = function() { API.sendChat('Unhooking all events...'); return undoHooks(); }; return unhookCommand; })(Command); dieCommand = (function(_super) { __extends(dieCommand, _super); function dieCommand() { _ref14 = dieCommand.__super__.constructor.apply(this, arguments); return _ref14; } dieCommand.prototype.init = function() { this.command = '!desligar'; this.parseType = 'exact'; return this.rankPrivelege = 'cohost'; }; dieCommand.prototype.functionality = function() { API.sendChat('Como tu é burro, cara.'); undoHooks(); API.sendChat('Por que fez isso? Que loucura.'); data.implode(); return API.sendChat('Agora o chat bot está desligado'); }; return dieCommand; })(Command); reloadCommand = (function(_super) { __extends(reloadCommand, _super); function reloadCommand() { _ref15 = reloadCommand.__super__.constructor.apply(this, arguments); return _ref15; } reloadCommand.prototype.init = function() { this.command = '!reload'; this.parseType = 'exact'; return this.rankPrivelege = 'cohost'; }; reloadCommand.prototype.functionality = function() { var pupSrc; API.sendChat('Reiniciado!'); undoHooks(); pupSrc = data.pupScriptUrl; data.implode(); return $.getScript(pupSrc); }; return reloadCommand; })(Command); lockCommand = (function(_super) { __extends(lockCommand, _super); function lockCommand() { _ref16 = lockCommand.__super__.constructor.apply(this, arguments); return _ref16; } lockCommand.prototype.init = function() { this.command = '!trava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; lockCommand.prototype.functionality = function() { return data.lockBooth(); }; return lockCommand; })(Command); unlockCommand = (function(_super) { __extends(unlockCommand, _super); function unlockCommand() { _ref17 = unlockCommand.__super__.constructor.apply(this, arguments); return _ref17; } unlockCommand.prototype.init = function() { this.command = '!destrava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; unlockCommand.prototype.functionality = function() { return data.unlockBooth(); }; return unlockCommand; })(Command); removeCommand = (function(_super) { __extends(removeCommand, _super); function removeCommand() { _ref33 = removeCommand.__super__.constructor.apply(this, arguments); return _ref33; } removeCommand.prototype.init = function() { this.command = '!remove'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; removeCommand.prototype.functionality = function() { var djs, popDj; djs = API.getDJs(); popDj = djs[djs.length - 1]; return API.moderateRemoveDJ(popDj.id); }; return removeCommand; })(Command); staffCommand = (function(_super) { __extends(staffCommand, _super); function staffCommand() { _ref32 = staffCommand.__super__.constructor.apply(this, arguments); return _ref32; } staffCommand.prototype.init = function() { this.command = '!staff'; this.parseType = 'exact'; this.rankPrivelege = 'user'; return window.lastActiveStaffTime; }; staffCommand.prototype.staff = function() { var now, staff, staffAfk, stringstaff, user, _i, _len; staff = API.getStaff(); now = new Date(); stringstaff = ""; for (_i = 0, _len = staff.length; _i < _len; _i++) { user = staff[_i]; if (user.permission > 1) { staffAfk = now.getTime() - data.users[user.id].getLastActivity().getTime(); if (staffAfk < (60 * 60 * 1000)) { stringstaff += "@" + user.username + " "; } } } if (stringstaff.length === 0) { stringstaff = "Não ha ADMs ativos no momento :'("; } return stringstaff; }; staffCommand.prototype.functionality = function() { var currentTime, millisecondsPassed, thestaff; thestaff = this.staff(); currentTime = new Date(); if (!window.lastActiveStaffTime) { API.sendChat(thestaff); return window.lastActiveStaffTime = currentTime; } else { millisecondsPassed = currentTime.getTime() - window.lastActiveStaffTime.getTime(); if (millisecondsPassed > 10000) { window.lastActiveStaffTime = currentTime; return API.sendChat(thestaff); } } }; return staffCommand; })(Command); lockskipCommand = (function(_super) { __extends(lockskipCommand, _super); function lockskipCommand() { _ref34 = lockskipCommand.__super__.constructor.apply(this, arguments); return _ref34; } lockskipCommand.prototype.init = function() { this.command = '!lockskip'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; lockskipCommand.prototype.functionality = function() { return data.lockBooth(function() { return setTimeout(function() {}, API.moderateForceSkip(), setTimeout(function() { return data.unlockBooth(); }, 5000), 5000); }); }; return lockskipCommand; })(Command); addCommand = (function(_super) { __extends(addCommand, _super); function addCommand() { _ref35 = addCommand.__super__.constructor.apply(this, arguments); return _ref35; } addCommand.prototype.init = function() { this.command = '!add'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; addCommand.prototype.functionality = function() { var msg, name, r, user; msg = this.msgData.message; if (msg.length > this.command.length + 2) { name = msg.substr(this.command.length + 2); r = new RoomHelper(); user = r.lookupUser(name); if (user !== false) { API.moderateAddDJ(user.id); return setTimeout((function() { return data.unlockBooth(); }), 5000); } } }; return addCommand; })(Command); swapCommand = (function(_super) { __extends(swapCommand, _super); function swapCommand() { _ref18 = swapCommand.__super__.constructor.apply(this, arguments); return _ref18; } swapCommand.prototype.init = function() { this.command = '!swap'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; swapCommand.prototype.functionality = function() { var msg, r, swapRegex, userAdd, userRemove, users; msg = this.msgData.message; swapRegex = new RegExp("^!swap @(.+) para @(.+)$"); users = swapRegex.exec(msg).slice(1); r = new RoomHelper(); if (users.length === 2) { userRemove = r.lookupUser(users[0]); userAdd = r.lookupUser(users[1]); if (userRemove === false || userAdd === false) { API.sendChat('Ha algum erro'); return false; } else { return data.lockBooth(function() { API.moderateRemoveDJ(userRemove.id); API.sendChat("Removendo " + userRemove.username + "..."); return setTimeout(function() { API.moderateAddDJ(userAdd.id); API.sendChat("Adicionando " + userAdd.username + "..."); return setTimeout(function() { return data.unlockBooth(); }, 1500); }, 1500); }); } } else { return API.sendChat("Tire o espaço entre os nomes e coloque \'para\'"); } }; return swapCommand; })(Command); popCommand = (function(_super) { __extends(popCommand, _super); function popCommand() { _ref19 = popCommand.__super__.constructor.apply(this, arguments); return _ref19; } popCommand.prototype.init = function() { this.command = '!pop'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; popCommand.prototype.functionality = function() { var djs, popDj; djs = API.getDJs(); popDj = djs[djs.length - 1]; return API.moderateRemoveDJ(popDj.id); }; return popCommand; })(Command); pushCommand = (function(_super) { __extends(pushCommand, _super); function pushCommand() { _ref20 = pushCommand.__super__.constructor.apply(this, arguments); return _ref20; } pushCommand.prototype.init = function() { this.command = '!push'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; pushCommand.prototype.functionality = function() { var msg, name, r, user; msg = this.msgData.message; if (msg.length > this.command.length + 2) { name = msg.substr(this.command.length + 2); r = new RoomHelper(); user = r.lookupUser(name); if (user !== false) { return API.moderateAddDJ(user.id); } } }; return pushCommand; })(Command); resetAfkCommand = (function(_super) { __extends(resetAfkCommand, _super); function resetAfkCommand() { _ref21 = resetAfkCommand.__super__.constructor.apply(this, arguments); return _ref21; } resetAfkCommand.prototype.init = function() { this.command = '!resetafk'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; resetAfkCommand.prototype.functionality = function() { var id, name, u, _ref22; if (this.msgData.message.length > 10) { name = this.msgData.message.substring(11); _ref22 = data.users; for (id in _ref22) { u = _ref22[id]; if (u.getUser().username === name) { u.updateActivity(); API.sendChat('@' + u.getUser().username + ' seu tempo AFK foi reiniciado.'); return; } } API.sendChat('' + name + ' Não pode ser encontrado'); } else { API.sendChat('Mas, wat?'); } }; return resetAfkCommand; })(Command); forceSkipCommand = (function(_super) { __extends(forceSkipCommand, _super); function forceSkipCommand() { _ref22 = forceSkipCommand.__super__.constructor.apply(this, arguments); return _ref22; } forceSkipCommand.prototype.init = function() { this.command = '!forceskip'; this.parseType = 'startsWith'; return this.rankPrivelege = 'cohost'; }; forceSkipCommand.prototype.functionality = function() { var msg, param; msg = this.msgData.message; if (msg.length > 11) { param = msg.substr(11); if (param === 'Ativar') { data.forceSkip = true; return API.sendChat("Pulo forçado ativado."); } else if (param === 'Desativar') { data.forceSkip = false; return API.sendChat("Pulo forçado desativado."); } } }; return forceSkipCommand; })(Command); overplayedCommand = (function(_super) { __extends(overplayedCommand, _super); function overplayedCommand() { _ref23 = overplayedCommand.__super__.constructor.apply(this, arguments); return _ref23; } overplayedCommand.prototype.init = function() { this.command = '!overplayed'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; overplayedCommand.prototype.functionality = function() { return API.sendCha("Acho que não, em?"); }; return overplayedCommand; })(Command); uservoiceCommand = (function(_super) { __extends(uservoiceCommand, _super); function uservoiceCommand() { _ref24 = uservoiceCommand.__super__.constructor.apply(this, arguments); return _ref24; } uservoiceCommand.prototype.init = function() { this.command = ['/uservoice()', '/idea()']; this.parseType = 'exact'; return this.rankPrivelege = 'cohost'; }; uservoiceCommand.prototype.functionality = function() { var msg; msg = 'Have an idea for the room, our bot, or an event? Awesome! Submit it to our uservoice and we\'ll get started on it: http://is.gd/IzP4bA'; msg += ' (please don\'t ask for mod)'; return API.sendChat(msg); }; return uservoiceCommand; })(Command); skipCommand = (function(_super) { __extends(skipCommand, _super); function skipCommand() { _ref25 = skipCommand.__super__.constructor.apply(this, arguments); return _ref25; } skipCommand.prototype.init = function() { this.command = '!pula'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; skipCommand.prototype.functionality = function() { return API.moderateForceSkip(); }; return skipCommand; })(Command); whyMehCommand = (function(_super) { __extends(whyMehCommand, _super); function whyMehCommand() { _ref26 = whyMehCommand.__super__.constructor.apply(this, arguments); return _ref26; } whyMehCommand.prototype.init = function() { this.command = '!cotas'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; whyMehCommand.prototype.functionality = function() { var msg; msg = "/em acaba de ativar o modo cotas! "; msg += "Roubou sua vaga na faculdade, suas mulheres e sua vez na cabine de DJ"; return API.sendChat(msg); }; return whyMehCommand; })(Command); commandsCommand = (function(_super) { __extends(commandsCommand, _super); function commandsCommand() { _ref27 = commandsCommand.__super__.constructor.apply(this, arguments); return _ref27; } commandsCommand.prototype.init = function() { this.command = '!commands'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; commandsCommand.prototype.functionality = function() { var allowedUserLevels, c, cc, cmd, msg, user, _i, _j, _len, _len1, _ref28, _ref29; allowedUserLevels = []; user = API.getUser(this.msgData.fromID); window.capturedUser = user; if (user.permission > 5) { allowedUserLevels = ['user', 'mod', 'host']; } else if (user.permission > 2) { allowedUserLevels = ['user', 'mod']; } else { allowedUserLevels = ['user']; } msg = ''; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(''); if (_ref28 = c.rankPrivelege, __indexOf.call(allowedUserLevels, _ref28) >= 0) { if (typeof c.command === "string") { msg += c.command + ', '; } else if (typeof c.command === "object") { _ref29 = c.command; for (_j = 0, _len1 = _ref29.length; _j < _len1; _j++) { cc = _ref29[_j]; msg += cc + ', '; } } } } msg = msg.substring(0, msg.length - 2); return API.sendChat(msg); }; return commandsCommand; })(Command); disconnectLookupCommand = (function(_super) { __extends(disconnectLookupCommand, _super); function disconnectLookupCommand() { _ref28 = disconnectLookupCommand.__super__.constructor.apply(this, arguments); return _ref28; } disconnectLookupCommand.prototype.init = function() { this.command = '!dcmembros'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; disconnectLookupCommand.prototype.functionality = function() { var cmd, dcHour, dcLookupId, dcMeridian, dcMins, dcSongsAgo, dcTimeStr, dcUser, disconnectInstances, givenName, id, recentDisconnect, resp, u, _i, _len, _ref29, _ref30; cmd = this.msgData.message; if (cmd.length > 11) { givenName = cmd.slice(11); _ref29 = data.users; for (id in _ref29) { u = _ref29[id]; if (u.getUser().username === givenName) { dcLookupId = id; disconnectInstances = []; _ref30 = data.userDisconnectLog; for (_i = 0, _len = _ref30.length; _i < _len; _i++) { dcUser = _ref30[_i]; if (dcUser.id === dcLookupId) { disconnectInstances.push(dcUser); } } if (disconnectInstances.length > 0) { resp = u.getUser().username + ' desconectou ' + disconnectInstances.length.toString() + ' vez'; if (disconnectInstances.length === 1) { resp += '. '; } else { resp += 'es. '; } recentDisconnect = disconnectInstances.pop(); dcHour = recentDisconnect.time.getHours(); dcMins = recentDisconnect.time.getMinutes(); if (dcMins < 10) { dcMins = '0' + dcMins.toString(); } dcMeridian = dcHour % 12 === dcHour ? 'AM' : 'PM'; dcTimeStr = '' + dcHour + ':' + dcMins + ' ' + dcMeridian; dcSongsAgo = data.songCount - recentDisconnect.songCount; resp += 'Sua desconexão mais recente foi as ' + dcTimeStr + ' (' + dcSongsAgo + ' músicas atras). '; if (recentDisconnect.waitlistPosition !== void 0) { resp += 'Ele estava ' + recentDisconnect.waitlistPosition + ' músicas'; if (recentDisconnect.waitlistPosition > 1) { resp += ''; } resp += ' antes da cabine de DJ.'; } else { resp += 'Ele não estava na cabine de dj ou na lista de espera.'; } API.sendChat(resp); return; } else { API.sendChat("" + u.getUser().username + " não desconectou."); return; } } } return API.sendChat("'Este nome " + givenName + " não pode ser encontrado'."); } }; return disconnectLookupCommand; })(Command); voteRatioCommand = (function(_super) { __extends(voteRatioCommand, _super); function voteRatioCommand() { _ref29 = voteRatioCommand.__super__.constructor.apply(this, arguments); return _ref29; } voteRatioCommand.prototype.init = function() { this.command = '!voteratio'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; voteRatioCommand.prototype.functionality = function() { var msg, name, r, u, votes; r = new RoomHelper(); msg = this.msgData.message; if (msg.length > 12) { name = msg.substr(12); u = r.lookupUser(name); if (u !== false) { votes = r.userVoteRatio(u); msg = u.username + " :+1: " + votes['woot'].toString() + " vezes"; if (votes['woot'] === 1) { msg += ', '; } else { msg += ', '; } msg += "e :-1: " + votes['meh'].toString() + " vezes"; if (votes['meh'] === 1) { msg += '. '; } else { msg += '. '; } msg += "O seu voteratio é: " + votes['positiveRatio'].toString() + "."; return API.sendChat(msg); } else { return API.sendChat("Este nome' " + name + " não pode ser encontrado'"); } } else { return API.sendChat("Faça isso direito, newbie!"); } }; return voteRatioCommand; })(Command); avgVoteRatioCommand = (function(_super) { __extends(avgVoteRatioCommand, _super); function avgVoteRatioCommand() { _ref30 = avgVoteRatioCommand.__super__.constructor.apply(this, arguments); return _ref30; } avgVoteRatioCommand.prototype.init = function() { this.command = '!avgvoteratio'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; avgVoteRatioCommand.prototype.functionality = function() { var averageRatio, msg, r, ratio, roomRatios, uid, user, userRatio, votes, _i, _len, _ref31; roomRatios = []; r = new RoomHelper(); _ref31 = data.voteLog; for (uid in _ref31) { votes = _ref31[uid]; user = data.users[uid].getUser(); userRatio = r.userVoteRatio(user); roomRatios.push(userRatio['positiveRatio']); } averageRatio = 0.0; for (_i = 0, _len = roomRatios.length; _i < _len; _i++) { ratio = roomRatios[_i]; averageRatio += ratio; } averageRatio = averageRatio / roomRatios.length; msg = "Contabilidade de " + roomRatios.length.toString() + " votos por usuário, e a taxa média da sala é de " + averageRatio.toFixed(2).toString() + " votos."; return API.sendChat(msg); }; return avgVoteRatioCommand; })(Command); cmds = [cookieCommand, newSongsCommand, whyWootCommand, themeCommand, rulesCommand, roomHelpCommand, sourceCommand, wootCommand, badQualityCommand, downloadCommand, afksCommand, allAfksCommand, statusCommand, unhookCommand, dieCommand, reloadCommand, lockCommand, unlockCommand, swapCommand, popCommand, pushCommand, overplayedCommand, uservoiceCommand, whyMehCommand, skipCommand, commandsCommand, resetAfkCommand, forceSkipCommand, disconnectLookupCommand, voteRatioCommand, avgVoteRatioCommand]; chatCommandDispatcher = function(chat) { var c, cmd, _i, _len, _results; chatUniversals(chat); _results = []; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(chat); if (c.evalMsg()) { break; } else { _results.push(void 0); } } return _results; }; updateVotes = function(obj) { data.currentwoots = obj.positive; data.currentmehs = obj.negative; return data.currentcurates = obj.curates; }; announceCurate = function(obj) { return announceCurate; }; handleUserJoin = function(user) { data.userJoin(user); data.users[user.id].updateActivity(); return handleUserJoin; }; handleNewSong = function(obj) { var songId; data.intervalMessages(); if (data.currentsong === null) { data.newSong(); } else { data.newSong(); document.getElementById("button-vote-positive").click(); } if (data.forceSkip) { songId = obj.media.id; return setTimeout(function() { var cMedia; cMedia = API.getMedia(); if (cMedia.id === songId) { return API.moderateForceSkip(); } }, obj.media.duration * 1000); } }; handleVote = function(obj) { data.users[obj.user.id].updateActivity(); return data.users[obj.user.id].updateVote(obj.vote); }; handleUserLeave = function(user) { var disconnectStats, i, u, _i, _len, _ref31; disconnectStats = { id: user.id, time: new Date(), songCount: data.songCount }; i = 0; _ref31 = data.internalWaitlist; for (_i = 0, _len = _ref31.length; _i < _len; _i++) { u = _ref31[_i]; if (u.id === user.id) { disconnectStats['waitlistPosition'] = i - 1; data.setInternalWaitlist(); break; } else { i++; } } data.userDisconnectLog.push(disconnectStats); return data.users[user.id].inRoom(false); }; antispam = function(chat) { var plugRoomLinkPatt, sender; plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; if (plugRoomLinkPatt.exec(chat.message)) { sender = API.getUser(chat.fromID); if (!sender.ambassador && !sender.moderator && !sender.owner && !sender.superuser) { if (!data.users[chat.fromID]["protected"]) { API.sendChat("Sem spam"); return API.moderateDeleteChat(chat.chatID); } else { return API.sendChat("Eu deveria expulsa-lo, mas estamos aqui para nos divertir"); } } } }; fans = function(chat) { var msg; msg = chat.message.toLowerCase(); if (msg.indexOf('¨¨¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨¨¨') !== -1 || msg.indexOf(':trollface:') !== -1 || msg.indexOf('autowoot:') !== -1) { return API.moderateDeleteChat(chat.chatID); } }; beggar = function(chat) { var msg, r, responses; msg = chat.message.toLowerCase(); responses = ["@{beggar} ", "@{beggar} ", "@{beggar} ", "@{beggar} "]; r = Math.floor(Math.random() * responses.length); if (msg.indexOf('¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨¨¨') !== -1) { return API.sendChat(responses[r].replace("{beggar}", chat.from)); } }; chatUniversals = function(chat) { data.activity(chat); antispam(chat); return beggar(chat); }; hook = function(apiEvent, callback) { return API.on(apiEvent, callback); }; unhook = function(apiEvent, callback) { return API.off(apiEvent, callback); }; apiHooks = [ { 'event': API.ROOM_SCORE_UPDATE, 'callback': updateVotes }, { 'event': API.CURATE_UPDATE, 'callback': announceCurate }, { 'event': API.USER_JOIN, 'callback': handleUserJoin }, { 'event': API.DJ_ADVANCE, 'callback': handleNewSong }, { 'event': API.VOTE_UPDATE, 'callback': handleVote }, { 'event': API.CHAT, 'callback': chatCommandDispatcher }, { 'event': API.USER_LEAVE, 'callback': handleUserLeave } ]; initHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(hook(pair['event'], pair['callback'])); } return _results; }; undoHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(unhook(pair['event'], pair['callback'])); } return _results; }; initialize(); }).call(this);
0x3EF8
Nero 2.0 is a Facebook Messenger bot that helps answer a variety of questions using AI APIs for information. At its core, it operates on the fca-unofficial library.
jbapex
No description available
TridentWolfz
// Generated by CoffeeScript 1.6.3 (function() { var Command, RoomHelper, User, addCommand, afkCheck, afksCommand, allAfksCommand, announceCurate, antispam, apiHooks, avgVoteRatioCommand, badQualityCommand, beggar, chatCommandDispatcher, chatUniversals, cmds, commandsCommand, cookieCommand, data, dieCommand, disconnectLookupCommand, downloadCommand, forceSkipCommand, handleNewSong, handleUserJoin, handleUserLeave, handleVote, hook, initEnvironment, initHooks, initialize, lockCommand, lockskipCommand, msToStr, newSongsCommand, overplayedCommand, popCommand, populateUserData, pupOnline, pushCommand, reloadCommand, resetAfkCommand, roomHelpCommand, rulesCommand, settings, skipCommand, staffCommand, sourceCommand, statusCommand, swapCommand, themeCommand, undoHooks, unhook, unhookCommand, unlockCommand, updateVotes, uservoiceCommand, voteRatioCommand, whyMehCommand, whyWootCommand, wootCommand, _ref, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref2, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref3, _ref30, _ref32, ref33, _ref34, ref35, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; settings = (function() { function settings() { this.implode = __bind(this.implode, this); this.intervalMessages = __bind(this.intervalMessages, this); this.startAfkInterval = __bind(this.startAfkInterval, this); this.setInternalWaitlist = __bind(this.setInternalWaitlist, this); this.userJoin = __bind(this.userJoin, this); this.getRoomUrlPath = __bind(this.getRoomUrlPath, this); this.startup = __bind(this.startup, this); } settings.prototype.currentsong = {}; settings.prototype.users = {}; settings.prototype.djs = []; settings.prototype.mods = []; settings.prototype.host = []; settings.prototype.hasWarned = false; settings.prototype.currentwoots = 0; settings.prototype.currentmehs = 0; settings.prototype.currentcurates = 0; settings.prototype.roomUrlPath = null; settings.prototype.internalWaitlist = []; settings.prototype.userDisconnectLog = []; settings.prototype.voteLog = {}; settings.prototype.seshOn = false; settings.prototype.forceSkip = false; settings.prototype.seshMembers = []; settings.prototype.launchTime = null; settings.prototype.totalVotingData = { woots: 0, mehs: 0, curates: 0 }; settings.prototype.pupScriptUrl = 'https://raw.github.com/Brutos/chatbotvm/master/.gitignore'; settings.prototype.afkTime = 15 * 60 * 1000; settings.prototype.songIntervalMessages = [ { interval: 7, offset: 0, msg: "/em: Mantenha-se sempre votando, se não será removido da lista de espera e da cabine de DJ." },{ interval: 5, offset: 0, msg: "/em: Make sure that you're voting or you will be removed from the wait list and from the DJ Booth." },{ interval: 9, offset: 0, msg: "/em: Entre no nosso grupo do facebook e fique por dentro de todas as nossas atualizações: https://www.facebook.com/groups/DTEplugdj/" } ]; settings.prototype.songCount = 0; settings.prototype.startup = function() { this.launchTime = new Date(); return this.roomUrlPath = this.getRoomUrlPath(); }; settings.prototype.getRoomUrlPath = function() { return window.location.pathname.replace(/\//g, ''); }; settings.prototype.newSong = function() { this.totalVotingData.woots += this.currentwoots; this.totalVotingData.mehs += this.currentmehs; this.totalVotingData.curates += this.currentcurates; this.setInternalWaitlist(); this.currentsong = API.getMedia(); if (this.currentsong !== null) { return this.currentsong; } else { return false; } }; settings.prototype.userJoin = function(u) { var userIds, _ref; userIds = Object.keys(this.users); if (_ref = u.id, __indexOf.call(userIds, _ref) >= 0) { return this.users[u.id].inRoom(true); } else { this.users[u.id] = new User(u); return this.voteLog[u.id] = {}; } }; settings.prototype.setInternalWaitlist = function() { var boothWaitlist, fullWaitList, lineWaitList; boothWaitlist = API.getDJs().slice(1); lineWaitList = API.getWaitList(); fullWaitList = boothWaitlist.concat(lineWaitList); return this.internalWaitlist = fullWaitList; }; settings.prototype.activity = function(obj) { if (obj.type === 'message') { return this.users[obj.fromID].updateActivity(); } }; settings.prototype.startAfkInterval = function() { return this.afkInterval = setInterval(afkCheck, 2000); }; settings.prototype.intervalMessages = function() { var msg, _i, _len, _ref, _results; this.songCount++; _ref = this.songIntervalMessages; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { msg = _ref[_i]; if (((this.songCount + msg['offset']) % msg['interval']) === 0) { _results.push(API.sendChat(msg['msg'])); } else { _results.push(void 0); } } return _results; }; settings.prototype.implode = function() { var item, val; for (item in this) { val = this[item]; if (typeof this[item] === 'object') { delete this[item]; } } return clearInterval(this.afkInterval); }; settings.prototype.lockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": true, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; settings.prototype.unlockBooth = function(callback) { if (callback == null) { callback = null; } return $.ajax({ url: "http://plug.dj/_/gateway/room.update_options", type: 'POST', data: JSON.stringify({ service: "room.update_options", body: [ this.roomUrlPath, { "boothLocked": false, "waitListEnabled": true, "maxPlays": 1, "maxDJs": 5 } ] }), async: this.async, dataType: 'json', contentType: 'application/json' }).done(function() { if (callback != null) { return callback(); } }); }; return settings; })(); data = new settings(); User = (function() { User.prototype.afkWarningCount = 0; User.prototype.lastWarning = null; User.prototype["protected"] = false; User.prototype.isInRoom = true; function User(user) { this.user = user; this.updateVote = __bind(this.updateVote, this); this.inRoom = __bind(this.inRoom, this); this.notDj = __bind(this.notDj, this); this.warn = __bind(this.warn, this); this.getIsDj = __bind(this.getIsDj, this); this.getWarningCount = __bind(this.getWarningCount, this); this.getUser = __bind(this.getUser, this); this.getLastWarning = __bind(this.getLastWarning, this); this.getLastActivity = __bind(this.getLastActivity, this); this.updateActivity = __bind(this.updateActivity, this); this.init = __bind(this.init, this); this.init(); } User.prototype.init = function() { return this.lastActivity = new Date(); }; User.prototype.updateActivity = function() { this.lastActivity = new Date(); this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.getLastActivity = function() { return this.lastActivity; }; User.prototype.getLastWarning = function() { if (this.lastWarning === null) { return false; } else { return this.lastWarning; } }; User.prototype.getUser = function() { return this.user; }; User.prototype.getWarningCount = function() { return this.afkWarningCount; }; User.prototype.getIsDj = function() { var DJs, dj, _i, _len; DJs = API.getDJs(); for (_i = 0, _len = DJs.length; _i < _len; _i++) { dj = DJs[_i]; if (this.user.id === dj.id) { return true; } } return false; }; User.prototype.warn = function() { this.afkWarningCount++; return this.lastWarning = new Date(); }; User.prototype.notDj = function() { this.afkWarningCount = 0; return this.lastWarning = null; }; User.prototype.inRoom = function(online) { return this.isInRoom = online; }; User.prototype.updateVote = function(v) { if (this.isInRoom) { return data.voteLog[this.user.id][data.currentsong.id] = v; } }; return User; })(); RoomHelper = (function() { function RoomHelper() {} RoomHelper.prototype.lookupUser = function(username) { var id, u, _ref; _ref = data.users; for (id in _ref) { u = _ref[id]; if (u.getUser().username === username) { return u.getUser(); } } return false; }; RoomHelper.prototype.userVoteRatio = function(user) { var songId, songVotes, vote, votes; songVotes = data.voteLog[user.id]; votes = { 'woot': 0, 'meh': 0 }; for (songId in songVotes) { vote = songVotes[songId]; if (vote === 1) { votes['woot']++; } else if (vote === -1) { votes['meh']++; } } votes['positiveRatio'] = (votes['woot'] / (votes['woot'] + votes['meh'])).toFixed(2); return votes; }; return RoomHelper; })(); pupOnline = function() { return API.sendChat("/me: brutos versão ETDBR 100%. ON!"); }; populateUserData = function() { var u, users, _i, _len; users = API.getUsers(); for (_i = 0, _len = users.length; _i < _len; _i++) { u = users[_i]; data.users[u.id] = new User(u); data.voteLog[u.id] = {}; } }; initEnvironment = function() { document.getElementById("button-vote-positive").click(); return document.getElementById("button-sound").click(); }; initialize = function() { pupOnline(); populateUserData(); initEnvironment(); initHooks(); data.startup(); data.newSong(); return data.startAfkInterval(); }; afkCheck = function() { var DJs, id, lastActivity, lastWarned, now, oneMinute, secsLastActive, timeSinceLastActivity, timeSinceLastWarning, twoMinutes, user, warnMsg, _ref, _results; _ref = data.users; _results = []; for (id in _ref) { user = _ref[id]; now = new Date(); lastActivity = user.getLastActivity(); timeSinceLastActivity = now.getTime() - lastActivity.getTime(); if (timeSinceLastActivity > data.afkTime) { if (user.getIsDj()) { secsLastActive = timeSinceLastActivity / 1000; if (user.getWarningCount() === 0) { user.warn(); _results.push(API.sendChat("@" + user.getUser().username + ", Eu não vi você votar durante 30 minutos. Vote nos próximos 2 minutos, se não será removido.")); } else if (user.getWarningCount() === 1) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); twoMinutes = 1 * 60 * 1000; if (timeSinceLastWarning > twoMinutes) { user.warn(); warnMsg = "@" + user.getUser().username; warnMsg += ", Eu não vi você votar durante 32 minutos. Vote no próximo minuto ou eu o removerei, este é seu ultimo aviso."; _results.push(API.sendChat(warnMsg)); } else { _results.push(void 0); } } else if (user.getWarningCount() === 2) { lastWarned = user.getLastWarning(); timeSinceLastWarning = now.getTime() - lastWarned.getTime(); oneMinute = 1 * 60 * 1000; if (timeSinceLastWarning > oneMinute) { DJs = API.getDJs(); if (DJs.length > 0 && DJs[0].id !== user.getUser().id) { API.sendChat("@" + user.getUser().username + ", Você teve 2 avisos. Por favor, mantenha-se sempre votando."); API.moderateRemoveDJ(id); _results.push(user.warn()); } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(void 0); } } else { _results.push(user.notDj()); } } else { _results.push(void 0); } } return _results; }; msToStr = function(msTime) { var ms, msg, timeAway; msg = ''; timeAway = { 'days': 0, 'hours': 0, 'minutes': 0, 'seconds': 0 }; ms = { 'day': 24 * 60 * 60 * 1000, 'hour': 60 * 60 * 1000, 'minute': 60 * 1000, 'second': 1000 }; if (msTime > ms['day']) { timeAway['days'] = Math.floor(msTime / ms['day']); msTime = msTime % ms['day']; } if (msTime > ms['hour']) { timeAway['hours'] = Math.floor(msTime / ms['hour']); msTime = msTime % ms['hour']; } if (msTime > ms['minute']) { timeAway['minutes'] = Math.floor(msTime / ms['minute']); msTime = msTime % ms['minute']; } if (msTime > ms['second']) { timeAway['seconds'] = Math.floor(msTime / ms['second']); } if (timeAway['days'] !== 0) { msg += timeAway['days'].toString() + 'd'; } if (timeAway['hours'] !== 0) { msg += timeAway['hours'].toString() + 'h'; } if (timeAway['minutes'] !== 0) { msg += timeAway['minutes'].toString() + 'm'; } if (timeAway['seconds'] !== 0) { msg += timeAway['seconds'].toString() + 's'; } if (msg !== '') { return msg; } else { return false; } }; Command = (function() { function Command(msgData) { this.msgData = msgData; this.init(); } Command.prototype.init = function() { this.parseType = null; this.command = null; return this.rankPrivelege = null; }; Command.prototype.functionality = function(data) {}; Command.prototype.hasPrivelege = function() { var user; user = data.users[this.msgData.fromID].getUser(); switch (this.rankPrivelege) { case 'host': return user.permission === 5; case 'cohost': return user.permission >= 4; case 'mod': return user.permission >= 3; case 'manager': return user.permission >= 3; case 'bouncer': return user.permission >= 2; case 'featured': return user.permission >= 1; default: return true; } }; Command.prototype.commandMatch = function() { var command, msg, _i, _len, _ref; msg = this.msgData.message; if (typeof this.command === 'string') { if (this.parseType === 'exact') { if (msg === this.command) { return true; } else { return false; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, this.command.length) === this.command) { return true; } else { return false; } } else if (this.parseType === 'contains') { if (msg.indexOf(this.command) !== -1) { return true; } else { return false; } } } else if (typeof this.command === 'object') { _ref = this.command; for (_i = 0, _len = _ref.length; _i < _len; _i++) { command = _ref[_i]; if (this.parseType === 'exact') { if (msg === command) { return true; } } else if (this.parseType === 'startsWith') { if (msg.substr(0, command.length) === command) { return true; } } else if (this.parseType === 'contains') { if (msg.indexOf(command) !== -1) { return true; } } } return false; } }; Command.prototype.evalMsg = function() { if (this.commandMatch() && this.hasPrivelege()) { this.functionality(); return true; } else { return false; } }; return Command; })(); cookieCommand = (function(_super) { __extends(cookieCommand, _super); function cookieCommand() { _ref = cookieCommand.__super__.constructor.apply(this, arguments); return _ref; } cookieCommand.prototype.init = function() { this.command = 'cookie'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; cookieCommand.prototype.getCookie = function() { var c, cookies; cookies = ["muita aveia", "um cafesinho", "um toddynho", "um copo de coca-cola", "uma dose de Ipioca", "limões", "um danoninho", "um cafe extra forte", "maçãs", "bananas", "um brinquedinho", "amendoins", "muita aveia"]; c = Math.floor(Math.random() * cookies.length); return cookies[c]; }; cookieCommand.prototype.functionality = function() { var msg, r, user; msg = this.msgData.message; r = new RoomHelper(); if (msg.substring(7, 8) === "@") { user = r.lookupUser(msg.substr(8)); if (user === false) { API.sendChat("/em: não encontrei ' " + msg.substr(8) + "' na sala. Então, sobra mais pra mim! d(>_<)b "); return false; } else { return API.sendChat("/em: @" + user.username + ", @" + this.msgData.from + " o recompensou com " + this.getCookie() + ". Aproveite!"); } } }; return cookieCommand; })(Command); newSongsCommand = (function(_super) { __extends(newSongsCommand, _super); function newSongsCommand() { _ref1 = newSongsCommand.__super__.constructor.apply(this, arguments); return _ref1; } newSongsCommand.prototype.init = function() { this.command = '!musicanova'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; newSongsCommand.prototype.functionality = function() { var arts, cMedia, chans, chooseRandom, mChans, msg, selections, u, _ref2; mChans = this.memberChannels.slice(0); chans = this.channels.slice(0); arts = this.artists.slice(0); chooseRandom = function(list) { var l, r; l = list.length; r = Math.floor(Math.random() * l); return list.splice(r, 1); }; selections = { channels: [], artist: '' }; u = data.users[this.msgData.fromID].getUser().username; if (u.indexOf("MistaDubstep") !== -1) { selections['channels'].push('MistaDubstep'); } else if (u.indexOf("Underground Promotions") !== -1) { selections['channels'].push('UndergroundDubstep'); } else { selections['channels'].push(chooseRandom(mChans)); } selections['channels'].push(chooseRandom(chans)); selections['channels'].push(chooseRandom(chans)); cMedia = API.getMedia(); if ((cMedia != null) && (_ref2 = cMedia.author, __indexOf.call(arts, _ref2) >= 0)) { selections['artist'] = cMedia.author; } else { selections['artist'] = chooseRandom(arts); } msg = "Todo mundo já ouviu aquela musica do " + selections['artist'] + " obtenha novas musicas em http://youtube.com/" + selections['channels'][0] + " http://youtube.com/" + selections['channels'][1] + " ou http://youtube.com/" + selections['channels'][2]; return API.sendChat(msg); }; newSongsCommand.prototype.memberChannels = ["JitterStep", "MistaDubstep", "DubStationPromotions", "UndergroundDubstep",, "DarkstepWarrior", "BombshockDubstep", "Sharestep"]; newSongsCommand.prototype.channels = ["UltraRecords", "kontor", "SpinninRec", "PandoraMuslc", "ITacMusic", "Liquicity", "FunkyyPanda", "BassRape", "WobbleCraftDubz", "UKFdubstep", "DropThatBassline", "VitalDubstep", "AirwaveDubstepTV", "EpicNetworkMusic", "NoOffenseDubstep", "InspectorDubplate", "ReptileDubstep", "MrMoMDubstep", "FrixionNetwork", "IcyDubstep", "DubstepWeed", "VhileMusic", "LessThan3Dubstep", "PleaseMindTheDUBstep", "ClownDubstep", "TheULTRADUBSTEP", "DuBM0nkeyz", "DubNationUK", "TehDubstepChannel", "BassDropMedia", "USdubstep", "UNITEDubstep"]; newSongsCommand.prototype.artists = ["Skrillex", "Doctor P", "Excision", "Flux Pavilion", "Knife Party", "Krewella", "Rusko", "Bassnectar", "Nero", "Deadmau5", "Borgore", "Zomboy"]; return newSongsCommand; })(Command); whyWootCommand = (function(_super) { __extends(whyWootCommand, _super); function whyWootCommand() { _ref2 = whyWootCommand.__super__.constructor.apply(this, arguments); return _ref2; } whyWootCommand.prototype.init = function() { this.command = '!Brutos'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; whyWootCommand.prototype.functionality = function() { var msg, nameIndex; msg = "Se tu não entrar na linha, vai tomar um ban!";; if ((nameIndex = this.msgData.message.indexOf('@')) !== -1) { return API.sendChat(this.msgData.message.substr(nameIndex) + ', ' + msg); } else { return API.sendChat(msg); } }; return whyWootCommand; })(Command); themeCommand = (function(_super) { __extends(themeCommand, _super); function themeCommand() { _ref3 = themeCommand.__super__.constructor.apply(this, arguments); return _ref3; } themeCommand.prototype.init = function() { this.command = '!temas'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; themeCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "Todo tipo de musica eletronica de boa qualidade é permitida aqui. Incluindo Electro, Dubstep, Techno, Trap, EDM, "; msg1 += "Hardstyle, House e Trance. "; msg2 = "All kinds of electronic song of good quality is allowed here. Including Electro, Dubstep, Techno, Trap, EDM, "; msg2 += "Hardstyle, House and Trance. "; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return themeCommand; })(Command); rulesCommand = (function(_super) { __extends(rulesCommand, _super); function rulesCommand() { _ref4 = rulesCommand.__super__.constructor.apply(this, arguments); return _ref4; } rulesCommand.prototype.init = function() { this.command = '!regras'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; rulesCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "1) Tempo máximo 6 min e 30 seg. "; msg1 += "2) Não escrever em /me ou /em. "; msg1 += "3) Respeitar os moderadores da sala."; msg1 += "4) Sem flood no chat . "; msg1 += "5) Não fique pedindo cargos e sem fanbot. "; msg2 = "1) Maximum time 6 minutes and 30 seconds. "; msg2 += "2) Can't write in /me or /em. "; msg2 += "3) Respect the moderators of the room. "; msg2 += "4) Without flood in the chat and without Fanbot. "; msg2 += "5) Can't ask positions."; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return rulesCommand; })(Command); roomHelpCommand = (function(_super) { __extends(roomHelpCommand, _super); function roomHelpCommand() { _ref5 = roomHelpCommand.__super__.constructor.apply(this, arguments); return _ref5; } roomHelpCommand.prototype.init = function() { this.command = '!ajuda'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; roomHelpCommand.prototype.functionality = function() { var msg1, msg2; msg1 = "Bem vindo a sala Electro, Trap e Dubstep Brasil! Ser DJ: Crie uma lista de reprodução e coloque Musica do Youtube ou soundcloud. "; msg1 += "Se é novo procure pelo seu nome na sua tela (próximo a cabine do DJ) e depois mude o nome. "; msg1 += "Para Ganhar Pontos clique em Bacana. "; msg2 = "Divirta-se! Qualquer outra duvida chame um adm da sala "; API.sendChat(msg1); return setTimeout((function() { return API.sendChat(msg2); }), 750); }; return roomHelpCommand; })(Command); sourceCommand = (function(_super) { __extends(sourceCommand, _super); function sourceCommand() { _ref6 = sourceCommand.__super__.constructor.apply(this, arguments); return _ref6; } sourceCommand.prototype.init = function() { this.command = ['!autor', '!author', '!autor']; this.parseType = 'exact'; return this.rankPrivelege = 'featured'; }; sourceCommand.prototype.functionality = function() { var msg; msg = ' BOT criado por Backus e editado por brutos para a Electro, Trap e Dubstep Brasil '; return API.sendChat(msg); }; return sourceCommand; })(Command); wootCommand = (function(_super) { __extends(wootCommand, _super); function wootCommand() { _ref7 = wootCommand.__super__.constructor.apply(this, arguments); return _ref7; } wootCommand.prototype.init = function() { this.command = '!autowoot'; this.parseType = 'startsWith'; return this.rankPrivelege = 'featured'; }; wootCommand.prototype.functionality = function() { var msg, nameIndex; msg = "Use o auto woot para evitar remoção da cabine de DJ por não estar votando. http://migre.me/fCWA2"; if ((nameIndex = this.msgData.message.indexOf('@')) !== -1) { return API.sendChat(this.msgData.message.substr(nameIndex) + ', ' + msg); } else { return API.sendChat(msg); } }; return wootCommand; })(Command); badQualityCommand = (function(_super) { __extends(badQualityCommand, _super); function badQualityCommand() { _ref8 = badQualityCommand.__super__.constructor.apply(this, arguments); return _ref8; } badQualityCommand.prototype.init = function() { this.command = '.ruim'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; badQualityCommand.prototype.functionality = function() { var msg; msg = "Não gostei da sua musica, tente melhorar da proxima vez"; return API.sendChat(msg); }; return badQualityCommand; })(Command); downloadCommand = (function(_super) { __extends(downloadCommand, _super); function downloadCommand() { _ref9 = downloadCommand.__super__.constructor.apply(this, arguments); return _ref9; } downloadCommand.prototype.init = function() { this.command = '!facebook'; this.parseType = 'exact'; return this.rankPrivelege = 'featured'; }; downloadCommand.prototype.functionality = function() { var msg; msg = " Participe do grupo e curta nossa pagina "; msg += "https://www.facebook.com/ETDPlugdj "; msg += "https://www.facebook.com/groups/DTEplugdj/ "; return API.sendChat(msg); }; return downloadCommand; })(Command); afksCommand = (function(_super) { __extends(afksCommand, _super); function afksCommand() { _ref10 = afksCommand.__super__.constructor.apply(this, arguments); return _ref10; } afksCommand.prototype.init = function() { this.command = '!afks'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; afksCommand.prototype.functionality = function() { var dj, djAfk, djs, msg, now, _i, _len; msg = ''; djs = API.getDJs(); for (_i = 0, _len = djs.length; _i < _len; _i++) { dj = djs[_i]; now = new Date(); djAfk = now.getTime() - data.users[dj.id].getLastActivity().getTime(); if (djAfk > (4 * 60 * 1000)) { if (msToStr(djAfk) !== false) { msg += dj.username + ' - ' + msToStr(djAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Ninguém está AFK"); } else { return API.sendChat('AFKs: ' + msg); } }; return afksCommand; })(Command); allAfksCommand = (function(_super) { __extends(allAfksCommand, _super); function allAfksCommand() { _ref11 = allAfksCommand.__super__.constructor.apply(this, arguments); return _ref11; } allAfksCommand.prototype.init = function() { this.command = '!allafks'; this.parseType = 'exact'; return this.rankPrivelege = 'manager'; }; allAfksCommand.prototype.functionality = function() { var msg, now, u, uAfk, usrs, _i, _len; msg = ''; usrs = API.getUsers(); for (_i = 0, _len = usrs.length; _i < _len; _i++) { u = usrs[_i]; now = new Date(); uAfk = now.getTime() - data.users[u.id].getLastActivity().getTime(); if (uAfk > (30 * 60 * 1000)) { if (msToStr(uAfk) !== false) { msg += u.username + ' - ' + msToStr(uAfk); msg += '. '; } } } if (msg === '') { return API.sendChat("Ninguém está AFK"); } else { return API.sendChat('AFKs: ' + msg); } }; return allAfksCommand; })(Command); statusCommand = (function(_super) { __extends(statusCommand, _super); function statusCommand() { _ref12 = statusCommand.__super__.constructor.apply(this, arguments); return _ref12; } statusCommand.prototype.init = function() { this.command = '!status'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; statusCommand.prototype.functionality = function() { var day, hour, launch, lt, meridian, min, month, msg, t; lt = data.launchTime; month = lt.getMonth() + 1; day = lt.getDate(); hour = lt.getHours(); meridian = hour % 12 === hour ? 'AM' : 'PM'; min = lt.getMinutes(); min = min < 10 ? '0' + min : min; t = data.totalVotingData; t['songs'] = data.songCount; launch = 'Iniciado em ' + day + '/' + month + ' ' + hour + ':' + min + ' ' + meridian + '. '; msg = launch; return API.sendChat(msg); }; return statusCommand; })(Command); unhookCommand = (function(_super) { __extends(unhookCommand, _super); function unhookCommand() { _ref13 = unhookCommand.__super__.constructor.apply(this, arguments); return _ref13; } unhookCommand.prototype.init = function() { this.command = '!unhook events all()'; this.parseType = 'exact'; return this.rankPrivelege = 'host'; }; unhookCommand.prototype.functionality = function() { API.sendChat('Unhooking all events...'); return undoHooks(); }; return unhookCommand; })(Command); dieCommand = (function(_super) { __extends(dieCommand, _super); function dieCommand() { _ref14 = dieCommand.__super__.constructor.apply(this, arguments); return _ref14; } dieCommand.prototype.init = function() { this.command = '!desligar'; this.parseType = 'exact'; return this.rankPrivelege = 'cohost'; }; dieCommand.prototype.functionality = function() { API.sendChat('Como tu é burro, cara.'); undoHooks(); API.sendChat('Por que fez isso? Que loucura.'); data.implode(); return API.sendChat('Agora o chat bot está desligado'); }; return dieCommand; })(Command); reloadCommand = (function(_super) { __extends(reloadCommand, _super); function reloadCommand() { _ref15 = reloadCommand.__super__.constructor.apply(this, arguments); return _ref15; } reloadCommand.prototype.init = function() { this.command = '!reload'; this.parseType = 'exact'; return this.rankPrivelege = 'cohost'; }; reloadCommand.prototype.functionality = function() { var pupSrc; API.sendChat('Reiniciado!'); undoHooks(); pupSrc = data.pupScriptUrl; data.implode(); return $.getScript(pupSrc); }; return reloadCommand; })(Command); lockCommand = (function(_super) { __extends(lockCommand, _super); function lockCommand() { _ref16 = lockCommand.__super__.constructor.apply(this, arguments); return _ref16; } lockCommand.prototype.init = function() { this.command = '!trava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; lockCommand.prototype.functionality = function() { return data.lockBooth(); }; return lockCommand; })(Command); unlockCommand = (function(_super) { __extends(unlockCommand, _super); function unlockCommand() { _ref17 = unlockCommand.__super__.constructor.apply(this, arguments); return _ref17; } unlockCommand.prototype.init = function() { this.command = '!destrava'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; unlockCommand.prototype.functionality = function() { return data.unlockBooth(); }; return unlockCommand; })(Command); removeCommand = (function(_super) { __extends(removeCommand, _super); function removeCommand() { _ref33 = removeCommand.__super__.constructor.apply(this, arguments); return _ref33; } removeCommand.prototype.init = function() { this.command = '!remove'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; removeCommand.prototype.functionality = function() { var djs, popDj; djs = API.getDJs(); popDj = djs[djs.length - 1]; return API.moderateRemoveDJ(popDj.id); }; return removeCommand; })(Command); staffCommand = (function(_super) { __extends(staffCommand, _super); function staffCommand() { _ref32 = staffCommand.__super__.constructor.apply(this, arguments); return _ref32; } staffCommand.prototype.init = function() { this.command = '!staff'; this.parseType = 'exact'; this.rankPrivelege = 'user'; return window.lastActiveStaffTime; }; staffCommand.prototype.staff = function() { var now, staff, staffAfk, stringstaff, user, _i, _len; staff = API.getStaff(); now = new Date(); stringstaff = ""; for (_i = 0, _len = staff.length; _i < _len; _i++) { user = staff[_i]; if (user.permission > 1) { staffAfk = now.getTime() - data.users[user.id].getLastActivity().getTime(); if (staffAfk < (60 * 60 * 1000)) { stringstaff += "@" + user.username + " "; } } } if (stringstaff.length === 0) { stringstaff = "Não ha ADMs ativos no momento :'("; } return stringstaff; }; staffCommand.prototype.functionality = function() { var currentTime, millisecondsPassed, thestaff; thestaff = this.staff(); currentTime = new Date(); if (!window.lastActiveStaffTime) { API.sendChat(thestaff); return window.lastActiveStaffTime = currentTime; } else { millisecondsPassed = currentTime.getTime() - window.lastActiveStaffTime.getTime(); if (millisecondsPassed > 10000) { window.lastActiveStaffTime = currentTime; return API.sendChat(thestaff); } } }; return staffCommand; })(Command); lockskipCommand = (function(_super) { __extends(lockskipCommand, _super); function lockskipCommand() { _ref34 = lockskipCommand.__super__.constructor.apply(this, arguments); return _ref34; } lockskipCommand.prototype.init = function() { this.command = '!lockskip'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; lockskipCommand.prototype.functionality = function() { return data.lockBooth(function() { return setTimeout(function() {}, API.moderateForceSkip(), setTimeout(function() { return data.unlockBooth(); }, 5000), 5000); }); }; return lockskipCommand; })(Command); addCommand = (function(_super) { __extends(addCommand, _super); function addCommand() { _ref35 = addCommand.__super__.constructor.apply(this, arguments); return _ref35; } addCommand.prototype.init = function() { this.command = '!add'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; addCommand.prototype.functionality = function() { var msg, name, r, user; msg = this.msgData.message; if (msg.length > this.command.length + 2) { name = msg.substr(this.command.length + 2); r = new RoomHelper(); user = r.lookupUser(name); if (user !== false) { API.moderateAddDJ(user.id); return setTimeout((function() { return data.unlockBooth(); }), 5000); } } }; return addCommand; })(Command); swapCommand = (function(_super) { __extends(swapCommand, _super); function swapCommand() { _ref18 = swapCommand.__super__.constructor.apply(this, arguments); return _ref18; } swapCommand.prototype.init = function() { this.command = '!swap'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; swapCommand.prototype.functionality = function() { var msg, r, swapRegex, userAdd, userRemove, users; msg = this.msgData.message; swapRegex = new RegExp("^!swap @(.+) para @(.+)$"); users = swapRegex.exec(msg).slice(1); r = new RoomHelper(); if (users.length === 2) { userRemove = r.lookupUser(users[0]); userAdd = r.lookupUser(users[1]); if (userRemove === false || userAdd === false) { API.sendChat('Ha algum erro'); return false; } else { return data.lockBooth(function() { API.moderateRemoveDJ(userRemove.id); API.sendChat("Removendo " + userRemove.username + "..."); return setTimeout(function() { API.moderateAddDJ(userAdd.id); API.sendChat("Adicionando " + userAdd.username + "..."); return setTimeout(function() { return data.unlockBooth(); }, 1500); }, 1500); }); } } else { return API.sendChat("Tire o espaço entre os nomes e coloque \'para\'"); } }; return swapCommand; })(Command); popCommand = (function(_super) { __extends(popCommand, _super); function popCommand() { _ref19 = popCommand.__super__.constructor.apply(this, arguments); return _ref19; } popCommand.prototype.init = function() { this.command = '!pop'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; popCommand.prototype.functionality = function() { var djs, popDj; djs = API.getDJs(); popDj = djs[djs.length - 1]; return API.moderateRemoveDJ(popDj.id); }; return popCommand; })(Command); pushCommand = (function(_super) { __extends(pushCommand, _super); function pushCommand() { _ref20 = pushCommand.__super__.constructor.apply(this, arguments); return _ref20; } pushCommand.prototype.init = function() { this.command = '!push'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; pushCommand.prototype.functionality = function() { var msg, name, r, user; msg = this.msgData.message; if (msg.length > this.command.length + 2) { name = msg.substr(this.command.length + 2); r = new RoomHelper(); user = r.lookupUser(name); if (user !== false) { return API.moderateAddDJ(user.id); } } }; return pushCommand; })(Command); resetAfkCommand = (function(_super) { __extends(resetAfkCommand, _super); function resetAfkCommand() { _ref21 = resetAfkCommand.__super__.constructor.apply(this, arguments); return _ref21; } resetAfkCommand.prototype.init = function() { this.command = '!resetafk'; this.parseType = 'startsWith'; return this.rankPrivelege = 'mod'; }; resetAfkCommand.prototype.functionality = function() { var id, name, u, _ref22; if (this.msgData.message.length > 10) { name = this.msgData.message.substring(11); _ref22 = data.users; for (id in _ref22) { u = _ref22[id]; if (u.getUser().username === name) { u.updateActivity(); API.sendChat('@' + u.getUser().username + ' seu tempo AFK foi reiniciado.'); return; } } API.sendChat('' + name + ' Não pode ser encontrado'); } else { API.sendChat('Mas, wat?'); } }; return resetAfkCommand; })(Command); forceSkipCommand = (function(_super) { __extends(forceSkipCommand, _super); function forceSkipCommand() { _ref22 = forceSkipCommand.__super__.constructor.apply(this, arguments); return _ref22; } forceSkipCommand.prototype.init = function() { this.command = '!forceskip'; this.parseType = 'startsWith'; return this.rankPrivelege = 'cohost'; }; forceSkipCommand.prototype.functionality = function() { var msg, param; msg = this.msgData.message; if (msg.length > 11) { param = msg.substr(11); if (param === 'Ativar') { data.forceSkip = true; return API.sendChat("Pulo forçado ativado."); } else if (param === 'Desativar') { data.forceSkip = false; return API.sendChat("Pulo forçado desativado."); } } }; return forceSkipCommand; })(Command); overplayedCommand = (function(_super) { __extends(overplayedCommand, _super); function overplayedCommand() { _ref23 = overplayedCommand.__super__.constructor.apply(this, arguments); return _ref23; } overplayedCommand.prototype.init = function() { this.command = '!overplayed'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; overplayedCommand.prototype.functionality = function() { return API.sendCha("Acho que não, em?"); }; return overplayedCommand; })(Command); uservoiceCommand = (function(_super) { __extends(uservoiceCommand, _super); function uservoiceCommand() { _ref24 = uservoiceCommand.__super__.constructor.apply(this, arguments); return _ref24; } uservoiceCommand.prototype.init = function() { this.command = ['/uservoice()', '/idea()']; this.parseType = 'exact'; return this.rankPrivelege = 'cohost'; }; uservoiceCommand.prototype.functionality = function() { var msg; msg = 'Have an idea for the room, our bot, or an event? Awesome! Submit it to our uservoice and we\'ll get started on it: http://is.gd/IzP4bA'; msg += ' (please don\'t ask for mod)'; return API.sendChat(msg); }; return uservoiceCommand; })(Command); skipCommand = (function(_super) { __extends(skipCommand, _super); function skipCommand() { _ref25 = skipCommand.__super__.constructor.apply(this, arguments); return _ref25; } skipCommand.prototype.init = function() { this.command = '!pula'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; skipCommand.prototype.functionality = function() { return API.moderateForceSkip(); }; return skipCommand; })(Command); whyMehCommand = (function(_super) { __extends(whyMehCommand, _super); function whyMehCommand() { _ref26 = whyMehCommand.__super__.constructor.apply(this, arguments); return _ref26; } whyMehCommand.prototype.init = function() { this.command = '!cotas'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; whyMehCommand.prototype.functionality = function() { var msg; msg = "/em acaba de ativar o modo cotas! "; msg += "Roubou sua vaga na faculdade, suas mulheres e sua vez na cabine de DJ"; return API.sendChat(msg); }; return whyMehCommand; })(Command); commandsCommand = (function(_super) { __extends(commandsCommand, _super); function commandsCommand() { _ref27 = commandsCommand.__super__.constructor.apply(this, arguments); return _ref27; } commandsCommand.prototype.init = function() { this.command = '!commands'; this.parseType = 'exact'; return this.rankPrivelege = 'bouncer'; }; commandsCommand.prototype.functionality = function() { var allowedUserLevels, c, cc, cmd, msg, user, _i, _j, _len, _len1, _ref28, _ref29; allowedUserLevels = []; user = API.getUser(this.msgData.fromID); window.capturedUser = user; if (user.permission > 5) { allowedUserLevels = ['user', 'mod', 'host']; } else if (user.permission > 2) { allowedUserLevels = ['user', 'mod']; } else { allowedUserLevels = ['user']; } msg = ''; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(''); if (_ref28 = c.rankPrivelege, __indexOf.call(allowedUserLevels, _ref28) >= 0) { if (typeof c.command === "string") { msg += c.command + ', '; } else if (typeof c.command === "object") { _ref29 = c.command; for (_j = 0, _len1 = _ref29.length; _j < _len1; _j++) { cc = _ref29[_j]; msg += cc + ', '; } } } } msg = msg.substring(0, msg.length - 2); return API.sendChat(msg); }; return commandsCommand; })(Command); disconnectLookupCommand = (function(_super) { __extends(disconnectLookupCommand, _super); function disconnectLookupCommand() { _ref28 = disconnectLookupCommand.__super__.constructor.apply(this, arguments); return _ref28; } disconnectLookupCommand.prototype.init = function() { this.command = '!dcmembros'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; disconnectLookupCommand.prototype.functionality = function() { var cmd, dcHour, dcLookupId, dcMeridian, dcMins, dcSongsAgo, dcTimeStr, dcUser, disconnectInstances, givenName, id, recentDisconnect, resp, u, _i, _len, _ref29, _ref30; cmd = this.msgData.message; if (cmd.length > 11) { givenName = cmd.slice(11); _ref29 = data.users; for (id in _ref29) { u = _ref29[id]; if (u.getUser().username === givenName) { dcLookupId = id; disconnectInstances = []; _ref30 = data.userDisconnectLog; for (_i = 0, _len = _ref30.length; _i < _len; _i++) { dcUser = _ref30[_i]; if (dcUser.id === dcLookupId) { disconnectInstances.push(dcUser); } } if (disconnectInstances.length > 0) { resp = u.getUser().username + ' desconectou ' + disconnectInstances.length.toString() + ' vez'; if (disconnectInstances.length === 1) { resp += '. '; } else { resp += 'es. '; } recentDisconnect = disconnectInstances.pop(); dcHour = recentDisconnect.time.getHours(); dcMins = recentDisconnect.time.getMinutes(); if (dcMins < 10) { dcMins = '0' + dcMins.toString(); } dcMeridian = dcHour % 12 === dcHour ? 'AM' : 'PM'; dcTimeStr = '' + dcHour + ':' + dcMins + ' ' + dcMeridian; dcSongsAgo = data.songCount - recentDisconnect.songCount; resp += 'Sua desconexão mais recente foi as ' + dcTimeStr + ' (' + dcSongsAgo + ' músicas atras). '; if (recentDisconnect.waitlistPosition !== void 0) { resp += 'Ele estava ' + recentDisconnect.waitlistPosition + ' músicas'; if (recentDisconnect.waitlistPosition > 1) { resp += ''; } resp += ' antes da cabine de DJ.'; } else { resp += 'Ele não estava na cabine de dj ou na lista de espera.'; } API.sendChat(resp); return; } else { API.sendChat("" + u.getUser().username + " não desconectou."); return; } } } return API.sendChat("'Este nome " + givenName + " não pode ser encontrado'."); } }; return disconnectLookupCommand; })(Command); voteRatioCommand = (function(_super) { __extends(voteRatioCommand, _super); function voteRatioCommand() { _ref29 = voteRatioCommand.__super__.constructor.apply(this, arguments); return _ref29; } voteRatioCommand.prototype.init = function() { this.command = '!voteratio'; this.parseType = 'startsWith'; return this.rankPrivelege = 'bouncer'; }; voteRatioCommand.prototype.functionality = function() { var msg, name, r, u, votes; r = new RoomHelper(); msg = this.msgData.message; if (msg.length > 12) { name = msg.substr(12); u = r.lookupUser(name); if (u !== false) { votes = r.userVoteRatio(u); msg = u.username + " :+1: " + votes['woot'].toString() + " vezes"; if (votes['woot'] === 1) { msg += ', '; } else { msg += ', '; } msg += "e :-1: " + votes['meh'].toString() + " vezes"; if (votes['meh'] === 1) { msg += '. '; } else { msg += '. '; } msg += "O seu voteratio é: " + votes['positiveRatio'].toString() + "."; return API.sendChat(msg); } else { return API.sendChat("Este nome' " + name + " não pode ser encontrado'"); } } else { return API.sendChat("Faça isso direito, newbie!"); } }; return voteRatioCommand; })(Command); avgVoteRatioCommand = (function(_super) { __extends(avgVoteRatioCommand, _super); function avgVoteRatioCommand() { _ref30 = avgVoteRatioCommand.__super__.constructor.apply(this, arguments); return _ref30; } avgVoteRatioCommand.prototype.init = function() { this.command = '!avgvoteratio'; this.parseType = 'exact'; return this.rankPrivelege = 'mod'; }; avgVoteRatioCommand.prototype.functionality = function() { var averageRatio, msg, r, ratio, roomRatios, uid, user, userRatio, votes, _i, _len, _ref31; roomRatios = []; r = new RoomHelper(); _ref31 = data.voteLog; for (uid in _ref31) { votes = _ref31[uid]; user = data.users[uid].getUser(); userRatio = r.userVoteRatio(user); roomRatios.push(userRatio['positiveRatio']); } averageRatio = 0.0; for (_i = 0, _len = roomRatios.length; _i < _len; _i++) { ratio = roomRatios[_i]; averageRatio += ratio; } averageRatio = averageRatio / roomRatios.length; msg = "Contabilidade de " + roomRatios.length.toString() + " votos por usuário, e a taxa média da sala é de " + averageRatio.toFixed(2).toString() + " votos."; return API.sendChat(msg); }; return avgVoteRatioCommand; })(Command); cmds = [cookieCommand, newSongsCommand, whyWootCommand, themeCommand, rulesCommand, roomHelpCommand, sourceCommand, wootCommand, badQualityCommand, downloadCommand, afksCommand, allAfksCommand, statusCommand, unhookCommand, dieCommand, reloadCommand, lockCommand, unlockCommand, swapCommand, popCommand, pushCommand, overplayedCommand, uservoiceCommand, whyMehCommand, skipCommand, commandsCommand, resetAfkCommand, forceSkipCommand, disconnectLookupCommand, voteRatioCommand, avgVoteRatioCommand]; chatCommandDispatcher = function(chat) { var c, cmd, _i, _len, _results; chatUniversals(chat); _results = []; for (_i = 0, _len = cmds.length; _i < _len; _i++) { cmd = cmds[_i]; c = new cmd(chat); if (c.evalMsg()) { break; } else { _results.push(void 0); } } return _results; }; updateVotes = function(obj) { data.currentwoots = obj.positive; data.currentmehs = obj.negative; return data.currentcurates = obj.curates; }; announceCurate = function(obj) { return announceCurate; }; handleUserJoin = function(user) { data.userJoin(user); data.users[user.id].updateActivity(); return handleUserJoin; }; handleNewSong = function(obj) { var songId; data.intervalMessages(); if (data.currentsong === null) { data.newSong(); } else { data.newSong(); document.getElementById("button-vote-positive").click(); } if (data.forceSkip) { songId = obj.media.id; return setTimeout(function() { var cMedia; cMedia = API.getMedia(); if (cMedia.id === songId) { return API.moderateForceSkip(); } }, obj.media.duration * 1000); } }; handleVote = function(obj) { data.users[obj.user.id].updateActivity(); return data.users[obj.user.id].updateVote(obj.vote); }; handleUserLeave = function(user) { var disconnectStats, i, u, _i, _len, _ref31; disconnectStats = { id: user.id, time: new Date(), songCount: data.songCount }; i = 0; _ref31 = data.internalWaitlist; for (_i = 0, _len = _ref31.length; _i < _len; _i++) { u = _ref31[_i]; if (u.id === user.id) { disconnectStats['waitlistPosition'] = i - 1; data.setInternalWaitlist(); break; } else { i++; } } data.userDisconnectLog.push(disconnectStats); return data.users[user.id].inRoom(false); }; antispam = function(chat) { var plugRoomLinkPatt, sender; plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; if (plugRoomLinkPatt.exec(chat.message)) { sender = API.getUser(chat.fromID); if (!sender.ambassador && !sender.moderator && !sender.owner && !sender.superuser) { if (!data.users[chat.fromID]["protected"]) { API.sendChat("Sem divulgaçao"); return API.moderateDeleteChat(chat.chatID); } else { return API.sendChat("Eu deveria expulsa-lo, mas estamos aqui para nos divertir"); } } } }; fans = function(chat) { var msg; msg = chat.message.toLowerCase(); if (msg.indexOf('¨¨¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨¨¨') !== -1 || msg.indexOf(':trollface:') !== -1 || msg.indexOf('autowoot:') !== -1) { return API.moderateDeleteChat(chat.chatID); } }; beggar = function(chat) { var msg, r, responses; msg = chat.message.toLowerCase(); responses = ["@{beggar} ", "@{beggar} ", "@{beggar} ", "@{beggar} "]; r = Math.floor(Math.random() * responses.length); if (msg.indexOf('¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨¨¨') !== -1 || msg.indexOf('¨¨¨¨¨¨') !== -1) { return API.sendChat(responses[r].replace("{beggar}", chat.from)); } }; chatUniversals = function(chat) { data.activity(chat); antispam(chat); return beggar(chat); }; hook = function(apiEvent, callback) { return API.on(apiEvent, callback); }; unhook = function(apiEvent, callback) { return API.off(apiEvent, callback); }; apiHooks = [ { 'event': API.ROOM_SCORE_UPDATE, 'callback': updateVotes }, { 'event': API.CURATE_UPDATE, 'callback': announceCurate }, { 'event': API.USER_JOIN, 'callback': handleUserJoin }, { 'event': API.DJ_ADVANCE, 'callback': handleNewSong }, { 'event': API.VOTE_UPDATE, 'callback': handleVote }, { 'event': API.CHAT, 'callback': chatCommandDispatcher }, { 'event': API.USER_LEAVE, 'callback': handleUserLeave } ]; initHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(hook(pair['event'], pair['callback'])); } return _results; }; undoHooks = function() { var pair, _i, _len, _results; _results = []; for (_i = 0, _len = apiHooks.length; _i < _len; _i++) { pair = apiHooks[_i]; _results.push(unhook(pair['event'], pair['callback'])); } return _results; }; initialize(); }).call(this);
torinosdr
<br><h2> Hay que pagar para usar photoscape</h2><br><br><div align="right"><img src="https://mk0intowindows84fvao.kinstacdn.com/wp-content/uploads/2015/04/AnyDesk-Free-Download-picture01.png" width="405" height="274" /></div><br><br>Gracias a las ventajas que ofrece PhotoScape, ahora podrás crear toda clase de banners y animaciones para publicitar tus productos en diversos sitios, sin necesidad de ser un experto en el área.<br><br>Por el contrario, un archivo en formato JPG será una imagen de muy poco peso y tratable manipulación. Si aceptablemente al convertir un fichero RAW a JPG se pierde información por el proceso de transformación, por lo Militar los resultados obtenidos satisfacen las expectativas de la longevoía de los usuarios.<br><br>Paso 3: coloca ambas imágenes una al ala de la otra. Asegúrate de que las dos tengan el mismo tamaño.<br><br>El presente sitio web se exime de cualquier responsabilidad derivada del uso inadecuado de PhotoScape. Asimismo, declara que no se encuentra afiliado en modo alguno a los desarrolladores del mencionado software.<br><br>En extracto, PhotoScapees un gran aplicación. Es difícil encontrar sus puntos débiles. Si usted es un principiante podrá encontrar un archivo de ayuda que hará que cualquier agraciado poco experimentado pueda trabajar con el widget.<br><br>Temidos por muchos fotógrafos profesionales, los Luceros rojos se volvieron comunes en las fotos, cuando se masificó el uso del artefacto de flash. Este extraño fin fotográfico se producen oportuno a que la candil del dispositivo entra por las pupilas del sujeto fotografiado y se refleja en su retina.<br><br>Este editor de imágenes admite el format RAW, el cual contiene valiosa información del sensor CMOS de la cámara fotográfica. Esto permitirá una manipulación más completa de la fotografía.<br><br>descargar photoscape en de gorra en español.descargar gratuito musica para ipod nano.descargar photoscape en de balde en español.como descargar videos de youtube en mi cel android. descargar musica de fondo triste.descargar gratuito la pelicula taare zameen parejo.descargar peliculas de gorra los peques.problemas al descargar halo reach.descargar photoscape en graciosamente en español.descargar mp3 zoe fin de semana.descargar de balde mp3 ricky martin come with me en gachupin.descargar gratuitamente el tema vale la pena el placer de romeo santos.descargar hdd regenerator gratuito full.which Livingston does not men differ slightly in their respective revolt happened late in the Victorian Age and is a turning point four the novel. Thing on Hamlets descargar de balde texto crematorio.descargar gratuitamente el flash player 9.0.descargar half life 2 ingles.descargar sony vegas pro 12 full en castellano Descargar photoscape en graciosamente en gachupin - Download.Descargar photoscape en gratis en español.descargar musica metal en mp3 graciosamente.descargar pelicula de halo wars completa en gachupin.descargar gratis image to pdf converter free.juegos para descargar gratuito de luminosidad 1. descargar ultima version de uc browser en gachupin descargar de gorra embriologia clinica moore pdf.descargar gratuitamente en pdf carolina se enamora.descargar gratuito whatsapp para motorola charm.como descargar videos de youtube a un nokia c3. descargar ultimo pesedit para pes 2013 pc.descargar el counter half life graciosamente.descargar nero express para pc de gorra.descargar gratis Hermandad pdf castellano.descargar en español photoscape gratuitamente en.libros cristianos casamiento descargar graciosamente.descargar resident evil 4 para pc full 1 link mega.descargar <a href="http://torinosdr.pages10.com/Conseguir-Mi-descargar-photoscape-To-Work-22671452">descargar photoscape portable</a> de balde subway surfers para android descargar e instalar de gorra mozilla firefox en español.training and went who let the through participating in elections with color, even music with<br><br>Este editor de imágenes admite el format RAW, el cual contiene valiosa información del sensor CMOS de la cámara fotográfica. Esto permitirá una manipulación más completa de la fotografía.<br><br>Photoscape dispone de funciones sencillas y avanzadas a un solo clic de distancia. Ideal para todo tipo de usuarios.<br><br>PhotoScape es un interesante y sencillo programa de estampación fotográfica gratuito, adecuado en español y compatible con los sistemas operativos Windows 2000, XP, Pinta y Windows 7 (32 y 64 bits). Ahora no obstante se puede descargar PhotoScape 3.6.2 su nueva traducción, en la que se soluciona un error en la clasificación de las listas de carpetas, se actualizan las carpetas de guardado para GIF, se añade un botonadura Exif en la pestaña Editor, se añade soporte adicional para archivos RAW como por ejemplo los de Samsung, se producen mejoras en la interfaz gráfica de sucesor y se corrigen pequeños errores presentes en versiones anteriores del aplicación.<br><br>Objeto: podrás adicionar, gracias a esta aparejo, pequeños objetos dibujados que incluye Photoscape. Ideal para cualquier tipo de fiestas, cumpleaños o perfectamente para hacer un chiste a cualquiera de tus amigos. Con Photoscape, ahórrate tiempo al editar por lotes un gran conjunto de imágenes.<br><br>Este editor de imágenes admite el format RAW, el cual contiene valiosa información del sensor CMOS de la cámara fotográfica. Esto permitirá una manipulación más completa de la fotografía.<br><br>Entre otros detalles, podrás modificar el tamaño y la proporción de todas las imágenes y optar por alinearlas en cualquier sector del fachada.<br><br><div align="center"><img src="http://www.downloadsource.es/upload/News%20July%202014/AnyDesk/AnyDesk%20acceso%20remoto.gif" width="403" height="272" /></div><br><br><hr><br>Link inportantes <a href="https://en.wikipedia.org/wiki/PhotoScape">nustra web</a><br><hr>
Zamessixx
No description available
Dbeckett23
No description available
hassansaby23
No description available
vquartzv
No description available
hassansaby23
No description available
revou-fundamental-course
09-dec-24-NerooZoldccyk created by GitHub Classroom
No description available
drawwithcode
2018-03-nerotulip created by GitHub Classroom
Anonim0Venezian0
No description available
revou-fundamental-course
24-07-23-neromorph created by GitHub Classroom
mneroda93
Weather Forecasts App using React, Redux and AccuWeather's API
Timorisu
sprint 3
NeRO is a multi-agent research assistant with a Gradio frontend and FastAPI backend, using Google Gemini 2.5 Flash, Wikipedia, and Google Scholar to deliver in-depth research.
No description available
No description available
# [BDReborn](https://telegram.me/BDReborn) **An advanced and powerful administration bot based on NEW TG-CLI * * * ## Commands | Use help | |:--------|:------------| | [#!/]help | just send help in your group and get the commands | **You can use "#", "!", or "/" to begin all commands * * * # Installation ```sh # Let's install the bot. cd $HOME git clone https://github.com/BeyondTeam/BDReborn.git cd BDReborn chmod +x beyond.sh ./beyond.sh install ./beyond.sh # Enter a phone number & confirmation code. ``` ### One command To install everything in one command, use: ```sh cd $HOME && git clone https://github.com/BeyondTeam/BDReborn.git && cd BDReborn && chmod +x beyond.sh && ./beyond.sh install && ./beyond.sh ``` * * * ### Sudo Open ./bot/bot.lua and add your ID to the "sudo_users" section in the following format: ``` sudo_users = { 157059515, 0, YourID } ``` add your ID at line 74 in bot.lua and add your ID at line 2 in tools.lua, Then restart the bot. # Support and Development More information [Beyond Global Chat](https://t.me/joinchat/AAAAAEGaKOxC8K6cJ3bCcw) # Special thanks to [@nero_dev](https://telegram.me/nero_dev) [@K_a_I_i_I_i_n_u_x](https://telegram.me/K_a_I_i_I_i_n_u_x) [@MrHalix](https://github.com/MrHalix) [@Vysheng](https://github.com/vysheng) * * * # Developers! [SoLiD](https://github.com/solid021) ([Telegram](https://telegram.me/SoLiD)) [To0fan](https://github.com/To0fan) ([Telegram](https://telegram.me/To0fan)) [Tele_Sudo](https://github.com/Tele_Sudo) ([Telegram](https://telegram.me/Tele_Sudo)) [MAKAN](https://github.com/makanj) ([Telegram](https://telegram.me/MAKAN)) [Ali](https://github.com/ali-ghoghnoos) ([Telegram](https://telegram.me/Exacute)) [Rixel](https://github.com/Rixel) ([Telegram](https://telegram.me/Rixel)) [Civey](https://github.com/Oysof) ([Telegram](https://telegram.me/Civey)) ### Our Telegram channel: [@BeyondTeam](https://telegram.me/BeyondTeam)http://https-github.com
All 27 repositories loaded