From 09084c56a3cc59415f5e3f9bc902dfede384fb47 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Thu, 28 Aug 2014 12:09:41 +0200 Subject: [PATCH 001/281] Initial commit --- .gitattributes | 22 ++++ .gitignore | 220 ++++++++++++++++++++++++++++++++++++ LICENSE.md | 4 + LICENSE.txt | 4 + README.md | 52 ++++++++- basicBot.js | 17 +++ commands.md | 104 +++++++++++++++++ setup/exampleSettings.json | 14 +++ setup/settingsGuide.md | 81 +++++++++++++ setup/standardSettings.json | 42 +++++++ 10 files changed, 559 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE.md create mode 100644 LICENSE.txt create mode 100644 basicBot.js create mode 100644 commands.md create mode 100644 setup/exampleSettings.json create mode 100644 setup/settingsGuide.md create mode 100644 setup/standardSettings.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..412eeda7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..4201a77d --- /dev/null +++ b/.gitignore @@ -0,0 +1,220 @@ +################# +## Eclipse +################# + +*.pydevproject +.project +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.classpath +.settings/ +.loadpath + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# CDT-specific +.cproject + +# PDT-specific +.buildpath + + +################# +## Visual Studio +################# + +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.sln.docstates + +# Build results + +[Dd]ebug/ +[Rr]elease/ +x64/ +build/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +*_i.c +*_p.c +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.log +*.scc + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +*.ncrunch* +.*crunch*.local.xml + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.Publish.xml +*.pubxml + +# NuGet Packages Directory +## TODO: If you have NuGet Package Restore enabled, uncomment the next line +#packages/ + +# Windows Azure Build Output +csx +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +sql/ +*.Cache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.[Pp]ublish.xml +*.pfx +*.publishsettings + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +App_Data/*.mdf +App_Data/*.ldf + +############# +## Windows detritus +############# + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Mac crap +.DS_Store + + +############# +## Python +############# + +*.py[co] + +# Packages +*.egg +*.egg-info +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg + +############# +## Webstorms +############# +.idea diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 00000000..ba6249d8 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,4 @@ +Copyright © 2014 ***REMOVED*** + +Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. +This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..9048228a --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,4 @@ +Copyright 2014 ***REMOVED*** + +Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. +This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. \ No newline at end of file diff --git a/README.md b/README.md index 12fbf233..a523a260 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,54 @@ basicBot ======== -A not so basic bot for plug.dj +IMPORTANT +--------- + +__basicBot is currently being updated to work under plug's update from Tuesday, August 28th. Please check back here later to see if it is available again. +Please disable any scripts/extensions which have not been updated by their creators yet, as they may cause issues with the new plug. More info can be found [here](http://blog.plug.dj/2014/07/message-to-those-using-extensions-or-bots/)__ + +__The repository has been reset to allow for a better organisation of commits and branches.__ + +Usage +----- + +_Will be updated after the bot has is ready for use._ + +###Commands### + +These can be found in [the commands file](https://github.com/***REMOVED***/basicBot/blob/master/commands.md). + +###Special settings### + +_Will be updated after the bot has is ready for use._ + +###Extending functionality### + +_Will be updated after the bot has is ready for use._ + +Credits +------- + +I would like to thank the following people: + +- Fungus: His Tastybot has been a source of inspiration for most of the features, and his help with coding problems has been invaluable to make this bot. +- TAT, Origin and other Litebot contributors: Their Litebot has inspired features like Roulette. +- Henchman: Never knew this undertaking would give me a friend too. + + +Copyright +--------- + +Copyright © 2014 ***REMOVED*** + +Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. +This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. + + +Disclaimer +---------- + +This bot is developed independently. Changes may be made without notice. There is no guarantee for the perfect functioning. +Plug.dj admins have the right to request changes. +By using this chatbot you agree to not use it for violating plug.dj's Terms of Service. +You also agree not to alter the bot's code. Any requests for changes can be requested via email, through github or via plug.dj. \ No newline at end of file diff --git a/basicBot.js b/basicBot.js new file mode 100644 index 00000000..b61152a3 --- /dev/null +++ b/basicBot.js @@ -0,0 +1,17 @@ +/** + *Copyright 2014 ***REMOVED*** + *Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. + *This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. + */ + + +(function(){ + + var msg = "basicBot is currently under maintenance to work under plug's new update, please try again later."; + + if(typeof API !== "undefined" && typeof API.chatLog === "function"){ + API.chatLog(msg); + } + console.warn(msg); + +}).call(this); \ No newline at end of file diff --git a/commands.md b/commands.md new file mode 100644 index 00000000..2383c006 --- /dev/null +++ b/commands.md @@ -0,0 +1,104 @@ +Commands: +========= + +X specifies a number +arguments between ( ) are optional + + +Manager +------- + +|Command | Arguments | Description | +|:------:|:---------:|:--------------------------------------:| +|!afklimit | X | sets the maximum afk time | +|!clearchat | |clears the chat | +|!cycle | | toggle DJ cycle | +|!cycletimer | X | set the maximum DJ cycle time for when cycleguard is enabled | +|!locktimer | X | set the maximum time the waitlist can be locked if lockguard is enabled | +|!refresh | | refreshes the browser of whoever runs the bot | +|!usercmdcd | X | set the cooldown on commands by grey users | +|!usercommands | | toggle user commands | + +Bouncer+ +-------- + +|Command | Arguments | Description | +|:------:|:---------:|:--------------------------------------:| +|!add | @user | add user to the waitlist | +|!afkremoval | | toggles the afk check | +|!autoskip | | skips songs automatically when they're done (use when the circles-bug happens) | +|!bouncer+ | | disable bouncer+ | +|!lock | | lock the waitlist | +|!lockdown | | lock down the room: only staff can chat | +|!maxlength | X | specify the maximum length a song can be when timeguard is enabled | +|!move | @user (X) | moves user to position X on the waitlist, default is position 1 | +|!remove | @user | remove user from the waitlist | +|!roulette | | start a roulette | +|!unlock | | unlock the waitlist | +|!welcome | | toggle the welcome message on user join | + +Bouncer +------- + +|Command | Arguments | Description | +|:------:|:---------:|:--------------------------------------:| +|!active | (X) | shows how many users chatted in the past X minutes. If no X specified, 60 is set as default | +|!afkreset | @user | resets the afk time of user | +|!afktime | @user | shows how long user has been afk | +|!ban | @user | bans user for 1 day | +|!cycleguard | | toggles the cycleguard | +|!dclookup / !dc | (@user) | do dclookup for user | +|!english | @user | ask user to speak english (asked in the language they set plug to) | +|!eta | (@user) | shows when user will reach the booth | +|!filter | | toggles the chat filter | +|!jointime | @user | shows how long the user has been in the room | +|!kick | (X) | kicks user for X minutes, default is 0.25 minutes (15 seconds) | +|!kill | ||shut down the bot | +|!lockguard | | toggle the lockguard | +|!lockskip | (reason) | skip the song and move the dj back up (the position can be set with !lockskippos) | +|!lockskippos | X | set the position to which lockskip moves the dj | +|!motd | (X)/(message) | when no argument is specified, returns the Message of the Day, when X is specified, the MotD is given every X songs, when "message" is given, it sets the MotD to message | +|!mute | @user (X) | mute user, for X minutes if X is specified, otherwise for an undefined period | +|!reload | | reload the bot | +|!restricteta | | toggles the restriction on eta: grey users can use it once an hour | +|!sessionstats | | display stats for the current session | +|!skip | | skip the current song | +|!status | | display the bot's status and some settings | +|!timeguard | | toggle the timeguard | +|!togglemotd | | toggle the motd | +|!unban | @user | unban user | +|!unmute | | unmute user | +|!voteratio | @user | display the vote statistic for a user | + +Resident DJ +----------- + +|Command | Arguments | Description | +|:------:|:---------:|:--------------------------------------:| +|!link | | give a link to the current song + + + +User +---- + +|Command | Arguments | Description | +|:------:|:---------:|:--------------------------------------:| +|!autowoot | | links to PlugCubed, the advised script/plugin to use for autowooting | +|!ba | | explains the Brand Ambassador rank | +|!commands | | gives a link to the commands | +|!cookie | (@user) | give a cookie to user | +|!dclookup / !dc | | use dclookup on yourself | +|!emoji | | a link to a list with emoji's | +|!eta | | shows how long before you reach the booth | +|!fb | | links to the room's Facebook page (if set in the settings) | +|!help | | links to an image to help get people started on plug | +|!join | | join the roulette if it's up | +|!leave | | leave the roulette if you joined | +|!link | | when the user is the DJ, give a link to the current song | +|!op | | links to the OverPlayed list (if set in the settings) | +|!ping | | pong! | +|!rules | | links to the rules (if set in the settings) | +|!theme | | links to the room's theme (if set in the settings) | +|!website | | links to the room's website (if set in the settings) | +|!youtube | | links to the room's youtube page (if set in the settings) | diff --git a/setup/exampleSettings.json b/setup/exampleSettings.json new file mode 100644 index 00000000..df65cdc3 --- /dev/null +++ b/setup/exampleSettings.json @@ -0,0 +1,14 @@ +{ + "afkRankCheck": "user", + "filterChat": false, + "etaRestriction": false, + "welcome": true, + "opLink": "www.op.com", + "rulesLink": "www.rules.com", + "themeLink": "www.theme.com", + "fbLink": "https://www.facebook.com/plugdj", + "youtubeLink": "www.youtube.com", + "website": "www.myroom.com", + "intervalMessages": ["Message 1", "Message 2"], + "messageInterval": 4 +} \ No newline at end of file diff --git a/setup/settingsGuide.md b/setup/settingsGuide.md new file mode 100644 index 00000000..83bdf816 --- /dev/null +++ b/setup/settingsGuide.md @@ -0,0 +1,81 @@ +Roomsettings +============ + +Creating a settings file +------------------------ + +A settings file is a .json file that contains all the settings you want the bot to use as default. +The easiest way to set this up is to download the provided settings file at https://github.com/***REMOVED***/basicBot/blob/master/standardSettings.json and edit that. Settings you don't want to change can be deleted, the bot will use it's default settings then. Make sure that the last setting isn't followed by a , though! If this is the case, the file won't work. +The basic structure is: +``` +{ + "setting1": value1, + "setting2": value2, + ... + "settingX": valueX +} +``` + +Both standardSettings.json and exampleSettings.json can be used as examples, the settings are described in detail below. + +Using your settings file +------------------------ + +To use the settings file, it will need to be stored somewhere public. The easiest way to do this is to upload it to dropbox or googledrive, and get a public link for it. +In your room description, include at the end (if you use custom plucubed settings, place it above that): + +`@basicBot=www.mylink.com/settings.json` + +with your link instead of the example. Follow it by a space or an enter to make sure the bot finds it. + +Settings explained +------------------ + +Try to keep numbers integers: no decimals. +Strings go between " ", if you want to use " in your string, use \". +Booleans are either 'true' or 'false', without the '. + +- "maximumAfk": the amount of minutes a user can be afk for the afkCheck if it's enabled, type: a number +- "afkRemoval": turn afkCheck on or off, type: boolean +- "maximumDc": users that disconnected not longer than this amount of minutes ago, can get their spot back, type: a number +- "bouncerPlus": turn the bouncer+ mode on or off, type: boolean +- "lockdownEnabled": turn lockdown on or off, lockdown means that only staff can chat, leave it false +-"lockGuard": turn the lockguard on or off, lockguard makes sure the waitlist isn't locked longer than the maximum allowed time, type: a boolean: true/false +- "maximumLocktime": maximum time the waitlist can be locked if lockguard is enabled, type: a number +- "cycleGuard": turn the cycleguard on or off, cycleguard makes sure DJ cycle isn't on longer than the allowed amount of minutes, type: boolean +- "maximumCycletime": maximum time DJ cycle can be enabled if cyleguard is enabled, type: a number +- "timeGuard": turn the timeguard on or off, timeguard makes sure songs are not longer than the specified limit, if they are longer they are skipped immediately, type: boolean +- "maximumSongLength": maximum length of a track if timeguard is enabled, type: a number +- "autodisable": if enabled, the bot sends out !afkdisable and !joindisable every hour, this disables afkmessages and autojoining on plugdubed, type: boolean +- "commandCooldown": the cooldown in seconds for commands for users (there will always be a few seconds cooldown to prevent spamming the servers), type: a number +- "usercommandsEnabled": turn commands for users on or off, type: boolean +- "lockskipPosition": the position to which !lockskip adds users back to the waitlist, type: a number +- "lockskipReasons": possible reasons to add to !lockskip, format like this: + ``` + [ + ["reason1", "explanation1"], + ["reason2", "explanation2"], + ... + ["reasonX", "explanationX"] + ] + ``` +- "afkpositionCheck": only people below this waitlist position will be checked for afk, type: a number +- "afkRankCheck": only people below and with this rank will be checked for afk, possible ranks: + "user", "residentdj", "bouncer", "manager", "cohost", "host", "ambassador", "admin" + eg. "bouncer" will check all grey users, residentdj's and bouncers afk +- "motdEnabled": Message of the Day, best to be left false and to be enabled and set using the commands, MotD displays a message every X songs. Use it for temporary imporant messages, type: boolean +- "motdInterval": standard interval for the MotD, every X songs, type: a number +- "motd": standard MotD, best to set using the !motd command, type: string +- "filterChat": turns the chatfilter on or off, the filter checks for a range of invalid messages like just . 's, excessive caps, asking for skips, some spam and asking for fans, type: boolean +- "etaRestriction": enables the restriction on !eta, the restriction means that grey users can only use it once every hour, this would be used to prevent spamming the command, type: boolean +- "welcome": turn a welcome message for users on or off, type: boolean +- "opLink": an optional link to a list of OverPlayed songs, leave it null to leave it disabled, type: string +- "rulesLink": an optional link to a list of rules, leave it null to leave it disabled, type: string +- "themeLink": an optional link to the room's theme and allowed genres, leave it null to leave it disabled, type: string +- "fbLink": an optional link to a Facebook page, leave it null to leave it disabled, type: string, +- "youtubeLink": an optional link to a youtube, leave it null to leave it disabled, type: string, +- "website": an optional link to a website, leave it null to leave it disabled, type: string, +- "intervalMessages": an array of messages displayed every X songs, leave it empty to not have any default messages, format: + `["message 1", "message 2", "message 3"]` +- "messageInterval": the interval X for the standard messages, type: a number +- "songstats": toggle message with statistics for the previous song, type: boolean \ No newline at end of file diff --git a/setup/standardSettings.json b/setup/standardSettings.json new file mode 100644 index 00000000..8f884f1e --- /dev/null +++ b/setup/standardSettings.json @@ -0,0 +1,42 @@ +{ + "maximumAfk": 120, + "afkRemoval": true, + "maximumDc": 60, + "bouncerPlus": true, + "lockdownEnabled": false, + "lockGuard": false, + "maximumLocktime": 10, + "cycleGuard": true, + "maximumCycletime": 10, + "timeGuard": true, + "maximumSongLength": 10, + "autodisable": true, + "commandCooldown": 30, + "usercommandsEnabled": true, + "lockskipPosition": 3, + "lockskipReasons": [ ["theme", "This song does not fit the room theme. "], + ["op", "This song is on the OP list. "], + ["history", "This song is in the history. "], + ["mix", "You played a mix, which is against the rules. "], + ["sound", "The song you played had bad sound quality or no sound. "], + ["nsfw", "The song you contained was NSFW (image or sound). "], + ["unavailable", "The song you played was not available for some users. "] + ], + "afkpositionCheck": 15, + "afkRankCheck": "ambassador", + "motdEnabled": false, + "motdInterval": 5, + "motd": "Temporary Message of the Day", + "filterChat": true, + "etaRestriction": false, + "welcome": true, + "opLink": null, + "rulesLink": null, + "themeLink": null, + "fbLink": null, + "youtubeLink": null, + "website": null, + "intervalMessages": [], + "messageInterval": 5, + "songstats": true +} \ No newline at end of file From 00bad1966efcb6b9a4e6eea949425ddec306c3c3 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Thu, 28 Aug 2014 12:11:18 +0200 Subject: [PATCH 002/281] Readme update: fixed typo's --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a523a260..9089f45d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ basicBot IMPORTANT --------- -__basicBot is currently being updated to work under plug's update from Tuesday, August 28th. Please check back here later to see if it is available again. +__basicBot is currently being updated to work under plug's update. Please check back here later to see if it is available again. Please disable any scripts/extensions which have not been updated by their creators yet, as they may cause issues with the new plug. More info can be found [here](http://blog.plug.dj/2014/07/message-to-those-using-extensions-or-bots/)__ __The repository has been reset to allow for a better organisation of commits and branches.__ @@ -12,7 +12,7 @@ __The repository has been reset to allow for a better organisation of commits an Usage ----- -_Will be updated after the bot has is ready for use._ +_Will be updated after the bot is ready for use._ ###Commands### @@ -20,11 +20,11 @@ These can be found in [the commands file](https://github.com/***REMOVED***/basic ###Special settings### -_Will be updated after the bot has is ready for use._ +_Will be updated after the bot is ready for use._ ###Extending functionality### -_Will be updated after the bot has is ready for use._ +_Will be updated after the bot is ready for use._ Credits ------- From ec1759335fc71f9ba6bf2a6de973d0dc5d06a90d Mon Sep 17 00:00:00 2001 From: yemasthui Date: Thu, 28 Aug 2014 12:22:54 +0200 Subject: [PATCH 003/281] Initial 2.0.0 commit --- README.md | 33 +- basicBot.js | 2570 ++++++++++++++++++++++++++++++++++- lang/en.json | 129 ++ lang/langIndex.json | 3 + setup/exampleExtension.js | 50 + setup/settingsGuide.md | 4 +- setup/standardSettings.json | 40 +- 7 files changed, 2798 insertions(+), 31 deletions(-) create mode 100644 lang/en.json create mode 100644 lang/langIndex.json create mode 100644 setup/exampleExtension.js diff --git a/README.md b/README.md index 9089f45d..83dd780e 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,29 @@ basicBot IMPORTANT --------- -__basicBot is currently being updated to work under plug's update. Please check back here later to see if it is available again. -Please disable any scripts/extensions which have not been updated by their creators yet, as they may cause issues with the new plug. More info can be found [here](http://blog.plug.dj/2014/07/message-to-those-using-extensions-or-bots/)__ +__basicBot has been updated to work under plug's update. There may still be bugs and functionality is not guaranteed.__ -__The repository has been reset to allow for a better organisation of commits and branches.__ +__Make sure to update your bookmark, as the link has changed recently!!!__ + +__Important changes in version 2.x.x:__ + +- Now should be fully compatible with Firefox. +- You can now change the bot's name, no need to make a fork to change it anymore. Available under custom settings as "botName". +- The bot's variable is now exposed outside of the script. You can access it as the variable "bot" in the console. This should allow for secondary scripts extending the bot without the need to fork and lose support on its basis. +Be careful when extending it to make sure commands or features interact properly with the rest of them. +An example script to extend the bot is provided under exampleExtension.js. Please do not fork this repository to just change that file. Details of how to use are provided inside. +This is NOT needed to run the bot as it is provided, only if you want to add functionality. +- Command checking has been reworked to facilitate adding commands through secondary scripts as explained above. +- __There is now support for custom chat messages. This means you can use your own custom wording or translate it into your own language.__ Usage ----- -_Will be updated after the bot is ready for use._ +Bookmark the following code. To run the bot, run the bookmark. + +`javascript:(function(){$.getScript('https://rawgit.com/***REMOVED***/basicBot/master/basicBot.js');})();` + +If this does not work, go to https://raw.githubusercontent.com/***REMOVED***/basicBot/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing f12) when on plug.dj in your community. ###Commands### @@ -20,11 +34,18 @@ These can be found in [the commands file](https://github.com/***REMOVED***/basic ###Special settings### -_Will be updated after the bot is ready for use._ +See [the settings guide](https://github.com/***REMOVED***/basicBot/blob/master/setup/settingsGuide.md). + +###Translations### + +Official translations will be supported. Available ones can be found under [the language folder](https://github.com/***REMOVED***/basicBot/blob/master/lang/langIndex.json). Yuu can set a language in the room settings. +You can use your own translation or wording by translating the values of in [the english pack](https://github.com/***REMOVED***/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service, like you would for custom room settings. However, you need to put this link into your custom room settings, under chatLink. + ###Extending functionality### -_Will be updated after the bot is ready for use._ +An example of the bots functionality being extended can be found [here](https://github.com/***REMOVED***/basicBot/blob/master/setup/exampleExtensions.md). +Please do not try to if you are not confident in your javascript capabilities. Credits ------- diff --git a/basicBot.js b/basicBot.js index b61152a3..6d03f90f 100644 --- a/basicBot.js +++ b/basicBot.js @@ -5,13 +5,2571 @@ */ -(function(){ +(function () { - var msg = "basicBot is currently under maintenance to work under plug's new update, please try again later."; + var kill = function () { + clearInterval(basicBot.room.autodisableInterval); + clearInterval(basicBot.room.afkInterval); + basicBot.status = false; + }; - if(typeof API !== "undefined" && typeof API.chatLog === "function"){ - API.chatLog(msg); - } - console.warn(msg); + var storeToStorage = function () { + localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); + localStorage.setItem("basicBotRoom", JSON.stringify(basicBot.room)); + var basicBotStorageInfo = { + time: Date.now(), + stored: true, + version: basicBot.version + }; + localStorage.setItem("basicBotStorageInfo", JSON.stringify(basicBotStorageInfo)); + }; + + var subChat = function(chat, obj){ + var lit = '%%'; + for(var prop in obj){ + chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); + } + }; + + var loadChat = function(){ + $.get("https://rawgit.com/***REMOVED***/basicBot/development/lang/langIndex.json", function(json){ + var link = basicBot.chatLink; + if(json !== null && typeof json !== "undefined"){ + langIndex = JSON.parse(json); + link = langIndex[basicBot.settings.language]; + if(basicBot.settings.chatLink !== basicBot.chatLink){ + link = basicBot.settings.chatLink; + } + else{ + if(typeof link === "undefined"){ + link = basicBot.chatLink; + } + } + $.get(link, function (json) { + if (json !== null && typeof json !== "undefined") { + basicBot.chat = JSON.parse(json); + } + }); + } + else{ + $.get(basicBot.chatLink, function (json) { + if (json !== null && typeof json !== "undefined") { + basicBot.chat = JSON.parse(json); + } + }); + } + }); + }; + + var retrieveFromStorage = function () { + var info = localStorage.getItem("basicBotStorageInfo"); + if (info === null) API.chatLog(basicBot.chat.nodatafound); + else { + var settings = JSON.parse(localStorage.getItem("basicBotsettings")); + var room = JSON.parse(localStorage.getItem("basicBotRoom")); + var elapsed = Date.now() - JSON.parse(info).time; + if ((elapsed < 1 * 60 * 60 * 1000)) { + API.chatLog(basicBot.chat.retrievingdata); + for (var prop in settings) { + basicBot.settings[prop] = settings[prop]; + } + basicBot.room.users = room.users; + basicBot.room.afkList = room.afkList; + basicBot.room.historyList = room.historyList; + basicBot.room.mutedUsers = room.mutedUsers; + basicBot.room.autoskip = room.autoskip; + basicBot.room.roomstats = room.roomstats; + basicBot.room.messages = room.messages; + basicBot.room.queue = room.queue; + API.chatLog(basicBot.chat.datarestored); + } + } + var json_sett = null; + var roominfo = document.getElementById("room-info"); + info = roominfo.innerText; + var ref_bot = "@basicBot="; + var ind_ref = info.indexOf(ref_bot); + if (ind_ref > 0) { + var link = info.substring(ind_ref + ref_bot.length, info.length); + var ind_space = null; + if (link.indexOf(" ") < link.indexOf("\n")) ind_space = link.indexOf(" "); + else ind_space = link.indexOf("\n"); + link = link.substring(0, ind_space); + $.get(link, function (json) { + if (json !== null && typeof json !== "undefined") { + json_sett = JSON.parse(json); + for (var prop in json_sett) { + basicBot.settings[prop] = json_sett[prop]; + } + } + }); + } + + }; + + var basicBot = { + version: "2.0.0dev", + status: false, + name: "basicBot", + creator: "Matthew aka. ***REMOVED***", + creatorIDs: [], + loggedInID: null, + scriptLink: "https://rawgit.com/***REMOVED***/basicBot/development/basicBot.js", + cmdLink: "http://git.io/245Ppg", + chatLink: "https://rawgit.com/***REMOVED***/basicBot/development/lang/en.json", + chat: null, + settings: { + botName: "basicBot", + language: "english", + chatLink: "https://rawgit.com/***REMOVED***/basicBot/development/lang/en.json", + maximumAfk: 120, + afkRemoval: true, + maximumDc: 60, + bouncerPlus: true, + lockdownEnabled: false, + lockGuard: false, + maximumLocktime: 10, + cycleGuard: true, + maximumCycletime: 10, + timeGuard: true, + maximumSongLength: 10, + autodisable: true, + commandCooldown: 30, + usercommandsEnabled: true, + lockskipPosition: 3, + lockskipReasons: [ + ["theme", "This song does not fit the room theme. "], + ["op", "This song is on the OP list. "], + ["history", "This song is in the history. "], + ["mix", "You played a mix, which is against the rules. "], + ["sound", "The song you played had bad sound quality or no sound. "], + ["nsfw", "The song you contained was NSFW (image or sound). "], + ["unavailable", "The song you played was not available for some users. "] + ], + afkpositionCheck: 15, + afkRankCheck: "ambassador", + motdEnabled: false, + motdInterval: 5, + motd: "Temporary Message of the Day", + filterChat: true, + etaRestriction: false, + welcome: true, + opLink: null, + rulesLink: null, + themeLink: null, + fbLink: null, + youtubeLink: null, + website: null, + intervalMessages: [], + messageInterval: 5, + songstats: true, + commandLiteral: "!" + }, + room: { + users: [], + afkList: [], + mutedUsers: [], + bannedUsers: [], + skippable: true, + usercommand: true, + allcommand: true, + afkInterval: null, + autoskip: false, + autoskipTimer: null, + autodisableInterval: null, + autodisableFunc: function () { + if (basicBot.status && basicBot.settings.autodisable) { + API.sendChat('!afkdisable'); + API.sendChat('!joindisable'); + } + }, + queueing: 0, + queueable: true, + currentDJID: null, + historyList: [], + cycleTimer: setTimeout(function () { + }, 1), + roomstats: { + accountName: null, + totalWoots: 0, + totalCurates: 0, + totalMehs: 0, + launchTime: null, + songCount: 0, + chatmessages: 0 + }, + messages: { + from: [], + to: [], + message: [] + }, + queue: { + id: [], + position: [] + }, + roulette: { + rouletteStatus: false, + participants: [], + countdown: null, + startRoulette: function () { + basicBot.room.roulette.rouletteStatus = true; + basicBot.room.roulette.countdown = setTimeout(function () { + basicBot.room.roulette.endRoulette(); + }, 60 * 1000); + API.sendChat(basicBot.chat.isopen); + }, + endRoulette: function () { + basicBot.room.roulette.rouletteStatus = false; + var ind = Math.floor(Math.random() * basicBot.room.roulette.participants.length); + var winner = basicBot.room.roulette.participants[ind]; + basicBot.room.roulette.participants = []; + var pos = Math.floor((Math.random() * API.getWaitList().length) + 1); + var user = basicBot.userUtilities.lookupUser(winner); + var name = user.username; + API.sendChat(subChat(basicBot.chat.winnerpicked, {name: name, position: pos})); + setTimeout(function (winner, pos) { + basicBot.userUtilities.moveUser(winner, pos, false); + }, 1 * 1000, winner, pos); + } + } + }, + User: function (id, name) { + this.id = id; + this.username = name; + this.jointime = Date.now(); + this.lastActivity = Date.now(); + this.votes = { + woot: 0, + meh: 0, + curate: 0 + }; + this.lastEta = null; + this.afkWarningCount = 0; + this.afkCountdown = null; + this.inRoom = true; + this.isMuted = false; + this.lastDC = { + time: null, + position: null, + songCount: 0 + }; + this.lastKnownPosition = null; + }, + userUtilities: { + getJointime: function (user) { + return user.jointime; + }, + getUser: function (user) { + return API.getUser(user.id); + }, + updatePosition: function (user, newPos) { + user.lastKnownPosition = newPos; + }, + updateDC: function (user) { + user.lastDC.time = Date.now(); + user.lastDC.position = user.lastKnownPosition; + user.lastDC.songCount = basicBot.room.roomstats.songCount; + }, + setLastActivity: function (user) { + user.lastActivity = Date.now(); + user.afkWarningCount = 0; + clearTimeout(user.afkCountdown); + }, + getLastActivity: function (user) { + return user.lastActivity; + }, + getWarningCount: function (user) { + return user.afkWarningCount; + }, + setWarningCount: function (user, value) { + user.afkWarningCount = value; + }, + lookupUser: function (id) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === id) { + return basicBot.room.users[i]; + } + } + return false; + }, + lookupUserName: function (name) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[i]).username === name) { + return basicBot.room.users[i]; + } + } + return false; + }, + voteRatio: function (id) { + var user = basicBot.userUtilities.lookupUser(id); + var votes = user.votes; + if (votes.meh === 0) votes.ratio = 1; + else votes.ratio = (votes.woot / votes.meh).toFixed(2); + return votes; + + }, + getPermission: function (obj) { //1 requests + var u; + if (typeof obj === "object") u = obj; + else u = API.getUser(obj); + if(basicBot.creatorIDs.indexOf(u.id) > -1) return 10; + if (u.gRole < 2) return u.role; + else { + switch (u.gRole) { + case 2: + return 7; + case 3: + return 8; + case 4: + return 9; + case 5: + return 10; + } + } + return 0; + }, + moveUser: function (id, pos, priority) { + var user = basicBot.userUtilities.lookupUser(id); + var wlist = API.getWaitList(); + if (API.getWaitListPosition(id) === -1) { + if (wlist.length < 50) { + API.moderateAddDJ(id); + if (pos !== 0) setTimeout(function (id, pos) { + API.moderateMoveDJ(id, pos); + }, 1250, id, pos); + } + else { + var alreadyQueued = -1; + for (var i = 0; i < basicBot.room.queue.id.length; i++) { + if (basicBot.room.queue.id[i] === id) alreadyQueued = i; + } + if (alreadyQueued !== -1) { + basicBot.room.queue.position[alreadyQueued] = pos; + return API.sendChat(subChat(basicBot.chat.alreadyadding, {position: basicBot.room.queue.position[alreadyQueued]})); + } + basicBot.roomUtilities.booth.lockBooth(); + if (priority) { + basicBot.room.queue.id.unshift(id); + basicBot.room.queue.position.unshift(pos); + } + else { + basicBot.room.queue.id.push(id); + basicBot.room.queue.position.push(pos); + } + var name = user.username; + return API.sendChat(subChat(basicBot.chat.adding, {name: name, position: basicBot.room.queue.position.length})); + } + } + else API.moderateMoveDJ(id, pos); + }, + dclookup: function (id) { + var user = basicBot.userUtilities.lookupUser(id); + if (typeof user === 'boolean') return basicBot.chat.usernotfound; + var name = user.username; + if (user.lastDC.time === null) return subChat(basicBot.chat.notdisconnected, {name: name}); + var dc = user.lastDC.time; + var pos = user.lastDC.position; + if (pos === null) return basicBot.chat.noposition; + var timeDc = Date.now() - dc; + var validDC = false; + if (basicBot.settings.maximumDc * 60 * 1000 > timeDc) { + validDC = true; + } + var time = basicBot.roomUtilities.msToStr(timeDc); + if (!validDC) return (subChat(basicBot.chat.toolongago, {name: basicBot.userUtilities.getUser(user).username, time: time})); + var songsPassed = basicBot.room.roomstats.songCount - user.lastDC.songCount; + var afksRemoved = 0; + var afkList = basicBot.room.afkList; + for (var i = 0; i < afkList.length; i++) { + var timeAfk = afkList[i][1]; + var posAfk = afkList[i][2]; + if (dc < timeAfk && posAfk < pos) { + afksRemoved++; + } + } + var newPosition = user.lastDC.position - songsPassed - afksRemoved; + if (newPosition <= 0) newPosition = 1; + var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); + basicBot.userUtilities.moveUser(user.id, newPosition, true); + return msg; + } + }, + + roomUtilities: { + rankToNumber: function (rankString) { + var rankInt = null; + switch (rankString) { + case "admin": + rankInt = 10; + break; + case "ambassador": + rankInt = 7; + break; + case "host": + rankInt = 5; + break; + case "cohost": + rankInt = 4; + break; + case "manager": + rankInt = 3; + break; + case "bouncer": + rankInt = 2; + break; + case "residentdj": + rankInt = 1; + break; + case "user": + rankInt = 0; + break; + } + return rankInt; + }, + 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.minutes < 1 && timeAway.hours < 1 && timeAway.days < 1) { + msg += timeAway.seconds.toString() + 's'; + } + if (msg !== '') { + return msg; + } else { + return false; + } + }, + booth: { + lockTimer: setTimeout(function () { + }, 1000), + locked: false, + lockBooth: function () { + API.moderateLockWaitList(!basicBot.roomUtilities.booth.locked); + basicBot.roomUtilities.booth.locked = false; + if (basicBot.settings.lockGuard) { + basicBot.roomUtilities.booth.lockTimer = setTimeout(function () { + API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); + }, basicBot.settings.maximumLocktime * 60 * 1000); + } + }, + unlockBooth: function () { + API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); + clearTimeout(basicBot.roomUtilities.booth.lockTimer); + } + }, + afkCheck: function () { + if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); + var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); + var djlist = API.getWaitList(); + var lastPos = Math.min(djlist.length, basicBot.settings.afkpositionCheck); + if (lastPos - 1 > djlist.length) return void (0); + for (var i = 0; i < lastPos; i++) { + if (typeof djlist[i] !== 'undefined') { + var id = djlist[i].id; + var user = basicBot.userUtilities.lookupUser(id); + if (typeof user !== 'boolean') { + var plugUser = basicBot.userUtilities.getUser(user); + if (rank !== null && basicBot.userUtilities.getPermission(plugUser) <= rank) { + var name = plugUser.username; + var lastActive = basicBot.userUtilities.getLastActivity(user); + var inactivity = Date.now() - lastActive; + var time = basicBot.roomUtilities.msToStr(inactivity); + var warncount = user.afkWarningCount; + if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { + if (warncount === 0) { + API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); + user.afkWarningCount = 3; + user.afkCountdown = setTimeout(function (userToChange) { + userToChange.afkWarningCount = 1; + }, 90 * 1000, user); + } + else if (warncount === 1) { + API.sendChat(subChat(basicBot.chat.warning2, {name: name})); + user.afkWarningCount = 3; + user.afkCountdown = setTimeout(function (userToChange) { + userToChange.afkWarningCount = 2; + }, 30 * 1000, user); + } + else if (warncount === 2) { + var pos = API.getWaitListPosition(id); + if (pos !== -1) { + pos++; + basicBot.room.afkList.push([id, Date.now(), pos]); + user.lastDC = { + + time: null, + position: null, + songCount: 0 + }; + API.moderateRemoveDJ(id); + API.sendChat(subChat(basicBot.chat.afkremove, {name: name, time: time, position: pos, maximumafk: basicBot.settings.maximumAfk})); + } + user.afkWarningCount = 0; + } + } + } + } + } + } + }, + changeDJCycle: function () { + var toggle = $(".cycle-toggle"); + if (toggle.hasClass("disabled")) { + toggle.click(); + if (basicBot.settings.cycleGuard) { + basicBot.room.cycleTimer = setTimeout(function () { + if (toggle.hasClass("enabled")) toggle.click(); + }, basicBot.settings.cycleMaxTime * 60 * 1000); + } + } + else { + toggle.click(); + clearTimeout(basicBot.room.cycleTimer); + } + }, + intervalMessage: function () { + var interval; + if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; + else interval = basicBot.settings.messageInterval; + if ((basicBot.room.roomstats.songCount % interval) === 0 && basicBot.status) { + var msg; + if (basicBot.settings.motdEnabled) { + msg = basicBot.settings.motd; + } + else { + if (basicBot.settings.intervalMessages.length === 0) return void (0); + var messageNumber = basicBot.room.roomstats.songCount % basicBot.settings.intervalMessages.length; + msg = basicBot.settings.intervalMessages[messageNumber]; + } + API.sendChat('/me ' + msg); + } + } + }, + eventChat: function (chat) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === chat.uid) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); + if (basicBot.room.users[i].username !== chat.un) { + basicBot.room.users[i].username = chat.un; + } + } + } + if (basicBot.chatUtilities.chatFilter(chat)) return void (0); + if (!basicBot.chatUtilities.commandCheck(chat)) + basicBot.chatUtilities.action(chat); + }, + eventUserjoin: function (user) { + var known = false; + var index = null; + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === user.id) { + known = true; + index = i; + } + } + var greet = true; + var welcomeback = null; + if (known) { + basicBot.room.users[index].inRoom = true; + var u = basicBot.userUtilities.lookupUser(user.id); + var jt = u.jointime; + var t = Date.now() - jt; + if (t < 10 * 1000) greet = false; + else welcomeback = true; + } + else { + basicBot.room.users.push(new basicBot.User(user.id, user.username)); + welcomeback = false; + } + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === user.id) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); + basicBot.room.users[j].jointime = Date.now(); + } + + } + if (basicBot.settings.welcome && greet) { + welcomeback ? + setTimeout(function (user) { + API.sendChat(subChat(basicBot.chat.welcomeback, {name: user.username})); + }, 1 * 1000, user) + : + setTimeout(function (user) { + API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); + }, 1 * 1000, user); + } + }, + eventUserleave: function (user) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === user.id) { + basicBot.userUtilities.updateDC(basicBot.room.users[i]); + basicBot.room.users[i].inRoom = false; + } + } + }, + eventVoteupdate: function (obj) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === obj.user.id) { + if (obj.vote === 1) { + basicBot.room.users[i].votes.woot++; + } + else { + basicBot.room.users[i].votes.meh++; + } + } + } + }, + eventCurateupdate: function (obj) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === obj.user.id) { + basicBot.room.users[i].votes.curate++; + } + } + }, + eventDjadvance: function (obj) { + var lastplay = obj.lastPlay; + if (typeof lastplay === 'undefined') return void (0); + if (basicBot.settings.songstats) API.sendChat("/me " + lastplay.media._previousAttributes.author + " - " + lastplay.media._previousAttributes.title + ": " + lastplay.score.positive + "W/" + lastplay.score.curates + "G/" + lastplay.score.negative + "M.") + basicBot.room.roomstats.totalWoots += lastplay.score.positive; + basicBot.room.roomstats.totalMehs += lastplay.score.negative; + basicBot.room.roomstats.totalCurates += lastplay.score.curates; + basicBot.room.roomstats.songCount++; + basicBot.roomUtilities.intervalMessage(); + basicBot.room.currentDJID = API.getDJ().id; + var alreadyPlayed = false; + for (var i = 0; i < basicBot.room.historyList.length; i++) { + if (basicBot.room.historyList[i][0] === obj.media.cid) { + var firstPlayed = basicBot.room.historyList[i][1]; + var plays = basicBot.room.historyList[i].length - 1; + var lastPlayed = basicBot.room.historyList[i][plays]; + API.sendChat(subChat(basicBot.chat.songknown, {plays: plays, timetotal: basicBot.roomUtilities.msToStr(Date.now() - firstPlayed), lasttime: basicBot.roomUtilities.msToStr(Date.now() - lastPlayed)})); + basicBot.room.historyList[i].push(+new Date()); + alreadyPlayed = true; + } + } + if (!alreadyPlayed) { + basicBot.room.historyList.push([obj.media.cid, +new Date()]); + } + var newMedia = obj.media; + if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { + var name = obj.dj.username; + API.sendChat(subChat(chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); + API.moderateForceSkip(); + } + var user = basicBot.userUtilities.lookupUser(obj.dj.id); + if (user.ownSong) { + API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); + user.ownSong = false; + } + user.lastDC = { + time: null, + position: null, + songCount: 0 + }; + clearTimeout(basicBot.room.autoskipTimer); + if (basicBot.room.autoskip) { + var remaining = media.duration * 1000; + basicBot.room.autoskipTimer = setTimeout(function () { + API.moderateForceSkip(); + }, remaining - 500); + } + storeToStorage(); + + }, + eventWaitlistupdate: function (users) { + if (users.length < 50) { + if (basicBot.room.queue.id.length > 0 && basicBot.room.queueable) { + basicBot.room.queueable = false; + setTimeout(function () { + basicBot.room.queueable = true; + }, 500); + basicBot.room.queueing++; + var id, pos; + setTimeout( + function () { + id = basicBot.room.queue.id.splice(0, 1)[0]; + pos = basicBot.room.queue.position.splice(0, 1)[0]; + API.moderateAddDJ(id, pos); + setTimeout( + function (id, pos) { + API.moderateMoveDJ(id, pos); + basicBot.room.queueing--; + if (basicBot.room.queue.id.length === 0) setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1000, id, pos); + }, 1000 + basicBot.room.queueing * 2500); + } + } + for (var i = 0; i < users.length; i++) { + var user = basicBot.userUtilities.lookupUser(users[i].id); + basicBot.userUtilities.updatePosition(user, users[i].wlIndex + 1); + } + }, + chatcleaner: function (chat) { + if (!basicBot.settings.filterChat) return false; + if (basicBot.userUtilities.getPermission(chat.uid) > 1) return false; + var msg = chat.message; + var containsLetters = false; + for (var i = 0; i < msg.length; i++) { + ch = msg.charAt(i); + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch === ':' || ch === '^') containsLetters = true; + } + if (msg === '') { + return true; + } + if (!containsLetters && (msg.length === 1 || msg.length > 3)) return true; + msg = msg.replace(/[ ,;.:\/=~+%^*\-\\"'&@#]/g, ''); + var capitals = 0; + var ch; + for (var i = 0; i < msg.length; i++) { + ch = msg.charAt(i); + if (ch >= 'A' && ch <= 'Z') capitals++; + } + if (capitals >= 40) { + API.sendChat(subChat(basicBot.chat.caps, {name: chat.un})); + return true; + } + msg = msg.toLowerCase(); + if (msg === 'skip') { + API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); + return true; + } + for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { + if (msg === basicBot.chatUtilities.spam[j]) { + API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); + return true; + } + } + return false; + }, + chatUtilities: { + chatFilter: function (chat) { + var msg = chat.message; + var perm = basicBot.userUtilities.getPermission(chat.uid); + var user = basicBot.userUtilities.lookupUser(chat.uid); + var isMuted = false; + for (var i = 0; i < basicBot.room.mutedUsers.length; i++) { + if (basicBot.room.mutedUsers[i] === chat.uid) isMuted = true; + } + if (isMuted) { + API.moderateDeleteChat(chat.cid); + return true; + } + if (basicBot.settings.lockdownEnabled) { + if (perm === 0) { + API.moderateDeleteChat(chat.cid); + return true; + } + } + if (basicBot.chatcleaner(chat)) { + API.moderateDeleteChat(chat.cid); + return true; + } + var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; + if (plugRoomLinkPatt.exec(msg)) { + if (perm === 0) { + API.sendChat(subChat(basicBot.chat.roomadvertising, {name: chat.un})); + API.moderateDeleteChat(chat.cid); + return true; + } + } + if (msg.indexOf('http://adf.ly/') > -1) { + API.moderateDeleteChat(chat.cid); + API.sendChat(subChat(basicBot.chat.adfly, {name: chat.un})); + return true; + } + if (msg.indexOf('autojoin was not enabled') > 0 || msg.indexOf('AFK message was not enabled') > 0 || msg.indexOf('!afkdisable') > 0 || msg.indexOf('!joindisable') > 0 || msg.indexOf('autojoin disabled') > 0 || msg.indexOf('AFK message disabled') > 0) { + API.moderateDeleteChat(chat.cid); + return true; + } + var joinedroulette = basicBot.chat.roulettejoin.split('%%NAME%%'); + if(joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; + else joinedroulette = joinedroulette[0]; + + var leftroulette = basicBot.chat.rouletteleave.split('%%NAME%%'); + if(leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; + else leftroulette = leftroulette[0]; + + if ((msg.indexOf(joinedroulette) > -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { + setTimeout(function (id) { + API.moderateDeleteChat(id); + }, 2 * 1000, chat.cid); + return true; + } + return false; + }, + commandCheck: function (chat) { + var cmd; + if (chat.message.charAt(0) === '!') { + var space = chat.message.indexOf(' '); + if (space === -1) { + cmd = chat.message; + } + else cmd = chat.message.substring(0, space); + } + else return false; + var userPerm = basicBot.userUtilities.getPermission(chat.uid); + if (chat.message !== "!join" && chat.message !== "!leave") { + if (userPerm === 0 && !basicBot.room.usercommand) return void (0); + if (!basicBot.room.allcommand) return void (0); + } + if (chat.message === '!eta' && basicBot.settings.etaRestriction) { + if (userPerm < 2) { + var u = basicBot.userUtilities.lookupUser(chat.uid); + if (u.lastEta !== null && (Date.now() - u.lastEta) < 1 * 60 * 60 * 1000) { + API.moderateDeleteChat(chat.cid); + return void (0); + } + else u.lastEta = Date.now(); + } + } + var executed = false; + + for (var comm in basicBot.commands) { + var cmdCall = comm.command; + if(!Array.isArray(comm.command)) cmdCall = [cmdCall]; + for(var ind in cmdCall){ + if (basicBot.settings.commandLiteral + cmdCall[ind] === cmd) { + comm.functionality(chat, basicBot.settings.commandLiteral + cmdCall[ind]); + executed = true; + break; + } + } + } + + if (executed && userPerm === 0) { + basicBot.room.usercommand = false; + setTimeout(function () { + basicBot.room.usercommand = true; + }, basicBot.settings.commandCooldown * 1000); + } + if (executed) { + API.moderateDeleteChat(chat.cid); + basicBot.room.allcommand = false; + setTimeout(function () { + basicBot.room.allcommand = true; + }, 5 * 1000); + } + return executed; + }, + action: function (chat) { + var user = basicBot.userUtilities.lookupUser(chat.uid); + if (chat.type === 'message') { + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === chat.uid) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); + } + + } + } + basicBot.room.roomstats.chatmessages++; + }, + spam: [ + 'hueh', 'hu3', 'brbr', 'heu', 'brbr', 'kkkk', 'spoder', 'mafia', 'zuera', 'zueira', + 'zueria', 'aehoo', 'aheu', 'alguem', 'algum', 'brazil', 'zoeira', 'fuckadmins', 'affff', 'vaisefoder', 'huenaarea', + 'hitler', 'ashua', 'ahsu', 'ashau', 'lulz', 'huehue', 'hue', 'huehuehue', 'merda', 'pqp', 'puta', 'mulher', 'pula', 'retarda', 'caralho', 'filha', 'ppk', + 'gringo', 'fuder', 'foder', 'hua', 'ahue', 'modafuka', 'modafoka', 'mudafuka', 'mudafoka', 'ooooooooooooooo', 'foda' + ], + curses: [ + 'nigger', 'faggot', 'nigga', 'niqqa', 'motherfucker', 'modafocka' + ], + beggarSentences: ['fanme', 'funme', 'becomemyfan', 'trocofa', 'fanforfan', 'fan4fan', 'fan4fan', 'hazcanfanz', 'fun4fun', 'fun4fun', + 'meufa', 'fanz', 'isnowyourfan', 'reciprocate', 'fansme', 'givefan', 'fanplz', 'fanpls', 'plsfan', 'plzfan', 'becomefan', 'tradefan', + 'fanifan', 'bemyfan', 'retribui', 'gimmefan', 'fansatfan', 'fansplz', 'fanspls', 'ifansback', 'fanforfan', 'addmefan', 'retribuo', + 'fantome', 'becomeafan', 'fan-to-fan', 'fantofan', 'canihavefan', 'pleasefan', 'addmeinfan', 'iwantfan', 'fanplease', 'ineedfan', + 'ineedafan', 'iwantafan', 'bymyfan', 'fannme', 'returnfan', 'bymyfan', 'givemeafan', 'sejameufa', 'sejameusfa', 'sejameuf��', + 'sejameusf��', 'f��please', 'f��pls', 'f��plz', 'fanxfan', 'addmetofan', 'fanzafan', 'fanzefan', 'becomeinfan', 'backfan', + 'viremmeuseguidor', 'viremmeuseguir', 'fanisfan', 'funforfun', 'anyfanaccept', 'anyfanme', 'fan4fan', 'fan4fan', 'turnmyfan', + 'turnifan', 'beafanofme', 'comemyfan', 'plzzfan', 'plssfan', 'procurofan', 'comebackafan', 'fanyfan', 'givemefan', 'fan=fan', + 'fan=fan', 'fan+fan', 'fan+fan', 'fanorfan', 'beacomeafanofme', 'beacomemyfan', 'bcomeafanofme', 'bcomemyfan', 'fanstofan', + 'bemefan', 'trocarfan', 'fanforme', 'fansforme', 'allforfan', 'fansintofans', 'fanintofan', 'f(a)nme', 'prestomyfan', + 'presstomyfan', 'fanpleace', 'fanspleace', 'givemyafan', 'addfan', 'addsmetofan', 'f4f', 'canihasfan', 'canihavefan', + 'givetomeafan', 'givemyfan', 'phanme', 'fanforafan', 'fanvsfan', 'fanturniturn', 'fanturninturn', 'sejammeufa', + 'sejammeusfa', 'befanofme', 'faninfan', 'addtofan', 'fanthisaccount', 'fanmyaccount', 'fanback', 'addmeforfan', + 'fans4fan', 'fans4fan', 'fanme', 'fanmyaccount', 'fanback', 'addmeforfan', 'fans4fan', 'fans4fan', 'fanme', 'turnfanwhocontribute', + "bemefan", "bemyfan", "beacomeafanofme", "beacomemyfan", "becameyafan", "becomeafan", + "becomefan", "becomeinfan", "becomemyfan", "becomemyfans", "bouncerplease", "bouncerpls", + "brbrbrbr", "brbrbrbr", "bymyfan", "canihasfan", "canihavefan", "caralho", + "clickmynametobecomeafan", "comebackafan", "comemyfan", "dosfanos", "everyonefan", + "everyonefans", "exchangefan", "f4f", "f&n", "f(a)nme", "f@nme", "��@nme", "f4f", "f4n4f4n", + "f4nforf4n", "f4nme", "f4n4f4n", "f��", "f��", "f��������please", "f��������pls", "f��������plz", "fan:four:fan", + 'fanme', 'funme', 'becomemyfan', 'trocofa', 'fanforfan', 'fan4fan', 'fan4fan', 'hazcanfanz', + 'fun4fun', 'fun4fun', 'meufa', 'fanz', 'isnowyourfan', 'reciprocate', 'fansme', 'givefan', + 'fanplz', 'fanpls', 'plsfan', 'plzfan', 'becomefan', 'tradefan', 'fanifan', 'bemyfan', + 'retribui', 'gimmefan', 'fansatfan', 'fansplz', 'fanspls', 'ifansback', 'fanforfan', + 'addmefan', 'retribuo', 'fantome', 'becomeafan', 'fan-to-fan', 'fantofan', + 'canihavefan', 'pleasefan', 'addmeinfan', 'iwantfan', 'fanplease', 'ineedfan', + 'ineedafan', 'iwantafan', 'bymyfan', 'fannme', 'returnfan', 'bymyfan', 'givemeafan', + 'sejameufa', 'sejameusfa', 'sejameufã', 'sejameusfã', 'fãplease', 'fãpls', 'fãplz', + 'fanxfan', 'addmetofan', 'fanzafan', 'fanzefan', 'becomeinfan', 'backfan', + 'viremmeuseguidor', 'viremmeuseguir', 'fanisfan', 'funforfun', 'anyfanaccept', + 'anyfanme', 'fan4fan', 'fan4fan', 'turnmyfan', 'turnifan', 'beafanofme', 'comemyfan', + 'plzzfan', 'plssfan', 'procurofan', 'comebackafan', 'fanyfan', 'givemefan', 'fan=fan', + 'fan=fan', 'fan+fan', 'fan+fan', 'fanorfan', 'beacomeafanofme', 'beacomemyfan', + 'bcomeafanofme', 'bcomemyfan', 'fanstofan', 'bemefan', 'trocarfan', 'fanforme', + 'fansforme', 'allforfan', 'fnme', 'fnforfn', 'fansintofans', 'fanintofan', 'f(a)nme', 'prestomyfan', + 'presstomyfan', 'fanpleace', 'fanspleace', 'givemyafan', 'addfan', 'addsmetofan', + 'f4f', 'canihasfan', 'canihavefan', 'givetomeafan', 'givemyfan', 'phanme', 'but i need please fan', + 'fanforafan', 'fanvsfan', 'fanturniturn', 'fanturninturn', 'sejammeufa', + 'sejammeusfa', 'befanofme', 'faninfan', 'addtofan', 'fanthisaccount', + 'fanmyaccount', 'fanback', 'addmeforfan', 'fans4fan', 'fans4fan', 'fanme', 'bemyfanpls', 'befanpls', 'f4f', 'fanyfan' + ] + }, + connectAPI: function () { + this.proxy = { + eventChat: $.proxy(this.eventChat, this), + eventUserskip: $.proxy(this.eventUserskip, this), + eventUserjoin: $.proxy(this.eventUserjoin, this), + eventUserleave: $.proxy(this.eventUserleave, this), + eventUserfan: $.proxy(this.eventUserfan, this), + eventFriendjoin: $.proxy(this.eventFriendjoin, this), + eventFanjoin: $.proxy(this.eventFanjoin, this), + eventVoteupdate: $.proxy(this.eventVoteupdate, this), + eventCurateupdate: $.proxy(this.eventCurateupdate, this), + eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), + eventDjadvance: $.proxy(this.eventDjadvance, this), + eventDjupdate: $.proxy(this.eventDjupdate, this), + eventWaitlistupdate: $.proxy(this.eventWaitlistupdate, this), + eventVoteskip: $.proxy(this.eventVoteskip, this), + eventModskip: $.proxy(this.eventModskip, this), + eventChatcommand: $.proxy(this.eventChatcommand, this), + eventHistoryupdate: $.proxy(this.eventHistoryupdate, this) + + }; + API.on(API.CHAT, this.proxy.eventChat); + API.on(API.USER_SKIP, this.proxy.eventUserskip); + API.on(API.USER_JOIN, this.proxy.eventUserjoin); + API.on(API.USER_LEAVE, this.proxy.eventUserleave); + API.on(API.USER_FAN, this.proxy.eventUserfan); + API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); + API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); + API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); + API.on(API.ADVANCE, this.proxy.eventDjadvance); + API.on(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); + API.on(API.MOD_SKIP, this.proxy.eventModskip); + API.on(API.CHAT_COMMAND, this.proxy.eventChatcommand); + API.on(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); + }, + disconnectAPI: function () { + API.off(API.CHAT, this.proxy.eventChat); + API.off(API.USER_SKIP, this.proxy.eventUserskip); + API.off(API.USER_JOIN, this.proxy.eventUserjoin); + API.off(API.USER_LEAVE, this.proxy.eventUserleave); + API.off(API.USER_FAN, this.proxy.eventUserfan); + API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); + API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); + API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); + API.off(API.ADVANCE, this.proxy.eventDjadvance); + API.off(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); + API.off(API.MOD_SKIP, this.proxy.eventModskip); + API.off(API.CHAT_COMMAND, this.proxy.eventChatcommand); + API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); + }, + startup: function () { + var u = API.getUser(); + if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); + if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); + this.connectAPI(); + retrieveFromStorage(); + if (basicBot.room.roomstats.launchTime === null) { + basicBot.room.roomstats.launchTime = Date.now(); + } + loadChat(); + for (var j = 0; j < basicBot.room.users.length; j++) { + basicBot.room.users[j].inRoom = false; + } + var userlist = API.getUsers(); + for (var i = 0; i < userlist.length; i++) { + var known = false; + var ind = null; + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.room.users[j].id === userlist[i].id) { + known = true; + ind = j; + } + } + if (known) { + basicBot.room.users[ind].inRoom = true; + } + else { + basicBot.room.users.push(new basicBot.User(userlist[i].id, userlist[i].username)); + ind = basicBot.room.users.length - 1; + } + var wlIndex = API.getWaitListPosition(basicBot.room.users[ind].id) + 1; + basicBot.userUtilities.updatePosition(basicBot.room.users[ind], wlIndex); + } + basicBot.room.afkInterval = setInterval(function () { + basicBot.roomUtilities.afkCheck() + }, 10 * 1000); + basicBot.room.autodisableInterval = setInterval(function () { + basicBot.room.autodisableFunc(); + }, 60 * 60 * 1000); + basicBot.loggedInID = API.getUser().id; + basicBot.status = true; + API.sendChat('/cap 1'); + API.setVolume(0); + API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version})); + window.bot = basicBot; + }, + commands: { + executable: function (minRank, chat) { + var id = chat.uid; + var perm = basicBot.userUtilities.getPermission(id); + var minPerm; + switch (minRank) { + case 'admin': + minPerm = 10; + break; + case 'ambassador': + minPerm = 7; + break; + case 'host': + minPerm = 5; + break; + case 'cohost': + minPerm = 4; + break; + case 'manager': + minPerm = 3; + break; + case 'mod': + if (basicBot.settings.bouncerPlus) { + minPerm = 2; + } + else { + minPerm = 3; + } + break; + case 'bouncer': + minPerm = 2; + break; + case 'residentdj': + minPerm = 1; + break; + case 'user': + minPerm = 0; + break; + default: + API.chatLog('error assigning minimum permission'); + } + return perm >= minPerm; + + }, + /** + command: { + command: 'cmd', + rank: 'user/bouncer/mod/manager', + type: 'startsWith/exact', + functionality: function(chat, cmd){ + if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if( !basicBot.commands.executable(this.rank, chat) ) return void (0); + else{ + + } + } + }, + **/ + + activeCommand: { + command: 'active', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var now = Date.now(); + var chatters = 0; + var time; + if (msg.length === cmd.length) time = 60; + else { + time = msg.substring(cmd.length + 1); + if (isNaN(time)) return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + for (var i = 0; i < basicBot.room.users.length; i++) { + userTime = basicBot.userUtilities.getLastActivity(basicBot.room.users[i]); + if ((now - userTime) <= (time * 60 * 1000)) { + chatters++; + } + } + API.sendChat(subChat(basicBot.chat.activeusersintime, {name: chat.un, amount: chatters, time: time})); + } + } + }, + + addCommand: { + command: 'add', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (msg.length > cmd.length + 2) { + if (typeof user !== 'undefined') { + if (basicBot.room.roomevent) { + basicBot.room.eventArtists.push(user.id); + } + basicBot.userUtilities.moveUser(user.id, 0, false); + } else API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + } + } + } + }, + + afklimitCommand: { + command: 'afklimit', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolimitspecified, {name: chat.un})); + var limit = msg.substring(cmd.length + 1); + if (!isNaN(limit)) { + basicBot.settings.maximumAfk = parseInt(limit, 10); + API.sendChat(subChat(basicBot.chat.maximumafktimeset, {name: chat.un, time: basicBot.settings.maximumAfk})); + } + else API.sendChat(subChat(basicBot.chat.invalidlimitspecified, {name: chat.un})); + } + } + }, + + afkremovalCommand: { + command: 'afkremoval', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.afkRemoval) { + basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; + clearInterval(basicBot.room.afkInterval); + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.afkremoval})); + } + else { + basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; + basicBot.room.afkInterval = setInterval(function () { + basicBot.roomUtilities.afkCheck() + }, 2 * 1000); + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.afkremoval})); + } + } + } + }, + + afkresetCommand: { + command: 'afkreset', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + basicBot.userUtilities.setLastActivity(user); + API.sendChat(subChat(basicBot.chat.afkstatusreset, {name: chat.un, username: name})); + } + } + }, + + afktimeCommand: { + command: 'afktime', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var lastActive = basicBot.userUtilities.getLastActivity(user); + var inactivity = Date.now() - lastActive; + var time = basicBot.roomUtilities.msToStr(inactivity); + API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); + } + } + }, + + autoskipCommand: { + command: 'autoskip', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.autoskip) { + basicBot.settings.autoskip = !basicBot.settings.autoskip; + clearTimeout(basicBot.room.autoskipTimer); + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); + } + else { + basicBot.settings.autoskip = !basicBot.settings.autoskip; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); + } + } + } + }, + + autowootCommand: { + command: 'autowoot', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.autowoot); + } + } + }, + + baCommand: { + command: 'ba', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.brandambassador); + } + } + }, + + banCommand: { + command: 'ban', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + API.moderateBanUser(user.id, 1, API.BAN.DAY); + } + } + }, + + bouncerPlusCommand: { + command: 'bouncer+', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (basicBot.settings.bouncerPlus) { + basicBot.settings.bouncerPlus = false; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': 'Bouncer+'})); + } + else { + if (!basicBot.settings.bouncerPlus) { + var id = chat.uid; + var perm = basicBot.userUtilities.getPermission(id); + if (perm > 2) { + basicBot.settings.bouncerPlus = true; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': 'Bouncer+'})); + } + } + else return API.sendChat(subChat(basicBot.chat.bouncerplusrank, {name: chat.un})); + } + } + } + }, + + clearchatCommand: { + command: 'clearchat', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var currentchat = $('#chat-messages').children(); + for (var i = 0; i < currentchat.length; i++) { + for (var j = 0; j < currentchat[i].classList.length; j++) { + if (currentchat[i].classList[j].indexOf('cid-') == 0) + API.moderateDeleteChat(currentchat[i].classList[j].substr(4)); + } + } + return API.sendChat(subChat(basicBot.chat.chatcleared,{name: chat.un})); + } + } + }, + + commandsCommand: { + command: 'commands', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); + } + } + }, + + cookieCommand: { + command: 'cookie', + rank: 'user', + type: 'startsWith', + cookies: ['has given you a chocolate chip cookie!', + 'has given you a soft homemade oatmeal cookie!', + 'has given you a plain, dry, old cookie. It was the last one in the bag. Gross.', + 'gives you a sugar cookie. What, no frosting and sprinkles? 0/10 would not touch.', + 'gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!', + 'gives you an enormous cookie. Poking it gives you more cookies. Weird.', + 'gives you a fortune cookie. It reads "Why aren\'t you working on any projects?"', + 'gives you a fortune cookie. It reads "Give that special someone a compliment"', + 'gives you a fortune cookie. It reads "Take a risk!"', + 'gives you a fortune cookie. It reads "Go outside."', + 'gives you a fortune cookie. It reads "Don\'t forget to eat your veggies!"', + 'gives you a fortune cookie. It reads "Do you even lift?"', + 'gives you a fortune cookie. It reads "m808 pls"', + 'gives you a fortune cookie. It reads "If you move your hips, you\'ll get all the ladies."', + 'gives you a fortune cookie. It reads "I love you."', + 'gives you a Golden Cookie. You can\'t eat it because it is made of gold. Dammit.', + 'gives you an Oreo cookie with a glass of milk!', + 'gives you a rainbow cookie made with love :heart:', + 'gives you an old cookie that was left out in the rain, it\'s moldy.', + 'bakes you fresh cookies, it smells amazing.' + ], + getCookie: function () { + var c = Math.floor(Math.random() * this.cookies.length); + return this.cookies[c]; + }, + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + + var space = msg.indexOf(' '); + if (space === -1) { + API.sendChat(basicBot.chat.eatcookie); + return false; + } + else { + var name = msg.substring(space + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false || !user.inRoom) { + return API.sendChat(subChat(basicBot.chat.nousercookie, {name: name})); + } + else if (user.username === chat.un) { + return API.sendChat(subChat(basicBot.chat.selfcookie, {name: name})); + } + else { + return API.sendChat(subChat(basicBot.chat.cookie, {nameto: user.username, namefrom: chat.un, cookie: this.getCookie()})); + } + } + } + } + }, + + cycleCommand: { + command: 'cycle', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.changeDJCycle(); + } + } + }, + + cycleguardCommand: { + command: 'cycleguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.cycleGuard) { + basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cycleguard})); + } + else { + basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cycleguard})); + } + + } + } + }, + + cycletimerCommand: { + command: 'cycletimer', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var cycleTime = msg.substring(cmd.length + 1); + if (!isNaN(cycleTime)) { + basicBot.settings.maximumCycletime = cycleTime; + return API.sendChat(subChat(basicBot.chat.cycleguardtime, {name: chat.un, time: basicBot.settings.maximumCycletime})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + + } + } + }, + + dclookupCommand: { + command: ['dclookup','dc'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substring(cmd.length + 2); + var perm = basicBot.userUtilities.getPermission(chat.uid); + if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var id = user.id; + var toChat = basicBot.userUtilities.dclookup(id); + API.sendChat(toChat); + } + } + }, + + emojiCommand: { + command: 'emoji', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var link = 'http://www.emoji-cheat-sheet.com/'; + API.sendChat(subChat(basicBot.chat.emojilist, {link: link})); + } + } + }, + + etaCommand: { + command: 'eta', + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var perm = basicBot.userUtilities.getPermission(chat.uid); + var msg = chat.message; + var name; + if (msg.length > cmd.length) { + if (perm < 2) return void (0); + name = msg.substring(cmd.length + 2); + } else name = chat.un; + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var pos = API.getWaitListPosition(user.id); + if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); + var timeRemaining = API.getTimeRemaining(); + var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; + var estimateString = basicBot.roomUtilities.msToStr(estimateMS); + API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString})); + } + } + }, + + fbCommand: { + command: 'fb', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.fbLink === "string") + API.sendChat(subChat(basicBot.chat.facebook, {link: basicBot.settings.fbLink})); + } + } + }, + + filterCommand: { + command: 'filter', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.filterChat) { + basicBot.settings.filterChat = !basicBot.settings.filterChat; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.chatfilter})); + } + else { + basicBot.settings.filterChat = !basicBot.settings.filterChat; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.chatfilter})); + } + } + } + }, + + helpCommand: { + command: 'help', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var link = "http://i.imgur.com/SBAso1N.jpg"; + API.sendChat(subChat(basicBot.chat.starterhelp, {link: link})); + } + } + }, + + joinCommand: { + command: 'join', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.roulette.rouletteStatus && basicBot.room.roulette.participants.indexOf(chat.uid) < 0) { + basicBot.room.roulette.participants.push(chat.uid); + API.sendChat(subChat(basicBot.chat.roulettejoin, {name: chat.un})); + } + } + } + }, + + jointimeCommand: { + command: 'jointime', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var join = basicBot.userUtilities.getJointime(user); + var time = Date.now() - join; + var timeString = basicBot.roomUtilities.msToStr(time); + API.sendChat(subChat(basicBot.chat.jointime, {namefrom: chat.un, username: name, time: timeString})); + } + } + }, + + kickCommand: { + command: 'kick', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var lastSpace = msg.lastIndexOf(' '); + var time; + var name; + if (lastSpace === msg.indexOf(' ')) { + time = 0.25; + name = msg.substring(cmd.length + 2); + } + else { + time = msg.substring(lastSpace + 1); + name = msg.substring(cmd.length + 2, lastSpace); + } + + var user = basicBot.userUtilities.lookupUserName(name); + var from = chat.un; + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permTokick = basicBot.userUtilities.getPermission(user.id); + + if (permFrom <= permTokick) + return API.sendChat(subChat(basicBot.chat.kickrank, {name: chat.un})); + + if (!isNaN(time)) { + API.sendChat(subChat(basicBot.chat.kick, {name: chat.un, username: name, time: time})); + if (time > 24 * 60 * 60) API.moderateBanUser(user.id, 1, API.BAN.PERMA); + else API.moderateBanUser(user.id, 1, API.BAN.DAY); + setTimeout(function (id, name) { + API.moderateUnbanUser(id); + console.log('Unbanned @' + name + '.'); + }, time * 60 * 1000, user.id, name); + } + else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + killCommand: { + command: 'kill', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + storeToStorage(); + API.sendChat(basicBot.chat.kill); + basicBot.disconnectAPI(); + setTimeout(function () { + kill(); + }, 1000); + } + } + }, + + leaveCommand: { + command: 'leave', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var ind = basicBot.room.roulette.participants.indexOf(chat.uid); + if (ind > -1) { + basicBot.room.roulette.participants.splice(ind, 1); + API.sendChat(subChat(basicBot.chat.rouletteleave, {name: chat.un})); + } + } + } + }, + + linkCommand: { + command: 'link', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var media = API.getMedia(); + var from = chat.un; + var user = basicBot.userUtilities.lookupUser(chat.uid); + var perm = basicBot.userUtilities.getPermission(chat.uid); + var dj = API.getDJ().id; + var isDj = false; + if (dj === chat.uid) isDj = true; + if (perm >= 1 || isDj) { + if (media.format === '1') { + var linkToSong = "https://www.youtube.com/watch?v=" + media.cid; + API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); + } + if (media.format === '2') { + SC.get('/tracks/' + media.cid, function (sound) { + API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: sound.permalink_url})); + }); + } + } + } + } + }, + + lockCommand: { + command: 'lock', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.booth.lockBooth(); + } + } + }, + + lockdownCommand: { + command: 'lockdown', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var temp = basicBot.settings.lockdownEnabled; + basicBot.settings.lockdownEnabled = !temp; + if (basicBot.settings.lockdownEnabled) { + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockdown})); + } + else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); + } + } + }, + + lockguardCommand: { + command: 'lockguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.lockGuard) { + basicBot.settings.lockGuard = !basicBot.settings.lockGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); + } + else { + basicBot.settings.lockGuard = !basicBot.settings.lockGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockguard})); + } + } + } + }, + + lockskipCommand: { + command: 'lockskip', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.skippable) { + var dj = API.getDJ(); + var id = dj.id; + var name = dj.username; + var msgSend = '@' + name + ': '; + basicBot.room.queueable = false; + + if (chat.message.length === cmd.length) { + API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); + basicBot.roomUtilities.booth.lockBooth(); + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1500, id); + }, 1000, id); + return void (0); + } + var validReason = false; + var msg = chat.message; + var reason = msg.substring(cmd.length + 1); + for (var i = 0; i < basicBot.settings.lockskipReasons.length; i++) { + var r = basicBot.settings.lockskipReasons[i][0]; + if (reason.indexOf(r) !== -1) { + validReason = true; + msgSend += basicBot.settings.lockskipReasons[i][1]; + } + } + if (validReason) { + API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); + basicBot.roomUtilities.booth.lockBooth(); + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + API.sendChat(msgSend); + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1500, id); + }, 1000, id); + return void (0); + } + } + } + } + }, + + lockskipposCommand: { + command: 'lockskippos', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var pos = msg.substring(cmd.length + 1); + if (!isNaN(pos)) { + basicBot.settings.lockskipPosition = pos; + return API.sendChat(subChat(basicBot.chat.lockskippos, {name: chat.un, position: basicBot.settings.lockskipPosition})); + } + else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); + } + } + }, + + locktimerCommand: { + command: 'locktimer', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var lockTime = msg.substring(cmd.length + 1); + if (!isNaN(lockTime)) { + basicBot.settings.maximumLocktime = lockTime; + return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, position: basicBot.settings.maximumLocktime})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + maxlengthCommand: { + command: 'maxlength', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var maxTime = msg.substring(cmd.length + 1); + if (!isNaN(maxTime)) { + basicBot.settings.maximumSongLength = maxTime; + return API.sendChat(subChat(basicBot.chat.maxlengthtime, {name: chat.un, time: basicBot.settings.maximumSongLength})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + motdCommand: { + command: 'motd', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat('/me MotD: ' + basicBot.settings.motd); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.motdEnabled) basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + if (isNaN(argument)) { + basicBot.settings.motd = argument; + API.sendChat(subChat(basicBot.chat.motdset, {msg: basicBot.settings.motd})); + } + else { + basicBot.settings.motdInterval = argument; + API.sendChat(subChat(basicBot.chat.motdintervalset, {interval: basicBot.settings.motdInterval})); + } + } + } + }, + + moveCommand: { + command: 'move', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var firstSpace = msg.indexOf(' '); + var lastSpace = msg.lastIndexOf(' '); + var pos; + var name; + if (isNaN(parseInt(msg.substring(lastSpace + 1)))) { + pos = 1; + name = msg.substring(cmd.length + 2); + } + else { + pos = parseInt(msg.substring(lastSpace + 1)); + name = msg.substring(cmd.length + 2, lastSpace); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + if (user.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbotwaitlist, {name: chat.un})); + if (!isNaN(pos)) { + API.sendChat(subChat(basicBot.chat.move, {name: chat.un})); + basicBot.userUtilities.moveUser(user.id, pos, false); + } else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); + } + } + }, + + muteCommand: { + command: 'mute', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var lastSpace = msg.lastIndexOf(' '); + var time = null; + var name; + if (lastSpace === msg.indexOf(' ')) { + name = msg.substring(cmd.length + 2); + } + else { + time = msg.substring(lastSpace + 1); + if (isNaN(time)) { + return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + name = msg.substring(cmd.length + 2, lastSpace); + } + var from = chat.un; + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permFrom > permUser) { + basicBot.room.mutedUsers.push(user.id); + if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); + else { + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === id) { + indexMuted = i; + wasMuted = true; + } + } + if (indexMuted > -1) { + basicBot.room.mutedUsers.splice(indexMuted); + var u = basicBot.userUtilities.lookupUser(id); + var name = u.username; + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + }, time * 60 * 1000, user.id); + } + } + else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); + } + } + }, + + opCommand: { + command: 'op', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.opLink === "string") + return API.sendChat(subChat(basicBot.chat.oplist, {link: basicBot.settings.opLink})); + } + } + }, + + pingCommand: { + command: 'ping', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.pong) + } + } + }, + + refreshCommand: { + command: 'refresh', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + storeToStorage(); + basicBot.disconnectAPI(); + setTimeout(function () { + window.location.reload(false); + }, 1000); + + } + } + }, + + reloadCommand: { + command: 'reload', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.reload); + basicBot.disconnectAPI(); + kill(); + setTimeout(function () { + $.getScript(basicBot.scriptLink); + }, 2000); + } + } + }, + + removeCommand: { + command: 'remove', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length > cmd.length + 2) { + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user !== 'boolean') { + user.lastDC = { + time: null, + position: null, + songCount: 0 + }; + API.moderateRemoveDJ(user.id); + } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); + } else API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + } + } + }, + + restrictetaCommand: { + command: 'restricteta', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.etaRestriction) { + basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.etarestriction})); + } + else { + basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.etarestriction})); + } + } + } + }, + + rouletteCommand: { + command: 'roulette', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (!basicBot.room.roulette.rouletteStatus) { + basicBot.room.roulette.startRoulette(); + } + } + } + }, + + rulesCommand: { + command: 'rules', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.rulesLink === "string") + return API.sendChat(subChat(basicBot.chat.roomrules, {link: basicBot.settings.rulesLink})); + } + } + }, + + sessionstatsCommand: { + command: 'sessionstats', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var from = chat.un; + var woots = basicBot.room.roomstats.totalWoots; + var mehs = basicBot.room.roomstats.totalMehs; + var grabs = basicBot.room.roomstats.totalCurates; + API.sendChat(subChat(basicBot.chat.sessionstats, {name: from, woots: woots, mehs: mehs, grabs: grabs})); + } + } + }, + + skipCommand: { + command: 'skip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.skip, {name: chat.un})); + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + + } + } + }, + + sourceCommand: { + command: 'source', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat('/me This bot was made by ' + basicBot.creator + '.'); + } + } + }, + + statusCommand: { + command: 'status', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var from = chat.un; + var msg = '/me [@' + from + '] '; + + msg += basicBot.chat.afkremoval + ': '; + if (basicBot.settings.afkRemoval) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + msg += basicBot.chat.afksremoved + ": " + basicBot.room.afkList.length + '. '; + msg += basicBot.chat.afklimit + ': ' + basicBot.settings.maximumAfk + '. '; + + msg += 'Bouncer+: '; + if (basicBot.settings.bouncerPlus) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.lockguard + ': '; + if (basicBot.settings.lockGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.cycleguard + ': '; + if (basicBot.settings.cycleGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.timeguard + ': '; + if (basicBot.settings.timeGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.chatfilter + ': '; + if (basicBot.settings.filterChat) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + var since = basicBot.roomUtilities.msToStr(durationOnline); + msg += subChat(basicBot.chat.activefor, {time: since}); + + return API.sendChat(msg); + } + } + }, + + swapCommand: { + command: 'swap', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var firstSpace = msg.indexOf(' '); + var lastSpace = msg.lastIndexOf(' '); + var name1 = msg.substring(cmd.length + 2, lastSpace); + var name2 = msg.substring(lastSpace + 2); + var user1 = basicBot.userUtilities.lookupUserName(name1); + var user2 = basicBot.userUtilities.lookupUserName(name2); + if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); + if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); + var p1 = API.getWaitListPosition(user1.id); + var p2 = API.getWaitListPosition(user2.id); + if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); + API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); + if (p1 < p2) { + basicBot.userUtilities.moveUser(user2.id, p1, false); + setTimeout(function (user1, p2) { + basicBot.userUtilities.moveUser(user1.id, p2, false); + }, 2000, user1, p2); + } + else { + basicBot.userUtilities.moveUser(user1.id, p2, false); + setTimeout(function (user2, p1) { + basicBot.userUtilities.moveUser(user2.id, p1, false); + }, 2000, user2, p1); + } + } + } + }, + + themeCommand: { + command: 'theme', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.themeLink === "string") + API.sendChat(subChat(basicBot.chat.genres, {link: basicBot.settings.themeLink})); + } + } + }, + + timeguardCommand: { + command: 'timeguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.timeGuard) { + basicBot.settings.timeGuard = !basicBot.settings.timeGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.timeguard})); + } + else { + basicBot.settings.timeGuard = !basicBot.settings.timeGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.timeguard})); + } + + } + } + }, + + togglemotdCommand: { + command: 'togglemotd', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.motdEnabled) { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.motd})); + } + else { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.motd})); + } + } + } + }, + + unbanCommand: { + command: 'unban', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + $(".icon-population").click(); + $(".icon-ban").click(); + setTimeout(function (chat) { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat() + var name = msg.substring(cmd.length + 2); + var bannedUsers = API.getBannedUsers(); + var found = false; + for (var i = 0; i < bannedUsers.length; i++) { + var user = bannedUsers[i]; + if (user.username === name) { + id = user.id; + found = true; + } + } + if (!found) { + $(".icon-chat").click(); + return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); + } + API.moderateUnbanUser(user.id); + console.log("Unbanned " + name); + setTimeout(function () { + $(".icon-chat").click(); + }, 1000); + }, 1000, chat); + } + } + }, + + unlockCommand: { + command: 'unlock', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.booth.unlockBooth(); + } + } + }, + + unmuteCommand: { + command: 'unmute', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + + if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { + if (permFrom > 2) { + basicBot.room.mutedUsers = []; + return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); + } + else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); + } + + var from = chat.un; + var name = msg.substr(cmd.length + 2); + + var user = basicBot.userUtilities.lookupUserName(name); + + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permFrom > permUser) { + + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === user.id) { + indexMuted = i; + wasMuted = true; + } + + } + if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + basicBot.room.mutedUsers.splice(indexMuted); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); + } + } + }, + + usercmdcdCommand: { + command: 'usercmdcd', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var cd = msg.substring(cmd.length + 1); + if (!isNaN(cd)) { + basicBot.settings.commandCooldown = cd; + return API.sendChat(subChat(basicBot.chat.commandscd, {name: chat.un, time: basicBot.settings.commandCooldown})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + usercommandsCommand: { + command: 'usercommands', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.usercommandsEnabled) { + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.usercommands})); + basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; + } + else { + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.usercommands})); + basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; + } + } + } + }, + + voteratioCommand: { + command: 'voteratio', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false) return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var vratio = user.votes; + var ratio = vratio.woot / vratio.meh; + API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woots: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); + } + } + }, + + welcomeCommand: { + command: 'welcome', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.welcome) { + basicBot.settings.welcome = !basicBot.settings.welcome; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + } + else { + basicBot.settings.welcome = !basicBot.settings.welcome; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + } + } + } + }, + + websiteCommand: { + command: 'website', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.website === "string") + API.sendChat(subChat(basicBot.chat.website, {link: basicBot.settings.website})); + } + } + }, + + youtubeCommand: { + command: 'youtube', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.youtubeLink === "string") + API.sendChat(subChat(basicBot.chat.youtube, {name: chat.un, link: basicBot.settings.youtubeLink})); + } + } + } + } + }; + + basicBot.startup(); }).call(this); \ No newline at end of file diff --git a/lang/en.json b/lang/en.json new file mode 100644 index 00000000..1b1b8888 --- /dev/null +++ b/lang/en.json @@ -0,0 +1,129 @@ +{ + + "nodatafound": "No previous data found.", + "retrievingdata": "Retrieving previously stored data.", + "datarestored": "Previously stored data successfully retrieved.", + "greyuser": "Only bouncers and up can run a bot.", + "bouncer": "The bot can't move people when it's run as a bouncer.", + "online": "/me %%BOTNAME%% v%%VERSION%% online!", + + + "welcome": "/me Welcome %%NAME%%", + "welcomeback": "/me Welcome back, %%NAME%%", + "songknown": "/me :repeat: This song has been played %%PLAYS%% time(s) in the last %%TIMETOTAL%%, last play was %%LASTTIME%% ago. :repeat:", + "timelimit": "/me @%%NAME%%, your song is longer than %%MAXLENGTH%% minutes, you need permission to play longer songs.", + "permissionownsong": "/me :up: @%%NAME%% has permission to play their own production!", + + + "isopen": "/me The roulette is now open! Type !join to participate!", + "winnerpicked": "/me A winner has been picked! @%%NAME%% to position %%POSITION%%.", + + + "alreadyadding": "/me User is already being added! Changed the desired position to %%POSITION%%.", + "adding": "/me Added @%%NAME%% to the queue. Current queue: %%POSITION%%.", + + + "usernotfound": "/me User not found.", + "notdisconnected": "/me @%%NAME%% did not disconnect during my time here.", + "noposition": "/me No last position known. The waitlist needs to update at least once to register a user's last position.", + "toolongago": "/me @%%NAME%%'s last disconnect (DC or leave) was too long ago: %%TIME%%.", + "valid": "/me @%%NAME%% disconnected %%TIME%% ago and should be at position %%POSITION%%.", + + + "warning1": "/me @%%NAME%%, you have been afk for %%TIME%%, please respond within 2 minutes or you will be removed.", + "warning2": "/me @%%NAME%%, you will be removed due to AFK soon if you don't respond.", + "afkremove": "/me @%%NAME%%, you have been removed for being afk for %%TIME%%. You were at position %%POSITION%%. Chat at least once every %%MAXIMUMAFK%% minutes if you want to play a song.", + + + "caps": "/me @%%NAME%%, unglue your capslock button please.", + "askskip": "/me @%%NAME%%, don't ask for skips.", + "spam": "/me @%%NAME%%, please don't spam.", + "roomadvertising": "/me @%%NAME%%, don't post links to other rooms please.", + "adfly": "/me @%%NAME%%, please change your autowoot program. We suggest PlugCubed: http://plugcubed.net/", + + + "invalidtime": "/me [@%%NAME%%] Invalid time specified.", + "nouserspecified": "/me [@%%NAME%%] No user specified.", + "invaliduserspecified": "/me [@%%NAME%%] Invalid user specified.", + "novaliduserspecified": "/me [@%%NAME%%] No valid user specified.", + "nolimitspecified": "/me [@%%NAME%%] No limit specified.", + "invalidlimitspecified": "/me [@%%NAME%%] Invalid limit.", + "invalidpositionspecified": "/me [@%%NAME%%] Invalid position specified.", + "toggleon": "/me [@%%NAME%%] %%FUNCTION%% enabled.", + "toggleoff": "/me [@%%NAME%%] %%FUNCTION%% disabled.", + "afkremoval": "AFK removal", + "afksremoved": "AFK's removed", + "afklimit": "AFK limit", + "autoskip": "autoskip", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "chatfilter", + "lockdown": "lockdown", + "lockguard": "lockguard", + "usercommands": "usercommands", + "motd": "MotD", + "welcomemsg": "welcome message", + "etarestriction": "eta restriction", + "activeusersintime": "/me [@%%NAME%% There have been %%AMOUNT%% users chatting in the past %%TIME%% minutes.", + "maximumafktimeset": "/me [@%%NAME%%] Maximum afk duration set to %%TIME%% minutes.", + "afkstatusreset": "/me [@%%NAME%%] Reset the afk status of @%%USERNAME%%.", + "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% has been inactive for %%TIME%%.", + "autowoot": "/me We recommend PlugCubed for autowooting: http://plugcubed.net/", + "brandambassador": "/me A Brand Ambassador is the voice of the plug.dj users. They promote events, engage the community and share the plug.dj message around the world. For more info: http://blog.plug.dj/brand-ambassadors/", + "bouncerplusrank": "/me [@%%NAME%%] You have to be manager or up to enable Bouncer+.", + "chatcleared": "/me [@%%NAME%%] Cleared the chat.", + "commandslink": "/me %%BOTNAME%% commands: %%LINK%%", + "eatcookie": "/me eats a cookie.", + "nousercookie": "/em doesn't see %%NAME%% in room and eats a cookie himself.", + "selfcookie": "/me @%%NAME, you're a bit greedy, aren't you? Giving cookies to yourself, bah. Share some with other people!", + "cookie": "/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "/me [@%%NAME%%] The cycleguard is set to %%TIME%% minute(s).", + "dclookuprank": "/me [@%%NAME%%] Only bouncers and above can do a lookup for others.", + "emojilist": "/me Emoji list: %%LINK%%", + "notinwaitlist": "/me @%%NAME%%, you are not on the waitlist.", + "eta": "/me @%%NAME%% you will reach the booth in approximately %%TIME%%.", + "facebook": "/me Like us on facebook: %%LINK%%", + "starterhelp": "/me This image will get you started on plug: %%LINK%%", + "roulettejoin": "/me @%%NAME%% joined the roulette! (!leave if you regret it.)", + "jointime": "/me [@%%NAMEFROM%%] @%%USERNAME%% has been in the room for %%TIME%%.", + "kickrank": "/me [@%%NAME%%] you can't kick users with an equal or higher rank than you!", + "kick": "/me [@%%NAME%%], @%%USERNAME%% you are being kicked from the community for %%TIME%% minutes.", + "kill": "/me Shutting down.", + "rouletteleave": "/me @%%NAME%% left the roulette!", + "songlink": "/me [@%%NAME%%] Link to current song: %%LINK%%", + "usedlockskip": "/me [%%NAME%% used lockskip.]", + "lockskippos": "/me [@%%NAME%%] Lockskip will now move the dj to position %%POSITION%%.", + "lockguardtime": "/me [@%%NAME%%] The lockguard is set to %%TIME%% minute(s).", + "maxlengthtime": "/me [@%%NAME%%] The maximum song duration is set to %%TIME%% minutes.", + "motdset": "/me MotD set to: %%MSG%%", + "motdintervalset": "/me MotD interval set to %%INTERVAL%%.", + "addbotwaitlist": "/me @%%NAME%%, don't try to add me to the waitlist, please.", + "move": "/me [%%NAME%% used move.]", + "mutednotime": "/me [@%%NAME%%] Muted @%%USERNAME%%.", + "mutedtime": "/me [@%%NAME%%] Muted @%%USERNAME%% for %%TIME%% minutes.", + "unmuted": "/me [@%%NAME%%] Unmuted @%%USERNAME%%.", + "muterank": "/me [@%%NAME%%] You can't mute persons with an equal or higher rank than you.", + "oplist": "/me OP list: %%LINK%%", + "pong": "/me Pong!", + "reload": "/me Be right back.", + "removenotinwl": "/me [@%%NAME%%] Specified user @%%USERNAME%% is not in the waitlist.", + "roomrules": "/me Please find the room rules here: %%LINK%%", + "sessionstats": "/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", + "skip": "/me [%%NAME%% used skip.]", + "madeby": "/me This bot was made by %%NAME%%.", + "activefor": "I have been active for %%TIME%%.", + "swapinvalid": "/me [@%%NAME%%] Invalid user specified. (No names with spaces!)", + "swapwlonly": "/me [@%%NAME%%] Please only swap users that are in the waitlist!", + "swapping": "/me Swapping %%NAME1%% with %%NAME2%%.", + "genres": "/me Please find the permissible room genres here: %%LINK%%", + "notbanned": "/me [@%%NAME%%] The user was not banned.", + "unmutedeveryone": "/me [@%%NAME%%] Unmuted everyone.", + "unmuteeveryonerank": "/me [@%%NAME%%] Only managers and up can unmute everyone at once.", + "notmuted": "/me [@%%NAME%%] that user wasn't muted.", + "unmuterank": "/me [@%%NAME%%] You can't unmute persons with an equal or higher rank than you.", + "commandscd": "/me [@%%NAME%%] The cooldown for commands by users is now set to %%TIME%% seconds.", + "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: ' + %%WOOT%% + ', mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", + "website": "/me Please visit our website: %%LINK%%", + "youtube": "/me [%%NAME%%] Subscribe to us on youtube: %%LINK%%" + +} \ No newline at end of file diff --git a/lang/langIndex.json b/lang/langIndex.json new file mode 100644 index 00000000..8dfc6d1b --- /dev/null +++ b/lang/langIndex.json @@ -0,0 +1,3 @@ +{ + "english": "https://rawgit.com/***REMOVED***/basicBot/development/lang/en.json" +} \ No newline at end of file diff --git a/setup/exampleExtension.js b/setup/exampleExtension.js new file mode 100644 index 00000000..d6e4af7e --- /dev/null +++ b/setup/exampleExtension.js @@ -0,0 +1,50 @@ +(function () { + + //Define our function responsible for extending the bot. + function extend() { + //If the bot hasn't been loaded properly, try again in 1 second(s). + if (!window.bot) { + return setTimeout(extend, 1 * 1000); + } + + //Precaution to make sure it is assigned properly. + var bot = window.bot; + + /* + Extend the bot here, either by calling another function or here directly. + Model code for a bot command: + + bot.commands.commandCommand = { + command: 'cmd', + rank: 'user/bouncer/mod/manager', + type: 'startsWith/exact', + functionality: function(chat, cmd){ + if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if( !esBot.commands.executable(this.rank, chat) ) return void (0); + else{ + //Commands functionality goes here. + } + } + } + + */ + + bot.commands.baconCommand = { + command: 'bacon', //The command to be called. With the standard command literal this would be: !bacon + rank: 'user', //Minimum user permission to use the command + type: 'exact', //Specify if it can accept variables or not (if so, these have to be handled yourself through the chat.message + functionality: function(chat, cmd){ + if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if( !esBot.commands.executable(this.rank, chat) ) return void (0); + else{ + API.sendChat("/me Bacon!!!"); + } + } + } + + } + + //Start the bot and extend it when it has loaded. + $.getScript('https://rawgit.com/***REMOVED***/basicBot/development/basicBot.js'); + +}).call(this); \ No newline at end of file diff --git a/setup/settingsGuide.md b/setup/settingsGuide.md index 83bdf816..dd08aa2c 100644 --- a/setup/settingsGuide.md +++ b/setup/settingsGuide.md @@ -35,12 +35,14 @@ Try to keep numbers integers: no decimals. Strings go between " ", if you want to use " in your string, use \". Booleans are either 'true' or 'false', without the '. +- "language": choose one of the supported language packs, if no valid language is found, it will use the standard pack or a specified pack, type: string +- "chatLink": link to a json file containing a translated chat pack, type: string - "maximumAfk": the amount of minutes a user can be afk for the afkCheck if it's enabled, type: a number - "afkRemoval": turn afkCheck on or off, type: boolean - "maximumDc": users that disconnected not longer than this amount of minutes ago, can get their spot back, type: a number - "bouncerPlus": turn the bouncer+ mode on or off, type: boolean - "lockdownEnabled": turn lockdown on or off, lockdown means that only staff can chat, leave it false --"lockGuard": turn the lockguard on or off, lockguard makes sure the waitlist isn't locked longer than the maximum allowed time, type: a boolean: true/false +- "lockGuard": turn the lockguard on or off, lockguard makes sure the waitlist isn't locked longer than the maximum allowed time, type: a boolean: true/false - "maximumLocktime": maximum time the waitlist can be locked if lockguard is enabled, type: a number - "cycleGuard": turn the cycleguard on or off, cycleguard makes sure DJ cycle isn't on longer than the allowed amount of minutes, type: boolean - "maximumCycletime": maximum time DJ cycle can be enabled if cyleguard is enabled, type: a number diff --git a/setup/standardSettings.json b/setup/standardSettings.json index 8f884f1e..dae2ec9e 100644 --- a/setup/standardSettings.json +++ b/setup/standardSettings.json @@ -1,32 +1,35 @@ { + "botName": "basicBot", + "language": "english", + "chatLink": "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", "maximumAfk": 120, - "afkRemoval": true, - "maximumDc": 60, - "bouncerPlus": true, - "lockdownEnabled": false, + "afkRemoval": true, + "maximumDc": 60, + "bouncerPlus": true, + "lockdownEnabled": false, "lockGuard": false, - "maximumLocktime": 10, + "maximumLocktime": 10, "cycleGuard": true, - "maximumCycletime": 10, + "maximumCycletime": 10, "timeGuard": true, - "maximumSongLength": 10, - "autodisable": true, + "maximumSongLength": 10, + "autodisable": true, "commandCooldown": 30, - "usercommandsEnabled": true, + "usercommandsEnabled": true, "lockskipPosition": 3, - "lockskipReasons": [ ["theme", "This song does not fit the room theme. "], - ["op", "This song is on the OP list. "], - ["history", "This song is in the history. "], - ["mix", "You played a mix, which is against the rules. "], + "lockskipReasons": [ ["theme", "This song does not fit the room theme. "], + ["op", "This song is on the OP list. "], + ["history", "This song is in the history. "], + ["mix", "You played a mix, which is against the rules. "], ["sound", "The song you played had bad sound quality or no sound. "], - ["nsfw", "The song you contained was NSFW (image or sound). "], - ["unavailable", "The song you played was not available for some users. "] + ["nsfw", "The song you contained was NSFW (image or sound). "], + ["unavailable", "The song you played was not available for some users. "] ], "afkpositionCheck": 15, - "afkRankCheck": "ambassador", + "afkRankCheck": "ambassador", "motdEnabled": false, "motdInterval": 5, - "motd": "Temporary Message of the Day", + "motd": "Temporary Message of the Day", "filterChat": true, "etaRestriction": false, "welcome": true, @@ -38,5 +41,6 @@ "website": null, "intervalMessages": [], "messageInterval": 5, - "songstats": true + "songstats": true, + "commandLiteral": "!" } \ No newline at end of file From 2ce785798eb9acfffa53fbcd99454dbf331aab40 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Thu, 28 Aug 2014 14:07:48 +0200 Subject: [PATCH 004/281] New customization repository --- README.md | 16 +++---- basicBot.js | 9 ++-- setup/exampleExtension.js | 50 ---------------------- setup/exampleSettings.json | 14 ------- setup/settingsGuide.md | 83 ------------------------------------- setup/standardSettings.json | 46 -------------------- 6 files changed, 11 insertions(+), 207 deletions(-) delete mode 100644 setup/exampleExtension.js delete mode 100644 setup/exampleSettings.json delete mode 100644 setup/settingsGuide.md delete mode 100644 setup/standardSettings.json diff --git a/README.md b/README.md index 83dd780e..2e598a0f 100644 --- a/README.md +++ b/README.md @@ -32,20 +32,16 @@ If this does not work, go to https://raw.githubusercontent.com/***REMOVED***/bas These can be found in [the commands file](https://github.com/***REMOVED***/basicBot/blob/master/commands.md). -###Special settings### +###Extending functionality and custom default settings### -See [the settings guide](https://github.com/***REMOVED***/basicBot/blob/master/setup/settingsGuide.md). - -###Translations### - -Official translations will be supported. Available ones can be found under [the language folder](https://github.com/***REMOVED***/basicBot/blob/master/lang/langIndex.json). Yuu can set a language in the room settings. -You can use your own translation or wording by translating the values of in [the english pack](https://github.com/***REMOVED***/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service, like you would for custom room settings. However, you need to put this link into your custom room settings, under chatLink. +basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/***REMOVED***/basicBot-customization) for more info. +Please do not try to if you are not confident in your javascript capabilities. -###Extending functionality### +###Translations### -An example of the bots functionality being extended can be found [here](https://github.com/***REMOVED***/basicBot/blob/master/setup/exampleExtensions.md). -Please do not try to if you are not confident in your javascript capabilities. +Official translations will be supported. Available ones can be found under [the language folder](https://github.com/***REMOVED***/basicBot/blob/master/lang/langIndex.json). You can set a language in the room settings. +You can use your own translation or wording by translating the values of in [the english pack](https://github.com/***REMOVED***/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. Credits ------- diff --git a/basicBot.js b/basicBot.js index 6d03f90f..d1aeb2ae 100644 --- a/basicBot.js +++ b/basicBot.js @@ -108,12 +108,13 @@ }; + var botCreator = "Matthew aka. ***REMOVED***"; + var botCreatorIDs = []; + var basicBot = { version: "2.0.0dev", status: false, name: "basicBot", - creator: "Matthew aka. ***REMOVED***", - creatorIDs: [], loggedInID: null, scriptLink: "https://rawgit.com/***REMOVED***/basicBot/development/basicBot.js", cmdLink: "http://git.io/245Ppg", @@ -313,7 +314,7 @@ var u; if (typeof obj === "object") u = obj; else u = API.getUser(obj); - if(basicBot.creatorIDs.indexOf(u.id) > -1) return 10; + if(botCreatorIDs.indexOf(u.id) > -1) return 10; if (u.gRole < 2) return u.role; else { switch (u.gRole) { @@ -2213,7 +2214,7 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - API.sendChat('/me This bot was made by ' + basicBot.creator + '.'); + API.sendChat('/me This bot was made by ' + botCreator + '.'); } } }, diff --git a/setup/exampleExtension.js b/setup/exampleExtension.js deleted file mode 100644 index d6e4af7e..00000000 --- a/setup/exampleExtension.js +++ /dev/null @@ -1,50 +0,0 @@ -(function () { - - //Define our function responsible for extending the bot. - function extend() { - //If the bot hasn't been loaded properly, try again in 1 second(s). - if (!window.bot) { - return setTimeout(extend, 1 * 1000); - } - - //Precaution to make sure it is assigned properly. - var bot = window.bot; - - /* - Extend the bot here, either by calling another function or here directly. - Model code for a bot command: - - bot.commands.commandCommand = { - command: 'cmd', - rank: 'user/bouncer/mod/manager', - type: 'startsWith/exact', - functionality: function(chat, cmd){ - if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if( !esBot.commands.executable(this.rank, chat) ) return void (0); - else{ - //Commands functionality goes here. - } - } - } - - */ - - bot.commands.baconCommand = { - command: 'bacon', //The command to be called. With the standard command literal this would be: !bacon - rank: 'user', //Minimum user permission to use the command - type: 'exact', //Specify if it can accept variables or not (if so, these have to be handled yourself through the chat.message - functionality: function(chat, cmd){ - if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if( !esBot.commands.executable(this.rank, chat) ) return void (0); - else{ - API.sendChat("/me Bacon!!!"); - } - } - } - - } - - //Start the bot and extend it when it has loaded. - $.getScript('https://rawgit.com/***REMOVED***/basicBot/development/basicBot.js'); - -}).call(this); \ No newline at end of file diff --git a/setup/exampleSettings.json b/setup/exampleSettings.json deleted file mode 100644 index df65cdc3..00000000 --- a/setup/exampleSettings.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "afkRankCheck": "user", - "filterChat": false, - "etaRestriction": false, - "welcome": true, - "opLink": "www.op.com", - "rulesLink": "www.rules.com", - "themeLink": "www.theme.com", - "fbLink": "https://www.facebook.com/plugdj", - "youtubeLink": "www.youtube.com", - "website": "www.myroom.com", - "intervalMessages": ["Message 1", "Message 2"], - "messageInterval": 4 -} \ No newline at end of file diff --git a/setup/settingsGuide.md b/setup/settingsGuide.md deleted file mode 100644 index dd08aa2c..00000000 --- a/setup/settingsGuide.md +++ /dev/null @@ -1,83 +0,0 @@ -Roomsettings -============ - -Creating a settings file ------------------------- - -A settings file is a .json file that contains all the settings you want the bot to use as default. -The easiest way to set this up is to download the provided settings file at https://github.com/***REMOVED***/basicBot/blob/master/standardSettings.json and edit that. Settings you don't want to change can be deleted, the bot will use it's default settings then. Make sure that the last setting isn't followed by a , though! If this is the case, the file won't work. -The basic structure is: -``` -{ - "setting1": value1, - "setting2": value2, - ... - "settingX": valueX -} -``` - -Both standardSettings.json and exampleSettings.json can be used as examples, the settings are described in detail below. - -Using your settings file ------------------------- - -To use the settings file, it will need to be stored somewhere public. The easiest way to do this is to upload it to dropbox or googledrive, and get a public link for it. -In your room description, include at the end (if you use custom plucubed settings, place it above that): - -`@basicBot=www.mylink.com/settings.json` - -with your link instead of the example. Follow it by a space or an enter to make sure the bot finds it. - -Settings explained ------------------- - -Try to keep numbers integers: no decimals. -Strings go between " ", if you want to use " in your string, use \". -Booleans are either 'true' or 'false', without the '. - -- "language": choose one of the supported language packs, if no valid language is found, it will use the standard pack or a specified pack, type: string -- "chatLink": link to a json file containing a translated chat pack, type: string -- "maximumAfk": the amount of minutes a user can be afk for the afkCheck if it's enabled, type: a number -- "afkRemoval": turn afkCheck on or off, type: boolean -- "maximumDc": users that disconnected not longer than this amount of minutes ago, can get their spot back, type: a number -- "bouncerPlus": turn the bouncer+ mode on or off, type: boolean -- "lockdownEnabled": turn lockdown on or off, lockdown means that only staff can chat, leave it false -- "lockGuard": turn the lockguard on or off, lockguard makes sure the waitlist isn't locked longer than the maximum allowed time, type: a boolean: true/false -- "maximumLocktime": maximum time the waitlist can be locked if lockguard is enabled, type: a number -- "cycleGuard": turn the cycleguard on or off, cycleguard makes sure DJ cycle isn't on longer than the allowed amount of minutes, type: boolean -- "maximumCycletime": maximum time DJ cycle can be enabled if cyleguard is enabled, type: a number -- "timeGuard": turn the timeguard on or off, timeguard makes sure songs are not longer than the specified limit, if they are longer they are skipped immediately, type: boolean -- "maximumSongLength": maximum length of a track if timeguard is enabled, type: a number -- "autodisable": if enabled, the bot sends out !afkdisable and !joindisable every hour, this disables afkmessages and autojoining on plugdubed, type: boolean -- "commandCooldown": the cooldown in seconds for commands for users (there will always be a few seconds cooldown to prevent spamming the servers), type: a number -- "usercommandsEnabled": turn commands for users on or off, type: boolean -- "lockskipPosition": the position to which !lockskip adds users back to the waitlist, type: a number -- "lockskipReasons": possible reasons to add to !lockskip, format like this: - ``` - [ - ["reason1", "explanation1"], - ["reason2", "explanation2"], - ... - ["reasonX", "explanationX"] - ] - ``` -- "afkpositionCheck": only people below this waitlist position will be checked for afk, type: a number -- "afkRankCheck": only people below and with this rank will be checked for afk, possible ranks: - "user", "residentdj", "bouncer", "manager", "cohost", "host", "ambassador", "admin" - eg. "bouncer" will check all grey users, residentdj's and bouncers afk -- "motdEnabled": Message of the Day, best to be left false and to be enabled and set using the commands, MotD displays a message every X songs. Use it for temporary imporant messages, type: boolean -- "motdInterval": standard interval for the MotD, every X songs, type: a number -- "motd": standard MotD, best to set using the !motd command, type: string -- "filterChat": turns the chatfilter on or off, the filter checks for a range of invalid messages like just . 's, excessive caps, asking for skips, some spam and asking for fans, type: boolean -- "etaRestriction": enables the restriction on !eta, the restriction means that grey users can only use it once every hour, this would be used to prevent spamming the command, type: boolean -- "welcome": turn a welcome message for users on or off, type: boolean -- "opLink": an optional link to a list of OverPlayed songs, leave it null to leave it disabled, type: string -- "rulesLink": an optional link to a list of rules, leave it null to leave it disabled, type: string -- "themeLink": an optional link to the room's theme and allowed genres, leave it null to leave it disabled, type: string -- "fbLink": an optional link to a Facebook page, leave it null to leave it disabled, type: string, -- "youtubeLink": an optional link to a youtube, leave it null to leave it disabled, type: string, -- "website": an optional link to a website, leave it null to leave it disabled, type: string, -- "intervalMessages": an array of messages displayed every X songs, leave it empty to not have any default messages, format: - `["message 1", "message 2", "message 3"]` -- "messageInterval": the interval X for the standard messages, type: a number -- "songstats": toggle message with statistics for the previous song, type: boolean \ No newline at end of file diff --git a/setup/standardSettings.json b/setup/standardSettings.json deleted file mode 100644 index dae2ec9e..00000000 --- a/setup/standardSettings.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "botName": "basicBot", - "language": "english", - "chatLink": "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", - "maximumAfk": 120, - "afkRemoval": true, - "maximumDc": 60, - "bouncerPlus": true, - "lockdownEnabled": false, - "lockGuard": false, - "maximumLocktime": 10, - "cycleGuard": true, - "maximumCycletime": 10, - "timeGuard": true, - "maximumSongLength": 10, - "autodisable": true, - "commandCooldown": 30, - "usercommandsEnabled": true, - "lockskipPosition": 3, - "lockskipReasons": [ ["theme", "This song does not fit the room theme. "], - ["op", "This song is on the OP list. "], - ["history", "This song is in the history. "], - ["mix", "You played a mix, which is against the rules. "], - ["sound", "The song you played had bad sound quality or no sound. "], - ["nsfw", "The song you contained was NSFW (image or sound). "], - ["unavailable", "The song you played was not available for some users. "] - ], - "afkpositionCheck": 15, - "afkRankCheck": "ambassador", - "motdEnabled": false, - "motdInterval": 5, - "motd": "Temporary Message of the Day", - "filterChat": true, - "etaRestriction": false, - "welcome": true, - "opLink": null, - "rulesLink": null, - "themeLink": null, - "fbLink": null, - "youtubeLink": null, - "website": null, - "intervalMessages": [], - "messageInterval": 5, - "songstats": true, - "commandLiteral": "!" -} \ No newline at end of file From 82d22b9f57f2764a7e89fbdc57e7bfd09417c891 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Thu, 28 Aug 2014 14:09:57 +0200 Subject: [PATCH 005/281] Fixed capitalization mistake. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e598a0f..83c87ff8 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Please do not try to if you are not confident in your javascript capabilities. ###Translations### Official translations will be supported. Available ones can be found under [the language folder](https://github.com/***REMOVED***/basicBot/blob/master/lang/langIndex.json). You can set a language in the room settings. -You can use your own translation or wording by translating the values of in [the english pack](https://github.com/***REMOVED***/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. +You can use your own translation or wording by translating the values of in [the English pack](https://github.com/***REMOVED***/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. Credits ------- From d8c46409f0678c7ba9649d2a67ceca3f54e6d186 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Thu, 28 Aug 2014 20:52:57 +0200 Subject: [PATCH 006/281] Removed beggar array (has become irrelevant) --- basicBot.js | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/basicBot.js b/basicBot.js index d1aeb2ae..2ce3507a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -910,47 +910,6 @@ ], curses: [ 'nigger', 'faggot', 'nigga', 'niqqa', 'motherfucker', 'modafocka' - ], - beggarSentences: ['fanme', 'funme', 'becomemyfan', 'trocofa', 'fanforfan', 'fan4fan', 'fan4fan', 'hazcanfanz', 'fun4fun', 'fun4fun', - 'meufa', 'fanz', 'isnowyourfan', 'reciprocate', 'fansme', 'givefan', 'fanplz', 'fanpls', 'plsfan', 'plzfan', 'becomefan', 'tradefan', - 'fanifan', 'bemyfan', 'retribui', 'gimmefan', 'fansatfan', 'fansplz', 'fanspls', 'ifansback', 'fanforfan', 'addmefan', 'retribuo', - 'fantome', 'becomeafan', 'fan-to-fan', 'fantofan', 'canihavefan', 'pleasefan', 'addmeinfan', 'iwantfan', 'fanplease', 'ineedfan', - 'ineedafan', 'iwantafan', 'bymyfan', 'fannme', 'returnfan', 'bymyfan', 'givemeafan', 'sejameufa', 'sejameusfa', 'sejameuf��', - 'sejameusf��', 'f��please', 'f��pls', 'f��plz', 'fanxfan', 'addmetofan', 'fanzafan', 'fanzefan', 'becomeinfan', 'backfan', - 'viremmeuseguidor', 'viremmeuseguir', 'fanisfan', 'funforfun', 'anyfanaccept', 'anyfanme', 'fan4fan', 'fan4fan', 'turnmyfan', - 'turnifan', 'beafanofme', 'comemyfan', 'plzzfan', 'plssfan', 'procurofan', 'comebackafan', 'fanyfan', 'givemefan', 'fan=fan', - 'fan=fan', 'fan+fan', 'fan+fan', 'fanorfan', 'beacomeafanofme', 'beacomemyfan', 'bcomeafanofme', 'bcomemyfan', 'fanstofan', - 'bemefan', 'trocarfan', 'fanforme', 'fansforme', 'allforfan', 'fansintofans', 'fanintofan', 'f(a)nme', 'prestomyfan', - 'presstomyfan', 'fanpleace', 'fanspleace', 'givemyafan', 'addfan', 'addsmetofan', 'f4f', 'canihasfan', 'canihavefan', - 'givetomeafan', 'givemyfan', 'phanme', 'fanforafan', 'fanvsfan', 'fanturniturn', 'fanturninturn', 'sejammeufa', - 'sejammeusfa', 'befanofme', 'faninfan', 'addtofan', 'fanthisaccount', 'fanmyaccount', 'fanback', 'addmeforfan', - 'fans4fan', 'fans4fan', 'fanme', 'fanmyaccount', 'fanback', 'addmeforfan', 'fans4fan', 'fans4fan', 'fanme', 'turnfanwhocontribute', - "bemefan", "bemyfan", "beacomeafanofme", "beacomemyfan", "becameyafan", "becomeafan", - "becomefan", "becomeinfan", "becomemyfan", "becomemyfans", "bouncerplease", "bouncerpls", - "brbrbrbr", "brbrbrbr", "bymyfan", "canihasfan", "canihavefan", "caralho", - "clickmynametobecomeafan", "comebackafan", "comemyfan", "dosfanos", "everyonefan", - "everyonefans", "exchangefan", "f4f", "f&n", "f(a)nme", "f@nme", "��@nme", "f4f", "f4n4f4n", - "f4nforf4n", "f4nme", "f4n4f4n", "f��", "f��", "f��������please", "f��������pls", "f��������plz", "fan:four:fan", - 'fanme', 'funme', 'becomemyfan', 'trocofa', 'fanforfan', 'fan4fan', 'fan4fan', 'hazcanfanz', - 'fun4fun', 'fun4fun', 'meufa', 'fanz', 'isnowyourfan', 'reciprocate', 'fansme', 'givefan', - 'fanplz', 'fanpls', 'plsfan', 'plzfan', 'becomefan', 'tradefan', 'fanifan', 'bemyfan', - 'retribui', 'gimmefan', 'fansatfan', 'fansplz', 'fanspls', 'ifansback', 'fanforfan', - 'addmefan', 'retribuo', 'fantome', 'becomeafan', 'fan-to-fan', 'fantofan', - 'canihavefan', 'pleasefan', 'addmeinfan', 'iwantfan', 'fanplease', 'ineedfan', - 'ineedafan', 'iwantafan', 'bymyfan', 'fannme', 'returnfan', 'bymyfan', 'givemeafan', - 'sejameufa', 'sejameusfa', 'sejameufã', 'sejameusfã', 'fãplease', 'fãpls', 'fãplz', - 'fanxfan', 'addmetofan', 'fanzafan', 'fanzefan', 'becomeinfan', 'backfan', - 'viremmeuseguidor', 'viremmeuseguir', 'fanisfan', 'funforfun', 'anyfanaccept', - 'anyfanme', 'fan4fan', 'fan4fan', 'turnmyfan', 'turnifan', 'beafanofme', 'comemyfan', - 'plzzfan', 'plssfan', 'procurofan', 'comebackafan', 'fanyfan', 'givemefan', 'fan=fan', - 'fan=fan', 'fan+fan', 'fan+fan', 'fanorfan', 'beacomeafanofme', 'beacomemyfan', - 'bcomeafanofme', 'bcomemyfan', 'fanstofan', 'bemefan', 'trocarfan', 'fanforme', - 'fansforme', 'allforfan', 'fnme', 'fnforfn', 'fansintofans', 'fanintofan', 'f(a)nme', 'prestomyfan', - 'presstomyfan', 'fanpleace', 'fanspleace', 'givemyafan', 'addfan', 'addsmetofan', - 'f4f', 'canihasfan', 'canihavefan', 'givetomeafan', 'givemyfan', 'phanme', 'but i need please fan', - 'fanforafan', 'fanvsfan', 'fanturniturn', 'fanturninturn', 'sejammeufa', - 'sejammeusfa', 'befanofme', 'faninfan', 'addtofan', 'fanthisaccount', - 'fanmyaccount', 'fanback', 'addmeforfan', 'fans4fan', 'fans4fan', 'fanme', 'bemyfanpls', 'befanpls', 'f4f', 'fanyfan' ] }, connectAPI: function () { From 8f79cdfb76b257f2be8a8b82dc16c98927d45d08 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 29 Aug 2014 00:37:24 +0200 Subject: [PATCH 007/281] Changed time of loading chats --- basicBot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 2ce3507a..19b85252 100644 --- a/basicBot.js +++ b/basicBot.js @@ -963,6 +963,7 @@ API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); }, startup: function () { + loadChat(); var u = API.getUser(); if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); @@ -971,7 +972,7 @@ if (basicBot.room.roomstats.launchTime === null) { basicBot.room.roomstats.launchTime = Date.now(); } - loadChat(); + for (var j = 0; j < basicBot.room.users.length; j++) { basicBot.room.users[j].inRoom = false; } From 8983a9bd7a8eb80532b2070dafcfe6a4b9bd54b4 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 29 Aug 2014 00:39:27 +0200 Subject: [PATCH 008/281] Testing chat load --- basicBot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 19b85252..a27eca82 100644 --- a/basicBot.js +++ b/basicBot.js @@ -32,7 +32,7 @@ } }; - var loadChat = function(){ + var loadChat = function(cb){ $.get("https://rawgit.com/***REMOVED***/basicBot/development/lang/langIndex.json", function(json){ var link = basicBot.chatLink; if(json !== null && typeof json !== "undefined"){ @@ -49,6 +49,7 @@ $.get(link, function (json) { if (json !== null && typeof json !== "undefined") { basicBot.chat = JSON.parse(json); + cb(); } }); } @@ -56,6 +57,7 @@ $.get(basicBot.chatLink, function (json) { if (json !== null && typeof json !== "undefined") { basicBot.chat = JSON.parse(json); + cb(); } }); } @@ -2532,5 +2534,5 @@ } }; - basicBot.startup(); + loadChat(basicBot.startup); }).call(this); \ No newline at end of file From 526f1179567ad74eea63bec95808f7904d216a62 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 29 Aug 2014 16:44:58 +0200 Subject: [PATCH 009/281] Fixed command execution --- basicBot.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/basicBot.js b/basicBot.js index a27eca82..90804318 100644 --- a/basicBot.js +++ b/basicBot.js @@ -28,15 +28,16 @@ var subChat = function(chat, obj){ var lit = '%%'; for(var prop in obj){ - chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); + chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); } + return chat; }; var loadChat = function(cb){ $.get("https://rawgit.com/***REMOVED***/basicBot/development/lang/langIndex.json", function(json){ var link = basicBot.chatLink; if(json !== null && typeof json !== "undefined"){ - langIndex = JSON.parse(json); + langIndex = json; link = langIndex[basicBot.settings.language]; if(basicBot.settings.chatLink !== basicBot.chatLink){ link = basicBot.settings.chatLink; @@ -48,7 +49,7 @@ } $.get(link, function (json) { if (json !== null && typeof json !== "undefined") { - basicBot.chat = JSON.parse(json); + basicBot.chat = json; cb(); } }); @@ -56,7 +57,7 @@ else{ $.get(basicBot.chatLink, function (json) { if (json !== null && typeof json !== "undefined") { - basicBot.chat = JSON.parse(json); + basicBot.chat = json; cb(); } }); @@ -866,11 +867,12 @@ var executed = false; for (var comm in basicBot.commands) { - var cmdCall = comm.command; + var cmdCall = basicBot.commands[comm].command; if(!Array.isArray(comm.command)) cmdCall = [cmdCall]; for(var ind in cmdCall){ if (basicBot.settings.commandLiteral + cmdCall[ind] === cmd) { - comm.functionality(chat, basicBot.settings.commandLiteral + cmdCall[ind]); + console.log('executing command'); + basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[ind]); executed = true; break; } @@ -965,11 +967,10 @@ API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); }, startup: function () { - loadChat(); var u = API.getUser(); if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); - this.connectAPI(); + basicBot.connectAPI(); retrieveFromStorage(); if (basicBot.room.roomstats.launchTime === null) { basicBot.room.roomstats.launchTime = Date.now(); @@ -1008,6 +1009,7 @@ basicBot.status = true; API.sendChat('/cap 1'); API.setVolume(0); + console.log("chat"); API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version})); window.bot = basicBot; }, From e7cb1df3df7795a734f8da0084976aafac1e6106 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 29 Aug 2014 19:23:09 +0200 Subject: [PATCH 010/281] Adapted (un)mute functionality --- basicBot.js | 30 +++++++++++++++++++++++++++++- lang/en.json | 1 + 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 90804318..7ca18004 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1969,6 +1969,7 @@ var permFrom = basicBot.userUtilities.getPermission(chat.uid); var permUser = basicBot.userUtilities.getPermission(user.id); if (permFrom > permUser) { + /* basicBot.room.mutedUsers.push(user.id); if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); else { @@ -1991,6 +1992,25 @@ } }, time * 60 * 1000, user.id); } + */ + if(time > 45){ + API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); + API.moderateMuteUser(user.id, API.MUTE.LONG); + } + else if(time > 30){ + API.moderateMuteUser(user.id, API.MUTE.MEDIUM); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function(id){ + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + else { + API.moderateMuteUser(user.id, API.MUTE.SHORT); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function(id){ + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } } else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); } @@ -2407,7 +2427,7 @@ var permUser = basicBot.userUtilities.getPermission(user.id); if (permFrom > permUser) { - + /* var muted = basicBot.room.mutedUsers; var wasMuted = false; var indexMuted = -1; @@ -2421,6 +2441,14 @@ if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); basicBot.room.mutedUsers.splice(indexMuted); API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + */ + try{ + API.moderateUnmuteUser(user.id); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + catch(e){ + API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + } } else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); } diff --git a/lang/en.json b/lang/en.json index 1b1b8888..282b4a5f 100644 --- a/lang/en.json +++ b/lang/en.json @@ -100,6 +100,7 @@ "addbotwaitlist": "/me @%%NAME%%, don't try to add me to the waitlist, please.", "move": "/me [%%NAME%% used move.]", "mutednotime": "/me [@%%NAME%%] Muted @%%USERNAME%%.", + "mutedmaxtime": "/me [@%%NAME%%] You can only mute for maximum %%TIME%% minutes.", "mutedtime": "/me [@%%NAME%%] Muted @%%USERNAME%% for %%TIME%% minutes.", "unmuted": "/me [@%%NAME%%] Unmuted @%%USERNAME%%.", "muterank": "/me [@%%NAME%%] You can't mute persons with an equal or higher rank than you.", From 672fb9d8ef485c08ed2949509ca29f697ad332ce Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 29 Aug 2014 19:52:35 +0200 Subject: [PATCH 011/281] BasicBot v2.0.0 --- README.md | 7 +++ basicBot.js | 83 +++++++++++++++++++--------- commands.md | 1 + lang/en.json | 1 + lang/langIndex.json | 3 +- lang/pt.json | 130 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 199 insertions(+), 26 deletions(-) create mode 100644 lang/pt.json diff --git a/README.md b/README.md index 83c87ff8..aef9452b 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,9 @@ Please do not try to if you are not confident in your javascript capabilities. Official translations will be supported. Available ones can be found under [the language folder](https://github.com/***REMOVED***/basicBot/blob/master/lang/langIndex.json). You can set a language in the room settings. You can use your own translation or wording by translating the values of in [the English pack](https://github.com/***REMOVED***/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. +__When translating the chat messages, please not that it is a json format, meaning it is structured as ```"key":"value"```, please only translate the "value" parts, and leave anything between %% (eg. %%NAME%%) as is, they are variables that get filled in by the bot.__ + + Credits ------- @@ -52,6 +55,10 @@ I would like to thank the following people: - TAT, Origin and other Litebot contributors: Their Litebot has inspired features like Roulette. - Henchman: Never knew this undertaking would give me a friend too. +|Language | Translator| +|:------:|:---------:| +|Portuguese|[Motel Bible](https://github.com/motelbible)| + Copyright --------- diff --git a/basicBot.js b/basicBot.js index 7ca18004..2d3a7712 100644 --- a/basicBot.js +++ b/basicBot.js @@ -34,11 +34,12 @@ }; var loadChat = function(cb){ - $.get("https://rawgit.com/***REMOVED***/basicBot/development/lang/langIndex.json", function(json){ + if(!cb) cb = function(){}; + $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function(json){ var link = basicBot.chatLink; if(json !== null && typeof json !== "undefined"){ langIndex = json; - link = langIndex[basicBot.settings.language]; + link = langIndex[basicBot.settings.language.toLowerCase()]; if(basicBot.settings.chatLink !== basicBot.chatLink){ link = basicBot.settings.chatLink; } @@ -119,14 +120,15 @@ status: false, name: "basicBot", loggedInID: null, - scriptLink: "https://rawgit.com/***REMOVED***/basicBot/development/basicBot.js", + scriptLink: "https://rawgit.com/***REMOVED***/basicBot/master/basicBot.js", cmdLink: "http://git.io/245Ppg", - chatLink: "https://rawgit.com/***REMOVED***/basicBot/development/lang/en.json", + chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", chat: null, + loadChat: loadChat, settings: { botName: "basicBot", language: "english", - chatLink: "https://rawgit.com/***REMOVED***/basicBot/development/lang/en.json", + chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", maximumAfk: 120, afkRemoval: true, maximumDc: 60, @@ -299,7 +301,8 @@ }, lookupUserName: function (name) { for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.userUtilities.getUser(basicBot.room.users[i]).username === name) { + var match = basicBot.room.users[i].username.trim() == name.trim(); + if (match) { return basicBot.room.users[i]; } } @@ -586,6 +589,7 @@ } }, eventChat: function (chat) { + chat.message = chat.message.trim(); for (var i = 0; i < basicBot.room.users.length; i++) { if (basicBot.room.users[i].id === chat.uid) { basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); @@ -669,13 +673,13 @@ eventDjadvance: function (obj) { var lastplay = obj.lastPlay; if (typeof lastplay === 'undefined') return void (0); - if (basicBot.settings.songstats) API.sendChat("/me " + lastplay.media._previousAttributes.author + " - " + lastplay.media._previousAttributes.title + ": " + lastplay.score.positive + "W/" + lastplay.score.curates + "G/" + lastplay.score.negative + "M.") + if (basicBot.settings.songstats) API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") basicBot.room.roomstats.totalWoots += lastplay.score.positive; basicBot.room.roomstats.totalMehs += lastplay.score.negative; - basicBot.room.roomstats.totalCurates += lastplay.score.curates; + basicBot.room.roomstats.totalCurates += lastplay.score.grabs; basicBot.room.roomstats.songCount++; basicBot.roomUtilities.intervalMessage(); - basicBot.room.currentDJID = API.getDJ().id; + basicBot.room.currentDJID = obj.dj.id; var alreadyPlayed = false; for (var i = 0; i < basicBot.room.historyList.length; i++) { if (basicBot.room.historyList[i][0] === obj.media.cid) { @@ -850,6 +854,7 @@ } else return false; var userPerm = basicBot.userUtilities.getPermission(chat.uid); + //console.log("name: " + chat.un + ", perm: " + userPerm); if (chat.message !== "!join" && chat.message !== "!leave") { if (userPerm === 0 && !basicBot.room.usercommand) return void (0); if (!basicBot.room.allcommand) return void (0); @@ -871,7 +876,6 @@ if(!Array.isArray(comm.command)) cmdCall = [cmdCall]; for(var ind in cmdCall){ if (basicBot.settings.commandLiteral + cmdCall[ind] === cmd) { - console.log('executing command'); basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[ind]); executed = true; break; @@ -1009,7 +1013,10 @@ basicBot.status = true; API.sendChat('/cap 1'); API.setVolume(0); - console.log("chat"); + var emojibutton = $(".icon-emoji-on"); + if(emojibutton.length > 0){ + emojibutton[0].click(); + } API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version})); window.bot = basicBot; }, @@ -1117,7 +1124,7 @@ if (basicBot.room.roomevent) { basicBot.room.eventArtists.push(user.id); } - basicBot.userUtilities.moveUser(user.id, 0, false); + API.moderateAddDJ(user.id); } else API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); } } @@ -1461,10 +1468,10 @@ var perm = basicBot.userUtilities.getPermission(chat.uid); if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); } + console.log(name); var user = basicBot.userUtilities.lookupUserName(name); if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var id = user.id; - var toChat = basicBot.userUtilities.dclookup(id); + var toChat = basicBot.userUtilities.dclookup(user.id); API.sendChat(toChat); } } @@ -1692,11 +1699,11 @@ var isDj = false; if (dj === chat.uid) isDj = true; if (perm >= 1 || isDj) { - if (media.format === '1') { + if (media.format === 1) { var linkToSong = "https://www.youtube.com/watch?v=" + media.cid; API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); } - if (media.format === '2') { + if (media.format === 2) { SC.get('/tracks/' + media.cid, function (sound) { API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: sound.permalink_url})); }); @@ -1955,10 +1962,11 @@ var name; if (lastSpace === msg.indexOf(' ')) { name = msg.substring(cmd.length + 2); + time = 45; } else { time = msg.substring(lastSpace + 1); - if (isNaN(time)) { + if (isNaN(time) || time == "" || time == null || typeof time == "undefined") { return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); } name = msg.substring(cmd.length + 2, lastSpace); @@ -1995,17 +2003,22 @@ */ if(time > 45){ API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); - API.moderateMuteUser(user.id, API.MUTE.LONG); + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + } + else if(time === 45){ + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + } else if(time > 30){ - API.moderateMuteUser(user.id, API.MUTE.MEDIUM); + API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); setTimeout(function(id){ API.moderateUnmuteUser(id); }, time * 60 * 1000, user.id); } else { - API.moderateMuteUser(user.id, API.MUTE.SHORT); + API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); setTimeout(function(id){ API.moderateUnmuteUser(id); @@ -2190,6 +2203,26 @@ } }, + songstatsCommand: { + command: 'songstats', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.songstats) { + basicBot.settings.songstats = !basicBot.settings.songstats; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.songstats})); + } + else { + basicBot.settings.songstats = !basicBot.settings.songstats; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.songstats})); + } + } + } + }, + sourceCommand: { command: 'source', rank: 'user', @@ -2274,8 +2307,8 @@ var user2 = basicBot.userUtilities.lookupUserName(name2); if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); - var p1 = API.getWaitListPosition(user1.id); - var p2 = API.getWaitListPosition(user2.id); + var p1 = API.getWaitListPosition(user1.id) +1; + var p2 = API.getWaitListPosition(user2.id) +1; if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); if (p1 < p2) { @@ -2409,7 +2442,7 @@ else { var msg = chat.message; var permFrom = basicBot.userUtilities.getPermission(chat.uid); - + /** if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { if (permFrom > 2) { basicBot.room.mutedUsers = []; @@ -2417,7 +2450,7 @@ } else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); } - + **/ var from = chat.un; var name = msg.substr(cmd.length + 2); @@ -2509,7 +2542,7 @@ if (user === false) return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); var vratio = user.votes; var ratio = vratio.woot / vratio.meh; - API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woots: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); + API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woot: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); } } }, diff --git a/commands.md b/commands.md index 2383c006..dc34c458 100644 --- a/commands.md +++ b/commands.md @@ -34,6 +34,7 @@ Bouncer+ |!move | @user (X) | moves user to position X on the waitlist, default is position 1 | |!remove | @user | remove user from the waitlist | |!roulette | | start a roulette | +|!songstats | | toggle song statistics | |!unlock | | unlock the waitlist | |!welcome | | toggle the welcome message on user join | diff --git a/lang/en.json b/lang/en.json index 282b4a5f..4d772590 100644 --- a/lang/en.json +++ b/lang/en.json @@ -63,6 +63,7 @@ "usercommands": "usercommands", "motd": "MotD", "welcomemsg": "welcome message", + "songstats": "song statistics", "etarestriction": "eta restriction", "activeusersintime": "/me [@%%NAME%% There have been %%AMOUNT%% users chatting in the past %%TIME%% minutes.", "maximumafktimeset": "/me [@%%NAME%%] Maximum afk duration set to %%TIME%% minutes.", diff --git a/lang/langIndex.json b/lang/langIndex.json index 8dfc6d1b..b3f187d8 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,3 +1,4 @@ { - "english": "https://rawgit.com/***REMOVED***/basicBot/development/lang/en.json" + "english": "https://rawgit.com/***REMOVED***/basicBot/development/lang/en.json", + "portuguese": "https://rawgit.com/***REMOVED***/basicBot/development/lang/pt.json" } \ No newline at end of file diff --git a/lang/pt.json b/lang/pt.json new file mode 100644 index 00000000..34b29b73 --- /dev/null +++ b/lang/pt.json @@ -0,0 +1,130 @@ +{ + "nodatafound": "Dados anteriores não encontrados.", + "retrievingdata": "Recuperando dados armazenados anteriormente.", + "datarestored": "Dados armazenados anteriormente recuperados com êxito.", + "greyuser": "Apenas Seguranças ou superiores podem usar o chatbot.", + "bouncer": "O chatbot não pode mover pessoas na fila de espera quando usado por um bouncer.", + "online": "/me %%BOTNAME%% v%%VERSION%% online!", + + + "welcome": "Bem vindo(a), %%NAME%%", + "welcomeback": "Bem vindo(a) de volta, %%NAME%%", + "songknown": "/me :repeat: Essa música foi tocada %%PLAYS%% vez(es) nos últimos %%TIMETOTAL%%. Última vez: %%LASTTIME%% atrás. :repeat:", + "timelimit": "@%%NAME%%, sua música tem duração maior que %%MAXLENGTH%% minutos. Você precisa de permissão para tocar músicas longas.", + "permissionownsong": "/me :up: @%%NAME%% tem permissão para tocar música de própria autoria!", + + + "isopen": "/me A roleta foi iniciada! Use !join para participar!", + "winnerpicked": "/me Um vencedor foi escolhido! @%%NAME%% ganhou a posição %%POSITION%%.", + + + "alreadyadding": "/me Usuário já está sendo adicionado! Posição desejada alterada para %%POSITION%%.", + "adding": "/me @%%NAME%% foi adicionado à fila. Posição atual: %%POSITION%%.", + + + "usernotfound": "/me Usuário não encontrado.", + "notdisconnected": "/me @%%NAME%% não tem se desconectado durante meu tempo aqui.", + "noposition": "/me Última posição não reconhecida. A fila de espera precisa ser atualizada pelo menos uma vez para registrar posições.", + "toolongago": "/me @%%NAME%%'s desconectou-se a muito tempo atrás: %%TIME%%.", + "valid": "/me @%%NAME%% desconectou-se %%TIME%% atrás e deve ter posição %%POSITION%%.", + + + "warning1": "@%%NAME%%, você esteve inativo por %%TIME%%, responda dentro de 2 minutos ou você será removido da fila de espera.", + "warning2": "@%%NAME%%, você será removido em breve por inatividade se não responder.", + "afkremove": "@%%NAME%%, você foi removido por estar inativo por %%TIME%%. Você teve a posição %%POSITION%%. Use o chat pelo menos uma vez em 1 hora se quiser tocar.", + + + "caps": "@%%NAME%%, desligue seu capslock, por favor.", + "askskip": "@%%NAME%%, não peça skips.", + "spam": "/me @%%NAME%%, não faça spam, por favor.", + "roomadvertising": "@%%NAME%%, não poste link de outras comunidades, por favor.", + "adfly": "@%%NAME%%, por favor mude seu script autowoot. Nós sugerimos plugCubed: http://plugcubed.net/", + + + "invalidtime": "/me [@%%NAME%%] Tempo inválido.", + "nouserspecified": "/me [@%%NAME%%] Usuário não especificado.", + "invaliduserspecified": "/me [@%%NAME%%] Usuário inválido.", + "novaliduserspecified": "/me [@%%NAME%%] Usuário especificado não válido.", + "nolimitspecified": "/me [@%%NAME%%] Limite não especificado.", + "invalidlimitspecified": "/me [@%%NAME%%] Limite inválido.", + "invalidpositionspecified": "/me [@%%NAME%%] Posição inválida.", + "toggleon": "/me [@%%NAME%%] %%FUNCTION%% ativado.", + "toggleoff": "/me [@%%NAME%%] %%FUNCTION%% desativado.", + "afkremoval": "Remoção de AFK", + "afksremoved": "AFKs removidos", + "afklimit": "Limite AFK", + "autoskip": "autoskip", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "chatfilter", + "lockdown": "lockdown", + "lockguard": "lockguard", + "usercommands": "comandos de usuário", + "motd": "MotD", + "welcomemsg": "mensagem de boas vindas", + "songstats": "estatísticas de música", + "etarestriction": "restrição de eta", + "activeusersintime": "/me [@%%NAME%%] %%AMOUNT%% usuários estiveram ativos nos últimos %%TIME%% minutos.", + "maximumafktimeset": "/me [@%%NAME%%] Duração máxima de AFK agora é: %%TIME%% minutos.", + "afkstatusreset": "/me [@%%NAME%%] Status AFK resetado: @%%USERNAME%%.", + "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% esteve inativo por %%TIME%%.", + "autowoot": "/me Nós recomendamos plugCubed para autowoot: http://plugcubed.net/", + "brandambassador": "/me Um Embaixador de Marca é a voz dos usuários da plug.dj. Eles promovem eventos, ajudam as comunidades e divulgam a plug.dj para todo o mundod. Mais info: http://blog.plug.dj/brand-ambassadors/", + "bouncerplusrank": "/me [@%%NAME%%] Você precisa ser Coordenador ou superior para ativar o Bouncer+.", + "chatcleared": "/me [@%%NAME%%] O chat foi limpo.", + "commandslink": "/me Comandos do %%BOTNAME%%: %%LINK%%", + "eatcookie": "/me ama cookies.", + "nousercookie": "/em Não vejo %%NAME%% na sala. Vou comer esse cookie sozinho.", + "selfcookie": "/me @%%NAME, você é mesquinho, né? Dando cookies a si mesmo, bah. Compartilhe um pouco com os outros!", + "cookie": "/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "/me [@%%NAME%%] A proteção de ciclo agora é: %%TIME%% minuto(s).", + "dclookuprank": "/me [@%%NAME%%] Somente Seguranças ou superiores podem usar !dclookup em outros usuários.", + "emojilist": "/me Emojis: %%LINK%%", + "notinwaitlist": "@%%NAME%%, você não está na lista de espera.", + "eta": "/me @%%NAME%% você tocará em aproximadamente %%TIME%%.", + "facebook": "/me Curta nossa página no Facebook: %%LINK%%", + "starterhelp": "/me Essa imagem te ajudará a usar e entender o plug.dj: %%LINK%%", + "roulettejoin": "/me @%%NAME%% entrou na roleta! (Use !leave para sair da mesma.)", + "jointime": "/me [@%%NAMEFROM%%] @%%USERNAME%% esteve na sala por %%TIME%%.", + "kickrank": "/me [@%%NAME%%] Você não pode kickar alguém do mesmo rank ou superior!", + "kick": "[@%%NAME%%], @%%USERNAME%% você está sendo kickado da comunidade por %%TIME%% minutos.", + "kill": "/me Desligando...", + "rouletteleave": "/me @%%NAME%% deixou a roleta!", + "songlink": "/me [@%%NAME%%] Link para a música atual: %%LINK%%", + "usedlockskip": "/me [%%NAME%% usou 'lockskip'.]", + "lockskippos": "/me [@%%NAME%%] Lockskip está agora movendo para a posição %%POSITION%%.", + "lockguardtime": "/me [@%%NAME%%] A proteção de travamento agora é %%TIME%% minuto(s).", + "maxlengthtime": "/me [@%%NAME%%] A duração máxima de tempo agora é %%TIME%% minutos.", + "motdset": "/me Mensagem do Dia: %%MSG%%", + "motdintervalset": "/me Intervalo da Mensagem do Dia: %%INTERVAL%% músicas.", + "addbotwaitlist": "/me @%%NAME%%, não tente me adicionar à fila de espera, por favor.", + "move": "/me [%%NAME%% usou 'move'.]", + "mutednotime": "/me [@%%NAME%%] @%%USERNAME%% mutado.", + "mutedmaxtime": "/me [@%%NAME%%] Você só pode mudar até no máximo %%TIME%% minutos.", + "mutedtime": "/me [@%%NAME%%] @%%USERNAME%% mutado por %%TIME%% minuto(s).", + "unmuted": "/me [@%%NAME%%] @%%USERNAME%% desmutado.", + "muterank": "/me [@%%NAME%%] Você não pode mutar usuários do mesmo nível ou superior.", + "oplist": "/me Lista OP: %%LINK%%", + "pong": "/me Pong!", + "reload": "/me Reiniciando...", + "removenotinwl": "/me [@%%NAME%%] Usuário @%%USERNAME%% não está na fila de espera.", + "roomrules": "/me Encontre as regras da sala aqui: %%LINK%%", + "sessionstats": "/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", + "skip": "/me [%%NAME%% usou 'skip'.]", + "madeby": "/me Este bot foi feito por %%NAME%%.", + "activefor": "Estive online por %%TIME%%.", + "swapinvalid": "/me [@%%NAME%%] Usuário inválido.", + "swapwlonly": "/me [@%%NAME%%] Use !swap somente com usuários que estão na fila de espera.", + "swapping": "/me Trocando posições: %%NAME1%% com %%NAME2%%.", + "genres": "/me Encontre os gêneros permitidos aqui: %%LINK%%", + "notbanned": "/me [@%%NAME%%] Usuário mencionado não foi banido.", + "unmutedeveryone": "/me [@%%NAME%%] Todos foram desmutados.", + "unmuteeveryonerank": "/me [@%%NAME%%] Somente Coordenadores podem desmutar todos os usuários de uma vez.", + "notmuted": "/me [@%%NAME%%] Usuário mencionado não foi mutado.", + "unmuterank": "/me [@%%NAME%%] Você não pode desmutar usuários do mesmo rank ou superior.", + "commandscd": "/me [@%%NAME%%] O tempo de espera de comandos para usuários agora é %%TIME%% segundos.", + "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: ' + %%WOOT%% + ', mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", + "website": "/me Visite nosso site: %%LINK%%", + "youtube": "/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%" + +} \ No newline at end of file From 938aca1efb8a62d367d4d116df5eea901c182616 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Mon, 1 Sep 2014 19:34:33 +0200 Subject: [PATCH 012/281] Official 2.0.0 --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 2d3a7712..924bd8ac 100644 --- a/basicBot.js +++ b/basicBot.js @@ -116,7 +116,7 @@ var botCreatorIDs = []; var basicBot = { - version: "2.0.0dev", + version: "2.0.0", status: false, name: "basicBot", loggedInID: null, From 876345180cf2750acd520ac7713991ab4cf26090 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Mon, 1 Sep 2014 19:42:46 +0200 Subject: [PATCH 013/281] Links redirected from development branch to master --- lang/langIndex.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/langIndex.json b/lang/langIndex.json index b3f187d8..466b1dd3 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,4 +1,4 @@ { - "english": "https://rawgit.com/***REMOVED***/basicBot/development/lang/en.json", - "portuguese": "https://rawgit.com/***REMOVED***/basicBot/development/lang/pt.json" + "english": "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", + "portuguese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/pt.json" } \ No newline at end of file From 3454e58a7241306d09b4331c2813eaaab8094439 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Mon, 1 Sep 2014 19:58:26 +0200 Subject: [PATCH 014/281] Firefox compatibility: textContent instead of innerText --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 924bd8ac..ea0d8f37 100644 --- a/basicBot.js +++ b/basicBot.js @@ -91,7 +91,7 @@ } var json_sett = null; var roominfo = document.getElementById("room-info"); - info = roominfo.innerText; + info = roominfo.textContent; var ref_bot = "@basicBot="; var ind_ref = info.indexOf(ref_bot); if (ind_ref > 0) { From dbe82316fbfd8b7831440cdbb3deaaf87adce3e9 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Mon, 1 Sep 2014 23:45:38 +0200 Subject: [PATCH 015/281] Dclookup bugfix and disabled filter for plug.dj links due to user profiles --- basicBot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index ea0d8f37..021eb0c1 100644 --- a/basicBot.js +++ b/basicBot.js @@ -747,7 +747,7 @@ } for (var i = 0; i < users.length; i++) { var user = basicBot.userUtilities.lookupUser(users[i].id); - basicBot.userUtilities.updatePosition(user, users[i].wlIndex + 1); + basicBot.userUtilities.updatePosition(user, API.getWaitListPosition(users[i].id) + 1); } }, chatcleaner: function (chat) { @@ -810,6 +810,7 @@ API.moderateDeleteChat(chat.cid); return true; } + /** var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; if (plugRoomLinkPatt.exec(msg)) { if (perm === 0) { @@ -818,6 +819,7 @@ return true; } } + **/ if (msg.indexOf('http://adf.ly/') > -1) { API.moderateDeleteChat(chat.cid); API.sendChat(subChat(basicBot.chat.adfly, {name: chat.un})); From 5c34e211d29af8b9d1b508615ed2d620de2f68db Mon Sep 17 00:00:00 2001 From: yemasthui Date: Tue, 2 Sep 2014 13:50:16 +0200 Subject: [PATCH 016/281] Additional retrieve settings option --- basicBot.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/basicBot.js b/basicBot.js index 021eb0c1..a7fea4bf 100644 --- a/basicBot.js +++ b/basicBot.js @@ -66,6 +66,15 @@ }); }; + var retrieveSettings = function(){ + var settings = JSON.parse(localStorage.getItem("basicBotsettings")); + if(settings !== null){ + for (var prop in settings) { + basicBot.settings[prop] = settings[prop]; + } + } + }; + var retrieveFromStorage = function () { var info = localStorage.getItem("basicBotStorageInfo"); if (info === null) API.chatLog(basicBot.chat.nodatafound); @@ -125,6 +134,7 @@ chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", chat: null, loadChat: loadChat, + retrieveSettings: retrieveSettings, settings: { botName: "basicBot", language: "english", From 12815cfb4ee2609c4a5e912eeb170bd90be4c462 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Tue, 2 Sep 2014 13:53:17 +0200 Subject: [PATCH 017/281] Additional loading of settings --- basicBot.js | 1 + 1 file changed, 1 insertion(+) diff --git a/basicBot.js b/basicBot.js index a7fea4bf..d6d7bbb5 100644 --- a/basicBot.js +++ b/basicBot.js @@ -987,6 +987,7 @@ if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); basicBot.connectAPI(); + retrieveSettings(); retrieveFromStorage(); if (basicBot.room.roomstats.launchTime === null) { basicBot.room.roomstats.launchTime = Date.now(); From 50315dce54f87b91a2922367eafd545b8cf598b5 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Tue, 2 Sep 2014 15:22:13 +0200 Subject: [PATCH 018/281] Fixed dclookup bug (array of !dc, !dclookup) --- basicBot.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/basicBot.js b/basicBot.js index d6d7bbb5..233f9c57 100644 --- a/basicBot.js +++ b/basicBot.js @@ -885,10 +885,10 @@ for (var comm in basicBot.commands) { var cmdCall = basicBot.commands[comm].command; - if(!Array.isArray(comm.command)) cmdCall = [cmdCall]; - for(var ind in cmdCall){ - if (basicBot.settings.commandLiteral + cmdCall[ind] === cmd) { - basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[ind]); + if(!Array.isArray(cmdCall)){cmdCall = [cmdCall]} + for(var i = 0; i < cmdCall.length; i++){ + if (basicBot.settings.commandLiteral + cmdCall[i] === cmd) { + basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[i]); executed = true; break; } @@ -1481,7 +1481,6 @@ var perm = basicBot.userUtilities.getPermission(chat.uid); if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); } - console.log(name); var user = basicBot.userUtilities.lookupUserName(name); if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); var toChat = basicBot.userUtilities.dclookup(user.id); From 2a9750a60343e8d813aca2959b09cc6558c283c4 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Tue, 2 Sep 2014 20:34:29 +0200 Subject: [PATCH 019/281] Fixed cookie variable %%NAME to %%NAME%% --- lang/pt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/pt.json b/lang/pt.json index 34b29b73..d3302313 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -75,7 +75,7 @@ "commandslink": "/me Comandos do %%BOTNAME%%: %%LINK%%", "eatcookie": "/me ama cookies.", "nousercookie": "/em Não vejo %%NAME%% na sala. Vou comer esse cookie sozinho.", - "selfcookie": "/me @%%NAME, você é mesquinho, né? Dando cookies a si mesmo, bah. Compartilhe um pouco com os outros!", + "selfcookie": "/me @%%NAME%%, você é mesquinho, né? Dando cookies a si mesmo, bah. Compartilhe um pouco com os outros!", "cookie": "/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "/me [@%%NAME%%] A proteção de ciclo agora é: %%TIME%% minuto(s).", "dclookuprank": "/me [@%%NAME%%] Somente Seguranças ou superiores podem usar !dclookup em outros usuários.", From 5aef5616e47284a67503a1851886af1cf13ffa49 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Wed, 3 Sep 2014 12:23:32 +0200 Subject: [PATCH 020/281] Fixing language reverting back to English on !reload --- basicBot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 233f9c57..464239c2 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1030,7 +1030,7 @@ if(emojibutton.length > 0){ emojibutton[0].click(); } - API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version})); + loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); window.bot = basicBot; }, commands: { @@ -2096,6 +2096,7 @@ if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { API.sendChat(basicBot.chat.reload); + storeToStorage(); basicBot.disconnectAPI(); kill(); setTimeout(function () { From 1e4685166ac0d40fdee2f442175b2661d9375fa8 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Wed, 3 Sep 2014 17:23:07 +0200 Subject: [PATCH 021/281] French translation --- README.md | 1 + lang/fr.json | 130 ++++++++++++++++++++++++++++++++++++++++++++ lang/langIndex.json | 3 +- 3 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 lang/fr.json diff --git a/README.md b/README.md index aef9452b..96315e05 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ I would like to thank the following people: |Language | Translator| |:------:|:---------:| |Portuguese|[Motel Bible](https://github.com/motelbible)| +|French|NDA| Copyright diff --git a/lang/fr.json b/lang/fr.json new file mode 100644 index 00000000..b3042d3c --- /dev/null +++ b/lang/fr.json @@ -0,0 +1,130 @@ +{ + "nodatafound": "Aucune donnée trouvée.", + "retrievingdata": "Récupération des données.", + "datarestored": "Succès de la récupération des donnés.", + "greyuser": " Uniquement les Videurs et les rangs supérieurs peuvent lancer le bot.", + "bouncer": " Le bot ne peut pas changer les personnes de place quand il est lancé par un Videur.", + "online": "/me %%BOTNAME%% v%%VERSION%% en ligne!", + + + "welcome": "/me Bienvenue %%NAME%%", + "welcomeback": "/me Bon retour, %%NAME%%", + "songknown": "/me :repeat: Cette musique a été jouée %%PLAYS%% fois dans les dernières %%TIMETOTAL%%, et la dernière fois il y a %%LASTTIME%%. :repeat:", + "timelimit": "/me @%%NAME%%, votre musique est plus longue que %%MAXLENGTH%% minutes, vous avez besoin de permissions pour jouer une musique plus longue.", + "permissionownsong": "/me :up: @%%NAME%% a la permission de jouer sa propre création !", + + + "isopen": "/me La roulette est maintenant ouverte ! Tapez !join pour participer !", + "winnerpicked": "/me Un gagnant a été trouvé ! @%%NAME%% à la position %%POSITION%%.", + + + "alreadyadding": "/me L'utilisateur est déjà en ajout ! Changement de la position désirée à %%POSITION%%.", + "adding": "/me Ajout de @%%NAME%% à la file d'attente. Queue actuelle: %%POSITION%%.", + + + "usernotfound": "/me Utilisateur non trouvé.", + "notdisconnected": "/me @%%NAME%% ne s'est pas déconnecté depuis que je suis là.", + "noposition": "/me Dernière position inconnue. La file d'attente a besoin d'être mise à jour pour enregistrer la dernière position d'un utilisateur.", + "toolongago": "/me la dernière déconnexion de @%%NAME%% remonte à trop longtemps: %%TIME%%.", + "valid": "/me @%%NAME%% s'est déconnecté il y a %%TIME%% et devrait être à la position %%POSITION%%.", + + + "warning1": "/me @%%NAME%%, vous êtes AFK depuis %%TIME%%, merci de répondre sous 2 minutes ou vous serez kické", + "warning2": "/me @%%NAME%%, vous serez enlevés de la queue si vous ne répondez pas.", + "afkremove": "/me @%%NAME%%, vous avez été enlevé car vous êtes resté AFK %%TIME%%. Vous êtiez à la position %%POSITION%%. Ecrivez au minimum un fois toute les %%MAXIMUMAFK%% minutes si vous voulez jouer une musique.", + + + "caps": "/me @%%NAME%%, décollez votre bouton capslock, merci.", + "askskip": "/me @%%NAME%%, ne demandez pas de passer une musique.", + "spam": "/me @%%NAME%%, merci de ne pas spammer.", + "roomadvertising": "/me @%%NAME%%, ne postez pas de liens menant vers d'autres salles.", + "adfly": "/me @%%NAME%%, merci de changer votre programme d'Autowoot. Nous vous suggérons PlugCubed: http://plugcubed.net/", + + + "invalidtime": "/me [@%%NAME%%] Temps spécifié invalide.", + "nouserspecified": "/me [@%%NAME%%] Aucun utilisateur spécifié.", + "invaliduserspecified": "/me [@%%NAME%%] Invalid user specified.", + "novaliduserspecified": "/me [@%%NAME%%] No valid user specified.", + "nolimitspecified": "/me [@%%NAME%%] Aucune limite spécifiée.", + "invalidlimitspecified": "/me [@%%NAME%%] Limite invalide.", + "invalidpositionspecified": "/me [@%%NAME%%] Position invalide spécifiée.", + "toggleon": "/me [@%%NAME%%] %%FUNCTION%% activée.", + "toggleoff": "/me [@%%NAME%%] %%FUNCTION%% désactivée.", + "afkremoval": "AFK removal", + "afksremoved": "AFK's removed", + "afklimit": "AFK limit", + "autoskip": "autoskip", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "chatfilter", + "lockdown": "lockdown", + "lockguard": "lockguard", + "usercommands": "commandesutilisateur", + "motd": "MotD", + "welcomemsg": "message de bienvenue", + "songstats": "statistiques de la chanson", + "etarestriction": "eta restriction", + "activeusersintime": "/me [@%%NAME%%] %%AMOUNT%% utilisateurs on parlés dans les dernières %%TIME%% minutes.", + "maximumafktimeset": "/me [@%%NAME%%] Durée de l'AFK maximum réglée à %%TIME%% minutes.", + "afkstatusreset": "/me [@%%NAME%%] Réinitialisation du statut AFK de @%%USERNAME%%.", + "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% a été inactif pour %%TIME%%.", + "autowoot": "/me Nous recommandons PlugCubes pour l'autowooting: http://plugcubed.net/", + "brandambassador": "/me Un Brand Ambassador est la voix des utilisateurs de plug.dj. Il promouvoient les évènements, font participer la communauté et partagent le message de plug.dj autour du monde. Pour plus d'info: http://blog.plug.dj/brand-ambassadors/", + "bouncerplusrank": "/me [@%%NAME%%] Vous devez être Manager pour pouvoir activer Bouncer+.", + "chatcleared": "/me [@%%NAME%%] A nettoyé le chat.", + "commandslink": "/me %%BOTNAME%% commandes: %%LINK%%", + "eatcookie": "/me mange un cookie.", + "nousercookie": "/me ne voit pas %%NAME%% dans la salle et mange le cookie.", + "selfcookie": "/me @%%NAME, tu est un peu radin non ? Te donner des cookies à toi même... Partage les avec d'autres gens !", + "cookie": "/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "/me [@%%NAME%%] Le cycleguard est paramétré pour %%TIME%% minute(s).", + "dclookuprank": "/me [@%%NAME%%] Uniquement les Bouncers peuvent vérifier pour les autres.", + "emojilist": "/me Liste des Emoji : %%LINK%%", + "notinwaitlist": "/me @%%NAME%%, vous n'êtes pas dans la file d'attente.", + "eta": "/me @%%NAME%% vous atteignerez les platines dans à peu près %%TIME%%.", + "facebook": "/me Suivez-nous sur Facebook: %%LINK%%", + "starterhelp": "/me Cette image vous aidera à débuter sur plug: %%LINK%%", + "roulettejoin": "/me @%%NAME%% a rejoint la roulette ! (!leave si vous le regrettez.)", + "jointime": "/me [@%%NAMEFROM%%] @%%USERNAME%% est dans la salle depuis %%TIME%%.", + "kickrank": "/me [@%%NAME%%] vous ne pouvez pas kicker un utilisateur avec un rang égal ou supérieur au votre !", + "kick": "/me [@%%NAME%%], @%%USERNAME%% vous allez vous faire kicker de la communauté pour %%TIME%% minutes.", + "kill": "/me Extinction.", + "rouletteleave": "/me @%%NAME%% a quitté la roulette !", + "songlink": "/me [@%%NAME%%] Lien vers la musique actuelle: %%LINK%%", + "usedlockskip": "/me [%%NAME%%] a utilisé lockskip.]", + "lockskippos": "/me [@%%NAME%%] Lockskip va bouger l'utilisateur à la position %%POSITION%%.", + "lockguardtime": "/me [@%%NAME%%] Le lockguard est maintenant paramétré pour %%TIME%% minute(s).", + "maxlengthtime": "/me [@%%NAME%%] La durée maximum d'une musique est maintenant de %%TIME%% minutes.", + "motdset": "/me Le MotD est maintenant : %%MSG%%", + "motdintervalset": "/me L'intervalle du MotD est maintenant de %%INTERVAL%%.", + "addbotwaitlist": "/me @%%NAME%%, n'essaye pas de m'ajouter à la liste d'attente, merci.", + "move": "/me [%%NAME%% a utilisé move.]", + "mutednotime": "/me [@%%NAME%%] A rendu muet @%%USERNAME%%.", + "mutedmaxtime": "/me [@%%NAME%%] Vous ne pouvez rendre muet qu'au maximum %%TIME%% minutes.", + "mutedtime": "/me [@%%NAME%%] A rendu muet @%%USERNAME%% pour %%TIME%% minutes.", + "unmuted": "/me [@%%NAME%%] A rendu la parole à @%%USERNAME%%.", + "muterank": "/me [@%%NAME%%] Vous ne pouvez pas rendre muet un utilisateur avec un rang égal ou supérieur au votre.", + "oplist": "/me OP list: %%LINK%%", + "pong": "/me Pong!", + "reload": "/me Je reviens.", + "removenotinwl": "/me [@%%NAME%%] L'utilisateur @%%USERNAME%% n'est pas dans la file d'attente.", + "roomrules": "/me Merci de lire les règles de la salle ici: %%LINK%%", + "sessionstats": "/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", + "skip": "/me [%%NAME%% a utilisé skip.]", + "madeby": "/me Ce bot a été fait par %%NAME%%.", + "activefor": "Cela fait %%TIME%% que je suis actif.", + "swapinvalid": "/me [@%%NAME%%] Utilisateur invalide. (Pas de nom avec des espaces!)", + "swapwlonly": "/me [@%%NAME%%] Merci d'uniquement intervertir des utilisateur dans la file d'attente !", + "swapping": "/me Echange de %%NAME1%% avec %%NAME2%%.", + "genres": "/me Merci de consulter les genres de musique permis: %%LINK%%", + "notbanned": "/me [@%%NAME%%] L'utilisateur n'a pas été banni.", + "unmutedeveryone": "/me [@%%NAME%%] Parole rendue à tout le monde.", + "unmuteeveryonerank": "/me [@%%NAME%%] Uniquement les managers peuvent rendre la parole à tout le monde en même temps.", + "notmuted": "/me [@%%NAME%%] cet utilisateur n'a pas été rendu muet.", + "unmuterank": "/me [@%%NAME%%] Vous ne pouvez pas rendre la parole à un utilisateur avec un rang égal ou supérieur au votre.", + "commandscd": "/me [@%%NAME%%] Le temps d'attente pour les commandes utilisateur ont été ajustées à %%TIME%% secondes.", + "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: ' + %%WOOT%% + ', mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", + "website": "/me Visitez notre site Internet: %%LINK%%", + "youtube": "/me [%%NAME%%] Abonnez-vous à notre chaîne Youtube: %%LINK%%" + +} \ No newline at end of file diff --git a/lang/langIndex.json b/lang/langIndex.json index 466b1dd3..361e158d 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,4 +1,5 @@ { "english": "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", - "portuguese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/pt.json" + "portuguese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/pt.json", + "french": "https://rawgit.com/***REMOVED***/basicBot/master/lang/fr.json" } \ No newline at end of file From 138e03e77042d19188aa75f861b7a4c29494ba7a Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 12 Sep 2014 11:25:40 +0200 Subject: [PATCH 022/281] Fixed parsing of links in plug's chat --- basicBot.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/basicBot.js b/basicBot.js index 464239c2..5e3601c0 100644 --- a/basicBot.js +++ b/basicBot.js @@ -121,6 +121,37 @@ }; + String.prototype.splitBetween = function(a, b){ + var self = this; + self = this.split(a); + for(var i = 0; i < self.length; i++){ + self[i] = self[i].split(b); + } + var arr = []; + for(var i = 0; i < self.length; i++){ + if(Array.isArray(self[i])){ + for(var j = 0; j < self[i].length; j++){ + arr.push(self[i][j]); + } + } + else arr.push(self[i]); + } + return arr; + }; + + var linkFixer = function(msg){ + var parts = msg.splitBetween(' Date: Fri, 12 Sep 2014 16:48:05 +0200 Subject: [PATCH 023/281] Fixed chat deletion (no BA/admin chat deletion, rest now deletes properly) --- basicBot.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/basicBot.js b/basicBot.js index 5e3601c0..96403947 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1019,6 +1019,12 @@ if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); basicBot.connectAPI(); + API.moderateDeleteChat = function(cid){ + $.ajax({ + url: "https://plug.dj/_/chat/"+cid, + type: "DELETE" + }) + }; retrieveSettings(); retrieveFromStorage(); if (basicBot.room.roomstats.launchTime === null) { From 07b4d921705d16b961823ce9670a975ada858335 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 12 Sep 2014 17:16:19 +0200 Subject: [PATCH 024/281] - Fixed locktimer message bug - Fixed json chat packs not loading as objects --- basicBot.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index 96403947..1c4e60e3 100644 --- a/basicBot.js +++ b/basicBot.js @@ -50,6 +50,7 @@ } $.get(link, function (json) { if (json !== null && typeof json !== "undefined") { + if(typeof json === "string") json = JSON.parse(json); basicBot.chat = json; cb(); } @@ -58,6 +59,7 @@ else{ $.get(basicBot.chatLink, function (json) { if (json !== null && typeof json !== "undefined") { + if(typeof json === "string") json = JSON.parse(json); basicBot.chat = json; cb(); } @@ -871,11 +873,15 @@ API.moderateDeleteChat(chat.cid); return true; } - var joinedroulette = basicBot.chat.roulettejoin.split('%%NAME%%'); + + var rlJoinChat = basicBot.chat.roulettejoin; + var rlLeaveChat = basicBot.chat.rouletteleave; + + var joinedroulette = rlJoinChat.split('%%NAME%%'); if(joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; else joinedroulette = joinedroulette[0]; - var leftroulette = basicBot.chat.rouletteleave.split('%%NAME%%'); + var leftroulette = rlLeaveChat.split('%%NAME%%'); if(leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; else leftroulette = leftroulette[0]; @@ -1914,7 +1920,7 @@ var lockTime = msg.substring(cmd.length + 1); if (!isNaN(lockTime)) { basicBot.settings.maximumLocktime = lockTime; - return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, position: basicBot.settings.maximumLocktime})); + return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, time: basicBot.settings.maximumLocktime})); } else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); } From 6b58c0e62692eca7242a5e2175c6f0718e777856 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 12 Sep 2014 17:26:22 +0200 Subject: [PATCH 025/281] Added song statistics to the customizable chats and updated official translations with it. --- basicBot.js | 9 ++++++++- lang/en.json | 4 ++-- lang/fr.json | 3 ++- lang/pt.json | 3 ++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/basicBot.js b/basicBot.js index 1c4e60e3..ceae6198 100644 --- a/basicBot.js +++ b/basicBot.js @@ -717,7 +717,14 @@ eventDjadvance: function (obj) { var lastplay = obj.lastPlay; if (typeof lastplay === 'undefined') return void (0); - if (basicBot.settings.songstats) API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") + if (basicBot.settings.songstats){ + if(typeof basicBot.chat.songstatistics === "undefined"){ + API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") + } + else{ + API.sendChat(subChat(basicBot.chat.songstatistics, {artist: lastplay.media.author, title: lastplay.media.title, woots: lastplay.score.positive, grabs: lastplay.score.grabs, mehs: lastplay.score.negative})) + } + } basicBot.room.roomstats.totalWoots += lastplay.score.positive; basicBot.room.roomstats.totalMehs += lastplay.score.negative; basicBot.room.roomstats.totalCurates += lastplay.score.grabs; diff --git a/lang/en.json b/lang/en.json index 4d772590..6d2a8cae 100644 --- a/lang/en.json +++ b/lang/en.json @@ -126,6 +126,6 @@ "commandscd": "/me [@%%NAME%%] The cooldown for commands by users is now set to %%TIME%% seconds.", "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: ' + %%WOOT%% + ', mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", "website": "/me Please visit our website: %%LINK%%", - "youtube": "/me [%%NAME%%] Subscribe to us on youtube: %%LINK%%" - + "youtube": "/me [%%NAME%%] Subscribe to us on youtube: %%LINK%%", + "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." } \ No newline at end of file diff --git a/lang/fr.json b/lang/fr.json index b3042d3c..1ab54162 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -125,6 +125,7 @@ "commandscd": "/me [@%%NAME%%] Le temps d'attente pour les commandes utilisateur ont été ajustées à %%TIME%% secondes.", "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: ' + %%WOOT%% + ', mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", "website": "/me Visitez notre site Internet: %%LINK%%", - "youtube": "/me [%%NAME%%] Abonnez-vous à notre chaîne Youtube: %%LINK%%" + "youtube": "/me [%%NAME%%] Abonnez-vous à notre chaîne Youtube: %%LINK%%", + "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." } \ No newline at end of file diff --git a/lang/pt.json b/lang/pt.json index d3302313..12122f46 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -125,6 +125,7 @@ "commandscd": "/me [@%%NAME%%] O tempo de espera de comandos para usuários agora é %%TIME%% segundos.", "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: ' + %%WOOT%% + ', mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", "website": "/me Visite nosso site: %%LINK%%", - "youtube": "/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%" + "youtube": "/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", + "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." } \ No newline at end of file From 81d905db68970c267992f4534a40c824244e7f2a Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 12 Sep 2014 17:27:25 +0200 Subject: [PATCH 026/281] Version bump --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index ceae6198..87573dd3 100644 --- a/basicBot.js +++ b/basicBot.js @@ -158,7 +158,7 @@ var botCreatorIDs = []; var basicBot = { - version: "2.0.0", + version: "2.0.1", status: false, name: "basicBot", loggedInID: null, From 62fbd7a479266fc54cdcbbbbd8ba531f6ff5c1f6 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 12 Sep 2014 17:35:56 +0200 Subject: [PATCH 027/281] Fixed cylcetimer incorrectly accepting no time --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 87573dd3..4a0258a8 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1506,7 +1506,7 @@ else { var msg = chat.message; var cycleTime = msg.substring(cmd.length + 1); - if (!isNaN(cycleTime)) { + if (!isNaN(cycleTime) && cycleTime !== "") { basicBot.settings.maximumCycletime = cycleTime; return API.sendChat(subChat(basicBot.chat.cycleguardtime, {name: chat.un, time: basicBot.settings.maximumCycletime})); } From bd558033b0420665eb28166f863c2da72b587de2 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 12 Sep 2014 17:40:38 +0200 Subject: [PATCH 028/281] Fixed clearchat --- basicBot.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index 4a0258a8..1f33b11f 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1382,10 +1382,7 @@ else { var currentchat = $('#chat-messages').children(); for (var i = 0; i < currentchat.length; i++) { - for (var j = 0; j < currentchat[i].classList.length; j++) { - if (currentchat[i].classList[j].indexOf('cid-') == 0) - API.moderateDeleteChat(currentchat[i].classList[j].substr(4)); - } + API.moderateDeleteChat(currentchat[i].getAttribute("data-cid")); } return API.sendChat(subChat(basicBot.chat.chatcleared,{name: chat.un})); } From faffcf1a206cadfafbb373622e3245dbacea2477 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 12 Sep 2014 17:50:53 +0200 Subject: [PATCH 029/281] Fixed minor issue: removing the current dj using !remove --- basicBot.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 1f33b11f..b0982212 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2172,7 +2172,13 @@ position: null, songCount: 0 }; - API.moderateRemoveDJ(user.id); + if(API.getDJ().id === user.id){ + API.moderateForceSkip(); + setTimeout(function(){ + API.moderateRemoveDJ(user.id); + }, 1*1000, user); + } + else API.moderateRemoveDJ(user.id); } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); } else API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); } From ac6f078832e1ad76d0a8f3ffd6377adca0b1a963 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 12 Sep 2014 19:01:13 +0200 Subject: [PATCH 030/281] Fixed locktimer incorrectly accepting no time --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index b0982212..f701cc5d 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1922,7 +1922,7 @@ else { var msg = chat.message; var lockTime = msg.substring(cmd.length + 1); - if (!isNaN(lockTime)) { + if (!isNaN(lockTime) && lockTime !== "") { basicBot.settings.maximumLocktime = lockTime; return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, time: basicBot.settings.maximumLocktime})); } From 1282ea427ad6b06b2043f315ee9c126d747184dc Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 12 Sep 2014 19:12:47 +0200 Subject: [PATCH 031/281] Readme update --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 96315e05..ccf73d52 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ basicBot ======== +A not so basic bot for plug.dj + +!!!TO CUSTOMIZE: USE [THIS REPOSITORY](https://github.com/***REMOVED***/basicBot-customization)!!! +============================================================================================== + IMPORTANT --------- @@ -58,7 +63,7 @@ I would like to thank the following people: |Language | Translator| |:------:|:---------:| |Portuguese|[Motel Bible](https://github.com/motelbible)| -|French|NDA| +|French|[NDA](https://github.com/NDAthereal)| Copyright From 3e478d1a4c164d0ef6b4f25935021a7a6650825e Mon Sep 17 00:00:00 2001 From: yemasthui Date: Sun, 14 Sep 2014 19:06:34 +0200 Subject: [PATCH 032/281] Fixed unbanning of users. --- basicBot.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index f701cc5d..a2d556f0 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1700,7 +1700,7 @@ else API.moderateBanUser(user.id, 1, API.BAN.DAY); setTimeout(function (id, name) { API.moderateUnbanUser(id); - console.log('Unbanned @' + name + '.'); + console.log('Unbanned @' + name + '. ('+id+')'); }, time * 60 * 1000, user.id, name); } else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); @@ -2461,14 +2461,15 @@ $(".icon-ban").click(); setTimeout(function (chat) { var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat() + if (msg.length === cmd.length) return API.sendChat(); var name = msg.substring(cmd.length + 2); var bannedUsers = API.getBannedUsers(); var found = false; + var bannedUser = null; for (var i = 0; i < bannedUsers.length; i++) { var user = bannedUsers[i]; if (user.username === name) { - id = user.id; + bannedUser = user; found = true; } } @@ -2476,7 +2477,7 @@ $(".icon-chat").click(); return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); } - API.moderateUnbanUser(user.id); + API.moderateUnbanUser(bannedUser.id); console.log("Unbanned " + name); setTimeout(function () { $(".icon-chat").click(); From 1047b2b4152dbd7a3afd0289be580888069499e1 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Mon, 15 Sep 2014 09:08:18 +0200 Subject: [PATCH 033/281] Fixing mistakes in the chat files (missing %%'s which resulted in variables not getting replaced). --- lang/en.json | 2 +- lang/fr.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/en.json b/lang/en.json index 6d2a8cae..ad355edc 100644 --- a/lang/en.json +++ b/lang/en.json @@ -76,7 +76,7 @@ "commandslink": "/me %%BOTNAME%% commands: %%LINK%%", "eatcookie": "/me eats a cookie.", "nousercookie": "/em doesn't see %%NAME%% in room and eats a cookie himself.", - "selfcookie": "/me @%%NAME, you're a bit greedy, aren't you? Giving cookies to yourself, bah. Share some with other people!", + "selfcookie": "/me @%%NAME%%, you're a bit greedy, aren't you? Giving cookies to yourself, bah. Share some with other people!", "cookie": "/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "/me [@%%NAME%%] The cycleguard is set to %%TIME%% minute(s).", "dclookuprank": "/me [@%%NAME%%] Only bouncers and above can do a lookup for others.", diff --git a/lang/fr.json b/lang/fr.json index 1ab54162..ee713e93 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -75,7 +75,7 @@ "commandslink": "/me %%BOTNAME%% commandes: %%LINK%%", "eatcookie": "/me mange un cookie.", "nousercookie": "/me ne voit pas %%NAME%% dans la salle et mange le cookie.", - "selfcookie": "/me @%%NAME, tu est un peu radin non ? Te donner des cookies à toi même... Partage les avec d'autres gens !", + "selfcookie": "/me @%%NAME%%, tu est un peu radin non ? Te donner des cookies à toi même... Partage les avec d'autres gens !", "cookie": "/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "/me [@%%NAME%%] Le cycleguard est paramétré pour %%TIME%% minute(s).", "dclookuprank": "/me [@%%NAME%%] Uniquement les Bouncers peuvent vérifier pour les autres.", From 05c0262589ed31de99a681f9d9eb2179eb2d5ddd Mon Sep 17 00:00:00 2001 From: yemasthui Date: Mon, 15 Sep 2014 13:58:58 +0200 Subject: [PATCH 034/281] Fixed autoskip + version bump. --- basicBot.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index a2d556f0..432ad1fb 100644 --- a/basicBot.js +++ b/basicBot.js @@ -158,7 +158,7 @@ var botCreatorIDs = []; var basicBot = { - version: "2.0.1", + version: "2.0.2", status: false, name: "basicBot", loggedInID: null, @@ -1287,13 +1287,13 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - if (basicBot.settings.autoskip) { - basicBot.settings.autoskip = !basicBot.settings.autoskip; + if (basicBot.room.autoskip) { + basicBot.room.autoskip = !basicBot.room.autoskip; clearTimeout(basicBot.room.autoskipTimer); return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); } else { - basicBot.settings.autoskip = !basicBot.settings.autoskip; + basicBot.room.autoskip = !basicBot.room.autoskip; return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); } } From 6be7dd280be23461cbcbe7f7bd4d3fb41e2c8dba Mon Sep 17 00:00:00 2001 From: yemasthui Date: Mon, 15 Sep 2014 14:04:04 +0200 Subject: [PATCH 035/281] Forgot part of !autoskip fix. --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 432ad1fb..5ce099a8 100644 --- a/basicBot.js +++ b/basicBot.js @@ -763,7 +763,7 @@ }; clearTimeout(basicBot.room.autoskipTimer); if (basicBot.room.autoskip) { - var remaining = media.duration * 1000; + var remaining = obj.media.duration * 1000; basicBot.room.autoskipTimer = setTimeout(function () { API.moderateForceSkip(); }, remaining - 500); From 76230b9ad6b5ce0c8313c89bd9bb4f56b3fabf70 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Mon, 15 Sep 2014 14:26:38 +0200 Subject: [PATCH 036/281] Final part of the autoskip fix. --- basicBot.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 5ce099a8..7e93c554 100644 --- a/basicBot.js +++ b/basicBot.js @@ -158,7 +158,7 @@ var botCreatorIDs = []; var basicBot = { - version: "2.0.2", + version: "2.0.3", status: false, name: "basicBot", loggedInID: null, @@ -765,8 +765,9 @@ if (basicBot.room.autoskip) { var remaining = obj.media.duration * 1000; basicBot.room.autoskipTimer = setTimeout(function () { + console.log("Skipping track."); API.moderateForceSkip(); - }, remaining - 500); + }, remaining + 1000); } storeToStorage(); From 3ef19724a305c231bf2bd00625e67b1b4ac3e460 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Mon, 15 Sep 2014 19:08:01 +0200 Subject: [PATCH 037/281] Added !deletechat @user command and added a failsafe for missing chat messages. --- .gitignore | 2 ++ basicBot.js | 33 ++++++++++++++++++++++++++++++++- commands.md | 1 + lang/en.json | 1 + lang/fr.json | 1 + lang/pt.json | 1 + 6 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4201a77d..becebf46 100644 --- a/.gitignore +++ b/.gitignore @@ -218,3 +218,5 @@ pip-log.txt ## Webstorms ############# .idea + +forknotice.md diff --git a/basicBot.js b/basicBot.js index 7e93c554..818843d4 100644 --- a/basicBot.js +++ b/basicBot.js @@ -26,6 +26,11 @@ }; var subChat = function(chat, obj){ + if(typeof chat === "undefined"){ + API.chatLog("There is a chat text missing."); + console.log("There is a chat text missing."); + return "[Error] No text message found."; + } var lit = '%%'; for(var prop in obj){ chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); @@ -158,7 +163,7 @@ var botCreatorIDs = []; var basicBot = { - version: "2.0.3", + version: "2.0.4", status: false, name: "basicBot", loggedInID: null, @@ -1538,6 +1543,32 @@ } }, + deletechatCommand: { + command: 'deletechat', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var chats = $('.from'); + for(var i = 0; i < chats.length; i++){ + var n = chats[i].textContent; + if(name.trim() === n.trim()){ + var cid = $(chats[i]).parent()[0].getAttribute('data-cid'); + API.moderateDeleteChat(cid); + } + } + API.sendChat(subChat(basicBot.chat.deletechat,{name: chat.un, username: name})); + } + } + }, + emojiCommand: { command: 'emoji', rank: 'user', diff --git a/commands.md b/commands.md index dc34c458..3e7394d2 100644 --- a/commands.md +++ b/commands.md @@ -28,6 +28,7 @@ Bouncer+ |!afkremoval | | toggles the afk check | |!autoskip | | skips songs automatically when they're done (use when the circles-bug happens) | |!bouncer+ | | disable bouncer+ | +|!deletechat | @user | delete all the chats by a certain user | |!lock | | lock the waitlist | |!lockdown | | lock down the room: only staff can chat | |!maxlength | X | specify the maximum length a song can be when timeguard is enabled | diff --git a/lang/en.json b/lang/en.json index ad355edc..e30f5e08 100644 --- a/lang/en.json +++ b/lang/en.json @@ -73,6 +73,7 @@ "brandambassador": "/me A Brand Ambassador is the voice of the plug.dj users. They promote events, engage the community and share the plug.dj message around the world. For more info: http://blog.plug.dj/brand-ambassadors/", "bouncerplusrank": "/me [@%%NAME%%] You have to be manager or up to enable Bouncer+.", "chatcleared": "/me [@%%NAME%%] Cleared the chat.", + "deletechat": "/me [@%%NAME%%] Cleared the chat of %%USERNAME%%.", "commandslink": "/me %%BOTNAME%% commands: %%LINK%%", "eatcookie": "/me eats a cookie.", "nousercookie": "/em doesn't see %%NAME%% in room and eats a cookie himself.", diff --git a/lang/fr.json b/lang/fr.json index ee713e93..5b9ac066 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -72,6 +72,7 @@ "brandambassador": "/me Un Brand Ambassador est la voix des utilisateurs de plug.dj. Il promouvoient les évènements, font participer la communauté et partagent le message de plug.dj autour du monde. Pour plus d'info: http://blog.plug.dj/brand-ambassadors/", "bouncerplusrank": "/me [@%%NAME%%] Vous devez être Manager pour pouvoir activer Bouncer+.", "chatcleared": "/me [@%%NAME%%] A nettoyé le chat.", + "deletechat": "/me [@%%NAME%%] A nettoyé le chat de %%USERNAME%%.", "commandslink": "/me %%BOTNAME%% commandes: %%LINK%%", "eatcookie": "/me mange un cookie.", "nousercookie": "/me ne voit pas %%NAME%% dans la salle et mange le cookie.", diff --git a/lang/pt.json b/lang/pt.json index 12122f46..8a18b4be 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -72,6 +72,7 @@ "brandambassador": "/me Um Embaixador de Marca é a voz dos usuários da plug.dj. Eles promovem eventos, ajudam as comunidades e divulgam a plug.dj para todo o mundod. Mais info: http://blog.plug.dj/brand-ambassadors/", "bouncerplusrank": "/me [@%%NAME%%] Você precisa ser Coordenador ou superior para ativar o Bouncer+.", "chatcleared": "/me [@%%NAME%%] O chat foi limpo.", + "deletechat": "/me [@%%NAME%%] O chat de %%USERNAME%% foi limpo.", "commandslink": "/me Comandos do %%BOTNAME%%: %%LINK%%", "eatcookie": "/me ama cookies.", "nousercookie": "/em Não vejo %%NAME%% na sala. Vou comer esse cookie sozinho.", From 5f7d031e93380b4bb806467bffada6dbb67f3dbb Mon Sep 17 00:00:00 2001 From: Samuel Mills Date: Tue, 16 Sep 2014 23:16:15 +0200 Subject: [PATCH 038/281] Solved issue: Chat reference error #4 --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 818843d4..acef4bef 100644 --- a/basicBot.js +++ b/basicBot.js @@ -753,7 +753,7 @@ var newMedia = obj.media; if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { var name = obj.dj.username; - API.sendChat(subChat(chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); + API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); API.moderateForceSkip(); } var user = basicBot.userUtilities.lookupUser(obj.dj.id); From 6fd37a6b5ca1108652c5618f76c1b0f43c8cad72 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Wed, 17 Sep 2014 12:29:33 +0200 Subject: [PATCH 039/281] Added blacklists functionality, version bump to 2.1.0 --- README.md | 4 + basicBot.js | 311 ++++++++++++++++++++++++++++++++++----------------- commands.md | 1 + lang/en.json | 4 + lang/fr.json | 4 + lang/pt.json | 4 + 6 files changed, 228 insertions(+), 100 deletions(-) diff --git a/README.md b/README.md index ccf73d52..f198da45 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ If this does not work, go to https://raw.githubusercontent.com/***REMOVED***/bas These can be found in [the commands file](https://github.com/***REMOVED***/basicBot/blob/master/commands.md). +###Blacklists### +Examples of blacklists can be found in [the customization repository](https://github.com/***REMOVED***/basicBot-customization/tree/master/blacklists). +You can add blacklists in the settings of the bot via the methods given in that same repository. See below for more information. + ###Extending functionality and custom default settings### basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/***REMOVED***/basicBot-customization) for more info. diff --git a/basicBot.js b/basicBot.js index acef4bef..3e9240fc 100644 --- a/basicBot.js +++ b/basicBot.js @@ -25,46 +25,47 @@ }; - var subChat = function(chat, obj){ - if(typeof chat === "undefined"){ + var subChat = function (chat, obj) { + if (typeof chat === "undefined") { API.chatLog("There is a chat text missing."); console.log("There is a chat text missing."); return "[Error] No text message found."; } var lit = '%%'; - for(var prop in obj){ + for (var prop in obj) { chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); } return chat; }; - var loadChat = function(cb){ - if(!cb) cb = function(){}; - $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function(json){ + var loadChat = function (cb) { + if (!cb) cb = function () { + }; + $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { var link = basicBot.chatLink; - if(json !== null && typeof json !== "undefined"){ + if (json !== null && typeof json !== "undefined") { langIndex = json; link = langIndex[basicBot.settings.language.toLowerCase()]; - if(basicBot.settings.chatLink !== basicBot.chatLink){ + if (basicBot.settings.chatLink !== basicBot.chatLink) { link = basicBot.settings.chatLink; } - else{ - if(typeof link === "undefined"){ + else { + if (typeof link === "undefined") { link = basicBot.chatLink; } } $.get(link, function (json) { if (json !== null && typeof json !== "undefined") { - if(typeof json === "string") json = JSON.parse(json); + if (typeof json === "string") json = JSON.parse(json); basicBot.chat = json; cb(); } }); } - else{ + else { $.get(basicBot.chatLink, function (json) { if (json !== null && typeof json !== "undefined") { - if(typeof json === "string") json = JSON.parse(json); + if (typeof json === "string") json = JSON.parse(json); basicBot.chat = json; cb(); } @@ -73,9 +74,9 @@ }); }; - var retrieveSettings = function(){ + var retrieveSettings = function () { var settings = JSON.parse(localStorage.getItem("basicBotsettings")); - if(settings !== null){ + if (settings !== null) { for (var prop in settings) { basicBot.settings[prop] = settings[prop]; } @@ -102,6 +103,7 @@ basicBot.room.roomstats = room.roomstats; basicBot.room.messages = room.messages; basicBot.room.queue = room.queue; + basicBot.room.newBlacklisted = room.newBlacklisted; API.chatLog(basicBot.chat.datarestored); } } @@ -128,16 +130,16 @@ }; - String.prototype.splitBetween = function(a, b){ + String.prototype.splitBetween = function (a, b) { var self = this; self = this.split(a); - for(var i = 0; i < self.length; i++){ + for (var i = 0; i < self.length; i++) { self[i] = self[i].split(b); } var arr = []; - for(var i = 0; i < self.length; i++){ - if(Array.isArray(self[i])){ - for(var j = 0; j < self[i].length; j++){ + for (var i = 0; i < self.length; i++) { + if (Array.isArray(self[i])) { + for (var j = 0; j < self[i].length; j++) { arr.push(self[i][j]); } } @@ -146,14 +148,14 @@ return arr; }; - var linkFixer = function(msg){ + var linkFixer = function (msg) { var parts = msg.splitBetween(' -1) return 10; + if (botCreatorIDs.indexOf(u.id) > -1) return 10; if (u.gRole < 2) return u.role; else { switch (u.gRole) { @@ -634,6 +644,63 @@ } API.sendChat('/me ' + msg); } + }, + updateBlacklists: function () { + for (var bl in basicBot.settings.blacklists) { + basicBot.room.blacklists[bl] = []; + if (typeof basicBot.settings.blacklists[bl] === 'function') { + basicBot.room.blacklists[bl] = basicBot.settings.blacklists(); + } + else if (typeof basicBot.settings.blacklists[bl] === 'string') { + if (basicBot.settings.blacklists[bl] === '') { + continue; + } + try { + (function(l){ + $.get(basicBot.settings.blacklists[l], function (data) { + console.log(data); + if (typeof data === 'string') { + data = JSON.parse(data); + } + var list = []; + for (var prop in data) { + if(typeof data[prop].mid !== 'undefined'){ + list.push(data[prop].mid); + } + } + basicBot.room.blacklists[l] = list; + }) + })(bl); + } + catch (e) { + API.chatLog('Error setting' + bl + 'blacklist.'); + console.log('Error setting' + bl + 'blacklist.'); + console.log(e); + } + } + } + setTimeout(function(){console.log(basicBot.room.blacklists)},5000); + }, + logNewBlacklistedSongs: function () { + if (typeof console.table !== 'undefined') { + console.table(basicBot.room.newBlacklisted); + } + else { + console.log(basicBot.room.newBlacklisted); + } + }, + exportNewBlacklistedSongs: function () { + var list = {}; + for (var i = 0; i < basicBot.room.newBlacklisted.length; i++) { + var track = basicBot.room.newBlacklisted[i]; + list[track.list] = []; + list[track.list].push({ + title: track.title, + author: track.author, + mid: track.mid + }); + } + return list; } }, eventChat: function (chat) { @@ -686,7 +753,7 @@ setTimeout(function (user) { API.sendChat(subChat(basicBot.chat.welcomeback, {name: user.username})); }, 1 * 1000, user) - : + : setTimeout(function (user) { API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); }, 1 * 1000, user); @@ -722,11 +789,11 @@ eventDjadvance: function (obj) { var lastplay = obj.lastPlay; if (typeof lastplay === 'undefined') return void (0); - if (basicBot.settings.songstats){ - if(typeof basicBot.chat.songstatistics === "undefined"){ + if (basicBot.settings.songstats) { + if (typeof basicBot.chat.songstatistics === "undefined") { API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") } - else{ + else { API.sendChat(subChat(basicBot.chat.songstatistics, {artist: lastplay.media.author, title: lastplay.media.title, woots: lastplay.score.positive, grabs: lastplay.score.grabs, mehs: lastplay.score.negative})) } } @@ -736,6 +803,15 @@ basicBot.room.roomstats.songCount++; basicBot.roomUtilities.intervalMessage(); basicBot.room.currentDJID = obj.dj.id; + + var mid = obj.media.format + ':' + obj.media.cid; + for (var bl in basicBot.room.blacklists) { + if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { + API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); + return API.moderateForceSkip(); + } + } + var alreadyPlayed = false; for (var i = 0; i < basicBot.room.historyList.length; i++) { if (basicBot.room.historyList[i][0] === obj.media.cid) { @@ -772,7 +848,7 @@ basicBot.room.autoskipTimer = setTimeout(function () { console.log("Skipping track."); API.moderateForceSkip(); - }, remaining + 1000); + }, remaining + 1000); } storeToStorage(); @@ -868,8 +944,8 @@ return true; } /** - var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - if (plugRoomLinkPatt.exec(msg)) { + var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; + if (plugRoomLinkPatt.exec(msg)) { if (perm === 0) { API.sendChat(subChat(basicBot.chat.roomadvertising, {name: chat.un})); API.moderateDeleteChat(chat.cid); @@ -891,11 +967,11 @@ var rlLeaveChat = basicBot.chat.rouletteleave; var joinedroulette = rlJoinChat.split('%%NAME%%'); - if(joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; + if (joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; else joinedroulette = joinedroulette[0]; var leftroulette = rlLeaveChat.split('%%NAME%%'); - if(leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; + if (leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; else leftroulette = leftroulette[0]; if ((msg.indexOf(joinedroulette) > -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { @@ -936,8 +1012,10 @@ for (var comm in basicBot.commands) { var cmdCall = basicBot.commands[comm].command; - if(!Array.isArray(cmdCall)){cmdCall = [cmdCall]} - for(var i = 0; i < cmdCall.length; i++){ + if (!Array.isArray(cmdCall)) { + cmdCall = [cmdCall] + } + for (var i = 0; i < cmdCall.length; i++) { if (basicBot.settings.commandLiteral + cmdCall[i] === cmd) { basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[i]); executed = true; @@ -1034,18 +1112,24 @@ API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); }, startup: function () { + Function.prototype.toString = function(){return 'Function.'}; var u = API.getUser(); if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); basicBot.connectAPI(); - API.moderateDeleteChat = function(cid){ + API.moderateDeleteChat = function (cid) { $.ajax({ - url: "https://plug.dj/_/chat/"+cid, + url: "https://plug.dj/_/chat/" + cid, type: "DELETE" }) }; - retrieveSettings(); - retrieveFromStorage(); + //retrieveSettings(); + //retrieveFromStorage(); + window.bot = basicBot; + basicBot.roomUtilities.updateBlacklists(); + setInterval(basicBot.roomUtilities.updateBlacklists, 60*60*1000); + basicBot.getNewBlacklistedSongs = basicBot.roomUtilities.exportNewBlacklistedSongs; + basicBot.logNewBlacklistedSongs = basicBot.roomUtilities.logNewBlacklistedSongs; if (basicBot.room.roomstats.launchTime === null) { basicBot.room.roomstats.launchTime = Date.now(); } @@ -1084,11 +1168,10 @@ API.sendChat('/cap 1'); API.setVolume(0); var emojibutton = $(".icon-emoji-on"); - if(emojibutton.length > 0){ + if (emojibutton.length > 0) { emojibutton[0].click(); } loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); - window.bot = basicBot; }, commands: { executable: function (minRank, chat) { @@ -1350,6 +1433,34 @@ } }, + blacklistCommand: { + command: ['blacklist', 'bl'], + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolistspecified, {name: chat.un})); + var list = msg.substr(cmd.length + 1); + if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); + else { + var media = API.getMedia(); + basicBot.room.newBlacklisted.push({ + list: list, + author: media.author, + title: media.title, + mid: media.format + ':' + media.cid + }); + basicBot.room.blacklists[list].push(media.format + ':' + media.cid); + API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author,title: media.title, mid: media.format + ':' + media.cid})); + API.moderateForceSkip(); + } + } + } + }, + bouncerPlusCommand: { command: 'bouncer+', rank: 'mod', @@ -1390,7 +1501,7 @@ for (var i = 0; i < currentchat.length; i++) { API.moderateDeleteChat(currentchat[i].getAttribute("data-cid")); } - return API.sendChat(subChat(basicBot.chat.chatcleared,{name: chat.un})); + return API.sendChat(subChat(basicBot.chat.chatcleared, {name: chat.un})); } } }, @@ -1520,7 +1631,7 @@ }, dclookupCommand: { - command: ['dclookup','dc'], + command: ['dclookup', 'dc'], rank: 'user', type: 'startsWith', functionality: function (chat, cmd) { @@ -1557,14 +1668,14 @@ var user = basicBot.userUtilities.lookupUserName(name); if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); var chats = $('.from'); - for(var i = 0; i < chats.length; i++){ + for (var i = 0; i < chats.length; i++) { var n = chats[i].textContent; - if(name.trim() === n.trim()){ + if (name.trim() === n.trim()) { var cid = $(chats[i]).parent()[0].getAttribute('data-cid'); API.moderateDeleteChat(cid); } } - API.sendChat(subChat(basicBot.chat.deletechat,{name: chat.un, username: name})); + API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); } } }, @@ -1732,7 +1843,7 @@ else API.moderateBanUser(user.id, 1, API.BAN.DAY); setTimeout(function (id, name) { API.moderateUnbanUser(id); - console.log('Unbanned @' + name + '. ('+id+')'); + console.log('Unbanned @' + name + '. (' + id + ')'); }, time * 60 * 1000, user.id, name); } else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); @@ -2070,49 +2181,49 @@ var permUser = basicBot.userUtilities.getPermission(user.id); if (permFrom > permUser) { /* - basicBot.room.mutedUsers.push(user.id); - if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); - else { - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === id) { - indexMuted = i; - wasMuted = true; - } - } - if (indexMuted > -1) { - basicBot.room.mutedUsers.splice(indexMuted); - var u = basicBot.userUtilities.lookupUser(id); - var name = u.username; - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - }, time * 60 * 1000, user.id); - } - */ - if(time > 45){ + basicBot.room.mutedUsers.push(user.id); + if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); + else { + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === id) { + indexMuted = i; + wasMuted = true; + } + } + if (indexMuted > -1) { + basicBot.room.mutedUsers.splice(indexMuted); + var u = basicBot.userUtilities.lookupUser(id); + var name = u.username; + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + }, time * 60 * 1000, user.id); + } + */ + if (time > 45) { API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); API.moderateMuteUser(user.id, 1, API.MUTE.LONG); } - else if(time === 45){ + else if (time === 45) { API.moderateMuteUser(user.id, 1, API.MUTE.LONG); API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); } - else if(time > 30){ + else if (time > 30) { API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function(id){ + setTimeout(function (id) { API.moderateUnmuteUser(id); }, time * 60 * 1000, user.id); } else { API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function(id){ + setTimeout(function (id) { API.moderateUnmuteUser(id); }, time * 60 * 1000, user.id); } @@ -2204,11 +2315,11 @@ position: null, songCount: 0 }; - if(API.getDJ().id === user.id){ + if (API.getDJ().id === user.id) { API.moderateForceSkip(); - setTimeout(function(){ + setTimeout(function () { API.moderateRemoveDJ(user.id); - }, 1*1000, user); + }, 1 * 1000, user); } else API.moderateRemoveDJ(user.id); } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); @@ -2406,8 +2517,8 @@ var user2 = basicBot.userUtilities.lookupUserName(name2); if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); - var p1 = API.getWaitListPosition(user1.id) +1; - var p2 = API.getWaitListPosition(user2.id) +1; + var p1 = API.getWaitListPosition(user1.id) + 1; + var p2 = API.getWaitListPosition(user2.id) + 1; if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); if (p1 < p2) { @@ -2543,14 +2654,14 @@ var msg = chat.message; var permFrom = basicBot.userUtilities.getPermission(chat.uid); /** - if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { + if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { if (permFrom > 2) { basicBot.room.mutedUsers = []; return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); } else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); } - **/ + **/ var from = chat.un; var name = msg.substr(cmd.length + 2); @@ -2561,25 +2672,25 @@ var permUser = basicBot.userUtilities.getPermission(user.id); if (permFrom > permUser) { /* - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === user.id) { - indexMuted = i; - wasMuted = true; - } - - } - if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); - basicBot.room.mutedUsers.splice(indexMuted); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - */ - try{ + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === user.id) { + indexMuted = i; + wasMuted = true; + } + + } + if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + basicBot.room.mutedUsers.splice(indexMuted); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + */ + try { API.moderateUnmuteUser(user.id); API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); } - catch(e){ + catch (e) { API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); } } diff --git a/commands.md b/commands.md index 3e7394d2..4f57e0a8 100644 --- a/commands.md +++ b/commands.md @@ -48,6 +48,7 @@ Bouncer |!afkreset | @user | resets the afk time of user | |!afktime | @user | shows how long user has been afk | |!ban | @user | bans user for 1 day | +|!bl | blacklistname | add the song to the specified blacklist |!cycleguard | | toggles the cycleguard | |!dclookup / !dc | (@user) | do dclookup for user | |!english | @user | ask user to speak english (asked in the language they set plug to) | diff --git a/lang/en.json b/lang/en.json index e30f5e08..2f58a918 100644 --- a/lang/en.json +++ b/lang/en.json @@ -13,6 +13,7 @@ "songknown": "/me :repeat: This song has been played %%PLAYS%% time(s) in the last %%TIMETOTAL%%, last play was %%LASTTIME%% ago. :repeat:", "timelimit": "/me @%%NAME%%, your song is longer than %%MAXLENGTH%% minutes, you need permission to play longer songs.", "permissionownsong": "/me :up: @%%NAME%% has permission to play their own production!", + "isblacklisted": "/me This track is on the %%BLACKLIST%% blacklist! Skipping...", "isopen": "/me The roulette is now open! Type !join to participate!", @@ -45,6 +46,8 @@ "invalidtime": "/me [@%%NAME%%] Invalid time specified.", "nouserspecified": "/me [@%%NAME%%] No user specified.", "invaliduserspecified": "/me [@%%NAME%%] Invalid user specified.", + "nolistspecified": "/me [@%%NAME%%] No list specified.", + "invalidlistspecified": "/me [@%%NAME%%] Invalid list specified.", "novaliduserspecified": "/me [@%%NAME%%] No valid user specified.", "nolimitspecified": "/me [@%%NAME%%] No limit specified.", "invalidlimitspecified": "/me [@%%NAME%%] Invalid limit.", @@ -55,6 +58,7 @@ "afksremoved": "AFK's removed", "afklimit": "AFK limit", "autoskip": "autoskip", + "newblacklisted": "/me [@%%NAME%%] This track belongs on the %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", "cycleguard": "cycleguard", "timeguard": "timeguard", "chatfilter": "chatfilter", diff --git a/lang/fr.json b/lang/fr.json index 5b9ac066..2f8e8575 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -12,6 +12,7 @@ "songknown": "/me :repeat: Cette musique a été jouée %%PLAYS%% fois dans les dernières %%TIMETOTAL%%, et la dernière fois il y a %%LASTTIME%%. :repeat:", "timelimit": "/me @%%NAME%%, votre musique est plus longue que %%MAXLENGTH%% minutes, vous avez besoin de permissions pour jouer une musique plus longue.", "permissionownsong": "/me :up: @%%NAME%% a la permission de jouer sa propre création !", + "isblacklisted": "/me This track is on the %%BLACKLIST%% blacklist! Skipping...", "isopen": "/me La roulette est maintenant ouverte ! Tapez !join pour participer !", @@ -45,6 +46,8 @@ "nouserspecified": "/me [@%%NAME%%] Aucun utilisateur spécifié.", "invaliduserspecified": "/me [@%%NAME%%] Invalid user specified.", "novaliduserspecified": "/me [@%%NAME%%] No valid user specified.", + "nolistspecified": "/me [@%%NAME%%] No list specified.", + "invalidlistspecified": "/me [@%%NAME%%] Invalid list specified.", "nolimitspecified": "/me [@%%NAME%%] Aucune limite spécifiée.", "invalidlimitspecified": "/me [@%%NAME%%] Limite invalide.", "invalidpositionspecified": "/me [@%%NAME%%] Position invalide spécifiée.", @@ -54,6 +57,7 @@ "afksremoved": "AFK's removed", "afklimit": "AFK limit", "autoskip": "autoskip", + "newblacklisted": "/me [@%%NAME%%] This track belongs on the %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", "cycleguard": "cycleguard", "timeguard": "timeguard", "chatfilter": "chatfilter", diff --git a/lang/pt.json b/lang/pt.json index 8a18b4be..2562b7e7 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -12,6 +12,7 @@ "songknown": "/me :repeat: Essa música foi tocada %%PLAYS%% vez(es) nos últimos %%TIMETOTAL%%. Última vez: %%LASTTIME%% atrás. :repeat:", "timelimit": "@%%NAME%%, sua música tem duração maior que %%MAXLENGTH%% minutos. Você precisa de permissão para tocar músicas longas.", "permissionownsong": "/me :up: @%%NAME%% tem permissão para tocar música de própria autoria!", + "isblacklisted": "/me This track is on the %%BLACKLIST%% blacklist! Skipping...", "isopen": "/me A roleta foi iniciada! Use !join para participar!", @@ -44,6 +45,8 @@ "invalidtime": "/me [@%%NAME%%] Tempo inválido.", "nouserspecified": "/me [@%%NAME%%] Usuário não especificado.", "invaliduserspecified": "/me [@%%NAME%%] Usuário inválido.", + "nolistspecified": "/me [@%%NAME%%] No list specified.", + "invalidlistspecified": "/me [@%%NAME%%] Invalid list specified.", "novaliduserspecified": "/me [@%%NAME%%] Usuário especificado não válido.", "nolimitspecified": "/me [@%%NAME%%] Limite não especificado.", "invalidlimitspecified": "/me [@%%NAME%%] Limite inválido.", @@ -54,6 +57,7 @@ "afksremoved": "AFKs removidos", "afklimit": "Limite AFK", "autoskip": "autoskip", + "newblacklisted": "/me [@%%NAME%%] This track belongs on the %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", "cycleguard": "cycleguard", "timeguard": "timeguard", "chatfilter": "chatfilter", From 989fb280c07da2ee7c97e1a796e7f8fccb90f4c0 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Wed, 17 Sep 2014 12:32:48 +0200 Subject: [PATCH 040/281] Removed debugging console.logs --- basicBot.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 3e9240fc..a8f975ac 100644 --- a/basicBot.js +++ b/basicBot.js @@ -658,7 +658,6 @@ try { (function(l){ $.get(basicBot.settings.blacklists[l], function (data) { - console.log(data); if (typeof data === 'string') { data = JSON.parse(data); } @@ -679,7 +678,6 @@ } } } - setTimeout(function(){console.log(basicBot.room.blacklists)},5000); }, logNewBlacklistedSongs: function () { if (typeof console.table !== 'undefined') { From 135d30b22f7ba938ee1964556f30fe4a96b71ca4 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Wed, 17 Sep 2014 13:16:23 +0200 Subject: [PATCH 041/281] Added song for possible custom handlers when a song gets blacklisted --- basicBot.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index a8f975ac..eebf8059 100644 --- a/basicBot.js +++ b/basicBot.js @@ -272,6 +272,7 @@ }, newBlacklisted: [], + newBlacklistedSongFunction: null, roulette: { rouletteStatus: false, participants: [], @@ -1445,15 +1446,19 @@ if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); else { var media = API.getMedia(); - basicBot.room.newBlacklisted.push({ + var track = { list: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid - }); + }; + basicBot.room.newBlacklisted.push(track); basicBot.room.blacklists[list].push(media.format + ':' + media.cid); API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author,title: media.title, mid: media.format + ':' + media.cid})); API.moderateForceSkip(); + if(typeof basicBot.room.newBlacklistedSongFunction === 'function'){ + basicBot.room.newBlacklistedSongFunction(track); + } } } } From 3f388246a1cb1317316e7e296d05e0323aa06a59 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Wed, 17 Sep 2014 13:17:51 +0200 Subject: [PATCH 042/281] Updated commands list with !blacklist in addition to !bl --- commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands.md b/commands.md index 4f57e0a8..33cd22e0 100644 --- a/commands.md +++ b/commands.md @@ -48,7 +48,7 @@ Bouncer |!afkreset | @user | resets the afk time of user | |!afktime | @user | shows how long user has been afk | |!ban | @user | bans user for 1 day | -|!bl | blacklistname | add the song to the specified blacklist +|!blacklist / !bl | blacklistname | add the song to the specified blacklist |!cycleguard | | toggles the cycleguard | |!dclookup / !dc | (@user) | do dclookup for user | |!english | @user | ask user to speak english (asked in the language they set plug to) | From 33d8ed64f86d3e1d50879ff6be33275cd6e9fdee Mon Sep 17 00:00:00 2001 From: yemasthui Date: Thu, 18 Sep 2014 12:20:09 +0200 Subject: [PATCH 043/281] Forgot to re-enable retrieving data from localStorage after having it disabled for testing. --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index eebf8059..7da117e7 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1122,8 +1122,8 @@ type: "DELETE" }) }; - //retrieveSettings(); - //retrieveFromStorage(); + retrieveSettings(); + retrieveFromStorage(); window.bot = basicBot; basicBot.roomUtilities.updateBlacklists(); setInterval(basicBot.roomUtilities.updateBlacklists, 60*60*1000); From 0bf20b204256b7f824268e6965adfca668cfd3c9 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Thu, 18 Sep 2014 12:52:56 +0200 Subject: [PATCH 044/281] Added Portuguese translations of blacklist chats (provided by motelbible) --- lang/pt.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/pt.json b/lang/pt.json index 2562b7e7..2bbe55ad 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -12,7 +12,7 @@ "songknown": "/me :repeat: Essa música foi tocada %%PLAYS%% vez(es) nos últimos %%TIMETOTAL%%. Última vez: %%LASTTIME%% atrás. :repeat:", "timelimit": "@%%NAME%%, sua música tem duração maior que %%MAXLENGTH%% minutos. Você precisa de permissão para tocar músicas longas.", "permissionownsong": "/me :up: @%%NAME%% tem permissão para tocar música de própria autoria!", - "isblacklisted": "/me This track is on the %%BLACKLIST%% blacklist! Skipping...", + "isblacklisted": "/me Essa música está na lista negra %%BLACKLIST%%! Pulando música...", "isopen": "/me A roleta foi iniciada! Use !join para participar!", @@ -45,8 +45,8 @@ "invalidtime": "/me [@%%NAME%%] Tempo inválido.", "nouserspecified": "/me [@%%NAME%%] Usuário não especificado.", "invaliduserspecified": "/me [@%%NAME%%] Usuário inválido.", - "nolistspecified": "/me [@%%NAME%%] No list specified.", - "invalidlistspecified": "/me [@%%NAME%%] Invalid list specified.", + "nolistspecified": "/me [@%%NAME%%] Lista não especificada.", + "invalidlistspecified": "/me [@%%NAME%%] Lista inválida.", "novaliduserspecified": "/me [@%%NAME%%] Usuário especificado não válido.", "nolimitspecified": "/me [@%%NAME%%] Limite não especificado.", "invalidlimitspecified": "/me [@%%NAME%%] Limite inválido.", @@ -57,7 +57,7 @@ "afksremoved": "AFKs removidos", "afklimit": "Limite AFK", "autoskip": "autoskip", - "newblacklisted": "/me [@%%NAME%%] This track belongs on the %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "newblacklisted": "/me [@%%NAME%%] Essa música está na lista negra %%BLACKLIST%%! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", "cycleguard": "cycleguard", "timeguard": "timeguard", "chatfilter": "chatfilter", From 91d538178459c1504db0eb45c82033bad8fc1d1b Mon Sep 17 00:00:00 2001 From: yemasthui Date: Wed, 8 Oct 2014 22:56:18 +0200 Subject: [PATCH 045/281] Bugfix: wrong toggle message for !welcome --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 7da117e7..0193d72c 100644 --- a/basicBot.js +++ b/basicBot.js @@ -165,7 +165,7 @@ var botCreatorIDs = []; var basicBot = { - version: "2.1.0", + version: "2.1.1", status: false, name: "basicBot", loggedInID: null, @@ -2775,7 +2775,7 @@ } else { basicBot.settings.welcome = !basicBot.settings.welcome; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.welcomemsg})); } } } From 13212c6e7b0150a8149cab5cd00ef149e47311e4 Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 24 Oct 2014 19:28:58 +0200 Subject: [PATCH 046/281] Adjusted auto-skip timer a bit and fixed custom mute times. --- basicBot.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 0193d72c..ea28406a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -165,7 +165,7 @@ var botCreatorIDs = []; var basicBot = { - version: "2.1.1", + version: "2.1.2", status: false, name: "basicBot", loggedInID: null, @@ -846,8 +846,9 @@ var remaining = obj.media.duration * 1000; basicBot.room.autoskipTimer = setTimeout(function () { console.log("Skipping track."); + //API.sendChat('Song stuck, skipping...'); API.moderateForceSkip(); - }, remaining + 1000); + }, remaining + 3000); } storeToStorage(); @@ -2217,6 +2218,13 @@ } else if (time > 30) { + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + else if (time > 15) { API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); setTimeout(function (id) { From 9693ddeb54fb22360d45b46a392bd954719ac4ae Mon Sep 17 00:00:00 2001 From: yemasthui Date: Tue, 4 Nov 2014 14:27:52 +0100 Subject: [PATCH 047/281] Trying to fix !dc abuse --- basicBot.js | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/basicBot.js b/basicBot.js index ea28406a..259a7c02 100644 --- a/basicBot.js +++ b/basicBot.js @@ -165,7 +165,7 @@ var botCreatorIDs = []; var basicBot = { - version: "2.1.2", + version: "2.1.3", status: false, name: "basicBot", loggedInID: null, @@ -657,14 +657,14 @@ continue; } try { - (function(l){ + (function (l) { $.get(basicBot.settings.blacklists[l], function (data) { if (typeof data === 'string') { data = JSON.parse(data); } var list = []; for (var prop in data) { - if(typeof data[prop].mid !== 'undefined'){ + if (typeof data[prop].mid !== 'undefined') { list.push(data[prop].mid); } } @@ -786,8 +786,19 @@ } }, eventDjadvance: function (obj) { + var user = basicBot.userUtilities.lookupUser(obj.dj.id) + for(var i = 0; i < basicBot.room.users.length; i++){ + if(basicBot.room.users[i].id === user.id){ + basicBot.room.users[i].lastDC = { + time: null, + position: null, + songCount: 0 + }; + } + } + var lastplay = obj.lastPlay; - if (typeof lastplay === 'undefined') return void (0); + if (typeof lastplay === 'undefined') return; if (basicBot.settings.songstats) { if (typeof basicBot.chat.songstatistics === "undefined") { API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") @@ -831,16 +842,10 @@ API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); API.moderateForceSkip(); } - var user = basicBot.userUtilities.lookupUser(obj.dj.id); if (user.ownSong) { API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); user.ownSong = false; } - user.lastDC = { - time: null, - position: null, - songCount: 0 - }; clearTimeout(basicBot.room.autoskipTimer); if (basicBot.room.autoskip) { var remaining = obj.media.duration * 1000; @@ -1112,7 +1117,9 @@ API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); }, startup: function () { - Function.prototype.toString = function(){return 'Function.'}; + Function.prototype.toString = function () { + return 'Function.' + }; var u = API.getUser(); if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); @@ -1127,7 +1134,7 @@ retrieveFromStorage(); window.bot = basicBot; basicBot.roomUtilities.updateBlacklists(); - setInterval(basicBot.roomUtilities.updateBlacklists, 60*60*1000); + setInterval(basicBot.roomUtilities.updateBlacklists, 60 * 60 * 1000); basicBot.getNewBlacklistedSongs = basicBot.roomUtilities.exportNewBlacklistedSongs; basicBot.logNewBlacklistedSongs = basicBot.roomUtilities.logNewBlacklistedSongs; if (basicBot.room.roomstats.launchTime === null) { @@ -1455,9 +1462,9 @@ }; basicBot.room.newBlacklisted.push(track); basicBot.room.blacklists[list].push(media.format + ':' + media.cid); - API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author,title: media.title, mid: media.format + ':' + media.cid})); + API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); API.moderateForceSkip(); - if(typeof basicBot.room.newBlacklistedSongFunction === 'function'){ + if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { basicBot.room.newBlacklistedSongFunction(track); } } From 4c69c053611a2689100806f61eb855f0f1f00bbc Mon Sep 17 00:00:00 2001 From: yemasthui Date: Fri, 12 Dec 2014 16:10:55 +0100 Subject: [PATCH 048/281] Temporary getWaitListPosition fix. --- basicBot.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 259a7c02..30178fa0 100644 --- a/basicBot.js +++ b/basicBot.js @@ -7,6 +7,19 @@ (function () { + API.getWaitListPosition = function(id){ + if(typeof id === 'undefined' || id === null){ + id = API.getUser().id; + } + var wl = API.getWaitList(); + for(var i = 0; i < wl.length; i++){ + if(wl[i].id === id){ + return i; + } + } + return -1; + }; + var kill = function () { clearInterval(basicBot.room.autodisableInterval); clearInterval(basicBot.room.afkInterval); @@ -165,7 +178,7 @@ var botCreatorIDs = []; var basicBot = { - version: "2.1.3", + version: "2.1.4", status: false, name: "basicBot", loggedInID: null, From 6df7e7a66a14a8f62c0b272ddfc41a3394c61329 Mon Sep 17 00:00:00 2001 From: Wouter Gerarts Date: Sat, 27 Dec 2014 04:43:03 +0100 Subject: [PATCH 049/281] Fix storage loading retrieveFromStorage wasn't actually assigned to the basicBot object, which causes the function to never run, and it's settings to never be loaded. This fixes the issue. --- basicBot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 30178fa0..2e59591a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -188,6 +188,7 @@ chat: null, loadChat: loadChat, retrieveSettings: retrieveSettings, + retrieveFromStorage: retrieveFromStorage, settings: { botName: "basicBot", language: "english", @@ -2840,4 +2841,4 @@ }; loadChat(basicBot.startup); -}).call(this); \ No newline at end of file +}).call(this); From 3a771385c08319c43330305435cb3a8ddb754fc0 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 3 Jan 2015 21:21:57 +0000 Subject: [PATCH 050/281] Voteskip feature added. --- basicBot.js | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/basicBot.js b/basicBot.js index 2e59591a..6869332e 100644 --- a/basicBot.js +++ b/basicBot.js @@ -202,6 +202,8 @@ maximumLocktime: 10, cycleGuard: true, maximumCycletime: 10, + voteSkip: false, + voteSkipLimit: 10, timeGuard: true, maximumSongLength: 10, autodisable: true, @@ -791,6 +793,18 @@ } } } + + var mehs = API.getScore().negative; + var woots = API.getScore().positive; + var dj = API.getDJ(); + + if (basicBot.settings.voteSkip) { + if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { + API.sendChat('/me @' + dj.username + ', your song has exceeded the maximum amount of mehs needed to skip.'); + API.moderateForceSkip(); + } + } + }, eventCurateupdate: function (obj) { for (var i = 0; i < basicBot.room.users.length; i++) { @@ -1655,6 +1669,49 @@ } }, + voteskipCommand: { + command: 'voteskip', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat('/me Voteskip limit is currently set to a difference of ' + basicBot.settings.voteSkipLimit + ' mehs.'); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + if (isNaN(argument)) { + API.sendChat('/me Invalid voteskip limit, please try again using a number to signify the number of mehs.'); + } + else { + basicBot.settings.voteSkipLimit = argument; + API.sendChat('/me Voteskip limit set to ' + basicBot.settings.voteSkipLimit + '.'); + } + } + } + }, + + togglevoteskipCommand: { + command: 'togglevoteskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.voteSkip) { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat('/me [@' + chat.un + '] voteskip disabled.'); + } + else { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat('/me [@' + chat.un + '] voteskip enabled.'); + } + } + } + }, + dclookupCommand: { command: ['dclookup', 'dc'], rank: 'user', @@ -2521,6 +2578,11 @@ else msg += 'OFF'; msg += '. '; + msg += basicBot.chat.voteskip + ': '; + if (Qbot.settings.voteskip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + var launchT = basicBot.room.roomstats.launchTime; var durationOnline = Date.now() - launchT; var since = basicBot.roomUtilities.msToStr(durationOnline); From 420c78cb1bffa569715b76b0d8af06037223912a Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 3 Jan 2015 21:26:53 +0000 Subject: [PATCH 051/281] Voteskip feature commands added to the table. --- commands.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands.md b/commands.md index 33cd22e0..07b14b6b 100644 --- a/commands.md +++ b/commands.md @@ -18,6 +18,7 @@ Manager |!refresh | | refreshes the browser of whoever runs the bot | |!usercmdcd | X | set the cooldown on commands by grey users | |!usercommands | | toggle user commands | +|!voteskip | (X) | when no argument is specified, returns the current voteskip limit, when X is specified, voteskip limit is updated to the new specified limit. | Bouncer+ -------- @@ -69,6 +70,7 @@ Bouncer |!status | | display the bot's status and some settings | |!timeguard | | toggle the timeguard | |!togglemotd | | toggle the motd | +|!togglevoteskip | | toggle the voteskip | |!unban | @user | unban user | |!unmute | | unmute user | |!voteratio | @user | display the vote statistic for a user | From 6305a50a1f61ac84e180be8ed501b3d616264350 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 7 Jan 2015 01:08:16 +0000 Subject: [PATCH 052/281] Added voteskip chat messages. --- lang/en.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index 2f58a918..88fc30ea 100644 --- a/lang/en.json +++ b/lang/en.json @@ -69,6 +69,11 @@ "welcomemsg": "welcome message", "songstats": "song statistics", "etarestriction": "eta restriction", + "voteskip": "voteskip", + "voteskiplimit": "/me [@%%NAME%%] Voteskip limit is currently set to %%LIMIT%% mehs.", + "voteskipexceededlimit": "/me @%%NAME%%, your song has exceeded the voteskip limit (%%LIMIT%% mehs).", + "voteskipinvalidlimit": "/me [@%%NAME%%] Invalid voteskip limit, please try again using a number to signify the number of mehs.", + "voteskipsetlimit": "/me [@%%NAME%%] Voteskip limit set to %%LIMIT%%.", "activeusersintime": "/me [@%%NAME%% There have been %%AMOUNT%% users chatting in the past %%TIME%% minutes.", "maximumafktimeset": "/me [@%%NAME%%] Maximum afk duration set to %%TIME%% minutes.", "afkstatusreset": "/me [@%%NAME%%] Reset the afk status of @%%USERNAME%%.", @@ -133,4 +138,4 @@ "website": "/me Please visit our website: %%LINK%%", "youtube": "/me [%%NAME%%] Subscribe to us on youtube: %%LINK%%", "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." -} \ No newline at end of file +} From 920dacb7cc337f5426f89951ecc31dd2a3883274 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 7 Jan 2015 01:12:58 +0000 Subject: [PATCH 053/281] Voteskip chat messages update Voteskip chat messages now editable via the language json files for easy future translations. --- basicBot.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/basicBot.js b/basicBot.js index 6869332e..60221d2d 100644 --- a/basicBot.js +++ b/basicBot.js @@ -800,7 +800,7 @@ if (basicBot.settings.voteSkip) { if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { - API.sendChat('/me @' + dj.username + ', your song has exceeded the maximum amount of mehs needed to skip.'); + API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); API.moderateForceSkip(); } } @@ -1678,15 +1678,15 @@ if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat('/me Voteskip limit is currently set to a difference of ' + basicBot.settings.voteSkipLimit + ' mehs.'); + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); var argument = msg.substring(cmd.length + 1); if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; if (isNaN(argument)) { - API.sendChat('/me Invalid voteskip limit, please try again using a number to signify the number of mehs.'); + API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); } else { basicBot.settings.voteSkipLimit = argument; - API.sendChat('/me Voteskip limit set to ' + basicBot.settings.voteSkipLimit + '.'); + API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); } } } @@ -1702,11 +1702,11 @@ else { if (basicBot.settings.voteSkip) { basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat('/me [@' + chat.un + '] voteskip disabled.'); + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); } else { basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - API.sendChat('/me [@' + chat.un + '] voteskip enabled.'); + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); } } } From f260c3feff555e3504ab8c3d5b8043fdfa6ac74f Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 7 Jan 2015 01:24:24 +0000 Subject: [PATCH 054/281] Voteskip toggle fixed typo. --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 60221d2d..ec8f543e 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1706,7 +1706,7 @@ } else { basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); } } } From 14e4d71bab9b5ed8f690312ca8995169ef0b07b3 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Wed, 7 Jan 2015 01:37:09 +0000 Subject: [PATCH 055/281] Fixed voteratio chat message typo. --- lang/en.json | 2 +- lang/fr.json | 2 +- lang/pt.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/en.json b/lang/en.json index 88fc30ea..cc6fb46d 100644 --- a/lang/en.json +++ b/lang/en.json @@ -134,7 +134,7 @@ "notmuted": "/me [@%%NAME%%] that user wasn't muted.", "unmuterank": "/me [@%%NAME%%] You can't unmute persons with an equal or higher rank than you.", "commandscd": "/me [@%%NAME%%] The cooldown for commands by users is now set to %%TIME%% seconds.", - "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: ' + %%WOOT%% + ', mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", + "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", "website": "/me Please visit our website: %%LINK%%", "youtube": "/me [%%NAME%%] Subscribe to us on youtube: %%LINK%%", "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." diff --git a/lang/fr.json b/lang/fr.json index 2f8e8575..9bf168f7 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -128,7 +128,7 @@ "notmuted": "/me [@%%NAME%%] cet utilisateur n'a pas été rendu muet.", "unmuterank": "/me [@%%NAME%%] Vous ne pouvez pas rendre la parole à un utilisateur avec un rang égal ou supérieur au votre.", "commandscd": "/me [@%%NAME%%] Le temps d'attente pour les commandes utilisateur ont été ajustées à %%TIME%% secondes.", - "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: ' + %%WOOT%% + ', mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", + "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", "website": "/me Visitez notre site Internet: %%LINK%%", "youtube": "/me [%%NAME%%] Abonnez-vous à notre chaîne Youtube: %%LINK%%", "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." diff --git a/lang/pt.json b/lang/pt.json index 2bbe55ad..f93836b1 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -128,7 +128,7 @@ "notmuted": "/me [@%%NAME%%] Usuário mencionado não foi mutado.", "unmuterank": "/me [@%%NAME%%] Você não pode desmutar usuários do mesmo rank ou superior.", "commandscd": "/me [@%%NAME%%] O tempo de espera de comandos para usuários agora é %%TIME%% segundos.", - "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: ' + %%WOOT%% + ', mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", + "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", "website": "/me Visite nosso site: %%LINK%%", "youtube": "/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." From 63a8aadcc402aeb8ef7b4a01a9a91bcde50306d8 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 11 Jan 2015 15:49:58 +0000 Subject: [PATCH 056/281] !status command fixed. --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index ec8f543e..27d9da9c 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2579,7 +2579,7 @@ msg += '. '; msg += basicBot.chat.voteskip + ': '; - if (Qbot.settings.voteskip) msg += 'ON'; + if (basicBot.settings.voteskip) msg += 'ON'; else msg += 'OFF'; msg += '. '; From ff2f1ce62250e5da28aeccb795fe684d54254769 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 11 Jan 2015 16:09:12 +0000 Subject: [PATCH 057/281] Update commands.md --- commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands.md b/commands.md index 07b14b6b..88fa7bf4 100644 --- a/commands.md +++ b/commands.md @@ -57,7 +57,7 @@ Bouncer |!filter | | toggles the chat filter | |!jointime | @user | shows how long the user has been in the room | |!kick | (X) | kicks user for X minutes, default is 0.25 minutes (15 seconds) | -|!kill | ||shut down the bot | +|!kill | | shut down the bot | |!lockguard | | toggle the lockguard | |!lockskip | (reason) | skip the song and move the dj back up (the position can be set with !lockskippos) | |!lockskippos | X | set the position to which lockskip moves the dj | From 919ae5081aa8c2bb5489ec368a070ee51e59c36e Mon Sep 17 00:00:00 2001 From: RatedRion Date: Wed, 14 Jan 2015 02:40:22 -0500 Subject: [PATCH 058/281] Toggle blacklist with !togglebl. Blacklist is default enabled. --- basicBot.js | 27 ++++++++++++++++++++++++--- commands.md | 1 + lang/en.json | 1 + 3 files changed, 26 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index 27d9da9c..a62256e6 100644 --- a/basicBot.js +++ b/basicBot.js @@ -197,6 +197,7 @@ afkRemoval: true, maximumDc: 60, bouncerPlus: true, + blacklistEnabled: true, lockdownEnabled: false, lockGuard: false, maximumLocktime: 10, @@ -844,9 +845,11 @@ var mid = obj.media.format + ':' + obj.media.cid; for (var bl in basicBot.room.blacklists) { - if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { - API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); - return API.moderateForceSkip(); + if (basicBot.settings.blacklistEnabled) { + if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { + API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); + return API.moderateForceSkip(); + } } } @@ -2666,6 +2669,24 @@ } }, + toggleblCommand: { + command: 'togglebl', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var temp = basicBot.settings.blacklistEnabled; + basicBot.settings.blacklistEnabled = !temp; + if (basicBot.settings.blacklistEnabled) { + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.blacklist})); + } + else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.blacklist})); + } + } + }, + togglemotdCommand: { command: 'togglemotd', rank: 'bouncer', diff --git a/commands.md b/commands.md index 88fa7bf4..52c249be 100644 --- a/commands.md +++ b/commands.md @@ -69,6 +69,7 @@ Bouncer |!skip | | skip the current song | |!status | | display the bot's status and some settings | |!timeguard | | toggle the timeguard | +|!togglebl | | toggle the blacklist | |!togglemotd | | toggle the motd | |!togglevoteskip | | toggle the voteskip | |!unban | @user | unban user | diff --git a/lang/en.json b/lang/en.json index cc6fb46d..e284face 100644 --- a/lang/en.json +++ b/lang/en.json @@ -59,6 +59,7 @@ "afklimit": "AFK limit", "autoskip": "autoskip", "newblacklisted": "/me [@%%NAME%%] This track belongs on the %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blacklist": "blacklist", "cycleguard": "cycleguard", "timeguard": "timeguard", "chatfilter": "chatfilter", From 66fe39f5543794dbbe161d50389c20e7874305fb Mon Sep 17 00:00:00 2001 From: RatedRion Date: Thu, 15 Jan 2015 17:57:40 -0500 Subject: [PATCH 059/281] Check if blacklist is on in !status --- basicBot.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/basicBot.js b/basicBot.js index a62256e6..df2f9c9d 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2560,6 +2560,11 @@ if (basicBot.settings.bouncerPlus) msg += 'ON'; else msg += 'OFF'; msg += '. '; + + msg += basicBot.chat.blacklist + ': '; + if (basicBot.settings.blacklistEnabled) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; msg += basicBot.chat.lockguard + ': '; if (basicBot.settings.lockGuard) msg += 'ON'; From 160a4813f3d03d0609f5903aa7b4d949df9fa2bc Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Mon, 19 Jan 2015 16:32:12 +0000 Subject: [PATCH 060/281] Added !blinfo command. Use !blinfo to get information required to blacklist a song. --- basicBot.js | 20 ++++++++++++++++++++ commands.md | 3 ++- lang/en.json | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index df2f9c9d..90534934 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1503,6 +1503,26 @@ } }, + blinfoCommand: { + command: 'blinfo', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var author = API.getMedia().author; + var title = API.getMedia().title; + var name = chat.un; + var format = API.getMedia().format; + var cid = API.getMedia().cid; + var songid = format + ":" + cid; + + API.sendChat(subChat(basicBot.chat.blinfo, {name: name, author: author, title: title, songid: songid})); + } + } + }, + bouncerPlusCommand: { command: 'bouncer+', rank: 'mod', diff --git a/commands.md b/commands.md index 52c249be..61d7c535 100644 --- a/commands.md +++ b/commands.md @@ -49,7 +49,8 @@ Bouncer |!afkreset | @user | resets the afk time of user | |!afktime | @user | shows how long user has been afk | |!ban | @user | bans user for 1 day | -|!blacklist / !bl | blacklistname | add the song to the specified blacklist +|!blacklist / !bl | blacklistname | add the song to the specified blacklist | +|!blinfo | | get information required to blacklist a song | |!cycleguard | | toggles the cycleguard | |!dclookup / !dc | (@user) | do dclookup for user | |!english | @user | ask user to speak english (asked in the language they set plug to) | diff --git a/lang/en.json b/lang/en.json index e284face..8d18e3d9 100644 --- a/lang/en.json +++ b/lang/en.json @@ -59,6 +59,7 @@ "afklimit": "AFK limit", "autoskip": "autoskip", "newblacklisted": "/me [@%%NAME%%] This track belongs on the %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Blacklist Info - author: %%AUTHOR%%, title: %%TITLE%%, mid: %%SONGID%%", "blacklist": "blacklist", "cycleguard": "cycleguard", "timeguard": "timeguard", From fa66488f656fb7feb3eea9fc99297ec5a45672ca Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Sat, 24 Jan 2015 17:48:14 +0000 Subject: [PATCH 061/281] Error due to recent plug updates. Due to the recent plug updates, the bot encountered some errors. I commented out what was preventing the bot to run (for now) until I have some time on my hands to look into the issue. I apologise for any inconvenience. --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 90534934..81dd8fb6 100644 --- a/basicBot.js +++ b/basicBot.js @@ -120,7 +120,7 @@ API.chatLog(basicBot.chat.datarestored); } } - var json_sett = null; + /*var json_sett = null; var roominfo = document.getElementById("room-info"); info = roominfo.textContent; var ref_bot = "@basicBot="; @@ -139,7 +139,7 @@ } } }); - } + }*/ }; From 62b8287ffa3f9c26779f7047cfb339891b78fa88 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 24 Jan 2015 18:54:32 +0000 Subject: [PATCH 062/281] Gitter and Facebook group Added gitter and facebook group badge. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f198da45..459500b9 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ basicBot A not so basic bot for plug.dj +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/***REMOVED***/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.bnzi.uk/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) + + !!!TO CUSTOMIZE: USE [THIS REPOSITORY](https://github.com/***REMOVED***/basicBot-customization)!!! ============================================================================================== @@ -85,4 +88,4 @@ Disclaimer This bot is developed independently. Changes may be made without notice. There is no guarantee for the perfect functioning. Plug.dj admins have the right to request changes. By using this chatbot you agree to not use it for violating plug.dj's Terms of Service. -You also agree not to alter the bot's code. Any requests for changes can be requested via email, through github or via plug.dj. \ No newline at end of file +You also agree not to alter the bot's code. Any requests for changes can be requested via email, through github or via plug.dj. From 539d1f4396b3d08cb21e9c645abc4cd3d83c34e6 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Thu, 29 Jan 2015 19:24:37 +0000 Subject: [PATCH 063/281] Autowoot Bot will woot all tracks. --- basicBot.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/basicBot.js b/basicBot.js index 81dd8fb6..42fed17c 100644 --- a/basicBot.js +++ b/basicBot.js @@ -815,6 +815,7 @@ } }, eventDjadvance: function (obj) { + $("#woot").click(); var user = basicBot.userUtilities.lookupUser(obj.dj.id) for(var i = 0; i < basicBot.room.users.length; i++){ if(basicBot.room.users[i].id === user.id){ @@ -1205,6 +1206,7 @@ basicBot.status = true; API.sendChat('/cap 1'); API.setVolume(0); + $("#woot").click(); var emojibutton = $(".icon-emoji-on"); if (emojibutton.length > 0) { emojibutton[0].click(); From d1064bceca2a4b6546657b2efaa6f919dbbe9eac Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 31 Jan 2015 18:57:49 +0000 Subject: [PATCH 064/281] New maintainer Contact details of new maintainer added to README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 459500b9..512ea84f 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ A not so basic bot for plug.dj [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/***REMOVED***/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.bnzi.uk/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) +Created by [***REMOVED***](https://github.com/***REMOVED***) but now maintained by [Benzi](https://github.com/Benzi). + +(You can email me via hi@bnzi.uk or send me a message on [Gitter](https://gitter.im/Benzi) if you have any queries about the bot) + !!!TO CUSTOMIZE: USE [THIS REPOSITORY](https://github.com/***REMOVED***/basicBot-customization)!!! ============================================================================================== From 30d8435f5a16e19b4769a77d74426770fb275b16 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Thu, 5 Feb 2015 13:53:26 +0000 Subject: [PATCH 065/281] !autodisable added Toggle autodisable using !autodisable in chat. --- basicBot.js | 21 +++++++++++++++++++++ lang/en.json | 1 + 2 files changed, 22 insertions(+) diff --git a/basicBot.js b/basicBot.js index 42fed17c..1df31fbd 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1408,6 +1408,27 @@ } }, + autodisableCommand: { + command: 'autodisable', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.autodisable) { + basicBot.settings.autodisable = !basicBot.settings.autodisable; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autodisable})); + } + else { + basicBot.settings.autodisable = !basicBot.settings.autodisable; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autodisable})); + } + + } + } + }, + autoskipCommand: { command: 'autoskip', rank: 'mod', diff --git a/lang/en.json b/lang/en.json index 8d18e3d9..4a22040e 100644 --- a/lang/en.json +++ b/lang/en.json @@ -57,6 +57,7 @@ "afkremoval": "AFK removal", "afksremoved": "AFK's removed", "afklimit": "AFK limit", + "autodisable": "autodisable", "autoskip": "autoskip", "newblacklisted": "/me [@%%NAME%%] This track belongs on the %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", "blinfo": "[@%%NAME%%] Blacklist Info - author: %%AUTHOR%%, title: %%TITLE%%, mid: %%SONGID%%", From c9c9225512028201c8fa49a9ec4032f059c70f53 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Thu, 5 Feb 2015 13:59:46 +0000 Subject: [PATCH 066/281] Command list updated !autodisable added --- commands.md | 1 + 1 file changed, 1 insertion(+) diff --git a/commands.md b/commands.md index 61d7c535..da71cb8d 100644 --- a/commands.md +++ b/commands.md @@ -48,6 +48,7 @@ Bouncer |!active | (X) | shows how many users chatted in the past X minutes. If no X specified, 60 is set as default | |!afkreset | @user | resets the afk time of user | |!afktime | @user | shows how long user has been afk | +|!autodisable | | toggle the autodisable | |!ban | @user | bans user for 1 day | |!blacklist / !bl | blacklistname | add the song to the specified blacklist | |!blinfo | | get information required to blacklist a song | From e6d2b4ce6c53d56bef2d22415997036d4809845a Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Sun, 8 Feb 2015 22:12:42 +0000 Subject: [PATCH 067/281] basicBot creator IDs added. basicBot creator IDs added for manual moderation if necessary. --- basicBot.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/basicBot.js b/basicBot.js index 1df31fbd..a959a029 100644 --- a/basicBot.js +++ b/basicBot.js @@ -174,11 +174,12 @@ return m; }; - var botCreator = "Matthew aka. ***REMOVED***"; - var botCreatorIDs = []; + var botCreator = "Matthew (***REMOVED***)"; + var botMaintainer = "Benzi (Quoona)" + var botCreatorIDs = ["3851534", "3934992"]; var basicBot = { - version: "2.1.4", + version: "2.2.1", status: false, name: "basicBot", loggedInID: null, @@ -396,7 +397,9 @@ var u; if (typeof obj === "object") u = obj; else u = API.getUser(obj); - if (botCreatorIDs.indexOf(u.id) > -1) return 10; + for (var i = 0; i < botCreatorIDs.length; i++) { + if (botCreatorIDs[i].indexOf(u.id) > -1) return 10; + } if (u.gRole < 2) return u.role; else { switch (u.gRole) { @@ -2576,7 +2579,7 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - API.sendChat('/me This bot was made by ' + botCreator + '.'); + API.sendChat('/me This bot was created by ' + botCreator + ', but is now maintained by ' + botMaintainer + "."); } } }, From eb28be19496690314674008195c06085294c0c34 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Mon, 9 Feb 2015 19:50:49 +0000 Subject: [PATCH 068/281] New settings added. Avatars capped, Volume and Emojis can b toggled/edited. --- basicBot.js | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/basicBot.js b/basicBot.js index a959a029..c305b930 100644 --- a/basicBot.js +++ b/basicBot.js @@ -176,7 +176,7 @@ var botCreator = "Matthew (***REMOVED***)"; var botMaintainer = "Benzi (Quoona)" - var botCreatorIDs = ["3851534", "3934992"]; + var botCreatorIDs = ["3851534", "3934992", "4105209"]; var basicBot = { version: "2.2.1", @@ -194,6 +194,9 @@ botName: "basicBot", language: "english", chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", + startupCap: 1, // 1-200 + startupVolume: 0, // 0-100 + startupEmoji: false, // true or false maximumAfk: 120, afkRemoval: true, maximumDc: 60, @@ -1207,13 +1210,25 @@ }, 60 * 60 * 1000); basicBot.loggedInID = API.getUser().id; basicBot.status = true; - API.sendChat('/cap 1'); - API.setVolume(0); + API.sendChat('/cap ' + basicBot.settings.startupCap); + API.setVolume(basicBot.settings.startupVolume); $("#woot").click(); - var emojibutton = $(".icon-emoji-on"); - if (emojibutton.length > 0) { - emojibutton[0].click(); + if (basicBot.settings.startupEmoji) { + var emojibuttonoff = $(".icon-emoji-off"); + if (emojibuttonoff.length > 0) { + emojibuttonoff[0].click(); + } + API.chatLog(':smile: Emojis enabled.'); + } + else { + var emojibuttonon = $(".icon-emoji-on"); + if (emojibuttonon.length > 0) { + emojibuttonon[0].click(); + } + API.chatLog('Emojis disabled.'); } + API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); + API.chatLog('Volume set to ' + basicBot.settings.startupVolume); loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); }, commands: { From 43033603145055c541355cb006de6daad3f7d171 Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 10 Feb 2015 08:42:46 +0000 Subject: [PATCH 069/281] Removed !deletechat Removed due to bugs. --- basicBot.js | 4 ++-- commands.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index c305b930..d21155ce 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1800,7 +1800,7 @@ } }, - deletechatCommand: { + /*deletechatCommand: { command: 'deletechat', rank: 'mod', type: 'startsWith', @@ -1824,7 +1824,7 @@ API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); } } - }, + },*/ emojiCommand: { command: 'emoji', diff --git a/commands.md b/commands.md index da71cb8d..7395be83 100644 --- a/commands.md +++ b/commands.md @@ -29,7 +29,7 @@ Bouncer+ |!afkremoval | | toggles the afk check | |!autoskip | | skips songs automatically when they're done (use when the circles-bug happens) | |!bouncer+ | | disable bouncer+ | -|!deletechat | @user | delete all the chats by a certain user | +|!deletechat | @user | delete all the chats by a certain user ***Currently removed due to bug (awaiting fix)*** | |!lock | | lock the waitlist | |!lockdown | | lock down the room: only staff can chat | |!maxlength | X | specify the maximum length a song can be when timeguard is enabled | From 8340bd742b1fc63b7539e581523cdcd4c647569d Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 18 Feb 2015 00:56:31 +0000 Subject: [PATCH 070/281] Follow the project on Twitter Added Twitter information to README --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 512ea84f..c487d31c 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,14 @@ basicBot A not so basic bot for plug.dj -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/***REMOVED***/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.bnzi.uk/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/***REMOVED***/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.bnzi.uk/97dW.svg)](https://facebook.com/groups/basicBot) [![twitter](http://i.bnzi.uk/4KEn.svg)](https://twitter.com/bscBt) + +Stay updated on **basicBot**'s development by following the project on Twitter [@bscBt](http://twitter.com/bscBt) Created by [***REMOVED***](https://github.com/***REMOVED***) but now maintained by [Benzi](https://github.com/Benzi). (You can email me via hi@bnzi.uk or send me a message on [Gitter](https://gitter.im/Benzi) if you have any queries about the bot) - !!!TO CUSTOMIZE: USE [THIS REPOSITORY](https://github.com/***REMOVED***/basicBot-customization)!!! ============================================================================================== From 16713703fc4183845ed16fa89cad2f04401fe189 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 19 Feb 2015 14:32:35 +0000 Subject: [PATCH 071/281] Updated BA link --- lang/en.json | 2 +- lang/fr.json | 2 +- lang/pt.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/en.json b/lang/en.json index 4a22040e..eaf17396 100644 --- a/lang/en.json +++ b/lang/en.json @@ -82,7 +82,7 @@ "afkstatusreset": "/me [@%%NAME%%] Reset the afk status of @%%USERNAME%%.", "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% has been inactive for %%TIME%%.", "autowoot": "/me We recommend PlugCubed for autowooting: http://plugcubed.net/", - "brandambassador": "/me A Brand Ambassador is the voice of the plug.dj users. They promote events, engage the community and share the plug.dj message around the world. For more info: http://blog.plug.dj/brand-ambassadors/", + "brandambassador": "/me A Brand Ambassador is the voice of the plug.dj users. They promote events, engage the community and share the plug.dj message around the world. For more info: https://plug.dj/ba", "bouncerplusrank": "/me [@%%NAME%%] You have to be manager or up to enable Bouncer+.", "chatcleared": "/me [@%%NAME%%] Cleared the chat.", "deletechat": "/me [@%%NAME%%] Cleared the chat of %%USERNAME%%.", diff --git a/lang/fr.json b/lang/fr.json index 9bf168f7..97c1ae6e 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -73,7 +73,7 @@ "afkstatusreset": "/me [@%%NAME%%] Réinitialisation du statut AFK de @%%USERNAME%%.", "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% a été inactif pour %%TIME%%.", "autowoot": "/me Nous recommandons PlugCubes pour l'autowooting: http://plugcubed.net/", - "brandambassador": "/me Un Brand Ambassador est la voix des utilisateurs de plug.dj. Il promouvoient les évènements, font participer la communauté et partagent le message de plug.dj autour du monde. Pour plus d'info: http://blog.plug.dj/brand-ambassadors/", + "brandambassador": "/me Un Brand Ambassador est la voix des utilisateurs de plug.dj. Il promouvoient les évènements, font participer la communauté et partagent le message de plug.dj autour du monde. Pour plus d'info: https://plug.dj/ba", "bouncerplusrank": "/me [@%%NAME%%] Vous devez être Manager pour pouvoir activer Bouncer+.", "chatcleared": "/me [@%%NAME%%] A nettoyé le chat.", "deletechat": "/me [@%%NAME%%] A nettoyé le chat de %%USERNAME%%.", diff --git a/lang/pt.json b/lang/pt.json index f93836b1..6f1fc5e4 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -73,7 +73,7 @@ "afkstatusreset": "/me [@%%NAME%%] Status AFK resetado: @%%USERNAME%%.", "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% esteve inativo por %%TIME%%.", "autowoot": "/me Nós recomendamos plugCubed para autowoot: http://plugcubed.net/", - "brandambassador": "/me Um Embaixador de Marca é a voz dos usuários da plug.dj. Eles promovem eventos, ajudam as comunidades e divulgam a plug.dj para todo o mundod. Mais info: http://blog.plug.dj/brand-ambassadors/", + "brandambassador": "/me Um Embaixador de Marca é a voz dos usuários da plug.dj. Eles promovem eventos, ajudam as comunidades e divulgam a plug.dj para todo o mundod. Mais info: https://plug.dj/ba", "bouncerplusrank": "/me [@%%NAME%%] Você precisa ser Coordenador ou superior para ativar o Bouncer+.", "chatcleared": "/me [@%%NAME%%] O chat foi limpo.", "deletechat": "/me [@%%NAME%%] O chat de %%USERNAME%% foi limpo.", From 0c6e5eaca990bd433dd57b0a328fa664f37c91ee Mon Sep 17 00:00:00 2001 From: "Sam Mills (Henchman)" Date: Wed, 4 Mar 2015 16:17:43 +0000 Subject: [PATCH 072/281] Update README.md Clarified the disclaimer and removed offending term --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c487d31c..86417b67 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,9 @@ This software is not for profit, any extension, or unauthorised person providing Disclaimer ---------- -This bot is developed independently. Changes may be made without notice. There is no guarantee for the perfect functioning. +This bot is developed independently. Changes may be made without notice. There is no guarantee for the bot to be functioning perfectly. Plug.dj admins have the right to request changes. By using this chatbot you agree to not use it for violating plug.dj's Terms of Service. -You also agree not to alter the bot's code. Any requests for changes can be requested via email, through github or via plug.dj. +You also agree not to alter the bot's code, unless in the cases explicitly stated above, for personal use, or for the sole purpose of submitting a pull request with a bug fix or a feature update, at which point it will be looked at and decided by the authors of the project. +Please refer to the original author/repository at all times, even on personal forks that are not private. +Any requests for changes can be requested via email, through github or via plug.dj. From b31283c74b09341b357b07d6a7ffea3367797ec6 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 9 Mar 2015 17:59:40 +0000 Subject: [PATCH 073/281] Added a !historyskip command The bot will now automatically skip songs that is in the DJ history (past 50 plays) if !historyskip is enabled. --- basicBot.js | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- lang/en.json | 3 ++- 2 files changed, 49 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index d21155ce..09d30924 100644 --- a/basicBot.js +++ b/basicBot.js @@ -209,6 +209,7 @@ maximumCycletime: 10, voteSkip: false, voteSkipLimit: 10, + historySkip: true, timeGuard: true, maximumSongLength: 10, autodisable: true, @@ -860,7 +861,7 @@ } } - var alreadyPlayed = false; + /*var alreadyPlayed = false; for (var i = 0; i < basicBot.room.historyList.length; i++) { if (basicBot.room.historyList[i][0] === obj.media.cid) { var firstPlayed = basicBot.room.historyList[i][1]; @@ -873,6 +874,25 @@ } if (!alreadyPlayed) { basicBot.room.historyList.push([obj.media.cid, +new Date()]); + }*/ + + if (basicBot.settings.historySkip) { + var alreadyPlayed = false; + var apihistory = API.getHistory(); + for (var i = 0; i < apihistory.length; i++) { + if (apihistory[i].media.cid === obj.media.cid) { + var firstPlayed = basicBot.room.historyList[i][1]; + var plays = basicBot.room.historyList[i].length - 1; + var lastPlayed = basicBot.room.historyList[i][plays]; + API.sendChat(subChat(basicBot.chat.songknown, {name: chat.un, plays: plays, timetotal: basicBot.roomUtilities.msToStr(Date.now() - basicBot.room.roomstats.launchTime), lasttime: basicBot.roomUtilities.msToStr(Date.now() - lastPlayed)})); + API.moderateForceSkip(); + basicBot.room.historyList[i].push(+new Date()); + alreadyPlayed = true; + } + } + if (!alreadyPlayed) { + basicBot.room.historyList.push([obj.media.cid, +new Date()]); + } } var newMedia = obj.media; if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { @@ -1769,7 +1789,7 @@ API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); } else { - basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + basicBot.settings.voteskip = !basicBot.settings.voteskip; API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); } } @@ -1915,6 +1935,26 @@ } }, + historyskipCommand: { + command: 'historyskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.historySkip) { + basicBot.settings.historySkip = !basicBot.settings.historySkip; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.historyskip})); + } + else { + basicBot.settings.historySkip = !basicBot.settings.historySkip; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.historyskip})); + } + } + } + }, + joinCommand: { command: 'join', rank: 'user', @@ -2647,6 +2687,11 @@ else msg += 'OFF'; msg += '. '; + msg += basicBot.chat.historyskip + ': '; + if (basicBot.settings.historySkip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + msg += basicBot.chat.voteskip + ': '; if (basicBot.settings.voteskip) msg += 'ON'; else msg += 'OFF'; diff --git a/lang/en.json b/lang/en.json index eaf17396..a0b27809 100644 --- a/lang/en.json +++ b/lang/en.json @@ -10,7 +10,7 @@ "welcome": "/me Welcome %%NAME%%", "welcomeback": "/me Welcome back, %%NAME%%", - "songknown": "/me :repeat: This song has been played %%PLAYS%% time(s) in the last %%TIMETOTAL%%, last play was %%LASTTIME%% ago. :repeat:", + "songknown": "/me @%%NAME%%, this song is in the DJ history. It has been played %%PLAYS%% time(s) in the last %%TIMETOTAL%%, last play was %%LASTTIME%% ago.", "timelimit": "/me @%%NAME%%, your song is longer than %%MAXLENGTH%% minutes, you need permission to play longer songs.", "permissionownsong": "/me :up: @%%NAME%% has permission to play their own production!", "isblacklisted": "/me This track is on the %%BLACKLIST%% blacklist! Skipping...", @@ -65,6 +65,7 @@ "cycleguard": "cycleguard", "timeguard": "timeguard", "chatfilter": "chatfilter", + "historyskip": "historyskip", "lockdown": "lockdown", "lockguard": "lockguard", "usercommands": "usercommands", From 55ca2cbb9f9e27c8d480aa6afb2492fae6f26036 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 9 Mar 2015 18:01:23 +0000 Subject: [PATCH 074/281] Removed Quoona's ID --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 09d30924..12c6b2b4 100644 --- a/basicBot.js +++ b/basicBot.js @@ -176,7 +176,7 @@ var botCreator = "Matthew (***REMOVED***)"; var botMaintainer = "Benzi (Quoona)" - var botCreatorIDs = ["3851534", "3934992", "4105209"]; + var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { version: "2.2.1", From 286ad8ed4d8bc50e8335b734dac85db79c9be45c Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 9 Mar 2015 18:19:22 +0000 Subject: [PATCH 075/281] historySkip bug fix --- basicBot.js | 5 +---- lang/en.json | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/basicBot.js b/basicBot.js index 12c6b2b4..ffe8f649 100644 --- a/basicBot.js +++ b/basicBot.js @@ -881,10 +881,7 @@ var apihistory = API.getHistory(); for (var i = 0; i < apihistory.length; i++) { if (apihistory[i].media.cid === obj.media.cid) { - var firstPlayed = basicBot.room.historyList[i][1]; - var plays = basicBot.room.historyList[i].length - 1; - var lastPlayed = basicBot.room.historyList[i][plays]; - API.sendChat(subChat(basicBot.chat.songknown, {name: chat.un, plays: plays, timetotal: basicBot.roomUtilities.msToStr(Date.now() - basicBot.room.roomstats.launchTime), lasttime: basicBot.roomUtilities.msToStr(Date.now() - lastPlayed)})); + API.sendChat(subChat(basicBot.chat.songknown, {name: chat.un})); API.moderateForceSkip(); basicBot.room.historyList[i].push(+new Date()); alreadyPlayed = true; diff --git a/lang/en.json b/lang/en.json index a0b27809..1c5ede60 100644 --- a/lang/en.json +++ b/lang/en.json @@ -10,7 +10,7 @@ "welcome": "/me Welcome %%NAME%%", "welcomeback": "/me Welcome back, %%NAME%%", - "songknown": "/me @%%NAME%%, this song is in the DJ history. It has been played %%PLAYS%% time(s) in the last %%TIMETOTAL%%, last play was %%LASTTIME%% ago.", + "songknown": "/me @%%NAME%%, this song is in the DJ history.", "timelimit": "/me @%%NAME%%, your song is longer than %%MAXLENGTH%% minutes, you need permission to play longer songs.", "permissionownsong": "/me :up: @%%NAME%% has permission to play their own production!", "isblacklisted": "/me This track is on the %%BLACKLIST%% blacklist! Skipping...", From 2c043f886f813ef268dcd6d17bd078227d1133a8 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 9 Mar 2015 18:23:39 +0000 Subject: [PATCH 076/281] More bugs. --- basicBot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index ffe8f649..09301543 100644 --- a/basicBot.js +++ b/basicBot.js @@ -879,9 +879,10 @@ if (basicBot.settings.historySkip) { var alreadyPlayed = false; var apihistory = API.getHistory(); + var name = obj.dj.username; for (var i = 0; i < apihistory.length; i++) { if (apihistory[i].media.cid === obj.media.cid) { - API.sendChat(subChat(basicBot.chat.songknown, {name: chat.un})); + API.sendChat(subChat(basicBot.chat.songknown, {name: name})); API.moderateForceSkip(); basicBot.room.historyList[i].push(+new Date()); alreadyPlayed = true; From 8e7fe822321f3ff677ee7d39f93ede4ac54b7d9d Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 9 Mar 2015 18:30:58 +0000 Subject: [PATCH 077/281] Version update. --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 09301543..d2af5cb6 100644 --- a/basicBot.js +++ b/basicBot.js @@ -179,7 +179,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.2.1", + version: "2.2.2", status: false, name: "basicBot", loggedInID: null, From 83bc051ab6ef1dde26f60a43b87e09dd56b4e8dd Mon Sep 17 00:00:00 2001 From: Trevor Date: Tue, 10 Mar 2015 14:05:37 -0400 Subject: [PATCH 078/281] Fix commands.md spacing --- commands.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands.md b/commands.md index 7395be83..02f57c93 100644 --- a/commands.md +++ b/commands.md @@ -1,8 +1,8 @@ Commands: ========= -X specifies a number -arguments between ( ) are optional +X specifies a number +Arguments between ( ) are optional Manager From 169298776eb0f30bfac8afa236241602bc1eae3e Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 11 Mar 2015 17:39:56 +0000 Subject: [PATCH 079/281] Fixed typo. Fixed voteskip related typo. --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index d2af5cb6..58465895 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1787,7 +1787,7 @@ API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); } else { - basicBot.settings.voteskip = !basicBot.settings.voteskip; + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); } } @@ -2691,7 +2691,7 @@ msg += '. '; msg += basicBot.chat.voteskip + ': '; - if (basicBot.settings.voteskip) msg += 'ON'; + if (basicBot.settings.voteSkip) msg += 'ON'; else msg += 'OFF'; msg += '. '; From 4af994d956e43f039c332ea0bd0c19b5b03c4c9f Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 13 Mar 2015 19:34:18 +0000 Subject: [PATCH 080/281] Added !english command + bug fix The !english command is back. You can use it if you are a a bouncer or above in a community to let specific users know to chat in english. You can use it by typing !english @user in chat. --- basicBot.js | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 58465895..f5b2a382 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1858,6 +1858,39 @@ } }, + englishCommand: { + command: 'english', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if(chat.message.length === cmd.length) return API.sendChat('/me No user specified.'); + var name = chat.message.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if(typeof user === 'boolean') return API.sendChat('/me Invalid user specified.'); + var lang = basicBot.userUtilities.getUser(user).language; + var ch = '/me @' + name + ' '; + switch(lang){ + case 'en': break; + case 'da': ch += 'Vær venlig at tale engelsk.'; break; + case 'de': ch += 'Bitte sprechen Sie Englisch.'; break; + case 'es': ch += 'Por favor, hable Inglés.'; break; + case 'fr': ch += 'Parlez anglais, s\'il vous plaît.'; break; + case 'nl': ch += 'Spreek Engels, alstublieft.'; break; + case 'pl': ch += 'Proszę mówić po angielsku.'; break; + case 'pt': ch += 'Por favor, fale Inglês.'; break; + case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; + case 'cs': ch += 'Mluvte prosím anglicky.'; break; + case 'sr': ch += 'Молим Вас, говорите енглески.'; break; + } + ch += ' English please.'; + API.sendChat(ch); + } + } + }, + etaCommand: { command: 'eta', rank: 'user', @@ -2141,7 +2174,7 @@ else { if (basicBot.settings.lockGuard) { basicBot.settings.lockGuard = !basicBot.settings.lockGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockguard})); } else { basicBot.settings.lockGuard = !basicBot.settings.lockGuard; From d28fb7296ef680a74c25568877b547c09532336c Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 13 Mar 2015 22:04:34 +0000 Subject: [PATCH 081/281] basicBot Chrome Extension added. Get the chrome extension for basicBot http://s.bnzi.uk/bscbtxtnsn --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 86417b67..fed09016 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ basicBot A not so basic bot for plug.dj +[GET THE GOOGLE CHROME EXTENSION HERE!!!](http://s.bnzi.uk/bscbtxtnsn) +--------------------------------------------------------------------- + [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/***REMOVED***/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.bnzi.uk/97dW.svg)](https://facebook.com/groups/basicBot) [![twitter](http://i.bnzi.uk/4KEn.svg)](https://twitter.com/bscBt) Stay updated on **basicBot**'s development by following the project on Twitter [@bscBt](http://twitter.com/bscBt) From 7fc37722f8c028cb54793b4371bd41c7f7f0f805 Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 24 Mar 2015 19:11:59 +0000 Subject: [PATCH 082/281] Changed historySkip to false. Set historyskip to false as default. --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index f5b2a382..6a3384a2 100644 --- a/basicBot.js +++ b/basicBot.js @@ -209,7 +209,7 @@ maximumCycletime: 10, voteSkip: false, voteSkipLimit: 10, - historySkip: true, + historySkip: false, timeGuard: true, maximumSongLength: 10, autodisable: true, From 915a60956686d881ac1e1fd423e03c5610a38df2 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Wed, 25 Mar 2015 23:37:59 +0000 Subject: [PATCH 083/281] Removed old help link --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 6a3384a2..9d0a187e 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1960,7 +1960,7 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - var link = "http://i.imgur.com/SBAso1N.jpg"; + var link = "(Updated link coming soon)"; API.sendChat(subChat(basicBot.chat.starterhelp, {link: link})); } } From 74a356003b8be6cbdaaa86432eeaee630545d57d Mon Sep 17 00:00:00 2001 From: MB Date: Sun, 29 Mar 2015 10:49:28 -0300 Subject: [PATCH 084/281] Update pt.json --- lang/pt.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lang/pt.json b/lang/pt.json index 6f1fc5e4..a87be8ce 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -9,7 +9,7 @@ "welcome": "Bem vindo(a), %%NAME%%", "welcomeback": "Bem vindo(a) de volta, %%NAME%%", - "songknown": "/me :repeat: Essa música foi tocada %%PLAYS%% vez(es) nos últimos %%TIMETOTAL%%. Última vez: %%LASTTIME%% atrás. :repeat:", + "songknown": "@%%NAME%%, essa música está no histórico.", "timelimit": "@%%NAME%%, sua música tem duração maior que %%MAXLENGTH%% minutos. Você precisa de permissão para tocar músicas longas.", "permissionownsong": "/me :up: @%%NAME%% tem permissão para tocar música de própria autoria!", "isblacklisted": "/me Essa música está na lista negra %%BLACKLIST%%! Pulando música...", @@ -56,18 +56,27 @@ "afkremoval": "Remoção de AFK", "afksremoved": "AFKs removidos", "afklimit": "Limite AFK", + "autodisable": "autodisable", "autoskip": "autoskip", "newblacklisted": "/me [@%%NAME%%] Essa música está na lista negra %%BLACKLIST%%! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Info da Blacklist - autor: %%AUTHOR%%, título: %%TITLE%%, ID: %%SONGID%%", + "blacklist": "blacklist", "cycleguard": "cycleguard", "timeguard": "timeguard", "chatfilter": "chatfilter", + "historyskip": "historyskip", "lockdown": "lockdown", "lockguard": "lockguard", "usercommands": "comandos de usuário", "motd": "MotD", "welcomemsg": "mensagem de boas vindas", "songstats": "estatísticas de música", - "etarestriction": "restrição de eta", + "etarestriction": "restrição de ETA", + "voteskip": "voteskip", + "voteskiplimit": "/me [@%%NAME%%] Limite de voteskip é, no momento, %%LIMIT%% mehs.", + "voteskipexceededlimit": "/me @%%NAME%%, sua música excedeu o limite de (%%LIMIT%% mehs).", + "voteskipinvalidlimit": "/me [@%%NAME%%] Limite de voteskip inválido, por favor, tente novamente usando um número válido para indicar o número de mehs.", + "voteskipsetlimit": "/me [@%%NAME%%] Limite de voteskip definido para %%LIMIT%%.", "activeusersintime": "/me [@%%NAME%%] %%AMOUNT%% usuários estiveram ativos nos últimos %%TIME%% minutos.", "maximumafktimeset": "/me [@%%NAME%%] Duração máxima de AFK agora é: %%TIME%% minutos.", "afkstatusreset": "/me [@%%NAME%%] Status AFK resetado: @%%USERNAME%%.", @@ -133,4 +142,4 @@ "youtube": "/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." -} \ No newline at end of file +} From 307f9c5e27493bc2cb35f5708fd08b9fcd0794bb Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 29 Mar 2015 17:40:46 +0100 Subject: [PATCH 085/281] Updated email address. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fed09016..981ab6e5 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Stay updated on **basicBot**'s development by following the project on Twitter [ Created by [***REMOVED***](https://github.com/***REMOVED***) but now maintained by [Benzi](https://github.com/Benzi). -(You can email me via hi@bnzi.uk or send me a message on [Gitter](https://gitter.im/Benzi) if you have any queries about the bot) +(You can email me via hi@benzi.io or send me a message on [Gitter](https://gitter.im/Benzi) if you have any queries about the bot) !!!TO CUSTOMIZE: USE [THIS REPOSITORY](https://github.com/***REMOVED***/basicBot-customization)!!! ============================================================================================== From 03a2ec246a6c48987ea0e4ee586d75e4991cf3ea Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 31 Mar 2015 04:38:02 +0100 Subject: [PATCH 086/281] Bot will disconnect on room change. The bot will now disconnect when changing to another room using plug's UI, also cleaned things up. --- basicBot.js | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/basicBot.js b/basicBot.js index 9d0a187e..e0f09227 100644 --- a/basicBot.js +++ b/basicBot.js @@ -120,8 +120,8 @@ API.chatLog(basicBot.chat.datarestored); } } - /*var json_sett = null; - var roominfo = document.getElementById("room-info"); + var json_sett = null; + var roominfo = document.getElementById("room-settings"); info = roominfo.textContent; var ref_bot = "@basicBot="; var ind_ref = info.indexOf(ref_bot); @@ -139,7 +139,7 @@ } } }); - }*/ + } }; @@ -179,7 +179,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.2.2", + version: "2.2.3", status: false, name: "basicBot", loggedInID: null, @@ -822,7 +822,8 @@ } }, eventDjadvance: function (obj) { - $("#woot").click(); + $("#woot").click(); // autowoot + var user = basicBot.userUtilities.lookupUser(obj.dj.id) for(var i = 0; i < basicBot.room.users.length; i++){ if(basicBot.room.users[i].id === user.id){ @@ -1128,26 +1129,26 @@ eventUserskip: $.proxy(this.eventUserskip, this), eventUserjoin: $.proxy(this.eventUserjoin, this), eventUserleave: $.proxy(this.eventUserleave, this), - eventUserfan: $.proxy(this.eventUserfan, this), - eventFriendjoin: $.proxy(this.eventFriendjoin, this), - eventFanjoin: $.proxy(this.eventFanjoin, this), + //eventUserfan: $.proxy(this.eventUserfan, this), + //eventFriendjoin: $.proxy(this.eventFriendjoin, this), + //eventFanjoin: $.proxy(this.eventFanjoin, this), eventVoteupdate: $.proxy(this.eventVoteupdate, this), eventCurateupdate: $.proxy(this.eventCurateupdate, this), eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), eventDjadvance: $.proxy(this.eventDjadvance, this), - eventDjupdate: $.proxy(this.eventDjupdate, this), + //eventDjupdate: $.proxy(this.eventDjupdate, this), eventWaitlistupdate: $.proxy(this.eventWaitlistupdate, this), eventVoteskip: $.proxy(this.eventVoteskip, this), eventModskip: $.proxy(this.eventModskip, this), eventChatcommand: $.proxy(this.eventChatcommand, this), - eventHistoryupdate: $.proxy(this.eventHistoryupdate, this) + eventHistoryupdate: $.proxy(this.eventHistoryupdate, this), }; API.on(API.CHAT, this.proxy.eventChat); API.on(API.USER_SKIP, this.proxy.eventUserskip); API.on(API.USER_JOIN, this.proxy.eventUserjoin); API.on(API.USER_LEAVE, this.proxy.eventUserleave); - API.on(API.USER_FAN, this.proxy.eventUserfan); + //API.on(API.USER_FAN, this.proxy.eventUserfan); API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); @@ -1162,7 +1163,7 @@ API.off(API.USER_SKIP, this.proxy.eventUserskip); API.off(API.USER_JOIN, this.proxy.eventUserjoin); API.off(API.USER_LEAVE, this.proxy.eventUserleave); - API.off(API.USER_FAN, this.proxy.eventUserfan); + //API.off(API.USER_FAN, this.proxy.eventUserfan); API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); @@ -1186,6 +1187,24 @@ type: "DELETE" }) }; + + var roomURL = window.location.pathname; + var Check; + + var detect = function(){ + if(roomURL != window.location.pathname){ + clearInterval(Check) + storeToStorage(); + API.chatLog("basicBot killed due to room change."); + basicBot.disconnectAPI(); + setTimeout(function () { + kill(); + }, 1000); + } + }; + + Check = setInterval(function(){ detect() }, 100); + retrieveSettings(); retrieveFromStorage(); window.bot = basicBot; From aa8a159ec877ec9c3e0dbba295679a214046d670 Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 31 Mar 2015 04:48:57 +0100 Subject: [PATCH 087/281] Added a console.log for good measure. --- basicBot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index e0f09227..bc8eb8dd 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1193,9 +1193,10 @@ var detect = function(){ if(roomURL != window.location.pathname){ + API.chatLog("basicBot killed due to room change."); + console.log("Killing bot due after room change."); clearInterval(Check) storeToStorage(); - API.chatLog("basicBot killed due to room change."); basicBot.disconnectAPI(); setTimeout(function () { kill(); From af74703093b8141b9b8d2972b71eaae9bd1ce789 Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 31 Mar 2015 04:51:02 +0100 Subject: [PATCH 088/281] Removed chatLog --- basicBot.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index bc8eb8dd..5936ade2 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1193,9 +1193,8 @@ var detect = function(){ if(roomURL != window.location.pathname){ - API.chatLog("basicBot killed due to room change."); - console.log("Killing bot due after room change."); clearInterval(Check) + console.log("Killing bot after room change."); storeToStorage(); basicBot.disconnectAPI(); setTimeout(function () { From 9d5f77cb1c5d28fb8d7dd5c2d6216be041475659 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 3 Apr 2015 23:26:31 +0100 Subject: [PATCH 089/281] 6 new commands !gif, !purchase, !ghostbuster, !whois, !8ball, !logout --- basicBot.js | 317 ++++++++++++++++++++++++++++++++++++++++++++------- lang/en.json | 14 ++- 2 files changed, 287 insertions(+), 44 deletions(-) diff --git a/basicBot.js b/basicBot.js index 5936ade2..a8835486 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1531,6 +1531,25 @@ } }, + ballCommand: { + command: ['8ball', 'ask'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var crowd = API.getUsers(); + var msg = chat.message; + var argument = msg.substring(cmd.length + 1); + var randomUser = Math.floor(Math.random() * crowd.length); + var randomBall = Math.floor(Math.random() * basicBot.settings.ball.length); + var randomSentence = Math.floor(Math.random() * 1); + API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.settings.ball[randomBall]})); + } + } + }, + banCommand: { command: 'ban', rank: 'bouncer', @@ -1770,49 +1789,6 @@ } }, - voteskipCommand: { - command: 'voteskip', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); - var argument = msg.substring(cmd.length + 1); - if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - if (isNaN(argument)) { - API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); - } - else { - basicBot.settings.voteSkipLimit = argument; - API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); - } - } - } - }, - - togglevoteskipCommand: { - command: 'togglevoteskip', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.voteSkip) { - basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); - } - else { - basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); - } - } - } - }, - dclookupCommand: { command: ['dclookup', 'dc'], rank: 'user', @@ -1971,6 +1947,98 @@ } }, + ghostbusterCommand: { + command: 'ghostbuster', + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substr(cmd.length + 2); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false || !user.inRoom) { + return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); + } + else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); + } + } + }, + + gifCommand: { + command: ['gif', 'giphy'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length !== cmd.length) { + function get_id(api_key, fixedtag, func) + { + $.getJSON( + "https://api.giphy.com/v1/gifs/random?", + { + "format": "json", + "api_key": api_key, + "rating": rating, + "tag": fixedtag + }, + function(response) + { + func(response.data.id); + } + ) + } + var api_key = "dc6zaTOxFJmzC"; // public beta key + var rating = "pg-13"; // PG 13 gifs + var tag = msg.substr(cmd.length + 1); + var fixedtag = tag.replace(/ /g,"+"); + var commatag = tag.replace(/ /g,", "); + get_id(api_key, tag, function(id) { + if (typeof id !== 'undefined') { + API.sendChat(subChat(basicBot.chat.validgiftags, {name: chat.un, id: id, tags: commatag})); + } else { + API.sendChat(subChat(basicBot.chat.invalidgiftags, {name: chat.un, tags: commatag})); + } + }); + } + else { + function get_random_id(api_key, func) + { + $.getJSON( + "https://api.giphy.com/v1/gifs/random?", + { + "format": "json", + "api_key": api_key, + "rating": rating + }, + function(response) + { + func(response.data.id); + } + ) + } + var api_key = "dc6zaTOxFJmzC"; // public beta key + var rating = "pg-13"; // PG 13 gifs + get_random_id(api_key, function(id) { + if (typeof id !== 'undefined') { + API.sendChat(subChat(basicBot.chat.validgifrandom, {name: chat.un, id: id})); + } else { + API.sendChat(subChat(basicBot.chat.invalidgifrandom, {name: chat.un})); + } + }); + } + } + } + }, + helpCommand: { command: 'help', rank: 'user', @@ -2310,6 +2378,26 @@ } }, + logoutCommand: { + command: 'logout', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + $(".icon-site-logo").click(); + setTimeout(function (chat) { + API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); + setTimeout(function () { + $(".icon-logout-grey").click(); + }, 1000); + }, 1000, chat); + } + } + }, + + maxlengthCommand: { command: 'maxlength', rank: 'manager', @@ -2503,6 +2591,19 @@ } }, + purchaseCommand: { + command: ['purchase'], + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.purchase, {name: chat.un})); + } + } + }, + refreshCommand: { command: 'refresh', rank: 'manager', @@ -2868,6 +2969,26 @@ } }, + togglevoteskipCommand: { + command: 'togglevoteskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.voteSkip) { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); + } + else { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); + } + } + } + }, + unbanCommand: { command: 'unban', rank: 'bouncer', @@ -3034,6 +3155,29 @@ } }, + voteskipCommand: { + command: 'voteskip', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + if (isNaN(argument)) { + API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); + } + else { + basicBot.settings.voteSkipLimit = argument; + API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); + } + } + } + }, + welcomeCommand: { command: 'welcome', rank: 'mod', @@ -3068,6 +3212,93 @@ } }, + whoisCommand: { + command: 'whois', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substr(cmd.length + 2); + } + users = API.getUsers(); + var len = users.length; + for (var i = 0; i < len; ++i){ + if (users[i].username == name){ + var id = users[i].id; + var avatar = API.getUser(id).avatarID; + var level = API.getUser(id).level; + var rawjoined = API.getUser(id).joined; + var joined = rawjoined.substr(0, 10); + var rawlang = API.getUser(id).language; + if (rawlang == "en"){ + var language = "English"; + } else if (rawlang == "bg"){ + var language = "Bulgarian"; + } else if (rawlang == "cs"){ + var language = "Czech"; + } else if (rawlang == "fi"){ + var language = "Finnish" + } else if (rawlang == "fr"){ + var language = "French" + } else if (rawlang == "pt"){ + var language = "Portuguese" + } else if (rawlang == "zh"){ + var language = "Chinese" + } else if (rawlang == "sk"){ + var language = "Slovak" + } else if (rawlang == "nl"){ + var language = "Dutch" + } else if (rawlang == "ms"){ + var language = "Malay" + } + var rawstatus = API.getUser(id).status; + if (rawstatus == "0"){ + var status = "Available"; + } else if (rawstatus == "1"){ + var status = "Away"; + } else if (rawstatus == "2"){ + var status = "Working"; + } else if (rawstatus == "3"){ + var status = "Gaming" + } + var rawrank = API.getUser(id).role; + if (rawrank == "0"){ + var rank = "User"; + } else if (rawrank == "1"){ + var rank = "Resident DJ"; + } else if (rawrank == "2"){ + var rank = "Bouncer"; + } else if (rawrank == "3"){ + var rank = "Manager" + } else if (rawrank == "4"){ + var rank = "Co-Host" + } else if (rawrank == "5"){ + var rank = "Host" + } else if (rawrank == "7"){ + var rank = "Brand Ambassador" + } else if (rawrank == "10"){ + var rank = "Admin" + } + var slug = API.getUser(id).slug; + if (typeof slug !== 'undefined') { + var profile = ", Profile: http://plug.dj/@/" + slug; + } else { + var profile = ""; + } + + API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, status: status, joined: joined, rank: rank})); + } + } + } + } + }, + youtubeCommand: { command: 'youtube', rank: 'user', diff --git a/lang/en.json b/lang/en.json index 1c5ede60..34a80e70 100644 --- a/lang/en.json +++ b/lang/en.json @@ -19,6 +19,10 @@ "isopen": "/me The roulette is now open! Type !join to participate!", "winnerpicked": "/me A winner has been picked! @%%NAME%% to position %%POSITION%%.", + "ball": "/me %%NAME%%'s question was: \"%%QUESTION%%\" and %%BOTNAME%%'s response is: \"%%RESPONSE%%\"", + + "notghosting": "[%%NAME1%%] %%NAME2%% is not ghosting.", + "ghosting": "[%%NAME1%%] %%NAME2%% is either ghosting or not here.", "alreadyadding": "/me User is already being added! Changed the desired position to %%POSITION%%.", "adding": "/me Added @%%NAME%% to the queue. Current queue: %%POSITION%%.", @@ -42,6 +46,11 @@ "roomadvertising": "/me @%%NAME%%, don't post links to other rooms please.", "adfly": "/me @%%NAME%%, please change your autowoot program. We suggest PlugCubed: http://plugcubed.net/", + "validgiftags": "/me [@%%NAME%%] http://media.giphy.com/media/%%ID%%/giphy.gif [Tags: %%TAGS%%]", + "invalidgiftags": "/me [@%%NAME%%] Invalid tags, try something different. [Tags: %%TAGS%%]", + "validgifrandom": "/me [@%%NAME%%] http://media.giphy.com/media/%%ID%%/giphy.gif [Random GIF]", + "invalidgifrandom": "/me [@%%NAME%%] Invalid request, try again.", + "invalidtime": "/me [@%%NAME%%] Invalid time specified.", "nouserspecified": "/me [@%%NAME%%] No user specified.", @@ -52,6 +61,7 @@ "nolimitspecified": "/me [@%%NAME%%] No limit specified.", "invalidlimitspecified": "/me [@%%NAME%%] Invalid limit.", "invalidpositionspecified": "/me [@%%NAME%%] Invalid position specified.", + "whois": "/me [%%NAME1%%] Username: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Joined: %%JOINED%%, Level: %%LEVEL%%, Language: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", "toggleon": "/me [@%%NAME%%] %%FUNCTION%% enabled.", "toggleoff": "/me [@%%NAME%%] %%FUNCTION%% disabled.", "afkremoval": "AFK removal", @@ -104,6 +114,7 @@ "kickrank": "/me [@%%NAME%%] you can't kick users with an equal or higher rank than you!", "kick": "/me [@%%NAME%%], @%%USERNAME%% you are being kicked from the community for %%TIME%% minutes.", "kill": "/me Shutting down.", + "logout": "/me [@%%NAME%%] Logging out %%BOTNAME%%", "rouletteleave": "/me @%%NAME%% left the roulette!", "songlink": "/me [@%%NAME%%] Link to current song: %%LINK%%", "usedlockskip": "/me [%%NAME%% used lockskip.]", @@ -141,5 +152,6 @@ "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", "website": "/me Please visit our website: %%LINK%%", "youtube": "/me [%%NAME%%] Subscribe to us on youtube: %%LINK%%", - "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." + "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M.", + "purchase": "/me [@%%NAME%%] Stock up on plug notes: https://plug.dj/purchase" } From 61e07e609191fea77fe6703d3b6ee998a5e799ed Mon Sep 17 00:00:00 2001 From: MB Date: Fri, 3 Apr 2015 20:35:42 -0300 Subject: [PATCH 090/281] Update pt.json --- lang/pt.json | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lang/pt.json b/lang/pt.json index a87be8ce..ab45b93d 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -17,7 +17,10 @@ "isopen": "/me A roleta foi iniciada! Use !join para participar!", "winnerpicked": "/me Um vencedor foi escolhido! @%%NAME%% ganhou a posição %%POSITION%%.", - + + "ball": "/me A pergunta de %%NAME%% foi: \"%%QUESTION%%\" e a resposta de %%BOTNAME%% é: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% não virou fantasma.", + "ghosting": "[%%NAME1%%] %%NAME2%% deve ter virado fantasma.", "alreadyadding": "/me Usuário já está sendo adicionado! Posição desejada alterada para %%POSITION%%.", "adding": "/me @%%NAME%% foi adicionado à fila. Posição atual: %%POSITION%%.", @@ -41,6 +44,10 @@ "roomadvertising": "@%%NAME%%, não poste link de outras comunidades, por favor.", "adfly": "@%%NAME%%, por favor mude seu script autowoot. Nós sugerimos plugCubed: http://plugcubed.net/", + "validgiftags": "/me [@%%NAME%%] http://media.giphy.com/media/%%ID%%/giphy.gif [Tags: %%TAGS%%]", + "invalidgiftags": "/me [@%%NAME%%] Tag inválida, tente algo diferente. [Tags: %%TAGS%%]", + "validgifrandom": "/me [@%%NAME%%] http://media.giphy.com/media/%%ID%%/giphy.gif [GIF randômica]", + "invalidgifrandom": "/me [@%%NAME%%] Instância inválida, tente novamente.", "invalidtime": "/me [@%%NAME%%] Tempo inválido.", "nouserspecified": "/me [@%%NAME%%] Usuário não especificado.", @@ -51,6 +58,7 @@ "nolimitspecified": "/me [@%%NAME%%] Limite não especificado.", "invalidlimitspecified": "/me [@%%NAME%%] Limite inválido.", "invalidpositionspecified": "/me [@%%NAME%%] Posição inválida.", + "whois": "/me [%%NAME1%%] Usuário: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Registro: %%JOINED%%, Nível: %%LEVEL%%, Linguagem: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", "toggleon": "/me [@%%NAME%%] %%FUNCTION%% ativado.", "toggleoff": "/me [@%%NAME%%] %%FUNCTION%% desativado.", "afkremoval": "Remoção de AFK", @@ -103,6 +111,7 @@ "kickrank": "/me [@%%NAME%%] Você não pode kickar alguém do mesmo rank ou superior!", "kick": "[@%%NAME%%], @%%USERNAME%% você está sendo kickado da comunidade por %%TIME%% minutos.", "kill": "/me Desligando...", + "logout": "/me [@%%NAME%%] Deslogando %%BOTNAME%%", "rouletteleave": "/me @%%NAME%% deixou a roleta!", "songlink": "/me [@%%NAME%%] Link para a música atual: %%LINK%%", "usedlockskip": "/me [%%NAME%% usou 'lockskip'.]", @@ -141,5 +150,5 @@ "website": "/me Visite nosso site: %%LINK%%", "youtube": "/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." - + "purchase": "/me [@%%NAME%%] Compre mais Plug Notes: https://plug.dj/purchase" } From b953c086a2953930fd9f9616dbb9521ed82cfe88 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 4 Apr 2015 01:24:49 +0100 Subject: [PATCH 091/281] Added 8ball responses and fixed pt.json typo --- basicBot.js | 35 +++++++++++++++++++++++++++++++++++ lang/pt.json | 2 +- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index a8835486..36711ca9 100644 --- a/basicBot.js +++ b/basicBot.js @@ -225,6 +225,41 @@ ["nsfw", "The song you contained was NSFW (image or sound). "], ["unavailable", "The song you played was not available for some users. "] ], + ball: [ + "Signs point to yes.", + "Yes.", + "Reply hazy, try again.", + "Without a doubt.", + "My sources say no.", + "As I see it, yes.", + "You may rely on it.", + "Concentrate and ask again.", + "Outlook not so good.", + "It is decidedly so.", + "Better not tell you now.", + "Very doubtful.", + "Yes - definitely.", + "It is certain.", + "Cannot predict now.", + "Most likely.", + "Ask again later.", + "My reply is no.", + "Outlook good.", + "Don't count on it.", + "Yes, in due time.", + "My sources say no.", + "Definitely not.", + "You will have to wait.", + "I have my doubts.", + "Outlook so so.", + "Looks good to me!", + "Who knows?", + "Looking good!", + "Probably.", + "Are you kidding?", + "Don't bet on it.", + "Forget about it." + ], afkpositionCheck: 15, afkRankCheck: "ambassador", motdEnabled: false, diff --git a/lang/pt.json b/lang/pt.json index ab45b93d..4ba068e2 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -149,6 +149,6 @@ "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", "website": "/me Visite nosso site: %%LINK%%", "youtube": "/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", - "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." + "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M.", "purchase": "/me [@%%NAME%%] Compre mais Plug Notes: https://plug.dj/purchase" } From 80bd2185a8847664d36884e4d351ed9b2e08c2ed Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 4 Apr 2015 01:29:34 +0100 Subject: [PATCH 092/281] Commented out logout command. Awaiting fix. --- basicBot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 36711ca9..d823c962 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2413,7 +2413,7 @@ } }, - logoutCommand: { + /*logoutCommand: { command: 'logout', rank: 'mod', type: 'exact', @@ -2430,7 +2430,9 @@ }, 1000, chat); } } - }, + },*/ + + // TODO: Fix !logout command. maxlengthCommand: { From 3dcfa99e778af5b91e3b515bceb1075b88b7b7dc Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 4 Apr 2015 02:03:55 +0100 Subject: [PATCH 093/281] Fixed !logout command --- basicBot.js | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/basicBot.js b/basicBot.js index d823c962..6960f7f2 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2413,27 +2413,21 @@ } }, - /*logoutCommand: { + logoutCommand: { command: 'logout', - rank: 'mod', + rank: 'manager', type: 'exact', functionality: function (chat, cmd) { if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - $(".icon-site-logo").click(); - setTimeout(function (chat) { - API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); - setTimeout(function () { - $(".icon-logout-grey").click(); - }, 1000); - }, 1000, chat); + API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); + setTimeout(function () { + $(".logout").mousedown() + }, 1000); } } - },*/ - - // TODO: Fix !logout command. - + }, maxlengthCommand: { command: 'maxlength', From 3f58fccc24d7f6bb064edc60a8e27f1ddc4f5022 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 4 Apr 2015 02:10:30 +0100 Subject: [PATCH 094/281] Version update --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 6960f7f2..db984e27 100644 --- a/basicBot.js +++ b/basicBot.js @@ -179,7 +179,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.2.3", + version: "2.3.3", status: false, name: "basicBot", loggedInID: null, From 8458fc3769f1764f87ecaa829464f766b1903a68 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 5 Apr 2015 12:57:27 +0100 Subject: [PATCH 095/281] Added 6 new commands to commands.md !logout, !whois, !8ball, !ghostbuster, !gif, !purchase --- commands.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/commands.md b/commands.md index 02f57c93..faa9d5cb 100644 --- a/commands.md +++ b/commands.md @@ -15,6 +15,7 @@ Manager |!cycle | | toggle DJ cycle | |!cycletimer | X | set the maximum DJ cycle time for when cycleguard is enabled | |!locktimer | X | set the maximum time the waitlist can be locked if lockguard is enabled | +|!logout | | logs out account bot is hosted on | |!refresh | | refreshes the browser of whoever runs the bot | |!usercmdcd | X | set the cooldown on commands by grey users | |!usercommands | | toggle user commands | @@ -77,6 +78,7 @@ Bouncer |!unban | @user | unban user | |!unmute | | unmute user | |!voteratio | @user | display the vote statistic for a user | +|!whois | @user | returns plug related information about user | Resident DJ ----------- @@ -92,6 +94,7 @@ User |Command | Arguments | Description | |:------:|:---------:|:--------------------------------------:| +|!8ball | (message) | ask the bot a question, the bot will return random variations of a yes or no answer. | |!autowoot | | links to PlugCubed, the advised script/plugin to use for autowooting | |!ba | | explains the Brand Ambassador rank | |!commands | | gives a link to the commands | @@ -100,12 +103,15 @@ User |!emoji | | a link to a list with emoji's | |!eta | | shows how long before you reach the booth | |!fb | | links to the room's Facebook page (if set in the settings) | +|!ghostbuster | @user | checks if user is ghosting | +|!gif | (message) | returns gif (from giphy) related to the tag provided. Returns a random gif if no tags are provided. | |!help | | links to an image to help get people started on plug | |!join | | join the roulette if it's up | |!leave | | leave the roulette if you joined | |!link | | when the user is the DJ, give a link to the current song | |!op | | links to the OverPlayed list (if set in the settings) | |!ping | | pong! | +|!purchase | | returns link to purchase more plug notes | |!rules | | links to the rules (if set in the settings) | |!theme | | links to the room's theme (if set in the settings) | |!website | | links to the room's website (if set in the settings) | From 78d88ba0d6f8107bf95b4ed2f532a41f0bc10aac Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 6 Apr 2015 19:41:40 +0100 Subject: [PATCH 096/281] Added !cmddel (or !cmddeletion, !commanddeletion) You can toggle command deletion using this command. You can also toggle it manually in the bot settings if you are using a custom bot. --- basicBot.js | 30 +++++++++++++++++++++++++++++- lang/en.json | 1 + 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index db984e27..31cd373d 100644 --- a/basicBot.js +++ b/basicBot.js @@ -197,6 +197,7 @@ startupCap: 1, // 1-200 startupVolume: 0, // 0-100 startupEmoji: false, // true or false + cmdDeletion: true, maximumAfk: 120, afkRemoval: true, maximumDc: 60, @@ -1128,7 +1129,9 @@ }, basicBot.settings.commandCooldown * 1000); } if (executed) { - API.moderateDeleteChat(chat.cid); + if (basicBot.settings.cmdDeletion) { + API.moderateDeleteChat(chat.cid); + } basicBot.room.allcommand = false; setTimeout(function () { basicBot.room.allcommand = true; @@ -1713,6 +1716,26 @@ } }, + cmddeletionCommand: { + command: ['commanddeletion', 'cmddeletion', 'cmddel'], + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.cmdDeletion) { + basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + } + else { + basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + } + } + } + }, + cookieCommand: { command: 'cookie', rank: 'user', @@ -2879,6 +2902,11 @@ else msg += 'OFF'; msg += '. '; + msg += basicBot.chat.cmddeletion + ': '; + if (basicBot.settings.cmdDeletion) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + var launchT = basicBot.room.roomstats.launchTime; var durationOnline = Date.now() - launchT; var since = basicBot.roomUtilities.msToStr(durationOnline); diff --git a/lang/en.json b/lang/en.json index 34a80e70..4a008d92 100644 --- a/lang/en.json +++ b/lang/en.json @@ -64,6 +64,7 @@ "whois": "/me [%%NAME1%%] Username: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Joined: %%JOINED%%, Level: %%LEVEL%%, Language: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", "toggleon": "/me [@%%NAME%%] %%FUNCTION%% enabled.", "toggleoff": "/me [@%%NAME%%] %%FUNCTION%% disabled.", + "cmddeletion": "command deletion", "afkremoval": "AFK removal", "afksremoved": "AFK's removed", "afklimit": "AFK limit", From d10502d3b89e00fb3c8a0894e509f120dd2f5785 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 6 Apr 2015 23:10:33 +0100 Subject: [PATCH 097/281] version update Updated to v2.3.4 & changed cmdDeletion rank permission to Bouncer+ --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 31cd373d..824f61eb 100644 --- a/basicBot.js +++ b/basicBot.js @@ -179,7 +179,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.3.3", + version: "2.3.4", status: false, name: "basicBot", loggedInID: null, @@ -1718,7 +1718,7 @@ cmddeletionCommand: { command: ['commanddeletion', 'cmddeletion', 'cmddel'], - rank: 'bouncer', + rank: 'mod', type: 'exact', functionality: function (chat, cmd) { if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); From 60d03bf0feb9dd55ba2941e95a7e13c129c72725 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 16 Apr 2015 11:55:43 +0100 Subject: [PATCH 098/281] Removed !deletechat command Awaiting fix --- commands.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands.md b/commands.md index faa9d5cb..40bde83f 100644 --- a/commands.md +++ b/commands.md @@ -30,7 +30,7 @@ Bouncer+ |!afkremoval | | toggles the afk check | |!autoskip | | skips songs automatically when they're done (use when the circles-bug happens) | |!bouncer+ | | disable bouncer+ | -|!deletechat | @user | delete all the chats by a certain user ***Currently removed due to bug (awaiting fix)*** | +|~~!deletechat~~ | ~~@user~~ | ~~delete all the chats by a certain user~~ | |!lock | | lock the waitlist | |!lockdown | | lock down the room: only staff can chat | |!maxlength | X | specify the maximum length a song can be when timeguard is enabled | From b9223cf763e41c155eab34ddc1168359e9b721ea Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 28 Apr 2015 05:58:39 +0100 Subject: [PATCH 099/281] !afktime update The bot will state if a user is AFK longer than its been in the room. --- basicBot.js | 32 +++++++++++++++++++++++++++++--- lang/en.json | 1 + 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index 824f61eb..9bd34b58 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1496,7 +1496,15 @@ var lastActive = basicBot.userUtilities.getLastActivity(user); var inactivity = Date.now() - lastActive; var time = basicBot.roomUtilities.msToStr(inactivity); + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + + if (inactivity >= durationOnline){ + API.sendChat(subChat(basicBot.chat.inactivelonger, {botname: basicBot.settings.botName, name: chat.un, username: name})); + } else { API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); + } } } }, @@ -1885,11 +1893,29 @@ var user = basicBot.userUtilities.lookupUserName(name); if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); var chats = $('.from'); + var message = $('.message'); + var emote = $('.emote'); + var from = $('.un.clickable'); for (var i = 0; i < chats.length; i++) { - var n = chats[i].textContent; + var n = from[i].textContent; if (name.trim() === n.trim()) { - var cid = $(chats[i]).parent()[0].getAttribute('data-cid'); - API.moderateDeleteChat(cid); + + // var messagecid = $(message)[i].getAttribute('data-cid'); + // var emotecid = $(emote)[i].getAttribute('data-cid'); + // API.moderateDeleteChat(messagecid); + + // try { + // API.moderateDeleteChat(messagecid); + // } + // finally { + // API.moderateDeleteChat(emotecid); + // } + + if (typeof $(message)[i].getAttribute('data-cid') == "undefined"){ + API.moderateDeleteChat($(emote)[i].getAttribute('data-cid')); // works well with normal messages but not with emotes due to emotes and messages are seperate. + } else { + API.moderateDeleteChat($(message)[i].getAttribute('data-cid')); + } } } API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); diff --git a/lang/en.json b/lang/en.json index 4a008d92..a984de9c 100644 --- a/lang/en.json +++ b/lang/en.json @@ -93,6 +93,7 @@ "maximumafktimeset": "/me [@%%NAME%%] Maximum afk duration set to %%TIME%% minutes.", "afkstatusreset": "/me [@%%NAME%%] Reset the afk status of @%%USERNAME%%.", "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% has been inactive for %%TIME%%.", + "inactivelonger": "/me [@%%NAME%%] @%%USERNAME%% has been inactive longer than %%BOTNAME%%'s been online.", "autowoot": "/me We recommend PlugCubed for autowooting: http://plugcubed.net/", "brandambassador": "/me A Brand Ambassador is the voice of the plug.dj users. They promote events, engage the community and share the plug.dj message around the world. For more info: https://plug.dj/ba", "bouncerplusrank": "/me [@%%NAME%%] You have to be manager or up to enable Bouncer+.", From f39f71e39653f9e827477523bfd1647910b5072d Mon Sep 17 00:00:00 2001 From: pajlada Date: Wed, 29 Apr 2015 13:20:05 +0200 Subject: [PATCH 100/281] Replace all @-signs in the 8ball argument. This is to prevent people from pinging groups above their level. --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 9bd34b58..7a9a031c 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1587,7 +1587,7 @@ else { var crowd = API.getUsers(); var msg = chat.message; - var argument = msg.substring(cmd.length + 1); + var argument = msg.substring(cmd.length + 1).replace(/@/g, ''); var randomUser = Math.floor(Math.random() * crowd.length); var randomBall = Math.floor(Math.random() * basicBot.settings.ball.length); var randomSentence = Math.floor(Math.random() * 1); From 3d41d29e48950efc47e2994817554b86d83c291a Mon Sep 17 00:00:00 2001 From: pajlada Date: Wed, 29 Apr 2015 13:20:05 +0200 Subject: [PATCH 101/281] Replace all @-signs in the 8ball argument. This is to prevent people from pinging groups above their level. --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index eeff4336..de6c342c 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1587,7 +1587,7 @@ else { var crowd = API.getUsers(); var msg = chat.message; - var argument = msg.substring(cmd.length + 1); + var argument = msg.substring(cmd.length + 1).replace(/@/g, ''); var randomUser = Math.floor(Math.random() * crowd.length); var randomBall = Math.floor(Math.random() * basicBot.settings.ball.length); var randomSentence = Math.floor(Math.random() * 1); From d67ab60f6a152265e5f0296cb07ee9d50bb47257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motel=20=E3=83=90=E3=82=A4=E3=83=96=E3=83=AB?= Date: Sat, 2 May 2015 12:52:53 -0300 Subject: [PATCH 102/281] Update pt.json --- lang/pt.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lang/pt.json b/lang/pt.json index 4ba068e2..9ec687c9 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -61,6 +61,7 @@ "whois": "/me [%%NAME1%%] Usuário: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Registro: %%JOINED%%, Nível: %%LEVEL%%, Linguagem: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", "toggleon": "/me [@%%NAME%%] %%FUNCTION%% ativado.", "toggleoff": "/me [@%%NAME%%] %%FUNCTION%% desativado.", + "cmddeletion": "remoção de comandos", "afkremoval": "Remoção de AFK", "afksremoved": "AFKs removidos", "afklimit": "Limite AFK", @@ -89,6 +90,7 @@ "maximumafktimeset": "/me [@%%NAME%%] Duração máxima de AFK agora é: %%TIME%% minutos.", "afkstatusreset": "/me [@%%NAME%%] Status AFK resetado: @%%USERNAME%%.", "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% esteve inativo por %%TIME%%.", + "inactivelonger": "/me [@%%NAME%%] @%%USERNAME%% esteve inativo por mais tempo que %%BOTNAME%% esteve online.", "autowoot": "/me Nós recomendamos plugCubed para autowoot: http://plugcubed.net/", "brandambassador": "/me Um Embaixador de Marca é a voz dos usuários da plug.dj. Eles promovem eventos, ajudam as comunidades e divulgam a plug.dj para todo o mundod. Mais info: https://plug.dj/ba", "bouncerplusrank": "/me [@%%NAME%%] Você precisa ser Coordenador ou superior para ativar o Bouncer+.", From e0622d4be82c2e391a7558dc51cd67e968ec8cc2 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 4 May 2015 17:47:03 +0100 Subject: [PATCH 103/281] Switched to shorter youtube URL --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 9bd34b58..b84c57a6 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1500,7 +1500,7 @@ var launchT = basicBot.room.roomstats.launchTime; var durationOnline = Date.now() - launchT; - if (inactivity >= durationOnline){ + if (inactivity == durationOnline){ API.sendChat(subChat(basicBot.chat.inactivelonger, {botname: basicBot.settings.botName, name: chat.un, username: name})); } else { API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); @@ -2291,7 +2291,7 @@ if (dj === chat.uid) isDj = true; if (perm >= 1 || isDj) { if (media.format === 1) { - var linkToSong = "https://www.youtube.com/watch?v=" + media.cid; + var linkToSong = "http://youtu.be/" + media.cid; API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); } if (media.format === 2) { From 8bd8871c60f1275a0214ebf78e2b056bcf3602cf Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 4 May 2015 21:52:25 +0100 Subject: [PATCH 104/281] Removed !purchase command plug notes are no longer a thing --- lang/en.json | 3 +-- lang/fr.json | 1 - lang/pt.json | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lang/en.json b/lang/en.json index a984de9c..7fd1f7a9 100644 --- a/lang/en.json +++ b/lang/en.json @@ -154,6 +154,5 @@ "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", "website": "/me Please visit our website: %%LINK%%", "youtube": "/me [%%NAME%%] Subscribe to us on youtube: %%LINK%%", - "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M.", - "purchase": "/me [@%%NAME%%] Stock up on plug notes: https://plug.dj/purchase" + "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." } diff --git a/lang/fr.json b/lang/fr.json index 97c1ae6e..ad2ea333 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -132,5 +132,4 @@ "website": "/me Visitez notre site Internet: %%LINK%%", "youtube": "/me [%%NAME%%] Abonnez-vous à notre chaîne Youtube: %%LINK%%", "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." - } \ No newline at end of file diff --git a/lang/pt.json b/lang/pt.json index 9ec687c9..04f6a4e8 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -151,6 +151,5 @@ "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", "website": "/me Visite nosso site: %%LINK%%", "youtube": "/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", - "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M.", - "purchase": "/me [@%%NAME%%] Compre mais Plug Notes: https://plug.dj/purchase" + "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." } From cb31b46f956c70ce23596eab818754e260c92981 Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 5 May 2015 18:18:33 +0100 Subject: [PATCH 105/281] Added Turkish translations! Added Turkish translations, cleaned things up and removed the !purchase command. --- basicBot.js | 13 --- lang/en.json | 241 +++++++++++++++++++---------------------- lang/fr.json | 244 +++++++++++++++++++++--------------------- lang/langIndex.json | 3 +- lang/pt.json | 254 +++++++++++++++++++++----------------------- lang/tr.json | 141 ++++++++++++++++++++++++ 6 files changed, 500 insertions(+), 396 deletions(-) create mode 100644 lang/tr.json diff --git a/basicBot.js b/basicBot.js index b84c57a6..8e7d9339 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2671,19 +2671,6 @@ } }, - purchaseCommand: { - command: ['purchase'], - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.purchase, {name: chat.un})); - } - } - }, - refreshCommand: { command: 'refresh', rank: 'manager', diff --git a/lang/en.json b/lang/en.json index 7fd1f7a9..a415ff88 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1,76 +1,59 @@ { - "nodatafound": "No previous data found.", "retrievingdata": "Retrieving previously stored data.", "datarestored": "Previously stored data successfully retrieved.", "greyuser": "Only bouncers and up can run a bot.", "bouncer": "The bot can't move people when it's run as a bouncer.", - "online": "/me %%BOTNAME%% v%%VERSION%% online!", - - - "welcome": "/me Welcome %%NAME%%", - "welcomeback": "/me Welcome back, %%NAME%%", - "songknown": "/me @%%NAME%%, this song is in the DJ history.", - "timelimit": "/me @%%NAME%%, your song is longer than %%MAXLENGTH%% minutes, you need permission to play longer songs.", - "permissionownsong": "/me :up: @%%NAME%% has permission to play their own production!", - "isblacklisted": "/me This track is on the %%BLACKLIST%% blacklist! Skipping...", - - - "isopen": "/me The roulette is now open! Type !join to participate!", - "winnerpicked": "/me A winner has been picked! @%%NAME%% to position %%POSITION%%.", - - "ball": "/me %%NAME%%'s question was: \"%%QUESTION%%\" and %%BOTNAME%%'s response is: \"%%RESPONSE%%\"", - + "online": "\/me %%BOTNAME%% v%%VERSION%% online!", + "welcome": "\/me Welcome %%NAME%%", + "welcomeback": "\/me Welcome back, %%NAME%%", + "songknown": "\/me @%%NAME%%, this song is in the DJ history.", + "timelimit": "\/me @%%NAME%%, your song is longer than %%MAXLENGTH%% minutes, you need permission to play longer songs.", + "permissionownsong": "\/me :up: @%%NAME%% has permission to play their own production!", + "isblacklisted": "\/me This track is on the %%BLACKLIST%% blacklist! Skipping...", + "isopen": "\/me The roulette is now open! Type !join to participate!", + "winnerpicked": "\/me A winner has been picked! @%%NAME%% to position %%POSITION%%.", + "ball": "\/me %%NAME%%'s question was: \"%%QUESTION%%\" and %%BOTNAME%%'s response is: \"%%RESPONSE%%\"", "notghosting": "[%%NAME1%%] %%NAME2%% is not ghosting.", "ghosting": "[%%NAME1%%] %%NAME2%% is either ghosting or not here.", - - "alreadyadding": "/me User is already being added! Changed the desired position to %%POSITION%%.", - "adding": "/me Added @%%NAME%% to the queue. Current queue: %%POSITION%%.", - - - "usernotfound": "/me User not found.", - "notdisconnected": "/me @%%NAME%% did not disconnect during my time here.", - "noposition": "/me No last position known. The waitlist needs to update at least once to register a user's last position.", - "toolongago": "/me @%%NAME%%'s last disconnect (DC or leave) was too long ago: %%TIME%%.", - "valid": "/me @%%NAME%% disconnected %%TIME%% ago and should be at position %%POSITION%%.", - - - "warning1": "/me @%%NAME%%, you have been afk for %%TIME%%, please respond within 2 minutes or you will be removed.", - "warning2": "/me @%%NAME%%, you will be removed due to AFK soon if you don't respond.", - "afkremove": "/me @%%NAME%%, you have been removed for being afk for %%TIME%%. You were at position %%POSITION%%. Chat at least once every %%MAXIMUMAFK%% minutes if you want to play a song.", - - - "caps": "/me @%%NAME%%, unglue your capslock button please.", - "askskip": "/me @%%NAME%%, don't ask for skips.", - "spam": "/me @%%NAME%%, please don't spam.", - "roomadvertising": "/me @%%NAME%%, don't post links to other rooms please.", - "adfly": "/me @%%NAME%%, please change your autowoot program. We suggest PlugCubed: http://plugcubed.net/", - - "validgiftags": "/me [@%%NAME%%] http://media.giphy.com/media/%%ID%%/giphy.gif [Tags: %%TAGS%%]", - "invalidgiftags": "/me [@%%NAME%%] Invalid tags, try something different. [Tags: %%TAGS%%]", - "validgifrandom": "/me [@%%NAME%%] http://media.giphy.com/media/%%ID%%/giphy.gif [Random GIF]", - "invalidgifrandom": "/me [@%%NAME%%] Invalid request, try again.", - - - "invalidtime": "/me [@%%NAME%%] Invalid time specified.", - "nouserspecified": "/me [@%%NAME%%] No user specified.", - "invaliduserspecified": "/me [@%%NAME%%] Invalid user specified.", - "nolistspecified": "/me [@%%NAME%%] No list specified.", - "invalidlistspecified": "/me [@%%NAME%%] Invalid list specified.", - "novaliduserspecified": "/me [@%%NAME%%] No valid user specified.", - "nolimitspecified": "/me [@%%NAME%%] No limit specified.", - "invalidlimitspecified": "/me [@%%NAME%%] Invalid limit.", - "invalidpositionspecified": "/me [@%%NAME%%] Invalid position specified.", - "whois": "/me [%%NAME1%%] Username: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Joined: %%JOINED%%, Level: %%LEVEL%%, Language: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", - "toggleon": "/me [@%%NAME%%] %%FUNCTION%% enabled.", - "toggleoff": "/me [@%%NAME%%] %%FUNCTION%% disabled.", + "alreadyadding": "\/me User is already being added! Changed the desired position to %%POSITION%%.", + "adding": "\/me Added @%%NAME%% to the queue. Current queue: %%POSITION%%.", + "usernotfound": "\/me User not found.", + "notdisconnected": "\/me @%%NAME%% did not disconnect during my time here.", + "noposition": "\/me No last position known. The waitlist needs to update at least once to register a user's last position.", + "toolongago": "\/me @%%NAME%%'s last disconnect (DC or leave) was too long ago: %%TIME%%.", + "valid": "\/me @%%NAME%% disconnected %%TIME%% ago and should be at position %%POSITION%%.", + "warning1": "\/me @%%NAME%%, you have been afk for %%TIME%%, please respond within 2 minutes or you will be removed.", + "warning2": "\/me @%%NAME%%, you will be removed due to AFK soon if you don't respond.", + "afkremove": "\/me @%%NAME%%, you have been removed for being afk for %%TIME%%. You were at position %%POSITION%%. Chat at least once every %%MAXIMUMAFK%% minutes if you want to play a song.", + "caps": "\/me @%%NAME%%, unglue your capslock button please.", + "askskip": "\/me @%%NAME%%, don't ask for skips.", + "spam": "\/me @%%NAME%%, please don't spam.", + "roomadvertising": "\/me @%%NAME%%, don't post links to other rooms please.", + "adfly": "\/me @%%NAME%%, please change your autowoot program. We suggest PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Invalid tags, try something different. [Tags: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Random GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] Invalid request, try again.", + "invalidtime": "\/me [@%%NAME%%] Invalid time specified.", + "nouserspecified": "\/me [@%%NAME%%] No user specified.", + "invaliduserspecified": "\/me [@%%NAME%%] Invalid user specified.", + "nolistspecified": "\/me [@%%NAME%%] No list specified.", + "invalidlistspecified": "\/me [@%%NAME%%] Invalid list specified.", + "novaliduserspecified": "\/me [@%%NAME%%] No valid user specified.", + "nolimitspecified": "\/me [@%%NAME%%] No limit specified.", + "invalidlimitspecified": "\/me [@%%NAME%%] Invalid limit.", + "invalidpositionspecified": "\/me [@%%NAME%%] Invalid position specified.", + "whois": "\/me [%%NAME1%%] Username: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Joined: %%JOINED%%, Level: %%LEVEL%%, Language: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% enabled.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% disabled.", "cmddeletion": "command deletion", "afkremoval": "AFK removal", "afksremoved": "AFK's removed", "afklimit": "AFK limit", "autodisable": "autodisable", "autoskip": "autoskip", - "newblacklisted": "/me [@%%NAME%%] This track belongs on the %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "newblacklisted": "\/me [@%%NAME%%] This track belongs on the %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", "blinfo": "[@%%NAME%%] Blacklist Info - author: %%AUTHOR%%, title: %%TITLE%%, mid: %%SONGID%%", "blacklist": "blacklist", "cycleguard": "cycleguard", @@ -85,74 +68,74 @@ "songstats": "song statistics", "etarestriction": "eta restriction", "voteskip": "voteskip", - "voteskiplimit": "/me [@%%NAME%%] Voteskip limit is currently set to %%LIMIT%% mehs.", - "voteskipexceededlimit": "/me @%%NAME%%, your song has exceeded the voteskip limit (%%LIMIT%% mehs).", - "voteskipinvalidlimit": "/me [@%%NAME%%] Invalid voteskip limit, please try again using a number to signify the number of mehs.", - "voteskipsetlimit": "/me [@%%NAME%%] Voteskip limit set to %%LIMIT%%.", - "activeusersintime": "/me [@%%NAME%% There have been %%AMOUNT%% users chatting in the past %%TIME%% minutes.", - "maximumafktimeset": "/me [@%%NAME%%] Maximum afk duration set to %%TIME%% minutes.", - "afkstatusreset": "/me [@%%NAME%%] Reset the afk status of @%%USERNAME%%.", - "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% has been inactive for %%TIME%%.", - "inactivelonger": "/me [@%%NAME%%] @%%USERNAME%% has been inactive longer than %%BOTNAME%%'s been online.", - "autowoot": "/me We recommend PlugCubed for autowooting: http://plugcubed.net/", - "brandambassador": "/me A Brand Ambassador is the voice of the plug.dj users. They promote events, engage the community and share the plug.dj message around the world. For more info: https://plug.dj/ba", - "bouncerplusrank": "/me [@%%NAME%%] You have to be manager or up to enable Bouncer+.", - "chatcleared": "/me [@%%NAME%%] Cleared the chat.", - "deletechat": "/me [@%%NAME%%] Cleared the chat of %%USERNAME%%.", - "commandslink": "/me %%BOTNAME%% commands: %%LINK%%", - "eatcookie": "/me eats a cookie.", - "nousercookie": "/em doesn't see %%NAME%% in room and eats a cookie himself.", - "selfcookie": "/me @%%NAME%%, you're a bit greedy, aren't you? Giving cookies to yourself, bah. Share some with other people!", - "cookie": "/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", - "cycleguardtime": "/me [@%%NAME%%] The cycleguard is set to %%TIME%% minute(s).", - "dclookuprank": "/me [@%%NAME%%] Only bouncers and above can do a lookup for others.", - "emojilist": "/me Emoji list: %%LINK%%", - "notinwaitlist": "/me @%%NAME%%, you are not on the waitlist.", - "eta": "/me @%%NAME%% you will reach the booth in approximately %%TIME%%.", - "facebook": "/me Like us on facebook: %%LINK%%", - "starterhelp": "/me This image will get you started on plug: %%LINK%%", - "roulettejoin": "/me @%%NAME%% joined the roulette! (!leave if you regret it.)", - "jointime": "/me [@%%NAMEFROM%%] @%%USERNAME%% has been in the room for %%TIME%%.", - "kickrank": "/me [@%%NAME%%] you can't kick users with an equal or higher rank than you!", - "kick": "/me [@%%NAME%%], @%%USERNAME%% you are being kicked from the community for %%TIME%% minutes.", - "kill": "/me Shutting down.", - "logout": "/me [@%%NAME%%] Logging out %%BOTNAME%%", - "rouletteleave": "/me @%%NAME%% left the roulette!", - "songlink": "/me [@%%NAME%%] Link to current song: %%LINK%%", - "usedlockskip": "/me [%%NAME%% used lockskip.]", - "lockskippos": "/me [@%%NAME%%] Lockskip will now move the dj to position %%POSITION%%.", - "lockguardtime": "/me [@%%NAME%%] The lockguard is set to %%TIME%% minute(s).", - "maxlengthtime": "/me [@%%NAME%%] The maximum song duration is set to %%TIME%% minutes.", - "motdset": "/me MotD set to: %%MSG%%", - "motdintervalset": "/me MotD interval set to %%INTERVAL%%.", - "addbotwaitlist": "/me @%%NAME%%, don't try to add me to the waitlist, please.", - "move": "/me [%%NAME%% used move.]", - "mutednotime": "/me [@%%NAME%%] Muted @%%USERNAME%%.", - "mutedmaxtime": "/me [@%%NAME%%] You can only mute for maximum %%TIME%% minutes.", - "mutedtime": "/me [@%%NAME%%] Muted @%%USERNAME%% for %%TIME%% minutes.", - "unmuted": "/me [@%%NAME%%] Unmuted @%%USERNAME%%.", - "muterank": "/me [@%%NAME%%] You can't mute persons with an equal or higher rank than you.", - "oplist": "/me OP list: %%LINK%%", - "pong": "/me Pong!", - "reload": "/me Be right back.", - "removenotinwl": "/me [@%%NAME%%] Specified user @%%USERNAME%% is not in the waitlist.", - "roomrules": "/me Please find the room rules here: %%LINK%%", - "sessionstats": "/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", - "skip": "/me [%%NAME%% used skip.]", - "madeby": "/me This bot was made by %%NAME%%.", + "voteskiplimit": "\/me [@%%NAME%%] Voteskip limit is currently set to %%LIMIT%% mehs.", + "voteskipexceededlimit": "\/me @%%NAME%%, your song has exceeded the voteskip limit (%%LIMIT%% mehs).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Invalid voteskip limit, please try again using a number to signify the number of mehs.", + "voteskipsetlimit": "\/me [@%%NAME%%] Voteskip limit set to %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%% There have been %%AMOUNT%% users chatting in the past %%TIME%% minutes.", + "maximumafktimeset": "\/me [@%%NAME%%] Maximum afk duration set to %%TIME%% minutes.", + "afkstatusreset": "\/me [@%%NAME%%] Reset the afk status of @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% has been inactive for %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% has been inactive longer than %%BOTNAME%%'s been online.", + "autowoot": "\/me We recommend PlugCubed for autowooting: http:\/\/plugcubed.net\/", + "brandambassador": "\/me A Brand Ambassador is the voice of the plug.dj users. They promote events, engage the community and share the plug.dj message around the world. For more info: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] You have to be manager or up to enable Bouncer+.", + "chatcleared": "\/me [@%%NAME%%] Cleared the chat.", + "deletechat": "\/me [@%%NAME%%] Cleared the chat of %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% commands: %%LINK%%", + "eatcookie": "\/me eats a cookie.", + "nousercookie": "\/em doesn't see %%NAME%% in room and eats a cookie himself.", + "selfcookie": "\/me @%%NAME%%, you're a bit greedy, aren't you? Giving cookies to yourself, bah. Share some with other people!", + "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] The cycleguard is set to %%TIME%% minute(s).", + "dclookuprank": "\/me [@%%NAME%%] Only bouncers and above can do a lookup for others.", + "emojilist": "\/me Emoji list: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, you are not on the waitlist.", + "eta": "\/me @%%NAME%% you will reach the booth in approximately %%TIME%%.", + "facebook": "\/me Like us on facebook: %%LINK%%", + "starterhelp": "\/me This image will get you started on plug: %%LINK%%", + "roulettejoin": "\/me @%%NAME%% joined the roulette! (!leave if you regret it.)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% has been in the room for %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] you can't kick users with an equal or higher rank than you!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% you are being kicked from the community for %%TIME%% minutes.", + "kill": "\/me Shutting down.", + "logout": "\/me [@%%NAME%%] Logging out %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% left the roulette!", + "songlink": "\/me [@%%NAME%%] Link to current song: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% used lockskip.]", + "lockskippos": "\/me [@%%NAME%%] Lockskip will now move the dj to position %%POSITION%%.", + "lockguardtime": "\/me [@%%NAME%%] The lockguard is set to %%TIME%% minute(s).", + "maxlengthtime": "\/me [@%%NAME%%] The maximum song duration is set to %%TIME%% minutes.", + "motdset": "\/me MotD set to: %%MSG%%", + "motdintervalset": "\/me MotD interval set to %%INTERVAL%%.", + "addbotwaitlist": "\/me @%%NAME%%, don't try to add me to the waitlist, please.", + "move": "\/me [%%NAME%% used move.]", + "mutednotime": "\/me [@%%NAME%%] Muted @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] You can only mute for maximum %%TIME%% minutes.", + "mutedtime": "\/me [@%%NAME%%] Muted @%%USERNAME%% for %%TIME%% minutes.", + "unmuted": "\/me [@%%NAME%%] Unmuted @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] You can't mute persons with an equal or higher rank than you.", + "oplist": "\/me OP list: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Be right back.", + "removenotinwl": "\/me [@%%NAME%%] Specified user @%%USERNAME%% is not in the waitlist.", + "roomrules": "\/me Please find the room rules here: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", + "skip": "\/me [%%NAME%% used skip.]", + "madeby": "\/me This bot was made by %%NAME%%.", "activefor": "I have been active for %%TIME%%.", - "swapinvalid": "/me [@%%NAME%%] Invalid user specified. (No names with spaces!)", - "swapwlonly": "/me [@%%NAME%%] Please only swap users that are in the waitlist!", - "swapping": "/me Swapping %%NAME1%% with %%NAME2%%.", - "genres": "/me Please find the permissible room genres here: %%LINK%%", - "notbanned": "/me [@%%NAME%%] The user was not banned.", - "unmutedeveryone": "/me [@%%NAME%%] Unmuted everyone.", - "unmuteeveryonerank": "/me [@%%NAME%%] Only managers and up can unmute everyone at once.", - "notmuted": "/me [@%%NAME%%] that user wasn't muted.", - "unmuterank": "/me [@%%NAME%%] You can't unmute persons with an equal or higher rank than you.", - "commandscd": "/me [@%%NAME%%] The cooldown for commands by users is now set to %%TIME%% seconds.", - "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", - "website": "/me Please visit our website: %%LINK%%", - "youtube": "/me [%%NAME%%] Subscribe to us on youtube: %%LINK%%", - "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." -} + "swapinvalid": "\/me [@%%NAME%%] Invalid user specified. (No names with spaces!)", + "swapwlonly": "\/me [@%%NAME%%] Please only swap users that are in the waitlist!", + "swapping": "\/me Swapping %%NAME1%% with %%NAME2%%.", + "genres": "\/me Please find the permissible room genres here: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] The user was not banned.", + "unmutedeveryone": "\/me [@%%NAME%%] Unmuted everyone.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Only managers and up can unmute everyone at once.", + "notmuted": "\/me [@%%NAME%%] that user wasn't muted.", + "unmuterank": "\/me [@%%NAME%%] You can't unmute persons with an equal or higher rank than you.", + "commandscd": "\/me [@%%NAME%%] The cooldown for commands by users is now set to %%TIME%% seconds.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w\/m): %%RATIO%%.", + "website": "\/me Please visit our website: %%LINK%%", + "youtube": "\/me [%%NAME%%] Subscribe to us on youtube: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file diff --git a/lang/fr.json b/lang/fr.json index ad2ea333..bbb4266c 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -1,66 +1,65 @@ { - "nodatafound": "Aucune donnée trouvée.", - "retrievingdata": "Récupération des données.", - "datarestored": "Succès de la récupération des donnés.", - "greyuser": " Uniquement les Videurs et les rangs supérieurs peuvent lancer le bot.", - "bouncer": " Le bot ne peut pas changer les personnes de place quand il est lancé par un Videur.", - "online": "/me %%BOTNAME%% v%%VERSION%% en ligne!", - - - "welcome": "/me Bienvenue %%NAME%%", - "welcomeback": "/me Bon retour, %%NAME%%", - "songknown": "/me :repeat: Cette musique a été jouée %%PLAYS%% fois dans les dernières %%TIMETOTAL%%, et la dernière fois il y a %%LASTTIME%%. :repeat:", - "timelimit": "/me @%%NAME%%, votre musique est plus longue que %%MAXLENGTH%% minutes, vous avez besoin de permissions pour jouer une musique plus longue.", - "permissionownsong": "/me :up: @%%NAME%% a la permission de jouer sa propre création !", - "isblacklisted": "/me This track is on the %%BLACKLIST%% blacklist! Skipping...", - - - "isopen": "/me La roulette est maintenant ouverte ! Tapez !join pour participer !", - "winnerpicked": "/me Un gagnant a été trouvé ! @%%NAME%% à la position %%POSITION%%.", - - - "alreadyadding": "/me L'utilisateur est déjà en ajout ! Changement de la position désirée à %%POSITION%%.", - "adding": "/me Ajout de @%%NAME%% à la file d'attente. Queue actuelle: %%POSITION%%.", - - - "usernotfound": "/me Utilisateur non trouvé.", - "notdisconnected": "/me @%%NAME%% ne s'est pas déconnecté depuis que je suis là.", - "noposition": "/me Dernière position inconnue. La file d'attente a besoin d'être mise à jour pour enregistrer la dernière position d'un utilisateur.", - "toolongago": "/me la dernière déconnexion de @%%NAME%% remonte à trop longtemps: %%TIME%%.", - "valid": "/me @%%NAME%% s'est déconnecté il y a %%TIME%% et devrait être à la position %%POSITION%%.", - - - "warning1": "/me @%%NAME%%, vous êtes AFK depuis %%TIME%%, merci de répondre sous 2 minutes ou vous serez kické", - "warning2": "/me @%%NAME%%, vous serez enlevés de la queue si vous ne répondez pas.", - "afkremove": "/me @%%NAME%%, vous avez été enlevé car vous êtes resté AFK %%TIME%%. Vous êtiez à la position %%POSITION%%. Ecrivez au minimum un fois toute les %%MAXIMUMAFK%% minutes si vous voulez jouer une musique.", - - - "caps": "/me @%%NAME%%, décollez votre bouton capslock, merci.", - "askskip": "/me @%%NAME%%, ne demandez pas de passer une musique.", - "spam": "/me @%%NAME%%, merci de ne pas spammer.", - "roomadvertising": "/me @%%NAME%%, ne postez pas de liens menant vers d'autres salles.", - "adfly": "/me @%%NAME%%, merci de changer votre programme d'Autowoot. Nous vous suggérons PlugCubed: http://plugcubed.net/", - - - "invalidtime": "/me [@%%NAME%%] Temps spécifié invalide.", - "nouserspecified": "/me [@%%NAME%%] Aucun utilisateur spécifié.", - "invaliduserspecified": "/me [@%%NAME%%] Invalid user specified.", - "novaliduserspecified": "/me [@%%NAME%%] No valid user specified.", - "nolistspecified": "/me [@%%NAME%%] No list specified.", - "invalidlistspecified": "/me [@%%NAME%%] Invalid list specified.", - "nolimitspecified": "/me [@%%NAME%%] Aucune limite spécifiée.", - "invalidlimitspecified": "/me [@%%NAME%%] Limite invalide.", - "invalidpositionspecified": "/me [@%%NAME%%] Position invalide spécifiée.", - "toggleon": "/me [@%%NAME%%] %%FUNCTION%% activée.", - "toggleoff": "/me [@%%NAME%%] %%FUNCTION%% désactivée.", - "afkremoval": "AFK removal", + "nodatafound": "Aucune donn\u00e9e trouv\u00e9e.", + "retrievingdata": "R\u00e9cup\u00e9ration des donn\u00e9es.", + "datarestored": "Succ\u00e8s de la r\u00e9cup\u00e9ration des donn\u00e9s.", + "greyuser": "Uniquement les Videurs et les rangs sup\u00e9rieurs peuvent lancer le bot.", + "bouncer": "Le bot ne peut pas changer les personnes de place quand il est lanc\u00e9 par un Videur.", + "online": "\/me %%BOTNAME%% v%%VERSION%% en ligne!", + "welcome": "\/me Bienvenue %%NAME%%", + "welcomeback": "\/me Bon retour, %%NAME%%", + "songknown": "\/me @%%NAME%%, cette musique est dans l'historique.", + "timelimit": "\/me @%%NAME%%, votre musique est plus longue que %%MAXLENGTH%% minutes, vous avez besoin de la permission pour jouer une musique plus longue.", + "permissionownsong": "\/me :up: @%%NAME%% a la permission de jouer sa propre cr\u00e9ation !", + "isblacklisted": "\/me Cette musique est sur la liste noire %%BLACKLIST%% ! Je passe...", + "isopen": "\/me La roulette est maintenant ouverte ! Tapez !join pour participer !", + "winnerpicked": "\/me Un gagnant a \u00e9t\u00e9 trouv\u00e9 ! @%%NAME%% \u00e0 la position %%POSITION%%.", + "ball": "\/me %%NAME%% a pos\u00e9 la question: \"%%QUESTION%%\" et la r\u00e9ponse de %%BOTNAME%% est: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% is not ghosting.", + "ghosting": "[%%NAME1%%] %%NAME2%% is either ghosting or not here.", + "alreadyadding": "\/me L'utilisateur est d\u00e9j\u00e0 en ajout ! Changement de la position d\u00e9sir\u00e9e \u00e0 %%POSITION%%.", + "adding": "\/me Ajout de @%%NAME%% \u00e0 la file d'attente. Queue actuelle : %%POSITION%%.", + "usernotfound": "\/me Utilisateur non trouv\u00e9.", + "notdisconnected": "\/me @%%NAME%% ne s'est pas d\u00e9connect\u00e9 depuis que je suis l\u00e0.", + "noposition": "\/me Derni\u00e8re position inconnue. La file d'attente a besoin d'\u00eatre mise \u00e0 jour pour enregistrer la derni\u00e8re position d'un utilisateur.", + "toolongago": "\/me La derni\u00e8re d\u00e9connexion de @%%NAME%% remonte \u00e0 trop longtemps: %%TIME%%.", + "valid": "\/me @%%NAME%% s'est d\u00e9connect\u00e9 il y a %%TIME%% et devrait \u00eatre \u00e0 la position %%POSITION%%.", + "warning1": "\/me @%%NAME%%, vous \u00eates AFK depuis %%TIME%%, merci de r\u00e9pondre sous 2 minutes ou vous serez retir\u00e9 de la file d'attente.", + "warning2": "\/me @%%NAME%%, vous serez retir\u00e9 de la queue si vous ne r\u00e9pondez pas.", + "afkremove": "\/me @%%NAME%%, vous avez \u00e9t\u00e9 retir\u00e9 car vous \u00eates rest\u00e9 AFK %%TIME%%. Vous \u00eatiez \u00e0 la position %%POSITION%%. Ecrivez au minimum une fois toutes les %%MAXIMUMAFK%% minutes si vous voulez jouer une musique.", + "caps": "\/me @%%NAME%%, d\u00e9collez votre bouton verrmaj, merci.", + "askskip": "\/me @%%NAME%%, ne demandez pas de passer une musique.", + "spam": "\/me @%%NAME%%, merci de ne pas spammer.", + "roomadvertising": "\/me @%%NAME%%, ne postez pas de liens menant vers d'autres salles.", + "adfly": "\/me @%%NAME%%, merci de changer votre programme d'Autowoot. Nous vous sugg\u00e9rons PlugCubed : http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags : %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Tags invalides, essayez-en d'autres. [Tags : %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [GIF Al\u00e9atoire]", + "invalidgifrandom": "\/me [@%%NAME%%] Requ\u00eate invalide, essayez encore.", + "invalidtime": "\/me [@%%NAME%%] Temps sp\u00e9cifi\u00e9 invalide.", + "nouserspecified": "\/me [@%%NAME%%] Aucun utilisateur sp\u00e9cifi\u00e9.", + "invaliduserspecified": "\/me [@%%NAME%%] Utilisateur sp\u00e9ciafi\u00e9 invalide.", + "nolistspecified": "\/me [@%%NAME%%] Aucune liste sp\u00e9cifi\u00e9e.", + "invalidlistspecified": "\/me [@%%NAME%%] Liste sp\u00e9cifi\u00e9e invalide.", + "novaliduserspecified": "\/me [@%%NAME%%] Aucun utilisateur valide sp\u00e9cifi\u00e9.", + "nolimitspecified": "\/me [@%%NAME%%] Aucune limite sp\u00e9cifi\u00e9e.", + "invalidlimitspecified": "\/me [@%%NAME%%] Limite invalide.", + "invalidpositionspecified": "\/me [@%%NAME%%] Position invalide sp\u00e9cifi\u00e9e.", + "whois": "\/me [%%NAME1%%] Nom : %%NAME2%%, ID : %%ID%%, Rang : %%RANK%%, Inscrit le : %%JOINED%%, Niveau : %%LEVEL%%, Langue : %%LANGUAGE%%, Avatar : %%AVATAR%%, Statut : %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% activ\u00e9e.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% d\u00e9sactiv\u00e9e.", + "cmddeletion": "Suppression de commande", + "afkremoval": "Retirer les AFK", "afksremoved": "AFK's removed", "afklimit": "AFK limit", + "autodisable": "Autod\u00e9sactivation", "autoskip": "autoskip", - "newblacklisted": "/me [@%%NAME%%] This track belongs on the %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "newblacklisted": "\/me [@%%NAME%%] Cette musique devrait \u00eatre sur la liste noire %%BLACKLIST%% ! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Info - auteur : %%AUTHOR%%, titre : %%TITLE%%, mid : %%SONGID%%", + "blacklist": "liste noire", "cycleguard": "cycleguard", "timeguard": "timeguard", "chatfilter": "chatfilter", + "historyskip": "historyskip", "lockdown": "lockdown", "lockguard": "lockguard", "usercommands": "commandesutilisateur", @@ -68,68 +67,75 @@ "welcomemsg": "message de bienvenue", "songstats": "statistiques de la chanson", "etarestriction": "eta restriction", - "activeusersintime": "/me [@%%NAME%%] %%AMOUNT%% utilisateurs on parlés dans les dernières %%TIME%% minutes.", - "maximumafktimeset": "/me [@%%NAME%%] Durée de l'AFK maximum réglée à %%TIME%% minutes.", - "afkstatusreset": "/me [@%%NAME%%] Réinitialisation du statut AFK de @%%USERNAME%%.", - "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% a été inactif pour %%TIME%%.", - "autowoot": "/me Nous recommandons PlugCubes pour l'autowooting: http://plugcubed.net/", - "brandambassador": "/me Un Brand Ambassador est la voix des utilisateurs de plug.dj. Il promouvoient les évènements, font participer la communauté et partagent le message de plug.dj autour du monde. Pour plus d'info: https://plug.dj/ba", - "bouncerplusrank": "/me [@%%NAME%%] Vous devez être Manager pour pouvoir activer Bouncer+.", - "chatcleared": "/me [@%%NAME%%] A nettoyé le chat.", - "deletechat": "/me [@%%NAME%%] A nettoyé le chat de %%USERNAME%%.", - "commandslink": "/me %%BOTNAME%% commandes: %%LINK%%", - "eatcookie": "/me mange un cookie.", - "nousercookie": "/me ne voit pas %%NAME%% dans la salle et mange le cookie.", - "selfcookie": "/me @%%NAME%%, tu est un peu radin non ? Te donner des cookies à toi même... Partage les avec d'autres gens !", - "cookie": "/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", - "cycleguardtime": "/me [@%%NAME%%] Le cycleguard est paramétré pour %%TIME%% minute(s).", - "dclookuprank": "/me [@%%NAME%%] Uniquement les Bouncers peuvent vérifier pour les autres.", - "emojilist": "/me Liste des Emoji : %%LINK%%", - "notinwaitlist": "/me @%%NAME%%, vous n'êtes pas dans la file d'attente.", - "eta": "/me @%%NAME%% vous atteignerez les platines dans à peu près %%TIME%%.", - "facebook": "/me Suivez-nous sur Facebook: %%LINK%%", - "starterhelp": "/me Cette image vous aidera à débuter sur plug: %%LINK%%", - "roulettejoin": "/me @%%NAME%% a rejoint la roulette ! (!leave si vous le regrettez.)", - "jointime": "/me [@%%NAMEFROM%%] @%%USERNAME%% est dans la salle depuis %%TIME%%.", - "kickrank": "/me [@%%NAME%%] vous ne pouvez pas kicker un utilisateur avec un rang égal ou supérieur au votre !", - "kick": "/me [@%%NAME%%], @%%USERNAME%% vous allez vous faire kicker de la communauté pour %%TIME%% minutes.", - "kill": "/me Extinction.", - "rouletteleave": "/me @%%NAME%% a quitté la roulette !", - "songlink": "/me [@%%NAME%%] Lien vers la musique actuelle: %%LINK%%", - "usedlockskip": "/me [%%NAME%%] a utilisé lockskip.]", - "lockskippos": "/me [@%%NAME%%] Lockskip va bouger l'utilisateur à la position %%POSITION%%.", - "lockguardtime": "/me [@%%NAME%%] Le lockguard est maintenant paramétré pour %%TIME%% minute(s).", - "maxlengthtime": "/me [@%%NAME%%] La durée maximum d'une musique est maintenant de %%TIME%% minutes.", - "motdset": "/me Le MotD est maintenant : %%MSG%%", - "motdintervalset": "/me L'intervalle du MotD est maintenant de %%INTERVAL%%.", - "addbotwaitlist": "/me @%%NAME%%, n'essaye pas de m'ajouter à la liste d'attente, merci.", - "move": "/me [%%NAME%% a utilisé move.]", - "mutednotime": "/me [@%%NAME%%] A rendu muet @%%USERNAME%%.", - "mutedmaxtime": "/me [@%%NAME%%] Vous ne pouvez rendre muet qu'au maximum %%TIME%% minutes.", - "mutedtime": "/me [@%%NAME%%] A rendu muet @%%USERNAME%% pour %%TIME%% minutes.", - "unmuted": "/me [@%%NAME%%] A rendu la parole à @%%USERNAME%%.", - "muterank": "/me [@%%NAME%%] Vous ne pouvez pas rendre muet un utilisateur avec un rang égal ou supérieur au votre.", - "oplist": "/me OP list: %%LINK%%", - "pong": "/me Pong!", - "reload": "/me Je reviens.", - "removenotinwl": "/me [@%%NAME%%] L'utilisateur @%%USERNAME%% n'est pas dans la file d'attente.", - "roomrules": "/me Merci de lire les règles de la salle ici: %%LINK%%", - "sessionstats": "/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", - "skip": "/me [%%NAME%% a utilisé skip.]", - "madeby": "/me Ce bot a été fait par %%NAME%%.", + "voteskip": "voteskip", + "voteskiplimit": "\/me [@%%NAME%%] Le nombre de meh requis pour passer est actuellement plac\u00e9 \u00e0 %%LIMIT%% mehs.", + "voteskipexceededlimit": "\/me @%%NAME%%, votre chanson a d\u00e9pass\u00e9 la limite de mehs requis pour passer (%%LIMIT%% mehs).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Limite invalide, s'il vous pla\u00eet essayez encore en pr\u00e9cisant un nombre pour la limite de mehs.", + "voteskipsetlimit": "\/me [@%%NAME%%] Limite pour passer plac\u00e9e \u00e0 %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] %%AMOUNT%% utilisateurs ont parl\u00e9 dans les derni\u00e8res %%TIME%% minutes.", + "maximumafktimeset": "\/me [@%%NAME%%] Dur\u00e9e maximum d'AFK r\u00e9gl\u00e9e \u00e0 %%TIME%% minutes.", + "afkstatusreset": "\/me [@%%NAME%%] R\u00e9initialisation du statut AFK de @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% a \u00e9t\u00e9 inactif pendant %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% est inactif depuis plus longtemps que %%BOTNAME%%'s est en ligne.", + "autowoot": "\/me Nous recommandons PlugCubed pour l'autowoot : http:\/\/plugcubed.net\/", + "brandambassador": "\/me Un Brand Ambassador est la voix des utilisateurs de plug.dj. Il promouvoient les \u00e9v\u00e8nements, font participer la communaut\u00e9 et partagent le message de plug.dj autour du monde. Pour plus d'info : https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Vous devez \u00eatre Gestionnaire ou plus pour pouvoir activer Bouncer+.", + "chatcleared": "\/me [@%%NAME%%] A nettoy\u00e9 le chat.", + "deletechat": "\/me [@%%NAME%%] A nettoy\u00e9 le chat de %%USERNAME%%.", + "commandslink": "\/me Commandes de %%BOTNAME%% : %%LINK%%", + "eatcookie": "\/me mange un cookie.", + "nousercookie": "\/me ne voit pas %%NAME%% dans la salle et mange le cookie.", + "selfcookie": "\/me @%%NAME%%, tu es un peu radin, non ? Donner des cookies \u00e0 toi-m\u00eame... Partage-les avec d'autres gens !", + "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] Le cycleguard est param\u00e9tr\u00e9 pour %%TIME%% minute(s).", + "dclookuprank": "\/me [@%%NAME%%] Uniquement les Videurs peuvent v\u00e9rifier pour les autres.", + "emojilist": "\/me Liste des Emoji : %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, vous n'\u00eates pas dans la file d'attente.", + "eta": "\/me @%%NAME%%, vous atteignerez les platines dans \u00e0 peu pr\u00e8s %%TIME%%.", + "facebook": "\/me Suivez-nous sur Facebook : %%LINK%%", + "starterhelp": "\/me Cette image vous aidera \u00e0 d\u00e9buter sur plug : %%LINK%%", + "roulettejoin": "\/me @%%NAME%% a rejoint la roulette ! (!leave si vous le regrettez.)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% est dans la salle depuis %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] Vous ne pouvez pas kicker un utilisateur avec un rang \u00e9gal ou sup\u00e9rieur au v\u00f4tre !", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% vous allez vous faire kicker de la communaut\u00e9 pendant %%TIME%% minutes.", + "kill": "\/me Extinction.", + "logout": "\/me [@%%NAME%%] D\u00e9connecte %%BOTNAME%%.", + "rouletteleave": "\/me @%%NAME%% a quitt\u00e9 la roulette !", + "songlink": "\/me [@%%NAME%%] Lien vers la musique actuelle : %%LINK%%", + "usedlockskip": "\/me [%%NAME%% a utilis\u00e9 lockskip.]", + "lockskippos": "\/me [@%%NAME%%] Lockskip va bouger l'utilisateur \u00e0 la position %%POSITION%%.", + "lockguardtime": "\/me [@%%NAME%%] Le lockguard est maintenant param\u00e9tr\u00e9 pour %%TIME%% minute(s).", + "maxlengthtime": "\/me [@%%NAME%%] La dur\u00e9e maximum d'une musique est maintenant de %%TIME%% minutes.", + "motdset": "\/me Le MotD est maintenant : %%MSG%%", + "motdintervalset": "\/me L'intervalle du MotD est maintenant de %%INTERVAL%%.", + "addbotwaitlist": "\/me @%%NAME%%, n'essaye pas de m'ajouter \u00e0 la liste d'attente, merci.", + "move": "\/me [%%NAME%% a utilis\u00e9 move.]", + "mutednotime": "\/me [@%%NAME%%] A rendu muet @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Vous ne pouvez rendre muet qu'au maximum %%TIME%% minutes.", + "mutedtime": "\/me [@%%NAME%%] A rendu muet @%%USERNAME%% pendant %%TIME%% minutes.", + "unmuted": "\/me [@%%NAME%%] A rendu la parole \u00e0 @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] Vous ne pouvez pas rendre muet un utilisateur avec un rang \u00e9gal ou sup\u00e9rieur au v\u00f4tre.", + "oplist": "\/me OP list: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Je reviens.", + "removenotinwl": "\/me [@%%NAME%%] L'utilisateur @%%USERNAME%% n'est pas dans la file d'attente.", + "roomrules": "\/me Merci de lire les r\u00e8gles de la salle ici : %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Woots total : %%WOOTS%%, Mehs total : %%MEHS%%, Ajouts total : %%GRABS%%.", + "skip": "\/me [%%NAME%% a utilis\u00e9 skip.]", + "madeby": "\/me Ce bot a \u00e9t\u00e9 fait par %%NAME%%.", "activefor": "Cela fait %%TIME%% que je suis actif.", - "swapinvalid": "/me [@%%NAME%%] Utilisateur invalide. (Pas de nom avec des espaces!)", - "swapwlonly": "/me [@%%NAME%%] Merci d'uniquement intervertir des utilisateur dans la file d'attente !", - "swapping": "/me Echange de %%NAME1%% avec %%NAME2%%.", - "genres": "/me Merci de consulter les genres de musique permis: %%LINK%%", - "notbanned": "/me [@%%NAME%%] L'utilisateur n'a pas été banni.", - "unmutedeveryone": "/me [@%%NAME%%] Parole rendue à tout le monde.", - "unmuteeveryonerank": "/me [@%%NAME%%] Uniquement les managers peuvent rendre la parole à tout le monde en même temps.", - "notmuted": "/me [@%%NAME%%] cet utilisateur n'a pas été rendu muet.", - "unmuterank": "/me [@%%NAME%%] Vous ne pouvez pas rendre la parole à un utilisateur avec un rang égal ou supérieur au votre.", - "commandscd": "/me [@%%NAME%%] Le temps d'attente pour les commandes utilisateur ont été ajustées à %%TIME%% secondes.", - "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", - "website": "/me Visitez notre site Internet: %%LINK%%", - "youtube": "/me [%%NAME%%] Abonnez-vous à notre chaîne Youtube: %%LINK%%", - "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." + "swapinvalid": "\/me [@%%NAME%%] Utilisateur invalide. (Pas de nom avec des espaces !)", + "swapwlonly": "\/me [@%%NAME%%] Merci d'intervertir uniquement des utilisateurs dans la file d'attente !", + "swapping": "\/me Echange de %%NAME1%% avec %%NAME2%%.", + "genres": "\/me Merci de consulter les genres de musique permis: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] L'utilisateur n'a pas \u00e9t\u00e9 banni.", + "unmutedeveryone": "\/me [@%%NAME%%] Parole rendue \u00e0 tout le monde.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Uniquement les Gestionnaires peuvent rendre la parole \u00e0 tout le monde en m\u00eame temps.", + "notmuted": "\/me [@%%NAME%%] Cet utilisateur n'a pas \u00e9t\u00e9 rendu muet.", + "unmuterank": "\/me [@%%NAME%%] Vous ne pouvez pas rendre la parole \u00e0 un utilisateur avec un rang \u00e9gal ou sup\u00e9rieur au v\u00f4tre.", + "commandscd": "\/me [@%%NAME%%] Le temps d'attente pour les commandes utilisateur a \u00e9t\u00e9 ajust\u00e9 \u00e0 %%TIME%% secondes.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots : %%WOOT%%, mehs : %%MEHS%%, ratio (w\/m) : %%RATIO%%.", + "website": "\/me Visitez notre site Internet : %%LINK%%", + "youtube": "\/me [%%NAME%%] Abonnez-vous \u00e0 notre cha\u00eene Youtube : %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%% : %%WOOTS%%W\/%%GRABS%%A\/%%MEHS%%M." } \ No newline at end of file diff --git a/lang/langIndex.json b/lang/langIndex.json index 361e158d..5b0a2337 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,5 +1,6 @@ { "english": "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", "portuguese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/pt.json", - "french": "https://rawgit.com/***REMOVED***/basicBot/master/lang/fr.json" + "french": "https://rawgit.com/***REMOVED***/basicBot/master/lang/fr.json", + "turkish": "https://rawgit.com/***REMOVED***/basicBot/master/lang/tr.json" } \ No newline at end of file diff --git a/lang/pt.json b/lang/pt.json index 04f6a4e8..5996425d 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -1,74 +1,60 @@ { - "nodatafound": "Dados anteriores não encontrados.", + "nodatafound": "Dados anteriores n\u00e3o encontrados.", "retrievingdata": "Recuperando dados armazenados anteriormente.", - "datarestored": "Dados armazenados anteriormente recuperados com êxito.", - "greyuser": "Apenas Seguranças ou superiores podem usar o chatbot.", - "bouncer": "O chatbot não pode mover pessoas na fila de espera quando usado por um bouncer.", - "online": "/me %%BOTNAME%% v%%VERSION%% online!", - - + "datarestored": "Dados armazenados anteriormente recuperados com \u00eaxito.", + "greyuser": "Apenas Seguran\u00e7as ou superiores podem usar o bot.", + "bouncer": "O bot n\u00e3o pode mover pessoas na fila de espera quando usado por um bouncer.", + "online": "\/me %%BOTNAME%% v%%VERSION%% online!", "welcome": "Bem vindo(a), %%NAME%%", "welcomeback": "Bem vindo(a) de volta, %%NAME%%", - "songknown": "@%%NAME%%, essa música está no histórico.", - "timelimit": "@%%NAME%%, sua música tem duração maior que %%MAXLENGTH%% minutos. Você precisa de permissão para tocar músicas longas.", - "permissionownsong": "/me :up: @%%NAME%% tem permissão para tocar música de própria autoria!", - "isblacklisted": "/me Essa música está na lista negra %%BLACKLIST%%! Pulando música...", - - - "isopen": "/me A roleta foi iniciada! Use !join para participar!", - "winnerpicked": "/me Um vencedor foi escolhido! @%%NAME%% ganhou a posição %%POSITION%%.", - - "ball": "/me A pergunta de %%NAME%% foi: \"%%QUESTION%%\" e a resposta de %%BOTNAME%% é: \"%%RESPONSE%%\"", - "notghosting": "[%%NAME1%%] %%NAME2%% não virou fantasma.", + "songknown": "@%%NAME%%, essa m\u00fasica est\u00e1 no hist\u00f3rico.", + "timelimit": "@%%NAME%%, sua m\u00fasica tem dura\u00e7\u00e3o maior que %%MAXLENGTH%% minutos. Voc\u00ea precisa ter permiss\u00e3o para tocar m\u00fasicas longas.", + "permissionownsong": "\/me :up: @%%NAME%% tem permiss\u00e3o para tocar m\u00fasica de pr\u00f3pria autoria!", + "isblacklisted": "\/me Essa m\u00fasica est\u00e1 na lista negra %%BLACKLIST%%! Pulando m\u00fasica...", + "isopen": "\/me A roleta foi iniciada! Use !join para participar!", + "winnerpicked": "\/me Um vencedor foi escolhido! @%%NAME%% ganhou a posi\u00e7\u00e3o %%POSITION%%.", + "ball": "\/me A pergunta de %%NAME%% foi: \"%%QUESTION%%\" e a resposta de %%BOTNAME%% \u00e9: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% n\u00e3o virou fantasma.", "ghosting": "[%%NAME1%%] %%NAME2%% deve ter virado fantasma.", - - "alreadyadding": "/me Usuário já está sendo adicionado! Posição desejada alterada para %%POSITION%%.", - "adding": "/me @%%NAME%% foi adicionado à fila. Posição atual: %%POSITION%%.", - - - "usernotfound": "/me Usuário não encontrado.", - "notdisconnected": "/me @%%NAME%% não tem se desconectado durante meu tempo aqui.", - "noposition": "/me Última posição não reconhecida. A fila de espera precisa ser atualizada pelo menos uma vez para registrar posições.", - "toolongago": "/me @%%NAME%%'s desconectou-se a muito tempo atrás: %%TIME%%.", - "valid": "/me @%%NAME%% desconectou-se %%TIME%% atrás e deve ter posição %%POSITION%%.", - - - "warning1": "@%%NAME%%, você esteve inativo por %%TIME%%, responda dentro de 2 minutos ou você será removido da fila de espera.", - "warning2": "@%%NAME%%, você será removido em breve por inatividade se não responder.", - "afkremove": "@%%NAME%%, você foi removido por estar inativo por %%TIME%%. Você teve a posição %%POSITION%%. Use o chat pelo menos uma vez em 1 hora se quiser tocar.", - - + "alreadyadding": "\/me Usu\u00e1rio j\u00e1 est\u00e1 sendo adicionado! Posi\u00e7\u00e3o desejada alterada para %%POSITION%%.", + "adding": "\/me @%%NAME%% foi adicionado \u00e0 fila. Posi\u00e7\u00e3o atual: %%POSITION%%.", + "usernotfound": "\/me Usu\u00e1rio n\u00e3o encontrado.", + "notdisconnected": "\/me @%%NAME%% n\u00e3o tem se desconectado durante meu tempo aqui.", + "noposition": "\/me \u00daltima posi\u00e7\u00e3o n\u00e3o reconhecida. A fila de espera precisa ser atualizada pelo menos uma vez para registrar posi\u00e7\u00f5es.", + "toolongago": "\/me @%%NAME%%'s desconectou-se a muito tempo atr\u00e1s: %%TIME%%.", + "valid": "\/me @%%NAME%% desconectou-se %%TIME%% atr\u00e1s e deve ter posi\u00e7\u00e3o %%POSITION%%.", + "warning1": "@%%NAME%%, voc\u00ea esteve inativo por %%TIME%%, responda dentro de 2 minutos ou voc\u00ea ser\u00e1 removido da fila de espera.", + "warning2": "@%%NAME%%, voc\u00ea ser\u00e1 removido em breve por inatividade se n\u00e3o responder.", + "afkremove": "\/me @%%NAME%%, voc\u00ea foi removido da fila de espera por estar AFK por %%TIME%%. Voc\u00ea esteve na posi\u00e7\u00e3o %%POSITION%%. Use o chat pelo menos a cada %%MAXIMUMAFK%% minutos se quiser tocar uma m\u00fasica.", "caps": "@%%NAME%%, desligue seu capslock, por favor.", - "askskip": "@%%NAME%%, não peça skips.", - "spam": "/me @%%NAME%%, não faça spam, por favor.", - "roomadvertising": "@%%NAME%%, não poste link de outras comunidades, por favor.", - "adfly": "@%%NAME%%, por favor mude seu script autowoot. Nós sugerimos plugCubed: http://plugcubed.net/", - - "validgiftags": "/me [@%%NAME%%] http://media.giphy.com/media/%%ID%%/giphy.gif [Tags: %%TAGS%%]", - "invalidgiftags": "/me [@%%NAME%%] Tag inválida, tente algo diferente. [Tags: %%TAGS%%]", - "validgifrandom": "/me [@%%NAME%%] http://media.giphy.com/media/%%ID%%/giphy.gif [GIF randômica]", - "invalidgifrandom": "/me [@%%NAME%%] Instância inválida, tente novamente.", - - "invalidtime": "/me [@%%NAME%%] Tempo inválido.", - "nouserspecified": "/me [@%%NAME%%] Usuário não especificado.", - "invaliduserspecified": "/me [@%%NAME%%] Usuário inválido.", - "nolistspecified": "/me [@%%NAME%%] Lista não especificada.", - "invalidlistspecified": "/me [@%%NAME%%] Lista inválida.", - "novaliduserspecified": "/me [@%%NAME%%] Usuário especificado não válido.", - "nolimitspecified": "/me [@%%NAME%%] Limite não especificado.", - "invalidlimitspecified": "/me [@%%NAME%%] Limite inválido.", - "invalidpositionspecified": "/me [@%%NAME%%] Posição inválida.", - "whois": "/me [%%NAME1%%] Usuário: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Registro: %%JOINED%%, Nível: %%LEVEL%%, Linguagem: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", - "toggleon": "/me [@%%NAME%%] %%FUNCTION%% ativado.", - "toggleoff": "/me [@%%NAME%%] %%FUNCTION%% desativado.", - "cmddeletion": "remoção de comandos", - "afkremoval": "Remoção de AFK", + "askskip": "@%%NAME%%, n\u00e3o pe\u00e7a skips.", + "spam": "\/me @%%NAME%%, n\u00e3o fa\u00e7a spam, por favor.", + "roomadvertising": "@%%NAME%%, n\u00e3o poste link de outras comunidades, por favor.", + "adfly": "@%%NAME%%, por favor mude seu script autowoot. N\u00f3s sugerimos plugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Tag inv\u00e1lida, tente algo diferente. [Tags: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [GIF rand\u00f4mica]", + "invalidgifrandom": "\/me [@%%NAME%%] Inst\u00e2ncia inv\u00e1lida, tente novamente.", + "invalidtime": "\/me [@%%NAME%%] Tempo inv\u00e1lido.", + "nouserspecified": "\/me [@%%NAME%%] Usu\u00e1rio n\u00e3o especificado.", + "invaliduserspecified": "\/me [@%%NAME%%] Usu\u00e1rio inv\u00e1lido.", + "nolistspecified": "\/me [@%%NAME%%] Lista n\u00e3o especificada.", + "invalidlistspecified": "\/me [@%%NAME%%] Lista inv\u00e1lida.", + "novaliduserspecified": "\/me [@%%NAME%%] Usu\u00e1rio especificado n\u00e3o v\u00e1lido.", + "nolimitspecified": "\/me [@%%NAME%%] Limite n\u00e3o especificado.", + "invalidlimitspecified": "\/me [@%%NAME%%] Limite inv\u00e1lido.", + "invalidpositionspecified": "\/me [@%%NAME%%] Posi\u00e7\u00e3o inv\u00e1lida.", + "whois": "\/me [%%NAME1%%] Usu\u00e1rio: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Registro: %%JOINED%%, N\u00edvel: %%LEVEL%%, Linguagem: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% ativado.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% desativado.", + "cmddeletion": "remo\u00e7\u00e3o de comandos", + "afkremoval": "Remo\u00e7\u00e3o de AFK", "afksremoved": "AFKs removidos", "afklimit": "Limite AFK", "autodisable": "autodisable", "autoskip": "autoskip", - "newblacklisted": "/me [@%%NAME%%] Essa música está na lista negra %%BLACKLIST%%! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", - "blinfo": "[@%%NAME%%] Info da Blacklist - autor: %%AUTHOR%%, título: %%TITLE%%, ID: %%SONGID%%", + "newblacklisted": "\/me [@%%NAME%%] Essa m\u00fasica est\u00e1 na lista negra %%BLACKLIST%%! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Info da Blacklist - autor: %%AUTHOR%%, t\u00edtulo: %%TITLE%%, ID: %%SONGID%%", "blacklist": "blacklist", "cycleguard": "cycleguard", "timeguard": "timeguard", @@ -76,80 +62,80 @@ "historyskip": "historyskip", "lockdown": "lockdown", "lockguard": "lockguard", - "usercommands": "comandos de usuário", + "usercommands": "comandos de usu\u00e1rio", "motd": "MotD", "welcomemsg": "mensagem de boas vindas", - "songstats": "estatísticas de música", - "etarestriction": "restrição de ETA", + "songstats": "estat\u00edsticas de m\u00fasica", + "etarestriction": "restri\u00e7\u00e3o de ETA", "voteskip": "voteskip", - "voteskiplimit": "/me [@%%NAME%%] Limite de voteskip é, no momento, %%LIMIT%% mehs.", - "voteskipexceededlimit": "/me @%%NAME%%, sua música excedeu o limite de (%%LIMIT%% mehs).", - "voteskipinvalidlimit": "/me [@%%NAME%%] Limite de voteskip inválido, por favor, tente novamente usando um número válido para indicar o número de mehs.", - "voteskipsetlimit": "/me [@%%NAME%%] Limite de voteskip definido para %%LIMIT%%.", - "activeusersintime": "/me [@%%NAME%%] %%AMOUNT%% usuários estiveram ativos nos últimos %%TIME%% minutos.", - "maximumafktimeset": "/me [@%%NAME%%] Duração máxima de AFK agora é: %%TIME%% minutos.", - "afkstatusreset": "/me [@%%NAME%%] Status AFK resetado: @%%USERNAME%%.", - "inactivefor": "/me [@%%NAME%%] @%%USERNAME%% esteve inativo por %%TIME%%.", - "inactivelonger": "/me [@%%NAME%%] @%%USERNAME%% esteve inativo por mais tempo que %%BOTNAME%% esteve online.", - "autowoot": "/me Nós recomendamos plugCubed para autowoot: http://plugcubed.net/", - "brandambassador": "/me Um Embaixador de Marca é a voz dos usuários da plug.dj. Eles promovem eventos, ajudam as comunidades e divulgam a plug.dj para todo o mundod. Mais info: https://plug.dj/ba", - "bouncerplusrank": "/me [@%%NAME%%] Você precisa ser Coordenador ou superior para ativar o Bouncer+.", - "chatcleared": "/me [@%%NAME%%] O chat foi limpo.", - "deletechat": "/me [@%%NAME%%] O chat de %%USERNAME%% foi limpo.", - "commandslink": "/me Comandos do %%BOTNAME%%: %%LINK%%", - "eatcookie": "/me ama cookies.", - "nousercookie": "/em Não vejo %%NAME%% na sala. Vou comer esse cookie sozinho.", - "selfcookie": "/me @%%NAME%%, você é mesquinho, né? Dando cookies a si mesmo, bah. Compartilhe um pouco com os outros!", - "cookie": "/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", - "cycleguardtime": "/me [@%%NAME%%] A proteção de ciclo agora é: %%TIME%% minuto(s).", - "dclookuprank": "/me [@%%NAME%%] Somente Seguranças ou superiores podem usar !dclookup em outros usuários.", - "emojilist": "/me Emojis: %%LINK%%", - "notinwaitlist": "@%%NAME%%, você não está na lista de espera.", - "eta": "/me @%%NAME%% você tocará em aproximadamente %%TIME%%.", - "facebook": "/me Curta nossa página no Facebook: %%LINK%%", - "starterhelp": "/me Essa imagem te ajudará a usar e entender o plug.dj: %%LINK%%", - "roulettejoin": "/me @%%NAME%% entrou na roleta! (Use !leave para sair da mesma.)", - "jointime": "/me [@%%NAMEFROM%%] @%%USERNAME%% esteve na sala por %%TIME%%.", - "kickrank": "/me [@%%NAME%%] Você não pode kickar alguém do mesmo rank ou superior!", - "kick": "[@%%NAME%%], @%%USERNAME%% você está sendo kickado da comunidade por %%TIME%% minutos.", - "kill": "/me Desligando...", - "logout": "/me [@%%NAME%%] Deslogando %%BOTNAME%%", - "rouletteleave": "/me @%%NAME%% deixou a roleta!", - "songlink": "/me [@%%NAME%%] Link para a música atual: %%LINK%%", - "usedlockskip": "/me [%%NAME%% usou 'lockskip'.]", - "lockskippos": "/me [@%%NAME%%] Lockskip está agora movendo para a posição %%POSITION%%.", - "lockguardtime": "/me [@%%NAME%%] A proteção de travamento agora é %%TIME%% minuto(s).", - "maxlengthtime": "/me [@%%NAME%%] A duração máxima de tempo agora é %%TIME%% minutos.", - "motdset": "/me Mensagem do Dia: %%MSG%%", - "motdintervalset": "/me Intervalo da Mensagem do Dia: %%INTERVAL%% músicas.", - "addbotwaitlist": "/me @%%NAME%%, não tente me adicionar à fila de espera, por favor.", - "move": "/me [%%NAME%% usou 'move'.]", - "mutednotime": "/me [@%%NAME%%] @%%USERNAME%% mutado.", - "mutedmaxtime": "/me [@%%NAME%%] Você só pode mudar até no máximo %%TIME%% minutos.", - "mutedtime": "/me [@%%NAME%%] @%%USERNAME%% mutado por %%TIME%% minuto(s).", - "unmuted": "/me [@%%NAME%%] @%%USERNAME%% desmutado.", - "muterank": "/me [@%%NAME%%] Você não pode mutar usuários do mesmo nível ou superior.", - "oplist": "/me Lista OP: %%LINK%%", - "pong": "/me Pong!", - "reload": "/me Reiniciando...", - "removenotinwl": "/me [@%%NAME%%] Usuário @%%USERNAME%% não está na fila de espera.", - "roomrules": "/me Encontre as regras da sala aqui: %%LINK%%", - "sessionstats": "/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", - "skip": "/me [%%NAME%% usou 'skip'.]", - "madeby": "/me Este bot foi feito por %%NAME%%.", + "voteskiplimit": "\/me [@%%NAME%%] Limite de voteskip \u00e9, no momento, %%LIMIT%% mehs.", + "voteskipexceededlimit": "\/me @%%NAME%%, sua m\u00fasica excedeu o limite de (%%LIMIT%% mehs).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Limite de voteskip inv\u00e1lido, por favor, tente novamente usando um n\u00famero v\u00e1lido para indicar o n\u00famero de mehs.", + "voteskipsetlimit": "\/me [@%%NAME%%] Limite de voteskip definido para %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] %%AMOUNT%% usu\u00e1rios estiveram ativos nos \u00faltimos %%TIME%% minutos.", + "maximumafktimeset": "\/me [@%%NAME%%] Dura\u00e7\u00e3o m\u00e1xima de AFK agora \u00e9: %%TIME%% minutos.", + "afkstatusreset": "\/me [@%%NAME%%] Status AFK resetado: @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% esteve inativo por %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% esteve inativo por mais tempo que %%BOTNAME%% esteve online.", + "autowoot": "\/me N\u00f3s recomendamos plugCubed para autowoot: http:\/\/plugcubed.net\/", + "brandambassador": "\/me Um Embaixador de Marca \u00e9 a voz dos usu\u00e1rios da plug.dj. Eles promovem eventos, ajudam as comunidades e divulgam a plug.dj para todo o mundo. Mais info: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Voc\u00ea precisa ser Coordenador ou superior para ativar o Bouncer+.", + "chatcleared": "\/me [@%%NAME%%] O chat foi limpo.", + "deletechat": "\/me [@%%NAME%%] O chat de %%USERNAME%% foi limpo.", + "commandslink": "\/me Comandos do %%BOTNAME%%: %%LINK%%", + "eatcookie": "\/me ama cookies.", + "nousercookie": "\/em N\u00e3o vejo %%NAME%% na sala. Vou comer esse cookie sozinho.", + "selfcookie": "\/me @%%NAME%%, voc\u00ea \u00e9 mesquinho, n\u00e9? Dando cookies a si mesmo, bah. Compartilhe um pouco com os outros!", + "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] A prote\u00e7\u00e3o de ciclo agora \u00e9: %%TIME%% minuto(s).", + "dclookuprank": "\/me [@%%NAME%%] Somente Seguran\u00e7as ou superiores podem usar !dclookup em outros usu\u00e1rios.", + "emojilist": "\/me Emojis: %%LINK%%", + "notinwaitlist": "@%%NAME%%, voc\u00ea n\u00e3o est\u00e1 na lista de espera.", + "eta": "\/me @%%NAME%% voc\u00ea tocar\u00e1 em aproximadamente %%TIME%%.", + "facebook": "\/me Curta nossa p\u00e1gina no Facebook: %%LINK%%", + "starterhelp": "\/me Essa imagem te ajudar\u00e1 a usar e entender o plug.dj: %%LINK%%", + "roulettejoin": "\/me @%%NAME%% entrou na roleta! (Use !leave para sair da mesma.)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% esteve na sala por %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] Voc\u00ea n\u00e3o pode kickar algu\u00e9m do mesmo rank ou superior!", + "kick": "[@%%NAME%%], @%%USERNAME%% voc\u00ea est\u00e1 sendo kickado da comunidade por %%TIME%% minutos.", + "kill": "\/me Desligando...", + "logout": "\/me [@%%NAME%%] Deslogando %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% deixou a roleta!", + "songlink": "\/me [@%%NAME%%] Link para a m\u00fasica atual: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% usou 'lockskip'.]", + "lockskippos": "\/me [@%%NAME%%] Lockskip est\u00e1 agora movendo para a posi\u00e7\u00e3o %%POSITION%%.", + "lockguardtime": "\/me [@%%NAME%%] A prote\u00e7\u00e3o de travamento agora \u00e9 %%TIME%% minuto(s).", + "maxlengthtime": "\/me [@%%NAME%%] A dura\u00e7\u00e3o m\u00e1xima de tempo agora \u00e9 %%TIME%% minutos.", + "motdset": "\/me Mensagem do Dia: %%MSG%%", + "motdintervalset": "\/me Intervalo da Mensagem do Dia: %%INTERVAL%% m\u00fasicas.", + "addbotwaitlist": "\/me @%%NAME%%, n\u00e3o tente me adicionar \u00e0 fila de espera, por favor.", + "move": "\/me [%%NAME%% usou 'move'.]", + "mutednotime": "\/me [@%%NAME%%] @%%USERNAME%% mutado.", + "mutedmaxtime": "\/me [@%%NAME%%] Voc\u00ea s\u00f3 pode mudar at\u00e9 no m\u00e1ximo %%TIME%% minutos.", + "mutedtime": "\/me [@%%NAME%%] @%%USERNAME%% mutado por %%TIME%% minuto(s).", + "unmuted": "\/me [@%%NAME%%] @%%USERNAME%% desmutado.", + "muterank": "\/me [@%%NAME%%] Voc\u00ea n\u00e3o pode mutar usu\u00e1rios do mesmo n\u00edvel ou superior.", + "oplist": "\/me Lista OP: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Reiniciando...", + "removenotinwl": "\/me [@%%NAME%%] Usu\u00e1rio @%%USERNAME%% n\u00e3o est\u00e1 na fila de espera.", + "roomrules": "\/me Encontre as regras da sala aqui: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Quantidade total de woots: %%WOOTS%%, mehs: %%MEHS%%, grabs: %%GRABS%%.", + "skip": "\/me [%%NAME%% usou 'skip'.]", + "madeby": "\/me Este bot foi feito por %%NAME%%.", "activefor": "Estive online por %%TIME%%.", - "swapinvalid": "/me [@%%NAME%%] Usuário inválido.", - "swapwlonly": "/me [@%%NAME%%] Use !swap somente com usuários que estão na fila de espera.", - "swapping": "/me Trocando posições: %%NAME1%% com %%NAME2%%.", - "genres": "/me Encontre os gêneros permitidos aqui: %%LINK%%", - "notbanned": "/me [@%%NAME%%] Usuário mencionado não foi banido.", - "unmutedeveryone": "/me [@%%NAME%%] Todos foram desmutados.", - "unmuteeveryonerank": "/me [@%%NAME%%] Somente Coordenadores podem desmutar todos os usuários de uma vez.", - "notmuted": "/me [@%%NAME%%] Usuário mencionado não foi mutado.", - "unmuterank": "/me [@%%NAME%%] Você não pode desmutar usuários do mesmo rank ou superior.", - "commandscd": "/me [@%%NAME%%] O tempo de espera de comandos para usuários agora é %%TIME%% segundos.", - "voteratio": "/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w/m): %%RATIO%%.", - "website": "/me Visite nosso site: %%LINK%%", - "youtube": "/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", - "songstatistics": "/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W/%%GRABS%%G/%%MEHS%%M." -} + "swapinvalid": "\/me [@%%NAME%%] Usu\u00e1rio inv\u00e1lido.", + "swapwlonly": "\/me [@%%NAME%%] Use !swap somente com usu\u00e1rios que est\u00e3o na fila de espera.", + "swapping": "\/me Trocando posi\u00e7\u00f5es: %%NAME1%% com %%NAME2%%.", + "genres": "\/me Encontre os g\u00eaneros permitidos aqui: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] Usu\u00e1rio mencionado n\u00e3o foi banido.", + "unmutedeveryone": "\/me [@%%NAME%%] Todos foram desmutados.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Somente Coordenadores podem desmutar todos os usu\u00e1rios de uma vez.", + "notmuted": "\/me [@%%NAME%%] Usu\u00e1rio mencionado n\u00e3o foi mutado.", + "unmuterank": "\/me [@%%NAME%%] Voc\u00ea n\u00e3o pode desmutar usu\u00e1rios do mesmo rank ou superior.", + "commandscd": "\/me [@%%NAME%%] O tempo de espera de comandos para usu\u00e1rios agora \u00e9 %%TIME%% segundos.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, taxa\/propor\u00e7\u00e3o (w\/m): %%RATIO%%.", + "website": "\/me Visite nosso site: %%LINK%%", + "youtube": "\/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file diff --git a/lang/tr.json b/lang/tr.json new file mode 100644 index 00000000..64d01982 --- /dev/null +++ b/lang/tr.json @@ -0,0 +1,141 @@ +{ + "nodatafound": "Veriler bulunamadi.", + "retrievingdata": "Yedeklenen veriler aliniyor.", + "datarestored": "Yedeklenen verielr basariyla alindi.", + "greyuser": "Botu sadece yetkililer calistirabilir.", + "bouncer": "Bouncer yetkisinde olanlar botu calistirabilir.", + "online": "\/me %%BOTNAME%% v%%VERSION%% acildi!", + "welcome": "\/me Hosgeldin %%NAME%%", + "welcomeback": "\/me Yeniden hosgeldin, %%NAME%%", + "songknown": "\/me @%%NAME%%, Actiginiz sarki daha onecen calindi.", + "timelimit": "\/me @%%NAME%%, Sarkiniz %%MAXLENGTH%% dakikadan uzun, daha uzun sarki calmak icin yetki gerekiyor.", + "permissionownsong": "\/me :up: @%%NAME%% sarkiyi oynatman icin yetkin var.", + "isblacklisted": "\/me Sarki %%BLACKLIST%% yasak listesinde! Geciliyor...", + "isopen": "\/me Rulet artik acik! Kullanim: Sohbete !join yazin.!", + "winnerpicked": "\/me Sanslisiniz! @%%NAME%% yeni dj siran %%POSITION%%.", + "ball": "\/me %%NAME%%'in sorusu var: \\\"%%QUESTION%%\\\" ve %%BOTNAME%%'in cevabi ise: \\\"%%RESPONSE%%\\\"", + "notghosting": "[%%NAME1%%] %%NAME2%% gizlenmiyor.", + "ghosting": "[%%NAME1%%] %%NAME2%% gizleniyor.", + "alreadyadding": "\/me Kullanici zaten eklendi! Konum degistirildi %%POSITION%%.", + "adding": "\/me @%%NAME%% siraya eklendin. Siran: %%POSITION%%.", + "usernotfound": "\/me Kullanici bulunamadi.", + "notdisconnected": "\/me @%%NAME%% durmadan sarki calmaya devam ediyor.", + "noposition": "\/me Son pozisyonda degilsiniz,Dj listesi guncellenmesi icin biraz bekleyin.", + "toolongago": "\/me @%%NAME%% cikti(ayrildi) Ne zaman: %%TIME%%.", + "valid": "\/me @%%NAME%% cikti. %%TIME%% once buradaydi.Konumu ise %%POSITION%%.", + "warning1": "\/me @%%NAME%%, %%TIME%% afk, 2 dakika icinde yanit gelmesse dj listesinden silinecektir.", + "warning2": "\/me @%%NAME%%, cevap vermedigin takdirde yakinda dj listesinden silineceksin.", + "afkremove": "\/me @%%NAME%%, %%TIME%% afk oldugun icin silindin. Senin konumun %%POSITION%% idi. Bu sarkiyi calmak istiyorsaniz en az %%MAXIMUMAFK%% dakikada bir sohbet edin.", + "caps": "\/me @%%NAME%%, lutfen CAPSLOCK tusunu kapatin.", + "askskip": "\/me @%%NAME%%, neden gecildigini sormayin.", + "spam": "\/me @%%NAME%%, lutfen spam yapmayin.", + "roomadvertising": "\/me @%%NAME%%, diger odalarin reklamini yapmayin.", + "adfly": "\/me @%%NAME%%, lutfen otowootunuzu degistirin. Onerilen: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Etiketler: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] gecersiz etiketler, baska etiket deneyin. [Etiketler: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Rastgele GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] gecersiz istek, tekrar deneyin.", + "invalidtime": "\/me [@%%NAME%%] gecersiz zaman yazildi.", + "nouserspecified": "\/me [@%%NAME%%] kullanici belirtilmedi.", + "invaliduserspecified": "\/me [@%%NAME%%] gecersiz kullanici yazildi.", + "nolistspecified": "\/me [@%%NAME%%] liste bulunamadi.", + "invalidlistspecified": "\/me [@%%NAME%%] gecersiz liste yazdiniz.", + "novaliduserspecified": "\/me [@%%NAME%%] gecerli kullanici belirtilmedi.", + "nolimitspecified": "\/me [@%%NAME%%] limit yok.", + "invalidlimitspecified": "\/me [@%%NAME%%] gecersiz limit yazildi.", + "invalidpositionspecified": "\/me [@%%NAME%%] gecersiz konum belirtilmis.", + "whois": "\/me [%%NAME1%%] Isim: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Katilim: %%JOINED%%, Level: %%LEVEL%%, Dil: %%LANGUAGE%%, Avatar: %%AVATAR%%, Istatistik: %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% acildi.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% kapatildi.", + "cmddeletion": "komut silme", + "afkremoval": "AFK kaldirma", + "afksremoved": "AFK kaldirildi", + "afklimit": "AFK siniri", + "autodisable": "otokapa", + "autoskip": "otogec", + "newblacklisted": "\/me [@%%NAME%%] Sarkiniz %%BLACKLIST%% yasakli listede! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Yasakliste Bilgi - Sarki: %%AUTHOR%%, isim: %%TITLE%%, sarkiID: %%SONGID%%", + "blacklist": "yasakliliste", + "cycleguard": "cylkoru", + "timeguard": "zamankoruma", + "chatfilter": "sohbetfilter", + "historyskip": "eskigec", + "lockdown": "kilitdo", + "lockguard": "kilitkoru", + "usercommands": "kullanicikomut", + "motd": "Duyuru", + "welcomemsg": "hosgeldin mesaji", + "songstats": "sarki istatistikleri", + "etarestriction": "eta kisaltma", + "voteskip": "oylagecme", + "voteskiplimit": "\/me [@%%NAME%%] Oto gecme limiti %%LIMIT%% meh.", + "voteskipexceededlimit": "\/me @%%NAME%%, sarki otogecme sinirini asti. (%%LIMIT%% meh).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] gecersiz otogecme limiti,meh sayisini duzgun yazin.", + "voteskipsetlimit": "\/me [@%%NAME%%] Otogecme limiti ayarlandi: %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%% Son %%TIME%% dakika icinde %%AMOUNT%% kullanici aktifti.", + "maximumafktimeset": "\/me [@%%NAME%%] Maksimum AFK suersi %%TIME%% dakika.", + "afkstatusreset": "\/me [@%%NAME%%] simdi @%%USERNAME%% kullanicinin AFK durumunu resetledi.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% %%TIME%% boyunca aktif oldu.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% uzun zamandir aktif olmadi. %%BOTNAME%% acik.", + "autowoot": "\/me Otomatik woot icin tavsiye: http:\/\/plugcubed.net\/", + "brandambassador": "\/me BA hakkinda bilgi almak icin lutfen bu linke gidin, iyi gunler: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Manager veya Bouncer+ yetkin olmasi gerekiyor.", + "chatcleared": "\/me [@%%NAME%%] sohbeti temizledi.", + "deletechat": "\/me [@%%NAME%%] simdi %%USERNAME%% kullanicinin sohbetini temizledi.", + "commandslink": "\/me %%BOTNAME%% Komutlar: %%LINK%%", + "eatcookie": "\/me Cerezler.", + "nousercookie": "\/em Odada %%NAME%% gozukmuyor.", + "selfcookie": "\/me @%%NAME%%, sen biraz ac gozlusun sanirsam, lutfen diger kullanicilarla cerezlerini paylas!", + "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] CYCLguard %%TIME%% dakika(lar) olarak ayarlandi.", + "dclookuprank": "\/me [@%%NAME%%] Sadece yukaridaki kullanicilar icin arama yapabilirsiniz.", + "emojilist": "\/me Gulucuk Listesi: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, dj sirasinda ekli degilsin.", + "eta": "\/me @%%NAME%% yaklasik olarak %%TIME%% 1 standina ulasicak.", + "facebook": "\/me Facebook sayfamizi ziyaret edin: %%LINK%%", + "starterhelp": "\/me Yeni basladiysaniz bir goz atin: %%LINK%%", + "roulettejoin": "\/me @%%NAME%% rouletteye katildin! (Cikamk icin sohbete !leave yazin.)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% yaklasik %%TIME%% odada.", + "kickrank": "\/me [@%%NAME%%] sen diger yetkilileri odadan atamazsin.", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% odadan %%TIME%% dakikaligina atildi.", + "kill": "\/me Bot kapaniyor.", + "logout": "\/me [@%%NAME%%] Botu kapatti: %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% ruletten ayrildi!", + "songlink": "\/me [@%%NAME%%] Calan sarki: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% otogecme kullanildi.]", + "lockskippos": "\/me [@%%NAME%%] Kilitgecme simdi %%POSITION%% pozisyona gecirecektir.", + "lockguardtime": "\/me [@%%NAME%%] Kilitkoruma %%TIME%% dakika(lar).", + "maxlengthtime": "\/me [@%%NAME%%] Maksimum sarki uzunlugu %%TIME%% dakikadir.", + "motdset": "\/me Duyuru ayarlandi: %%MSG%%", + "motdintervalset": "\/me Duyuru araligi %%INTERVAL%%.", + "addbotwaitlist": "\/me @%%NAME%%, lutfen beni dj listesine eklemeyin.", + "move": "\/me [%%NAME%% tasindi.]", + "mutednotime": "\/me [@%%NAME%%] artik @%%USERNAME%% susturuldu.", + "mutedmaxtime": "\/me [@%%NAME%%] Sadece %%TIME%% dakika susturabilirsiniz.", + "mutedtime": "\/me [@%%NAME%%] artik @%%USERNAME%% kullanicisini %%TIME%% dakika susturdu.", + "unmuted": "\/me [@%%NAME%%] artik @%%USERNAME%% kullanicisinin konusmasina izin verdi.", + "muterank": "\/me [@%%NAME%%] yuksek rutbeli kisileri susturamazsiniz.", + "oplist": "\/me OP listesi: %%LINK%%", + "pong": "\/me Yavrum!", + "reload": "\/me Geri donecegim.", + "removenotinwl": "\/me [@%%NAME%%] artik @%%USERNAME%% kullaniciyi dj listesinden kaldirdi.", + "roomrules": "\/me Lutfen oda kurallarini okuyun: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Toplam WOOT: %%WOOTS%%, Toplam MEH: %%MEHS%%, TOPLAM GRAB: %%GRABS%%.", + "skip": "\/me [%%NAME%% atladi.]", + "madeby": "\/me Bu bot %%NAME%% tarafindan yapildi.", + "activefor": "Ben %%TIME%% arayla afk oldum.", + "swapinvalid": "\/me [@%%NAME%%] gecersiz kullanici.", + "swapwlonly": "\/me [@%%NAME%%] DJ listesindeki kullanici takas icin memnun.", + "swapping": "\/me Yer degistirme, %%NAME1%% ile %%NAME2%% arasinda oldu.", + "genres": "\/me Musade edilen oda turleri: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] zaten banli degil.", + "unmutedeveryone": "\/me [@%%NAME%%] artik herkes konusabilir.", + "unmuteeveryonerank": "\/me [@%%NAME%%] sadece yoneticiler ve yetkililer yazabilir.", + "notmuted": "\/me [@%%NAME%%] susturulmamis.", + "unmuterank": "\/me [@%%NAME%%] siz yetkililer susturamazsiniz.", + "commandscd": "\/me [@%%NAME%%] Kullanicilar icin komut kullanimi geri sayimi %%TIME%% saniye.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ WOOT: %%WOOT%%, MEH: %%MEHS%%, ORAN (W\/M): %%RATIO%%.", + "website": "\/me Sitemizi ziyaret edin: %%LINK%%", + "youtube": "\/me [%%NAME%%] Youtube kanalimiza abone olun: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file From 8cd673e938d236bc14a70b4791c37157eb489e70 Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 5 May 2015 19:23:23 +0100 Subject: [PATCH 106/281] Updated Links --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 981ab6e5..147adb63 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ basicBot A not so basic bot for plug.dj -[GET THE GOOGLE CHROME EXTENSION HERE!!!](http://s.bnzi.uk/bscbtxtnsn) +[GET THE GOOGLE CHROME EXTENSION HERE!!!](http://s.benzi.io/bscbtxtnsn) --------------------------------------------------------------------- -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/***REMOVED***/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.bnzi.uk/97dW.svg)](https://facebook.com/groups/basicBot) [![twitter](http://i.bnzi.uk/4KEn.svg)](https://twitter.com/bscBt) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/***REMOVED***/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.benzi.io/97dW.svg)](https://facebook.com/groups/basicBot) [![twitter](http://i.benzi.io/4KEn.svg)](https://twitter.com/bscBt) Stay updated on **basicBot**'s development by following the project on Twitter [@bscBt](http://twitter.com/bscBt) From bb9e638baa5c80c932c81309a06f8e98c5d91171 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 6 May 2015 00:08:51 +0100 Subject: [PATCH 107/281] Added Serbian translations --- lang/langIndex.json | 3 +- lang/sr.json | 141 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 lang/sr.json diff --git a/lang/langIndex.json b/lang/langIndex.json index 5b0a2337..cde43cf3 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -2,5 +2,6 @@ "english": "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", "portuguese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/pt.json", "french": "https://rawgit.com/***REMOVED***/basicBot/master/lang/fr.json", - "turkish": "https://rawgit.com/***REMOVED***/basicBot/master/lang/tr.json" + "turkish": "https://rawgit.com/***REMOVED***/basicBot/master/lang/tr.json", + "serbian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/sr.json" } \ No newline at end of file diff --git a/lang/sr.json b/lang/sr.json new file mode 100644 index 00000000..f36f2700 --- /dev/null +++ b/lang/sr.json @@ -0,0 +1,141 @@ +{ + "nodatafound": "Prethodni podaci nisu prona\u0111eni.", + "retrievingdata": "Preuzimanje prethodno sa\u010duvani podataka.", + "datarestored": "Prethodno sa\u010duvani podaci uspije\u0161no preuzeti.", + "greyuser": "Samo bounceri i vi\u0161i rank mogu pokrenuti bota.", + "bouncer": "Bot ne mo\u017ee premjestati ljude ukoliko je pokrenut od strane bouncera.", + "online": "\/me %%BOTNAME%% %%VERSION%% online!", + "welcome": "\/me Dobrodo\u0161ao %%NAME%%", + "welcomeback": "\/me Dobrodo\u0161ao nazad, %%NAME%%", + "songknown": "\/me @%%NAME%%, Ova pjesma je u history.", + "timelimit": "\/me @%%NAME%%, Tvoja pjesma je duza od %%MAXLENGTH%% minuta, potrebna ti je dozvola da pustas duze pjesme.", + "permissionownsong": "\/me :up: @%%NAME%% ima dozvolu da pu\u0161ta svoju vlastitu pjesmu.", + "isblacklisted": "\/me Ova pjesma je na %%BLACKLIST%% blacklisti! Prebacujem....", + "isopen": "\/me Rulet je pokrenut! Pi\u0161i !join da u\u010destvujes.", + "winnerpicked": "\/me Pobjednik je odabran! @%%NAME%% na poziciju %%POSITION%%.", + "ball": "\/me %%NAME%% je pitao: \"%%QUESTION%%\" i %%BOTNAME%% odgovara: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% nije zabagovan.", + "ghosting": "[%%NAME1%%] %%NAME2%% je zabagovan ili nije tu.", + "alreadyadding": "\/me Korisnik je ve\u0107 dodan! Promjenjena \u017eeljena pozicija na %%POSITION%%.", + "adding": "\/me Dodan @%%NAME%% u red. Trenutna pozicija %%POSITION%%.", + "usernotfound": "\/me Korisnik nije prona\u0111en.", + "notdisconnected": "\/me @%%NAME%% se nije diskonektovao tokom mog boravka ovdje.", + "noposition": "\/me Zadnja pozicija nepoznata. Listu cekanja treba a\u017eurirati najmanje jednom da bi se registrovala zadnja pozicija korisnika.", + "toolongago": "\/me @%%NAME%% zadnji diskonekt (DC ili leave) je bio davno: %%TIME%%.", + "valid": "\/me @%%NAME%% se diskonektovao prije %%TIME%% i trebao bi biti na poziciji %%POSITION%%.", + "warning1": "\/me @%%NAME%%, ti si afk%%TIME%%, molim odgovori u roku od 2 min ili \u010de\u0161 biti uklonjen sa liste \u010dekanja.", + "warning2": "\/me @%%NAME%%, uskoro \u010de\u0161 biti uklonjen sa liste zbog afk ukoliko ne odgovori\u0161.", + "afkremove": "\/me @%%NAME%%, izba\u010den si sa liste \u010dekanja zbog afk %%TIME%%. Bio si na poziciji %%POSITION%%. Pi\u0161i bar svako %%MAXIMUMAFK%% minuta ako zelis da pu\u0161ta\u0161 pjesme.", + "caps": "\/me @%%NAME%%, isklju\u010di caps, molim.", + "askskip": "\/me @%%NAME%%, ne tra\u017ei skip.", + "spam": "\/me @%%NAME%%, molim, ne spamaj.", + "roomadvertising": "\/me @%%NAME%%, ne postavljaj linkove drugih soba.", + "adfly": "\/me @%%NAME%%, promjeni tvoj autowoot program. Mi preporu\u010dujemo PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Oznaka: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Pogre\u0161na oznaka, poku\u0161aj ne\u0161to drugo. [Oznaka: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Slu\u010dajno odabran GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] Neva\u017ee\u0107i zahtjev, poku\u0161ajte ponovo.", + "invalidtime": "\/me [@%%NAME%%] Navedeno vrijeme pogre\u0161no.", + "nouserspecified": "\/me [@%%NAME%%] Korisnik nije naveden.", + "invaliduserspecified": "\/me [@%%NAME%%] Navedeni korisnik pogre\u0161an", + "nolistspecified": "\/me [@%%NAME%%] Navedena lista ne postoji.", + "invalidlistspecified": "\/me [@%%NAME%%] Navedena lista pogre\u0161na.", + "novaliduserspecified": "\/me [@%%NAME%%] Navedeni korisnik nije va\u017ee\u0107i.", + "nolimitspecified": "\/me [@%%NAME%%] Limit nije naveden.", + "invalidlimitspecified": "\/me [@%%NAME%%] Pogre\u0161an limit.", + "invalidpositionspecified": "\/me [@%%NAME%%] Navedna pozicija pogre\u0161na.", + "whois": "\/me [%%NAME1%%] Korisni\u010dko Ime: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Pridru\u017eio se: %%JOINED%%, Level: %%LEVEL%%, Jezik: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% uklju\u010deno.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% isklju\u010deno.", + "cmddeletion": "komanda brisanja", + "afkremoval": "AFK uklanjanje", + "afksremoved": "AFK uklonjeno", + "afklimit": "AFK limit", + "autodisable": "autoisklju\u010divanje", + "autoskip": "autoprebacivanje", + "newblacklisted": "\/me [@%%NAME%%] Ova pjesma se nalazi na %%BLACKLIST%% blacklisti! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Blacklista Informacije - autor: %%AUTHOR%%, nalosv: %%TITLE%%, ID: %%SONGID%%", + "blacklist": "blacklista", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "chatfilter", + "historyskip": "historyprebacivanje", + "lockdown": "zakljucavanje", + "lockguard": "lockguard", + "usercommands": "komande korisnika", + "motd": "PorukaDana", + "welcomemsg": "poruka dobrodo\u0161lice", + "songstats": "statistika pjesme", + "etarestriction": "eta ograni\u010denje", + "voteskip": "glasaj skip", + "voteskiplimit": "\/me [@%%NAME%%] GlasajSkip trenutno pode\u0161en na %%LIMIT%% mehova.", + "voteskipexceededlimit": "\/me @%%NAME%%, tvoja pjesma je prekora\u010dila GlasajSkip limit (%%LIMIT%% mehova).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Pogre\u0161an GlasajSkip limit, molim poku\u0161aj ponovo koriste\u0107i brojeve koje odgovaraju broju mehova.", + "voteskipsetlimit": "\/me [@%%NAME%%] GlasajSkip limit pode\u0161en na %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%% Ve\u010d je bilo %%AMOUNT%% aktivnih korisnika u zadnjih %%TIME%% minuta.", + "maximumafktimeset": "\/me [@%%NAME%%] Maksimalno AFK trajanje pode\u0161eno na %%TIME%% minuta.", + "afkstatusreset": "\/me [@%%NAME%%] Je resetovao Afk status od @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% je neaktivan ve\u0107 %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% je neaktivan du\u017ee nego sto je %%BOTNAME%% online.", + "autowoot": "\/me Mi preporu\u010dujemo PlugCubed za automatsko glasanje: http:\/\/plugcubed.net\/", + "brandambassador": "\/me Brand Ambassador je glas plug.dj korisnika. Oni promoviraju doga\u0111aje, spajaju zajednicu i dijele poruke plug.dj-a \u0161irom svijeta. Za vi\u0161e informacija: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Moras biti Mena\u0111er ili vi\u0161i rank da bi uklju\u010dio Bouncer+.", + "chatcleared": "\/me [@%%NAME%%] Je o\u010distio chat.", + "deletechat": "\/me [@%%NAME%%] Je o\u010distio chat od %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% komande: %%LINK%%", + "eatcookie": "\/me jede kola\u010d.", + "nousercookie": "\/em ne vidi %%NAME%% u sobi i uzima kola\u010d samo za sebe.", + "selfcookie": "\/me @%%NAME%%, malo si \u0161krt, zar ne? Dajes kola\u010de sebi, bah. Podijeli malo i sa ostalima!", + "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] CycleGuard pode\u0161en na %%TIME%% minuta.", + "dclookuprank": "\/me [@%%NAME%%] Samo bounceri i vi\u0161i rank mogu dclookup za ostale.", + "emojilist": "\/me Emoji lista: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, nisi na listi \u010dekanja.", + "eta": "\/me @%%NAME%% do\u0107i ces na red za otprilike %%TIME%%.", + "facebook": "\/me Lajkuj nas na facebook-u: %%LINK%%", + "starterhelp": "\/me Ova slika ce ti pomo\u0107i za po\u010detak: %%LINK%%", + "roulettejoin": "\/me @%%NAME%% se pridru\u017eio ruletu! (!leave ako zelis da napusti\u0161.)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% je bio u sobi ve\u0107%%TIME%%.", + "kickrank": "\/me [@%%NAME%%] Ne mo\u017ee\u0161 izbacit korisnike sa istim ili vi\u0161im rankom od tebe!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% Izba\u010den si iz zajednice na %%TIME%% minuta.", + "kill": "\/me Isklju\u010divanje.", + "logout": "\/me [@%%NAME%%] Odjavljujem se %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% je napustio rulet!", + "songlink": "\/me [@%%NAME%%] Link do trenutne pjesme: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% je koristio LockSkip.]", + "lockskippos": "\/me [@%%NAME%%] Lockskip \u0107e sada premjestiti korisnika na poziciju %%POSITION%%.", + "lockguardtime": "\/me [@%%NAME%%] Lockguard pode\u0161en na %%TIME%% minuta.", + "maxlengthtime": "\/me [@%%NAME%%] Maksimalno trajanje pjesme pode\u0161eno na %%TIME%% minuta.", + "motdset": "\/me Poruka Dana pode\u0161ena na: %%MSG%%", + "motdintervalset": "\/me Interval Poruke dana pode\u0161en na %%INTERVAL%%.", + "addbotwaitlist": "\/me @%%NAME%%, nemoj da me dodaje\u0161 na listu \u010dekanja, molim.", + "move": "\/me [%%NAME%% je koristio premje\u0161tanje.]", + "mutednotime": "\/me [@%%NAME%%] Je mutovano@%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Mo\u017ee\u0161 mute maksimalno %%TIME%% minuta.", + "mutedtime": "\/me [@%%NAME%%] Je mutovao @%%USERNAME%% na %%TIME%% minuta.", + "unmuted": "\/me [@%%NAME%%] Je unmutovao @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] Ne mo\u017ee\u0161 mute osobu sa istim ili ve\u0107im rankom od tebe.", + "oplist": "\/me OP lista: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Vra\u0107am se ubrzo.", + "removenotinwl": "\/me [@%%NAME%%] Navedeni korisnik @%%USERNAME%% nije na listi \u010dekanja.", + "roomrules": "\/me Pravila sobe mozes prona\u0107i ovdje: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Ukupno woot-ova: %%WOOTS%%, Ukupno meh-ova: %%MEHS%%, Ukupno dohva\u0107eno: %%GRABS%%.", + "skip": "\/me [%%NAME%% je koristio prebacivanje.]", + "madeby": "\/me Ovog bot-a je napravio %%NAME%%.", + "activefor": "Ja sam ve\u0107 aktivan %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Navedeni korisnik nije prona\u0111en. (Imena sa razmacima!)", + "swapwlonly": "\/me [@%%NAME%%] Molim zamjeni samo korisnike koji su na listi \u010dekanja!", + "swapping": "\/me Zamjennjujem %%NAME1%% sa %%NAME2%%.", + "genres": "\/me Dozvoljene \u017eanrove za ovu sobu mo\u017ee\u0161 prona\u0107i ovdje: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] Korisnik nije isklju\u010den.", + "unmutedeveryone": "\/me [@%%NAME%%] Je unmutovao sve.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Samo mena\u0111eri i vi\u0161i rank mogu unmutovati sve odjednom.", + "notmuted": "\/me [@%%NAME%%] taj korisnik nije mutovan.", + "unmuterank": "\/me [@%%NAME%%] Ne mo\u017ees unmutovati osobu sa istim ili ve\u0107im rankom od tebe.", + "commandscd": "\/me [@%%NAME%%] Razmak izme\u0111u komandi za korisnike pode\u0161en na %%TIME%% sekundi.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Wotovi: %%WOOT%%, Mehovi: %%MEHS%%, Razmjer(w\/m): %%RATIO%%.", + "website": "\/me Molimo posjetite nasu web stranicu: %%LINK%%", + "youtube": "\/me [%%NAME%%] Pretplatite se na na\u0161 YouTube kanal: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file From c8f6afeeaa319f6917c21e48ba6747ba5a6d7fec Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 6 May 2015 01:45:04 +0100 Subject: [PATCH 108/281] Added !language command Specify the language you would like basicBot to use with !language --- basicBot.js | 27 +++++++++++++++++++++++++++ commands.md | 1 + lang/en.json | 3 +++ lang/fr.json | 3 +++ lang/pt.json | 3 +++ lang/sr.json | 5 ++++- lang/tr.json | 3 +++ 7 files changed, 44 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 8e7d9339..a66c96ae 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2257,6 +2257,33 @@ } }, + languageCommand: { + command: 'language', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); + var argument = msg.substring(cmd.length + 1); + + $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { + var langIndex = json; + var link = langIndex[argument.toLowerCase()]; + if (typeof link === "undefined") { + API.sendChat(subChat(basicBot.chat.langerror, {link: "http://git.io/vJ9nI"})); + } + else { + basicBot.settings.language = argument; + API.sendChat(subChat(basicBot.chat.langset, {language: basicBot.settings.language})); + } + }); + } + } + }, + leaveCommand: { command: 'leave', rank: 'user', diff --git a/commands.md b/commands.md index 40bde83f..abfce9e6 100644 --- a/commands.md +++ b/commands.md @@ -14,6 +14,7 @@ Manager |!clearchat | |clears the chat | |!cycle | | toggle DJ cycle | |!cycletimer | X | set the maximum DJ cycle time for when cycleguard is enabled | +|!language | (language) | specify the language you would like the bot to use | |!locktimer | X | set the maximum time the waitlist can be locked if lockguard is enabled | |!logout | | logs out account bot is hosted on | |!refresh | | refreshes the browser of whoever runs the bot | diff --git a/lang/en.json b/lang/en.json index a415ff88..bdd9d257 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1,5 +1,8 @@ { "nodatafound": "No previous data found.", + "currentlang": "\/me Language currently set to: %%LANGUAGE%%", + "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", + "langset": "\/me Language now set to: %%LANGUAGE%%", "retrievingdata": "Retrieving previously stored data.", "datarestored": "Previously stored data successfully retrieved.", "greyuser": "Only bouncers and up can run a bot.", diff --git a/lang/fr.json b/lang/fr.json index bbb4266c..7c921004 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -1,5 +1,8 @@ { "nodatafound": "Aucune donn\u00e9e trouv\u00e9e.", + "currentlang": "\/me Language currently set to: %%LANGUAGE%%", + "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", + "langset": "\/me Language now set to: %%LANGUAGE%%", "retrievingdata": "R\u00e9cup\u00e9ration des donn\u00e9es.", "datarestored": "Succ\u00e8s de la r\u00e9cup\u00e9ration des donn\u00e9s.", "greyuser": "Uniquement les Videurs et les rangs sup\u00e9rieurs peuvent lancer le bot.", diff --git a/lang/pt.json b/lang/pt.json index 5996425d..2953712c 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -1,5 +1,8 @@ { "nodatafound": "Dados anteriores n\u00e3o encontrados.", + "currentlang": "\/me Language currently set to: %%LANGUAGE%%", + "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", + "langset": "\/me Language now set to: %%LANGUAGE%%", "retrievingdata": "Recuperando dados armazenados anteriormente.", "datarestored": "Dados armazenados anteriormente recuperados com \u00eaxito.", "greyuser": "Apenas Seguran\u00e7as ou superiores podem usar o bot.", diff --git a/lang/sr.json b/lang/sr.json index f36f2700..37b6b515 100644 --- a/lang/sr.json +++ b/lang/sr.json @@ -1,5 +1,8 @@ { "nodatafound": "Prethodni podaci nisu prona\u0111eni.", + "currentlang": "\/me Language currently set to: %%LANGUAGE%%", + "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", + "langset": "\/me Language now set to: %%LANGUAGE%%", "retrievingdata": "Preuzimanje prethodno sa\u010duvani podataka.", "datarestored": "Prethodno sa\u010duvani podaci uspije\u0161no preuzeti.", "greyuser": "Samo bounceri i vi\u0161i rank mogu pokrenuti bota.", @@ -23,7 +26,7 @@ "noposition": "\/me Zadnja pozicija nepoznata. Listu cekanja treba a\u017eurirati najmanje jednom da bi se registrovala zadnja pozicija korisnika.", "toolongago": "\/me @%%NAME%% zadnji diskonekt (DC ili leave) je bio davno: %%TIME%%.", "valid": "\/me @%%NAME%% se diskonektovao prije %%TIME%% i trebao bi biti na poziciji %%POSITION%%.", - "warning1": "\/me @%%NAME%%, ti si afk%%TIME%%, molim odgovori u roku od 2 min ili \u010de\u0161 biti uklonjen sa liste \u010dekanja.", + "warning1": "\/me @%%NAME%%, ti si afk %%TIME%%, molim odgovori u roku od 2 min ili \u010de\u0161 biti uklonjen sa liste \u010dekanja.", "warning2": "\/me @%%NAME%%, uskoro \u010de\u0161 biti uklonjen sa liste zbog afk ukoliko ne odgovori\u0161.", "afkremove": "\/me @%%NAME%%, izba\u010den si sa liste \u010dekanja zbog afk %%TIME%%. Bio si na poziciji %%POSITION%%. Pi\u0161i bar svako %%MAXIMUMAFK%% minuta ako zelis da pu\u0161ta\u0161 pjesme.", "caps": "\/me @%%NAME%%, isklju\u010di caps, molim.", diff --git a/lang/tr.json b/lang/tr.json index 64d01982..93f8bbc4 100644 --- a/lang/tr.json +++ b/lang/tr.json @@ -1,5 +1,8 @@ { "nodatafound": "Veriler bulunamadi.", + "currentlang": "\/me Language currently set to: %%LANGUAGE%%", + "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", + "langset": "\/me Language now set to: %%LANGUAGE%%", "retrievingdata": "Yedeklenen veriler aliniyor.", "datarestored": "Yedeklenen verielr basariyla alindi.", "greyuser": "Botu sadece yetkililer calistirabilir.", From 7e8e851b5b9d9e0946aa7d681e8a051439d56e30 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 6 May 2015 02:13:15 +0100 Subject: [PATCH 109/281] Call loadChat function after setting new language --- basicBot.js | 1 + 1 file changed, 1 insertion(+) diff --git a/basicBot.js b/basicBot.js index a66c96ae..9ee7dfc4 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2277,6 +2277,7 @@ } else { basicBot.settings.language = argument; + loadChat(); API.sendChat(subChat(basicBot.chat.langset, {language: basicBot.settings.language})); } }); From c250c4f68b717c4dc6475461249bfa2ea6f6a809 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 6 May 2015 02:41:55 +0100 Subject: [PATCH 110/281] Update pt.json --- lang/pt.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/pt.json b/lang/pt.json index 2953712c..c123b7a0 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -1,8 +1,8 @@ { "nodatafound": "Dados anteriores n\u00e3o encontrados.", - "currentlang": "\/me Language currently set to: %%LANGUAGE%%", - "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", - "langset": "\/me Language now set to: %%LANGUAGE%%", + "currentlang": "\/me Idioma definido: %%LANGUAGE%%", + "langerror": "\/me O idioma que voc\u00ea selecionou n\u00e3o est\u00e1 dispon\u00edvel. Por favor, visite %%LINK%% para encontrar uma lista de idiomas dispon\u00edveis.", + "langset": "\/me Idioma definido para: %%LANGUAGE%%", "retrievingdata": "Recuperando dados armazenados anteriormente.", "datarestored": "Dados armazenados anteriormente recuperados com \u00eaxito.", "greyuser": "Apenas Seguran\u00e7as ou superiores podem usar o bot.", From 21f11fe34d90e3443999c8a9c989bf4ce58b7d73 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 6 May 2015 02:54:05 +0100 Subject: [PATCH 111/281] Crediting translators --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 147adb63..45ab5c05 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,8 @@ I would like to thank the following people: |Portuguese|[Motel Bible](https://github.com/motelbible)| |French|[NDA](https://github.com/NDAthereal)| +(I would also like to thank everyone who contributed in translating the bot via the [translation centre](http://translate.benzi.io)) + Copyright --------- From e0f2bd7f924df8e5bc82f84e491dbdc68cd23032 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 6 May 2015 02:59:18 +0100 Subject: [PATCH 112/281] updated collaborators link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45ab5c05..771b8d64 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ I would like to thank the following people: |Portuguese|[Motel Bible](https://github.com/motelbible)| |French|[NDA](https://github.com/NDAthereal)| -(I would also like to thank everyone who contributed in translating the bot via the [translation centre](http://translate.benzi.io)) +(I would also like to thank everyone who contributed in translating the bot via the [translation centre](http://translate.benzi.io/admin/collaborators)) Copyright From 28e7446493874dc7a6c4353131c54fc009e21bf8 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 6 May 2015 15:44:28 +0100 Subject: [PATCH 113/281] Update sr.json, tr.json --- lang/sr.json | 6 +++--- lang/tr.json | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lang/sr.json b/lang/sr.json index 37b6b515..aab35096 100644 --- a/lang/sr.json +++ b/lang/sr.json @@ -1,8 +1,8 @@ { "nodatafound": "Prethodni podaci nisu prona\u0111eni.", - "currentlang": "\/me Language currently set to: %%LANGUAGE%%", - "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", - "langset": "\/me Language now set to: %%LANGUAGE%%", + "currentlang": "\/me Jezik podesen na: %%LANGUAGE%%", + "langerror": "\/me Jezik koji ste odabrali nije dostupan. Posjeti %%LINK%% da bi pronasao dostupne jezike.", + "langset": "\/me Jezik je sada podesen na: %%LANGUAGE%%", "retrievingdata": "Preuzimanje prethodno sa\u010duvani podataka.", "datarestored": "Prethodno sa\u010duvani podaci uspije\u0161no preuzeti.", "greyuser": "Samo bounceri i vi\u0161i rank mogu pokrenuti bota.", diff --git a/lang/tr.json b/lang/tr.json index 93f8bbc4..87576956 100644 --- a/lang/tr.json +++ b/lang/tr.json @@ -1,8 +1,8 @@ { "nodatafound": "Veriler bulunamadi.", - "currentlang": "\/me Language currently set to: %%LANGUAGE%%", - "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", - "langset": "\/me Language now set to: %%LANGUAGE%%", + "currentlang": "\/me Bot dili degistirildi: %%LANGUAGE%%", + "langerror": "\/me Sectiginiz dil bulunamadi. Dil listesi icin %%LINK%% linkine tiklayin.", + "langset": "\/me Odo dili suanda degistirildi: %%LANGUAGE%%", "retrievingdata": "Yedeklenen veriler aliniyor.", "datarestored": "Yedeklenen verielr basariyla alindi.", "greyuser": "Botu sadece yetkililer calistirabilir.", From c2a1dab4a2bcb59470baaef0be238c4dc6159956 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 8 May 2015 16:08:41 +0100 Subject: [PATCH 114/281] Added Chinese Translations --- lang/langIndex.json | 3 +- lang/zh.json | 144 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 lang/zh.json diff --git a/lang/langIndex.json b/lang/langIndex.json index cde43cf3..b4cafb36 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -3,5 +3,6 @@ "portuguese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/pt.json", "french": "https://rawgit.com/***REMOVED***/basicBot/master/lang/fr.json", "turkish": "https://rawgit.com/***REMOVED***/basicBot/master/lang/tr.json", - "serbian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/sr.json" + "serbian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/sr.json", + "chinese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/zh.json" } \ No newline at end of file diff --git a/lang/zh.json b/lang/zh.json new file mode 100644 index 00000000..10834899 --- /dev/null +++ b/lang/zh.json @@ -0,0 +1,144 @@ +{ + "nodatafound": "\u6c92\u6709\u767c\u73fe\u4ee5\u524d\u7684\u6578\u64da.", + "currentlang": "\/me \u76ee\u524d\u8a9e\u8a00\u8a2d\u7f6e\u70ba: %%LANGUAGE%%", + "langerror": "\/me \u4f60\u6240\u9078\u64c7\u7684\u8a9e\u8a00\u4e0d\u53ef\u7528. \u8acb\u8a2a\u554f %%LINK%% \u4ee5\u67e5\u8a62\u5217\u8868\u88e1\u53ef\u7528\u7684\u8a9e\u8a00.", + "langset": "\/me \u73fe\u5728\u628a\u8a9e\u8a00\u8a2d\u7f6e\u70ba: %%LANGUAGE%%", + "retrievingdata": "\u6aa2\u7d22\u5148\u524d\u5b58\u5132\u7684\u6578\u64da.", + "datarestored": "\u5148\u524d\u5b58\u5132\u7684\u6578\u64da\u6aa2\u7d22\u6210\u529f.", + "greyuser": "\u53ea\u6709\u4fdd\u93e2\u6216\u4ee5\u4e0a\u968e\u7d1a\u53ef\u4ee5\u904b\u884c\u6a5f\u5668\u4eba.", + "bouncer": "\u5982\u679c\u6a5f\u5668\u4eba\u88ab\u904b\u884c\u70ba\u4fdd\u93e2\u968e\u7d1a\u5c07\u7121\u6cd5\u79fb\u52d5\u4eba.", + "online": "\/me %%BOTNAME%% \u7248\u672c %%VERSION%% \u4e0a\u7dda!", + "welcome": "\/me \u6b61\u8fce %%NAME%%", + "welcomeback": "\/me \u6b61\u8fce\u56de\u4f86, %%NAME%%", + "songknown": "\/me @%%NAME%%, \u6b64\u66f2\u5df2\u5728DJ\u6b77\u53f2\u7d00\u9304\u88e1.", + "timelimit": "\/me @%%NAME%%, \u4f60\u7684\u6b4c\u66f2\u9577\u5ea6\u8d85\u904e %%MAXLENGTH%% \u5206\u9418, \u4f60\u9700\u8981\u6b0a\u9650\u4ee5\u64ad\u653e\u592a\u9577\u7684\u6b4c\u66f2.", + "permissionownsong": "\/me :up: @%%NAME%% \u5df2\u6709\u6b0a\u9650\u64ad\u653e\u4ed6\u5011\u81ea\u5df1\u7684\u88fd\u4f5c!", + "isblacklisted": "\/me \u6b64\u66f2\u76ee\u5728 %%BLACKLIST%% \u7981\u64ad\u9ed1\u540d\u55ae\u88e1! \u8df3\u904e...", + "isopen": "\/me \u8f2a\u76e4\u904a\u6232\u73fe\u5728\u958b\u59cb! \u9375\u5165 !join \u53c3\u8207!", + "winnerpicked": "\/me \u512a\u52dd\u8005\u5df2\u88ab\u7be9\u9078! @%%NAME%% \u79fb\u5230\u4f4d\u7f6e %%POSITION%%.", + "ball": "\/me %%NAME%% \u7684\u554f\u984c\u662f: \"%%QUESTION%%\" \u4ee5\u53ca %%BOTNAME%% \u7684\u56de\u61c9\u662f: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% \u4e26\u4e0d\u662f\u61f8\u639b\u8457\u96e2\u7dda\u4e2d\u7684\u9b3c.", + "ghosting": "[%%NAME1%%] %%NAME2%% \u6216\u8a31\u662f\u5df2\u96e2\u7dda\u61f8\u639b\u5728\u6b64\u7684\u9b3c\u6216\u5728\u639b\u6a5f.", + "alreadyadding": "\/me \u7528\u6236\u5df2\u88ab\u6dfb\u52a0! \u6539\u8b8a\u6240\u9700\u7684\u4f4d\u7f6e\u5230 %%POSITION%%.", + "adding": "\/me \u6dfb\u52a0 @%%NAME%% \u5230\u7b49\u5019\u5217\u8868\u4e2d. \u76ee\u524d\u6392\u4f4d\u662f: %%POSITION%%.", + "usernotfound": "\/me \u7121\u6cd5\u627e\u5230\u7528\u6236.", + "notdisconnected": "\/me @%%NAME%% \u4e26\u6c92\u6709\u5728\u6211\u76e3\u63a7\u9019\u88e1\u6642\u96e2\u904e\u7dda.", + "noposition": "\/me \u4e26\u6c92\u6709\u6700\u5f8c\u4f4d\u7f6e\u88ab\u767c\u73fe. \u7b49\u5019\u5217\u8868\u6392\u4f4d\u5fc5\u9808\u81f3\u5c11\u66f4\u65b0\u904e\u4e00\u6b21\u624d\u80fd\u628a\u7528\u6236\u6700\u5f8c\u4f4d\u7f6e\u7d00\u9304\u4e0b.", + "toolongago": "\/me @%%NAME%% \u7684\u6700\u5f8c\u96e2\u7dda (\u6389\u7dda\u6216\u96e2\u958b) \u5df2\u662f\u5f88\u4e45\u4ee5\u524d: %%TIME%%.", + "valid": "\/me @%%NAME%% \u5728 %%TIME%% \u4ee5\u524d\u96e2\u7dda\u4e26\u4e14\u4ed6\u96e2\u7dda\u524d\u672c\u4f86\u61c9\u8a72\u662f\u5728\u6392\u4f4d %%POSITION%%.", + "warning1": "\/me @%%NAME%%, \u4f60\u5df2\u7d93\u639b\u6a5f\u4e86 %%TIME%%, \u8acb\u5728\u5169\u5206\u9418\u5167\u7d66\u4e88\u56de\u61c9\u6216\u4f60\u6703\u88ab\u79fb\u9664.", + "warning2": "\/me @%%NAME%%, \u5982\u679c\u4f60\u4e0d\u56de\u61c9\u4f60\u6703\u5f88\u5feb\u5c31\u56e0\u70ba\u639b\u6a5f\u800c\u88ab\u79fb\u9664.", + "afkremove": "\/me @%%NAME%%, \u4f60\u56e0\u70ba\u639b\u6a5f\u4e86 %%TIME%% \u800c\u88ab\u79fb\u9664\u4e86. \u4f60\u539f\u672c\u662f\u5728\u6392\u4f4d %%POSITION%%. \u5982\u679c\u4f60\u60f3\u8981\u64ad\u653e\u6b4c\u66f2\u8acb\u81f3\u5c11\u5728\u6bcf %%MAXIMUMAFK%% \u5206\u9418\u5167\u804a\u5929\u4e00\u6b21.", + "caps": "\/me @%%NAME%%, \u8acb\u628a\u4f60\u7684\u5927\u5b57\u6bcdCapslock\u95dc\u9589.", + "askskip": "\/me @%%NAME%%, \u8acb\u5225\u8981\u6c42\u8df3\u904e.", + "spam": "\/me @%%NAME%%, \u8acb\u5225\u6d17\u677f\u704c\u6c34.", + "roomadvertising": "\/me @%%NAME%%, \u8acb\u4e0d\u8981\u5ba3\u50b3\u5f35\u8cbc\u5176\u4ed6\u623f\u9593\u7684\u9023\u63a5.", + "adfly": "\/me @%%NAME%%, \u8acb\u8b8a\u63db\u4f60\u7684\u81ea\u52d5\u6295\u7968\u5916\u639b. \u6211\u5011\u5efa\u8b70\u4f7f\u7528 PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [\u6a19\u7c64: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] \u7121\u6548\u6a19\u7c64, \u8acb\u5617\u8a66\u4e00\u4e9b\u4e0d\u4e00\u6a23\u7684. [\u6a19\u7c64: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [\u96a8\u6a5f GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] \u7121\u6548\u8acb\u6c42, \u8acb\u518d\u5617\u8a66.", + "invalidtime": "\/me [@%%NAME%%] \u7121\u6548\u7684\u6642\u9593\u898f\u5b9a.", + "nouserspecified": "\/me [@%%NAME%%] \u6c92\u6709\u6307\u5b9a\u7684\u7528\u6236.", + "invaliduserspecified": "\/me [@%%NAME%%] \u7121\u6548\u7684\u6307\u5b9a\u7528\u6236.", + "nolistspecified": "\/me [@%%NAME%%] \u6c92\u6709\u6307\u5b9a\u5217\u8868.", + "invalidlistspecified": "\/me [@%%NAME%%] \u7121\u6548\u7684\u6307\u5b9a\u5217\u8868.", + "novaliduserspecified": "\/me [@%%NAME%%] \u6c92\u6709\u6709\u6548\u7684\u7528\u6236\u6307\u5b9a.", + "nolimitspecified": "\/me [@%%NAME%%] \u6c92\u6709\u6307\u5b9a\u9650\u5236.", + "invalidlimitspecified": "\/me [@%%NAME%%] \u7121\u6548\u7684\u9650\u5236.", + "invalidpositionspecified": "\/me [@%%NAME%%] \u7121\u6548\u7684\u6307\u5b9a\u4f4d\u7f6e.", + "whois": "\/me [%%NAME1%%] \u7528\u6236\u540d: %%NAME2%%, \u7de8\u865f: %%ID%%, \u968e\u7d1a: %%RANK%%, \u52a0\u5165\u65bc: %%JOINED%%, \u7b49\u7d1a: %%LEVEL%%, \u8a9e\u8a00: %%LANGUAGE%%, \u982d\u50cf: %%AVATAR%%, \u72c0\u614b: %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% \u555f\u52d5.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% \u505c\u6b62.", + "cmddeletion": "\u6307\u4ee4\u522a\u9664", + "afkremoval": "\u639b\u6a5f\u79fb\u9664", + "afksremoved": "\u639b\u6a5f\u79fb\u9664", + "afklimit": "\u639b\u6a5f\u9650\u5236", + "autodisable": "\u81ea\u52d5\u7981\u7528", + "autoskip": "\u81ea\u52d5\u8df3\u904e", + "newblacklisted": "\/me [@%%NAME%%] \u6b64\u66f2\u76ee\u5c6c\u65bc %%BLACKLIST%% \u9ed1\u540d\u55ae! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] \u9ed1\u540d\u55ae\u8cc7\u8a0a - \u85dd\u4eba: %%AUTHOR%%, \u66f2\u540d: %%TITLE%%, \u6b4c\u66f2\u7de8\u865f: %%SONGID%%", + "blacklist": "\u9ed1\u540d\u55ae", + "cycleguard": "\u8f2a\u8f49\u5b88\u885b", + "timeguard": "\u6642\u9593\u5b88\u885b", + "chatfilter": "\u804a\u5929\u904e\u6ffe", + "historyskip": "\u6b77\u53f2\u8df3\u904e", + "lockdown": "\u9396\u5b9a", + "lockguard": "\u9396\u5b9a\u5b88\u885b", + "usercommands": "\u7528\u6236\u6307\u4ee4", + "motd": "\u4eca\u65e5\u91d1\u53e5", + "welcomemsg": "\u6b61\u8fce\u8a0a\u606f", + "songstats": "\u6b4c\u66f2\u7d71\u8a08", + "etarestriction": "\u5927\u6982\u6642\u9593\u9650\u5236", + "voteskip": "\u6295\u7968\u8df3\u904e", + "voteskiplimit": "\/me [@%%NAME%%] \u6295\u7968\u8df3\u904e\u9650\u5236\u76ee\u524d\u8a2d\u5b9a\u70ba %%LIMIT%% \u8ca0\u8a55.", + "voteskipexceededlimit": "\/me @%%NAME%%, \u4f60\u7684\u6b4c\u66f2\u5df2\u8d85\u904e\u6295\u7968\u8df3\u904e\u9650\u5236 (%%LIMIT%% \u8ca0\u8a55).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] \u7121\u6548\u6295\u7968\u8df3\u904e\u9650\u5236, \u8acb\u518d\u5617\u8a66\u4f7f\u7528\u4e00\u500b\u6578\u5b57\u4f86\u8c61\u5fb5\u8ca0\u8a55\u7684\u6578\u76ee.", + "voteskipsetlimit": "\/me [@%%NAME%%] \u6295\u7968\u8df3\u904e\u9650\u5236\u8a2d\u7f6e\u70ba %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] \u5df2\u6709 %%AMOUNT%% \u4f4d\u7528\u6236\u5728\u904e\u53bb %%TIME%% \u5206\u9418\u88e1\u804a\u5929.", + "maximumafktimeset": "\/me [@%%NAME%%] \u6700\u9ad8\u9650\u5236afk\u639b\u6a5f\u9577\u5ea6\u8a2d\u7f6e\u70ba %%TIME%% \u5206\u9418.", + "afkstatusreset": "\/me [@%%NAME%%] \u91cd\u8a2d @%%USERNAME%% \u7684afk\u72c0\u614b.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% \u5df2\u7d93\u4e0d\u6d3b\u8e8d\u4e86 %%TIME%% \u5206\u9418.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% \u5df2\u7d93\u4e0d\u6d3b\u8e8d\u9577\u904e %%BOTNAME%% \u5728\u7dda\u6642\u9593.", + "autowoot": "\/me \u6211\u5011\u63a8\u85a6 PlugCubed\u4ee5\u81ea\u52d5\u6295\u7968: http:\/\/plugcubed.net\/", + "brandambassador": "\/me \u5927\u4f7f\u5011\u662fplug.dj\u7528\u6236\u7684\u8072\u97f3. \u4ed6\u5011\u5ba3\u50b3\u6d3b\u52d5, \u53c3\u8207\u793e\u5340\u4ee5\u53ca\u5411\u5168\u4e16\u754c\u5206\u4eabplug.dj\u8a0a\u606f. \u66f4\u591a\u8a73\u60c5\u5167\u5bb9: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] \u4f60\u5fc5\u9808\u662f\u7d93\u7406\u6216\u66f4\u9ad8\u968e\u7d1a\u4ee5\u8a2d\u7f6e\u4fdd\u93e2+.", + "chatcleared": "\/me [@%%NAME%%] \u6e05\u9664\u804a\u5929.", + "deletechat": "\/me [@%%NAME%%] \u6e05\u9664 %%USERNAME%% \u7684\u804a\u5929.", + "commandslink": "\/me %%BOTNAME%% \u6307\u4ee4: %%LINK%%", + "eatcookie": "\/me \u5403\u4e00\u500b\u66f2\u5947\u9905.", + "nousercookie": "\/em \u770b\u4e0d\u898b %%NAME%% \u5728\u623f\u9593\u88e1 \u4ee5\u53ca \u4ed6\u81ea\u5df1\u5403\u4e00\u500b\u66f2\u5947\u9905.", + "selfcookie": "\/me @%%NAME%%, \u4f60\u6709\u9ede\u8caa\u5fc3\u5594, \u4e0d\u662f\u55ce? \u7d66\u4f60\u81ea\u5df1\u66f2\u5947\u9905, \u5509\u5537. \u5206\u4eab\u4e00\u4e9b\u7d66\u5176\u4ed6\u4eba\u561b!", + "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] \u8f2a\u8f49\u5b88\u885b\u5df2\u88ab\u8a2d\u5b9a\u70ba %%TIME%% \u5206\u9418.", + "dclookuprank": "\/me [@%%NAME%%] \u53ea\u6709\u4fdd\u93e2\u6216\u66f4\u9ad8\u968e\u7d1a\u53ef\u67e5\u770b\u5176\u4ed6\u4eba.", + "emojilist": "\/me Emoji\u5217\u8868: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, \u4f60\u4e26\u4e0d\u5728\u7b49\u5019\u5217\u8868\u88e1.", + "eta": "\/me @%%NAME%% \u4f60\u6703\u65bc\u5927\u6982 %%TIME%% \u5f8c\u62b5\u9054\u5c55\u53f0.", + "facebook": "\/me \u8acb\u8b9a\u6211\u5011\u7684\u9762\u5b50\u66f8: %%LINK%%", + "starterhelp": "\/me \u6b64\u5716\u50cf\u53ef\u6307\u5f15\u4f60\u5982\u4f55\u5728plug\u958b\u59cb: %%LINK%%", + "roulettejoin": "\/me @%%NAME%% \u52a0\u5165\u4e86\u8f2a\u76e4\u904a\u6232! (!leave \u5982\u679c\u4f60\u5f8c\u6094\u60f3\u9000\u51fa\u904a\u6232.)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% \u5df2\u7d93\u5728\u623f\u9593\u88e1\u6709 %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] \u4f60\u4e0d\u80fd\u8e22\u8207\u4f60\u540c\u7b49\u7d1a\u6216\u6bd4\u4f60\u66f4\u9ad8\u968e\u7d1a\u7684\u7528\u6236!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% \u4f60\u5df2\u88ab\u6b64\u793e\u5340\u8e22\u51fa %%TIME%% \u5206\u9418.", + "kill": "\/me \u6b63\u5728\u95dc\u9589.", + "logout": "\/me [@%%NAME%%] \u6b63\u5728\u767b\u51fa %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% \u96e2\u958b\u4e86\u8f2a\u76e4\u904a\u6232!", + "songlink": "\/me [@%%NAME%%] \u7576\u524d\u64ad\u653e\u6b4c\u66f2\u7684\u9023\u63a5: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% \u525b\u525b\u4f7f\u7528\u4e86\u9396\u5b9a\u8df3\u904e.]", + "lockskippos": "\/me [@%%NAME%%] \u9396\u5b9a\u8df3\u904e\u7136\u5f8c\u5c31\u628adj\u79fb\u52d5\u5230\u4f4d\u7f6e %%POSITION%%.", + "lockguardtime": "\/me [@%%NAME%%] \u9396\u5b9a\u5b88\u885b\u76ee\u524d\u8a2d\u7f6e\u70ba %%TIME%% \u5206\u9418.", + "maxlengthtime": "\/me [@%%NAME%%] \u6700\u9ad8\u9650\u5236\u6b4c\u66f2\u9577\u5ea6\u76ee\u524d\u8a2d\u7f6e\u70ba %%TIME%% \u5206\u9418.", + "motdset": "\/me \u4eca\u65e5\u91d1\u53e5 \u8a2d\u7f6e\u70ba: %%MSG%%", + "motdintervalset": "\/me \u4eca\u65e5\u91d1\u53e5 \u9593\u9694\u8a2d\u7f6e\u70ba %%INTERVAL%%.", + "addbotwaitlist": "\/me @%%NAME%%, \u8acb\u5225\u628a\u6211\u6dfb\u52a0\u5230\u7b49\u5019\u5217\u8868, \u8b1d\u8b1d.", + "move": "\/me [%%NAME%% \u4f7f\u7528\u4e86\u79fb\u52d5.]", + "mutednotime": "\/me [@%%NAME%%] \u975c\u97f3 @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] \u4f60\u6700\u591a\u53ef\u4ee5\u975c\u97f3 %%TIME%% \u5206\u9418.", + "mutedtime": "\/me [@%%NAME%%] \u975c\u97f3 @%%USERNAME%% \u6642\u9593 %%TIME%% \u5206\u9418.", + "unmuted": "\/me [@%%NAME%%] \u89e3\u9664\u975c\u97f3 @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] \u4f60\u4e0d\u80fd\u975c\u97f3\u8207\u4f60\u540c\u7b49\u7d1a\u6216\u6bd4\u4f60\u66f4\u9ad8\u968e\u7d1a\u7684\u4eba.", + "oplist": "\/me \u904e\u5ea6\u64ad\u653e\u5217\u8868: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me \u5f88\u5feb\u6703\u56de\u4f86.", + "removenotinwl": "\/me [@%%NAME%%] \u6307\u5b9a\u7528\u6236 @%%USERNAME%% \u4e26\u4e0d\u5728\u7b49\u5019\u5217\u8868\u88e1.", + "roomrules": "\/me \u8acb\u5728\u9019\u88e1\u67e5\u770b\u623f\u9593\u898f\u5247: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] \u7e3d\u5171\u6b63\u8a55: %%WOOTS%%, \u7e3d\u5171\u8ca0\u8a55: %%MEHS%%, \u7e3d\u5171\u6536\u85cf: %%GRABS%%.", + "skip": "\/me [%%NAME%% \u4f7f\u7528\u4e86\u8df3\u904e.]", + "madeby": "\/me \u6b64\u6a5f\u5668\u4eba\u5275\u9020\u4eba\u662f %%NAME%%.", + "activefor": "\u6211\u5df2\u7d93\u6d3b\u8e8d\u4e86 %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] \u6307\u5b9a\u7528\u6236\u7121\u6548. (\u540d\u5b57\u4e0d\u8981\u6709\u7a7a\u683c!)", + "swapwlonly": "\/me [@%%NAME%%] \u8acb\u53ea\u9078\u64c7\u6709\u5728\u7b49\u5019\u5217\u8868\u88e1\u9762\u7684\u7528\u6236\u4f86\u4e92\u63db!", + "swapping": "\/me %%NAME1%% \u8207 %%NAME2%% \u4e92\u63db\u4f4d\u7f6e.", + "genres": "\/me \u8acb\u5728\u6b64\u67e5\u770b\u623f\u9593\u53ef\u5141\u8a31\u7684\u6d41\u6d3e: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] \u6b64\u7528\u6236\u4e26\u6c92\u6709\u88ab\u7981\u6b62.", + "unmutedeveryone": "\/me [@%%NAME%%] \u89e3\u9664\u975c\u97f3\u6bcf\u4e00\u500b\u4eba.", + "unmuteeveryonerank": "\/me [@%%NAME%%] \u53ea\u6709\u7d93\u7406\u6216\u66f4\u9ad8\u968e\u7d1a\u53ef\u4ee5\u4e00\u6b21\u6027\u89e3\u9664\u975c\u97f3\u6bcf\u4e00\u500b\u4eba.", + "notmuted": "\/me [@%%NAME%%] \u90a3\u500b\u7528\u6236\u4e26\u6c92\u6709\u88ab\u975c\u97f3.", + "unmuterank": "\/me [@%%NAME%%] \u4f60\u4e0d\u80fd\u89e3\u9664\u975c\u97f3\u8207\u4f60\u540c\u7b49\u7d1a\u6216\u6bd4\u4f60\u66f4\u597d\u968e\u7d1a\u7684\u7528\u6236.", + "commandscd": "\/me [@%%NAME%%] \u666e\u901a\u7528\u6236\u6307\u4ee4\u9593\u9694\u6642\u9593\u73fe\u5728\u88ab\u8a2d\u7f6e\u70ba %%TIME%% \u79d2.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ \u6b63\u8a55: %%WOOT%%, \u8ca0\u8a55: %%MEHS%%, \u6bd4\u7387 (\u6b63\/\u8ca0): %%RATIO%%.", + "website": "\/me \u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9: %%LINK%%", + "youtube": "\/me [%%NAME%%] \u8a02\u95b1\u6211\u5011\u7684Youtube\u983b\u9053: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%\u6b63\/%%GRABS%%\u6536\u85cf\/%%MEHS%%\u8ca0." +} \ No newline at end of file From d36e3d09f1d1503751e83142d2c5ad1de637bb04 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 8 May 2015 17:28:07 +0100 Subject: [PATCH 115/281] Added Dutch Translations --- lang/langIndex.json | 3 +- lang/nl.json | 144 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 lang/nl.json diff --git a/lang/langIndex.json b/lang/langIndex.json index b4cafb36..08f527f6 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -4,5 +4,6 @@ "french": "https://rawgit.com/***REMOVED***/basicBot/master/lang/fr.json", "turkish": "https://rawgit.com/***REMOVED***/basicBot/master/lang/tr.json", "serbian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/sr.json", - "chinese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/zh.json" + "chinese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/zh.json", + "dutch": "https://rawgit.com/***REMOVED***/basicBot/master/lang/nl.json" } \ No newline at end of file diff --git a/lang/nl.json b/lang/nl.json new file mode 100644 index 00000000..1c25cdfe --- /dev/null +++ b/lang/nl.json @@ -0,0 +1,144 @@ +{ + "nodatafound": "Geen vorige data gevonden.", + "currentlang": "\/me De taal is momenteel ingesteld op: %%LANGUAGE%%", + "langerror": "\/me De taal die je hebt geselecteerd is niet beschikbaar. Bezoek alsjeblieft %%LINK%% om een lijst te bekijken met de beschikbare talen.", + "langset": "\/me Taal is nu ingesteld op: %%LANGUAGE%%", + "retrievingdata": "Opgeslagen data wordt opgehaald.", + "datarestored": "Opgeslagen data is succesvol opgehaald.", + "greyuser": "Enkel bouncers en hoger kunnen een bot runnen.", + "bouncer": "De bot kan geen mensen verplaatsen als het via een bouncer gerund wordt.", + "online": "\/me %%BOTNAME%% v%%VERSION%% online!", + "welcome": "\/me Welkom %%NAME%%", + "welcomeback": "\/me Welkom terug, %%NAME%%", + "songknown": "\/me @%%NAME%%, Dit lied staat in de DJ geschiedenis.", + "timelimit": "\/me @%%NAME%%, jouw lied is langer dan %%MAXLENGTH%% minuten, je hebt toestemming nodig om langere liedjes te spelen.", + "permissionownsong": "\/me :up: @%%NAME%% heeft toestemming om hun eigen productie te spelen!", + "isblacklisted": "\/me Dit liedje staat op de %%BLACKLIST%% blacklist! Overslaan...", + "isopen": "\/me De roulette is nu open! Type !join om mee te doen!", + "winnerpicked": "\/me Er is een winnaar geselecteerd! @%%NAME%% naar positie %%POSITION%%", + "ball": "\/me %%NAME%%'s vraag was: \"%%QUESTION%%\" en %%BOTNAME%%'s antwoord is: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% is geen duplicatie.", + "ghosting": "[%%NAME1%%] %%NAME2%% is ofwel een duplicatie ofwel niet hier", + "alreadyadding": "\/me Gebruiker wordt al toegevoegd! De gekozen positie wordt veranderd naar %%POSITION%%.", + "adding": "\/me @%%NAME%% werd in de wachtrij geplaatst. Huidige wachtrij: %%POSITION%%.", + "usernotfound": "\/me Gebruiker niet gevonden.", + "notdisconnected": "\/me @%%NAME%% is niet weggegaan terwijl ik hier was.", + "noposition": "\/me Geen laatste positie gekend. The wachtlijst moet ten minste een keer updaten om de laatste positie van een gebruiker op te slaan.", + "toolongago": "\/me @%%NAME%%'s laatste disconnect (DC of weggegaan) was te lang geleden: %%TIME%%.", + "valid": "\/me @%%NAME%% ging weg %%TIME%% geleden en zou op positie %%POSITION%% moeten staan.", + "warning1": "\/me @%%NAME%%, je bent al %%TIME%% afk, reageer alsjeblieft binnen 2 minuten of je zal worden verwijderd.", + "warning2": "\/me @%%NAME%%, je zal worden verwijderd wegens te AFK als je niet reageert.", + "afkremove": "\/me @%%NAME%%, je bent verwijderd uit de wachtlijst omdat je afk was voor %%TIME%%. Je was op positie %%POSITION%%. Chat ten minste elke %%MAXIMUMAFK%% minuten als je een nummer wil spelen.", + "caps": "\/me @%%NAME%%, zet je capslock uit alsjeblieft.", + "askskip": "\/me @%%NAME%%, vraag alstublieft niet voor skips.", + "spam": "\/me @%%NAME%%, spam alsjeblieft niet.", + "roomadvertising": "\/me @%%NAME%%, link alsjeblieft geen andere gemeenschappen.", + "adfly": "\/me @%%NAME%%, verander alsjeblieft je autowoot programma. Wij raden PlugCubed aan: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Ongeldige tags, probeer iets anders. [Tags: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Willekeurige GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] Ongeldig verzoek, probeer het opnieuw.", + "invalidtime": "\/me [@%%NAME%%] Ongeldige tijd opgegeven.", + "nouserspecified": "\/me [@%%NAME%%] Geen gebruiker gespecificeerd.", + "invaliduserspecified": "\/me [@%%NAME%%] Ongeldige gebruiker gespecificeerd.", + "nolistspecified": "\/me [@%%NAME%%] Geen lijst aangegeven.", + "invalidlistspecified": "\/me [@%%NAME%%] Ongeldige lijst opgegeven.", + "novaliduserspecified": "\/me [@%%NAME%%] Geen geldige gebruiker opgegeven.", + "nolimitspecified": "\/me [@%%NAME%%] Geen limiet gespecificeerd.", + "invalidlimitspecified": "\/me [@%%NAME%%] Ongeldige limiet.", + "invalidpositionspecified": "\/me [@%%NAME%%] Ongeldige positie opgegeven.", + "whois": "\/me [%%NAME1%%] Gebruikersnaam: %%NAME2%%, ID: %%ID%%, Rang: %%RANK%%, Lid geworden: %%JOINED%%, Level: %%LEVEL%%, Taal: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% geactiveerd.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% uitgezet.", + "cmddeletion": "command schrapping.", + "afkremoval": "AFK verwijdering", + "afksremoved": "AFK's verwijderd", + "afklimit": "AFK limiet", + "autodisable": "autouitzetten", + "autoskip": "autoskip", + "newblacklisted": "\/me [@%%NAME%%] Dit nummer staat op de %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Blacklist info - auteur: %%AUTHOR%%, titel: %%TITLE%%, mid: %%SONGID%%", + "blacklist": "blacklist", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "chatfilter", + "historyskip": "geschiedenisskip", + "lockdown": "vergrendeling", + "lockguard": "lockguard", + "usercommands": "gebruikercommands", + "motd": "MotD", + "welcomemsg": "welkomstbericht", + "songstats": "lied statistieken", + "etarestriction": "\u00e8ta beperking", + "voteskip": "voteskip", + "voteskiplimit": "\/me [@%%NAME%%] Voteskip limiet is momenteel %%LIMIT%% mehs.", + "voteskipexceededlimit": "\/me @%%NAME%%, je lied heeft het voteskip limiet overschreden (%%LIMIT%% mehs)", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Ongeldig voteskip limiet, probeer het opnieuw met een nummer om het aantal mehs aan te geven.", + "voteskipsetlimit": "\/me [@%%NAME%%] Voteskip limiet ingesteld op %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] Er hebben %%AMOUNT%% gebruikers gechat in de laatste %%TIME%% minuten.", + "maximumafktimeset": "\/me [@%%NAME%%] Maximum afk duur ingesteld op %%TIME%% minuten.", + "afkstatusreset": "\/me [@%%NAME%%] Reset de afk status van @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% is inactief voor %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% is langer inactief dan %%BOTNAME%% online is.", + "autowoot": "\/me Wij raden PlugCubed aan om te autowooten: http:\/\/plugcubed.net\/", + "brandambassador": "\/me Een Brand Ambassafor is de stem van de plug.dj gebruikers. Ze promoten evenementen, houden zich bezig met de gemeenschap en delen de plug.dj boodschap over de hele wereld. Voor meer info: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Je moet manager of hoger zijn om Bouncer+ in te schakelen.", + "chatcleared": "\/me [@%%NAME%%] Heeft de chat vrijgemaakt.", + "deletechat": "\/me [@%%NAME%%] Heeft de chat van %%USERNAME%% verwijderd.", + "commandslink": "\/me %%BOTNAME%% commando's: %%LINK%%", + "eatcookie": "\/me is een koekje aan het eten", + "nousercookie": "\/me ziet %%NAME%% niet in de gemeenschap en eet het koekje dan maar zelf op.", + "selfcookie": "\/me @%%NAME%%, je bent nogal gierig, nietwaar? Koekjes aan jezelf geven, bah. Deel wat met andere mensen!", + "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] De cycleguard is ingesteld op %%TIME%% minu(u)t(en).", + "dclookuprank": "\/me [@%%NAME%%] Alleen bouncers of hogere ranking kunnen iets opzoeken voor anderen.", + "emojilist": "\/me Lijst met Emoji's: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, je bent niet in de wachtlijst.", + "eta": "\/me @%%NAME%% je zal de booth bereiken in ongeveer %%TIME%%.", + "facebook": "\/me Like ons op facebook: %%LINK%%", + "starterhelp": "\/me Deze afbeelding zal je op weg helpen op plug: %%LINK%%", + "roulettejoin": "\/me @%%NAME%% heeft de roulette gejoind! (!leave als je er spijt van hebt.)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% is al %%TIME%% in de gemeenschap.", + "kickrank": "\/me [@%%NAME%%] je kan geen gebruikers kicken met een gelijke of hogere rang dan jezelf!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% je wordt gekickt van de gemeenschap voor %%TIME%% minuten.", + "kill": "\/me Afsluiten.", + "logout": "me [@%%NAME%%] Uitloggen %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% heeft de roulette verlaten!", + "songlink": "\/me [@%%NAME%%] Link naar het huidige nummer: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% gebruikte lockskip.]", + "lockskippos": "\/me [@%%NAME%%] Lockskip zal de dj nu naar positie %%POSITION%% verplaatsen.", + "lockguardtime": "\/me [@%%NAME%%] De lockguard is ingesteld op %%TIME%% minuten.", + "maxlengthtime": "\/me [@%%NAME%%] De maximum lengte van een nummer is ingesteld op %%TIME%% minuten.", + "motdset": "\/me MotD ingesteld op: %%MSG%%", + "motdintervalset": "\/me MotD interval ingesteld op %%INTERVAL%%.", + "addbotwaitlist": "\/me @%%NAME%%, probeer mij niet toe te voegen aan de wachtlijst, alsjeblieft.", + "move": "\/me [%%NAME%% gebruikte move.]", + "mutednotime": "\/me [@%%NAME%%]Heeft @%%USERNAME%% gemute.", + "mutedmaxtime": "\/me [@%%NAME%% Je kunt maar voor %%TIME%% minuten muten.", + "mutedtime": "\/me [@%%NAME%%] Heeft @%%USERNAME%% gemute voor %%TIME%% minuten.", + "unmuted": "\/me [@%%NAME%%] Heeft @%%USERNAME%% mute opgehoffen.", + "muterank": "\/me [@%%NAME%%] Je kunt niet iemand muten met de zelfde ranking of hoger.", + "oplist": "\/me OP lijst: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Ben zo terug.", + "removenotinwl": "\/me [@%%NAME%%] Opgegeven gebruiker @%%USERNAME%% is niet in de wachtlijst.", + "roomrules": "\/me Je kan onze regels hier vinden: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Totaal aantal woots: %%WOOTS%%, totaal aantal mehs: %%MEHS%%, totaal aantal grabs: %%GRABS%%.", + "skip": "\/me [@%%NAME%% gebruikte skip.]", + "madeby": "\/me Deze bot is gemaakt door %%NAME%%.", + "activefor": "Ik ben al %%TIME%% actief.", + "swapinvalid": "\/me [@%%NAME%%] Ongeldige gebruiker gespecificeerd. (Geen namen met spaties!)", + "swapwlonly": "\/me [@%%NAME%%] Swap enkel gebruikers die in de wachtlijst zijn alsjeblief!", + "swapping": "\/me Verwisselt %%NAME1%% met %%NAME2%%.", + "genres": "\/me Je kan de toegestane genres van onze gemeenschap hier vinden: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] Was niet gebanned.", + "unmutedeveryone": "\/me [@%%NAME%%] Heeft iedereen zijn mute opgehoffen.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Alleen managers kan iedereen in een keer unmuten.", + "notmuted": "\/me [@%%NAME%%] Was niet gemute.", + "unmuterank": "\/me [@%%NAME%%] Je kan niet iemand unmuten met dezelfde of hogere ranking.", + "commandscd": "\/me [@%%NAME%%] De cooldown voor commando's voor gebruikers is gezet naar %%TIME%% seconden.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, verhouding (w\/m): %%RATIO%%.", + "website": "\/me Bezoek onze website alsjeblieft: %%LINK%%", + "youtube": "\/me [%%NAME%%] Abonneer op ons kanaal op YouTube: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file From 59f251d13987a2b9540d955a25704dbc33608768 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 8 May 2015 18:40:32 +0100 Subject: [PATCH 116/281] Update nl.json --- lang/nl.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lang/nl.json b/lang/nl.json index 1c25cdfe..eb5b0e3b 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -44,7 +44,7 @@ "nolistspecified": "\/me [@%%NAME%%] Geen lijst aangegeven.", "invalidlistspecified": "\/me [@%%NAME%%] Ongeldige lijst opgegeven.", "novaliduserspecified": "\/me [@%%NAME%%] Geen geldige gebruiker opgegeven.", - "nolimitspecified": "\/me [@%%NAME%%] Geen limiet gespecificeerd.", + "nolimitspecified": "\/me [@%%NAME%%] Geen limiet opgegeven.", "invalidlimitspecified": "\/me [@%%NAME%%] Ongeldige limiet.", "invalidpositionspecified": "\/me [@%%NAME%%] Ongeldige positie opgegeven.", "whois": "\/me [%%NAME1%%] Gebruikersnaam: %%NAME2%%, ID: %%ID%%, Rang: %%RANK%%, Lid geworden: %%JOINED%%, Level: %%LEVEL%%, Taal: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", @@ -84,7 +84,7 @@ "brandambassador": "\/me Een Brand Ambassafor is de stem van de plug.dj gebruikers. Ze promoten evenementen, houden zich bezig met de gemeenschap en delen de plug.dj boodschap over de hele wereld. Voor meer info: https:\/\/plug.dj\/ba", "bouncerplusrank": "\/me [@%%NAME%%] Je moet manager of hoger zijn om Bouncer+ in te schakelen.", "chatcleared": "\/me [@%%NAME%%] Heeft de chat vrijgemaakt.", - "deletechat": "\/me [@%%NAME%%] Heeft de chat van %%USERNAME%% verwijderd.", + "deletechat": "\/me [@%%NAME%%] Heeft de chatberichten van %%USERNAME%% verwijderd.", "commandslink": "\/me %%BOTNAME%% commando's: %%LINK%%", "eatcookie": "\/me is een koekje aan het eten", "nousercookie": "\/me ziet %%NAME%% niet in de gemeenschap en eet het koekje dan maar zelf op.", @@ -113,11 +113,11 @@ "motdintervalset": "\/me MotD interval ingesteld op %%INTERVAL%%.", "addbotwaitlist": "\/me @%%NAME%%, probeer mij niet toe te voegen aan de wachtlijst, alsjeblieft.", "move": "\/me [%%NAME%% gebruikte move.]", - "mutednotime": "\/me [@%%NAME%%]Heeft @%%USERNAME%% gemute.", + "mutednotime": "\/me [@%%NAME%%] Heeft @%%USERNAME%% gemute.", "mutedmaxtime": "\/me [@%%NAME%% Je kunt maar voor %%TIME%% minuten muten.", "mutedtime": "\/me [@%%NAME%%] Heeft @%%USERNAME%% gemute voor %%TIME%% minuten.", - "unmuted": "\/me [@%%NAME%%] Heeft @%%USERNAME%% mute opgehoffen.", - "muterank": "\/me [@%%NAME%%] Je kunt niet iemand muten met de zelfde ranking of hoger.", + "unmuted": "\/me [@%%NAME%%] Heeft @%%USERNAME%%'s mute opgehoffen.", + "muterank": "\/me [@%%NAME%%] Je kunt niet iemand muten met de zelfde rang of hoger.", "oplist": "\/me OP lijst: %%LINK%%", "pong": "\/me Pong!", "reload": "\/me Ben zo terug.", @@ -133,9 +133,9 @@ "genres": "\/me Je kan de toegestane genres van onze gemeenschap hier vinden: %%LINK%%", "notbanned": "\/me [@%%NAME%%] Was niet gebanned.", "unmutedeveryone": "\/me [@%%NAME%%] Heeft iedereen zijn mute opgehoffen.", - "unmuteeveryonerank": "\/me [@%%NAME%%] Alleen managers kan iedereen in een keer unmuten.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Alleen managers kunnen iedereen in een keer unmuten.", "notmuted": "\/me [@%%NAME%%] Was niet gemute.", - "unmuterank": "\/me [@%%NAME%%] Je kan niet iemand unmuten met dezelfde of hogere ranking.", + "unmuterank": "\/me [@%%NAME%%] Je kan niet iemand unmuten met dezelfde of hogere rang.", "commandscd": "\/me [@%%NAME%%] De cooldown voor commando's voor gebruikers is gezet naar %%TIME%% seconden.", "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, verhouding (w\/m): %%RATIO%%.", "website": "\/me Bezoek onze website alsjeblieft: %%LINK%%", From b7d51c8eebf102631f078a3c4b9439a7f5dae417 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 10 May 2015 14:35:01 +0100 Subject: [PATCH 117/281] Added Autoskip to !status --- basicBot.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/basicBot.js b/basicBot.js index 9ee7dfc4..18fc5750 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2948,6 +2948,11 @@ else msg += 'OFF'; msg += '. '; + msg += basicBot.chat.autoskip + ': '; + if (basicBot.room.autoskip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + var launchT = basicBot.room.roomstats.launchTime; var durationOnline = Date.now() - launchT; var since = basicBot.roomUtilities.msToStr(durationOnline); From 65c88b90627325c72831b387e82a5b216f095030 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 10 May 2015 22:40:32 +0100 Subject: [PATCH 118/281] Correct mistakes in sr.json --- lang/sr.json | 78 ++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/lang/sr.json b/lang/sr.json index aab35096..3517775f 100644 --- a/lang/sr.json +++ b/lang/sr.json @@ -1,44 +1,44 @@ { "nodatafound": "Prethodni podaci nisu prona\u0111eni.", "currentlang": "\/me Jezik podesen na: %%LANGUAGE%%", - "langerror": "\/me Jezik koji ste odabrali nije dostupan. Posjeti %%LINK%% da bi pronasao dostupne jezike.", + "langerror": "\/me Jezik koji ste odabrali nije dostupan. Poseti %%LINK%% da bi pronasao dostupne jezike.", "langset": "\/me Jezik je sada podesen na: %%LANGUAGE%%", - "retrievingdata": "Preuzimanje prethodno sa\u010duvani podataka.", - "datarestored": "Prethodno sa\u010duvani podaci uspije\u0161no preuzeti.", + "retrievingdata": "Preuzimanje prethodno sa\u010duvanih podataka.", + "datarestored": "Prethodno sa\u010duvani podaci uspe\u0161no preuzeti.", "greyuser": "Samo bounceri i vi\u0161i rank mogu pokrenuti bota.", - "bouncer": "Bot ne mo\u017ee premjestati ljude ukoliko je pokrenut od strane bouncera.", + "bouncer": "Bot ne mo\u017ee premestati ljude ukoliko je pokrenut od strane bouncera.", "online": "\/me %%BOTNAME%% %%VERSION%% online!", "welcome": "\/me Dobrodo\u0161ao %%NAME%%", "welcomeback": "\/me Dobrodo\u0161ao nazad, %%NAME%%", - "songknown": "\/me @%%NAME%%, Ova pjesma je u history.", - "timelimit": "\/me @%%NAME%%, Tvoja pjesma je duza od %%MAXLENGTH%% minuta, potrebna ti je dozvola da pustas duze pjesme.", - "permissionownsong": "\/me :up: @%%NAME%% ima dozvolu da pu\u0161ta svoju vlastitu pjesmu.", - "isblacklisted": "\/me Ova pjesma je na %%BLACKLIST%% blacklisti! Prebacujem....", - "isopen": "\/me Rulet je pokrenut! Pi\u0161i !join da u\u010destvujes.", - "winnerpicked": "\/me Pobjednik je odabran! @%%NAME%% na poziciju %%POSITION%%.", + "songknown": "\/me @%%NAME%%, Ova pesma je u DJ istoriji.", + "timelimit": "\/me @%%NAME%%, Tvoja pesma je duza od %%MAXLENGTH%% minuta, potrebna ti je dozvola da pustas duze pesme.", + "permissionownsong": "\/me :up: @%%NAME%% ima dozvolu da pu\u0161ta svoju vlastitu pesmu.", + "isblacklisted": "\/me Ova pesma je na %%BLACKLIST%% blacklisti! Prebacujem....", + "isopen": "\/me Rulet je pokrenut! Pi\u0161i !join da u\u010destvuje\u0161.", + "winnerpicked": "\/me Pobednik je odabran! @%%NAME%% na poziciju %%POSITION%%.", "ball": "\/me %%NAME%% je pitao: \"%%QUESTION%%\" i %%BOTNAME%% odgovara: \"%%RESPONSE%%\"", "notghosting": "[%%NAME1%%] %%NAME2%% nije zabagovan.", "ghosting": "[%%NAME1%%] %%NAME2%% je zabagovan ili nije tu.", - "alreadyadding": "\/me Korisnik je ve\u0107 dodan! Promjenjena \u017eeljena pozicija na %%POSITION%%.", + "alreadyadding": "\/me Korisnik je ve\u0107 dodan! Promenjena \u017eeljena pozicija na %%POSITION%%.", "adding": "\/me Dodan @%%NAME%% u red. Trenutna pozicija %%POSITION%%.", "usernotfound": "\/me Korisnik nije prona\u0111en.", - "notdisconnected": "\/me @%%NAME%% se nije diskonektovao tokom mog boravka ovdje.", + "notdisconnected": "\/me @%%NAME%% se nije diskonektovao tokom mog boravka ovde.", "noposition": "\/me Zadnja pozicija nepoznata. Listu cekanja treba a\u017eurirati najmanje jednom da bi se registrovala zadnja pozicija korisnika.", "toolongago": "\/me @%%NAME%% zadnji diskonekt (DC ili leave) je bio davno: %%TIME%%.", - "valid": "\/me @%%NAME%% se diskonektovao prije %%TIME%% i trebao bi biti na poziciji %%POSITION%%.", - "warning1": "\/me @%%NAME%%, ti si afk %%TIME%%, molim odgovori u roku od 2 min ili \u010de\u0161 biti uklonjen sa liste \u010dekanja.", - "warning2": "\/me @%%NAME%%, uskoro \u010de\u0161 biti uklonjen sa liste zbog afk ukoliko ne odgovori\u0161.", - "afkremove": "\/me @%%NAME%%, izba\u010den si sa liste \u010dekanja zbog afk %%TIME%%. Bio si na poziciji %%POSITION%%. Pi\u0161i bar svako %%MAXIMUMAFK%% minuta ako zelis da pu\u0161ta\u0161 pjesme.", + "valid": "\/me @%%NAME%% se diskonektovao pre %%TIME%% i trebao bi biti na poziciji %%POSITION%%.", + "warning1": "\/me @%%NAME%%, ti si afk %%TIME%%, molim odgovori u roku od 2 min ili \u0107e\u0161 biti uklonjen sa liste \u010dekanja.", + "warning2": "\/me @%%NAME%%, uskoro \u0107e\u0161 biti uklonjen sa liste zbog AFK ukoliko ne odgovori\u0161.", + "afkremove": "\/me @%%NAME%%, izba\u010den si sa liste \u010dekanja zbog afk %%TIME%%. Bio si na poziciji %%POSITION%%. Pi\u0161i bar svako %%MAXIMUMAFK%% minuta ako zeli\u0161 da pu\u0161ta\u0161 pesme.", "caps": "\/me @%%NAME%%, isklju\u010di caps, molim.", "askskip": "\/me @%%NAME%%, ne tra\u017ei skip.", "spam": "\/me @%%NAME%%, molim, ne spamaj.", "roomadvertising": "\/me @%%NAME%%, ne postavljaj linkove drugih soba.", - "adfly": "\/me @%%NAME%%, promjeni tvoj autowoot program. Mi preporu\u010dujemo PlugCubed: http:\/\/plugcubed.net\/", + "adfly": "\/me @%%NAME%%, promeni tvoj autowoot program. Mi preporu\u010dujemo PlugCubed: http:\/\/plugcubed.net\/", "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Oznaka: %%TAGS%%]", "invalidgiftags": "\/me [@%%NAME%%] Pogre\u0161na oznaka, poku\u0161aj ne\u0161to drugo. [Oznaka: %%TAGS%%]", "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Slu\u010dajno odabran GIF]", - "invalidgifrandom": "\/me [@%%NAME%%] Neva\u017ee\u0107i zahtjev, poku\u0161ajte ponovo.", - "invalidtime": "\/me [@%%NAME%%] Navedeno vrijeme pogre\u0161no.", + "invalidgifrandom": "\/me [@%%NAME%%] Neva\u017ee\u0107i zahtev, poku\u0161ajte ponovo.", + "invalidtime": "\/me [@%%NAME%%] Navedeno vreme pogre\u0161no.", "nouserspecified": "\/me [@%%NAME%%] Korisnik nije naveden.", "invaliduserspecified": "\/me [@%%NAME%%] Navedeni korisnik pogre\u0161an", "nolistspecified": "\/me [@%%NAME%%] Navedena lista ne postoji.", @@ -56,7 +56,7 @@ "afklimit": "AFK limit", "autodisable": "autoisklju\u010divanje", "autoskip": "autoprebacivanje", - "newblacklisted": "\/me [@%%NAME%%] Ova pjesma se nalazi na %%BLACKLIST%% blacklisti! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "newblacklisted": "\/me [@%%NAME%%] Ova pesma se nalazi na %%BLACKLIST%% blacklisti! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", "blinfo": "[@%%NAME%%] Blacklista Informacije - autor: %%AUTHOR%%, nalosv: %%TITLE%%, ID: %%SONGID%%", "blacklist": "blacklista", "cycleguard": "cycleguard", @@ -68,52 +68,52 @@ "usercommands": "komande korisnika", "motd": "PorukaDana", "welcomemsg": "poruka dobrodo\u0161lice", - "songstats": "statistika pjesme", + "songstats": "statistika pesme", "etarestriction": "eta ograni\u010denje", "voteskip": "glasaj skip", "voteskiplimit": "\/me [@%%NAME%%] GlasajSkip trenutno pode\u0161en na %%LIMIT%% mehova.", - "voteskipexceededlimit": "\/me @%%NAME%%, tvoja pjesma je prekora\u010dila GlasajSkip limit (%%LIMIT%% mehova).", + "voteskipexceededlimit": "\/me @%%NAME%%, tvoja pesma je prekora\u010dila GlasajSkip limit (%%LIMIT%% mehova).", "voteskipinvalidlimit": "\/me [@%%NAME%%] Pogre\u0161an GlasajSkip limit, molim poku\u0161aj ponovo koriste\u0107i brojeve koje odgovaraju broju mehova.", "voteskipsetlimit": "\/me [@%%NAME%%] GlasajSkip limit pode\u0161en na %%LIMIT%%.", - "activeusersintime": "\/me [@%%NAME%% Ve\u010d je bilo %%AMOUNT%% aktivnih korisnika u zadnjih %%TIME%% minuta.", + "activeusersintime": "\/me [@%%NAME%% Ve\u0107 je bilo %%AMOUNT%% aktivnih korisnika u zadnjih %%TIME%% minuta.", "maximumafktimeset": "\/me [@%%NAME%%] Maksimalno AFK trajanje pode\u0161eno na %%TIME%% minuta.", - "afkstatusreset": "\/me [@%%NAME%%] Je resetovao Afk status od @%%USERNAME%%.", + "afkstatusreset": "\/me [@%%NAME%%] Je resetovao AFK status od @%%USERNAME%%.", "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% je neaktivan ve\u0107 %%TIME%%.", "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% je neaktivan du\u017ee nego sto je %%BOTNAME%% online.", "autowoot": "\/me Mi preporu\u010dujemo PlugCubed za automatsko glasanje: http:\/\/plugcubed.net\/", - "brandambassador": "\/me Brand Ambassador je glas plug.dj korisnika. Oni promoviraju doga\u0111aje, spajaju zajednicu i dijele poruke plug.dj-a \u0161irom svijeta. Za vi\u0161e informacija: https:\/\/plug.dj\/ba", + "brandambassador": "\/me Brand Ambassador je glas plug.dj korisnika. Oni promovi\u0161u doga\u0111aje, spajaju zajednicu i dele poruke plug.dj-a \u0161irom sveta. Za vi\u0161e informacija: https:\/\/plug.dj\/ba", "bouncerplusrank": "\/me [@%%NAME%%] Moras biti Mena\u0111er ili vi\u0161i rank da bi uklju\u010dio Bouncer+.", "chatcleared": "\/me [@%%NAME%%] Je o\u010distio chat.", "deletechat": "\/me [@%%NAME%%] Je o\u010distio chat od %%USERNAME%%.", "commandslink": "\/me %%BOTNAME%% komande: %%LINK%%", "eatcookie": "\/me jede kola\u010d.", "nousercookie": "\/em ne vidi %%NAME%% u sobi i uzima kola\u010d samo za sebe.", - "selfcookie": "\/me @%%NAME%%, malo si \u0161krt, zar ne? Dajes kola\u010de sebi, bah. Podijeli malo i sa ostalima!", + "selfcookie": "\/me @%%NAME%%, malo si \u0161krt, zar ne? Dajes kola\u010de sebi, bah. Podeli malo i sa ostalima!", "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] CycleGuard pode\u0161en na %%TIME%% minuta.", "dclookuprank": "\/me [@%%NAME%%] Samo bounceri i vi\u0161i rank mogu dclookup za ostale.", "emojilist": "\/me Emoji lista: %%LINK%%", "notinwaitlist": "\/me @%%NAME%%, nisi na listi \u010dekanja.", - "eta": "\/me @%%NAME%% do\u0107i ces na red za otprilike %%TIME%%.", + "eta": "\/me @%%NAME%% do\u0107i \u0107e\u0161 na red za otprilike %%TIME%%.", "facebook": "\/me Lajkuj nas na facebook-u: %%LINK%%", "starterhelp": "\/me Ova slika ce ti pomo\u0107i za po\u010detak: %%LINK%%", "roulettejoin": "\/me @%%NAME%% se pridru\u017eio ruletu! (!leave ako zelis da napusti\u0161.)", "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% je bio u sobi ve\u0107%%TIME%%.", - "kickrank": "\/me [@%%NAME%%] Ne mo\u017ee\u0161 izbacit korisnike sa istim ili vi\u0161im rankom od tebe!", + "kickrank": "\/me [@%%NAME%%] Ne mo\u017ee\u0161 izbaciti korisnike sa istim ili vi\u0161im rankom od tebe!", "kick": "\/me [@%%NAME%%], @%%USERNAME%% Izba\u010den si iz zajednice na %%TIME%% minuta.", "kill": "\/me Isklju\u010divanje.", "logout": "\/me [@%%NAME%%] Odjavljujem se %%BOTNAME%%", "rouletteleave": "\/me @%%NAME%% je napustio rulet!", - "songlink": "\/me [@%%NAME%%] Link do trenutne pjesme: %%LINK%%", + "songlink": "\/me [@%%NAME%%] Link do trenutne pesme: %%LINK%%", "usedlockskip": "\/me [%%NAME%% je koristio LockSkip.]", - "lockskippos": "\/me [@%%NAME%%] Lockskip \u0107e sada premjestiti korisnika na poziciju %%POSITION%%.", + "lockskippos": "\/me [@%%NAME%%] Lockskip \u0107e sada premestiti korisnika na poziciju %%POSITION%%.", "lockguardtime": "\/me [@%%NAME%%] Lockguard pode\u0161en na %%TIME%% minuta.", - "maxlengthtime": "\/me [@%%NAME%%] Maksimalno trajanje pjesme pode\u0161eno na %%TIME%% minuta.", + "maxlengthtime": "\/me [@%%NAME%%] Maksimalno trajanje pesme pode\u0161eno na %%TIME%% minuta.", "motdset": "\/me Poruka Dana pode\u0161ena na: %%MSG%%", "motdintervalset": "\/me Interval Poruke dana pode\u0161en na %%INTERVAL%%.", "addbotwaitlist": "\/me @%%NAME%%, nemoj da me dodaje\u0161 na listu \u010dekanja, molim.", - "move": "\/me [%%NAME%% je koristio premje\u0161tanje.]", - "mutednotime": "\/me [@%%NAME%%] Je mutovano@%%USERNAME%%.", + "move": "\/me [%%NAME%% je koristio preme\u0161tanje.]", + "mutednotime": "\/me [@%%NAME%%] Je uti\u0161ao @%%USERNAME%%.", "mutedmaxtime": "\/me [@%%NAME%%] Mo\u017ee\u0161 mute maksimalno %%TIME%% minuta.", "mutedtime": "\/me [@%%NAME%%] Je mutovao @%%USERNAME%% na %%TIME%% minuta.", "unmuted": "\/me [@%%NAME%%] Je unmutovao @%%USERNAME%%.", @@ -122,23 +122,23 @@ "pong": "\/me Pong!", "reload": "\/me Vra\u0107am se ubrzo.", "removenotinwl": "\/me [@%%NAME%%] Navedeni korisnik @%%USERNAME%% nije na listi \u010dekanja.", - "roomrules": "\/me Pravila sobe mozes prona\u0107i ovdje: %%LINK%%", + "roomrules": "\/me Pravila sobe mozes prona\u0107i ovde: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Ukupno woot-ova: %%WOOTS%%, Ukupno meh-ova: %%MEHS%%, Ukupno dohva\u0107eno: %%GRABS%%.", "skip": "\/me [%%NAME%% je koristio prebacivanje.]", "madeby": "\/me Ovog bot-a je napravio %%NAME%%.", "activefor": "Ja sam ve\u0107 aktivan %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] Navedeni korisnik nije prona\u0111en. (Imena sa razmacima!)", - "swapwlonly": "\/me [@%%NAME%%] Molim zamjeni samo korisnike koji su na listi \u010dekanja!", - "swapping": "\/me Zamjennjujem %%NAME1%% sa %%NAME2%%.", + "swapwlonly": "\/me [@%%NAME%%] Molim zameni samo korisnike koji su na listi \u010dekanja!", + "swapping": "\/me Zamenjujem %%NAME1%% sa %%NAME2%%.", "genres": "\/me Dozvoljene \u017eanrove za ovu sobu mo\u017ee\u0161 prona\u0107i ovdje: %%LINK%%", "notbanned": "\/me [@%%NAME%%] Korisnik nije isklju\u010den.", "unmutedeveryone": "\/me [@%%NAME%%] Je unmutovao sve.", - "unmuteeveryonerank": "\/me [@%%NAME%%] Samo mena\u0111eri i vi\u0161i rank mogu unmutovati sve odjednom.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Samo menad\u017eeri i vi\u0161i rank mogu unmutovati sve odjednom.", "notmuted": "\/me [@%%NAME%%] taj korisnik nije mutovan.", "unmuterank": "\/me [@%%NAME%%] Ne mo\u017ees unmutovati osobu sa istim ili ve\u0107im rankom od tebe.", "commandscd": "\/me [@%%NAME%%] Razmak izme\u0111u komandi za korisnike pode\u0161en na %%TIME%% sekundi.", - "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Wotovi: %%WOOT%%, Mehovi: %%MEHS%%, Razmjer(w\/m): %%RATIO%%.", - "website": "\/me Molimo posjetite nasu web stranicu: %%LINK%%", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Wotovi: %%WOOT%%, Mehovi: %%MEHS%%, Razmer(w\/m): %%RATIO%%.", + "website": "\/me Molimo posetite nasu web stranicu: %%LINK%%", "youtube": "\/me [%%NAME%%] Pretplatite se na na\u0161 YouTube kanal: %%LINK%%", "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." } \ No newline at end of file From d6b786235514d98258bbd77380df930648995c02 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 14 May 2015 21:36:44 +0100 Subject: [PATCH 119/281] Added Latvian Translations --- lang/langIndex.json | 3 +- lang/lv.json | 144 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 lang/lv.json diff --git a/lang/langIndex.json b/lang/langIndex.json index 08f527f6..84c8dc84 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -5,5 +5,6 @@ "turkish": "https://rawgit.com/***REMOVED***/basicBot/master/lang/tr.json", "serbian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/sr.json", "chinese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/zh.json", - "dutch": "https://rawgit.com/***REMOVED***/basicBot/master/lang/nl.json" + "dutch": "https://rawgit.com/***REMOVED***/basicBot/master/lang/nl.json", + "latvian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/lv.json" } \ No newline at end of file diff --git a/lang/lv.json b/lang/lv.json new file mode 100644 index 00000000..7ed159cd --- /dev/null +++ b/lang/lv.json @@ -0,0 +1,144 @@ +{ + "nodatafound": "Nav iepriek\u0161\u0113jie dati atrasti.", + "currentlang": "\/me Valoda pa\u0161laik iestat\u012bta uz:%%LANGUAGE%%", + "langerror": "\/me Izv\u0113l\u0113taj\u0101 valod\u0101 nav pieejama. L\u016bdzu, apmekl\u0113jiet %%LINK%% lai atrast sarakstu ar valodu pieejamibu.", + "langset": "\/me Valoda tagad nomainita uz: %%LANGUAGE%%", + "retrievingdata": "Atguva iepriek\u0161 saglab\u0101tos datus", + "datarestored": "Iepriek\u0161 saglab\u0101tie dati veiksm\u012bgi iel\u0101d\u0113ti.", + "greyuser": "Tikai bouncers un lielakas pakapes var palaist botu.", + "bouncer": "Bots nevar p\u0101rvietot cilv\u0113kus, kad tas darbojas k\u0101 bouncers.", + "online": "\/me %%BOTNAME%% v%%VERSION%% onlaina!", + "welcome": "\/me Laipni aicin\u0101ts\/-a %%NAME%%", + "welcomeback": "\/me Laipni aicin\u0101ts\/-a atpaka\u013c, %%NAME%%", + "songknown": "\/me @%%NAME%%,\u0161\u012b dziesma ir nosp\u0113l\u0113ta DJ v\u0113stur\u0113.", + "timelimit": "\/me @%%NAME%%, j\u016bsu dziesma ir gar\u0101ka nek\u0101%%MAXLENGTH%% min\u016btes, jums ir nepiecie\u0161ama at\u013cauja, lai sp\u0113l\u0113tu gar\u0101kas dziesmas.", + "permissionownsong": "\/me :up: @%%NAME%% ir at\u013cauja, lai sp\u0113l\u0113tu produkciju!", + "isblacklisted": "\/me \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101!! Izlaizt ......", + "isopen": "\/me Rulete tagad ir atv\u0113rta! Ierakstiet !join lai piedal\u012btos!", + "winnerpicked": "\/me Uzvar\u0113t\u0101js ir parvietots! @%%NAME%% poz\u012bcij\u0101 %%POSITION%%.", + "ball": "\/me %%NAME%%'s jaut\u0101jums bija: \"%%QUESTION%%\" un %%BOTNAME%%'s atbilde ir: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% nav dubulto\u0161an\u0101s.", + "ghosting": "[%%NAME1%%] %%NAME2%% ir vai nu dubulto\u0161an\u0101s vai ne \u0161eit.", + "alreadyadding": "\/me Lietot\u0101js tiek pievienots! Main\u012bt v\u0113lamo poz\u012bciju, uz %%POSITION%%.", + "adding": "\/me Pievieno @%%NAME%% rind\u0101. Pa\u0161reiz\u0113j\u0101 rinda: %%POSITION%%.", + "usernotfound": "\/me Lietot\u0101js nav atrasts.", + "notdisconnected": "\/me @%%NAME%% nebija atvienots laik\u0101 ko esmu \u0161eit.", + "noposition": "\/me Nav p\u0113d\u0113ja vieta zin\u0101ma.Waitlist j\u0101atjaunina vismaz reizi lai re\u0123istr\u0113t lietot\u0101ja p\u0113d\u0113jo poz\u012bciju.", + "toolongago": "\/me @%%NAME%%'s p\u0113d\u0113jais atvienojums (DC vai pamest) bija p\u0101r\u0101k sen: %%TIME%%.", + "valid": "\/me @%%NAME%% atvienots %%TIME%% pirms un j\u0101b\u016bt poz\u012bcij\u0101 %%POSITION%%.", + "warning1": "\/me @%%NAME%%, J\u016bs esat prom %%TIME%%, l\u016bdzu atbild\u0113t 2 min\u016b\u0161u laik\u0101 vai ar\u012b tiksiet no\u0146emts no saraksta.", + "warning2": "\/me @%%NAME%%, J\u016bs tiksiet no\u0146emts d\u0113\u013c AFK dr\u012bz, ja j\u016bs neatbild\u0113siet.", + "afkremove": "\/me @%%NAME%%, J\u016bs tik\u0101t no\u0146emts, jo bij\u0101t AFK %%TIME%%. Jums bija poz\u012bcij\u0101%%POSITION%%. \u010catojat vismaz reizi %%MAXIMUMAFK%% min\u016btes, ja j\u016bs v\u0113laties, atska\u0146ot dziesmas.", + "caps": "\/me @%%NAME%%, Nelietojiet j\u016bsu caps lock pogu l\u016bdzu.", + "askskip": "\/me @%%NAME%%, nel\u016bgt izlaist.", + "spam": "\/me @%%NAME%%, l\u016bdzu, nespamot.", + "roomadvertising": "\/me @%%NAME%%, nelikt saites uz cit\u0101m telp\u0101m l\u016bdzu.", + "adfly": "\/me @%%NAME%%,L\u016bdzu main\u012bt savu autowoot programmu. M\u0113s iesak\u0101m PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Eti\u0137ete: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Neder\u012bga eti\u0137ete, m\u0113\u0123in\u0101t kaut ko citu. [Eti\u0137ete: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Nejau\u0161s GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] Neder\u012bgs piepras\u012bjums, m\u0113\u0123iniet v\u0113lreiz.", + "invalidtime": "\/me [@%%NAME%%] Neder\u012bgs laiks noteikts.", + "nouserspecified": "\/me [@%%NAME%%] Neviens lietot\u0101js nav preciz\u0113ts.", + "invaliduserspecified": "\/me [@%%NAME%%]Neder\u012bgs lietot\u0101js.", + "nolistspecified": "\/me [@%%NAME%%] Saraksts noteikts.", + "invalidlistspecified": "\/me [@%%NAME%%] Neder\u012bgs saraksts preciz\u0113ts.", + "novaliduserspecified": "\/me [@%%NAME%%] Nav der\u012bgs lietot\u0101js.", + "nolimitspecified": "\/me [@%%NAME%%] Nek\u0101du ierobe\u017eojumu preciz\u0113tu.", + "invalidlimitspecified": "\/me [@%%NAME%%] Neder\u012bga limits.", + "invalidpositionspecified": "\/me [@%%NAME%%] Neder\u012bga pozicija preciz\u0113ta.", + "whois": "\/me [%%NAME1%%] Lietot\u0101js: %%NAME2%%, ID: %%ID%%, Rangs: %%RANK%%, Pievienojies: %%JOINED%%, L\u012bmenis: %%LEVEL%%, Valoda: %%LANGUAGE%%, Avatars: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% iesl\u0113gts.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% izslegt\u0113ts.", + "cmddeletion": "komandu dz\u0113\u0161ana", + "afkremoval": "AFK no\u0146em\u0161ana", + "afksremoved": "AFK ir no\u0146emts", + "afklimit": "AFK limits", + "autodisable": "autom\u0101tiski atsl\u0113gts", + "autoskip": "autom\u0101tiski p\u0101rsl\u0113gts", + "newblacklisted": "\/me [@%%NAME%%] \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%]Melnais saraksts Info - autors: %%AUTHOR%%, virsraksts: %%TITLE%%, mid: %%SONGID%%", + "blacklist": "melnajs saraksts", + "cycleguard": "ri\u0146\u0137a sargs", + "timeguard": "laika sargs", + "chatfilter": "chatafiltrs", + "historyskip": "v\u0113stures izlai\u0161ana", + "lockdown": "Sl\u0113gts", + "lockguard": "sl\u0113gtssargs", + "usercommands": "lietot\u0101ja komandas", + "motd": "MotD", + "welcomemsg": "Sveiciena teksts", + "songstats": "dziesmu statistika", + "etarestriction": "eta ierobe\u017eojums", + "voteskip": "balso\u0161anas izlai\u0161ana", + "voteskiplimit": "\/me [@%%NAME%%] Balso\u0161anas izlai\u0161anas limits pa\u0161laik iestat\u012bts %%LIMIT%% mehiem.", + "voteskipexceededlimit": "\/me @%%NAME%%, J\u016bsu dziesma ir p\u0101rsniegusi balso\u0161anas izlai\u0161anas limitu (%%LIMIT%% mehi).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Neder\u012bga balso\u0161anas izlai\u0161ana , l\u016bdzu, m\u0113\u0123iniet v\u0113lreiz, izmantojot numuru, kas neizsaka mehu skaitu . ", + "voteskipsetlimit": "\/me [@%%NAME%%] Balso\u0161anas izlai\u0161anas limits iestat\u012bts %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%% Ir biju\u0161i %%AMOUNT%% Lietot\u0101ji \u010dat\u0101 %%TIME%% min\u016btes.", + "maximumafktimeset": "\/me [@%%NAME%%] Maksim\u0101lais AFK ilgums iestat\u012bts %%TIME%% min\u016btes.", + "afkstatusreset": "\/me [@%%NAME%%]No\u0146\u0113ma afk statusu no @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%%ir neakt\u012bvs ilg\u0101k nek\u0101 %%BOTNAME%%'s ir online.", + "autowoot": "\/me M\u0113s iesak\u0101m PlugCubed par autowooting: http:\/\/plugcubed.net\/", + "brandambassador": "\/me Brand Ambassador ir balss no plug.dj lietot\u0101jiem. Tie veicina pas\u0101kumus, iesaist\u012ba sabiedr\u012bbu un dal\u012btas plug.dj zi\u0146ojumiem vis\u0101 pasaul\u0113. Lai ieg\u016btu vair\u0101k inform\u0101cijas:https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Jums ir j\u0101b\u016bt Manager vai pat Bouncer +.", + "chatcleared": "\/me [@%%NAME%%] Izdzest chatu.", + "deletechat": "\/me [@%%NAME%%] izdzest t\u0113rz\u0113\u0161anu no %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% komandas: %%LINK%%", + "eatcookie": "\/me \u0113d cepumu.", + "nousercookie": "\/em nesaskata %%NAME%% iztab\u0101 un \u0113d cepumus pats.", + "selfcookie": "\/me @%%NAME%%, j\u016bs esat mazliet mantk\u0101r\u012bgs, vai ne? Pie\u0161\u0137ir cepumus sev, Doh. Dal\u0101s ar citiem cilv\u0113kiem!", + "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] Ri\u0146\u0137a sargs ir iestat\u012bts uz %%TIME%% min\u016bte (s).", + "dclookuprank": "\/me [@%%NAME%%] Tikai bouncers un vair\u0101k var dar\u012bt lookup citiem.", + "emojilist": "\/me Emociju sarakts: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, J\u016bs neesat waitlista.", + "eta": "\/me @%%NAME%% J\u016bs sasniegsiet kab\u012bni aptuveni%%TIME%%.", + "facebook": "\/me Like m\u016bs facebooka: %%LINK%%", + "starterhelp": "\/me \u0160is att\u0113ls k\u013c\u016bs jums s\u0101kum\u0101 plug:%%LINK%%", + "roulettejoin": "\/me @%%NAME%% pievienoj\u0101s ruletei! (!leave ja j\u016bs neno\u017e\u0113losiet.)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ir bijis telp\u0101 %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] J\u016bs nevarat kick lietot\u0101jus ar vien\u0101du vai augst\u0101ku rangu nek\u0101 jums!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% Jus tiekat izmests no iztabas %%TIME%% min\u016btes.", + "kill": "\/me IzSl\u0113gt.", + "logout": "\/me [@%%NAME%%] Izlogoties %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% pameta ruleti!", + "songlink": "\/me [@%%NAME%%] Saite uz pa\u0161reiz\u0113jo dziesmu: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% izmanto liegumu skipot.]", + "lockskippos": "\/me [@%%NAME%%] Lockskip tagad p\u0101rvietot DJ uz poziciju %%POSITION%%.", + "lockguardtime": "\/me [@%%NAME%%] Lockguard ir iestat\u012bts uz %%TIME%% min\u016bte (s).", + "maxlengthtime": "\/me [@%%NAME%%] TMaksim\u0101lais dziesma ilgums ir iestat\u012bts uz %%TIME%% min\u016btes.", + "motdset": "\/me MotD iestat\u012bts uz: %%MSG%%", + "motdintervalset": "\/me MotD interv\u0101ls iestat\u012bts uz %%INTERVAL%%.", + "addbotwaitlist": "\/me @%%NAME%%, nem\u0113\u0123iniet pievienot mani waitlista, l\u016bdzu.", + "move": "\/me [%%NAME%% lieto p\u0101rvietot.]", + "mutednotime": "\/me [@%%NAME%%] Liedz \u010datu @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] J\u016bs varat liegt \u010datu tikai maksim\u0101li %%TIME%% min\u016btes.", + "mutedtime": "\/me [@%%NAME%%] Liedz \u010datu@%%USERNAME%% uz %%TIME%% min\u016btes.", + "unmuted": "\/me [@%%NAME%%] Apklusin\u0101\u0161anas atcel\u0161ana @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] J\u016bs nevarat liegt \u010datu personam ar vien\u0101du vai augst\u0101ku rangu nek\u0101 jums.", + "oplist": "\/me OP saraksts: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me B\u016b\u0161u dr\u012bz atpaka\u013c.", + "removenotinwl": "\/me [@%%NAME%%] Noteiktais lietot\u0101js @%%USERNAME%% neatrodas waitlista.", + "roomrules": "\/me L\u016bdzu meklejat iztabas noteikumus \u0161eit: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Kop\u0101 woots: %%WOOTS%%, Kop\u0101 mehs: %%MEHS%%,Kop\u0101 grabs: %%GRABS%%.", + "skip": "\/me [%%NAME%% izmanto izlaist.]", + "madeby": "\/me \u0161is bots ir izgatavots %%NAME%%.", + "activefor": "Es esmu bijis akt\u012bvs %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Neder\u012bgs lietot\u0101js. (Nav v\u0101rdu ar atstarp\u0113m!)", + "swapwlonly": "\/me [@%%NAME%%] L\u016bdzu tikai mijmai\u0146as lietot\u0101jiem, kas atrodas waitlista!", + "swapping": "\/me P\u0101rnes %%NAME1%% ar %%NAME2%%.", + "genres": "\/me L\u016bdzu meklejiet pie\u013caujam\u0101s iztabas \u017eanrus \u0161eit: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] Lietot\u0101js nav nobanots.", + "unmutedeveryone": "\/me [@%%NAME%%] Apklusin\u0101\u0161anas atcel\u0161ana ikvienam.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Tikai p\u0101rvaldnieki un uz aug\u0161u var izsl\u0113gtu visus uzreiz.", + "notmuted": "\/me [@%%NAME%%] \u0161is lietot\u0101js netika apklusin\u0101ts.", + "unmuterank": "\/me [@%%NAME%%] J\u016bs nevarat apklusin\u0101t personas ar vien\u0101du vai augst\u0101ku rangu nek\u0101 jums.", + "commandscd": "\/me [@%%NAME%%] Komandas cooldown lietot\u0101jiem tagad ir iestat\u012bts uz %%TIME%% sekundes.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehi: %%MEHS%%, ratio (w\/m): %%RATIO%%.", + "website": "\/me L\u016bdzu, apmekl\u0113jiet m\u016bsu t\u012bmek\u013ca vietni:: %%LINK%%", + "youtube": "\/me [%%NAME%%]Abon\u0113t mus youtube: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file From d7102686a8ee7e4724ab465ef6e0ea4ec374060a Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 15 May 2015 22:42:28 +0100 Subject: [PATCH 120/281] First attempt to fix historySkip bug. Set a 2 second timeout before executing a historySkip. --- basicBot.js | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/basicBot.js b/basicBot.js index 18fc5750..d2b00f8c 100644 --- a/basicBot.js +++ b/basicBot.js @@ -898,37 +898,36 @@ } } - /*var alreadyPlayed = false; - for (var i = 0; i < basicBot.room.historyList.length; i++) { - if (basicBot.room.historyList[i][0] === obj.media.cid) { - var firstPlayed = basicBot.room.historyList[i][1]; - var plays = basicBot.room.historyList[i].length - 1; - var lastPlayed = basicBot.room.historyList[i][plays]; - API.sendChat(subChat(basicBot.chat.songknown, {plays: plays, timetotal: basicBot.roomUtilities.msToStr(Date.now() - firstPlayed), lasttime: basicBot.roomUtilities.msToStr(Date.now() - lastPlayed)})); - basicBot.room.historyList[i].push(+new Date()); - alreadyPlayed = true; - } - } - if (!alreadyPlayed) { - basicBot.room.historyList.push([obj.media.cid, +new Date()]); - }*/ - + clearTimeout(historySkip); if (basicBot.settings.historySkip) { var alreadyPlayed = false; var apihistory = API.getHistory(); var name = obj.dj.username; - for (var i = 0; i < apihistory.length; i++) { - if (apihistory[i].media.cid === obj.media.cid) { - API.sendChat(subChat(basicBot.chat.songknown, {name: name})); - API.moderateForceSkip(); - basicBot.room.historyList[i].push(+new Date()); - alreadyPlayed = true; + var historySkip = setTimeout(function () { + for (var i = 0; i < apihistory.length; i++) { + if (apihistory[i].media.cid === obj.media.cid) { + API.sendChat(subChat(basicBot.chat.songknown, {name: name})); + API.moderateForceSkip(); + basicBot.room.historyList[i].push(+new Date()); + alreadyPlayed = true; + } } - } - if (!alreadyPlayed) { - basicBot.room.historyList.push([obj.media.cid, +new Date()]); - } + if (!alreadyPlayed) { + basicBot.room.historyList.push([obj.media.cid, +new Date()]); + } + }, 2000); + } + + clearTimeout(basicBot.room.autoskipTimer); + if (basicBot.room.autoskip) { + var remaining = obj.media.duration * 1000; + basicBot.room.autoskipTimer = setTimeout(function () { + console.log("Skipping track."); + //API.sendChat('Song stuck, skipping...'); + API.moderateForceSkip(); + }, remaining + 3000); } + var newMedia = obj.media; if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { var name = obj.dj.username; From 3a17ea114936aa7e9d86fa2a132e103cbe3e5141 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 16 May 2015 01:37:47 +0100 Subject: [PATCH 121/281] Added cookie and 8ball responses --- lang/en.json | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index bdd9d257..28798d8a 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1,4 +1,61 @@ { + "cookies": [ + "has given you a chocolate chip cookie!", + "has given you a soft homemade oatmeal cookie!", + "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", + "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", + "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", + "gives you an enormous cookie. Poking it gives you more cookies. Weird.", + "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", + "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", + "gives you a fortune cookie. It reads \"Take a risk!\"", + "gives you a fortune cookie. It reads \"Go outside.\"", + "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", + "gives you a fortune cookie. It reads \"Do you even lift?\"", + "gives you a fortune cookie. It reads \"m808 pls\"", + "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", + "gives you a fortune cookie. It reads \"I love you.\"", + "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", + "gives you an Oreo cookie with a glass of milk!", + "gives you a rainbow cookie made with love :heart:", + "gives you an old cookie that was left out in the rain, it's moldy.", + "bakes you fresh cookies, it smells amazing." + ], + "balls": [ + "Signs point to yes.", + "Yes.", + "Reply hazy, try again.", + "Without a doubt.", + "My sources say no.", + "As I see it, yes.", + "You may rely on it.", + "Concentrate and ask again.", + "Outlook not so good.", + "It is decidedly so.", + "Better not tell you now.", + "Very doubtful.", + "Yes - definitely.", + "It is certain.", + "Cannot predict now.", + "Most likely.", + "Ask again later.", + "My reply is no.", + "Outlook good.", + "Don't count on it.", + "Yes, in due time.", + "My sources say no.", + "Definitely not.", + "You will have to wait.", + "I have my doubts.", + "Outlook so so.", + "Looks good to me!", + "Who knows?", + "Looking good!", + "Probably.", + "Are you kidding?", + "Don't bet on it.", + "Forget about it." + ], "nodatafound": "No previous data found.", "currentlang": "\/me Language currently set to: %%LANGUAGE%%", "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", @@ -89,7 +146,7 @@ "eatcookie": "\/me eats a cookie.", "nousercookie": "\/em doesn't see %%NAME%% in room and eats a cookie himself.", "selfcookie": "\/me @%%NAME%%, you're a bit greedy, aren't you? Giving cookies to yourself, bah. Share some with other people!", - "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] The cycleguard is set to %%TIME%% minute(s).", "dclookuprank": "\/me [@%%NAME%%] Only bouncers and above can do a lookup for others.", "emojilist": "\/me Emoji list: %%LINK%%", From d69e55ade863591051e9eadbb31717382e87c01d Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 16 May 2015 02:20:29 +0100 Subject: [PATCH 122/281] Added cookie and 8ball responses to language files. Bot will now get cookie and 8ball responses from the language files. --- basicBot.js | 70 ++++--------------------------------------------- lang/fr.json | 73 ++++++++++++++++++++++++++++++++++++++++++++++------ lang/lv.json | 59 +++++++++++++++++++++++++++++++++++++++++- lang/nl.json | 59 +++++++++++++++++++++++++++++++++++++++++- lang/pt.json | 59 +++++++++++++++++++++++++++++++++++++++++- lang/sr.json | 59 +++++++++++++++++++++++++++++++++++++++++- lang/tr.json | 73 ++++++++++++++++++++++++++++++++++++++++++++++------ lang/zh.json | 59 +++++++++++++++++++++++++++++++++++++++++- 8 files changed, 425 insertions(+), 86 deletions(-) diff --git a/basicBot.js b/basicBot.js index d2b00f8c..4c4a31c7 100644 --- a/basicBot.js +++ b/basicBot.js @@ -226,41 +226,6 @@ ["nsfw", "The song you contained was NSFW (image or sound). "], ["unavailable", "The song you played was not available for some users. "] ], - ball: [ - "Signs point to yes.", - "Yes.", - "Reply hazy, try again.", - "Without a doubt.", - "My sources say no.", - "As I see it, yes.", - "You may rely on it.", - "Concentrate and ask again.", - "Outlook not so good.", - "It is decidedly so.", - "Better not tell you now.", - "Very doubtful.", - "Yes - definitely.", - "It is certain.", - "Cannot predict now.", - "Most likely.", - "Ask again later.", - "My reply is no.", - "Outlook good.", - "Don't count on it.", - "Yes, in due time.", - "My sources say no.", - "Definitely not.", - "You will have to wait.", - "I have my doubts.", - "Outlook so so.", - "Looks good to me!", - "Who knows?", - "Looking good!", - "Probably.", - "Are you kidding?", - "Don't bet on it.", - "Forget about it." - ], afkpositionCheck: 15, afkRankCheck: "ambassador", motdEnabled: false, @@ -1166,9 +1131,7 @@ eventUserskip: $.proxy(this.eventUserskip, this), eventUserjoin: $.proxy(this.eventUserjoin, this), eventUserleave: $.proxy(this.eventUserleave, this), - //eventUserfan: $.proxy(this.eventUserfan, this), //eventFriendjoin: $.proxy(this.eventFriendjoin, this), - //eventFanjoin: $.proxy(this.eventFanjoin, this), eventVoteupdate: $.proxy(this.eventVoteupdate, this), eventCurateupdate: $.proxy(this.eventCurateupdate, this), eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), @@ -1185,7 +1148,6 @@ API.on(API.USER_SKIP, this.proxy.eventUserskip); API.on(API.USER_JOIN, this.proxy.eventUserjoin); API.on(API.USER_LEAVE, this.proxy.eventUserleave); - //API.on(API.USER_FAN, this.proxy.eventUserfan); API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); @@ -1200,7 +1162,6 @@ API.off(API.USER_SKIP, this.proxy.eventUserskip); API.off(API.USER_JOIN, this.proxy.eventUserjoin); API.off(API.USER_LEAVE, this.proxy.eventUserleave); - //API.off(API.USER_FAN, this.proxy.eventUserfan); API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); @@ -1588,9 +1549,9 @@ var msg = chat.message; var argument = msg.substring(cmd.length + 1); var randomUser = Math.floor(Math.random() * crowd.length); - var randomBall = Math.floor(Math.random() * basicBot.settings.ball.length); + var randomBall = Math.floor(Math.random() * basicBot.chat.balls.length); var randomSentence = Math.floor(Math.random() * 1); - API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.settings.ball[randomBall]})); + API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.chat.balls[randomBall]})); } } }, @@ -1747,30 +1708,9 @@ command: 'cookie', rank: 'user', type: 'startsWith', - cookies: ['has given you a chocolate chip cookie!', - 'has given you a soft homemade oatmeal cookie!', - 'has given you a plain, dry, old cookie. It was the last one in the bag. Gross.', - 'gives you a sugar cookie. What, no frosting and sprinkles? 0/10 would not touch.', - 'gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!', - 'gives you an enormous cookie. Poking it gives you more cookies. Weird.', - 'gives you a fortune cookie. It reads "Why aren\'t you working on any projects?"', - 'gives you a fortune cookie. It reads "Give that special someone a compliment"', - 'gives you a fortune cookie. It reads "Take a risk!"', - 'gives you a fortune cookie. It reads "Go outside."', - 'gives you a fortune cookie. It reads "Don\'t forget to eat your veggies!"', - 'gives you a fortune cookie. It reads "Do you even lift?"', - 'gives you a fortune cookie. It reads "m808 pls"', - 'gives you a fortune cookie. It reads "If you move your hips, you\'ll get all the ladies."', - 'gives you a fortune cookie. It reads "I love you."', - 'gives you a Golden Cookie. You can\'t eat it because it is made of gold. Dammit.', - 'gives you an Oreo cookie with a glass of milk!', - 'gives you a rainbow cookie made with love :heart:', - 'gives you an old cookie that was left out in the rain, it\'s moldy.', - 'bakes you fresh cookies, it smells amazing.' - ], - getCookie: function () { - var c = Math.floor(Math.random() * this.cookies.length); - return this.cookies[c]; + getCookie: function (chat) { + var c = Math.floor(Math.random() * basicBot.chat.cookies.length); + return basicBot.chat.cookies[c]; }, functionality: function (chat, cmd) { if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); diff --git a/lang/fr.json b/lang/fr.json index 7c921004..1622c906 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -1,8 +1,65 @@ { + "cookies": [ + "has given you a chocolate chip cookie!", + "has given you a soft homemade oatmeal cookie!", + "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", + "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", + "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", + "gives you an enormous cookie. Poking it gives you more cookies. Weird.", + "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", + "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", + "gives you a fortune cookie. It reads \"Take a risk!\"", + "gives you a fortune cookie. It reads \"Go outside.\"", + "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", + "gives you a fortune cookie. It reads \"Do you even lift?\"", + "gives you a fortune cookie. It reads \"m808 pls\"", + "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", + "gives you a fortune cookie. It reads \"I love you.\"", + "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", + "gives you an Oreo cookie with a glass of milk!", + "gives you a rainbow cookie made with love :heart:", + "gives you an old cookie that was left out in the rain, it's moldy.", + "bakes you fresh cookies, it smells amazing." + ], + "balls": [ + "Signs point to yes.", + "Yes.", + "Reply hazy, try again.", + "Without a doubt.", + "My sources say no.", + "As I see it, yes.", + "You may rely on it.", + "Concentrate and ask again.", + "Outlook not so good.", + "It is decidedly so.", + "Better not tell you now.", + "Very doubtful.", + "Yes - definitely.", + "It is certain.", + "Cannot predict now.", + "Most likely.", + "Ask again later.", + "My reply is no.", + "Outlook good.", + "Don't count on it.", + "Yes, in due time.", + "My sources say no.", + "Definitely not.", + "You will have to wait.", + "I have my doubts.", + "Outlook so so.", + "Looks good to me!", + "Who knows?", + "Looking good!", + "Probably.", + "Are you kidding?", + "Don't bet on it.", + "Forget about it." + ], "nodatafound": "Aucune donn\u00e9e trouv\u00e9e.", - "currentlang": "\/me Language currently set to: %%LANGUAGE%%", - "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", - "langset": "\/me Language now set to: %%LANGUAGE%%", + "currentlang": "\/me La langue actuellement utilis\u00e9e est : %%LANGUAGE%%", + "langerror": "\/me La langue que vous avez s\u00e9lectionn\u00e9e n'est pas disponible. Veuillez visiter %%LINK%% pour trouver la liste des langues disponibles.", + "langset": "\/me La langue est d\u00e9sormais : %%LANGUAGE%%:", "retrievingdata": "R\u00e9cup\u00e9ration des donn\u00e9es.", "datarestored": "Succ\u00e8s de la r\u00e9cup\u00e9ration des donn\u00e9s.", "greyuser": "Uniquement les Videurs et les rangs sup\u00e9rieurs peuvent lancer le bot.", @@ -17,7 +74,7 @@ "isopen": "\/me La roulette est maintenant ouverte ! Tapez !join pour participer !", "winnerpicked": "\/me Un gagnant a \u00e9t\u00e9 trouv\u00e9 ! @%%NAME%% \u00e0 la position %%POSITION%%.", "ball": "\/me %%NAME%% a pos\u00e9 la question: \"%%QUESTION%%\" et la r\u00e9ponse de %%BOTNAME%% est: \"%%RESPONSE%%\"", - "notghosting": "[%%NAME1%%] %%NAME2%% is not ghosting.", + "notghosting": "[%%NAME1%%] %%NAME2%% n'est pas en fantome.", "ghosting": "[%%NAME1%%] %%NAME2%% is either ghosting or not here.", "alreadyadding": "\/me L'utilisateur est d\u00e9j\u00e0 en ajout ! Changement de la position d\u00e9sir\u00e9e \u00e0 %%POSITION%%.", "adding": "\/me Ajout de @%%NAME%% \u00e0 la file d'attente. Queue actuelle : %%POSITION%%.", @@ -52,8 +109,8 @@ "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% d\u00e9sactiv\u00e9e.", "cmddeletion": "Suppression de commande", "afkremoval": "Retirer les AFK", - "afksremoved": "AFK's removed", - "afklimit": "AFK limit", + "afksremoved": "AFK retirer", + "afklimit": "Limite d'AFK", "autodisable": "Autod\u00e9sactivation", "autoskip": "autoskip", "newblacklisted": "\/me [@%%NAME%%] Cette musique devrait \u00eatre sur la liste noire %%BLACKLIST%% ! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", @@ -81,7 +138,7 @@ "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% a \u00e9t\u00e9 inactif pendant %%TIME%%.", "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% est inactif depuis plus longtemps que %%BOTNAME%%'s est en ligne.", "autowoot": "\/me Nous recommandons PlugCubed pour l'autowoot : http:\/\/plugcubed.net\/", - "brandambassador": "\/me Un Brand Ambassador est la voix des utilisateurs de plug.dj. Il promouvoient les \u00e9v\u00e8nements, font participer la communaut\u00e9 et partagent le message de plug.dj autour du monde. Pour plus d'info : https:\/\/plug.dj\/ba", + "brandambassador": "\/me Un Brand Ambassador est la voix des utilisateurs de plug.dj. Ils promouvoient les \u00e9v\u00e8nements, font participer la communaut\u00e9 et partagent le message de plug.dj autour du monde. Pour plus d'info : https:\/\/plug.dj\/ba", "bouncerplusrank": "\/me [@%%NAME%%] Vous devez \u00eatre Gestionnaire ou plus pour pouvoir activer Bouncer+.", "chatcleared": "\/me [@%%NAME%%] A nettoy\u00e9 le chat.", "deletechat": "\/me [@%%NAME%%] A nettoy\u00e9 le chat de %%USERNAME%%.", @@ -89,7 +146,7 @@ "eatcookie": "\/me mange un cookie.", "nousercookie": "\/me ne voit pas %%NAME%% dans la salle et mange le cookie.", "selfcookie": "\/me @%%NAME%%, tu es un peu radin, non ? Donner des cookies \u00e0 toi-m\u00eame... Partage-les avec d'autres gens !", - "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] Le cycleguard est param\u00e9tr\u00e9 pour %%TIME%% minute(s).", "dclookuprank": "\/me [@%%NAME%%] Uniquement les Videurs peuvent v\u00e9rifier pour les autres.", "emojilist": "\/me Liste des Emoji : %%LINK%%", diff --git a/lang/lv.json b/lang/lv.json index 7ed159cd..1031121a 100644 --- a/lang/lv.json +++ b/lang/lv.json @@ -1,4 +1,61 @@ { + "cookies": [ + "has given you a chocolate chip cookie!", + "has given you a soft homemade oatmeal cookie!", + "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", + "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", + "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", + "gives you an enormous cookie. Poking it gives you more cookies. Weird.", + "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", + "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", + "gives you a fortune cookie. It reads \"Take a risk!\"", + "gives you a fortune cookie. It reads \"Go outside.\"", + "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", + "gives you a fortune cookie. It reads \"Do you even lift?\"", + "gives you a fortune cookie. It reads \"m808 pls\"", + "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", + "gives you a fortune cookie. It reads \"I love you.\"", + "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", + "gives you an Oreo cookie with a glass of milk!", + "gives you a rainbow cookie made with love :heart:", + "gives you an old cookie that was left out in the rain, it's moldy.", + "bakes you fresh cookies, it smells amazing." + ], + "balls": [ + "Signs point to yes.", + "Yes.", + "Reply hazy, try again.", + "Without a doubt.", + "My sources say no.", + "As I see it, yes.", + "You may rely on it.", + "Concentrate and ask again.", + "Outlook not so good.", + "It is decidedly so.", + "Better not tell you now.", + "Very doubtful.", + "Yes - definitely.", + "It is certain.", + "Cannot predict now.", + "Most likely.", + "Ask again later.", + "My reply is no.", + "Outlook good.", + "Don't count on it.", + "Yes, in due time.", + "My sources say no.", + "Definitely not.", + "You will have to wait.", + "I have my doubts.", + "Outlook so so.", + "Looks good to me!", + "Who knows?", + "Looking good!", + "Probably.", + "Are you kidding?", + "Don't bet on it.", + "Forget about it." + ], "nodatafound": "Nav iepriek\u0161\u0113jie dati atrasti.", "currentlang": "\/me Valoda pa\u0161laik iestat\u012bta uz:%%LANGUAGE%%", "langerror": "\/me Izv\u0113l\u0113taj\u0101 valod\u0101 nav pieejama. L\u016bdzu, apmekl\u0113jiet %%LINK%% lai atrast sarakstu ar valodu pieejamibu.", @@ -89,7 +146,7 @@ "eatcookie": "\/me \u0113d cepumu.", "nousercookie": "\/em nesaskata %%NAME%% iztab\u0101 un \u0113d cepumus pats.", "selfcookie": "\/me @%%NAME%%, j\u016bs esat mazliet mantk\u0101r\u012bgs, vai ne? Pie\u0161\u0137ir cepumus sev, Doh. Dal\u0101s ar citiem cilv\u0113kiem!", - "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] Ri\u0146\u0137a sargs ir iestat\u012bts uz %%TIME%% min\u016bte (s).", "dclookuprank": "\/me [@%%NAME%%] Tikai bouncers un vair\u0101k var dar\u012bt lookup citiem.", "emojilist": "\/me Emociju sarakts: %%LINK%%", diff --git a/lang/nl.json b/lang/nl.json index eb5b0e3b..b465325c 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -1,4 +1,61 @@ { + "cookies": [ + "has given you a chocolate chip cookie!", + "has given you a soft homemade oatmeal cookie!", + "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", + "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", + "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", + "gives you an enormous cookie. Poking it gives you more cookies. Weird.", + "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", + "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", + "gives you a fortune cookie. It reads \"Take a risk!\"", + "gives you a fortune cookie. It reads \"Go outside.\"", + "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", + "gives you a fortune cookie. It reads \"Do you even lift?\"", + "gives you a fortune cookie. It reads \"m808 pls\"", + "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", + "gives you a fortune cookie. It reads \"I love you.\"", + "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", + "gives you an Oreo cookie with a glass of milk!", + "gives you a rainbow cookie made with love :heart:", + "gives you an old cookie that was left out in the rain, it's moldy.", + "bakes you fresh cookies, it smells amazing." + ], + "balls": [ + "Signs point to yes.", + "Yes.", + "Reply hazy, try again.", + "Without a doubt.", + "My sources say no.", + "As I see it, yes.", + "You may rely on it.", + "Concentrate and ask again.", + "Outlook not so good.", + "It is decidedly so.", + "Better not tell you now.", + "Very doubtful.", + "Yes - definitely.", + "It is certain.", + "Cannot predict now.", + "Most likely.", + "Ask again later.", + "My reply is no.", + "Outlook good.", + "Don't count on it.", + "Yes, in due time.", + "My sources say no.", + "Definitely not.", + "You will have to wait.", + "I have my doubts.", + "Outlook so so.", + "Looks good to me!", + "Who knows?", + "Looking good!", + "Probably.", + "Are you kidding?", + "Don't bet on it.", + "Forget about it." + ], "nodatafound": "Geen vorige data gevonden.", "currentlang": "\/me De taal is momenteel ingesteld op: %%LANGUAGE%%", "langerror": "\/me De taal die je hebt geselecteerd is niet beschikbaar. Bezoek alsjeblieft %%LINK%% om een lijst te bekijken met de beschikbare talen.", @@ -89,7 +146,7 @@ "eatcookie": "\/me is een koekje aan het eten", "nousercookie": "\/me ziet %%NAME%% niet in de gemeenschap en eet het koekje dan maar zelf op.", "selfcookie": "\/me @%%NAME%%, je bent nogal gierig, nietwaar? Koekjes aan jezelf geven, bah. Deel wat met andere mensen!", - "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] De cycleguard is ingesteld op %%TIME%% minu(u)t(en).", "dclookuprank": "\/me [@%%NAME%%] Alleen bouncers of hogere ranking kunnen iets opzoeken voor anderen.", "emojilist": "\/me Lijst met Emoji's: %%LINK%%", diff --git a/lang/pt.json b/lang/pt.json index c123b7a0..2b4c5d14 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -1,4 +1,61 @@ { + "cookies": [ + "deu-lhe um biscoito de chocolate!", + "deu-lhe um biscoito caseiro de aveia!", + "deu-lhe um biscoito podre e sujo. Era o \u00faltimo do pacote. Que nojo!", + "deu-lhe um bolinho de a\u00e7\u00facar. O qu\u00ea? Sem estrelinhas e povilho? Eu n\u00e3o tocaria.", + "deu-lhe um biscoito de chocolate. Oh, n\u00e3o, s\u00e3o passas. Eca!", + "deu-lhe um enorme biscoito. Quando o toca, mais biscoitos aparecem. Estranho.", + "deu-lhe um biscoito da sorte, tem escrito: \"Por que voc\u00ea n\u00e3o est\u00e1 trabalhando?\"", + "deu-lhe um biscoito da sorte, tem escrito: \"Cumprimente agora a pessoa que voc\u00ea ama\"", + "deu-lhe um biscoito da sorte, tem escrito: \"Arrisque-se!\"", + "deu-lhe um biscoito da sorte, tem escrito: \"Vai dar uma volta.\"", + "deu-lhe um biscoito da sorte, tem escrito: \"N\u00e3o esque\u00e7a de comer os vegetais\"", + "deu-lhe um biscoito da sorte, tem escrito: \"Voc\u00ea levanta mesmo?!\"", + "deu-lhe um biscoito da sorte, tem escrito: \"Seje menas\"", + "deu-lhe um biscoito da sorte, tem escrito: \"Se voc\u00ea mecher o quadril, voc\u00ea vai pegar todas as garotas!\"", + "deu-lhe um biscoito da sorte, tem escrito: \"Eu te amo\"", + "deu-lhe um biscoito de ouro. N\u00e3o d\u00e1 pra comer... Droga!", + "deu-lhe um Oreo e um copo de leite.", + "deu-lhe um biscoito arco-\u00edris feito com amor :heart:", + "deu-lhe um biscoito que foi esquecido na chuva... e est\u00e1 mofado.", + "te trouxe biscoitos fresquinhos... parecem deliciosos!" + ], + "balls": [ + "Sinais apontam que sim.", + "Sim.", + "Tente novamente mais tarde.", + "Sem d\u00favidas.", + "Minhas fontes dizem que n\u00e3o.", + "Ao meu ver, sim.", + "Pode contar com isso.", + "Concentre-se e pergunte novamente.", + "Acho que n\u00e3o.", + "Definitivamente.", + "Melhor n\u00e3o te falar...", + "\u00c9 duvidoso.", + "Sim. Definitivamente!", + "\u00c9 certo.", + "N\u00e3o posso prever agora.", + "Provavelmente.", + "Pergunte-me depois.", + "Minha resposta \u00e9 n\u00e3o.", + "Parece bom.", + "N\u00e3o conte com isso.", + "Sim, em seu devido tempo.", + "Minhas fontes dizem que n\u00e3o.", + "Definitivamente n\u00e3o.", + "Voc\u00ea vai ter que esperar...", + "Eu tenho minhas d\u00favidas.", + "Um tanto...", + "Parece bom para mim!", + "Quem sabe?", + "Claro!", + "Provavelmente.", + "Est\u00e1 brincando?", + "N\u00e3o aposte nisso.", + "Esque\u00e7a..." + ], "nodatafound": "Dados anteriores n\u00e3o encontrados.", "currentlang": "\/me Idioma definido: %%LANGUAGE%%", "langerror": "\/me O idioma que voc\u00ea selecionou n\u00e3o est\u00e1 dispon\u00edvel. Por favor, visite %%LINK%% para encontrar uma lista de idiomas dispon\u00edveis.", @@ -89,7 +146,7 @@ "eatcookie": "\/me ama cookies.", "nousercookie": "\/em N\u00e3o vejo %%NAME%% na sala. Vou comer esse cookie sozinho.", "selfcookie": "\/me @%%NAME%%, voc\u00ea \u00e9 mesquinho, n\u00e9? Dando cookies a si mesmo, bah. Compartilhe um pouco com os outros!", - "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] A prote\u00e7\u00e3o de ciclo agora \u00e9: %%TIME%% minuto(s).", "dclookuprank": "\/me [@%%NAME%%] Somente Seguran\u00e7as ou superiores podem usar !dclookup em outros usu\u00e1rios.", "emojilist": "\/me Emojis: %%LINK%%", diff --git a/lang/sr.json b/lang/sr.json index 3517775f..183de819 100644 --- a/lang/sr.json +++ b/lang/sr.json @@ -1,4 +1,61 @@ { + "cookies": [ + "has given you a chocolate chip cookie!", + "has given you a soft homemade oatmeal cookie!", + "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", + "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", + "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", + "gives you an enormous cookie. Poking it gives you more cookies. Weird.", + "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", + "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", + "gives you a fortune cookie. It reads \"Take a risk!\"", + "gives you a fortune cookie. It reads \"Go outside.\"", + "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", + "gives you a fortune cookie. It reads \"Do you even lift?\"", + "gives you a fortune cookie. It reads \"m808 pls\"", + "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", + "gives you a fortune cookie. It reads \"I love you.\"", + "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", + "gives you an Oreo cookie with a glass of milk!", + "gives you a rainbow cookie made with love :heart:", + "gives you an old cookie that was left out in the rain, it's moldy.", + "bakes you fresh cookies, it smells amazing." + ], + "balls": [ + "Signs point to yes.", + "Yes.", + "Reply hazy, try again.", + "Without a doubt.", + "My sources say no.", + "As I see it, yes.", + "You may rely on it.", + "Concentrate and ask again.", + "Outlook not so good.", + "It is decidedly so.", + "Better not tell you now.", + "Very doubtful.", + "Yes - definitely.", + "It is certain.", + "Cannot predict now.", + "Most likely.", + "Ask again later.", + "My reply is no.", + "Outlook good.", + "Don't count on it.", + "Yes, in due time.", + "My sources say no.", + "Definitely not.", + "You will have to wait.", + "I have my doubts.", + "Outlook so so.", + "Looks good to me!", + "Who knows?", + "Looking good!", + "Probably.", + "Are you kidding?", + "Don't bet on it.", + "Forget about it." + ], "nodatafound": "Prethodni podaci nisu prona\u0111eni.", "currentlang": "\/me Jezik podesen na: %%LANGUAGE%%", "langerror": "\/me Jezik koji ste odabrali nije dostupan. Poseti %%LINK%% da bi pronasao dostupne jezike.", @@ -89,7 +146,7 @@ "eatcookie": "\/me jede kola\u010d.", "nousercookie": "\/em ne vidi %%NAME%% u sobi i uzima kola\u010d samo za sebe.", "selfcookie": "\/me @%%NAME%%, malo si \u0161krt, zar ne? Dajes kola\u010de sebi, bah. Podeli malo i sa ostalima!", - "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] CycleGuard pode\u0161en na %%TIME%% minuta.", "dclookuprank": "\/me [@%%NAME%%] Samo bounceri i vi\u0161i rank mogu dclookup za ostale.", "emojilist": "\/me Emoji lista: %%LINK%%", diff --git a/lang/tr.json b/lang/tr.json index 87576956..f880b0cc 100644 --- a/lang/tr.json +++ b/lang/tr.json @@ -1,16 +1,73 @@ { + "cookies": [ + "has given you a chocolate chip cookie!", + "has given you a soft homemade oatmeal cookie!", + "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", + "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", + "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", + "gives you an enormous cookie. Poking it gives you more cookies. Weird.", + "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", + "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", + "gives you a fortune cookie. It reads \"Take a risk!\"", + "gives you a fortune cookie. It reads \"Go outside.\"", + "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", + "gives you a fortune cookie. It reads \"Do you even lift?\"", + "gives you a fortune cookie. It reads \"m808 pls\"", + "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", + "gives you a fortune cookie. It reads \"I love you.\"", + "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", + "gives you an Oreo cookie with a glass of milk!", + "gives you a rainbow cookie made with love :heart:", + "gives you an old cookie that was left out in the rain, it's moldy.", + "bakes you fresh cookies, it smells amazing." + ], + "balls": [ + "Signs point to yes.", + "Yes.", + "Reply hazy, try again.", + "Without a doubt.", + "My sources say no.", + "As I see it, yes.", + "You may rely on it.", + "Concentrate and ask again.", + "Outlook not so good.", + "It is decidedly so.", + "Better not tell you now.", + "Very doubtful.", + "Yes - definitely.", + "It is certain.", + "Cannot predict now.", + "Most likely.", + "Ask again later.", + "My reply is no.", + "Outlook good.", + "Don't count on it.", + "Yes, in due time.", + "My sources say no.", + "Definitely not.", + "You will have to wait.", + "I have my doubts.", + "Outlook so so.", + "Looks good to me!", + "Who knows?", + "Looking good!", + "Probably.", + "Are you kidding?", + "Don't bet on it.", + "Forget about it." + ], "nodatafound": "Veriler bulunamadi.", - "currentlang": "\/me Bot dili degistirildi: %%LANGUAGE%%", + "currentlang": "\/me Suanki bot dili: %%LANGUAGE%%", "langerror": "\/me Sectiginiz dil bulunamadi. Dil listesi icin %%LINK%% linkine tiklayin.", - "langset": "\/me Odo dili suanda degistirildi: %%LANGUAGE%%", + "langset": "\/me Bot dili suanda degistirildi: %%LANGUAGE%%", "retrievingdata": "Yedeklenen veriler aliniyor.", - "datarestored": "Yedeklenen verielr basariyla alindi.", + "datarestored": "Yedeklenen veriler basariyla alindi.", "greyuser": "Botu sadece yetkililer calistirabilir.", "bouncer": "Bouncer yetkisinde olanlar botu calistirabilir.", "online": "\/me %%BOTNAME%% v%%VERSION%% acildi!", - "welcome": "\/me Hosgeldin %%NAME%%", - "welcomeback": "\/me Yeniden hosgeldin, %%NAME%%", - "songknown": "\/me @%%NAME%%, Actiginiz sarki daha onecen calindi.", + "welcome": "\/me Hosgeldiniz %%NAME%%", + "welcomeback": "\/me Tekrar hosgeldin, %%NAME%%", + "songknown": "\/me @%%NAME%%, Actiginiz sarki daha once acildi.", "timelimit": "\/me @%%NAME%%, Sarkiniz %%MAXLENGTH%% dakikadan uzun, daha uzun sarki calmak icin yetki gerekiyor.", "permissionownsong": "\/me :up: @%%NAME%% sarkiyi oynatman icin yetkin var.", "isblacklisted": "\/me Sarki %%BLACKLIST%% yasak listesinde! Geciliyor...", @@ -35,7 +92,7 @@ "roomadvertising": "\/me @%%NAME%%, diger odalarin reklamini yapmayin.", "adfly": "\/me @%%NAME%%, lutfen otowootunuzu degistirin. Onerilen: http:\/\/plugcubed.net\/", "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Etiketler: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] gecersiz etiketler, baska etiket deneyin. [Etiketler: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] gecersiz etiket, baska etiket deneyin. [Etiket: %%TAGS%%]", "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Rastgele GIF]", "invalidgifrandom": "\/me [@%%NAME%%] gecersiz istek, tekrar deneyin.", "invalidtime": "\/me [@%%NAME%%] gecersiz zaman yazildi.", @@ -89,7 +146,7 @@ "eatcookie": "\/me Cerezler.", "nousercookie": "\/em Odada %%NAME%% gozukmuyor.", "selfcookie": "\/me @%%NAME%%, sen biraz ac gozlusun sanirsam, lutfen diger kullanicilarla cerezlerini paylas!", - "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] CYCLguard %%TIME%% dakika(lar) olarak ayarlandi.", "dclookuprank": "\/me [@%%NAME%%] Sadece yukaridaki kullanicilar icin arama yapabilirsiniz.", "emojilist": "\/me Gulucuk Listesi: %%LINK%%", diff --git a/lang/zh.json b/lang/zh.json index 10834899..6edd19cb 100644 --- a/lang/zh.json +++ b/lang/zh.json @@ -1,4 +1,61 @@ { + "cookies": [ + "has given you a chocolate chip cookie!", + "has given you a soft homemade oatmeal cookie!", + "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", + "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", + "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", + "gives you an enormous cookie. Poking it gives you more cookies. Weird.", + "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", + "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", + "gives you a fortune cookie. It reads \"Take a risk!\"", + "gives you a fortune cookie. It reads \"Go outside.\"", + "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", + "gives you a fortune cookie. It reads \"Do you even lift?\"", + "gives you a fortune cookie. It reads \"m808 pls\"", + "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", + "gives you a fortune cookie. It reads \"I love you.\"", + "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", + "gives you an Oreo cookie with a glass of milk!", + "gives you a rainbow cookie made with love :heart:", + "gives you an old cookie that was left out in the rain, it's moldy.", + "bakes you fresh cookies, it smells amazing." + ], + "balls": [ + "Signs point to yes.", + "Yes.", + "Reply hazy, try again.", + "Without a doubt.", + "My sources say no.", + "As I see it, yes.", + "You may rely on it.", + "Concentrate and ask again.", + "Outlook not so good.", + "It is decidedly so.", + "Better not tell you now.", + "Very doubtful.", + "Yes - definitely.", + "It is certain.", + "Cannot predict now.", + "Most likely.", + "Ask again later.", + "My reply is no.", + "Outlook good.", + "Don't count on it.", + "Yes, in due time.", + "My sources say no.", + "Definitely not.", + "You will have to wait.", + "I have my doubts.", + "Outlook so so.", + "Looks good to me!", + "Who knows?", + "Looking good!", + "Probably.", + "Are you kidding?", + "Don't bet on it.", + "Forget about it." + ], "nodatafound": "\u6c92\u6709\u767c\u73fe\u4ee5\u524d\u7684\u6578\u64da.", "currentlang": "\/me \u76ee\u524d\u8a9e\u8a00\u8a2d\u7f6e\u70ba: %%LANGUAGE%%", "langerror": "\/me \u4f60\u6240\u9078\u64c7\u7684\u8a9e\u8a00\u4e0d\u53ef\u7528. \u8acb\u8a2a\u554f %%LINK%% \u4ee5\u67e5\u8a62\u5217\u8868\u88e1\u53ef\u7528\u7684\u8a9e\u8a00.", @@ -89,7 +146,7 @@ "eatcookie": "\/me \u5403\u4e00\u500b\u66f2\u5947\u9905.", "nousercookie": "\/em \u770b\u4e0d\u898b %%NAME%% \u5728\u623f\u9593\u88e1 \u4ee5\u53ca \u4ed6\u81ea\u5df1\u5403\u4e00\u500b\u66f2\u5947\u9905.", "selfcookie": "\/me @%%NAME%%, \u4f60\u6709\u9ede\u8caa\u5fc3\u5594, \u4e0d\u662f\u55ce? \u7d66\u4f60\u81ea\u5df1\u66f2\u5947\u9905, \u5509\u5537. \u5206\u4eab\u4e00\u4e9b\u7d66\u5176\u4ed6\u4eba\u561b!", - "cookie": "\/me @%%NAMETO%%, @%%NAMEFROM%% %%COOKIE%%", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] \u8f2a\u8f49\u5b88\u885b\u5df2\u88ab\u8a2d\u5b9a\u70ba %%TIME%% \u5206\u9418.", "dclookuprank": "\/me [@%%NAME%%] \u53ea\u6709\u4fdd\u93e2\u6216\u66f4\u9ad8\u968e\u7d1a\u53ef\u67e5\u770b\u5176\u4ed6\u4eba.", "emojilist": "\/me Emoji\u5217\u8868: %%LINK%%", From a70292289cf0b5e044de6ef54c0d0092ed957663 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 16 May 2015 02:49:37 +0100 Subject: [PATCH 123/281] Version update --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 4c4a31c7..706eacfd 100644 --- a/basicBot.js +++ b/basicBot.js @@ -179,7 +179,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.3.4", + version: "2.4.5", status: false, name: "basicBot", loggedInID: null, From 07b9b5100009fa28a7dc9da032233d47f86bc43b Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 16 May 2015 19:26:53 +0100 Subject: [PATCH 124/281] Removed duplicated code --- basicBot.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/basicBot.js b/basicBot.js index 706eacfd..73e0a0fd 100644 --- a/basicBot.js +++ b/basicBot.js @@ -862,7 +862,6 @@ } } } - clearTimeout(historySkip); if (basicBot.settings.historySkip) { var alreadyPlayed = false; @@ -882,17 +881,6 @@ } }, 2000); } - - clearTimeout(basicBot.room.autoskipTimer); - if (basicBot.room.autoskip) { - var remaining = obj.media.duration * 1000; - basicBot.room.autoskipTimer = setTimeout(function () { - console.log("Skipping track."); - //API.sendChat('Song stuck, skipping...'); - API.moderateForceSkip(); - }, remaining + 3000); - } - var newMedia = obj.media; if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { var name = obj.dj.username; From 6d830879008b14f1d525e4b82f1660be83b6d5ad Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 18 May 2015 00:45:43 +0100 Subject: [PATCH 125/281] Update tr.json --- lang/tr.json | 110 +++++++++++++++++++++++++-------------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/lang/tr.json b/lang/tr.json index f880b0cc..4ada2858 100644 --- a/lang/tr.json +++ b/lang/tr.json @@ -1,60 +1,60 @@ { "cookies": [ - "has given you a chocolate chip cookie!", - "has given you a soft homemade oatmeal cookie!", - "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", - "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", - "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", - "gives you an enormous cookie. Poking it gives you more cookies. Weird.", - "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", - "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", - "gives you a fortune cookie. It reads \"Take a risk!\"", - "gives you a fortune cookie. It reads \"Go outside.\"", - "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", - "gives you a fortune cookie. It reads \"Do you even lift?\"", - "gives you a fortune cookie. It reads \"m808 pls\"", - "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", - "gives you a fortune cookie. It reads \"I love you.\"", - "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", - "gives you an Oreo cookie with a glass of milk!", - "gives you a rainbow cookie made with love :heart:", - "gives you an old cookie that was left out in the rain, it's moldy.", - "bakes you fresh cookies, it smells amazing." + "\u00c7ikolatal\u0131 \u00e7erez ald\u0131n.", + "Yumu\u015fak \u00e7erez ald\u0131n.", + "Sade \u00e7erez ald\u0131n.", + "Sana \u015feker \u00e7erez verir. 0\/10!", + "\u00c7ikolatal\u0131 \u00e7erez verir.Bekleyin.", + "Kocaman \u00e7erez verir.", + "Zengin \u00e7erezi ald\u0131n.", + "Zengin \u00e7erezi ald\u0131n.", + "Zengin \u00e7erez ald\u0131n.Bu riskli.", + "Zengin \u00e7erez ald\u0131n.\u00c7\u0131k\u0131\u015f.", + "\u00c7erez ald\u0131n.", + "\u00c7erez ald\u0131n.", + "\u00c7erez ald\u0131n.", + "\u00c7erez ald\u0131n.", + "\u00c7erez ald\u0131n.Seni seviyorum.", + "Alt\u0131n \u00e7erez ald\u0131n.", + "G\u00f6zl\u00fcklerin s\u00fct ile \u00e7erezli.", + ":heart: Sevgi \u00e7erezi ald\u0131n.", + "Eski \u00e7erez ald\u0131n.", + "H\u0131zl\u0131 \u00e7erez ald\u0131n." ], "balls": [ - "Signs point to yes.", - "Yes.", - "Reply hazy, try again.", - "Without a doubt.", - "My sources say no.", - "As I see it, yes.", - "You may rely on it.", - "Concentrate and ask again.", - "Outlook not so good.", - "It is decidedly so.", - "Better not tell you now.", - "Very doubtful.", - "Yes - definitely.", - "It is certain.", - "Cannot predict now.", - "Most likely.", - "Ask again later.", - "My reply is no.", - "Outlook good.", - "Don't count on it.", - "Yes, in due time.", - "My sources say no.", - "Definitely not.", - "You will have to wait.", - "I have my doubts.", - "Outlook so so.", - "Looks good to me!", - "Who knows?", - "Looking good!", - "Probably.", - "Are you kidding?", - "Don't bet on it.", - "Forget about it." + "\u0130\u015faret puanlar\u0131 do\u011fru.", + "Evet.", + "Yanl\u0131\u015f cevap, tekrar deneyin.", + "\u015e\u00fcphesiz.", + "Benim kaynaklarim dogrulanmadi.", + "G\u00f6rd\u00fc\u011f\u00fcm kadar\u0131yla, do\u011fru.", + "Sen ona ba\u011fl\u0131s\u0131n.", + "D\u00fczg\u00fcn bir soru sor.", + "Outlook iyi degil.", + "Kesinlikle b\u00f6yle.", + "\u015eimdi s\u00f6ylememen gerekli.", + "\u00c7ok \u015f\u00fcphelisin.", + "Evet kesinlikle.", + "Bu kesin!", + "Tahmiz edemezsiniz.", + "B\u00fcy\u00fck ihtimalle.", + "Daha sonra tekrar sorun.", + "Cevab\u0131m hay\u0131r.", + "Outlook iyi.", + "Bu say\u0131lmaz.", + "Evet, dogru zamanda.", + "Benim kaynaklarim desteklemiyor.", + "Kesinlikle hay\u0131r.", + "Beklemek zorundas\u0131n.", + "\u015e\u00fcphelerim var.", + "Outlook \u00f6ylesine.", + "Bana bak\u0131\u015f\u0131n iyi.", + "Kim bilir ?", + "\u0130yi g\u00f6r\u00fcn\u00fcyor.", + "Muhtemelen.", + "Dalga m\u0131 ge\u00e7iyorsun ?", + "Bunun icin kumar oynamayin :)", + "Unut gitsin." ], "nodatafound": "Veriler bulunamadi.", "currentlang": "\/me Suanki bot dili: %%LANGUAGE%%", @@ -68,7 +68,7 @@ "welcome": "\/me Hosgeldiniz %%NAME%%", "welcomeback": "\/me Tekrar hosgeldin, %%NAME%%", "songknown": "\/me @%%NAME%%, Actiginiz sarki daha once acildi.", - "timelimit": "\/me @%%NAME%%, Sarkiniz %%MAXLENGTH%% dakikadan uzun, daha uzun sarki calmak icin yetki gerekiyor.", + "timelimit": "\/me @%%NAME%%, Sarkiniz %%MAXLENGTH%% dakikadan uzun, daha uzun sarki calmak icin op listesinde olmaniz gerekli.", "permissionownsong": "\/me :up: @%%NAME%% sarkiyi oynatman icin yetkin var.", "isblacklisted": "\/me Sarki %%BLACKLIST%% yasak listesinde! Geciliyor...", "isopen": "\/me Rulet artik acik! Kullanim: Sohbete !join yazin.!", @@ -197,5 +197,5 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ WOOT: %%WOOT%%, MEH: %%MEHS%%, ORAN (W\/M): %%RATIO%%.", "website": "\/me Sitemizi ziyaret edin: %%LINK%%", "youtube": "\/me [%%NAME%%] Youtube kanalimiza abone olun: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "songstatistics": "\/me :arrow_right: %%ARTIST%% - %%TITLE%%: %%WOOTS%%:+1:\/\\%%GRABS%%:sparkling_heart:\/\\%%MEHS%%:-1:." } \ No newline at end of file From d602f3b1260939b0f591b06a6f0771ab1fa97688 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 18 May 2015 22:36:24 +0100 Subject: [PATCH 126/281] Updated language files --- lang/en.json | 2 ++ lang/fr.json | 2 ++ lang/lv.json | 24 +++++++++++++----------- lang/nl.json | 2 ++ lang/pt.json | 2 ++ lang/sr.json | 2 ++ lang/tr.json | 2 ++ lang/zh.json | 14 ++++++++------ 8 files changed, 33 insertions(+), 17 deletions(-) diff --git a/lang/en.json b/lang/en.json index 28798d8a..e700d164 100644 --- a/lang/en.json +++ b/lang/en.json @@ -168,6 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] The maximum song duration is set to %%TIME%% minutes.", "motdset": "\/me MotD set to: %%MSG%%", "motdintervalset": "\/me MotD interval set to %%INTERVAL%%.", + "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", + "botnameset": "\/me Bot name now set to: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, don't try to add me to the waitlist, please.", "move": "\/me [%%NAME%% used move.]", "mutednotime": "\/me [@%%NAME%%] Muted @%%USERNAME%%.", diff --git a/lang/fr.json b/lang/fr.json index 1622c906..acc2c659 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -168,6 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] La dur\u00e9e maximum d'une musique est maintenant de %%TIME%% minutes.", "motdset": "\/me Le MotD est maintenant : %%MSG%%", "motdintervalset": "\/me L'intervalle du MotD est maintenant de %%INTERVAL%%.", + "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", + "botnameset": "\/me Bot name now set to: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, n'essaye pas de m'ajouter \u00e0 la liste d'attente, merci.", "move": "\/me [%%NAME%% a utilis\u00e9 move.]", "mutednotime": "\/me [@%%NAME%%] A rendu muet @%%USERNAME%%.", diff --git a/lang/lv.json b/lang/lv.json index 1031121a..a982b815 100644 --- a/lang/lv.json +++ b/lang/lv.json @@ -1,17 +1,17 @@ { "cookies": [ - "has given you a chocolate chip cookie!", - "has given you a soft homemade oatmeal cookie!", - "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", - "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", + "iedeva jums \u0161okol\u0101des cepumu!", + "iedeva jums m\u012bkstu m\u0101j\u0101s gatavotu auzu cepumu!", + "iedeva jums vienk\u0101r\u0161u, sausu, vecu cepumu.tas bija p\u0113d\u0113jais paci\u0146\u0101.RUPJI!", + "iedeva jums cukura cepumu. Ko, bez glaz\u016bras un neapkais\u012bts?", "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", - "gives you an enormous cookie. Poking it gives you more cookies. Weird.", - "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", - "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", - "gives you a fortune cookie. It reads \"Take a risk!\"", - "gives you a fortune cookie. It reads \"Go outside.\"", - "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", - "gives you a fortune cookie. It reads \"Do you even lift?\"", + "iedeva jums milz\u012bgu cepumu.Gr\u016bst\u012b\u0161an\u0101s dod jums vair\u0101k cepumu.D\u012bvaini.", + "iedeva jums laimes cepumu.Tur sac\u012bts ''K\u0101d\u0113\u013c Tu nestr\u0101d\u0101 pie neviena projekta?''", + "iedeva jums laimes cepumu.Tur sac\u012bts ''Izsaki k\u0101dam \u012bpa\u0161am komplimentu''", + "iedeva jums laimes cepumu.Tur sac\u012bts ''Risk\u0113!''", + "iedeva jums laimes cepumu.Tur sac\u012bts ''Ej \u0101r\u0101.''", + "iedeva jums laimes cepumu.Tur sac\u012bts ''Neaizmirsti ap\u0113st savus d\u0101rzen\u012b\u0161us!''", + "iedeva jums laimes cepumu.Tur sac\u012bts ''Vai Tu visp\u0101r vari pacelt?''", "gives you a fortune cookie. It reads \"m808 pls\"", "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", "gives you a fortune cookie. It reads \"I love you.\"", @@ -168,6 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] TMaksim\u0101lais dziesma ilgums ir iestat\u012bts uz %%TIME%% min\u016btes.", "motdset": "\/me MotD iestat\u012bts uz: %%MSG%%", "motdintervalset": "\/me MotD interv\u0101ls iestat\u012bts uz %%INTERVAL%%.", + "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", + "botnameset": "\/me Bot name now set to: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, nem\u0113\u0123iniet pievienot mani waitlista, l\u016bdzu.", "move": "\/me [%%NAME%% lieto p\u0101rvietot.]", "mutednotime": "\/me [@%%NAME%%] Liedz \u010datu @%%USERNAME%%.", diff --git a/lang/nl.json b/lang/nl.json index b465325c..2604de45 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -168,6 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] De maximum lengte van een nummer is ingesteld op %%TIME%% minuten.", "motdset": "\/me MotD ingesteld op: %%MSG%%", "motdintervalset": "\/me MotD interval ingesteld op %%INTERVAL%%.", + "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", + "botnameset": "\/me Bot name now set to: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, probeer mij niet toe te voegen aan de wachtlijst, alsjeblieft.", "move": "\/me [%%NAME%% gebruikte move.]", "mutednotime": "\/me [@%%NAME%%] Heeft @%%USERNAME%% gemute.", diff --git a/lang/pt.json b/lang/pt.json index 2b4c5d14..8013076a 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -168,6 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] A dura\u00e7\u00e3o m\u00e1xima de tempo agora \u00e9 %%TIME%% minutos.", "motdset": "\/me Mensagem do Dia: %%MSG%%", "motdintervalset": "\/me Intervalo da Mensagem do Dia: %%INTERVAL%% m\u00fasicas.", + "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", + "botnameset": "\/me Bot name now set to: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, n\u00e3o tente me adicionar \u00e0 fila de espera, por favor.", "move": "\/me [%%NAME%% usou 'move'.]", "mutednotime": "\/me [@%%NAME%%] @%%USERNAME%% mutado.", diff --git a/lang/sr.json b/lang/sr.json index 183de819..b8f8a02f 100644 --- a/lang/sr.json +++ b/lang/sr.json @@ -168,6 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] Maksimalno trajanje pesme pode\u0161eno na %%TIME%% minuta.", "motdset": "\/me Poruka Dana pode\u0161ena na: %%MSG%%", "motdintervalset": "\/me Interval Poruke dana pode\u0161en na %%INTERVAL%%.", + "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", + "botnameset": "\/me Bot name now set to: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, nemoj da me dodaje\u0161 na listu \u010dekanja, molim.", "move": "\/me [%%NAME%% je koristio preme\u0161tanje.]", "mutednotime": "\/me [@%%NAME%%] Je uti\u0161ao @%%USERNAME%%.", diff --git a/lang/tr.json b/lang/tr.json index 4ada2858..c21e68d2 100644 --- a/lang/tr.json +++ b/lang/tr.json @@ -168,6 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] Maksimum sarki uzunlugu %%TIME%% dakikadir.", "motdset": "\/me Duyuru ayarlandi: %%MSG%%", "motdintervalset": "\/me Duyuru araligi %%INTERVAL%%.", + "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", + "botnameset": "\/me Bot name now set to: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, lutfen beni dj listesine eklemeyin.", "move": "\/me [%%NAME%% tasindi.]", "mutednotime": "\/me [@%%NAME%%] artik @%%USERNAME%% susturuldu.", diff --git a/lang/zh.json b/lang/zh.json index 6edd19cb..c86b5ffa 100644 --- a/lang/zh.json +++ b/lang/zh.json @@ -1,11 +1,11 @@ { "cookies": [ - "has given you a chocolate chip cookie!", - "has given you a soft homemade oatmeal cookie!", - "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", - "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", - "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", - "gives you an enormous cookie. Poking it gives you more cookies. Weird.", + "\u5df2\u7d66\u4f60\u4e00\u500b\u6731\u53e4\u529b\u9905\u4e7e!", + "\u5df2\u7d66\u4f60\u4e00\u500b\u9b06\u8edf\u5168\u9ea5\u9905\u4e7e!", + "\u5df2\u7d66\u4f60\u4e00\u500b\u7c21\u55ae, \u4e7e, \u4e26\u8001\u7684\u9905\u4e7e. \u9019\u53ef\u662f\u5305\u88dd\u88e1\u7684\u6700\u5f8c\u4e00\u7247\u5594. \u8d85\u8b9a.", + "\u7d66\u4f60\u4e00\u500b\u7cd6\u9905\u4e7e. \u751a\u9ebc, \u6c92\u6709\u51b0\u51cd\u5f69\u7cd6? 0\/10 \u4e0d\u6703\u52d5.", + "\u7d66\u4f60\u4e00\u500b\u5de7\u514b\u529b\u9905\u4e7e. \u5594\u7b49\u7b49, \u5b83\u5011\u662f\u8461\u8404\u4e7e. Bleck!", + "\u7d66\u4f60\u4e00\u500b\u5de8\u5927\u7684\u9905\u4e7e. \u5206\u89e3\u5b83\u6703\u8b93\u4f60\u64c1\u6709\u66f4\u591a\u9905\u4e7e. \u602a\u7570.", "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", "gives you a fortune cookie. It reads \"Take a risk!\"", @@ -168,6 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] \u6700\u9ad8\u9650\u5236\u6b4c\u66f2\u9577\u5ea6\u76ee\u524d\u8a2d\u7f6e\u70ba %%TIME%% \u5206\u9418.", "motdset": "\/me \u4eca\u65e5\u91d1\u53e5 \u8a2d\u7f6e\u70ba: %%MSG%%", "motdintervalset": "\/me \u4eca\u65e5\u91d1\u53e5 \u9593\u9694\u8a2d\u7f6e\u70ba %%INTERVAL%%.", + "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", + "botnameset": "\/me Bot name now set to: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, \u8acb\u5225\u628a\u6211\u6dfb\u52a0\u5230\u7b49\u5019\u5217\u8868, \u8b1d\u8b1d.", "move": "\/me [%%NAME%% \u4f7f\u7528\u4e86\u79fb\u52d5.]", "mutednotime": "\/me [@%%NAME%%] \u975c\u97f3 @%%USERNAME%%.", From 20f123b1604009f3b8479f21a5892049b7f5e900 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 18 May 2015 22:43:42 +0100 Subject: [PATCH 127/281] Added !botname command You can change the bot's name using "!botname argument" (argument being the new bot name) --- basicBot.js | 19 +++++++++++++++++++ commands.md | 1 + 2 files changed, 20 insertions(+) diff --git a/basicBot.js b/basicBot.js index 73e0a0fd..01f37f74 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1642,6 +1642,25 @@ } }, + botnameCommand: { + command: 'botname', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentbotname, {botname: basicBot.settings.botName})); + var argument = msg.substring(cmd.length + 1); + if (argument) { + basicBot.settings.botName = argument; + API.sendChat(subChat(basicBot.chat.botnameset, {botName: basicBot.settings.botName})); + } + } + } + }, + clearchatCommand: { command: 'clearchat', rank: 'manager', diff --git a/commands.md b/commands.md index abfce9e6..89464c45 100644 --- a/commands.md +++ b/commands.md @@ -11,6 +11,7 @@ Manager |Command | Arguments | Description | |:------:|:---------:|:--------------------------------------:| |!afklimit | X | sets the maximum afk time | +|!botname | (botname) | change the default bot name | |!clearchat | |clears the chat | |!cycle | | toggle DJ cycle | |!cycletimer | X | set the maximum DJ cycle time for when cycleguard is enabled | From 7d5e13d801793b475aee65e36119fe50ae7af63d Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 19 May 2015 00:37:02 +0100 Subject: [PATCH 128/281] Update pt.json --- lang/pt.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/pt.json b/lang/pt.json index 8013076a..5bc46cf9 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -168,8 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] A dura\u00e7\u00e3o m\u00e1xima de tempo agora \u00e9 %%TIME%% minutos.", "motdset": "\/me Mensagem do Dia: %%MSG%%", "motdintervalset": "\/me Intervalo da Mensagem do Dia: %%INTERVAL%% m\u00fasicas.", - "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", - "botnameset": "\/me Bot name now set to: %%BOTNAME%%", + "currentbotname": "\/me Nome do bot definido como: %%BOTNAME%%", + "botnameset": "\/me O nome do bot foi definido agora para: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, n\u00e3o tente me adicionar \u00e0 fila de espera, por favor.", "move": "\/me [%%NAME%% usou 'move'.]", "mutednotime": "\/me [@%%NAME%%] @%%USERNAME%% mutado.", From 134edb905367cbf990ce7a8e9189e2b1bbfa19b4 Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 19 May 2015 01:58:07 +0100 Subject: [PATCH 129/281] Updated Giphy URL --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 01f37f74..ee49ee22 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2013,7 +2013,7 @@ function get_id(api_key, fixedtag, func) { $.getJSON( - "https://api.giphy.com/v1/gifs/random?", + "https://tv.giphy.com/v1/gifs/random?", { "format": "json", "api_key": api_key, @@ -2043,7 +2043,7 @@ function get_random_id(api_key, func) { $.getJSON( - "https://api.giphy.com/v1/gifs/random?", + "https://tv.giphy.com/v1/gifs/random?", { "format": "json", "api_key": api_key, From e3f6ba53363383500595b73b3379282ba656c258 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 23 May 2015 12:58:53 +0100 Subject: [PATCH 130/281] Update lv.json --- lang/lv.json | 114 +++++++++++++++++++++++++-------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/lang/lv.json b/lang/lv.json index a982b815..09236748 100644 --- a/lang/lv.json +++ b/lang/lv.json @@ -2,9 +2,9 @@ "cookies": [ "iedeva jums \u0161okol\u0101des cepumu!", "iedeva jums m\u012bkstu m\u0101j\u0101s gatavotu auzu cepumu!", - "iedeva jums vienk\u0101r\u0161u, sausu, vecu cepumu.tas bija p\u0113d\u0113jais paci\u0146\u0101.RUPJI!", + "Iedeva tuk\u0161u, sausu un vecu cepumu. Vi\u0146\u0161 bija p\u0113d\u0113jais mais\u0101. Fuj.", "iedeva jums cukura cepumu. Ko, bez glaz\u016bras un neapkais\u012bts?", - "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", + "Iedeva Jums cepumu ar \u0161okol\u0101d\u0113s gabali\u0146iem. Ak n\u0113! T\u0101s ir roz\u012bnes. Fuj!", "iedeva jums milz\u012bgu cepumu.Gr\u016bst\u012b\u0161an\u0101s dod jums vair\u0101k cepumu.D\u012bvaini.", "iedeva jums laimes cepumu.Tur sac\u012bts ''K\u0101d\u0113\u013c Tu nestr\u0101d\u0101 pie neviena projekta?''", "iedeva jums laimes cepumu.Tur sac\u012bts ''Izsaki k\u0101dam \u012bpa\u0161am komplimentu''", @@ -12,67 +12,67 @@ "iedeva jums laimes cepumu.Tur sac\u012bts ''Ej \u0101r\u0101.''", "iedeva jums laimes cepumu.Tur sac\u012bts ''Neaizmirsti ap\u0113st savus d\u0101rzen\u012b\u0161us!''", "iedeva jums laimes cepumu.Tur sac\u012bts ''Vai Tu visp\u0101r vari pacelt?''", - "gives you a fortune cookie. It reads \"m808 pls\"", - "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", - "gives you a fortune cookie. It reads \"I love you.\"", - "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", - "gives you an Oreo cookie with a glass of milk!", - "gives you a rainbow cookie made with love :heart:", - "gives you an old cookie that was left out in the rain, it's moldy.", - "bakes you fresh cookies, it smells amazing." + "Iedeva Jums laimes cepumu. Tur teikts: \"m808 pls\"", + "iedeva jums laimes cepumu.Tur sac\u012bts ''Ja kustin\u0101si gurnus, ieg\u016bsi visas d\u0101mas.''", + "iedeva jums laimes cepumu.Tur sac\u012bts ''Es m\u012blu Tevi.''", + "iedeva jums Zelta Cepumu. Tu nevari to \u0113st, jo tas tais\u012bts no zelta.Nol\u0101d\u0113ts.", + "iedeva jums Oreo cepumu ar gl\u0101zi piena.", + "iedeva jums varav\u012bksnes cepumu, gatavotu ar m\u012blest\u012bbu :heart:", + "iedeva jums vecu cepumu, kas bija pamests \u0101r\u0101, liet\u016b, tas ir sapel\u0113jis.", + "gatavo Tev svaigus cepumus, tie smar\u017eo pasakaini." ], "balls": [ - "Signs point to yes.", - "Yes.", - "Reply hazy, try again.", - "Without a doubt.", - "My sources say no.", - "As I see it, yes.", - "You may rely on it.", - "Concentrate and ask again.", - "Outlook not so good.", - "It is decidedly so.", - "Better not tell you now.", - "Very doubtful.", - "Yes - definitely.", - "It is certain.", - "Cannot predict now.", - "Most likely.", - "Ask again later.", - "My reply is no.", - "Outlook good.", - "Don't count on it.", - "Yes, in due time.", - "My sources say no.", - "Definitely not.", - "You will have to wait.", - "I have my doubts.", - "Outlook so so.", - "Looks good to me!", - "Who knows?", - "Looking good!", - "Probably.", - "Are you kidding?", - "Don't bet on it.", - "Forget about it." + "Paz\u012bmes liecina, j\u0101.", + "J\u0101.", + "Neskaidra atbilde, m\u0113\u0123ini v\u0113lreiz.", + "Bez \u0161aub\u0101m.", + "Mani avoti saka n\u0113.", + "P\u0113c man\u0101m dom\u0101m, j\u0101.", + "Tu vari uz to pa\u013cauties.", + "Koncentr\u0113jies un pajaut\u0101 v\u0113lreiz.", + "Izredzes nav lielas.", + "Tas noteikti t\u0101 ir.", + "Lab\u0101k tagad Tev neteik\u0161u.", + "\u013boti ap\u0161aub\u0101mi.", + "J\u0101-noteikti.", + "Tas ir dro\u0161i.", + "Pagaid\u0101m nevar prognoz\u0113t.", + "Visticam\u0101k.", + "V\u0113l\u0101k pajaut\u0101 v\u0113lreiz.", + "Mana atbilde ir n\u0113.", + "Izredzes ir labas.", + "Ner\u0113\u0137inies ar to.", + "J\u0101, laikus.", + "Mani avoti saka n\u0113.", + "Noteikti n\u0113.", + "Tev b\u016bs j\u0101uzgaida.", + "Man ir savas \u0161aubas.", + "Izredzes vid\u0113jas.", + "Priek\u0161 manis izskat\u0101s labi.", + "Kas to lai zin?", + "Izskat\u0101s labi!", + "Iesp\u0113jams.", + "Tu joko?", + "Nepa\u013caujies uz to.", + "Aizmirsti par to." ], - "nodatafound": "Nav iepriek\u0161\u0113jie dati atrasti.", + "nodatafound": "Iepriek\u0161\u0113jie dati nav atrasti.", "currentlang": "\/me Valoda pa\u0161laik iestat\u012bta uz:%%LANGUAGE%%", - "langerror": "\/me Izv\u0113l\u0113taj\u0101 valod\u0101 nav pieejama. L\u016bdzu, apmekl\u0113jiet %%LINK%% lai atrast sarakstu ar valodu pieejamibu.", - "langset": "\/me Valoda tagad nomainita uz: %%LANGUAGE%%", - "retrievingdata": "Atguva iepriek\u0161 saglab\u0101tos datus", + "langerror": "\/me Izv\u0113l\u0113t\u0101 valoda nav pieejama. L\u016bdzu, apmekl\u0113jiet %%LINK%% lai atrastu sarakstu ar pieejamaj\u0101m valod\u0101m.", + "langset": "\/me Valoda tagad nomain\u012bta uz: %%LANGUAGE%%", + "retrievingdata": "Atg\u016bstu iepriek\u0161 saglab\u0101tos datus", "datarestored": "Iepriek\u0161 saglab\u0101tie dati veiksm\u012bgi iel\u0101d\u0113ti.", - "greyuser": "Tikai bouncers un lielakas pakapes var palaist botu.", + "greyuser": "Tikai bouncers un augst\u0101ki var palaist botu.", "bouncer": "Bots nevar p\u0101rvietot cilv\u0113kus, kad tas darbojas k\u0101 bouncers.", - "online": "\/me %%BOTNAME%% v%%VERSION%% onlaina!", + "online": "\/me %%BOTNAME%% v%%VERSION%% online!", "welcome": "\/me Laipni aicin\u0101ts\/-a %%NAME%%", "welcomeback": "\/me Laipni aicin\u0101ts\/-a atpaka\u013c, %%NAME%%", - "songknown": "\/me @%%NAME%%,\u0161\u012b dziesma ir nosp\u0113l\u0113ta DJ v\u0113stur\u0113.", + "songknown": "\/me @%%NAME%%,\u0161\u012b dziesma ir DJ v\u0113stur\u0113.", "timelimit": "\/me @%%NAME%%, j\u016bsu dziesma ir gar\u0101ka nek\u0101%%MAXLENGTH%% min\u016btes, jums ir nepiecie\u0161ama at\u013cauja, lai sp\u0113l\u0113tu gar\u0101kas dziesmas.", - "permissionownsong": "\/me :up: @%%NAME%% ir at\u013cauja, lai sp\u0113l\u0113tu produkciju!", - "isblacklisted": "\/me \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101!! Izlaizt ......", + "permissionownsong": "\/me :up: @%%NAME%% ir at\u013cauja, lai sp\u0113l\u0113tu vi\u0146u pa\u0161u produkciju!", + "isblacklisted": "\/me \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101!! Izlai\u017eam ......", "isopen": "\/me Rulete tagad ir atv\u0113rta! Ierakstiet !join lai piedal\u012btos!", - "winnerpicked": "\/me Uzvar\u0113t\u0101js ir parvietots! @%%NAME%% poz\u012bcij\u0101 %%POSITION%%.", + "winnerpicked": "\/me Uzvar\u0113t\u0101js ir izv\u0113l\u0113ts! @%%NAME%% uz poz\u012bciju %%POSITION%%.", "ball": "\/me %%NAME%%'s jaut\u0101jums bija: \"%%QUESTION%%\" un %%BOTNAME%%'s atbilde ir: \"%%RESPONSE%%\"", "notghosting": "[%%NAME1%%] %%NAME2%% nav dubulto\u0161an\u0101s.", "ghosting": "[%%NAME1%%] %%NAME2%% ir vai nu dubulto\u0161an\u0101s vai ne \u0161eit.", @@ -158,8 +158,8 @@ "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ir bijis telp\u0101 %%TIME%%.", "kickrank": "\/me [@%%NAME%%] J\u016bs nevarat kick lietot\u0101jus ar vien\u0101du vai augst\u0101ku rangu nek\u0101 jums!", "kick": "\/me [@%%NAME%%], @%%USERNAME%% Jus tiekat izmests no iztabas %%TIME%% min\u016btes.", - "kill": "\/me IzSl\u0113gt.", - "logout": "\/me [@%%NAME%%] Izlogoties %%BOTNAME%%", + "kill": "\/me IzSl\u0113dzas.", + "logout": "\/me [@%%NAME%%] Izlogojas %%BOTNAME%%", "rouletteleave": "\/me @%%NAME%% pameta ruleti!", "songlink": "\/me [@%%NAME%%] Saite uz pa\u0161reiz\u0113jo dziesmu: %%LINK%%", "usedlockskip": "\/me [%%NAME%% izmanto liegumu skipot.]", @@ -168,8 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] TMaksim\u0101lais dziesma ilgums ir iestat\u012bts uz %%TIME%% min\u016btes.", "motdset": "\/me MotD iestat\u012bts uz: %%MSG%%", "motdintervalset": "\/me MotD interv\u0101ls iestat\u012bts uz %%INTERVAL%%.", - "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", - "botnameset": "\/me Bot name now set to: %%BOTNAME%%", + "currentbotname": "\/me Bota nosaukums pa\u0161laik iestat\u012bts uz: %%BOTNAME%%", + "botnameset": "\/me Bota nosaukums tagad ir:%%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, nem\u0113\u0123iniet pievienot mani waitlista, l\u016bdzu.", "move": "\/me [%%NAME%% lieto p\u0101rvietot.]", "mutednotime": "\/me [@%%NAME%%] Liedz \u010datu @%%USERNAME%%.", From 78ddd7af7c47a245903be9be6f62d1d7aa6b7265 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 27 May 2015 14:25:56 +0100 Subject: [PATCH 131/281] Solution to work around plug's char limit !status will now split message if it's longer than 241 characters (plug.dj's char limit) --- basicBot.js | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index ee49ee22..eb729fa2 100644 --- a/basicBot.js +++ b/basicBot.js @@ -2840,7 +2840,7 @@ if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { var from = chat.un; - var msg = '/me [@' + from + '] '; + var msg = '[@' + from + '] '; msg += basicBot.chat.afkremoval + ': '; if (basicBot.settings.afkRemoval) msg += 'ON'; @@ -2898,13 +2898,42 @@ if (basicBot.room.autoskip) msg += 'ON'; else msg += 'OFF'; msg += '. '; - + var launchT = basicBot.room.roomstats.launchTime; var durationOnline = Date.now() - launchT; var since = basicBot.roomUtilities.msToStr(durationOnline); msg += subChat(basicBot.chat.activefor, {time: since}); - return API.sendChat(msg); + /* + // least efficient way to go about this, but it works :) + if (msg.length > 256){ + firstpart = msg.substr(0, 256); + secondpart = msg.substr(256); + API.sendChat(firstpart); + setTimeout(function () { + API.sendChat(secondpart); + }, 300); + } + else { + API.sendChat(msg); + } + */ + + // This is a more efficient solution + if (msg.length > 241){ + var split = msg.match(/.{1,241}/g); + for (var i = 0; i < split.length; i++) { + var func = function(index) { + setTimeout(function() { + API.sendChat("/me " + split[index]); + }, 500 * index); + } + func(i); + } + } + else { + return API.sendChat(msg); + } } } }, From b10906818584e3ac77afd8acf974adb39be55e15 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 28 May 2015 21:25:07 +0100 Subject: [PATCH 132/281] Update zh.json --- lang/zh.json | 100 +++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/lang/zh.json b/lang/zh.json index c86b5ffa..551d23b7 100644 --- a/lang/zh.json +++ b/lang/zh.json @@ -6,57 +6,57 @@ "\u7d66\u4f60\u4e00\u500b\u7cd6\u9905\u4e7e. \u751a\u9ebc, \u6c92\u6709\u51b0\u51cd\u5f69\u7cd6? 0\/10 \u4e0d\u6703\u52d5.", "\u7d66\u4f60\u4e00\u500b\u5de7\u514b\u529b\u9905\u4e7e. \u5594\u7b49\u7b49, \u5b83\u5011\u662f\u8461\u8404\u4e7e. Bleck!", "\u7d66\u4f60\u4e00\u500b\u5de8\u5927\u7684\u9905\u4e7e. \u5206\u89e3\u5b83\u6703\u8b93\u4f60\u64c1\u6709\u66f4\u591a\u9905\u4e7e. \u602a\u7570.", - "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", - "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", - "gives you a fortune cookie. It reads \"Take a risk!\"", - "gives you a fortune cookie. It reads \"Go outside.\"", - "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", - "gives you a fortune cookie. It reads \"Do you even lift?\"", - "gives you a fortune cookie. It reads \"m808 pls\"", - "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", - "gives you a fortune cookie. It reads \"I love you.\"", - "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", - "gives you an Oreo cookie with a glass of milk!", - "gives you a rainbow cookie made with love :heart:", - "gives you an old cookie that was left out in the rain, it's moldy.", - "bakes you fresh cookies, it smells amazing." + "\u7d66\u4f60\u4e00\u500b\u904b\u6c23\u9905\u4e7e. \u5b83\u5beb\u8457\"\u70ba\u751a\u9ebc\u4f60\u4e0d\u505a\u4e00\u4e9b\u5176\u4ed6\u7684\u8a08\u756b?\"", + "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u67d0\u500b\u7279\u5225\u7684\u4eba\u7d66\u4f60\u4e00\u500b\u7a31\u8b9a\"", + "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u5192\u4e00\u500b\u96aa\u5427!\"", + "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u5230\u5916\u9762\u53bb.\"", + "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u5225\u5fd8\u4e86\u5403\u4f60\u7684\u852c\u83dc!\"", + "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u4f60\u6709\u505a\u91cd\u91cf\u8a13\u7df4\u55ce?\"", + "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"m808\"", + "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u5982\u679c\u4f60\u79fb\u52d5\u4f60\u7684\u814e\u90e8, \u4f60\u5c07\u5f97\u5230\u6240\u6709\u5973\u6027.\"", + "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u6211\u611b\u4f60.\"", + "\u7d66\u4f60\u4e00\u500b\u9ec3\u91d1\u9905\u4e7e. \u4f60\u4e0d\u80fd\u5403\u5b83\u56e0\u70ba\u5b83\u662f\u7528\u771f\u91d1\u88fd\u6210. \u8c48\u6709\u6b64\u7406.", + "\u7d66\u4f60\u4e00\u500bOreo\u9905\u4e7e\u9644\u52a0\u4e00\u676f\u725b\u5976!", + "\u7d66\u4f60\u4e00\u500b\u7528\u611b :heart: \u88fd\u6210\u7684\u5f69\u8679\u9905\u4e7e", + "\u7d66\u4f60\u4e00\u500b\u96e8\u5929\u88e1\u5269\u4e0b\u7684\u8001\u9905\u4e7e, \u5b83\u5df2\u7d93\u767c\u9709\u4e86.", + "\u70d8\u7119\u4e86\u4e00\u500b\u65b0\u9bae\u9905\u4e7e\u7d66\u4f60, \u771f\u7684\u5f88\u82ac\u9999\u5594." ], "balls": [ - "Signs point to yes.", - "Yes.", - "Reply hazy, try again.", - "Without a doubt.", - "My sources say no.", - "As I see it, yes.", - "You may rely on it.", - "Concentrate and ask again.", - "Outlook not so good.", - "It is decidedly so.", - "Better not tell you now.", - "Very doubtful.", - "Yes - definitely.", - "It is certain.", - "Cannot predict now.", - "Most likely.", - "Ask again later.", - "My reply is no.", - "Outlook good.", - "Don't count on it.", - "Yes, in due time.", - "My sources say no.", - "Definitely not.", - "You will have to wait.", - "I have my doubts.", - "Outlook so so.", - "Looks good to me!", - "Who knows?", - "Looking good!", - "Probably.", - "Are you kidding?", - "Don't bet on it.", - "Forget about it." + "\u6a19\u8a8c\u9ede\u5230\u662f\u7684.", + "\u662f\u7684.", + "\u56de\u8986\u6726\u6727, \u8acb\u518d\u5617\u8a66.", + "\u7121\u6240\u8cea\u7591.", + "\u6211\u7684\u4f86\u6e90\u8aaa\u4e0d.", + "\u5c31\u5982\u6211\u6240\u770b\u898b\u7684, \u662f.", + "\u4f60\u6216\u6703\u4f9d\u8cf4\u8457\u5b83.", + "\u96c6\u4e2d\u7cbe\u795e\u8207\u518d\u6b21\u767c\u554f.", + "\u5916\u8868\u4e0d\u592a\u597d.", + "\u90a3\u662f\u65b7\u7136\u5de6\u53f3.", + "\u6700\u597d\u4e0d\u73fe\u5728\u544a\u8a34\u4f60.", + "\u975e\u5e38\u61f7\u7591.", + "\u662f - \u80af\u5b9a\u7684.", + "\u9019\u662f\u80af\u5b9a\u7684.", + "\u73fe\u5728\u7121\u6cd5\u9810\u6e2c.", + "\u5f88\u6709\u53ef\u80fd\u7684.", + "\u7a0d\u5f8c\u518d\u554f\u904e.", + "\u6211\u7684\u56de\u8986\u662f\u4e0d.", + "\u5916\u8868\u5f88\u597d.", + "\u4e0d\u8981\u6307\u671b\u5b83.", + "\u662f\u7684, \u5728\u9069\u7576\u7684\u6642\u5019.", + "\u6211\u7684\u4f86\u6e90\u8aaa\u4e0d.", + "\u975e\u4e5f.", + "\u4f60\u6703\u9700\u8981\u7b49\u5f85.", + "\u6211\u6709\u6211\u7684\u61f7\u7591.", + "\u5916\u8868\u666e\u901a.", + "\u5728\u6211\u662f\u89ba\u5f97\u597d\u770b\u7684!", + "\u8ab0\u77e5\u9053?", + "\u5f88\u597d\u770b!", + "\u4e5f\u8a31\u5427.", + "\u4f60\u5728\u958b\u73a9\u7b11\u55ce?", + "\u4e0d\u8981\u8ced\u4e86.", + "\u5fd8\u4e86\u5b83\u5427." ], - "nodatafound": "\u6c92\u6709\u767c\u73fe\u4ee5\u524d\u7684\u6578\u64da.", + "nodatafound": "\u6c92\u6709\u767c\u73fe\u4e4b\u524d\u7684\u6578\u64da.", "currentlang": "\/me \u76ee\u524d\u8a9e\u8a00\u8a2d\u7f6e\u70ba: %%LANGUAGE%%", "langerror": "\/me \u4f60\u6240\u9078\u64c7\u7684\u8a9e\u8a00\u4e0d\u53ef\u7528. \u8acb\u8a2a\u554f %%LINK%% \u4ee5\u67e5\u8a62\u5217\u8868\u88e1\u53ef\u7528\u7684\u8a9e\u8a00.", "langset": "\/me \u73fe\u5728\u628a\u8a9e\u8a00\u8a2d\u7f6e\u70ba: %%LANGUAGE%%", @@ -168,8 +168,8 @@ "maxlengthtime": "\/me [@%%NAME%%] \u6700\u9ad8\u9650\u5236\u6b4c\u66f2\u9577\u5ea6\u76ee\u524d\u8a2d\u7f6e\u70ba %%TIME%% \u5206\u9418.", "motdset": "\/me \u4eca\u65e5\u91d1\u53e5 \u8a2d\u7f6e\u70ba: %%MSG%%", "motdintervalset": "\/me \u4eca\u65e5\u91d1\u53e5 \u9593\u9694\u8a2d\u7f6e\u70ba %%INTERVAL%%.", - "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", - "botnameset": "\/me Bot name now set to: %%BOTNAME%%", + "currentbotname": "\/me \u6a5f\u5668\u4eba\u540d\u5b57\u76ee\u524d\u8a2d\u7f6e\u70ba: %%BOTNAME%%", + "botnameset": "\/me \u6a5f\u5668\u4eba\u540d\u5b57\u73fe\u5728\u8a2d\u7f6e\u70ba: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, \u8acb\u5225\u628a\u6211\u6dfb\u52a0\u5230\u7b49\u5019\u5217\u8868, \u8b1d\u8b1d.", "move": "\/me [%%NAME%% \u4f7f\u7528\u4e86\u79fb\u52d5.]", "mutednotime": "\/me [@%%NAME%%] \u975c\u97f3 @%%USERNAME%%.", From 0bf30ed2b6a150933efad93cd13e4ccbed3a51fd Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 29 May 2015 12:18:47 +0100 Subject: [PATCH 133/281] Messages that start with '!' will now be deleted. This will only work if cmdDeletion is enabled. --- basicBot.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index eb729fa2..1e230168 100644 --- a/basicBot.js +++ b/basicBot.js @@ -962,6 +962,10 @@ API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); return true; } + if (basicBot.settings.cmddeletion && msg.startsWith('!')) { + API.moderateDeleteChat(chat.cid); + return true; + } for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { if (msg === basicBot.chatUtilities.spam[j]) { API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); @@ -1081,9 +1085,6 @@ }, basicBot.settings.commandCooldown * 1000); } if (executed) { - if (basicBot.settings.cmdDeletion) { - API.moderateDeleteChat(chat.cid); - } basicBot.room.allcommand = false; setTimeout(function () { basicBot.room.allcommand = true; From 545f87a4ddb280f5c1f87489c3a7e4f14365568e Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 29 May 2015 13:04:50 +0100 Subject: [PATCH 134/281] Command trigger can now be changed globally. It is recommended to stick to the default setting. --- basicBot.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index 1e230168..6adb1c6a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -962,7 +962,7 @@ API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); return true; } - if (basicBot.settings.cmddeletion && msg.startsWith('!')) { + if (basicBot.settings.cmddeletion && msg.startsWith(basicBot.settings.commandLiteral)) { API.moderateDeleteChat(chat.cid); return true; } @@ -1038,7 +1038,7 @@ }, commandCheck: function (chat) { var cmd; - if (chat.message.charAt(0) === '!') { + if (chat.message.charAt(0) === basicBot.settings.commandLiteral) { var space = chat.message.indexOf(' '); if (space === -1) { cmd = chat.message; @@ -1048,11 +1048,11 @@ else return false; var userPerm = basicBot.userUtilities.getPermission(chat.uid); //console.log("name: " + chat.un + ", perm: " + userPerm); - if (chat.message !== "!join" && chat.message !== "!leave") { + if (chat.message !== basicBot.settings.commandLiteral + "join" && chat.message !== basicBot.settings.commandLiteral + "leave") { if (userPerm === 0 && !basicBot.room.usercommand) return void (0); if (!basicBot.room.allcommand) return void (0); } - if (chat.message === '!eta' && basicBot.settings.etaRestriction) { + if (chat.message === basicBot.settings.commandLiteral + 'eta' && basicBot.settings.etaRestriction) { if (userPerm < 2) { var u = basicBot.userUtilities.lookupUser(chat.uid); if (u.lastEta !== null && (Date.now() - u.lastEta) < 1 * 60 * 60 * 1000) { From 914d417df3e3138070f3555d6b40ac265a7f0922 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 29 May 2015 13:10:49 +0100 Subject: [PATCH 135/281] Command Deletion edit. --- basicBot.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index 6adb1c6a..c1bf104e 100644 --- a/basicBot.js +++ b/basicBot.js @@ -962,10 +962,6 @@ API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); return true; } - if (basicBot.settings.cmddeletion && msg.startsWith(basicBot.settings.commandLiteral)) { - API.moderateDeleteChat(chat.cid); - return true; - } for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { if (msg === basicBot.chatUtilities.spam[j]) { API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); @@ -997,6 +993,10 @@ API.moderateDeleteChat(chat.cid); return true; } + if (basicBot.settings.cmddeletion && msg.startsWith(basicBot.settings.commandLiteral)) { + API.moderateDeleteChat(chat.cid); + return true; + } /** var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; if (plugRoomLinkPatt.exec(msg)) { From 81bcedbb5f2e27d6db4e621d28330744215d323e Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 29 May 2015 13:23:16 +0100 Subject: [PATCH 136/281] Fixed little typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 771b8d64..37ac9e82 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Please do not try to if you are not confident in your javascript capabilities. Official translations will be supported. Available ones can be found under [the language folder](https://github.com/***REMOVED***/basicBot/blob/master/lang/langIndex.json). You can set a language in the room settings. You can use your own translation or wording by translating the values of in [the English pack](https://github.com/***REMOVED***/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. -__When translating the chat messages, please not that it is a json format, meaning it is structured as ```"key":"value"```, please only translate the "value" parts, and leave anything between %% (eg. %%NAME%%) as is, they are variables that get filled in by the bot.__ +__When translating the chat messages, please note that it is a json format, meaning it is structured as ```"key":"value"```, please only translate the "value" parts, and leave anything between %% (eg. %%NAME%%) as is, they are variables that get filled in by the bot.__ Credits From 9c6252fe8ac6f31aad14a2f155e969fa53594e35 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 29 May 2015 14:52:21 +0100 Subject: [PATCH 137/281] Fixed cmdDeletion --- basicBot.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index c1bf104e..e3cb04f2 100644 --- a/basicBot.js +++ b/basicBot.js @@ -993,9 +993,8 @@ API.moderateDeleteChat(chat.cid); return true; } - if (basicBot.settings.cmddeletion && msg.startsWith(basicBot.settings.commandLiteral)) { + if (basicBot.settings.cmdDeletion && msg.startsWith(basicBot.settings.commandLiteral)) { API.moderateDeleteChat(chat.cid); - return true; } /** var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; @@ -1085,6 +1084,9 @@ }, basicBot.settings.commandCooldown * 1000); } if (executed) { + /*if (basicBot.settings.cmdDeletion) { + API.moderateDeleteChat(chat.cid); + }*/ basicBot.room.allcommand = false; setTimeout(function () { basicBot.room.allcommand = true; From 3da8ddc47790adf85509e0000983c4b475dc0e1a Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 29 May 2015 14:55:46 +0100 Subject: [PATCH 138/281] Version update --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index e3cb04f2..d133cba1 100644 --- a/basicBot.js +++ b/basicBot.js @@ -179,7 +179,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.4.5", + version: "2.4.6", status: false, name: "basicBot", loggedInID: null, From f0eb186e22d9537e8a349be2277ee532a096dc83 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 29 May 2015 15:15:05 +0100 Subject: [PATCH 139/281] Update en.json Added roulette explanation. --- lang/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index e700d164..7a3b2b97 100644 --- a/lang/en.json +++ b/lang/en.json @@ -71,7 +71,7 @@ "timelimit": "\/me @%%NAME%%, your song is longer than %%MAXLENGTH%% minutes, you need permission to play longer songs.", "permissionownsong": "\/me :up: @%%NAME%% has permission to play their own production!", "isblacklisted": "\/me This track is on the %%BLACKLIST%% blacklist! Skipping...", - "isopen": "\/me The roulette is now open! Type !join to participate!", + "isopen": "\/me The roulette is now open! Type !join to participate! (A game where a random participant is moved to a random position in the waitlist)", "winnerpicked": "\/me A winner has been picked! @%%NAME%% to position %%POSITION%%.", "ball": "\/me %%NAME%%'s question was: \"%%QUESTION%%\" and %%BOTNAME%%'s response is: \"%%RESPONSE%%\"", "notghosting": "[%%NAME1%%] %%NAME2%% is not ghosting.", From f89eca8bc2e80f101da8c7443143322bd9737aba Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 29 May 2015 15:29:21 +0100 Subject: [PATCH 140/281] Removed command delay Commands will now be more responsive. --- basicBot.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index d133cba1..67eac7f1 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1087,10 +1087,11 @@ /*if (basicBot.settings.cmdDeletion) { API.moderateDeleteChat(chat.cid); }*/ - basicBot.room.allcommand = false; - setTimeout(function () { + + //basicBot.room.allcommand = false; + //setTimeout(function () { basicBot.room.allcommand = true; - }, 5 * 1000); + //}, 5 * 1000); } return executed; }, From 4b017386de982a76e0a3469974947305f3a943ae Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 29 May 2015 15:55:21 +0100 Subject: [PATCH 141/281] Increased roulette notif delete delay --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 67eac7f1..11b61e1f 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1030,7 +1030,7 @@ if ((msg.indexOf(joinedroulette) > -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { setTimeout(function (id) { API.moderateDeleteChat(id); - }, 2 * 1000, chat.cid); + }, 5 * 1000, chat.cid); return true; } return false; @@ -1047,7 +1047,7 @@ else return false; var userPerm = basicBot.userUtilities.getPermission(chat.uid); //console.log("name: " + chat.un + ", perm: " + userPerm); - if (chat.message !== basicBot.settings.commandLiteral + "join" && chat.message !== basicBot.settings.commandLiteral + "leave") { + if (chat.message !== basicBot.settings.commandLiteral + 'join' && chat.message !== basicBot.settings.commandLiteral + "leave") { if (userPerm === 0 && !basicBot.room.usercommand) return void (0); if (!basicBot.room.allcommand) return void (0); } From b162392376a940b68b636a9a0e39a43e98faed45 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 29 May 2015 23:30:03 +0100 Subject: [PATCH 142/281] Added startsWith to string prototype --- basicBot.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/basicBot.js b/basicBot.js index 11b61e1f..549e62ac 100644 --- a/basicBot.js +++ b/basicBot.js @@ -161,6 +161,12 @@ return arr; }; + if (typeof String.prototype.startsWith != 'function') { + String.prototype.startsWith = function( str ) { + return this.substring( 0, str.length ) === str; + } + }; + var linkFixer = function (msg) { var parts = msg.splitBetween(' Date: Sun, 31 May 2015 01:43:09 +0100 Subject: [PATCH 145/281] Store to local storage on user join/leave. --- basicBot.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/basicBot.js b/basicBot.js index 16ef3306..885c392e 100644 --- a/basicBot.js +++ b/basicBot.js @@ -786,6 +786,7 @@ API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); }, 1 * 1000, user); } + storeToStorage(); }, eventUserleave: function (user) { for (var i = 0; i < basicBot.room.users.length; i++) { @@ -794,6 +795,7 @@ basicBot.room.users[i].inRoom = false; } } + storeToStorage(); }, eventVoteupdate: function (obj) { for (var i = 0; i < basicBot.room.users.length; i++) { From 725f5002fb23480dc39f35d0852fb629057a9c60 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 31 May 2015 01:51:57 +0100 Subject: [PATCH 146/281] Revert "Update en.json" This reverts commit a3cc693ba6daeb6916a28d4fa6effb677cdc23f7. --- lang/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index 2c31f327..7a3b2b97 100644 --- a/lang/en.json +++ b/lang/en.json @@ -154,7 +154,7 @@ "eta": "\/me @%%NAME%% you will reach the booth in approximately %%TIME%%.", "facebook": "\/me Like us on facebook: %%LINK%%", "starterhelp": "\/me This image will get you started on plug: %%LINK%%", - "roulettejoin": "@%%NAME%% joined the roulette! (!leave if you regret it)", + "roulettejoin": "\/me @%%NAME%% joined the roulette! (!leave if you regret it.)", "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% has been in the room for %%TIME%%.", "kickrank": "\/me [@%%NAME%%] you can't kick users with an equal or higher rank than you!", "kick": "\/me [@%%NAME%%], @%%USERNAME%% you are being kicked from the community for %%TIME%% minutes.", From faa4978f91a82e378bbcf7a3cb175474b84ab6b0 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 31 May 2015 01:53:15 +0100 Subject: [PATCH 147/281] Revert "Store to local storage on user join/leave." This reverts commit 1965c504d3d427c7a916e9174d47144fa6597225. --- basicBot.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 885c392e..16ef3306 100644 --- a/basicBot.js +++ b/basicBot.js @@ -786,7 +786,6 @@ API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); }, 1 * 1000, user); } - storeToStorage(); }, eventUserleave: function (user) { for (var i = 0; i < basicBot.room.users.length; i++) { @@ -795,7 +794,6 @@ basicBot.room.users[i].inRoom = false; } } - storeToStorage(); }, eventVoteupdate: function (obj) { for (var i = 0; i < basicBot.room.users.length; i++) { From b2215bbf5ebc82f3dba3f3c8264a7e3c8021d9e1 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 31 May 2015 01:56:32 +0100 Subject: [PATCH 148/281] Revert "Revert "Update en.json"" This reverts commit 725f5002fb23480dc39f35d0852fb629057a9c60. --- lang/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index 7a3b2b97..2c31f327 100644 --- a/lang/en.json +++ b/lang/en.json @@ -154,7 +154,7 @@ "eta": "\/me @%%NAME%% you will reach the booth in approximately %%TIME%%.", "facebook": "\/me Like us on facebook: %%LINK%%", "starterhelp": "\/me This image will get you started on plug: %%LINK%%", - "roulettejoin": "\/me @%%NAME%% joined the roulette! (!leave if you regret it.)", + "roulettejoin": "@%%NAME%% joined the roulette! (!leave if you regret it)", "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% has been in the room for %%TIME%%.", "kickrank": "\/me [@%%NAME%%] you can't kick users with an equal or higher rank than you!", "kick": "\/me [@%%NAME%%], @%%USERNAME%% you are being kicked from the community for %%TIME%% minutes.", From 6c4adf465f90796af37bb139649745108b9c13fe Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 31 May 2015 04:09:48 +0100 Subject: [PATCH 149/281] !dc command fix This should fix the bug where the bot would place users who disconnected while DJing to position 1. --- basicBot.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/basicBot.js b/basicBot.js index 16ef3306..5bc7c86e 100644 --- a/basicBot.js +++ b/basicBot.js @@ -788,10 +788,18 @@ } }, eventUserleave: function (user) { + var previousDJ = API.getHistory()[1].user.id; + var lastDJ = API.getHistory()[0].user.id; for (var i = 0; i < basicBot.room.users.length; i++) { if (basicBot.room.users[i].id === user.id) { basicBot.userUtilities.updateDC(basicBot.room.users[i]); basicBot.room.users[i].inRoom = false; + if (lastDJ == user.id || previousDJ == user.id){ + var user = basicBot.userUtilities.lookupUser(basicBot.room.users[i].id); + basicBot.userUtilities.updatePosition(user, 0); + user.lastDC.time = null; + user.lastDC.position = user.lastKnownPosition; + } } } }, From 10031cb02f3d1d9b55c99a284b0b37357b0a0c4e Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 1 Jun 2015 23:53:35 +0100 Subject: [PATCH 150/281] Updated Giphy URL & new func New function decodes HTML char entities Shorter Giphy URL --- basicBot.js | 9 +++++++++ lang/en.json | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 5bc7c86e..d608829d 100644 --- a/basicBot.js +++ b/basicBot.js @@ -178,6 +178,14 @@ return m; }; + var decodeEntities = function (s) { + var str, temp = document.createElement('p'); + temp.innerHTML = s; + str = temp.textContent || temp.innerText; + temp = null; + return str; + }; + var botCreator = "Matthew (***REMOVED***)"; var botMaintainer = "Benzi (Quoona)" var botCreatorIDs = ["3851534", "4105209"]; @@ -733,6 +741,7 @@ }, eventChat: function (chat) { chat.message = linkFixer(chat.message); + chat.message = decodeEntities(chat.message); chat.message = chat.message.trim(); for (var i = 0; i < basicBot.room.users.length; i++) { if (basicBot.room.users[i].id === chat.uid) { diff --git a/lang/en.json b/lang/en.json index 2c31f327..c4df4a20 100644 --- a/lang/en.json +++ b/lang/en.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, please don't spam.", "roomadvertising": "\/me @%%NAME%%, don't post links to other rooms please.", "adfly": "\/me @%%NAME%%, please change your autowoot program. We suggest PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", "invalidgiftags": "\/me [@%%NAME%%] Invalid tags, try something different. [Tags: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Random GIF]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Random GIF]", "invalidgifrandom": "\/me [@%%NAME%%] Invalid request, try again.", "invalidtime": "\/me [@%%NAME%%] Invalid time specified.", "nouserspecified": "\/me [@%%NAME%%] No user specified.", From 671cf07486c43120543e7331733c53b3a42d584f Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 2 Jun 2015 18:43:06 +0100 Subject: [PATCH 151/281] Should fix Timeguard and HistorySkip conflict --- basicBot.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/basicBot.js b/basicBot.js index d608829d..ffdb829a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -883,6 +883,12 @@ } } } + var newMedia = obj.media; + if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); + return API.moderateForceSkip(); + } clearTimeout(historySkip); if (basicBot.settings.historySkip) { var alreadyPlayed = false; @@ -891,10 +897,10 @@ var historySkip = setTimeout(function () { for (var i = 0; i < apihistory.length; i++) { if (apihistory[i].media.cid === obj.media.cid) { - API.sendChat(subChat(basicBot.chat.songknown, {name: name})); - API.moderateForceSkip(); basicBot.room.historyList[i].push(+new Date()); alreadyPlayed = true; + API.sendChat(subChat(basicBot.chat.songknown, {name: name})); + return API.moderateForceSkip(); } } if (!alreadyPlayed) { @@ -902,12 +908,6 @@ } }, 2000); } - var newMedia = obj.media; - if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); - API.moderateForceSkip(); - } if (user.ownSong) { API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); user.ownSong = false; From 25ce240d901b7c18d572448dff287e2bf7074d76 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 3 Jun 2015 04:35:50 +0100 Subject: [PATCH 152/281] Added socket server for data collection This socket server is used solely for statistical and troubleshooting purposes. Server may not always be up, but will be used to get live data at any given time. --- basicBot.js | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index ffdb829a..98800935 100644 --- a/basicBot.js +++ b/basicBot.js @@ -26,6 +26,44 @@ basicBot.status = false; }; + // This socket server is used solely for statistical and troubleshooting purposes. + // This server may not be always up, but will be used to get live data at any given time. + + var socket = function () { + function loadSocket() { + SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; + sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); + sock.onopen = function() { + console.log('Connected to socket!'); + sendToSocket(); + }; + sock.onclose = function() { + console.log('Disconnected from socket, reconnecting every minute ..'); + var reconnect = setTimeout(function(){ loadSocket() }, 60 * 1000); + }; + sock.onmessage = function(broadcast) { + var rawBroadcast = broadcast.data; + var broadcastMessage = rawBroadcast.replace(/["\\]+/g, ''); + API.chatLog(broadcastMessage); + console.log(broadcastMessage); + }; + } + if (typeof SockJS == 'undefined') { + $.getScript('https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js', loadSocket); + } else loadSocket(); + } + + var sendToSocket = function () { + var basicBotSettings = basicBot.settings; + var basicBotRoom = basicBot.room; + var basicBotInfo = { + time: Date.now(), + version: basicBot.version + }; + var data = {users:API.getUsers(),userinfo:API.getUser(),room:location.pathname,basicBotSettings:basicBotSettings,basicBotRoom:basicBotRoom,basicBotInfo:basicBotInfo}; + return sock.msg(data); + }; + var storeToStorage = function () { localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); localStorage.setItem("basicBotRoom", JSON.stringify(basicBot.room)); @@ -922,7 +960,7 @@ }, remaining + 3000); } storeToStorage(); - + sendToSocket(); }, eventWaitlistupdate: function (users) { if (users.length < 50) { @@ -1277,6 +1315,7 @@ } API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); API.chatLog('Volume set to ' + basicBot.settings.startupVolume); + socket(); loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); }, commands: { @@ -2219,6 +2258,7 @@ if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { storeToStorage(); + sendToSocket(); API.sendChat(basicBot.chat.kill); basicBot.disconnectAPI(); setTimeout(function () { @@ -2678,6 +2718,7 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { + sendToSocket(); storeToStorage(); basicBot.disconnectAPI(); setTimeout(function () { @@ -2697,6 +2738,7 @@ if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { API.sendChat(basicBot.chat.reload); + sendToSocket(); storeToStorage(); basicBot.disconnectAPI(); kill(); From f2728ddb230a7822d8a8e2e2d921583f9ea1d424 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 3 Jun 2015 04:41:50 +0100 Subject: [PATCH 153/281] Version update --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 98800935..208204e7 100644 --- a/basicBot.js +++ b/basicBot.js @@ -229,7 +229,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.4.6", + version: "2.5.6", status: false, name: "basicBot", loggedInID: null, From 426012ef429b174a308ecb897676950fe2e72f03 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 4 Jun 2015 22:35:58 +0100 Subject: [PATCH 154/281] Updated !eta command. --- basicBot.js | 3 +++ lang/en.json | 2 ++ 2 files changed, 5 insertions(+) diff --git a/basicBot.js b/basicBot.js index 208204e7..2848ec4c 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1990,6 +1990,7 @@ else { var perm = basicBot.userUtilities.getPermission(chat.uid); var msg = chat.message; + var dj = API.getDJ().username; var name; if (msg.length > cmd.length) { if (perm < 2) return void (0); @@ -1998,7 +1999,9 @@ var user = basicBot.userUtilities.lookupUserName(name); if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); var pos = API.getWaitListPosition(user.id); + if (name == dj) return API.sendChat(subChat(basicBot.chat.youaredj, {name: name})); if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); + if (pos == 0) return API.sendChat(subChat(basicBot.chat.youarenext, {name: name})); var timeRemaining = API.getTimeRemaining(); var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; var estimateString = basicBot.roomUtilities.msToStr(estimateMS); diff --git a/lang/en.json b/lang/en.json index c4df4a20..8ae9df33 100644 --- a/lang/en.json +++ b/lang/en.json @@ -151,6 +151,8 @@ "dclookuprank": "\/me [@%%NAME%%] Only bouncers and above can do a lookup for others.", "emojilist": "\/me Emoji list: %%LINK%%", "notinwaitlist": "\/me @%%NAME%%, you are not on the waitlist.", + "youarenext": "\/me @%%NAME%%, you are DJing after this song.", + "youaredj": "\/me @%%NAME%%, you are currently DJing.", "eta": "\/me @%%NAME%% you will reach the booth in approximately %%TIME%%.", "facebook": "\/me Like us on facebook: %%LINK%%", "starterhelp": "\/me This image will get you started on plug: %%LINK%%", From e5b827db9d0146f71e894d4424f0620bcb072cbb Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 4 Jun 2015 23:21:17 +0100 Subject: [PATCH 155/281] Added position number to !eta command. --- basicBot.js | 3 ++- lang/en.json | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 2848ec4c..e4cbb516 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1999,13 +1999,14 @@ var user = basicBot.userUtilities.lookupUserName(name); if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); var pos = API.getWaitListPosition(user.id); + var realpos = pos + 1; if (name == dj) return API.sendChat(subChat(basicBot.chat.youaredj, {name: name})); if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); if (pos == 0) return API.sendChat(subChat(basicBot.chat.youarenext, {name: name})); var timeRemaining = API.getTimeRemaining(); var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; var estimateString = basicBot.roomUtilities.msToStr(estimateMS); - API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString})); + API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString, position: realpos})); } } }, diff --git a/lang/en.json b/lang/en.json index 8ae9df33..f2a03458 100644 --- a/lang/en.json +++ b/lang/en.json @@ -153,7 +153,7 @@ "notinwaitlist": "\/me @%%NAME%%, you are not on the waitlist.", "youarenext": "\/me @%%NAME%%, you are DJing after this song.", "youaredj": "\/me @%%NAME%%, you are currently DJing.", - "eta": "\/me @%%NAME%% you will reach the booth in approximately %%TIME%%.", + "eta": "\/me @%%NAME%% you are position %%POSITION%% in the waitlist and will reach the booth in approximately %%TIME%%.", "facebook": "\/me Like us on facebook: %%LINK%%", "starterhelp": "\/me This image will get you started on plug: %%LINK%%", "roulettejoin": "@%%NAME%% joined the roulette! (!leave if you regret it)", From 3caf64dd28adfc66640ea4ed1205c89b0f808f62 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 4 Jun 2015 23:49:17 +0100 Subject: [PATCH 156/281] Updated en.json Added a comma to eta. --- lang/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index f2a03458..a9da2694 100644 --- a/lang/en.json +++ b/lang/en.json @@ -153,7 +153,7 @@ "notinwaitlist": "\/me @%%NAME%%, you are not on the waitlist.", "youarenext": "\/me @%%NAME%%, you are DJing after this song.", "youaredj": "\/me @%%NAME%%, you are currently DJing.", - "eta": "\/me @%%NAME%% you are position %%POSITION%% in the waitlist and will reach the booth in approximately %%TIME%%.", + "eta": "\/me @%%NAME%%, you are position %%POSITION%% in the waitlist and will reach the booth in approximately %%TIME%%.", "facebook": "\/me Like us on facebook: %%LINK%%", "starterhelp": "\/me This image will get you started on plug: %%LINK%%", "roulettejoin": "@%%NAME%% joined the roulette! (!leave if you regret it)", From 5d058e0d045033bd218b01d6be3ed5351fbcdc2d Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 01:29:51 +0100 Subject: [PATCH 157/281] Updated language files --- lang/en.json | 1 + lang/fr.json | 3 +++ lang/lv.json | 3 +++ lang/nl.json | 49 ++++++++++++++++++++++++++----------------------- lang/pt.json | 9 ++++++--- lang/sr.json | 3 +++ lang/tr.json | 3 +++ lang/zh.json | 3 +++ 8 files changed, 48 insertions(+), 26 deletions(-) diff --git a/lang/en.json b/lang/en.json index a9da2694..68c77c4f 100644 --- a/lang/en.json +++ b/lang/en.json @@ -68,6 +68,7 @@ "welcome": "\/me Welcome %%NAME%%", "welcomeback": "\/me Welcome back, %%NAME%%", "songknown": "\/me @%%NAME%%, this song is in the DJ history.", + "notavailable": "\/me @%%NAME%%, the song you played was not available.", "timelimit": "\/me @%%NAME%%, your song is longer than %%MAXLENGTH%% minutes, you need permission to play longer songs.", "permissionownsong": "\/me :up: @%%NAME%% has permission to play their own production!", "isblacklisted": "\/me This track is on the %%BLACKLIST%% blacklist! Skipping...", diff --git a/lang/fr.json b/lang/fr.json index acc2c659..7d8e1b64 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -68,6 +68,7 @@ "welcome": "\/me Bienvenue %%NAME%%", "welcomeback": "\/me Bon retour, %%NAME%%", "songknown": "\/me @%%NAME%%, cette musique est dans l'historique.", + "notavailable": "\/me @%%NAME%%, the song you played was not available.", "timelimit": "\/me @%%NAME%%, votre musique est plus longue que %%MAXLENGTH%% minutes, vous avez besoin de la permission pour jouer une musique plus longue.", "permissionownsong": "\/me :up: @%%NAME%% a la permission de jouer sa propre cr\u00e9ation !", "isblacklisted": "\/me Cette musique est sur la liste noire %%BLACKLIST%% ! Je passe...", @@ -151,6 +152,8 @@ "dclookuprank": "\/me [@%%NAME%%] Uniquement les Videurs peuvent v\u00e9rifier pour les autres.", "emojilist": "\/me Liste des Emoji : %%LINK%%", "notinwaitlist": "\/me @%%NAME%%, vous n'\u00eates pas dans la file d'attente.", + "youarenext": "\/me @%%NAME%%, you are DJing after this song.", + "youaredj": "\/me @%%NAME%%, you are currently DJing.", "eta": "\/me @%%NAME%%, vous atteignerez les platines dans \u00e0 peu pr\u00e8s %%TIME%%.", "facebook": "\/me Suivez-nous sur Facebook : %%LINK%%", "starterhelp": "\/me Cette image vous aidera \u00e0 d\u00e9buter sur plug : %%LINK%%", diff --git a/lang/lv.json b/lang/lv.json index 09236748..27a228e7 100644 --- a/lang/lv.json +++ b/lang/lv.json @@ -68,6 +68,7 @@ "welcome": "\/me Laipni aicin\u0101ts\/-a %%NAME%%", "welcomeback": "\/me Laipni aicin\u0101ts\/-a atpaka\u013c, %%NAME%%", "songknown": "\/me @%%NAME%%,\u0161\u012b dziesma ir DJ v\u0113stur\u0113.", + "notavailable": "\/me @%%NAME%%, the song you played was not available.", "timelimit": "\/me @%%NAME%%, j\u016bsu dziesma ir gar\u0101ka nek\u0101%%MAXLENGTH%% min\u016btes, jums ir nepiecie\u0161ama at\u013cauja, lai sp\u0113l\u0113tu gar\u0101kas dziesmas.", "permissionownsong": "\/me :up: @%%NAME%% ir at\u013cauja, lai sp\u0113l\u0113tu vi\u0146u pa\u0161u produkciju!", "isblacklisted": "\/me \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101!! Izlai\u017eam ......", @@ -151,6 +152,8 @@ "dclookuprank": "\/me [@%%NAME%%] Tikai bouncers un vair\u0101k var dar\u012bt lookup citiem.", "emojilist": "\/me Emociju sarakts: %%LINK%%", "notinwaitlist": "\/me @%%NAME%%, J\u016bs neesat waitlista.", + "youarenext": "\/me @%%NAME%%, you are DJing after this song.", + "youaredj": "\/me @%%NAME%%, you are currently DJing.", "eta": "\/me @%%NAME%% J\u016bs sasniegsiet kab\u012bni aptuveni%%TIME%%.", "facebook": "\/me Like m\u016bs facebooka: %%LINK%%", "starterhelp": "\/me \u0160is att\u0113ls k\u013c\u016bs jums s\u0101kum\u0101 plug:%%LINK%%", diff --git a/lang/nl.json b/lang/nl.json index 2604de45..e6c7ba1a 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -1,9 +1,9 @@ { "cookies": [ - "has given you a chocolate chip cookie!", - "has given you a soft homemade oatmeal cookie!", - "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", - "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", + "heeft jou een chocoladekoekje gegeven!", + "heeft jou een zacht huisgemaakt havermeelkoekje gegeven!", + "heeft jou een kaal, droog, oud koekje gegeven. Het was de laatste in de zak. Smerig.", + "geeft jou een suikerkoekje. Wat, geen glazuur en versiering? Die wil niemand.", "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", "gives you an enormous cookie. Poking it gives you more cookies. Weird.", "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", @@ -23,35 +23,35 @@ ], "balls": [ "Signs point to yes.", - "Yes.", + "Ja.", "Reply hazy, try again.", "Without a doubt.", - "My sources say no.", + "Mijn bronnen zeggen van niet.", "As I see it, yes.", - "You may rely on it.", - "Concentrate and ask again.", + "Daar kan je op rekenen.", + "Concentreer je en vraag opnieuw.", "Outlook not so good.", "It is decidedly so.", "Better not tell you now.", - "Very doubtful.", - "Yes - definitely.", + "Heel twijfelachtig.", + "Ja, zeker.", "It is certain.", - "Cannot predict now.", - "Most likely.", - "Ask again later.", - "My reply is no.", + "Kan nu niet voorspellen.", + "Waarschijnlijk.", + "Vraag later opnieuw.", + "Mijn antwoord is nee.", "Outlook good.", - "Don't count on it.", + "Reken er niet op.", "Yes, in due time.", - "My sources say no.", - "Definitely not.", - "You will have to wait.", - "I have my doubts.", + "Mijn bronnen zeggen nee.", + "Zeker niet.", + "Je zult moeten wachten.", + "Ik heb mijn twijfels.", "Outlook so so.", - "Looks good to me!", - "Who knows?", - "Looking good!", - "Probably.", + "Dat vind ik er goed uit zien.", + "Wie weet?", + "Ziet er goed uit!", + "Waarschijnlijk.", "Are you kidding?", "Don't bet on it.", "Forget about it." @@ -68,6 +68,7 @@ "welcome": "\/me Welkom %%NAME%%", "welcomeback": "\/me Welkom terug, %%NAME%%", "songknown": "\/me @%%NAME%%, Dit lied staat in de DJ geschiedenis.", + "notavailable": "\/me @%%NAME%%, the song you played was not available.", "timelimit": "\/me @%%NAME%%, jouw lied is langer dan %%MAXLENGTH%% minuten, je hebt toestemming nodig om langere liedjes te spelen.", "permissionownsong": "\/me :up: @%%NAME%% heeft toestemming om hun eigen productie te spelen!", "isblacklisted": "\/me Dit liedje staat op de %%BLACKLIST%% blacklist! Overslaan...", @@ -151,6 +152,8 @@ "dclookuprank": "\/me [@%%NAME%%] Alleen bouncers of hogere ranking kunnen iets opzoeken voor anderen.", "emojilist": "\/me Lijst met Emoji's: %%LINK%%", "notinwaitlist": "\/me @%%NAME%%, je bent niet in de wachtlijst.", + "youarenext": "\/me @%%NAME%%, you are DJing after this song.", + "youaredj": "\/me @%%NAME%%, you are currently DJing.", "eta": "\/me @%%NAME%% je zal de booth bereiken in ongeveer %%TIME%%.", "facebook": "\/me Like ons op facebook: %%LINK%%", "starterhelp": "\/me Deze afbeelding zal je op weg helpen op plug: %%LINK%%", diff --git a/lang/pt.json b/lang/pt.json index 5bc46cf9..ea7bace0 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -68,10 +68,11 @@ "welcome": "Bem vindo(a), %%NAME%%", "welcomeback": "Bem vindo(a) de volta, %%NAME%%", "songknown": "@%%NAME%%, essa m\u00fasica est\u00e1 no hist\u00f3rico.", + "notavailable": "\/me @%%NAME%%, a m\u00fasica que voc\u00ea tocou n\u00e3o est\u00e1 dispon\u00edvel.", "timelimit": "@%%NAME%%, sua m\u00fasica tem dura\u00e7\u00e3o maior que %%MAXLENGTH%% minutos. Voc\u00ea precisa ter permiss\u00e3o para tocar m\u00fasicas longas.", "permissionownsong": "\/me :up: @%%NAME%% tem permiss\u00e3o para tocar m\u00fasica de pr\u00f3pria autoria!", "isblacklisted": "\/me Essa m\u00fasica est\u00e1 na lista negra %%BLACKLIST%%! Pulando m\u00fasica...", - "isopen": "\/me A roleta foi iniciada! Use !join para participar!", + "isopen": "\/me A roleta foi iniciada! Use !join para participar! (Jogo onde um participante aleat\u00f3rio \u00e9 movido para uma posi\u00e7\u00e3o aleat\u00f3ria na fila de espera)", "winnerpicked": "\/me Um vencedor foi escolhido! @%%NAME%% ganhou a posi\u00e7\u00e3o %%POSITION%%.", "ball": "\/me A pergunta de %%NAME%% foi: \"%%QUESTION%%\" e a resposta de %%BOTNAME%% \u00e9: \"%%RESPONSE%%\"", "notghosting": "[%%NAME1%%] %%NAME2%% n\u00e3o virou fantasma.", @@ -151,10 +152,12 @@ "dclookuprank": "\/me [@%%NAME%%] Somente Seguran\u00e7as ou superiores podem usar !dclookup em outros usu\u00e1rios.", "emojilist": "\/me Emojis: %%LINK%%", "notinwaitlist": "@%%NAME%%, voc\u00ea n\u00e3o est\u00e1 na lista de espera.", - "eta": "\/me @%%NAME%% voc\u00ea tocar\u00e1 em aproximadamente %%TIME%%.", + "youarenext": "\/me @%%NAME%%, voc\u00ea tocar\u00e1 depois desta m\u00fasica.", + "youaredj": "\/me @%%NAME%%, voc\u00ea est\u00e1 tocando.", + "eta": "\/me @%%NAME%%, voc\u00ea est\u00e1 na posi\u00e7\u00e3o %%POSITION%% na fila de espera e tocar\u00e1 em aproximadamente %%TIME%%.", "facebook": "\/me Curta nossa p\u00e1gina no Facebook: %%LINK%%", "starterhelp": "\/me Essa imagem te ajudar\u00e1 a usar e entender o plug.dj: %%LINK%%", - "roulettejoin": "\/me @%%NAME%% entrou na roleta! (Use !leave para sair da mesma.)", + "roulettejoin": "\/me @%%NAME%% entrou na roleta! (Use !leave para sair da mesma)", "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% esteve na sala por %%TIME%%.", "kickrank": "\/me [@%%NAME%%] Voc\u00ea n\u00e3o pode kickar algu\u00e9m do mesmo rank ou superior!", "kick": "[@%%NAME%%], @%%USERNAME%% voc\u00ea est\u00e1 sendo kickado da comunidade por %%TIME%% minutos.", diff --git a/lang/sr.json b/lang/sr.json index b8f8a02f..635b7b3c 100644 --- a/lang/sr.json +++ b/lang/sr.json @@ -68,6 +68,7 @@ "welcome": "\/me Dobrodo\u0161ao %%NAME%%", "welcomeback": "\/me Dobrodo\u0161ao nazad, %%NAME%%", "songknown": "\/me @%%NAME%%, Ova pesma je u DJ istoriji.", + "notavailable": "\/me @%%NAME%%, the song you played was not available.", "timelimit": "\/me @%%NAME%%, Tvoja pesma je duza od %%MAXLENGTH%% minuta, potrebna ti je dozvola da pustas duze pesme.", "permissionownsong": "\/me :up: @%%NAME%% ima dozvolu da pu\u0161ta svoju vlastitu pesmu.", "isblacklisted": "\/me Ova pesma je na %%BLACKLIST%% blacklisti! Prebacujem....", @@ -151,6 +152,8 @@ "dclookuprank": "\/me [@%%NAME%%] Samo bounceri i vi\u0161i rank mogu dclookup za ostale.", "emojilist": "\/me Emoji lista: %%LINK%%", "notinwaitlist": "\/me @%%NAME%%, nisi na listi \u010dekanja.", + "youarenext": "\/me @%%NAME%%, you are DJing after this song.", + "youaredj": "\/me @%%NAME%%, you are currently DJing.", "eta": "\/me @%%NAME%% do\u0107i \u0107e\u0161 na red za otprilike %%TIME%%.", "facebook": "\/me Lajkuj nas na facebook-u: %%LINK%%", "starterhelp": "\/me Ova slika ce ti pomo\u0107i za po\u010detak: %%LINK%%", diff --git a/lang/tr.json b/lang/tr.json index c21e68d2..36280ad3 100644 --- a/lang/tr.json +++ b/lang/tr.json @@ -68,6 +68,7 @@ "welcome": "\/me Hosgeldiniz %%NAME%%", "welcomeback": "\/me Tekrar hosgeldin, %%NAME%%", "songknown": "\/me @%%NAME%%, Actiginiz sarki daha once acildi.", + "notavailable": "\/me @%%NAME%%, the song you played was not available.", "timelimit": "\/me @%%NAME%%, Sarkiniz %%MAXLENGTH%% dakikadan uzun, daha uzun sarki calmak icin op listesinde olmaniz gerekli.", "permissionownsong": "\/me :up: @%%NAME%% sarkiyi oynatman icin yetkin var.", "isblacklisted": "\/me Sarki %%BLACKLIST%% yasak listesinde! Geciliyor...", @@ -151,6 +152,8 @@ "dclookuprank": "\/me [@%%NAME%%] Sadece yukaridaki kullanicilar icin arama yapabilirsiniz.", "emojilist": "\/me Gulucuk Listesi: %%LINK%%", "notinwaitlist": "\/me @%%NAME%%, dj sirasinda ekli degilsin.", + "youarenext": "\/me @%%NAME%%, you are DJing after this song.", + "youaredj": "\/me @%%NAME%%, you are currently DJing.", "eta": "\/me @%%NAME%% yaklasik olarak %%TIME%% 1 standina ulasicak.", "facebook": "\/me Facebook sayfamizi ziyaret edin: %%LINK%%", "starterhelp": "\/me Yeni basladiysaniz bir goz atin: %%LINK%%", diff --git a/lang/zh.json b/lang/zh.json index 551d23b7..9bcf659b 100644 --- a/lang/zh.json +++ b/lang/zh.json @@ -68,6 +68,7 @@ "welcome": "\/me \u6b61\u8fce %%NAME%%", "welcomeback": "\/me \u6b61\u8fce\u56de\u4f86, %%NAME%%", "songknown": "\/me @%%NAME%%, \u6b64\u66f2\u5df2\u5728DJ\u6b77\u53f2\u7d00\u9304\u88e1.", + "notavailable": "\/me @%%NAME%%, the song you played was not available.", "timelimit": "\/me @%%NAME%%, \u4f60\u7684\u6b4c\u66f2\u9577\u5ea6\u8d85\u904e %%MAXLENGTH%% \u5206\u9418, \u4f60\u9700\u8981\u6b0a\u9650\u4ee5\u64ad\u653e\u592a\u9577\u7684\u6b4c\u66f2.", "permissionownsong": "\/me :up: @%%NAME%% \u5df2\u6709\u6b0a\u9650\u64ad\u653e\u4ed6\u5011\u81ea\u5df1\u7684\u88fd\u4f5c!", "isblacklisted": "\/me \u6b64\u66f2\u76ee\u5728 %%BLACKLIST%% \u7981\u64ad\u9ed1\u540d\u55ae\u88e1! \u8df3\u904e...", @@ -151,6 +152,8 @@ "dclookuprank": "\/me [@%%NAME%%] \u53ea\u6709\u4fdd\u93e2\u6216\u66f4\u9ad8\u968e\u7d1a\u53ef\u67e5\u770b\u5176\u4ed6\u4eba.", "emojilist": "\/me Emoji\u5217\u8868: %%LINK%%", "notinwaitlist": "\/me @%%NAME%%, \u4f60\u4e26\u4e0d\u5728\u7b49\u5019\u5217\u8868\u88e1.", + "youarenext": "\/me @%%NAME%%, \u4f60\u5c07\u5728\u6b64\u6b4c\u66f2\u5f8c\u64ad\u653e\u4e86\u5594.", + "youaredj": "\/me @%%NAME%%, \u4f60\u76ee\u524d\u6b63\u5728DJ\u64ad\u653e.", "eta": "\/me @%%NAME%% \u4f60\u6703\u65bc\u5927\u6982 %%TIME%% \u5f8c\u62b5\u9054\u5c55\u53f0.", "facebook": "\/me \u8acb\u8b9a\u6211\u5011\u7684\u9762\u5b50\u66f8: %%LINK%%", "starterhelp": "\/me \u6b64\u5716\u50cf\u53ef\u6307\u5f15\u4f60\u5982\u4f55\u5728plug\u958b\u59cb: %%LINK%%", From 573f2713d34e826c151e6231733aeae6073fdcf9 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 03:44:44 +0100 Subject: [PATCH 158/281] Added smartSkip + others smartSkip will skip the song and move to the user to the lockskip position. Lockskips will be triggered if the waitlist is full. You can toggle smartSkip in the bot settings. Voteskip has also been improved with smartSkip, it will give the user a second chance if the majority of the song hasn't yet been played by moving the user to the lockskip position specified in the bot settings. Autowoot can now be toggled in the bot settings. Improved Autoskip. --- basicBot.js | 156 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 133 insertions(+), 23 deletions(-) diff --git a/basicBot.js b/basicBot.js index e4cbb516..cb03f4f6 100644 --- a/basicBot.js +++ b/basicBot.js @@ -81,6 +81,8 @@ API.chatLog("There is a chat text missing."); console.log("There is a chat text missing."); return "[Error] No text message found."; + + // TODO: Get missing chat messages from source. } var lit = '%%'; for (var prop in obj) { @@ -229,7 +231,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.5.6", + version: "2.5.8", status: false, name: "basicBot", loggedInID: null, @@ -247,6 +249,8 @@ startupCap: 1, // 1-200 startupVolume: 0, // 0-100 startupEmoji: false, // true or false + autowoot: true, + smartSkip: true, cmdDeletion: true, maximumAfk: 120, afkRemoval: true, @@ -689,6 +693,36 @@ } } }, + smartSkip: function () { + if (basicBot.room.skippable) { + var dj = API.getDJ(); + var id = dj.id; + var waitlistlength = API.getWaitList().length; + var locked = false; + basicBot.room.queueable = false; + + if (waitlistlength == 50) { + basicBot.roomUtilities.booth.lockBooth(); + locked = true; + } + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 2 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + if (locked) { + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 500); + } + }, 1000, id); + }, 500, id); + } + }, changeDJCycle: function () { var toggle = $(".cycle-toggle"); if (toggle.hasClass("disabled")) { @@ -703,6 +737,8 @@ toggle.click(); clearTimeout(basicBot.room.cycleTimer); } + + // TODO: Use API.moderateDJCycle(true/false) }, intervalMessage: function () { var interval; @@ -865,11 +901,18 @@ var mehs = API.getScore().negative; var woots = API.getScore().positive; var dj = API.getDJ(); + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); if (basicBot.settings.voteSkip) { if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); - API.moderateForceSkip(); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } } } @@ -882,7 +925,9 @@ } }, eventDjadvance: function (obj) { - $("#woot").click(); // autowoot + if (basicBot.settings.autowoot) { + $("#woot").click(); // autowoot + } var user = basicBot.userUtilities.lookupUser(obj.dj.id) for(var i = 0; i < basicBot.room.users.length; i++){ @@ -912,21 +957,67 @@ basicBot.roomUtilities.intervalMessage(); basicBot.room.currentDJID = obj.dj.id; - var mid = obj.media.format + ':' + obj.media.cid; - for (var bl in basicBot.room.blacklists) { - if (basicBot.settings.blacklistEnabled) { - if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { - API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); - return API.moderateForceSkip(); + var blacklistSkip = setTimeout(function () { + var mid = obj.media.format + ':' + obj.media.cid; + for (var bl in basicBot.room.blacklists) { + if (basicBot.settings.blacklistEnabled) { + if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { + API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } } } - } + }, 2000); var newMedia = obj.media; - if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); - return API.moderateForceSkip(); - } + var timeLimitSkip = setTimeout(function () { + if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }, 2000); + var format = obj.media.format; + var cid = obj.media.cid; + var naSkip = setTimeout(function () { + if (format == 1){ + $.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + cid + '&key=AIzaSyDcfWu9cGaDnTjPKhg_dy9mUh6H7i4ePZ0&part=snippet&callback=?', function (track){ + if (typeof(track.items[0]) === 'undefined'){ + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }); + } + else { + var checkSong = SC.get('/tracks/' + cid, function (track){ + if (typeof track.title === 'undefined'){ + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }); + } + }, 2000); clearTimeout(historySkip); if (basicBot.settings.historySkip) { var alreadyPlayed = false; @@ -938,7 +1029,12 @@ basicBot.room.historyList[i].push(+new Date()); alreadyPlayed = true; API.sendChat(subChat(basicBot.chat.songknown, {name: name})); - return API.moderateForceSkip(); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } } } if (!alreadyPlayed) { @@ -953,11 +1049,14 @@ clearTimeout(basicBot.room.autoskipTimer); if (basicBot.room.autoskip) { var remaining = obj.media.duration * 1000; - basicBot.room.autoskipTimer = setTimeout(function () { - console.log("Skipping track."); - //API.sendChat('Song stuck, skipping...'); - API.moderateForceSkip(); - }, remaining + 3000); + var startcid = API.getMedia().cid; + basicBot.room.autoskipTimer = setTimeout(function() { + var endcid = API.getMedia().cid; + if (startcid === endcid) { + //API.sendChat('Song stuck, skipping...'); + API.moderateForceSkip(); + } + }, remaining + 5000); } storeToStorage(); sendToSocket(); @@ -1298,7 +1397,9 @@ basicBot.status = true; API.sendChat('/cap ' + basicBot.settings.startupCap); API.setVolume(basicBot.settings.startupVolume); - $("#woot").click(); + if (basicBot.settings.autowoot) { + $("#woot").click(); + } if (basicBot.settings.startupEmoji) { var emojibuttonoff = $(".icon-emoji-off"); if (emojibuttonoff.length > 0) { @@ -1640,6 +1741,8 @@ if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); else { var media = API.getMedia(); + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); var track = { list: list, author: media.author, @@ -1649,7 +1752,12 @@ basicBot.room.newBlacklisted.push(track); basicBot.room.blacklists[list].push(media.format + ':' + media.cid); API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); - API.moderateForceSkip(); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { basicBot.room.newBlacklistedSongFunction(track); } @@ -2970,6 +3078,8 @@ else msg += 'OFF'; msg += '. '; + // TODO: Display more toggleable bot settings. + var launchT = basicBot.room.roomstats.launchTime; var durationOnline = Date.now() - launchT; var since = basicBot.roomUtilities.msToStr(durationOnline); From 512a0ac9cdc58b2d934508d6623794cfbda3eead Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 03:56:19 +0100 Subject: [PATCH 159/281] Removed smartSkip skippable condition This is so smartSkip can be triggered if skippable is false. --- basicBot.js | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/basicBot.js b/basicBot.js index cb03f4f6..3b34913a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -694,34 +694,32 @@ } }, smartSkip: function () { - if (basicBot.room.skippable) { - var dj = API.getDJ(); - var id = dj.id; - var waitlistlength = API.getWaitList().length; - var locked = false; - basicBot.room.queueable = false; - - if (waitlistlength == 50) { - basicBot.roomUtilities.booth.lockBooth(); - locked = true; - } + var dj = API.getDJ(); + var id = dj.id; + var waitlistlength = API.getWaitList().length; + var locked = false; + basicBot.room.queueable = false; + + if (waitlistlength == 50) { + basicBot.roomUtilities.booth.lockBooth(); + locked = true; + } + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 2 * 1000); setTimeout(function (id) { - API.moderateForceSkip(); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 2 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); - basicBot.room.queueable = true; - if (locked) { - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 500); - } - }, 1000, id); - }, 500, id); - } + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + if (locked) { + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 500); + } + }, 1000, id); + }, 500, id); }, changeDJCycle: function () { var toggle = $(".cycle-toggle"); From 6c439d7448a313538bcd67718cd2b0a596c1e510 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 05:03:53 +0100 Subject: [PATCH 160/281] Improved DC lookup --- basicBot.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 3b34913a..29ae423f 100644 --- a/basicBot.js +++ b/basicBot.js @@ -869,13 +869,12 @@ } }, eventUserleave: function (user) { - var previousDJ = API.getHistory()[1].user.id; var lastDJ = API.getHistory()[0].user.id; for (var i = 0; i < basicBot.room.users.length; i++) { if (basicBot.room.users[i].id === user.id) { basicBot.userUtilities.updateDC(basicBot.room.users[i]); basicBot.room.users[i].inRoom = false; - if (lastDJ == user.id || previousDJ == user.id){ + if (lastDJ == user.id){ var user = basicBot.userUtilities.lookupUser(basicBot.room.users[i].id); basicBot.userUtilities.updatePosition(user, 0); user.lastDC.time = null; From f49a0d1396f3fc37102b3d0855c2996573a346a7 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 06:54:44 +0100 Subject: [PATCH 161/281] Removed user status from whois command --- basicBot.js | 16 +++------------- lang/en.json | 2 +- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/basicBot.js b/basicBot.js index 29ae423f..3d236469 100644 --- a/basicBot.js +++ b/basicBot.js @@ -3515,16 +3515,6 @@ } else if (rawlang == "ms"){ var language = "Malay" } - var rawstatus = API.getUser(id).status; - if (rawstatus == "0"){ - var status = "Available"; - } else if (rawstatus == "1"){ - var status = "Away"; - } else if (rawstatus == "2"){ - var status = "Working"; - } else if (rawstatus == "3"){ - var status = "Gaming" - } var rawrank = API.getUser(id).role; if (rawrank == "0"){ var rank = "User"; @@ -3545,12 +3535,12 @@ } var slug = API.getUser(id).slug; if (typeof slug !== 'undefined') { - var profile = ", Profile: http://plug.dj/@/" + slug; + var profile = "https://plug.dj/@/" + slug; } else { - var profile = ""; + var profile = "~"; } - API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, status: status, joined: joined, rank: rank})); + API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, joined: joined, rank: rank})); } } } diff --git a/lang/en.json b/lang/en.json index 68c77c4f..563c35af 100644 --- a/lang/en.json +++ b/lang/en.json @@ -105,7 +105,7 @@ "nolimitspecified": "\/me [@%%NAME%%] No limit specified.", "invalidlimitspecified": "\/me [@%%NAME%%] Invalid limit.", "invalidpositionspecified": "\/me [@%%NAME%%] Invalid position specified.", - "whois": "\/me [%%NAME1%%] Username: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Joined: %%JOINED%%, Level: %%LEVEL%%, Language: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", + "whois": "\/me [%%NAME1%%] Username: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Joined: %%JOINED%%, Level: %%LEVEL%%, Language: %%LANGUAGE%%, Avatar: %%AVATAR%%, Profile: %%PROFILE%%", "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% enabled.", "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% disabled.", "cmddeletion": "command deletion", From 36a6c0b4ce0ab7cb7567e433244b54010e9a7306 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 07:07:31 +0100 Subject: [PATCH 162/281] Version update --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 3d236469..f5ec78b8 100644 --- a/basicBot.js +++ b/basicBot.js @@ -231,7 +231,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.5.8", + version: "2.6.8", status: false, name: "basicBot", loggedInID: null, From 663375ec6dcef3498fb7688737b42dca0715b00c Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 09:01:31 +0100 Subject: [PATCH 163/281] Skipping just got smarter. !skip now renamed to !forceskip, !skip now includes smarter lockskip characteristics, !lockskip still works for those who still want to use it. --- basicBot.js | 130 ++++++++++++++++++++++++++++++++++++--------------- commands.md | 7 +-- lang/en.json | 9 ++-- lang/fr.json | 5 +- lang/lv.json | 5 +- lang/nl.json | 27 +++++------ lang/pt.json | 5 +- lang/sr.json | 5 +- lang/tr.json | 5 +- lang/zh.json | 5 +- 10 files changed, 133 insertions(+), 70 deletions(-) diff --git a/basicBot.js b/basicBot.js index f5ec78b8..b3635635 100644 --- a/basicBot.js +++ b/basicBot.js @@ -231,7 +231,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.6.8", + version: "2.7.8", status: false, name: "basicBot", loggedInID: null, @@ -270,8 +270,8 @@ autodisable: true, commandCooldown: 30, usercommandsEnabled: true, - lockskipPosition: 3, - lockskipReasons: [ + skipPosition: 3, + skipReasons: [ ["theme", "This song does not fit the room theme. "], ["op", "This song is on the OP list. "], ["history", "This song is in the history. "], @@ -299,8 +299,9 @@ songstats: true, commandLiteral: "!", blacklists: { - NSFW: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/ExampleNSFWlist.json", - OP: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/ExampleOPlist.json" + NSFW: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/NSFWlist.json", + OP: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/OPlist.json", + BANNED: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/BANNEDlist.json" } }, room: { @@ -693,7 +694,7 @@ } } }, - smartSkip: function () { + smartSkip: function (reason) { var dj = API.getDJ(); var id = dj.id; var waitlistlength = API.getWaitList().length; @@ -705,13 +706,16 @@ locked = true; } setTimeout(function (id) { + if (typeof reason !== 'undefined') { + API.sendChat(reason); + } API.moderateForceSkip(); basicBot.room.skippable = false; setTimeout(function () { basicBot.room.skippable = true }, 2 * 1000); setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.userUtilities.moveUser(id, basicBot.settings.skipPosition, false); basicBot.room.queueable = true; if (locked) { setTimeout(function () { @@ -720,6 +724,7 @@ } }, 1000, id); }, 500, id); + return void (0); }, changeDJCycle: function () { var toggle = $(".cycle-toggle"); @@ -905,10 +910,10 @@ if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - return basicBot.roomUtilities.smartSkip(); + basicBot.roomUtilities.smartSkip(); } else { - return API.moderateForceSkip(); + API.moderateForceSkip(); } } } @@ -1750,10 +1755,10 @@ basicBot.room.blacklists[list].push(media.format + ':' + media.cid); API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - return basicBot.roomUtilities.smartSkip(); + basicBot.roomUtilities.smartSkip(); } else { - return API.moderateForceSkip(); + API.moderateForceSkip(); } if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { basicBot.room.newBlacklistedSongFunction(track); @@ -2150,6 +2155,25 @@ } }, + forceskipCommand: { + command: ['forceskip', 'fs'], + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.forceskip, {name: chat.un})); + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + + } + } + }, + ghostbusterCommand: { command: 'ghostbuster', rank: 'user', @@ -2572,25 +2596,6 @@ } }, - lockskipposCommand: { - command: 'lockskippos', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var pos = msg.substring(cmd.length + 1); - if (!isNaN(pos)) { - basicBot.settings.lockskipPosition = pos; - return API.sendChat(subChat(basicBot.chat.lockskippos, {name: chat.un, position: basicBot.settings.lockskipPosition})); - } - else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); - } - } - }, - locktimerCommand: { command: 'locktimer', rank: 'manager', @@ -2956,20 +2961,69 @@ }, skipCommand: { - command: 'skip', + command: ['skip', 'smartskip'], rank: 'bouncer', - type: 'exact', + type: 'startsWith', functionality: function (chat, cmd) { if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - API.sendChat(subChat(basicBot.chat.skip, {name: chat.un})); - API.moderateForceSkip(); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); + if (basicBot.room.skippable) { + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + var name = dj.username; + var msgSend = '@' + name + ' : '; + + if (chat.message.length === cmd.length) { + API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + } + var validReason = false; + var msg = chat.message; + var reason = msg.substring(cmd.length + 1); + for (var i = 0; i < basicBot.settings.skipReasons.length; i++) { + var r = basicBot.settings.skipReasons[i][0]; + if (reason.indexOf(r) !== -1) { + validReason = true; + msgSend += basicBot.settings.skipReasons[i][1]; + } + } + if (validReason) { + API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(msgSend); + } + else { + API.moderateForceSkip(); + API.sendChat(msgSend); + } + } + } + } + } + }, + + skipposCommand: { + command: 'skippos', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var pos = msg.substring(cmd.length + 1); + if (!isNaN(pos)) { + basicBot.settings.skipPosition = pos; + return API.sendChat(subChat(basicBot.chat.skippos, {name: chat.un, position: basicBot.settings.skipPosition})); + } + else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); } } }, diff --git a/commands.md b/commands.md index 89464c45..c7aa0a51 100644 --- a/commands.md +++ b/commands.md @@ -60,18 +60,19 @@ Bouncer |!english | @user | ask user to speak english (asked in the language they set plug to) | |!eta | (@user) | shows when user will reach the booth | |!filter | | toggles the chat filter | +|!forceskip | | forceskips the current song | |!jointime | @user | shows how long the user has been in the room | |!kick | (X) | kicks user for X minutes, default is 0.25 minutes (15 seconds) | |!kill | | shut down the bot | |!lockguard | | toggle the lockguard | -|!lockskip | (reason) | skip the song and move the dj back up (the position can be set with !lockskippos) | -|!lockskippos | X | set the position to which lockskip moves the dj | +|!lockskip | (reason) | skips, locks and moves the dj back up (the position can be set with !skippos) | |!motd | (X)/(message) | when no argument is specified, returns the Message of the Day, when X is specified, the MotD is given every X songs, when "message" is given, it sets the MotD to message | |!mute | @user (X) | mute user, for X minutes if X is specified, otherwise for an undefined period | |!reload | | reload the bot | |!restricteta | | toggles the restriction on eta: grey users can use it once an hour | |!sessionstats | | display stats for the current session | -|!skip | | skip the current song | +|!skip | (reason) | skips the dj using smartskip. actions such as locking and moving user depends on various factors (the position the dj is moved to can be set with !skippos) | +|!skippos | X | set the position to which skip and lockskip moves the dj | |!status | | display the bot's status and some settings | |!timeguard | | toggle the timeguard | |!togglebl | | toggle the blacklist | diff --git a/lang/en.json b/lang/en.json index 563c35af..eb44cfcd 100644 --- a/lang/en.json +++ b/lang/en.json @@ -165,8 +165,9 @@ "logout": "\/me [@%%NAME%%] Logging out %%BOTNAME%%", "rouletteleave": "\/me @%%NAME%% left the roulette!", "songlink": "\/me [@%%NAME%%] Link to current song: %%LINK%%", - "usedlockskip": "\/me [%%NAME%% used lockskip.]", - "lockskippos": "\/me [@%%NAME%%] Lockskip will now move the dj to position %%POSITION%%.", + "usedlockskip": "\/me [%%NAME%% used lockskip]", + "usedskip": "\/me [%%NAME%% used skip]", + "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", "lockguardtime": "\/me [@%%NAME%%] The lockguard is set to %%TIME%% minute(s).", "maxlengthtime": "\/me [@%%NAME%%] The maximum song duration is set to %%TIME%% minutes.", "motdset": "\/me MotD set to: %%MSG%%", @@ -174,7 +175,7 @@ "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", "botnameset": "\/me Bot name now set to: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, don't try to add me to the waitlist, please.", - "move": "\/me [%%NAME%% used move.]", + "move": "\/me [%%NAME%% used move]", "mutednotime": "\/me [@%%NAME%%] Muted @%%USERNAME%%.", "mutedmaxtime": "\/me [@%%NAME%%] You can only mute for maximum %%TIME%% minutes.", "mutedtime": "\/me [@%%NAME%%] Muted @%%USERNAME%% for %%TIME%% minutes.", @@ -186,7 +187,7 @@ "removenotinwl": "\/me [@%%NAME%%] Specified user @%%USERNAME%% is not in the waitlist.", "roomrules": "\/me Please find the room rules here: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", - "skip": "\/me [%%NAME%% used skip.]", + "forceskip": "\/me [%%NAME%% used forceskip]", "madeby": "\/me This bot was made by %%NAME%%.", "activefor": "I have been active for %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] Invalid user specified. (No names with spaces!)", diff --git a/lang/fr.json b/lang/fr.json index 7d8e1b64..a39aae61 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -166,7 +166,8 @@ "rouletteleave": "\/me @%%NAME%% a quitt\u00e9 la roulette !", "songlink": "\/me [@%%NAME%%] Lien vers la musique actuelle : %%LINK%%", "usedlockskip": "\/me [%%NAME%% a utilis\u00e9 lockskip.]", - "lockskippos": "\/me [@%%NAME%%] Lockskip va bouger l'utilisateur \u00e0 la position %%POSITION%%.", + "usedskip": "\/me [%%NAME%% used skip]", + "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", "lockguardtime": "\/me [@%%NAME%%] Le lockguard est maintenant param\u00e9tr\u00e9 pour %%TIME%% minute(s).", "maxlengthtime": "\/me [@%%NAME%%] La dur\u00e9e maximum d'une musique est maintenant de %%TIME%% minutes.", "motdset": "\/me Le MotD est maintenant : %%MSG%%", @@ -186,7 +187,7 @@ "removenotinwl": "\/me [@%%NAME%%] L'utilisateur @%%USERNAME%% n'est pas dans la file d'attente.", "roomrules": "\/me Merci de lire les r\u00e8gles de la salle ici : %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Woots total : %%WOOTS%%, Mehs total : %%MEHS%%, Ajouts total : %%GRABS%%.", - "skip": "\/me [%%NAME%% a utilis\u00e9 skip.]", + "forceskip": "\/me [%%NAME%% used forceskip]", "madeby": "\/me Ce bot a \u00e9t\u00e9 fait par %%NAME%%.", "activefor": "Cela fait %%TIME%% que je suis actif.", "swapinvalid": "\/me [@%%NAME%%] Utilisateur invalide. (Pas de nom avec des espaces !)", diff --git a/lang/lv.json b/lang/lv.json index 27a228e7..9f5d7469 100644 --- a/lang/lv.json +++ b/lang/lv.json @@ -166,7 +166,8 @@ "rouletteleave": "\/me @%%NAME%% pameta ruleti!", "songlink": "\/me [@%%NAME%%] Saite uz pa\u0161reiz\u0113jo dziesmu: %%LINK%%", "usedlockskip": "\/me [%%NAME%% izmanto liegumu skipot.]", - "lockskippos": "\/me [@%%NAME%%] Lockskip tagad p\u0101rvietot DJ uz poziciju %%POSITION%%.", + "usedskip": "\/me [%%NAME%% used skip]", + "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", "lockguardtime": "\/me [@%%NAME%%] Lockguard ir iestat\u012bts uz %%TIME%% min\u016bte (s).", "maxlengthtime": "\/me [@%%NAME%%] TMaksim\u0101lais dziesma ilgums ir iestat\u012bts uz %%TIME%% min\u016btes.", "motdset": "\/me MotD iestat\u012bts uz: %%MSG%%", @@ -186,7 +187,7 @@ "removenotinwl": "\/me [@%%NAME%%] Noteiktais lietot\u0101js @%%USERNAME%% neatrodas waitlista.", "roomrules": "\/me L\u016bdzu meklejat iztabas noteikumus \u0161eit: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Kop\u0101 woots: %%WOOTS%%, Kop\u0101 mehs: %%MEHS%%,Kop\u0101 grabs: %%GRABS%%.", - "skip": "\/me [%%NAME%% izmanto izlaist.]", + "forceskip": "\/me [%%NAME%% used forceskip]", "madeby": "\/me \u0161is bots ir izgatavots %%NAME%%.", "activefor": "Es esmu bijis akt\u012bvs %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] Neder\u012bgs lietot\u0101js. (Nav v\u0101rdu ar atstarp\u0113m!)", diff --git a/lang/nl.json b/lang/nl.json index e6c7ba1a..4e6496ac 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -4,15 +4,15 @@ "heeft jou een zacht huisgemaakt havermeelkoekje gegeven!", "heeft jou een kaal, droog, oud koekje gegeven. Het was de laatste in de zak. Smerig.", "geeft jou een suikerkoekje. Wat, geen glazuur en versiering? Die wil niemand.", - "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", - "gives you an enormous cookie. Poking it gives you more cookies. Weird.", - "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", - "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", - "gives you a fortune cookie. It reads \"Take a risk!\"", - "gives you a fortune cookie. It reads \"Go outside.\"", - "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", + "heeft jou een chocoladekoekje gegeven. Oh wacht, dat zijn rozijnen. Bah!", + "geeft jou een gigantisch koekje. Als je het port geeft het je meer koekjes. Raar.", + "geeft je een gelukskoekje. Het luidt \"Waarom werk je niet aan een project?\"", + "geeft je een gelukskoekje. Het luidt \"Geef dat speciaal iemand een compliment\"", + "geeft je een gelukskoekje. Het luidt \"Neem een risico!\"", + "geeft je een gelukskoekje. Het luidt \"Ga naar buiten.\"", + "geeft je een gelukskoekje. Het luidt \"Vergeet je groentjes niet op te eten!\"", "gives you a fortune cookie. It reads \"Do you even lift?\"", - "gives you a fortune cookie. It reads \"m808 pls\"", + "geeft je een gelukskoekje. Het luidt \"m808 pls\"", "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", "gives you a fortune cookie. It reads \"I love you.\"", "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", @@ -29,16 +29,16 @@ "Mijn bronnen zeggen van niet.", "As I see it, yes.", "Daar kan je op rekenen.", - "Concentreer je en vraag opnieuw.", + "Concentreer je en vraag het opnieuw.", "Outlook not so good.", "It is decidedly so.", "Better not tell you now.", "Heel twijfelachtig.", "Ja, zeker.", - "It is certain.", + "Het is zeker.", "Kan nu niet voorspellen.", "Waarschijnlijk.", - "Vraag later opnieuw.", + "Vraag het later opnieuw.", "Mijn antwoord is nee.", "Outlook good.", "Reken er niet op.", @@ -166,7 +166,8 @@ "rouletteleave": "\/me @%%NAME%% heeft de roulette verlaten!", "songlink": "\/me [@%%NAME%%] Link naar het huidige nummer: %%LINK%%", "usedlockskip": "\/me [%%NAME%% gebruikte lockskip.]", - "lockskippos": "\/me [@%%NAME%%] Lockskip zal de dj nu naar positie %%POSITION%% verplaatsen.", + "usedskip": "\/me [%%NAME%% used skip]", + "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", "lockguardtime": "\/me [@%%NAME%%] De lockguard is ingesteld op %%TIME%% minuten.", "maxlengthtime": "\/me [@%%NAME%%] De maximum lengte van een nummer is ingesteld op %%TIME%% minuten.", "motdset": "\/me MotD ingesteld op: %%MSG%%", @@ -186,7 +187,7 @@ "removenotinwl": "\/me [@%%NAME%%] Opgegeven gebruiker @%%USERNAME%% is niet in de wachtlijst.", "roomrules": "\/me Je kan onze regels hier vinden: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Totaal aantal woots: %%WOOTS%%, totaal aantal mehs: %%MEHS%%, totaal aantal grabs: %%GRABS%%.", - "skip": "\/me [@%%NAME%% gebruikte skip.]", + "forceskip": "\/me [%%NAME%% used forceskip]", "madeby": "\/me Deze bot is gemaakt door %%NAME%%.", "activefor": "Ik ben al %%TIME%% actief.", "swapinvalid": "\/me [@%%NAME%%] Ongeldige gebruiker gespecificeerd. (Geen namen met spaties!)", diff --git a/lang/pt.json b/lang/pt.json index ea7bace0..a3aec5e6 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -166,7 +166,8 @@ "rouletteleave": "\/me @%%NAME%% deixou a roleta!", "songlink": "\/me [@%%NAME%%] Link para a m\u00fasica atual: %%LINK%%", "usedlockskip": "\/me [%%NAME%% usou 'lockskip'.]", - "lockskippos": "\/me [@%%NAME%%] Lockskip est\u00e1 agora movendo para a posi\u00e7\u00e3o %%POSITION%%.", + "usedskip": "\/me [%%NAME%% used skip]", + "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", "lockguardtime": "\/me [@%%NAME%%] A prote\u00e7\u00e3o de travamento agora \u00e9 %%TIME%% minuto(s).", "maxlengthtime": "\/me [@%%NAME%%] A dura\u00e7\u00e3o m\u00e1xima de tempo agora \u00e9 %%TIME%% minutos.", "motdset": "\/me Mensagem do Dia: %%MSG%%", @@ -186,7 +187,7 @@ "removenotinwl": "\/me [@%%NAME%%] Usu\u00e1rio @%%USERNAME%% n\u00e3o est\u00e1 na fila de espera.", "roomrules": "\/me Encontre as regras da sala aqui: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Quantidade total de woots: %%WOOTS%%, mehs: %%MEHS%%, grabs: %%GRABS%%.", - "skip": "\/me [%%NAME%% usou 'skip'.]", + "forceskip": "\/me [%%NAME%% used forceskip]", "madeby": "\/me Este bot foi feito por %%NAME%%.", "activefor": "Estive online por %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] Usu\u00e1rio inv\u00e1lido.", diff --git a/lang/sr.json b/lang/sr.json index 635b7b3c..e3916676 100644 --- a/lang/sr.json +++ b/lang/sr.json @@ -166,7 +166,8 @@ "rouletteleave": "\/me @%%NAME%% je napustio rulet!", "songlink": "\/me [@%%NAME%%] Link do trenutne pesme: %%LINK%%", "usedlockskip": "\/me [%%NAME%% je koristio LockSkip.]", - "lockskippos": "\/me [@%%NAME%%] Lockskip \u0107e sada premestiti korisnika na poziciju %%POSITION%%.", + "usedskip": "\/me [%%NAME%% used skip]", + "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", "lockguardtime": "\/me [@%%NAME%%] Lockguard pode\u0161en na %%TIME%% minuta.", "maxlengthtime": "\/me [@%%NAME%%] Maksimalno trajanje pesme pode\u0161eno na %%TIME%% minuta.", "motdset": "\/me Poruka Dana pode\u0161ena na: %%MSG%%", @@ -186,7 +187,7 @@ "removenotinwl": "\/me [@%%NAME%%] Navedeni korisnik @%%USERNAME%% nije na listi \u010dekanja.", "roomrules": "\/me Pravila sobe mozes prona\u0107i ovde: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Ukupno woot-ova: %%WOOTS%%, Ukupno meh-ova: %%MEHS%%, Ukupno dohva\u0107eno: %%GRABS%%.", - "skip": "\/me [%%NAME%% je koristio prebacivanje.]", + "forceskip": "\/me [%%NAME%% used forceskip]", "madeby": "\/me Ovog bot-a je napravio %%NAME%%.", "activefor": "Ja sam ve\u0107 aktivan %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] Navedeni korisnik nije prona\u0111en. (Imena sa razmacima!)", diff --git a/lang/tr.json b/lang/tr.json index 36280ad3..cc65f1a1 100644 --- a/lang/tr.json +++ b/lang/tr.json @@ -166,7 +166,8 @@ "rouletteleave": "\/me @%%NAME%% ruletten ayrildi!", "songlink": "\/me [@%%NAME%%] Calan sarki: %%LINK%%", "usedlockskip": "\/me [%%NAME%% otogecme kullanildi.]", - "lockskippos": "\/me [@%%NAME%%] Kilitgecme simdi %%POSITION%% pozisyona gecirecektir.", + "usedskip": "\/me [%%NAME%% used skip]", + "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", "lockguardtime": "\/me [@%%NAME%%] Kilitkoruma %%TIME%% dakika(lar).", "maxlengthtime": "\/me [@%%NAME%%] Maksimum sarki uzunlugu %%TIME%% dakikadir.", "motdset": "\/me Duyuru ayarlandi: %%MSG%%", @@ -186,7 +187,7 @@ "removenotinwl": "\/me [@%%NAME%%] artik @%%USERNAME%% kullaniciyi dj listesinden kaldirdi.", "roomrules": "\/me Lutfen oda kurallarini okuyun: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Toplam WOOT: %%WOOTS%%, Toplam MEH: %%MEHS%%, TOPLAM GRAB: %%GRABS%%.", - "skip": "\/me [%%NAME%% atladi.]", + "forceskip": "\/me [%%NAME%% used forceskip]", "madeby": "\/me Bu bot %%NAME%% tarafindan yapildi.", "activefor": "Ben %%TIME%% arayla afk oldum.", "swapinvalid": "\/me [@%%NAME%%] gecersiz kullanici.", diff --git a/lang/zh.json b/lang/zh.json index 9bcf659b..e5d5e24c 100644 --- a/lang/zh.json +++ b/lang/zh.json @@ -166,7 +166,8 @@ "rouletteleave": "\/me @%%NAME%% \u96e2\u958b\u4e86\u8f2a\u76e4\u904a\u6232!", "songlink": "\/me [@%%NAME%%] \u7576\u524d\u64ad\u653e\u6b4c\u66f2\u7684\u9023\u63a5: %%LINK%%", "usedlockskip": "\/me [%%NAME%% \u525b\u525b\u4f7f\u7528\u4e86\u9396\u5b9a\u8df3\u904e.]", - "lockskippos": "\/me [@%%NAME%%] \u9396\u5b9a\u8df3\u904e\u7136\u5f8c\u5c31\u628adj\u79fb\u52d5\u5230\u4f4d\u7f6e %%POSITION%%.", + "usedskip": "\/me [%%NAME%% used skip]", + "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", "lockguardtime": "\/me [@%%NAME%%] \u9396\u5b9a\u5b88\u885b\u76ee\u524d\u8a2d\u7f6e\u70ba %%TIME%% \u5206\u9418.", "maxlengthtime": "\/me [@%%NAME%%] \u6700\u9ad8\u9650\u5236\u6b4c\u66f2\u9577\u5ea6\u76ee\u524d\u8a2d\u7f6e\u70ba %%TIME%% \u5206\u9418.", "motdset": "\/me \u4eca\u65e5\u91d1\u53e5 \u8a2d\u7f6e\u70ba: %%MSG%%", @@ -186,7 +187,7 @@ "removenotinwl": "\/me [@%%NAME%%] \u6307\u5b9a\u7528\u6236 @%%USERNAME%% \u4e26\u4e0d\u5728\u7b49\u5019\u5217\u8868\u88e1.", "roomrules": "\/me \u8acb\u5728\u9019\u88e1\u67e5\u770b\u623f\u9593\u898f\u5247: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] \u7e3d\u5171\u6b63\u8a55: %%WOOTS%%, \u7e3d\u5171\u8ca0\u8a55: %%MEHS%%, \u7e3d\u5171\u6536\u85cf: %%GRABS%%.", - "skip": "\/me [%%NAME%% \u4f7f\u7528\u4e86\u8df3\u904e.]", + "forceskip": "\/me [%%NAME%% used forceskip]", "madeby": "\/me \u6b64\u6a5f\u5668\u4eba\u5275\u9020\u4eba\u662f %%NAME%%.", "activefor": "\u6211\u5df2\u7d93\u6d3b\u8e8d\u4e86 %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] \u6307\u5b9a\u7528\u6236\u7121\u6548. (\u540d\u5b57\u4e0d\u8981\u6709\u7a7a\u683c!)", From 246d032140c508bf871b087b9385e6def26f86b0 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 09:30:53 +0100 Subject: [PATCH 164/281] Bug fix: Added missing variable --- basicBot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index b3635635..54c6a1f2 100644 --- a/basicBot.js +++ b/basicBot.js @@ -231,7 +231,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.7.8", + version: "2.7.9", status: false, name: "basicBot", loggedInID: null, @@ -2972,6 +2972,7 @@ var timeLeft = API.getTimeRemaining(); var timeElapsed = API.getTimeElapsed(); + var dj = API.getDJ(); var name = dj.username; var msgSend = '@' + name + ' : '; From 990f47af48d4ff2d0cdc07cf4916d6a73256425d Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 09:49:11 +0100 Subject: [PATCH 165/281] Bug fixes --- basicBot.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index 54c6a1f2..68d6af28 100644 --- a/basicBot.js +++ b/basicBot.js @@ -706,10 +706,10 @@ locked = true; } setTimeout(function (id) { + API.moderateForceSkip(); if (typeof reason !== 'undefined') { API.sendChat(reason); } - API.moderateForceSkip(); basicBot.room.skippable = false; setTimeout(function () { basicBot.room.skippable = true @@ -722,9 +722,8 @@ basicBot.roomUtilities.booth.unlockBooth(); }, 500); } - }, 1000, id); + }, 500, id); }, 500, id); - return void (0); }, changeDJCycle: function () { var toggle = $(".cycle-toggle"); @@ -2974,7 +2973,7 @@ var timeElapsed = API.getTimeElapsed(); var dj = API.getDJ(); var name = dj.username; - var msgSend = '@' + name + ' : '; + var msgSend = '@' + name + ', '; if (chat.message.length === cmd.length) { API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); From 094dd081d430dbbf2def742f33f82824c8c65477 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 10:32:22 +0100 Subject: [PATCH 166/281] Increased smartSkip timeouts This may be temporary. --- basicBot.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index 68d6af28..b5c39b0e 100644 --- a/basicBot.js +++ b/basicBot.js @@ -713,17 +713,17 @@ basicBot.room.skippable = false; setTimeout(function () { basicBot.room.skippable = true - }, 2 * 1000); + }, 5 * 1000); setTimeout(function (id) { basicBot.userUtilities.moveUser(id, basicBot.settings.skipPosition, false); basicBot.room.queueable = true; if (locked) { setTimeout(function () { basicBot.roomUtilities.booth.unlockBooth(); - }, 500); + }, 1000); } - }, 500, id); - }, 500, id); + }, 1500, id); + }, 1000, id); }, changeDJCycle: function () { var toggle = $(".cycle-toggle"); From 47f950dc73eaea39be20ffb154b9eaf5b1b66c00 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 10:43:11 +0100 Subject: [PATCH 167/281] Updated active command If no argument, it will state how many users chatted since bot has been online. --- basicBot.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index b5c39b0e..e7499705 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1491,7 +1491,12 @@ var now = Date.now(); var chatters = 0; var time; - if (msg.length === cmd.length) time = 60; + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + var since = durationOnline / 1000; + + if (msg.length === cmd.length) time = since; else { time = msg.substring(cmd.length + 1); if (isNaN(time)) return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); From 70988877394baa5945986457627679c5546f1810 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 11:07:16 +0100 Subject: [PATCH 168/281] Added a timeout to skip command --- basicBot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index e7499705..173dc113 100644 --- a/basicBot.js +++ b/basicBot.js @@ -3006,7 +3006,9 @@ } else { API.moderateForceSkip(); - API.sendChat(msgSend); + setTimeout(function () { + API.sendChat(msgSend); + }, 500); } } } From 79d4c52d40cc0f6007a85a91add162895dd669f4 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 7 Jun 2015 11:15:21 +0100 Subject: [PATCH 169/281] Added timeout for skip reason This is to assure skip reasons are being sent in chat. --- basicBot.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index 173dc113..f651079f 100644 --- a/basicBot.js +++ b/basicBot.js @@ -707,9 +707,11 @@ } setTimeout(function (id) { API.moderateForceSkip(); - if (typeof reason !== 'undefined') { - API.sendChat(reason); - } + setTimeout(function () { + if (typeof reason !== 'undefined') { + API.sendChat(reason); + } + }, 500); basicBot.room.skippable = false; setTimeout(function () { basicBot.room.skippable = true From 4c263b69ab4623aaf583392cad9b8535d015473e Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 8 Jun 2015 13:38:51 +0100 Subject: [PATCH 170/281] Updated language files --- basicBot.js | 2 +- lang/pt.json | 12 ++++++------ lang/zh.json | 24 ++++++++++++------------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/basicBot.js b/basicBot.js index f651079f..e31e3e34 100644 --- a/basicBot.js +++ b/basicBot.js @@ -27,7 +27,7 @@ }; // This socket server is used solely for statistical and troubleshooting purposes. - // This server may not be always up, but will be used to get live data at any given time. + // This server may not always be up, but will be used to get live data at any given time. var socket = function () { function loadSocket() { diff --git a/lang/pt.json b/lang/pt.json index a3aec5e6..b996001f 100644 --- a/lang/pt.json +++ b/lang/pt.json @@ -105,7 +105,7 @@ "nolimitspecified": "\/me [@%%NAME%%] Limite n\u00e3o especificado.", "invalidlimitspecified": "\/me [@%%NAME%%] Limite inv\u00e1lido.", "invalidpositionspecified": "\/me [@%%NAME%%] Posi\u00e7\u00e3o inv\u00e1lida.", - "whois": "\/me [%%NAME1%%] Usu\u00e1rio: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Registro: %%JOINED%%, N\u00edvel: %%LEVEL%%, Linguagem: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", + "whois": "\/me [%%NAME1%%] Usu\u00e1rio: %%NAME2%%, ID: %%ID%%, Rank: %%RANK%%, Registro: %%JOINED%%, N\u00edvel: %%LEVEL%%, Linguagem: %%LANGUAGE%%, Avatar: %%AVATAR%%, Perfil: %%PROFILE%%", "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% ativado.", "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% desativado.", "cmddeletion": "remo\u00e7\u00e3o de comandos", @@ -165,9 +165,9 @@ "logout": "\/me [@%%NAME%%] Deslogando %%BOTNAME%%", "rouletteleave": "\/me @%%NAME%% deixou a roleta!", "songlink": "\/me [@%%NAME%%] Link para a m\u00fasica atual: %%LINK%%", - "usedlockskip": "\/me [%%NAME%% usou 'lockskip'.]", - "usedskip": "\/me [%%NAME%% used skip]", - "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", + "usedlockskip": "\/me [%%NAME%% usou 'lockskip']", + "usedskip": "\/me [%%NAME%% usou skip]", + "skippos": "\/me [@%%NAME%%] DJs agora ser\u00e3o movidos para a posi\u00e7\u00e3o %%POSITION%% quando forem pulados.", "lockguardtime": "\/me [@%%NAME%%] A prote\u00e7\u00e3o de travamento agora \u00e9 %%TIME%% minuto(s).", "maxlengthtime": "\/me [@%%NAME%%] A dura\u00e7\u00e3o m\u00e1xima de tempo agora \u00e9 %%TIME%% minutos.", "motdset": "\/me Mensagem do Dia: %%MSG%%", @@ -175,7 +175,7 @@ "currentbotname": "\/me Nome do bot definido como: %%BOTNAME%%", "botnameset": "\/me O nome do bot foi definido agora para: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, n\u00e3o tente me adicionar \u00e0 fila de espera, por favor.", - "move": "\/me [%%NAME%% usou 'move'.]", + "move": "\/me [%%NAME%% usou 'move']", "mutednotime": "\/me [@%%NAME%%] @%%USERNAME%% mutado.", "mutedmaxtime": "\/me [@%%NAME%%] Voc\u00ea s\u00f3 pode mudar at\u00e9 no m\u00e1ximo %%TIME%% minutos.", "mutedtime": "\/me [@%%NAME%%] @%%USERNAME%% mutado por %%TIME%% minuto(s).", @@ -187,7 +187,7 @@ "removenotinwl": "\/me [@%%NAME%%] Usu\u00e1rio @%%USERNAME%% n\u00e3o est\u00e1 na fila de espera.", "roomrules": "\/me Encontre as regras da sala aqui: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Quantidade total de woots: %%WOOTS%%, mehs: %%MEHS%%, grabs: %%GRABS%%.", - "forceskip": "\/me [%%NAME%% used forceskip]", + "forceskip": "\/me [%%NAME%% usou forceskip]", "madeby": "\/me Este bot foi feito por %%NAME%%.", "activefor": "Estive online por %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] Usu\u00e1rio inv\u00e1lido.", diff --git a/lang/zh.json b/lang/zh.json index e5d5e24c..06bb7c2c 100644 --- a/lang/zh.json +++ b/lang/zh.json @@ -68,11 +68,11 @@ "welcome": "\/me \u6b61\u8fce %%NAME%%", "welcomeback": "\/me \u6b61\u8fce\u56de\u4f86, %%NAME%%", "songknown": "\/me @%%NAME%%, \u6b64\u66f2\u5df2\u5728DJ\u6b77\u53f2\u7d00\u9304\u88e1.", - "notavailable": "\/me @%%NAME%%, the song you played was not available.", + "notavailable": "\/me @%%NAME%%, \u4f60\u6240\u64ad\u653e\u7684\u6b4c\u66f2\u4e26\u4e0d\u53ef\u7528.", "timelimit": "\/me @%%NAME%%, \u4f60\u7684\u6b4c\u66f2\u9577\u5ea6\u8d85\u904e %%MAXLENGTH%% \u5206\u9418, \u4f60\u9700\u8981\u6b0a\u9650\u4ee5\u64ad\u653e\u592a\u9577\u7684\u6b4c\u66f2.", "permissionownsong": "\/me :up: @%%NAME%% \u5df2\u6709\u6b0a\u9650\u64ad\u653e\u4ed6\u5011\u81ea\u5df1\u7684\u88fd\u4f5c!", "isblacklisted": "\/me \u6b64\u66f2\u76ee\u5728 %%BLACKLIST%% \u7981\u64ad\u9ed1\u540d\u55ae\u88e1! \u8df3\u904e...", - "isopen": "\/me \u8f2a\u76e4\u904a\u6232\u73fe\u5728\u958b\u59cb! \u9375\u5165 !join \u53c3\u8207!", + "isopen": "\/me \u8f2a\u76e4\u904a\u6232\u73fe\u5728\u958b\u59cb! \u9375\u5165 !join \u53c3\u8207! (\u4e00\u500b\u96a8\u6a5f\u904a\u6232\u80fd\u96a8\u6a5f\u79fb\u52d5\u4e00\u500b\u5e78\u904b\u7684\u53c3\u8207\u904a\u6232\u8005\u5728\u7b49\u5019\u5217\u8868\u88e1\u7684\u4f4d\u7f6e)", "winnerpicked": "\/me \u512a\u52dd\u8005\u5df2\u88ab\u7be9\u9078! @%%NAME%% \u79fb\u5230\u4f4d\u7f6e %%POSITION%%.", "ball": "\/me %%NAME%% \u7684\u554f\u984c\u662f: \"%%QUESTION%%\" \u4ee5\u53ca %%BOTNAME%% \u7684\u56de\u61c9\u662f: \"%%RESPONSE%%\"", "notghosting": "[%%NAME1%%] %%NAME2%% \u4e26\u4e0d\u662f\u61f8\u639b\u8457\u96e2\u7dda\u4e2d\u7684\u9b3c.", @@ -92,9 +92,9 @@ "spam": "\/me @%%NAME%%, \u8acb\u5225\u6d17\u677f\u704c\u6c34.", "roomadvertising": "\/me @%%NAME%%, \u8acb\u4e0d\u8981\u5ba3\u50b3\u5f35\u8cbc\u5176\u4ed6\u623f\u9593\u7684\u9023\u63a5.", "adfly": "\/me @%%NAME%%, \u8acb\u8b8a\u63db\u4f60\u7684\u81ea\u52d5\u6295\u7968\u5916\u639b. \u6211\u5011\u5efa\u8b70\u4f7f\u7528 PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [\u6a19\u7c64: %%TAGS%%]", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [\u6a19\u7c64: %%TAGS%%]", "invalidgiftags": "\/me [@%%NAME%%] \u7121\u6548\u6a19\u7c64, \u8acb\u5617\u8a66\u4e00\u4e9b\u4e0d\u4e00\u6a23\u7684. [\u6a19\u7c64: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [\u96a8\u6a5f GIF]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [\u96a8\u6a5f GIF]", "invalidgifrandom": "\/me [@%%NAME%%] \u7121\u6548\u8acb\u6c42, \u8acb\u518d\u5617\u8a66.", "invalidtime": "\/me [@%%NAME%%] \u7121\u6548\u7684\u6642\u9593\u898f\u5b9a.", "nouserspecified": "\/me [@%%NAME%%] \u6c92\u6709\u6307\u5b9a\u7684\u7528\u6236.", @@ -105,7 +105,7 @@ "nolimitspecified": "\/me [@%%NAME%%] \u6c92\u6709\u6307\u5b9a\u9650\u5236.", "invalidlimitspecified": "\/me [@%%NAME%%] \u7121\u6548\u7684\u9650\u5236.", "invalidpositionspecified": "\/me [@%%NAME%%] \u7121\u6548\u7684\u6307\u5b9a\u4f4d\u7f6e.", - "whois": "\/me [%%NAME1%%] \u7528\u6236\u540d: %%NAME2%%, \u7de8\u865f: %%ID%%, \u968e\u7d1a: %%RANK%%, \u52a0\u5165\u65bc: %%JOINED%%, \u7b49\u7d1a: %%LEVEL%%, \u8a9e\u8a00: %%LANGUAGE%%, \u982d\u50cf: %%AVATAR%%, \u72c0\u614b: %%STATUS%%%%PROFILE%%", + "whois": "\/me [%%NAME1%%] \u7528\u6236\u540d: %%NAME2%%, \u7de8\u865f: %%ID%%, \u968e\u7d1a: %%RANK%%, \u52a0\u5165\u65bc: %%JOINED%%, \u7b49\u7d1a: %%LEVEL%%, \u8a9e\u8a00: %%LANGUAGE%%, \u982d\u50cf: %%AVATAR%%, \u500b\u4eba\u8cc7\u6599: %%PROFILE%%", "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% \u555f\u52d5.", "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% \u505c\u6b62.", "cmddeletion": "\u6307\u4ee4\u522a\u9664", @@ -154,10 +154,10 @@ "notinwaitlist": "\/me @%%NAME%%, \u4f60\u4e26\u4e0d\u5728\u7b49\u5019\u5217\u8868\u88e1.", "youarenext": "\/me @%%NAME%%, \u4f60\u5c07\u5728\u6b64\u6b4c\u66f2\u5f8c\u64ad\u653e\u4e86\u5594.", "youaredj": "\/me @%%NAME%%, \u4f60\u76ee\u524d\u6b63\u5728DJ\u64ad\u653e.", - "eta": "\/me @%%NAME%% \u4f60\u6703\u65bc\u5927\u6982 %%TIME%% \u5f8c\u62b5\u9054\u5c55\u53f0.", + "eta": "\/me @%%NAME%% \u4f60\u6b63\u5728\u7b49\u5019\u5217\u8868\u88e1\u7684 %%POSITION%% \u4f4d\u7f6e \u4f60\u5c07\u6703\u65bc\u5927\u6982 %%TIME%% \u5f8c\u62b5\u9054\u5c55\u53f0.", "facebook": "\/me \u8acb\u8b9a\u6211\u5011\u7684\u9762\u5b50\u66f8: %%LINK%%", "starterhelp": "\/me \u6b64\u5716\u50cf\u53ef\u6307\u5f15\u4f60\u5982\u4f55\u5728plug\u958b\u59cb: %%LINK%%", - "roulettejoin": "\/me @%%NAME%% \u52a0\u5165\u4e86\u8f2a\u76e4\u904a\u6232! (!leave \u5982\u679c\u4f60\u5f8c\u6094\u60f3\u9000\u51fa\u904a\u6232.)", + "roulettejoin": "\/me @%%NAME%% \u52a0\u5165\u4e86\u8f2a\u76e4\u904a\u6232! (!leave \u5982\u679c\u4f60\u5f8c\u6094\u60f3\u9000\u51fa)", "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% \u5df2\u7d93\u5728\u623f\u9593\u88e1\u6709 %%TIME%%.", "kickrank": "\/me [@%%NAME%%] \u4f60\u4e0d\u80fd\u8e22\u8207\u4f60\u540c\u7b49\u7d1a\u6216\u6bd4\u4f60\u66f4\u9ad8\u968e\u7d1a\u7684\u7528\u6236!", "kick": "\/me [@%%NAME%%], @%%USERNAME%% \u4f60\u5df2\u88ab\u6b64\u793e\u5340\u8e22\u51fa %%TIME%% \u5206\u9418.", @@ -165,9 +165,9 @@ "logout": "\/me [@%%NAME%%] \u6b63\u5728\u767b\u51fa %%BOTNAME%%", "rouletteleave": "\/me @%%NAME%% \u96e2\u958b\u4e86\u8f2a\u76e4\u904a\u6232!", "songlink": "\/me [@%%NAME%%] \u7576\u524d\u64ad\u653e\u6b4c\u66f2\u7684\u9023\u63a5: %%LINK%%", - "usedlockskip": "\/me [%%NAME%% \u525b\u525b\u4f7f\u7528\u4e86\u9396\u5b9a\u8df3\u904e.]", - "usedskip": "\/me [%%NAME%% used skip]", - "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", + "usedlockskip": "\/me [%%NAME%% \u525b\u525b\u4f7f\u7528\u4e86\u9396\u5b9a\u8df3\u904e]", + "usedskip": "\/me [%%NAME%% \u4f7f\u7528\u4e86\u8df3\u904e]", + "skippos": "\/me [@%%NAME%%] DJ\u73fe\u5728\u6703\u5728\u88ab\u8df3\u904e\u5f8c\u79fb\u52d5\u5230\u4f4d\u7f6e %%POSITION%%.", "lockguardtime": "\/me [@%%NAME%%] \u9396\u5b9a\u5b88\u885b\u76ee\u524d\u8a2d\u7f6e\u70ba %%TIME%% \u5206\u9418.", "maxlengthtime": "\/me [@%%NAME%%] \u6700\u9ad8\u9650\u5236\u6b4c\u66f2\u9577\u5ea6\u76ee\u524d\u8a2d\u7f6e\u70ba %%TIME%% \u5206\u9418.", "motdset": "\/me \u4eca\u65e5\u91d1\u53e5 \u8a2d\u7f6e\u70ba: %%MSG%%", @@ -175,7 +175,7 @@ "currentbotname": "\/me \u6a5f\u5668\u4eba\u540d\u5b57\u76ee\u524d\u8a2d\u7f6e\u70ba: %%BOTNAME%%", "botnameset": "\/me \u6a5f\u5668\u4eba\u540d\u5b57\u73fe\u5728\u8a2d\u7f6e\u70ba: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, \u8acb\u5225\u628a\u6211\u6dfb\u52a0\u5230\u7b49\u5019\u5217\u8868, \u8b1d\u8b1d.", - "move": "\/me [%%NAME%% \u4f7f\u7528\u4e86\u79fb\u52d5.]", + "move": "\/me [%%NAME%% \u4f7f\u7528\u4e86\u79fb\u52d5]", "mutednotime": "\/me [@%%NAME%%] \u975c\u97f3 @%%USERNAME%%.", "mutedmaxtime": "\/me [@%%NAME%%] \u4f60\u6700\u591a\u53ef\u4ee5\u975c\u97f3 %%TIME%% \u5206\u9418.", "mutedtime": "\/me [@%%NAME%%] \u975c\u97f3 @%%USERNAME%% \u6642\u9593 %%TIME%% \u5206\u9418.", @@ -187,7 +187,7 @@ "removenotinwl": "\/me [@%%NAME%%] \u6307\u5b9a\u7528\u6236 @%%USERNAME%% \u4e26\u4e0d\u5728\u7b49\u5019\u5217\u8868\u88e1.", "roomrules": "\/me \u8acb\u5728\u9019\u88e1\u67e5\u770b\u623f\u9593\u898f\u5247: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] \u7e3d\u5171\u6b63\u8a55: %%WOOTS%%, \u7e3d\u5171\u8ca0\u8a55: %%MEHS%%, \u7e3d\u5171\u6536\u85cf: %%GRABS%%.", - "forceskip": "\/me [%%NAME%% used forceskip]", + "forceskip": "\/\u9ebc[%%NAME%% \u4f7f\u7528\u4e86\u5f37\u5236\u8df3\u904e]", "madeby": "\/me \u6b64\u6a5f\u5668\u4eba\u5275\u9020\u4eba\u662f %%NAME%%.", "activefor": "\u6211\u5df2\u7d93\u6d3b\u8e8d\u4e86 %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] \u6307\u5b9a\u7528\u6236\u7121\u6548. (\u540d\u5b57\u4e0d\u8981\u6709\u7a7a\u683c!)", From 77adaaed4431f774d7044def20d22ff7e471065d Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 8 Jun 2015 20:11:54 +0100 Subject: [PATCH 171/281] Updated Latvian translations --- lang/lv.json | 398 +++++++++++++++++++++++++-------------------------- 1 file changed, 199 insertions(+), 199 deletions(-) diff --git a/lang/lv.json b/lang/lv.json index 9f5d7469..9622f3b4 100644 --- a/lang/lv.json +++ b/lang/lv.json @@ -1,207 +1,207 @@ { "cookies": [ - "iedeva jums \u0161okol\u0101des cepumu!", - "iedeva jums m\u012bkstu m\u0101j\u0101s gatavotu auzu cepumu!", - "Iedeva tuk\u0161u, sausu un vecu cepumu. Vi\u0146\u0161 bija p\u0113d\u0113jais mais\u0101. Fuj.", - "iedeva jums cukura cepumu. Ko, bez glaz\u016bras un neapkais\u012bts?", - "Iedeva Jums cepumu ar \u0161okol\u0101d\u0113s gabali\u0146iem. Ak n\u0113! T\u0101s ir roz\u012bnes. Fuj!", - "iedeva jums milz\u012bgu cepumu.Gr\u016bst\u012b\u0161an\u0101s dod jums vair\u0101k cepumu.D\u012bvaini.", - "iedeva jums laimes cepumu.Tur sac\u012bts ''K\u0101d\u0113\u013c Tu nestr\u0101d\u0101 pie neviena projekta?''", - "iedeva jums laimes cepumu.Tur sac\u012bts ''Izsaki k\u0101dam \u012bpa\u0161am komplimentu''", - "iedeva jums laimes cepumu.Tur sac\u012bts ''Risk\u0113!''", - "iedeva jums laimes cepumu.Tur sac\u012bts ''Ej \u0101r\u0101.''", - "iedeva jums laimes cepumu.Tur sac\u012bts ''Neaizmirsti ap\u0113st savus d\u0101rzen\u012b\u0161us!''", - "iedeva jums laimes cepumu.Tur sac\u012bts ''Vai Tu visp\u0101r vari pacelt?''", - "Iedeva Jums laimes cepumu. Tur teikts: \"m808 pls\"", - "iedeva jums laimes cepumu.Tur sac\u012bts ''Ja kustin\u0101si gurnus, ieg\u016bsi visas d\u0101mas.''", - "iedeva jums laimes cepumu.Tur sac\u012bts ''Es m\u012blu Tevi.''", - "iedeva jums Zelta Cepumu. Tu nevari to \u0113st, jo tas tais\u012bts no zelta.Nol\u0101d\u0113ts.", - "iedeva jums Oreo cepumu ar gl\u0101zi piena.", - "iedeva jums varav\u012bksnes cepumu, gatavotu ar m\u012blest\u012bbu :heart:", - "iedeva jums vecu cepumu, kas bija pamests \u0101r\u0101, liet\u016b, tas ir sapel\u0113jis.", - "gatavo Tev svaigus cepumus, tie smar\u017eo pasakaini." + "iedeva jums \u0161okol\u0101des cepumu! ", + "iedeva jums m\u012bkstu m\u0101j\u0101s gatavotu auzu cepumu! ", + "Iedeva tuk\u0161u, sausu, un vecu cepumu. Vi\u0146\u0161 bija p\u0113d\u0113jais mais\u0101. Fuj.", + "iedeva jums cukura cepumu. Ko, bez glaz\u016bras un neapkais\u012bts? 0\/10 lab\u0101k neaiztiec.", + "Iedeva Jums cepumu ar \u0161okol\u0101d\u0113s gabali\u0146iem. Uzgaidi.. T\u0101s ir roz\u012bnes. Fuj!", + "iedeva jums milz\u012bgu cepumu. Bakstot to, tas tev dod vair\u0101k cepumu. D\u012bvaini.", + "iedeva jums laimes cepumu. Tur sac\u012bts ''K\u0101d\u0113\u013c J\u016bs nestr\u0101d\u0101jat pie neviena projekta?''", + "iedeva jums laimes cepumu. Tur sac\u012bts ''Izsaki k\u0101dam \u012bpa\u0161am komplimentu.''", + "iedeva jums laimes cepumu. Tur sac\u012bts ''Uz\u0146emies risku!''", + "iedeva jums laimes cepumu. Tur sac\u012bts ''Izej \u0101r\u0101.''", + "iedeva jums laimes cepumu. Tur sac\u012bts ''Neaizmirsti ap\u0113st savus d\u0101rzen\u012b\u0161us!''", + "iedeva jums laimes cepumu. Tur sac\u012bts ''Vai Tu visp\u0101r vari pacelt?''", + "iedeva Jums laimes cepumu. Tur teikts: \"m808 pls\"", + "iedeva jums laimes cepumu. Tur sac\u012bts ''Ja kustin\u0101si gurnus, ieg\u016bsi visas d\u0101mas.''", + "iedeva jums laimes cepumu. Tur sac\u012bts ''Es m\u012blu Tevi.''", + "iedeva jums Zelta Cepumu. Tu nevari to \u0113st, jo tas tais\u012bts no zelta. Nol\u0101d\u0113ts.", + "iedeva jums Oreo cepumu ar gl\u0101zi piena. ", + "iedeva jums varav\u012bksnes cepumu, gatavots ar m\u012blest\u012bbu :heart:", + "iedeva jums vecu cepumu, kas bija pamests \u0101r\u0101, liet\u016b. Tas ir sapel\u0113jis.", + "gatavo Tev svaigus cepumus, tie smar\u017eo burv\u012bgi." ], "balls": [ - "Paz\u012bmes liecina, j\u0101.", - "J\u0101.", - "Neskaidra atbilde, m\u0113\u0123ini v\u0113lreiz.", - "Bez \u0161aub\u0101m.", - "Mani avoti saka n\u0113.", - "P\u0113c man\u0101m dom\u0101m, j\u0101.", - "Tu vari uz to pa\u013cauties.", - "Koncentr\u0113jies un pajaut\u0101 v\u0113lreiz.", - "Izredzes nav lielas.", - "Tas noteikti t\u0101 ir.", - "Lab\u0101k tagad Tev neteik\u0161u.", - "\u013boti ap\u0161aub\u0101mi.", - "J\u0101-noteikti.", - "Tas ir dro\u0161i.", - "Pagaid\u0101m nevar prognoz\u0113t.", - "Visticam\u0101k.", - "V\u0113l\u0101k pajaut\u0101 v\u0113lreiz.", - "Mana atbilde ir n\u0113.", - "Izredzes ir labas.", - "Ner\u0113\u0137inies ar to.", - "J\u0101, laikus.", - "Mani avoti saka n\u0113.", - "Noteikti n\u0113.", - "Tev b\u016bs j\u0101uzgaida.", - "Man ir savas \u0161aubas.", - "Izredzes vid\u0113jas.", - "Priek\u0161 manis izskat\u0101s labi.", - "Kas to lai zin?", - "Izskat\u0101s labi!", - "Iesp\u0113jams.", - "Tu joko?", - "Nepa\u013caujies uz to.", - "Aizmirsti par to." + "Paz\u012bmes liecina, ka j\u0101.", + "J\u0101. ", + "Atbilde neskaidra, m\u0113\u0123ini v\u0113lreiz.", + "Bez \u0161aub\u0101m!", + "Mani avoti saka, ka n\u0113.", + "Domaju, ka j\u0101.", + "Tu vari uz to pa\u013cauties. ", + "Koncentr\u0113jies un pajaut\u0101 v\u0113lreiz!", + "Izredzes nav tik lielas.", + "Tas noteikti t\u0101 ir!", + "Lab\u0101k Tev to tagad neteikt.", + "\u013boti ap\u0161aub\u0101mi!", + "J\u0101 - Noteikti.", + "Tas ir dro\u0161i!", + "Pagaid\u0101m nevaru prognoz\u0113t.", + "Visticam\u0101k. ", + "Pajaut\u0101 v\u0113l\u0101k v\u0113lreiz.", + "Mana atbilde ir, n\u0113.", + "Izredzes ir labas!", + "Uz to ner\u0113\u0137inies!", + "Sav\u0101 laik\u0101, J\u0101!", + "Mani avoti saka ka n\u0113.", + "Noteikti n\u0113!", + "Tev b\u016bs j\u0101uzgaida. ", + "Man ir savas \u0161aubas..", + "Vid\u0113jas izredzes.", + "Manupr\u0101t izskat\u0101s labi!", + "Kas to lai zina?", + "Izskat\u0101s labi! ", + "Iesp\u0113jams..", + "Vai Tu joko?", + "Uz to nepa\u013caujies.", + "Aizmirsti par to!" ], - "nodatafound": "Iepriek\u0161\u0113jie dati nav atrasti.", - "currentlang": "\/me Valoda pa\u0161laik iestat\u012bta uz:%%LANGUAGE%%", - "langerror": "\/me Izv\u0113l\u0113t\u0101 valoda nav pieejama. L\u016bdzu, apmekl\u0113jiet %%LINK%% lai atrastu sarakstu ar pieejamaj\u0101m valod\u0101m.", - "langset": "\/me Valoda tagad nomain\u012bta uz: %%LANGUAGE%%", - "retrievingdata": "Atg\u016bstu iepriek\u0161 saglab\u0101tos datus", - "datarestored": "Iepriek\u0161 saglab\u0101tie dati veiksm\u012bgi iel\u0101d\u0113ti.", - "greyuser": "Tikai bouncers un augst\u0101ki var palaist botu.", - "bouncer": "Bots nevar p\u0101rvietot cilv\u0113kus, kad tas darbojas k\u0101 bouncers.", - "online": "\/me %%BOTNAME%% v%%VERSION%% online!", - "welcome": "\/me Laipni aicin\u0101ts\/-a %%NAME%%", - "welcomeback": "\/me Laipni aicin\u0101ts\/-a atpaka\u013c, %%NAME%%", - "songknown": "\/me @%%NAME%%,\u0161\u012b dziesma ir DJ v\u0113stur\u0113.", - "notavailable": "\/me @%%NAME%%, the song you played was not available.", - "timelimit": "\/me @%%NAME%%, j\u016bsu dziesma ir gar\u0101ka nek\u0101%%MAXLENGTH%% min\u016btes, jums ir nepiecie\u0161ama at\u013cauja, lai sp\u0113l\u0113tu gar\u0101kas dziesmas.", - "permissionownsong": "\/me :up: @%%NAME%% ir at\u013cauja, lai sp\u0113l\u0113tu vi\u0146u pa\u0161u produkciju!", - "isblacklisted": "\/me \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101!! Izlai\u017eam ......", - "isopen": "\/me Rulete tagad ir atv\u0113rta! Ierakstiet !join lai piedal\u012btos!", - "winnerpicked": "\/me Uzvar\u0113t\u0101js ir izv\u0113l\u0113ts! @%%NAME%% uz poz\u012bciju %%POSITION%%.", - "ball": "\/me %%NAME%%'s jaut\u0101jums bija: \"%%QUESTION%%\" un %%BOTNAME%%'s atbilde ir: \"%%RESPONSE%%\"", - "notghosting": "[%%NAME1%%] %%NAME2%% nav dubulto\u0161an\u0101s.", - "ghosting": "[%%NAME1%%] %%NAME2%% ir vai nu dubulto\u0161an\u0101s vai ne \u0161eit.", - "alreadyadding": "\/me Lietot\u0101js tiek pievienots! Main\u012bt v\u0113lamo poz\u012bciju, uz %%POSITION%%.", - "adding": "\/me Pievieno @%%NAME%% rind\u0101. Pa\u0161reiz\u0113j\u0101 rinda: %%POSITION%%.", + "nodatafound": "Iepriek\u0161\u0113jie dati nav atrasti. ", + "currentlang": "\/me Valoda pa\u0161laik iestat\u012bta uz: %%LANGUAGE%%", + "langerror": "\/me Tava izv\u0113l\u0113t\u0101 valoda nav pieejama! Lai atrastu pieejam\u0101s valodas: %%LINK%%", + "langset": "\/me Valoda nomain\u012bta uz: %%LANGUAGE%%", + "retrievingdata": "Atg\u016bstu iepriek\u0161 saglab\u0101tos datus.", + "datarestored": "Iepriek\u0161\u0113jie saglab\u0101tie dati veiksm\u012bgi iel\u0101d\u0113ti.", + "greyuser": "Tikai uzraugi un augst\u0101ki var palaist botu.", + "bouncer": "Bots nevar p\u0101rvietot cilv\u0113kus, kad tas darbojas k\u0101 uzraugs.", + "online": "\/me %%BOTNAME%% v%%VERSION%% tie\u0161saist\u0113!", + "welcome": "\/me \u010cau %%NAME%%", + "welcomeback": "\/me Sveiciens ar atgriez\u0161anos %%NAME%%", + "songknown": "\/me @%%NAME%%, \u0161\u012b dziesma ir DJ v\u0113stur\u0113.", + "notavailable": "\/me @%%NAME%%, dziesma ko j\u016bs sp\u0113l\u0113j\u0101t nebija pieejama.", + "timelimit": "\/me @%%NAME%%, j\u016bsu dziesma ir gar\u0101ka nek\u0101 %%MAXLENGTH%% min\u016btes, jums ir nepiecie\u0161ama at\u013cauja, lai sp\u0113l\u0113tu gar\u0101kas dziesmas.", + "permissionownsong": "\/me :up: @%%NAME%% ir at\u013cauja, lai sp\u0113l\u0113tu vi\u0146\u0101 pa\u0161u produkciju!", + "isblacklisted": "\/me \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101! Izlai\u017eam...", + "isopen": "\/me Rulete tagad ir atv\u0113rta! Rakstiet !join lai piedal\u012btos!", + "winnerpicked": "\/me Uzvar\u0113t\u0101js ir izv\u0113l\u0113ts! @%%NAME%% p\u0101rmetam uz %%POSITION%%.", + "ball": "\/me %%NAME%%'s jaut\u0101jums bija: \"%%QUESTION%%\" un %%BOTNAME%%'a atbilde ir: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% nespokoj\u0101s.", + "ghosting": "[%%NAME1%%] %%NAME2%% spokoj\u0101s, vai ar\u012b neatrodas \u0161eit.", + "alreadyadding": "\/me Lietot\u0101js tiek pievienots! Main\u012bt v\u0113lamo poz\u012bciju, uz %%POSITION%%.", + "adding": "\/me Pievieno @%%NAME%% iek\u0161 rindas. J\u016bsu vieta rind\u0101: %%POSITION%%.", "usernotfound": "\/me Lietot\u0101js nav atrasts.", - "notdisconnected": "\/me @%%NAME%% nebija atvienots laik\u0101 ko esmu \u0161eit.", - "noposition": "\/me Nav p\u0113d\u0113ja vieta zin\u0101ma.Waitlist j\u0101atjaunina vismaz reizi lai re\u0123istr\u0113t lietot\u0101ja p\u0113d\u0113jo poz\u012bciju.", - "toolongago": "\/me @%%NAME%%'s p\u0113d\u0113jais atvienojums (DC vai pamest) bija p\u0101r\u0101k sen: %%TIME%%.", - "valid": "\/me @%%NAME%% atvienots %%TIME%% pirms un j\u0101b\u016bt poz\u012bcij\u0101 %%POSITION%%.", - "warning1": "\/me @%%NAME%%, J\u016bs esat prom %%TIME%%, l\u016bdzu atbild\u0113t 2 min\u016b\u0161u laik\u0101 vai ar\u012b tiksiet no\u0146emts no saraksta.", - "warning2": "\/me @%%NAME%%, J\u016bs tiksiet no\u0146emts d\u0113\u013c AFK dr\u012bz, ja j\u016bs neatbild\u0113siet.", - "afkremove": "\/me @%%NAME%%, J\u016bs tik\u0101t no\u0146emts, jo bij\u0101t AFK %%TIME%%. Jums bija poz\u012bcij\u0101%%POSITION%%. \u010catojat vismaz reizi %%MAXIMUMAFK%% min\u016btes, ja j\u016bs v\u0113laties, atska\u0146ot dziesmas.", - "caps": "\/me @%%NAME%%, Nelietojiet j\u016bsu caps lock pogu l\u016bdzu.", - "askskip": "\/me @%%NAME%%, nel\u016bgt izlaist.", - "spam": "\/me @%%NAME%%, l\u016bdzu, nespamot.", - "roomadvertising": "\/me @%%NAME%%, nelikt saites uz cit\u0101m telp\u0101m l\u016bdzu.", - "adfly": "\/me @%%NAME%%,L\u016bdzu main\u012bt savu autowoot programmu. M\u0113s iesak\u0101m PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Eti\u0137ete: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Neder\u012bga eti\u0137ete, m\u0113\u0123in\u0101t kaut ko citu. [Eti\u0137ete: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Nejau\u0161s GIF]", - "invalidgifrandom": "\/me [@%%NAME%%] Neder\u012bgs piepras\u012bjums, m\u0113\u0123iniet v\u0113lreiz.", - "invalidtime": "\/me [@%%NAME%%] Neder\u012bgs laiks noteikts.", - "nouserspecified": "\/me [@%%NAME%%] Neviens lietot\u0101js nav preciz\u0113ts.", - "invaliduserspecified": "\/me [@%%NAME%%]Neder\u012bgs lietot\u0101js.", - "nolistspecified": "\/me [@%%NAME%%] Saraksts noteikts.", - "invalidlistspecified": "\/me [@%%NAME%%] Neder\u012bgs saraksts preciz\u0113ts.", - "novaliduserspecified": "\/me [@%%NAME%%] Nav der\u012bgs lietot\u0101js.", - "nolimitspecified": "\/me [@%%NAME%%] Nek\u0101du ierobe\u017eojumu preciz\u0113tu.", - "invalidlimitspecified": "\/me [@%%NAME%%] Neder\u012bga limits.", - "invalidpositionspecified": "\/me [@%%NAME%%] Neder\u012bga pozicija preciz\u0113ta.", - "whois": "\/me [%%NAME1%%] Lietot\u0101js: %%NAME2%%, ID: %%ID%%, Rangs: %%RANK%%, Pievienojies: %%JOINED%%, L\u012bmenis: %%LEVEL%%, Valoda: %%LANGUAGE%%, Avatars: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", - "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% iesl\u0113gts.", - "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% izslegt\u0113ts.", - "cmddeletion": "komandu dz\u0113\u0161ana", - "afkremoval": "AFK no\u0146em\u0161ana", - "afksremoved": "AFK ir no\u0146emts", - "afklimit": "AFK limits", - "autodisable": "autom\u0101tiski atsl\u0113gts", - "autoskip": "autom\u0101tiski p\u0101rsl\u0113gts", - "newblacklisted": "\/me [@%%NAME%%] \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", - "blinfo": "[@%%NAME%%]Melnais saraksts Info - autors: %%AUTHOR%%, virsraksts: %%TITLE%%, mid: %%SONGID%%", - "blacklist": "melnajs saraksts", - "cycleguard": "ri\u0146\u0137a sargs", - "timeguard": "laika sargs", - "chatfilter": "chatafiltrs", - "historyskip": "v\u0113stures izlai\u0161ana", - "lockdown": "Sl\u0113gts", - "lockguard": "sl\u0113gtssargs", - "usercommands": "lietot\u0101ja komandas", - "motd": "MotD", - "welcomemsg": "Sveiciena teksts", - "songstats": "dziesmu statistika", - "etarestriction": "eta ierobe\u017eojums", - "voteskip": "balso\u0161anas izlai\u0161ana", - "voteskiplimit": "\/me [@%%NAME%%] Balso\u0161anas izlai\u0161anas limits pa\u0161laik iestat\u012bts %%LIMIT%% mehiem.", - "voteskipexceededlimit": "\/me @%%NAME%%, J\u016bsu dziesma ir p\u0101rsniegusi balso\u0161anas izlai\u0161anas limitu (%%LIMIT%% mehi).", - "voteskipinvalidlimit": "\/me [@%%NAME%%] Neder\u012bga balso\u0161anas izlai\u0161ana , l\u016bdzu, m\u0113\u0123iniet v\u0113lreiz, izmantojot numuru, kas neizsaka mehu skaitu . ", - "voteskipsetlimit": "\/me [@%%NAME%%] Balso\u0161anas izlai\u0161anas limits iestat\u012bts %%LIMIT%%.", - "activeusersintime": "\/me [@%%NAME%% Ir biju\u0161i %%AMOUNT%% Lietot\u0101ji \u010dat\u0101 %%TIME%% min\u016btes.", - "maximumafktimeset": "\/me [@%%NAME%%] Maksim\u0101lais AFK ilgums iestat\u012bts %%TIME%% min\u016btes.", - "afkstatusreset": "\/me [@%%NAME%%]No\u0146\u0113ma afk statusu no @%%USERNAME%%.", - "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs %%TIME%%.", - "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%%ir neakt\u012bvs ilg\u0101k nek\u0101 %%BOTNAME%%'s ir online.", - "autowoot": "\/me M\u0113s iesak\u0101m PlugCubed par autowooting: http:\/\/plugcubed.net\/", - "brandambassador": "\/me Brand Ambassador ir balss no plug.dj lietot\u0101jiem. Tie veicina pas\u0101kumus, iesaist\u012ba sabiedr\u012bbu un dal\u012btas plug.dj zi\u0146ojumiem vis\u0101 pasaul\u0113. Lai ieg\u016btu vair\u0101k inform\u0101cijas:https:\/\/plug.dj\/ba", - "bouncerplusrank": "\/me [@%%NAME%%] Jums ir j\u0101b\u016bt Manager vai pat Bouncer +.", - "chatcleared": "\/me [@%%NAME%%] Izdzest chatu.", - "deletechat": "\/me [@%%NAME%%] izdzest t\u0113rz\u0113\u0161anu no %%USERNAME%%.", - "commandslink": "\/me %%BOTNAME%% komandas: %%LINK%%", - "eatcookie": "\/me \u0113d cepumu.", - "nousercookie": "\/em nesaskata %%NAME%% iztab\u0101 un \u0113d cepumus pats.", - "selfcookie": "\/me @%%NAME%%, j\u016bs esat mazliet mantk\u0101r\u012bgs, vai ne? Pie\u0161\u0137ir cepumus sev, Doh. Dal\u0101s ar citiem cilv\u0113kiem!", - "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", - "cycleguardtime": "\/me [@%%NAME%%] Ri\u0146\u0137a sargs ir iestat\u012bts uz %%TIME%% min\u016bte (s).", - "dclookuprank": "\/me [@%%NAME%%] Tikai bouncers un vair\u0101k var dar\u012bt lookup citiem.", - "emojilist": "\/me Emociju sarakts: %%LINK%%", - "notinwaitlist": "\/me @%%NAME%%, J\u016bs neesat waitlista.", - "youarenext": "\/me @%%NAME%%, you are DJing after this song.", - "youaredj": "\/me @%%NAME%%, you are currently DJing.", - "eta": "\/me @%%NAME%% J\u016bs sasniegsiet kab\u012bni aptuveni%%TIME%%.", - "facebook": "\/me Like m\u016bs facebooka: %%LINK%%", - "starterhelp": "\/me \u0160is att\u0113ls k\u013c\u016bs jums s\u0101kum\u0101 plug:%%LINK%%", - "roulettejoin": "\/me @%%NAME%% pievienoj\u0101s ruletei! (!leave ja j\u016bs neno\u017e\u0113losiet.)", - "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ir bijis telp\u0101 %%TIME%%.", - "kickrank": "\/me [@%%NAME%%] J\u016bs nevarat kick lietot\u0101jus ar vien\u0101du vai augst\u0101ku rangu nek\u0101 jums!", - "kick": "\/me [@%%NAME%%], @%%USERNAME%% Jus tiekat izmests no iztabas %%TIME%% min\u016btes.", - "kill": "\/me IzSl\u0113dzas.", - "logout": "\/me [@%%NAME%%] Izlogojas %%BOTNAME%%", - "rouletteleave": "\/me @%%NAME%% pameta ruleti!", - "songlink": "\/me [@%%NAME%%] Saite uz pa\u0161reiz\u0113jo dziesmu: %%LINK%%", - "usedlockskip": "\/me [%%NAME%% izmanto liegumu skipot.]", - "usedskip": "\/me [%%NAME%% used skip]", - "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", - "lockguardtime": "\/me [@%%NAME%%] Lockguard ir iestat\u012bts uz %%TIME%% min\u016bte (s).", - "maxlengthtime": "\/me [@%%NAME%%] TMaksim\u0101lais dziesma ilgums ir iestat\u012bts uz %%TIME%% min\u016btes.", - "motdset": "\/me MotD iestat\u012bts uz: %%MSG%%", - "motdintervalset": "\/me MotD interv\u0101ls iestat\u012bts uz %%INTERVAL%%.", - "currentbotname": "\/me Bota nosaukums pa\u0161laik iestat\u012bts uz: %%BOTNAME%%", - "botnameset": "\/me Bota nosaukums tagad ir:%%BOTNAME%%", - "addbotwaitlist": "\/me @%%NAME%%, nem\u0113\u0123iniet pievienot mani waitlista, l\u016bdzu.", - "move": "\/me [%%NAME%% lieto p\u0101rvietot.]", - "mutednotime": "\/me [@%%NAME%%] Liedz \u010datu @%%USERNAME%%.", - "mutedmaxtime": "\/me [@%%NAME%%] J\u016bs varat liegt \u010datu tikai maksim\u0101li %%TIME%% min\u016btes.", - "mutedtime": "\/me [@%%NAME%%] Liedz \u010datu@%%USERNAME%% uz %%TIME%% min\u016btes.", - "unmuted": "\/me [@%%NAME%%] Apklusin\u0101\u0161anas atcel\u0161ana @%%USERNAME%%.", - "muterank": "\/me [@%%NAME%%] J\u016bs nevarat liegt \u010datu personam ar vien\u0101du vai augst\u0101ku rangu nek\u0101 jums.", - "oplist": "\/me OP saraksts: %%LINK%%", - "pong": "\/me Pong!", - "reload": "\/me B\u016b\u0161u dr\u012bz atpaka\u013c.", - "removenotinwl": "\/me [@%%NAME%%] Noteiktais lietot\u0101js @%%USERNAME%% neatrodas waitlista.", - "roomrules": "\/me L\u016bdzu meklejat iztabas noteikumus \u0161eit: %%LINK%%", - "sessionstats": "\/me [@%%NAME%%] Kop\u0101 woots: %%WOOTS%%, Kop\u0101 mehs: %%MEHS%%,Kop\u0101 grabs: %%GRABS%%.", - "forceskip": "\/me [%%NAME%% used forceskip]", - "madeby": "\/me \u0161is bots ir izgatavots %%NAME%%.", - "activefor": "Es esmu bijis akt\u012bvs %%TIME%%.", - "swapinvalid": "\/me [@%%NAME%%] Neder\u012bgs lietot\u0101js. (Nav v\u0101rdu ar atstarp\u0113m!)", - "swapwlonly": "\/me [@%%NAME%%] L\u016bdzu tikai mijmai\u0146as lietot\u0101jiem, kas atrodas waitlista!", - "swapping": "\/me P\u0101rnes %%NAME1%% ar %%NAME2%%.", - "genres": "\/me L\u016bdzu meklejiet pie\u013caujam\u0101s iztabas \u017eanrus \u0161eit: %%LINK%%", + "notdisconnected": "\/me @%%NAME%% nebija atvienojies, kam\u0113r biju \u0161eit.", + "noposition": "\/me Vieta rind\u0101 nav zin\u0101ma. Rinda j\u0101atjaunina lai atrastu lietot\u0101ja vietu rind\u0101.", + "toolongago": "\/me @%%NAME%%'s atvieno\u0161an\u0101s bija p\u0101rak ilga: %%TIME%%", + "valid": "\/me @%%NAME%%atvienoj\u0101s pirms: %%TIME%% un vieta rind\u0101 j\u0101b\u016bt: %%POSITION%%", + "warning1": "\/me @%%NAME%%, J\u016bs esat AFK jau %%TIME%%, l\u016bdzu atbildiet 2 min\u016b\u0161u laik\u0101, vai tiksiet no\u0146emts.", + "warning2": "\/me @%%NAME%%, J\u016bs tiksiet no\u0146emts d\u0113\u013c AFK, ja neatbild\u0113siet.", + "afkremove": "\/me @%%NAME%%. JTu tiki no\u0146emts no rindas, jo biji afk %%TIME%%. Tu biji kart\u0101 %%POSITION%%. N\u0101kamaj\u0101 reiz\u0113 \u010dato reizi %%MAXIMUMAFK%% min\u016btes, ja gribi palikt rind\u0101.", + "caps": "\/me @%%NAME%%, L\u016bdzu, neturi CAPSLOCK pogu.", + "askskip": "\/me @%%NAME%%, nel\u016bdz lai izlai\u017e.", + "spam": "\/me @%%NAME%%, l\u016bdzu, nespamo.", + "roomadvertising": "\/me @%%NAME%%, l\u016bdzu, neliec saites uz cit\u0101m kopien\u0101m.", + "adfly": "\/me @%%NAME%%,L\u016bdzu mainiet savu \"autowoot\" programmu. M\u0113s iesak\u0101m \u0161o. http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tegi: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Neder\u012bga eti\u0137ete, m\u0113\u0123iniet kaut ko citu. [Tegi: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Nejau\u0161s GIFs]", + "invalidgifrandom": "\/me [@%%NAME%%] Neder\u012bgs piepras\u012bjums, m\u0113\u0123ini v\u0113lreiz.", + "invalidtime": "\/me [@%%NAME%%] Noteikts nedr\u012bgs laiks.", + "nouserspecified": "\/me [@%%NAME%%] Lietot\u0101js nav preciz\u0113ts.", + "invaliduserspecified": "\/me [@%%NAME%%] Neder\u012bgs lietot\u0101js.", + "nolistspecified": "\/me [@%%NAME%%] Nenoteikts saraksts.", + "invalidlistspecified": "\/me [@%%NAME%%] Noteikts neder\u012bgs saraksts.", + "novaliduserspecified": "\/me [@%%NAME%%] Nav noteikts der\u012bgs lietot\u0101js.", + "nolimitspecified": "\/me [@%%NAME%%] Nav noteikts limits.", + "invalidlimitspecified": "\/me [@%%NAME%%] Neder\u012bgs limits.", + "invalidpositionspecified": "\/me [@%%NAME%%] Preciz\u0113ta neder\u012bga poz\u012bcija.", + "whois": "\/me [%%NAME1%%] Lietot\u0101js: %%NAME2%%, ID: %%ID%%, Ranks: %%RANK%%, Pievienojies: %%JOINED%%, L\u012bmenis: %%LEVEL%%, Valoda: %%LANGUAGE%%, Avatars: %%AVATAR%%, Status: %%STATUS%%, Profils: %%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% iesl\u0113gta.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% izslegta", + "cmddeletion": "komandu dz\u0113\u0161ana.", + "afkremoval": "AFK izdz\u0113\u0161ana", + "afksremoved": "AFK izdz\u0113sts", + "afklimit": "AFK limits ", + "autodisable": "autoizsleg\u0161ana", + "autoskip": "autoizlaiz\u0161ana", + "newblacklisted": "\/me [@%%NAME%%] \u0160\u012b dziesma pieder %%BLACKLIST%% melnajam sarakstam [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%]Meln\u0101 saraksta info - autors: %%AUTHOR%%, virsraksts: %%TITLE%%, mid: %%SONGID%%", + "blacklist": "melnais saraksts", + "cycleguard": "rin\u0137o\u0161anas sargs", + "timeguard": "Laikraugs", + "chatfilter": "\u010cata Filtrs", + "historyskip": "V\u0113stures izlaiz\u0161ana", + "lockdown": "Sl\u0113gts ", + "lockguard": "Sl\u0113gtraugs", + "usercommands": "lietot\u0101jkomandas", + "motd": "MotD ", + "welcomemsg": "Iel\u016bg\u0161anas v\u0113stule.", + "songstats": "dziesmas statistika", + "etarestriction": "eta robe\u017eas", + "voteskip": "izlaist ar balso\u0161anu", + "voteskiplimit": "\/me [@%%NAME%%] Izlaiz\u0161ana ar balso\u0161anu limits ir uzst\u0101d\u012bts uz %%LIMIT%% meh'iem", + "voteskipexceededlimit": "\/me @%%NAME%%, J\u016bsu dziesma ir p\u0101rsniegusi \"izlaist ar balso\u0161anu\" limitu (%%LIMIT%% meh'i).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Neder\u012bga \"Izlaiz\u0161ana ar balso\u0161anu\" m\u0113\u0123iniet v\u0113lreiz un nor\u0101diet der\u012bgu meh'u skaitu", + "voteskipsetlimit": "\/me [@%%NAME%%] \"Izlaizt ar balso\u0161anu\" limits ir iestat\u012bts uz %%LIMIT%%", + "activeusersintime": "\/me [@%%NAME%%] P\u0113dej\u0101s %%TIME%% min\u016bt\u0113s, \u0161it \u010datoja %%AMOUNT%% lietot\u0101ji.", + "maximumafktimeset": "\/me [@%%NAME%%] Maksim\u0101lais AFK ilgums iestat\u012bts uz %%TIME%% min\u016bt\u0113m.", + "afkstatusreset": "\/me [@%%NAME%%]Resetart\u0113ja afk statusu priek\u0161 @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs jau %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs ilg\u0101k nek\u0101 %%BOTNAME%%'s ir online.", + "autowoot": "\/me M\u0113s iesak\u0101m \u0161o priek\u0161 \"autowoot\" : http:\/\/plugcubed.net\/", + "brandambassador": "\/me Mened\u017eeri ir plug.dj pal\u012bgi, kas pal\u012bdz lietot\u0101jiem atbild\u0113t uz jaut\u0101jumiem. K\u0101 ar\u012b vi\u0146i veido pas\u0101kumus, un pal\u012bdz. :) Vair\u0101k info: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Jums ir j\u0101b\u016bt mened\u017eerim, vai augst\u0101k lai pievienotu Uzraugus.", + "chatcleared": "\/me [@%%NAME%%] \u010cats izt\u012br\u012bts.", + "deletechat": "\/me [@%%NAME%%] Izt\u012brija \u010d\u0101tu no %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% komandas: %%LINK%% ", + "eatcookie": "\/me \u0146amm\u0101 cepumu.", + "nousercookie": "\/em nevar\u0113ju atrast %%NAME%%, tap\u0113c \u0113d\u012b\u0161u cepumus es pats. :P", + "selfcookie": "\/me @%%NAME%%, tu esi cietsird\u012bgs! Dod pats sev cepumus, bah. Padalies ar citiem!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%% ", + "cycleguardtime": "\/me [@%%NAME%%] Ap\u013co\u0161anas sargs ir uzst\u0101d\u012bts uz %%TIME%% Min\u016bti", + "dclookuprank": "\/me [@%%NAME%%] Tikai uzraugi, un augst\u0101ki var uzmekl\u0113t citus.", + "emojilist": "\/me Smaidi\u0146i: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, J\u016bs n\u0113esat rind\u0101.", + "youarenext": "\/me @%%NAME%%, tu b\u016bsi DJ p\u0113c \u0161\u012bs dziesmas!", + "youaredj": "\/me @%%NAME%% J\u016bs esat DJ", + "eta": "\/me @%%NAME%%, j\u016bs esat %%POSITION%%. rind\u0101, un k\u0101psiet uz skatuves apm\u0113ram p\u0113c %%TIME%%.", + "facebook": "\/me Spie\u017eat pat\u012bk musu facebook'\u0101: %%LINK%%", + "starterhelp": "\/me \u0160\u012b bilde jums pal\u012bdz\u0113s start\u0113t iek\u0161 plug: %%LINK%%", + "roulettejoin": "\/me @%%NAME%% pievienoj\u0101s ruletei! (!leave ja tu p\u0101rdom\u0101ji)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ir \u0161aj\u0101 kopien\u0101 jau %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] J\u016bs nevarat izmest lietot\u0101jus kuriem ir vien\u0101ds, vai augst\u0101ks ranks k\u0101 Tev!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% J\u016bs tiekat izmests no kopienas uz %%TIME%% min\u016bt\u0113m.", + "kill": "\/me Izsl\u0113dz\u0101s...", + "logout": "\/me [@%%NAME%%] Atvieno %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% pameta ruleti! ", + "songlink": "\/me [@%%NAME%%] Saite uz pa\u0161reiz\u0113jo dziesmu: %%LINK%% ", + "usedlockskip": "\/me [%%NAME%% aizliedz izlaist dziesmu]", + "usedskip": "\/me [%%NAME%% izlaida dziesmu]", + "skippos": "\/me [@%%NAME%%] DJ tiks p\u0101rmesti uz %%POSITION%% vietu rind\u0101, ja izlaid\u012bs dziesmu.", + "lockguardtime": "\/me [@%%NAME%%] Aizsl\u0113dza rindu uz %%TIME%% min\u016bti.", + "maxlengthtime": "\/me [@%%NAME%%] Maksim\u0101lais dziesmas garums ir iestat\u012bts uz %%TIME%% min\u016bt\u0113m.", + "motdset": "\/me MotD iestat\u012bts: %%MSG%%", + "motdintervalset": "\/me MotD interv\u0101ls iestat\u012bts: %%INTERVAL%%.", + "currentbotname": "\/me Bota v\u0101rds pa\u0161laik iestat\u012bts uz: %%BOTNAME%%", + "botnameset": "\/me Bota v\u0101rds iestat\u012bts uz: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, l\u016bdzu, nem\u0113\u0123ini mani pievienot rindai.", + "move": "\/me [%%NAME%% p\u0101rvietoja.]", + "mutednotime": "\/me [@%%NAME%%] Apklusin\u0101ja @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] J\u016bs varat apklusin\u0101t tikai uz %%TIME%% min\u016bt\u0113m.", + "mutedtime": "\/me [@%%NAME%%] Apklusin\u0101ja @%%USERNAME%% uz %%TIME%% min\u016bt\u0113m.", + "unmuted": "\/me [@%%NAME%%] at\u013c\u0101va run\u0101t @%%USERNAME%%", + "muterank": "\/me [@%%NAME%%] J\u016bs n\u0113varat apklusin\u0101t lietot\u0101jus, kas ir t\u0101d\u0101 pa\u0161\u0101, vai augst\u0101k\u0101 rank\u0101 par tevi.", + "oplist": "\/me OP saraksts: %%LINK%% ", + "pong": "\/me Pong! ", + "reload": "\/me Dr\u012bz b\u016b\u0161u atpaka\u013c.", + "removenotinwl": "\/me [@%%NAME%%] @%%USERNAME%% nav rind\u0101.", + "roomrules": "\/me Kopienas noteikumi izlas\u0101mi \u0161eit: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%]Woot'i:%%WOOTS%%, Meh'i: %%MEHS%%, Pa\u0146emti: %%GRABS%%.", + "forceskip": "\/me [%%NAME%% piespieda izlaist dziesmu]", + "madeby": "\/me \u0160o botu izveidoja %%NAME%%.", + "activefor": "Esmu bijis akt\u012bvs jau %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Nor\u0101d\u012bts neder\u012bgs lietot\u0101js. (V\u0101rdus bez atstarp\u0113m!!)", + "swapwlonly": "\/me [@%%NAME%%] L\u016bdzu, mainies tikai ar lietot\u0101jiem kas atrodas rind\u0101!", + "swapping": "\/me Mainu %%NAME1%% ar %%NAME2%%.", + "genres": "\/me Kopienas \u017eanrus vari atrast \u0161eit: %%LINK%%", "notbanned": "\/me [@%%NAME%%] Lietot\u0101js nav nobanots.", - "unmutedeveryone": "\/me [@%%NAME%%] Apklusin\u0101\u0161anas atcel\u0161ana ikvienam.", - "unmuteeveryonerank": "\/me [@%%NAME%%] Tikai p\u0101rvaldnieki un uz aug\u0161u var izsl\u0113gtu visus uzreiz.", - "notmuted": "\/me [@%%NAME%%] \u0161is lietot\u0101js netika apklusin\u0101ts.", - "unmuterank": "\/me [@%%NAME%%] J\u016bs nevarat apklusin\u0101t personas ar vien\u0101du vai augst\u0101ku rangu nek\u0101 jums.", - "commandscd": "\/me [@%%NAME%%] Komandas cooldown lietot\u0101jiem tagad ir iestat\u012bts uz %%TIME%% sekundes.", - "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehi: %%MEHS%%, ratio (w\/m): %%RATIO%%.", - "website": "\/me L\u016bdzu, apmekl\u0113jiet m\u016bsu t\u012bmek\u013ca vietni:: %%LINK%%", - "youtube": "\/me [%%NAME%%]Abon\u0113t mus youtube: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "unmutedeveryone": "\/me [@%%NAME%%] At\u013c\u0101va visiem run\u0101t,", + "unmuteeveryonerank": "\/me [@%%NAME%%] Tikai mened\u017eeris un augst\u0101k var at\u013caut visiem run\u0101t vienlaikus.", + "notmuted": "\/me [@%%NAME%%] \u0160is lietot\u0101js netika apklusin\u0101ts.", + "unmuterank": "\/me [@%%NAME%%] J\u016bs nevarat at\u013caut run\u0101t lietot\u0101jiem ar t\u0101du pa\u0161u, vai augst\u0101ku ranku k\u0101 tev.", + "commandscd": "\/me [@%%NAME%%] Komandu \"anti-spam\" laiks priek\u0161 lietot\u0101jiem ir iestat\u012bts uz %%TIME%% sekund\u0113m.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Woot'i: %%WOOT%%, Meh'i: %%MEHS%%, Procentu\u0101li: %%RATIO%%.", + "website": "\/me M\u016bsu m\u0101jaslapa: %%LINK%%", + "youtube": "\/me [%%NAME%%] Abon\u0113jiet m\u016bs Youtub\u0113: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%\/M." } \ No newline at end of file From dcf2be3e6adc0f6523d9369af23844759f99103e Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 13 Jun 2015 23:22:21 +0100 Subject: [PATCH 172/281] Added link to a useful command autocomplete plugin --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 37ac9e82..f34eb309 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,13 @@ You can use your own translation or wording by translating the values of in [the __When translating the chat messages, please note that it is a json format, meaning it is structured as ```"key":"value"```, please only translate the "value" parts, and leave anything between %% (eg. %%NAME%%) as is, they are variables that get filled in by the bot.__ +###Command Autocomplete Plugin### + +[![Command Autocomplete](http://i.imgur.com/hBMuB5F.png)](https://github.com/ExtPlug/advanced-autocomplete) + +Check out [this](https://github.com/ExtPlug/advanced-autocomplete) helpful command autocomplete browser plugin by [goto-bus-stop](https://github.com/goto-bus-stop) made to work with basicBot's commands. + + Credits ------- From 35768dd64b22fc5eadbb0f21507a559d37ec52e8 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 15 Jun 2015 14:29:10 +0100 Subject: [PATCH 173/281] Added roomLock This feature detects room changes and will go back to your community when triggered. --- basicBot.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index e31e3e34..79fa4700 100644 --- a/basicBot.js +++ b/basicBot.js @@ -7,6 +7,10 @@ (function () { + window.onerror = function() { + window.location = 'https://plug.dj' + basicBot.room.name; + }; + API.getWaitListPosition = function(id){ if(typeof id === 'undefined' || id === null){ id = API.getUser().id; @@ -246,6 +250,7 @@ botName: "basicBot", language: "english", chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", + roomLock: true, // Requires an extension to re-load the script startupCap: 1, // 1-200 startupVolume: 0, // 0-100 startupEmoji: false, // true or false @@ -305,6 +310,7 @@ } }, room: { + name: null, users: [], afkList: [], mutedUsers: [], @@ -1339,22 +1345,29 @@ }) }; - var roomURL = window.location.pathname; + basicBot.room.name = window.location.pathname; var Check; + console.log(basicBot.room.name); + var detect = function(){ - if(roomURL != window.location.pathname){ - clearInterval(Check) + if(basicBot.room.name != window.location.pathname){ console.log("Killing bot after room change."); storeToStorage(); basicBot.disconnectAPI(); setTimeout(function () { kill(); }, 1000); + if (basicBot.settings.roomLock){ + window.location = 'https://plug.dj' + basicBot.room.name; + } + else { + clearInterval(Check); + } } }; - Check = setInterval(function(){ detect() }, 100); + Check = setInterval(function(){ detect() }, 2000); retrieveSettings(); retrieveFromStorage(); From 965ae75643cab3e2bb9036b35ab041804275f6c1 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 15 Jun 2015 14:42:29 +0100 Subject: [PATCH 174/281] Bot will get community name from local storage --- basicBot.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 79fa4700..9dc8ca03 100644 --- a/basicBot.js +++ b/basicBot.js @@ -8,7 +8,8 @@ (function () { window.onerror = function() { - window.location = 'https://plug.dj' + basicBot.room.name; + var room = JSON.parse(localStorage.getItem("basicBotRoom")); + window.location = 'https://plug.dj' + room.name; }; API.getWaitListPosition = function(id){ @@ -235,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.7.9", + version: "2.8.9", status: false, name: "basicBot", loggedInID: null, From 9f19b0f17a60f87fa8861ae140f376c5f2a44aa0 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 15 Jun 2015 15:34:21 +0100 Subject: [PATCH 175/281] Changed roomLock default to false --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 9dc8ca03..09c08a38 100644 --- a/basicBot.js +++ b/basicBot.js @@ -251,7 +251,7 @@ botName: "basicBot", language: "english", chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", - roomLock: true, // Requires an extension to re-load the script + roomLock: false, // Requires an extension to re-load the script startupCap: 1, // 1-200 startupVolume: 0, // 0-100 startupEmoji: false, // true or false From cd7693ade69731bcdd2f1d5e91dce24f525e669f Mon Sep 17 00:00:00 2001 From: Dazzuh Date: Wed, 17 Jun 2015 19:27:08 +0100 Subject: [PATCH 176/281] !historyskip command missing from commands page. --- commands.md | 1 + 1 file changed, 1 insertion(+) diff --git a/commands.md b/commands.md index c7aa0a51..6a967bc3 100644 --- a/commands.md +++ b/commands.md @@ -61,6 +61,7 @@ Bouncer |!eta | (@user) | shows when user will reach the booth | |!filter | | toggles the chat filter | |!forceskip | | forceskips the current song | +|!historyskip | | toggles the history skip | |!jointime | @user | shows how long the user has been in the room | |!kick | (X) | kicks user for X minutes, default is 0.25 minutes (15 seconds) | |!kill | | shut down the bot | From 4fa1ba879dbee037e26b144d4443f30d92dc7b18 Mon Sep 17 00:00:00 2001 From: Dazzuh Date: Wed, 17 Jun 2015 19:27:08 +0100 Subject: [PATCH 177/281] !historyskip command missing from commands page. --- commands.md | 1 + 1 file changed, 1 insertion(+) diff --git a/commands.md b/commands.md index c7aa0a51..6a967bc3 100644 --- a/commands.md +++ b/commands.md @@ -61,6 +61,7 @@ Bouncer |!eta | (@user) | shows when user will reach the booth | |!filter | | toggles the chat filter | |!forceskip | | forceskips the current song | +|!historyskip | | toggles the history skip | |!jointime | @user | shows how long the user has been in the room | |!kick | (X) | kicks user for X minutes, default is 0.25 minutes (15 seconds) | |!kill | | shut down the bot | From e86bfd3fe7748aab37e7ac690cfa39107c301d33 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 3 Jul 2015 11:47:08 +0100 Subject: [PATCH 178/281] Commented out refresh on error --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 09c08a38..2796ab6f 100644 --- a/basicBot.js +++ b/basicBot.js @@ -7,10 +7,10 @@ (function () { - window.onerror = function() { + /*window.onerror = function() { var room = JSON.parse(localStorage.getItem("basicBotRoom")); window.location = 'https://plug.dj' + room.name; - }; + };*/ API.getWaitListPosition = function(id){ if(typeof id === 'undefined' || id === null){ From c2228bb387e83fdbf88f1c146e97f732537fdd5a Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 3 Jul 2015 11:47:08 +0100 Subject: [PATCH 179/281] Commented out refresh on error --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 1b8921d5..a1ee071d 100644 --- a/basicBot.js +++ b/basicBot.js @@ -7,10 +7,10 @@ (function () { - window.onerror = function() { + /*window.onerror = function() { var room = JSON.parse(localStorage.getItem("basicBotRoom")); window.location = 'https://plug.dj' + room.name; - }; + };*/ API.getWaitListPosition = function(id){ if(typeof id === 'undefined' || id === null){ From 7c3edcef01ed945774393c10ce3e6c0ccbff09b5 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 5 Jul 2015 16:27:17 +0100 Subject: [PATCH 180/281] Updated language files Renamed/added some language files. --- lang/de.json | 206 ++++++++++++++++++++++++++++++++++ lang/es-ES.json | 206 ++++++++++++++++++++++++++++++++++ lang/langIndex.json | 8 +- lang/lv-LV.json | 206 ++++++++++++++++++++++++++++++++++ lang/lv.json | 207 ----------------------------------- lang/{pt.json => pt-BR.json} | 69 ++++++------ lang/{zh.json => zh-TW.json} | 69 ++++++------ 7 files changed, 691 insertions(+), 280 deletions(-) create mode 100644 lang/de.json create mode 100644 lang/es-ES.json create mode 100644 lang/lv-LV.json delete mode 100644 lang/lv.json rename lang/{pt.json => pt-BR.json} (91%) rename lang/{zh.json => zh-TW.json} (91%) diff --git a/lang/de.json b/lang/de.json new file mode 100644 index 00000000..73887998 --- /dev/null +++ b/lang/de.json @@ -0,0 +1,206 @@ +{ + "cookies": [ + "hat dir einen leckeren Schokoladen Keks gegeben!", + "hat dir einen selbstgemachten Haferfloken Keks gegeben!", + "hat dir einen schmucklosen, dreckigen und alten Keks gegeben. Es war der letzte in seinem Rucksack. Toll.", + "hat dir einen Zucker Cookie gegeben. Was, kein Zuckerguss und Streuseln? 0\/10 w\u00fcrden es nicht essen.", + "gibt dir einen Schokoladen Keks. Oh Warte, da sind Rosinen drine. Bleck!", + "gibt dir einen riesigen Keks.", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Warum arbeitest du momentan an keinen Projekten?\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Mach jemanden Besonderes heute ein Kompliment!\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Riskiere etwas!\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Geh nach drau\u00dfen!\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Vergiss nicht, dein Gem\u00fcse zu essen!\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Do you even lift\"?", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"m808 pls!\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Wenn du deine H\u00fcften bewegest, bekommst du alle Frauen.\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Ich liebe dich!\"", + "gibt dir einen goldenen Keks. Du kannst ihn nicht essen, da er aus Gold ist. Verdammt!", + "gibt dir einen Oreo Keks mit einem Glas Milch!", + "gibt dir einen Regenbogen Keks gemacht mit Liebe :heart:", + "gibt dir einen alten Keks, der im Regen gelassen wurde. Er ist schimmlig.", + "backt dir einen frischen Keks, er schmeckt wunderbar." + ], + "balls": { + "0": "Die Zeichen deuten auf Ja.", + "1": "Ja.", + "2": "Versuch es sp\u00e4ter nochmal.", + "3": "Ohne jeden Zweifel.", + "4": "Meine Quellen sagen Nein.", + "5": "So wie ich das sehe, ja.", + "6": "Du kannst dich darauf verlassen.", + "7": "Konzentriere dich und frage erneut.", + "8": "Sieht nicht so gut aus.", + "9": "Es ist umstritten.", + "10": "Ich sage dir lieber nicht die Antwort.", + "11": "Sehr Zweifelhaft.", + "12": "Ja, definitiv.", + "13": "Es ist sicher.", + "14": "Kann ich nicht vorhersagen.", + "15": "sehr wahrscheinlich", + "16": "Frag sp\u00e4ter erneut", + "17": "Meine Antwort ist Nein.", + "18": "Sieht gut aus.", + "19": "Z\u00e4hl nicht darauf.", + "20": "Ja, in geraumer Zeit.", + "22": "Definitiv nicht.", + "23": "Du wirst warten m\u00fcssen.", + "24": "Ich habe meine Zweifel.", + "25": "Sieht so und so aus.", + "26": "Sieht gut aus f\u00fcr mich!", + "27": "Wer wei\u00df?", + "28": "Sieht gut aus!", + "29": "Wahrscheinlich.", + "30": "Willst du mich verarschen?", + "31": "Du kannst nicht darauf z\u00e4hlen", + "32": "Vergiss es." + }, + "nodatafound": "Keine vorhergehenden Daten gefunden.", + "currentlang": "\/me Zurzeit eingestellte Sprache: %%LANGUAGE%%", + "langerror": "\/me Die ausgew\u00e4hlte Sprache ist nicht verf\u00fcgbar. Bitte besuche %%LINK%%, um eine Liste der verf\u00fcgbaren Sprachen zu finden.", + "langset": "\/me Nun eingestellte Sprache: %%LANGUAGE%%", + "retrievingdata": "Ruft zuvor gespeicherte Daten ab.", + "datarestored": "Zuvor gespeicherte Daten erfolgreich abgerufen.", + "greyuser": "Nur Bouncer und aufw\u00e4rts k\u00f6nnen den Bot betreiben.", + "bouncer": "Der Bot kann keine Leute in der Warteliste verschieben, wenn er von einem Bouncer betrieben wird.", + "online": "\/me %%BOTNAME%% v%%VERSION%% online!", + "welcome": "\/me Willkommen %%NAME%%", + "welcomeback": "\/me Willkommen zur\u00fcck, %%NAME%%", + "songknown": "\/me @%%NAME%%, dieser Song ist im Verlauf.", + "notavailable": "\/me @%%NAME%% dieser Song war nicht verf\u00fcgbar.", + "timelimit": "\/me @%%NAME%%, dein Song \u00fcberschreitet die Maximall\u00e4nge von %%MAXLENGTH%% Minuten. Du ben\u00f6tigst eine Erlaubnis, um l\u00e4ngere Songs spielen zu k\u00f6nnen.", + "permissionownsong": "\/me :up: @%%NAME%% hat die Erlaubnis, seine eigene Produktion zu spielen.", + "isblacklisted": "\/me Dieser Song steht auf der %%BLACKLIST%% Blacklist! \u00dcberspringe...", + "isopen": "\/me Das Roulette ist nun ge\u00f6ffnet! Schreibe !join, um teilzunehmen.", + "winnerpicked": "\/me Ein Gewinner wurde gefunden! @%%NAME%% auf die Position %%POSITION%%.", + "ball": "\/me %%NAME%%s Frage war: \u201e%%QUESTION%%\u201c und %%BOTNAME%%s Antwort ist: \u201e%%RESPONSE%%\u201c", + "notghosting": "[%%NAME1%%] %%NAME2%% ghostet nicht.", + "ghosting": "[%%NAME1%%] %%NAME2%% ghostet entweder oder ist nicht hier.", + "alreadyadding": "\/me Benutzer wird bereits hinzugef\u00fcgt! Die gew\u00fcnschte Position wurde zu %%POSITION%% ge\u00e4ndert.", + "adding": "\/me @%%NAME%% wurde der Warteschlange hinzugef\u00fcgt. Derzeitige Warteschlange: %%POSITION%%.", + "usernotfound": "\/me Benutzer nicht gefunden.", + "notdisconnected": "\/me @%%NAME%%s Verbindung wurde in meiner Zeit hier nicht getrennt.", + "noposition": "\/me Letzte Position unbekannt. Die Warteschlange muss sich mindestens einmal aktualisieren, um die letzte Position eines Benutzers zu registrieren.", + "toolongago": "\/me @%%NAME%%s letzter Verbindungsabbruch ist zu lange her: %%TIME%%.", + "valid": "\/me @%%NAME%%s Verbindung brach vor %%TIME%% ab und sollte an der Position %%POSITION%% stehen.", + "warning1": "\/me @%%NAME%%, du warst f\u00fcr %%TIME%% AFK. Bitte antworte in den n\u00e4chsten 2 Minuten oder du wirst entfernt.", + "warning2": "\/me @%%NAME%%, du wirst bald aufgrund von AFK entfernt, falls du nicht antwortest.", + "afkremove": "\/me @%%NAME%%, du wurdest entfernt, da du f\u00fcr %%TIME%% AFK warst. Du warst auf Position %%POSITION%%. Chatte mindestens einmal alle %%MAXIMUMAFK%% Minuten, wenn du einen Song spielen m\u00f6chtest.", + "caps": "\/me @%%NAME%%, l\u00f6se bitte deine Feststelltaste los.", + "askskip": "\/me @%%NAME%%, verlange kein \u00dcberspringen.", + "spam": "\/me @%%NAME%%, spamme bitte nicht.", + "roomadvertising": "\/me @%%NAME%%, poste bitte keine Links zu anderen R\u00e4umen.", + "adfly": "\/me @%%NAME%%, bitte \u00e4ndere dein Autowootprogramm. Wir empfehlen PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Schlagw\u00f6rter: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Ung\u00fcltige Schlagw\u00f6rter. Versuche etwas Anderes. [Schlagw\u00f6rter: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Zuf\u00e4llige GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] Ung\u00fcltige Anfrage. Versuche es erneut.", + "invalidtime": "\/me [@%%NAME%%] Ung\u00fcltig festgelegte Zeit.", + "nouserspecified": "\/me [@%%NAME%%] Kein Benutzer festgelegt.", + "invaliduserspecified": "\/me [@%%NAME%%] Ung\u00fcltiger Benutzer festgelegt.", + "nolistspecified": "\/me [@%%NAME%%] Keine Liste festgelegt.", + "invalidlistspecified": "\/me [@%%NAME%%] Ung\u00fcltige Liste festgelegt.", + "novaliduserspecified": "\/me [@%%NAME%%] Kein g\u00fcltiger Benutzer festgelegt.", + "nolimitspecified": "\/me [@%%NAME%%] Kein Limit festgelegt.", + "invalidlimitspecified": "\/me [@%%NAME%%] Ung\u00fcltiges Limit.", + "invalidpositionspecified": "\/me [@%%NAME%%] Ung\u00fcltige Position festgelegt.", + "whois": "\/me [%%NAME1%%] Benutzername: %%NAME2%%, ID: %%ID%%, Rang: %%RANK%%, Beigetreten: %%JOINED%%, Level: %%LEVEL%%, Sprache: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% freigeschaltet.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% deaktiviert.", + "cmddeletion": "Befehll\u00f6schung", + "afkremoval": "AFK Entfernung", + "afksremoved": "AFK ist entfernt", + "afklimit": "AFK Limit", + "autodisable": "Autodeaktivierung", + "autoskip": "Autoskip", + "newblacklisted": "\/me [@%%NAME%%] Dieser Song ist auf der %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Blacklist Info - author: %%AUTHOR%%, Titel: %%TITLE%%, mid: %%SONGID%%", + "blacklist": "blacklist", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "chatfilter", + "historyskip": "historyskip", + "lockdown": "lockdown", + "lockguard": "lockguard", + "usercommands": "usercommands", + "motd": "MotD", + "welcomemsg": "Willkommen Nachricht", + "songstats": "Song Statistik", + "etarestriction": "eta restriction", + "voteskip": "voteskip", + "voteskiplimit": "\/me [@%%NAME%%] Voteskip limit liegt momentan bei %%LIMIT%% mehs.", + "voteskipexceededlimit": "\/me @%%NAME%%, Der Song hat das Voteskip limit erreicht (%%LIMIT%% mehs).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Ung\u00fcltiges Voteskip Limit, bitte gib eine Nummer ein, um dies einzustellen.", + "voteskipsetlimit": "\/me [@%%NAME%%] Voteskip limit ist eingestellt auf %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] %%AMOUNT%% Benutzer haben in den letzten %%TIME%% Minuten gechattet.", + "maximumafktimeset": "\/me [@%%NAME%%] Die maximal erlaubte AFK Zeit liebt bei %%TIME%% Minuten.", + "afkstatusreset": "\/me [@%%NAME%%] Resette den AFK status von @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ist inactiv seid %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% war l\u00e4nger inactiv als %%BOTNAME%%'s online ist.", + "autowoot": "\/me Wir empfehlen PlugCubed f\u00fcr autowooting: http:\/\/plugcubed.net\/", + "brandambassador": "\/me A Brand Ambassador ist die Stimme der plug.dj users. Sie promoten und unterst\u00fctzen die Community und teilen die Plug.Dj Nachricht \u00fcber die ganze Welt.https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Du musst ein Manager sein oder die F\u00e4higkeit haben, Bouncer+ zu aktivieren.", + "chatcleared": "\/me [@%%NAME%%] hat den Chat gereinigt.", + "deletechat": "\/me [@%%NAME%%] hat alle Nachrichten von %%USERNAME%% entfernt.", + "commandslink": "\/me %%BOTNAME%% Commands: %%LINK%%", + "eatcookie": "\/me isst einen Keks.", + "nousercookie": "\/em sieht %%NAME%% nicht im Raum und isst den Keks selber.", + "selfcookie": "\/me @%%NAME%%, du bist heute nicht so gut drauf, oder? Gibt sich selbst einfach einen Keks. Teile es lieber mit anderen Menschen!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] Der cycleguard ist eingestellt auf %%TIME%% Minuten.", + "dclookuprank": "\/me [@%%NAME%%] Nur Bouncer und h\u00f6her k\u00f6nnen ein lookup f\u00fcr andere machen.", + "emojilist": "\/me Emoji list: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, du bist nicht auf der Warteliste.", + "youarenext": "\/me @%%NAME%%, du bist dran nach diesem Song.", + "youaredj": "\/me @%%NAME%%, Du djst gerade.", + "eta": "\/me @%%NAME%%, du bist in der Position %%POSITION%% in der Warteliste und wirst in ungef\u00e4hr %%TIME%% Minuten dran sein.", + "facebook": "\/me Like uns auf facebook: %%LINK%%", + "starterhelp": "\/me Dieses Bild hilft dir, auf Plug.Dj klar zu kommen: %%LINK%%", + "roulettejoin": "@%%NAME%% ist dem Roulette beigetreten (F\u00fcr den Befehl !leave aus, wenn du es verlassen willst).", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ist schon im Chatraum seid %%TIME%% Minuten.", + "kickrank": "\/me [@%%NAME%%] Du kannst keine Benutzer mit einem Rank, der gleich oder h\u00f6her als deiner ist!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% du wurdest von der Community verbannt f\u00fcr %%TIME%% Minuten.", + "kill": "\/me Fahre herunter.", + "logout": "\/me [@%%NAME%%] Loge mich aus %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% hat das Roulette verlassen!", + "songlink": "\/me [@%%NAME%%] Link zum momentanen song: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% hat lockskip benutzt.", + "usedskip": "\/me [%%NAME%% hat skip benutzt.", + "skippos": "\/me [@%%NAME%%] Djs werden von nun auf Position %%POSITION%% verschoben, wenn sie \u00fcbersprungen wurden.", + "lockguardtime": "\/me [@%%NAME%%] der lockguard ist gesetzt auf %%TIME%% Minuten.", + "maxlengthtime": "\/me [@%%NAME%%] Die maximal erlaubte Song-L\u00e4nge ist gesetzt auf %%TIME%% Minuten.", + "motdset": "\/me MotD gesetzt auf: %%MSG%%", + "motdintervalset": "\/me MotD interval gesetzt auf: %%INTERVAL%%.", + "currentbotname": "\/me Der Bot hei\u00dft momentan: %%BOTNAME%%", + "botnameset": "\/me Der Bot hei\u00dft nun: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, bitte versuch nicht, mich auf die Warteliste zu setzen", + "move": "\/me [%%NAME%% hat move benutzt]", + "mutednotime": "\/me [@%%NAME%%] Muted @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Du kannst Benutzer maximal f\u00fcr %%TIME%% Minuten stumm schalten.", + "mutedtime": "\/me [@%%NAME%%] Muted @%%USERNAME%% f\u00fcr %%TIME%% Minuten.", + "unmuted": "\/me [@%%NAME%%] Unmuted @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] Du kannst Benutzer mit einem Rank, welcher gleich oder h\u00f6her ist, muten.", + "oplist": "\/me OP Liste: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Bin gleich zur\u00fcck.", + "removenotinwl": "\/me [@%%NAME%%] Benutzer @%%USERNAME%% ist nicht auf der Warteliste.", + "roomrules": "\/me Du kannst die Regeln f\u00fcr den Chatroom hier finden: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", + "forceskip": "\/me [%%NAME%% hatforceskip benutzt]", + "madeby": "\/me Der Bot wurde entwickelt von %%NAME%%.", + "activefor": "Ich bin inaktiv seid %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Ung\u00fcltiger Benutzer festgelegt. (Keine Namen mit einem Leerzeichen!)", + "swapwlonly": "\/me [@%%NAME%%] Bitte vertausch nur Benutzer, die in der Warteliste sind", + "swapping": "\/me Vertausche %%NAME1%% mit %%NAME2%%.", + "genres": "\/me Du kannst die Chatroom Genres hier finden: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] Der Benutzer ist nicht gesperrt.", + "unmutedeveryone": "\/me [@%%NAME%%] Keiner ist jetzt mehr stumm geschaltet.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Nur Manager und h\u00f6her k\u00f6nnen alle Leute gleichzeitig unmuten.", + "notmuted": "\/me [@%%NAME%%] Dieser Benutzer ist nicht stumm geschaltet!", + "unmuterank": "\/me [@%%NAME%%] Du kannst Personen mit einem Rank, der gleich oder h\u00f6her ist als deiner, nicht unmuten.", + "commandscd": "\/me [@%%NAME%%] Der cooldown f\u00fcr Commands ist nun festgelegt auf %%TIME%% seconds.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w\/m): %%RATIO%%.", + "website": "\/me Bitte besuch unsere Website: %%LINK%%", + "youtube": "\/me [%%NAME%%] Subscribe unseren Youtube Channel! %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file diff --git a/lang/es-ES.json b/lang/es-ES.json new file mode 100644 index 00000000..4fc14796 --- /dev/null +++ b/lang/es-ES.json @@ -0,0 +1,206 @@ +{ + "cookies": [ + "te ha dado una galleta con chispas de chocolate!", + "te ha dado una galleta de avena hecha en casa!", + "te ha dado una galleta vieja y seca. Era la ultima que quedaba en la bolsa. Asqueroso.", + "te da una galleta de azucar. \u00bfQue, sin crema ni chispas? 0\/10 nunca la tocare.", + "te da una galleta de chocolate. Espera, son pasa. Que asco!", + "te da una galleta enorme. Si la tocas te da mas galletas. Raro.", + "te da una galleta de la fortuna. Se puede leer \"\u00bfPor que no estas trabajando en ningun proyecto?\"", + "te da una galleta de la fortuna. Se puede leer \"Dale a ese alguien especial un cumplido\"", + "te da una galleta de la fortuna. Se puede leer \"\u00a1Arriesgate!\"", + "te da una galleta de la fortuna. Se puede leer \"Ve afuera.\"", + "te da una galleta de la fortuna. Se puede leer \"\u00a1No te olvides de comer tus vegetales!\"", + "te da una galleta de la fortuna. Se puede leer \"\u00bfSiquiera haces pesas?\"", + "te da una galleta de la fortuna. Se puede leer \"m808 pls\"", + "te da una galleta de la fortuna. Se puede leer \"Si mueves tus caderas, tendras a todas las chicas.\"", + "te da una galleta de la fortuna. Se puede leer \"Te amo.\"", + "te da una Galleta Dorada. No la puedes comer porque esta hecha de oro. Rayos.", + "te da una galleta Oreo con un vaso de leche!", + "te da una galleta arcoiris hecha con amor :heart:", + "te da una galleta vieja que se dejo en la lluvia, esta mohosa.", + "te cocina galletas frescas, huelen muy bien." + ], + "balls": { + "0": "Los signos apuntan a que s\u00ed.", + "1": "S\u00ed.", + "2": "Respuesta vaga, vuelve a intentarlo.", + "3": "Sin lugar a duda.", + "4": "Mis fuentes dicen que no.", + "5": "Como yo lo veo, si.", + "6": "Puedes confiar en ello.", + "7": "Concentrate y pregunta de nuevo.", + "8": "Las perspectivas no son buenas.", + "9": "Es decididamente as\u00ed.", + "10": "Mejor no decirte ahora.", + "11": "Muy dudoso.", + "12": "Si - definitivamente.", + "13": "Es cierto.", + "14": "No lo puedo predecir ahora.", + "15": "Lo m\u00e1s probable.", + "16": "Pregunta de nuevo mas tarde.", + "17": "Mi respuesta es no.", + "18": "Buen pron\u00f3stico.", + "19": "No cuentes con ello.", + "20": "Si, en su debido tiempo.", + "22": "Definitivamente no.", + "23": "Tendras que esperar.", + "24": "Tengo mis dudas.", + "25": "Se ve normal.", + "26": "\u00a1Se ve muy bien para mi!", + "27": "\u00bfQui\u00e9n sabe?", + "28": "\u00a1Pinta bien!", + "29": "Probablemente.", + "30": "\u00bfEstas bromeando?", + "31": "No apuestes en ello.", + "32": "Olvidalo." + }, + "nodatafound": "No se ha encontrado datos anteriores.", + "currentlang": "\/me Idioma actualmente puesto en %%LANGUAGE%%", + "langerror": "\/me El lenguaje que seleccionaste no esta disponible. Por favor visita %%LINK%% para encontrar la lista de lenguajes disponibles.", + "langset": "\/me El lenguaje se ha cambiado a: %%LANGUAGE%%", + "retrievingdata": "Recuperando datos anteriormente guardados.", + "datarestored": "Datos anteriormente guardados fueron recuperados.", + "greyuser": "Solo guardaespaldas y mayores rangos pueden correr un bot.", + "bouncer": "El bot no puede mover personas cuando es ejecutado por un guardaespaldas.", + "online": "\/me %%BOTNAME%% v%%VERSION%% en linea!", + "welcome": "\/me Bienvenido %%NAME%%", + "welcomeback": "\/me Bienvenido de vuelta, %%NAME%%", + "songknown": "\/me @%%NAME%%, esta cancion esta en el historial de Dj.", + "notavailable": "\/me @%%NAME%%, la cancion que tocaste no estaba disponible.", + "timelimit": "\/me @%%NAME%%, tu cancion es mas larga que %%MAXLENGTH%% minutos, necesitas permisos para tocar canciones mas largas.", + "permissionownsong": "\/me :up: @%%NAME%% tiene permisos para tocar su propia produccion!", + "isblacklisted": "\/me Esta cancion esta en %%BLACKLIST%% lista negra! Saltando...", + "isopen": "\/me \u00a1La ruleta esta abierta! \u00a1Escribe !join para participar! (Un juego en el que un participante al azar es movido a una posicion cualquiera en la lista de espera).", + "winnerpicked": "\/me \u00a1Un ganador a sido escogido! @%%NAME%% movido a %%POSITION%%", + "ball": "\/me %%NAME%% su pregunta fue: \"%%QUESTION%%\" y la respues de %%BOTNAME%% es: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% no esta ghosteando.", + "ghosting": "[%%NAME1%%] %%NAME2%% o esta ghosteando o no esta aqui.", + "alreadyadding": "\/me El usuario esta siendo a\u00f1adido! Cambiando la posicion deseada a %%POSITION%%.", + "adding": "\/me @%%NAME%% agregado a la cola. Cola actual: %%POSITION%%.", + "usernotfound": "\/me Usuario no encontrado.", + "notdisconnected": "\/me @%%NAME%% no se desconecto mientras estuve aqui.", + "noposition": "\/me No se conoce la ultima posicion. La lista de espera necesita actualizarte por lo menos una vez para registrar la ultima posicion del usuario.", + "toolongago": "\/me la ultima desconexion de @%%NAME%% fue hace mucho tiempo: %%TIME%%.", + "valid": "\/me @%%NAME%% se desconecto hace %%TIME%% y deberia estar en la posicion %%POSITION%%.", + "warning1": "\/me @%%NAME%%, haz estado afk por %%TIME%%, por favor responde en 2 minutos o seras removido.", + "warning2": "\/me @%%NAME%%, seras removido dentro de poco por estar afk si no respondes.", + "afkremove": "\/me @%%NAME%%, haz sido removido por estar afk por %%TIME%%. Estabas en la posicion %%POSITION%%. Chatea por lo menos una vez cada %%MAXIMUMAFK%% minutos si quieres tocar una cancion.", + "caps": "\/me @%%NAME%%, no chatees en mayusculas por favor.", + "askskip": "\/me @%%NAME%%, no pidas skips.", + "spam": "\/me @%%NAME%%, por favor no spamees.", + "roomadvertising": "\/me @%%NAME%%, no postees links hacia otras salas por favor.", + "adfly": "\/me @%%NAME%%, por favor cambia tu programa de \"autogenial\". Te sugerimos PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Etiquetas invalidas, por favor prueba algo diferente. [Etiquetas: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Random GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] Solicitud no v\u00e1lida, vuelva a intentarlo.", + "invalidtime": "\/me [@%%NAME%%] Tiempo especificado invalido.", + "nouserspecified": "\/me [@%%NAME%%] Usuario no especificado.", + "invaliduserspecified": "\/me [@%%NAME%%] Usuario especificado invalido.", + "nolistspecified": "\/me [@%%NAME%%] Ninguna lista especificada.", + "invalidlistspecified": "\/me [@%%NAME%%] Lista especificada invalida.", + "novaliduserspecified": "\/me [@%%NAME%%] Ningun usuario valido especificado.", + "nolimitspecified": "\/me [@%%NAME%%] Ningun limite especificado.", + "invalidlimitspecified": "\/me [@%%NAME%%] Limite invalido.", + "invalidpositionspecified": "\/me [@%%NAME%%] Posicion especificada invalida.", + "whois": "\/me [%%NAME1%%] Usuario: %%NAME2%%, ID: %%ID%%, Rango: %%RANK%%, Entro: %%JOINED%%, Nivel: %%LEVEL%%, Lenguaje: %%LANGUAGE%%, Avatar: %%AVATAR%%, Perfil: %%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% activado.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% desactivado.", + "cmddeletion": "eliminaci\u00f3n de comandos", + "afkremoval": "Removedor de AFK", + "afksremoved": "AFKs removidos", + "afklimit": "Limite AFK", + "autodisable": "Autodesactivar", + "autoskip": "Autoskip", + "newblacklisted": "\/me [@%%NAME%%] Esta cancion esta en %%BLACKLIST%% lista negra! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Informacion de la lista negra - autor: %%AUTHOR%%, titulo: %%TITLE%%, Id: %%SONGID%%", + "blacklist": "lista negra", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "filtro de chat", + "historyskip": "historyskip", + "lockdown": "lockdown", + "lockguard": "lockguard", + "usercommands": "usercommands", + "motd": "MotD", + "welcomemsg": "mensaje de bienvenida", + "songstats": "estad\u00edsticas de canciones", + "etarestriction": "restriccion eta", + "voteskip": "voteskip", + "voteskiplimit": "\/me [@%%NAME%%] El limite de voteskip esta actualmente en %%LIMIT%% aburridos.", + "voteskipexceededlimit": "\/me @%%NAME%%, tu cancion excede el limite de voteskip (%%LIMIT%% aburridos).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Limite de voteskip invalido, prueba de nuevo usando un numero de referencia para el numero de aburridos.", + "voteskipsetlimit": "\/me [@%%NAME%%] Limite del voteskip puesto en %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] Han habido %%AMOUNT%%usuarios chateando en los ultimos %%TIME%% minutos.", + "maximumafktimeset": "\/me [@%%NAME%%] Duracion maxima de afk puesta en %%TIME%% minutos.", + "afkstatusreset": "\/me [@%%NAME%%] Estado afk reseteado @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ha estado inactivo por %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% ha estado inactivo mas tiempo de lo que %%BOTNAME%% ha estado online.", + "autowoot": "\/me Te recomendamos PlugCubed para el autogenial: http:\/\/plugcubed.net\/", + "brandambassador": "\/me Un Embajador de la Marca es la voz de los usuarios de plug.dj. Ellos promueven eventos, unen a la comunidad y comparten la pagina por todo el mundo. Si necesitas mas informacion: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Necesitas ser manager o mas para habilitar Bouncer+.", + "chatcleared": "\/me [@%%NAME%%] Limpio el chat.", + "deletechat": "\/me [@%%NAME%%] Limpio el chat de %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% comandos: %%LINK%%", + "eatcookie": "\/me me como una galleta.", + "nousercookie": "\/me no veo a %%NAME%% en la sala y me como la galleta.", + "selfcookie": "me @%%NAME%%, eres un poco codicioso, no? Dandote galletas a ti mismo, bah. \u00a1Comparte con otras personas!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] El cycleguard esta puesto en %%TIME%% minuto(s).", + "dclookuprank": "\/me [@%%NAME%%] Solo guardaespaldas y para arriba puedes buscar a otros.", + "emojilist": "\/me Lista de Emojis: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, no estas en la lista de espera.", + "youarenext": "\/me @%%NAME%%, vas a estar de Dj despues de esta cancion.", + "youaredj": "\/me @%%NAME%%, estas de Dj actualmente.", + "eta": "\/me @%%NAME%%, eres la posicion %%POSITION%% en la lista de espera y llegaras a ser Dj en aproximadamente %%TIME%%.", + "facebook": "\/me Danos like en facebook: %%LINK%%", + "starterhelp": "\/me Esta imagen te ayudara a empezar en plug.dj: %%LINK%%", + "roulettejoin": "@%%NAME%% entro en la ruleta! (!leave si lo lamentas)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ha estado en la sala por %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] no puedes kickear usuarios con rangos iguales o mayores a los tuyos.", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% seras kickeado de la comunidad por %%TIME%% minutos.", + "kill": "\/me Apagando.", + "logout": "\/me [@%%NAME%%] Cerrando sesion %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% salio de la ruleta!", + "songlink": "\/me [@%%NAME%%] Link de la cancion actual: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% uso lockskip]", + "usedskip": "\/me [%%NAME%% uso skip]", + "skippos": "\/me [@%%NAME%%] Djs ahora seran movidos a la posicion %%POSITION%% cuando skip.", + "lockguardtime": "\/me [@%%NAME%%] El lockguard esta puesto en %%TIME%% minuto(s).", + "maxlengthtime": "\/me [@%%NAME%%] La duracion maxima de una cancion esta en %%TIME%% minutos.", + "motdset": "\/me MotD puesto a: %%MSG%%", + "motdintervalset": "\/me Intervalo del MotD puesto en %%INTERVAL%%.", + "currentbotname": "\/me El nombre actual del bot es: %%BOTNAME%%", + "botnameset": "\/me El nombre del bot se ha cambiado a: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, no me trates de agregar a la lista de espera, por favor.", + "move": "\/me [%%NAME%% uso mover]", + "mutednotime": "\/me [@%%NAME%%] Muteo @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Tu solo puedes silenciar por un maximo de %%TIME%% minutos.", + "mutedtime": "\/me [@%%NAME%%] Silencio @%%USERNAME%% por %%TIME%% minutos.", + "unmuted": "\/me [@%%NAME%%] desmuteo @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%]Tu no puedes mutear personas con el mismo rango o mayor que el tuyo.", + "oplist": "\/me Lista OP: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Vuelvo enseguida.", + "removenotinwl": "\/me [@%%NAME%%] Usuario especificado @%%USERNAME%% no esta en la lista de espera.", + "roomrules": "\/me Por favor lee las reglas de la sala aqui: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Geniales totales: %%WOOTS%%, aburridos totales: %%MEHS%%, agarradas: %%GRABS%%.", + "forceskip": "\/me [%%NAME%% uso forceskip]", + "madeby": "\/me Este bot fue hecho por %%NAME%%.", + "activefor": "He estado activo por %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Usuario invalido especificado. (\u00a1Sin nombres con espacios!)", + "swapwlonly": "\/me [@%%NAME%%] \u00a1Por favor solo cambia usuarios que estan en la lista de espera!", + "swapping": "\/me Cambiando %%NAME1%% con %%NAME2%%.", + "genres": "\/me Encuentra los generos que se tocan en esta sala: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] El usuario no fue baneado.", + "unmutedeveryone": "\/me [@%%NAME%%] Todos fueron desmuteados.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Solo managers y mas alto pueden desmutear a todos de una vez.", + "notmuted": "\/me [@%%NAME%%] ese usuario no estaba silenciado.", + "unmuterank": "\/me [@%%NAME%%] No puedes desmutear personas con el mismo o mayor rango que tu.", + "commandscd": "\/me [@%%NAME%%] El tiempo de reutilizaci\u00f3n de los comandos para los usuarios esta puesto ahora en %%TIME%% segundos.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ geniales: %%WOOT%%, aburridos: %%MEHS%%, ratio (g\/a): %%RATIO%%.", + "website": "\/me Por favor visita nuestra pagina web: %%LINK%%", + "youtube": "\/me [%%NAME%%] Suscribete a nosotros en youtube: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file diff --git a/lang/langIndex.json b/lang/langIndex.json index 84c8dc84..b5afae68 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,10 +1,12 @@ { "english": "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", - "portuguese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/pt.json", + "portuguese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/pt-BR.json", "french": "https://rawgit.com/***REMOVED***/basicBot/master/lang/fr.json", "turkish": "https://rawgit.com/***REMOVED***/basicBot/master/lang/tr.json", "serbian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/sr.json", - "chinese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/zh.json", + "chinese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/zh-TW.json", "dutch": "https://rawgit.com/***REMOVED***/basicBot/master/lang/nl.json", - "latvian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/lv.json" + "latvian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/lv-LV.json", + "german": "https://rawgit.com/***REMOVED***/basicBot/master/lang/de.json", + "spanish": "https://rawgit.com/***REMOVED***/basicBot/master/lang/es-ES.json" } \ No newline at end of file diff --git a/lang/lv-LV.json b/lang/lv-LV.json new file mode 100644 index 00000000..da513bf8 --- /dev/null +++ b/lang/lv-LV.json @@ -0,0 +1,206 @@ +{ + "cookies": [ + "iedeva Tev \u0161okol\u0101des cepumu!", + "iedeva Tev m\u012bkstu m\u0101j\u0101s gatavotu auzu cepumu!", + "Iedeva Tev sausu un vecu cepumu. Vi\u0146\u0161 bija p\u0113d\u0113jais mais\u0101. Fuj!", + "iedeva Tev cukura cepumu. Ko? bez glaz\u016bras un neapkais\u012bts? 0\/10 lab\u0101k neaiztiec.", + "Iedeva Tev cepumu ar \u0161okol\u0101d\u0113s gabali\u0146iem. Uzgaidi.. T\u0101s ir roz\u012bnes. Fuj!", + "iedeva Tev milz\u012bgu cepumu! Bakstot vi\u0146u, tas tev dod vair\u0101k cepumu. D\u012bvaini..", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''K\u0101d\u0113\u013c Tu nestr\u0101d\u0101 pie neviena projekta?''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Izsaki k\u0101dam komplimentu!''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Uz\u0146emies risku!''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Izej \u0101r\u0101, pastaig\u0101jies.''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Neaizmirsti ap\u0113st savus d\u0101rzen\u012b\u0161us!''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Vai Tu visp\u0101r vari pacelt?''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts \"m808 pls\"", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Padejo, dab\u016bsi visas d\u0101mas.''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Es m\u012blu Tevi.''", + "iedeva Tev Zelta Cepumu. Tu nevari to \u0113st, jo tas tais\u012bts no zelta.", + "iedeva Tev Oreo ar gl\u0101zi piena.", + "iedeva Tev varav\u012bksnes cepumu, gatavots ar m\u012blest\u012bbu. :heart:", + "iedeva Tev vecu cepumu, vi\u0146\u0161 pamests \u0101r\u0101, liet\u016b. Tas ir sapel\u0113jis.", + "gatavo Tev svaigus cepumus, tie smar\u017eo burv\u012bgi." + ], + "balls": { + "0": "Paz\u012bmes liecina, ka j\u0101.", + "1": "J\u0101. ", + "2": "Atbilde neskaidra, m\u0113\u0123ini v\u0113lreiz.", + "3": "Bez \u0161aub\u0101m!", + "4": "Mani avoti saka, ka n\u0113.", + "5": "Domaju, ka j\u0101.", + "6": "Tu vari uz to pa\u013cauties. ", + "7": "Koncentr\u0113jies un pajaut\u0101 v\u0113lreiz!", + "8": "Izredzes nav tik lielas.", + "9": "Tas noteikti t\u0101 ir!", + "10": "Lab\u0101k Tev to tagad neteikt.", + "11": "\u013boti ap\u0161aub\u0101mi!", + "12": "J\u0101 - Noteikti.", + "13": "Tas ir dro\u0161i!", + "14": "Pagaid\u0101m nevaru prognoz\u0113t.", + "15": "Visticam\u0101k. ", + "16": "Pajaut\u0101 v\u0113l\u0101k v\u0113lreiz.", + "17": "Mana atbilde ir, n\u0113.", + "18": "Izredzes ir labas!", + "19": "Uz to ner\u0113\u0137inies!", + "20": "Sav\u0101 laik\u0101, J\u0101!", + "22": "Noteikti n\u0113!", + "23": "Tev b\u016bs j\u0101uzgaida. ", + "24": "Man ir savas \u0161aubas..", + "25": "Vid\u0113jas izredzes.", + "26": "Manupr\u0101t izskat\u0101s labi!", + "27": "Kas to lai zina?", + "28": "Izskat\u0101s labi! ", + "29": "Iesp\u0113jams..", + "30": "Vai Tu joko?", + "31": "Uz to nepa\u013caujies.", + "32": "Aizmirsti par to!" + }, + "nodatafound": "Iepriek\u0161\u0113jie dati nav atrasti. ", + "currentlang": "\/me Valoda pa\u0161laik iestat\u012bta uz: %%LANGUAGE%%", + "langerror": "\/me Tava izv\u0113l\u0113t\u0101 valoda nav pieejama! Lai atrastu pieejam\u0101s valodas: %%LINK%%", + "langset": "\/me Valoda nomain\u012bta uz: %%LANGUAGE%%", + "retrievingdata": "Atg\u016bstu iepriek\u0161 saglab\u0101tos datus.", + "datarestored": "Iepriek\u0161\u0113jie saglab\u0101tie dati veiksm\u012bgi iel\u0101d\u0113ti.", + "greyuser": "Tikai uzraugi un augst\u0101ki var palaist botu.", + "bouncer": "Bots nevar p\u0101rvietot cilv\u0113kus, kad tas darbojas k\u0101 uzraugs.", + "online": "\/me %%BOTNAME%% v%%VERSION%% tie\u0161saist\u0113!", + "welcome": "\/me \u010cau %%NAME%%", + "welcomeback": "\/me Sveiciens ar atgriez\u0161anos, %%NAME%%", + "songknown": "\/me @%%NAME%%, \u0161\u012b dziesma ir DJ v\u0113stur\u0113.", + "notavailable": "\/me @%%NAME%%, dziesma ko Tu sp\u0113l\u0113ji nebija pieejama.", + "timelimit": "\/me @%%NAME%%, Tava dziesma ir gar\u0101ka nek\u0101 %%MAXLENGTH%% min\u016btes, Tev ir nepiecie\u0161ama at\u013cauja, lai sp\u0113l\u0113tu gar\u0101kas dziesmas.", + "permissionownsong": "\/me :up: @%%NAME%% ir at\u013cauja, lai sp\u0113l\u0113tu vi\u0146\u0101 pa\u0161u produkciju!", + "isblacklisted": "\/me \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101! Izlai\u017eam...", + "isopen": "\/me Rulete tagad ir atv\u0113rta! Rakstiet !join lai piedal\u012btos!", + "winnerpicked": "\/me Uzvar\u0113t\u0101js ir izv\u0113l\u0113ts! @%%NAME%% p\u0101rmetam uz %%POSITION%%.", + "ball": "\/me %%NAME%%'a jaut\u0101jums bija: \"%%QUESTION%%\" un %%BOTNAME%%'a atbilde ir: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% nespokoj\u0101s.", + "ghosting": "[%%NAME1%%] %%NAME2%% spokoj\u0101s, vai ar\u012b neatrodas \u0161eit.", + "alreadyadding": "\/me Lietot\u0101js tiek pievienots! Main\u012bt v\u0113lamo poz\u012bciju, uz %%POSITION%%.", + "adding": "\/me Pievieno @%%NAME%% iek\u0161 rindas. J\u016bsu vieta rind\u0101: %%POSITION%%.", + "usernotfound": "\/me Lietot\u0101js nav atrasts. ", + "notdisconnected": "\/me @%%NAME%% nebija atvienojies, kam\u0113r biju \u0161eit.", + "noposition": "\/me Vieta rind\u0101 nav zin\u0101ma. Rinda j\u0101atjaunina lai atrastu lietot\u0101ja vietu rind\u0101.", + "toolongago": "\/me @%%NAME%%'s atvieno\u0161an\u0101s bija p\u0101rak ilga: %%TIME%%", + "valid": "\/me @%%NAME%% atvienoj\u0101s pirms: %%TIME%% un vieta rind\u0101 j\u0101b\u016bt: %%POSITION%%", + "warning1": "\/me @%%NAME%%, Tu esi AFK jau %%TIME%%, l\u016bdzu atbildi 2 min\u016b\u0161u laik\u0101, vai tiksi no\u0146emts.", + "warning2": "\/me @%%NAME%%, Ja neatbild\u0113si, Tu tiksi no\u0146emts par b\u016b\u0161anu AFK.", + "afkremove": "\/me @%%NAME%%. Tu tiki no\u0146emts no rindas, jo biji afk %%TIME%%. Tu biji %%POSITION%% rind\u0101. N\u0101kamaj\u0101 reiz\u0113 \u010dato reizi %%MAXIMUMAFK%% min\u016btes, ja gribi palikt rind\u0101.", + "caps": "\/me @%%NAME%%, L\u016bdzu, neturi CAPSLOCK pogu.", + "askskip": "\/me @%%NAME%%, neprasi lai izlai\u017e.", + "spam": "\/me @%%NAME%%, l\u016bdzu, nespamo.", + "roomadvertising": "\/me @%%NAME%%, l\u016bdzu, neliec saites uz cit\u0101m kopien\u0101m.", + "adfly": "\/me @%%NAME%%, L\u016bdzu mainiet savu \"autowoot\" programmu. M\u0113s iesak\u0101m \u0161o. http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] [%%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "invalidgiftags": "\/me [@%%NAME%%] [%%TAGS%%] Neder\u012bgs tags.", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "invalidgifrandom": "\/me [@%%NAME%%] Neder\u012bgs piepras\u012bjums.", + "invalidtime": "\/me [@%%NAME%%] Nedr\u012bgs laiks.", + "nouserspecified": "\/me [@%%NAME%%] Nenoteikts lietot\u0101js.", + "invaliduserspecified": "\/me [@%%NAME%%] Neder\u012bgs lietot\u0101js.", + "nolistspecified": "\/me [@%%NAME%%] Nenoteikts saraksts.", + "invalidlistspecified": "\/me [@%%NAME%%] Noteikts neder\u012bgs saraksts.", + "novaliduserspecified": "\/me [@%%NAME%%] Neder\u012bgs lietot\u0101js.", + "nolimitspecified": "\/me [@%%NAME%%] Nav noteikts limits.", + "invalidlimitspecified": "\/me [@%%NAME%%] Neder\u012bgs limits.", + "invalidpositionspecified": "\/me [@%%NAME%%] Preciz\u0113ta neder\u012bga poz\u012bcija.", + "whois": "\/me [%%NAME1%%] Lietot\u0101jv\u0101rds: %%NAME2%%, ID: %%ID%%, Ranks: %%RANK%%, Pievienojies: %%JOINED%%, L\u012bmenis: %%LEVEL%%, Valoda: %%LANGUAGE%%, Avatars: %%AVATAR%%, Status: %%STATUS%%, Profils: %%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% iesl\u0113gts.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% izsl\u0113gts.", + "cmddeletion": "komandu dz\u0113\u0161ana.", + "afkremoval": "AFK dz\u0113\u0161ana", + "afksremoved": "AFK dz\u0113sti", + "afklimit": "AFK limits ", + "autodisable": "autodisable", + "autoskip": "autoskip", + "newblacklisted": "\/me [@%%NAME%%] \u0160\u012b dziesma pieder %%BLACKLIST%% melnajam sarakstam! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Meln\u0101 saraksta info - autors: %%AUTHOR%%, virsraksts: %%TITLE%%, mid: %%SONGID%%", + "blacklist": "melnais saraksts", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "\u010cata Filtrs", + "historyskip": "historyskip", + "lockdown": "lockdown", + "lockguard": "lockguard", + "usercommands": "lietot\u0101jkomandas", + "motd": "MotD ", + "welcomemsg": "Sveiciens", + "songstats": "dziesmu statistika", + "etarestriction": "eta robe\u017eas", + "voteskip": "izlaist ar balso\u0161anu", + "voteskiplimit": "\/me [@%%NAME%%] Voteskip limits iestat\u012bts uz %%LIMIT%% meh'iem", + "voteskipexceededlimit": "\/me @%%NAME%%, Tava dziesma p\u0101rsniedz \"voteskip\" limitu (%%LIMIT%% meh'i).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Neder\u012bgs \"Voteskip\" limits! Nor\u0101diet numuru priek\u0161 meh'iem", + "voteskipsetlimit": "\/me [@%%NAME%%] \"voteskip\" limits ir iestat\u012bts uz %%LIMIT%%", + "activeusersintime": "\/me [@%%NAME%%] P\u0113dej\u0101s %%TIME%% min\u016bt\u0113s, \u0161eit \u010datoja %%AMOUNT%% lietot\u0101ji.", + "maximumafktimeset": "\/me [@%%NAME%%] Maksim\u0101lais AFK ilgums iestat\u012bts uz %%TIME%% min\u016bt\u0113m.", + "afkstatusreset": "\/me [@%%NAME%%] No\u0146\u0113ma @%% AFK no %%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs jau %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs ilg\u0101k nek\u0101 %%BOTNAME%%'s ir piesl\u0113dzies.", + "autowoot": "\/me M\u0113s iesak\u0101m \u0161o priek\u0161 \"autowoot\" : http:\/\/plugcubed.net\/", + "brandambassador": "\/me P\u0101rst\u0101vji, jeb (Brand Ambassador) ir plug.dj pal\u012bgi, kas pal\u012bdz lietot\u0101jiem atbild\u0113t uz jaut\u0101jumiem. K\u0101 ar\u012b vi\u0146i veido pas\u0101kumus, un pal\u012bdz. :) Vair\u0101k info: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Jums ir j\u0101b\u016bt mened\u017eerim, vai augst\u0101k lai pievienotu Uzraugus.", + "chatcleared": "\/me [@%%NAME%%] \u010cats izt\u012br\u012bts.", + "deletechat": "\/me [@%%NAME%%] Izt\u012brija \u010datu no %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% komandas: %%LINK%% ", + "eatcookie": "\/me \u0146amm\u0101 cepumu.", + "nousercookie": "\/em nevar\u0113ju atrast %%NAME%%, tap\u0113c \u0113d\u012b\u0161u cepumus es pats. :P", + "selfcookie": "\/me @%%NAME%%, tu esi cietsird\u012bgs! Dod pats sev cepumus, bah. Padalies ar citiem!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%% ", + "cycleguardtime": "\/me [@%%NAME%%] \"cycleguard\" ir iestat\u012bts uz %%TIME%% min\u016bti.", + "dclookuprank": "\/me [@%%NAME%%] Tikai uzraugi, un augst\u0101ki var uzmekl\u0113t citus.", + "emojilist": "\/me Smaidi\u0146i: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, tu n\u0113esi rind\u0101.", + "youarenext": "\/me @%%NAME%%, tu b\u016bsi DJ p\u0113c \u0161\u012bs dziesmas!", + "youaredj": "\/me @%%NAME%% Tu esi DJ.", + "eta": "\/me @%%NAME%%, Tu esi %%POSITION%% rind\u0101, un k\u0101psi uz skatuves apm\u0113ram p\u0113c %%TIME%%.", + "facebook": "\/me Spie\u017eat pat\u012bk musu facebook'\u0101: %%LINK%%", + "starterhelp": "\/me \u0160\u012b bilde jums pal\u012bdz\u0113s start\u0113t iek\u0161 plug: %%LINK%%", + "roulettejoin": "\/me @%%NAME%% pievienoj\u0101s ruletei! (!leave ja tu p\u0101rdom\u0101ji)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ir \u0161aj\u0101 kopien\u0101 jau %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] J\u016bs nevarat izmest lietot\u0101jus kuriem ir vien\u0101ds, vai augst\u0101ks ranks k\u0101 Tev!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% J\u016bs tiekat izmests no kopienas uz %%TIME%% min\u016bt\u0113m.", + "kill": "\/me Izsl\u0113dzos, att\u0101! :(", + "logout": "\/me [@%%NAME%%] <-- Slepkava.. Izsl\u0113dz %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% pameta ruleti! Baidies?", + "songlink": "\/me [@%%NAME%%] Saite uz pa\u0161reiz\u0113jo dziesmu: %%LINK%% ", + "usedlockskip": "\/me [%%NAME%% lietoja \"lockskip\"]", + "usedskip": "\/me [%%NAME%% izlaida dziesmu]", + "skippos": "\/me [@%%NAME%%] DJ tiks p\u0101rmesti uz %%POSITION%% vietu rind\u0101, ja izlaid\u012bs dziesmu.", + "lockguardtime": "\/me [@%%NAME%%] \"lockguard\" ir iestat\u012bts uz %%TIME%% min\u016bti.", + "maxlengthtime": "\/me [@%%NAME%%] Maksim\u0101lais dziesmas garums ir iestat\u012bts uz %%TIME%% min\u016bt\u0113m.", + "motdset": "\/me MotD iestat\u012bts: %%MSG%%", + "motdintervalset": "\/me MotD interv\u0101ls iestat\u012bts: %%INTERVAL%%.", + "currentbotname": "\/me Bota v\u0101rds ir iestat\u012bts k\u0101: %%BOTNAME%%", + "botnameset": "\/me Bota v\u0101rds iestat\u012bts k\u0101: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, l\u016bdzu, nem\u0113\u0123ini mani pievienot rindai.", + "move": "\/me [%%NAME%% p\u0101rvietoja]", + "mutednotime": "\/me [@%%NAME%%] Apklusin\u0101ja @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Tu vari apklusin\u0101t tikai uz %%TIME%% min\u016bt\u0113m.", + "mutedtime": "\/me [@%%NAME%%] Apklusin\u0101ja @%%USERNAME%% uz %%TIME%% min\u016bt\u0113m.", + "unmuted": "\/me [@%%NAME%%] at\u013c\u0101va run\u0101t @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] J\u016bs n\u0113varat apklusin\u0101t lietot\u0101jus, kas ir t\u0101d\u0101 pa\u0161\u0101, vai augst\u0101k\u0101 rank\u0101 par tevi.", + "oplist": "\/me OP saraksts: %%LINK%% ", + "pong": "\/me Pong! ", + "reload": "\/me Dr\u012bz b\u016b\u0161u atpaka\u013c.", + "removenotinwl": "\/me [@%%NAME%%] @%%USERNAME%% nav rind\u0101.", + "roomrules": "\/me Kopienas noteikumi izlas\u0101mi \u0161eit: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Woot'i: %%WOOTS%%, Meh'i: %%MEHS%%, Pa\u0146\u0113ma: %%GRABS%%.", + "forceskip": "\/me [%%NAME%% piespieda izlaist dziesmu]", + "madeby": "\/me \u0160o botu izveidoja %%NAME%%.", + "activefor": "Esmu bijis akt\u012bvs jau %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Nor\u0101d\u012bts neder\u012bgs lietot\u0101js. (V\u0101rdus bez atstarp\u0113m!!)", + "swapwlonly": "\/me [@%%NAME%%] L\u016bdzu, mainies tikai ar lietot\u0101jiem kas atrodas rind\u0101!", + "swapping": "\/me Mainu %%NAME1%% ar %%NAME2%%.", + "genres": "\/me Kopienas \u017eanrus vari atrast \u0161eit: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] Lietot\u0101js nav banots.", + "unmutedeveryone": "\/me [@%%NAME%%] At\u013c\u0101va visiem run\u0101t,", + "unmuteeveryonerank": "\/me [@%%NAME%%] Tikai mened\u017eeris un augst\u0101ki var at\u013caut visiem run\u0101t vienlaikus.", + "notmuted": "\/me [@%%NAME%%] \u0160is lietot\u0101js netika apklusin\u0101ts.", + "unmuterank": "\/me [@%%NAME%%] J\u016bs nevarat at\u013caut run\u0101t lietot\u0101jiem ar t\u0101du pa\u0161u, vai augst\u0101ku ranku k\u0101 tev.", + "commandscd": "\/me [@%%NAME%%] Komandu \"anti-spam\" laiks priek\u0161 lietot\u0101jiem ir iestat\u012bts uz %%TIME%% sekund\u0113m.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Woot'i: %%WOOT%%, Meh'i: %%MEHS%%, Procentu\u0101li: %%RATIO%%.", + "website": "\/me M\u016bsu m\u0101jaslapa: %%LINK%%", + "youtube": "\/me [%%NAME%%] Abon\u0113jiet m\u016bs Youtub\u0113: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%\/M." +} \ No newline at end of file diff --git a/lang/lv.json b/lang/lv.json deleted file mode 100644 index 9622f3b4..00000000 --- a/lang/lv.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "cookies": [ - "iedeva jums \u0161okol\u0101des cepumu! ", - "iedeva jums m\u012bkstu m\u0101j\u0101s gatavotu auzu cepumu! ", - "Iedeva tuk\u0161u, sausu, un vecu cepumu. Vi\u0146\u0161 bija p\u0113d\u0113jais mais\u0101. Fuj.", - "iedeva jums cukura cepumu. Ko, bez glaz\u016bras un neapkais\u012bts? 0\/10 lab\u0101k neaiztiec.", - "Iedeva Jums cepumu ar \u0161okol\u0101d\u0113s gabali\u0146iem. Uzgaidi.. T\u0101s ir roz\u012bnes. Fuj!", - "iedeva jums milz\u012bgu cepumu. Bakstot to, tas tev dod vair\u0101k cepumu. D\u012bvaini.", - "iedeva jums laimes cepumu. Tur sac\u012bts ''K\u0101d\u0113\u013c J\u016bs nestr\u0101d\u0101jat pie neviena projekta?''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Izsaki k\u0101dam \u012bpa\u0161am komplimentu.''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Uz\u0146emies risku!''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Izej \u0101r\u0101.''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Neaizmirsti ap\u0113st savus d\u0101rzen\u012b\u0161us!''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Vai Tu visp\u0101r vari pacelt?''", - "iedeva Jums laimes cepumu. Tur teikts: \"m808 pls\"", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Ja kustin\u0101si gurnus, ieg\u016bsi visas d\u0101mas.''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Es m\u012blu Tevi.''", - "iedeva jums Zelta Cepumu. Tu nevari to \u0113st, jo tas tais\u012bts no zelta. Nol\u0101d\u0113ts.", - "iedeva jums Oreo cepumu ar gl\u0101zi piena. ", - "iedeva jums varav\u012bksnes cepumu, gatavots ar m\u012blest\u012bbu :heart:", - "iedeva jums vecu cepumu, kas bija pamests \u0101r\u0101, liet\u016b. Tas ir sapel\u0113jis.", - "gatavo Tev svaigus cepumus, tie smar\u017eo burv\u012bgi." - ], - "balls": [ - "Paz\u012bmes liecina, ka j\u0101.", - "J\u0101. ", - "Atbilde neskaidra, m\u0113\u0123ini v\u0113lreiz.", - "Bez \u0161aub\u0101m!", - "Mani avoti saka, ka n\u0113.", - "Domaju, ka j\u0101.", - "Tu vari uz to pa\u013cauties. ", - "Koncentr\u0113jies un pajaut\u0101 v\u0113lreiz!", - "Izredzes nav tik lielas.", - "Tas noteikti t\u0101 ir!", - "Lab\u0101k Tev to tagad neteikt.", - "\u013boti ap\u0161aub\u0101mi!", - "J\u0101 - Noteikti.", - "Tas ir dro\u0161i!", - "Pagaid\u0101m nevaru prognoz\u0113t.", - "Visticam\u0101k. ", - "Pajaut\u0101 v\u0113l\u0101k v\u0113lreiz.", - "Mana atbilde ir, n\u0113.", - "Izredzes ir labas!", - "Uz to ner\u0113\u0137inies!", - "Sav\u0101 laik\u0101, J\u0101!", - "Mani avoti saka ka n\u0113.", - "Noteikti n\u0113!", - "Tev b\u016bs j\u0101uzgaida. ", - "Man ir savas \u0161aubas..", - "Vid\u0113jas izredzes.", - "Manupr\u0101t izskat\u0101s labi!", - "Kas to lai zina?", - "Izskat\u0101s labi! ", - "Iesp\u0113jams..", - "Vai Tu joko?", - "Uz to nepa\u013caujies.", - "Aizmirsti par to!" - ], - "nodatafound": "Iepriek\u0161\u0113jie dati nav atrasti. ", - "currentlang": "\/me Valoda pa\u0161laik iestat\u012bta uz: %%LANGUAGE%%", - "langerror": "\/me Tava izv\u0113l\u0113t\u0101 valoda nav pieejama! Lai atrastu pieejam\u0101s valodas: %%LINK%%", - "langset": "\/me Valoda nomain\u012bta uz: %%LANGUAGE%%", - "retrievingdata": "Atg\u016bstu iepriek\u0161 saglab\u0101tos datus.", - "datarestored": "Iepriek\u0161\u0113jie saglab\u0101tie dati veiksm\u012bgi iel\u0101d\u0113ti.", - "greyuser": "Tikai uzraugi un augst\u0101ki var palaist botu.", - "bouncer": "Bots nevar p\u0101rvietot cilv\u0113kus, kad tas darbojas k\u0101 uzraugs.", - "online": "\/me %%BOTNAME%% v%%VERSION%% tie\u0161saist\u0113!", - "welcome": "\/me \u010cau %%NAME%%", - "welcomeback": "\/me Sveiciens ar atgriez\u0161anos %%NAME%%", - "songknown": "\/me @%%NAME%%, \u0161\u012b dziesma ir DJ v\u0113stur\u0113.", - "notavailable": "\/me @%%NAME%%, dziesma ko j\u016bs sp\u0113l\u0113j\u0101t nebija pieejama.", - "timelimit": "\/me @%%NAME%%, j\u016bsu dziesma ir gar\u0101ka nek\u0101 %%MAXLENGTH%% min\u016btes, jums ir nepiecie\u0161ama at\u013cauja, lai sp\u0113l\u0113tu gar\u0101kas dziesmas.", - "permissionownsong": "\/me :up: @%%NAME%% ir at\u013cauja, lai sp\u0113l\u0113tu vi\u0146\u0101 pa\u0161u produkciju!", - "isblacklisted": "\/me \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101! Izlai\u017eam...", - "isopen": "\/me Rulete tagad ir atv\u0113rta! Rakstiet !join lai piedal\u012btos!", - "winnerpicked": "\/me Uzvar\u0113t\u0101js ir izv\u0113l\u0113ts! @%%NAME%% p\u0101rmetam uz %%POSITION%%.", - "ball": "\/me %%NAME%%'s jaut\u0101jums bija: \"%%QUESTION%%\" un %%BOTNAME%%'a atbilde ir: \"%%RESPONSE%%\"", - "notghosting": "[%%NAME1%%] %%NAME2%% nespokoj\u0101s.", - "ghosting": "[%%NAME1%%] %%NAME2%% spokoj\u0101s, vai ar\u012b neatrodas \u0161eit.", - "alreadyadding": "\/me Lietot\u0101js tiek pievienots! Main\u012bt v\u0113lamo poz\u012bciju, uz %%POSITION%%.", - "adding": "\/me Pievieno @%%NAME%% iek\u0161 rindas. J\u016bsu vieta rind\u0101: %%POSITION%%.", - "usernotfound": "\/me Lietot\u0101js nav atrasts.", - "notdisconnected": "\/me @%%NAME%% nebija atvienojies, kam\u0113r biju \u0161eit.", - "noposition": "\/me Vieta rind\u0101 nav zin\u0101ma. Rinda j\u0101atjaunina lai atrastu lietot\u0101ja vietu rind\u0101.", - "toolongago": "\/me @%%NAME%%'s atvieno\u0161an\u0101s bija p\u0101rak ilga: %%TIME%%", - "valid": "\/me @%%NAME%%atvienoj\u0101s pirms: %%TIME%% un vieta rind\u0101 j\u0101b\u016bt: %%POSITION%%", - "warning1": "\/me @%%NAME%%, J\u016bs esat AFK jau %%TIME%%, l\u016bdzu atbildiet 2 min\u016b\u0161u laik\u0101, vai tiksiet no\u0146emts.", - "warning2": "\/me @%%NAME%%, J\u016bs tiksiet no\u0146emts d\u0113\u013c AFK, ja neatbild\u0113siet.", - "afkremove": "\/me @%%NAME%%. JTu tiki no\u0146emts no rindas, jo biji afk %%TIME%%. Tu biji kart\u0101 %%POSITION%%. N\u0101kamaj\u0101 reiz\u0113 \u010dato reizi %%MAXIMUMAFK%% min\u016btes, ja gribi palikt rind\u0101.", - "caps": "\/me @%%NAME%%, L\u016bdzu, neturi CAPSLOCK pogu.", - "askskip": "\/me @%%NAME%%, nel\u016bdz lai izlai\u017e.", - "spam": "\/me @%%NAME%%, l\u016bdzu, nespamo.", - "roomadvertising": "\/me @%%NAME%%, l\u016bdzu, neliec saites uz cit\u0101m kopien\u0101m.", - "adfly": "\/me @%%NAME%%,L\u016bdzu mainiet savu \"autowoot\" programmu. M\u0113s iesak\u0101m \u0161o. http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tegi: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Neder\u012bga eti\u0137ete, m\u0113\u0123iniet kaut ko citu. [Tegi: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Nejau\u0161s GIFs]", - "invalidgifrandom": "\/me [@%%NAME%%] Neder\u012bgs piepras\u012bjums, m\u0113\u0123ini v\u0113lreiz.", - "invalidtime": "\/me [@%%NAME%%] Noteikts nedr\u012bgs laiks.", - "nouserspecified": "\/me [@%%NAME%%] Lietot\u0101js nav preciz\u0113ts.", - "invaliduserspecified": "\/me [@%%NAME%%] Neder\u012bgs lietot\u0101js.", - "nolistspecified": "\/me [@%%NAME%%] Nenoteikts saraksts.", - "invalidlistspecified": "\/me [@%%NAME%%] Noteikts neder\u012bgs saraksts.", - "novaliduserspecified": "\/me [@%%NAME%%] Nav noteikts der\u012bgs lietot\u0101js.", - "nolimitspecified": "\/me [@%%NAME%%] Nav noteikts limits.", - "invalidlimitspecified": "\/me [@%%NAME%%] Neder\u012bgs limits.", - "invalidpositionspecified": "\/me [@%%NAME%%] Preciz\u0113ta neder\u012bga poz\u012bcija.", - "whois": "\/me [%%NAME1%%] Lietot\u0101js: %%NAME2%%, ID: %%ID%%, Ranks: %%RANK%%, Pievienojies: %%JOINED%%, L\u012bmenis: %%LEVEL%%, Valoda: %%LANGUAGE%%, Avatars: %%AVATAR%%, Status: %%STATUS%%, Profils: %%PROFILE%%", - "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% iesl\u0113gta.", - "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% izslegta", - "cmddeletion": "komandu dz\u0113\u0161ana.", - "afkremoval": "AFK izdz\u0113\u0161ana", - "afksremoved": "AFK izdz\u0113sts", - "afklimit": "AFK limits ", - "autodisable": "autoizsleg\u0161ana", - "autoskip": "autoizlaiz\u0161ana", - "newblacklisted": "\/me [@%%NAME%%] \u0160\u012b dziesma pieder %%BLACKLIST%% melnajam sarakstam [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", - "blinfo": "[@%%NAME%%]Meln\u0101 saraksta info - autors: %%AUTHOR%%, virsraksts: %%TITLE%%, mid: %%SONGID%%", - "blacklist": "melnais saraksts", - "cycleguard": "rin\u0137o\u0161anas sargs", - "timeguard": "Laikraugs", - "chatfilter": "\u010cata Filtrs", - "historyskip": "V\u0113stures izlaiz\u0161ana", - "lockdown": "Sl\u0113gts ", - "lockguard": "Sl\u0113gtraugs", - "usercommands": "lietot\u0101jkomandas", - "motd": "MotD ", - "welcomemsg": "Iel\u016bg\u0161anas v\u0113stule.", - "songstats": "dziesmas statistika", - "etarestriction": "eta robe\u017eas", - "voteskip": "izlaist ar balso\u0161anu", - "voteskiplimit": "\/me [@%%NAME%%] Izlaiz\u0161ana ar balso\u0161anu limits ir uzst\u0101d\u012bts uz %%LIMIT%% meh'iem", - "voteskipexceededlimit": "\/me @%%NAME%%, J\u016bsu dziesma ir p\u0101rsniegusi \"izlaist ar balso\u0161anu\" limitu (%%LIMIT%% meh'i).", - "voteskipinvalidlimit": "\/me [@%%NAME%%] Neder\u012bga \"Izlaiz\u0161ana ar balso\u0161anu\" m\u0113\u0123iniet v\u0113lreiz un nor\u0101diet der\u012bgu meh'u skaitu", - "voteskipsetlimit": "\/me [@%%NAME%%] \"Izlaizt ar balso\u0161anu\" limits ir iestat\u012bts uz %%LIMIT%%", - "activeusersintime": "\/me [@%%NAME%%] P\u0113dej\u0101s %%TIME%% min\u016bt\u0113s, \u0161it \u010datoja %%AMOUNT%% lietot\u0101ji.", - "maximumafktimeset": "\/me [@%%NAME%%] Maksim\u0101lais AFK ilgums iestat\u012bts uz %%TIME%% min\u016bt\u0113m.", - "afkstatusreset": "\/me [@%%NAME%%]Resetart\u0113ja afk statusu priek\u0161 @%%USERNAME%%.", - "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs jau %%TIME%%.", - "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs ilg\u0101k nek\u0101 %%BOTNAME%%'s ir online.", - "autowoot": "\/me M\u0113s iesak\u0101m \u0161o priek\u0161 \"autowoot\" : http:\/\/plugcubed.net\/", - "brandambassador": "\/me Mened\u017eeri ir plug.dj pal\u012bgi, kas pal\u012bdz lietot\u0101jiem atbild\u0113t uz jaut\u0101jumiem. K\u0101 ar\u012b vi\u0146i veido pas\u0101kumus, un pal\u012bdz. :) Vair\u0101k info: https:\/\/plug.dj\/ba", - "bouncerplusrank": "\/me [@%%NAME%%] Jums ir j\u0101b\u016bt mened\u017eerim, vai augst\u0101k lai pievienotu Uzraugus.", - "chatcleared": "\/me [@%%NAME%%] \u010cats izt\u012br\u012bts.", - "deletechat": "\/me [@%%NAME%%] Izt\u012brija \u010d\u0101tu no %%USERNAME%%.", - "commandslink": "\/me %%BOTNAME%% komandas: %%LINK%% ", - "eatcookie": "\/me \u0146amm\u0101 cepumu.", - "nousercookie": "\/em nevar\u0113ju atrast %%NAME%%, tap\u0113c \u0113d\u012b\u0161u cepumus es pats. :P", - "selfcookie": "\/me @%%NAME%%, tu esi cietsird\u012bgs! Dod pats sev cepumus, bah. Padalies ar citiem!", - "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%% ", - "cycleguardtime": "\/me [@%%NAME%%] Ap\u013co\u0161anas sargs ir uzst\u0101d\u012bts uz %%TIME%% Min\u016bti", - "dclookuprank": "\/me [@%%NAME%%] Tikai uzraugi, un augst\u0101ki var uzmekl\u0113t citus.", - "emojilist": "\/me Smaidi\u0146i: %%LINK%%", - "notinwaitlist": "\/me @%%NAME%%, J\u016bs n\u0113esat rind\u0101.", - "youarenext": "\/me @%%NAME%%, tu b\u016bsi DJ p\u0113c \u0161\u012bs dziesmas!", - "youaredj": "\/me @%%NAME%% J\u016bs esat DJ", - "eta": "\/me @%%NAME%%, j\u016bs esat %%POSITION%%. rind\u0101, un k\u0101psiet uz skatuves apm\u0113ram p\u0113c %%TIME%%.", - "facebook": "\/me Spie\u017eat pat\u012bk musu facebook'\u0101: %%LINK%%", - "starterhelp": "\/me \u0160\u012b bilde jums pal\u012bdz\u0113s start\u0113t iek\u0161 plug: %%LINK%%", - "roulettejoin": "\/me @%%NAME%% pievienoj\u0101s ruletei! (!leave ja tu p\u0101rdom\u0101ji)", - "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ir \u0161aj\u0101 kopien\u0101 jau %%TIME%%.", - "kickrank": "\/me [@%%NAME%%] J\u016bs nevarat izmest lietot\u0101jus kuriem ir vien\u0101ds, vai augst\u0101ks ranks k\u0101 Tev!", - "kick": "\/me [@%%NAME%%], @%%USERNAME%% J\u016bs tiekat izmests no kopienas uz %%TIME%% min\u016bt\u0113m.", - "kill": "\/me Izsl\u0113dz\u0101s...", - "logout": "\/me [@%%NAME%%] Atvieno %%BOTNAME%%", - "rouletteleave": "\/me @%%NAME%% pameta ruleti! ", - "songlink": "\/me [@%%NAME%%] Saite uz pa\u0161reiz\u0113jo dziesmu: %%LINK%% ", - "usedlockskip": "\/me [%%NAME%% aizliedz izlaist dziesmu]", - "usedskip": "\/me [%%NAME%% izlaida dziesmu]", - "skippos": "\/me [@%%NAME%%] DJ tiks p\u0101rmesti uz %%POSITION%% vietu rind\u0101, ja izlaid\u012bs dziesmu.", - "lockguardtime": "\/me [@%%NAME%%] Aizsl\u0113dza rindu uz %%TIME%% min\u016bti.", - "maxlengthtime": "\/me [@%%NAME%%] Maksim\u0101lais dziesmas garums ir iestat\u012bts uz %%TIME%% min\u016bt\u0113m.", - "motdset": "\/me MotD iestat\u012bts: %%MSG%%", - "motdintervalset": "\/me MotD interv\u0101ls iestat\u012bts: %%INTERVAL%%.", - "currentbotname": "\/me Bota v\u0101rds pa\u0161laik iestat\u012bts uz: %%BOTNAME%%", - "botnameset": "\/me Bota v\u0101rds iestat\u012bts uz: %%BOTNAME%%", - "addbotwaitlist": "\/me @%%NAME%%, l\u016bdzu, nem\u0113\u0123ini mani pievienot rindai.", - "move": "\/me [%%NAME%% p\u0101rvietoja.]", - "mutednotime": "\/me [@%%NAME%%] Apklusin\u0101ja @%%USERNAME%%.", - "mutedmaxtime": "\/me [@%%NAME%%] J\u016bs varat apklusin\u0101t tikai uz %%TIME%% min\u016bt\u0113m.", - "mutedtime": "\/me [@%%NAME%%] Apklusin\u0101ja @%%USERNAME%% uz %%TIME%% min\u016bt\u0113m.", - "unmuted": "\/me [@%%NAME%%] at\u013c\u0101va run\u0101t @%%USERNAME%%", - "muterank": "\/me [@%%NAME%%] J\u016bs n\u0113varat apklusin\u0101t lietot\u0101jus, kas ir t\u0101d\u0101 pa\u0161\u0101, vai augst\u0101k\u0101 rank\u0101 par tevi.", - "oplist": "\/me OP saraksts: %%LINK%% ", - "pong": "\/me Pong! ", - "reload": "\/me Dr\u012bz b\u016b\u0161u atpaka\u013c.", - "removenotinwl": "\/me [@%%NAME%%] @%%USERNAME%% nav rind\u0101.", - "roomrules": "\/me Kopienas noteikumi izlas\u0101mi \u0161eit: %%LINK%%", - "sessionstats": "\/me [@%%NAME%%]Woot'i:%%WOOTS%%, Meh'i: %%MEHS%%, Pa\u0146emti: %%GRABS%%.", - "forceskip": "\/me [%%NAME%% piespieda izlaist dziesmu]", - "madeby": "\/me \u0160o botu izveidoja %%NAME%%.", - "activefor": "Esmu bijis akt\u012bvs jau %%TIME%%.", - "swapinvalid": "\/me [@%%NAME%%] Nor\u0101d\u012bts neder\u012bgs lietot\u0101js. (V\u0101rdus bez atstarp\u0113m!!)", - "swapwlonly": "\/me [@%%NAME%%] L\u016bdzu, mainies tikai ar lietot\u0101jiem kas atrodas rind\u0101!", - "swapping": "\/me Mainu %%NAME1%% ar %%NAME2%%.", - "genres": "\/me Kopienas \u017eanrus vari atrast \u0161eit: %%LINK%%", - "notbanned": "\/me [@%%NAME%%] Lietot\u0101js nav nobanots.", - "unmutedeveryone": "\/me [@%%NAME%%] At\u013c\u0101va visiem run\u0101t,", - "unmuteeveryonerank": "\/me [@%%NAME%%] Tikai mened\u017eeris un augst\u0101k var at\u013caut visiem run\u0101t vienlaikus.", - "notmuted": "\/me [@%%NAME%%] \u0160is lietot\u0101js netika apklusin\u0101ts.", - "unmuterank": "\/me [@%%NAME%%] J\u016bs nevarat at\u013caut run\u0101t lietot\u0101jiem ar t\u0101du pa\u0161u, vai augst\u0101ku ranku k\u0101 tev.", - "commandscd": "\/me [@%%NAME%%] Komandu \"anti-spam\" laiks priek\u0161 lietot\u0101jiem ir iestat\u012bts uz %%TIME%% sekund\u0113m.", - "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Woot'i: %%WOOT%%, Meh'i: %%MEHS%%, Procentu\u0101li: %%RATIO%%.", - "website": "\/me M\u016bsu m\u0101jaslapa: %%LINK%%", - "youtube": "\/me [%%NAME%%] Abon\u0113jiet m\u016bs Youtub\u0113: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%\/M." -} \ No newline at end of file diff --git a/lang/pt.json b/lang/pt-BR.json similarity index 91% rename from lang/pt.json rename to lang/pt-BR.json index b996001f..5bf10258 100644 --- a/lang/pt.json +++ b/lang/pt-BR.json @@ -21,41 +21,40 @@ "deu-lhe um biscoito que foi esquecido na chuva... e est\u00e1 mofado.", "te trouxe biscoitos fresquinhos... parecem deliciosos!" ], - "balls": [ - "Sinais apontam que sim.", - "Sim.", - "Tente novamente mais tarde.", - "Sem d\u00favidas.", - "Minhas fontes dizem que n\u00e3o.", - "Ao meu ver, sim.", - "Pode contar com isso.", - "Concentre-se e pergunte novamente.", - "Acho que n\u00e3o.", - "Definitivamente.", - "Melhor n\u00e3o te falar...", - "\u00c9 duvidoso.", - "Sim. Definitivamente!", - "\u00c9 certo.", - "N\u00e3o posso prever agora.", - "Provavelmente.", - "Pergunte-me depois.", - "Minha resposta \u00e9 n\u00e3o.", - "Parece bom.", - "N\u00e3o conte com isso.", - "Sim, em seu devido tempo.", - "Minhas fontes dizem que n\u00e3o.", - "Definitivamente n\u00e3o.", - "Voc\u00ea vai ter que esperar...", - "Eu tenho minhas d\u00favidas.", - "Um tanto...", - "Parece bom para mim!", - "Quem sabe?", - "Claro!", - "Provavelmente.", - "Est\u00e1 brincando?", - "N\u00e3o aposte nisso.", - "Esque\u00e7a..." - ], + "balls": { + "0": "Sinais apontam que sim.", + "1": "Sim.", + "2": "Tente novamente mais tarde.", + "3": "Sem d\u00favidas.", + "4": "Minhas fontes dizem que n\u00e3o.", + "5": "Ao meu ver, sim.", + "6": "Pode contar com isso.", + "7": "Concentre-se e pergunte novamente.", + "8": "Acho que n\u00e3o.", + "9": "Definitivamente.", + "10": "Melhor n\u00e3o te falar...", + "11": "\u00c9 duvidoso.", + "12": "Sim. Definitivamente!", + "13": "\u00c9 certo.", + "14": "N\u00e3o posso prever agora.", + "15": "Provavelmente.", + "16": "Pergunte-me depois.", + "17": "Minha resposta \u00e9 n\u00e3o.", + "18": "Parece bom.", + "19": "N\u00e3o conte com isso.", + "20": "Sim, em seu devido tempo.", + "22": "Definitivamente n\u00e3o.", + "23": "Voc\u00ea vai ter que esperar...", + "24": "Eu tenho minhas d\u00favidas.", + "25": "Um tanto...", + "26": "Parece bom para mim!", + "27": "Quem sabe?", + "28": "Claro!", + "29": "Provavelmente.", + "30": "Est\u00e1 brincando?", + "31": "N\u00e3o aposte nisso.", + "32": "Esque\u00e7a..." + }, "nodatafound": "Dados anteriores n\u00e3o encontrados.", "currentlang": "\/me Idioma definido: %%LANGUAGE%%", "langerror": "\/me O idioma que voc\u00ea selecionou n\u00e3o est\u00e1 dispon\u00edvel. Por favor, visite %%LINK%% para encontrar uma lista de idiomas dispon\u00edveis.", diff --git a/lang/zh.json b/lang/zh-TW.json similarity index 91% rename from lang/zh.json rename to lang/zh-TW.json index 06bb7c2c..0f8dbd4e 100644 --- a/lang/zh.json +++ b/lang/zh-TW.json @@ -21,41 +21,40 @@ "\u7d66\u4f60\u4e00\u500b\u96e8\u5929\u88e1\u5269\u4e0b\u7684\u8001\u9905\u4e7e, \u5b83\u5df2\u7d93\u767c\u9709\u4e86.", "\u70d8\u7119\u4e86\u4e00\u500b\u65b0\u9bae\u9905\u4e7e\u7d66\u4f60, \u771f\u7684\u5f88\u82ac\u9999\u5594." ], - "balls": [ - "\u6a19\u8a8c\u9ede\u5230\u662f\u7684.", - "\u662f\u7684.", - "\u56de\u8986\u6726\u6727, \u8acb\u518d\u5617\u8a66.", - "\u7121\u6240\u8cea\u7591.", - "\u6211\u7684\u4f86\u6e90\u8aaa\u4e0d.", - "\u5c31\u5982\u6211\u6240\u770b\u898b\u7684, \u662f.", - "\u4f60\u6216\u6703\u4f9d\u8cf4\u8457\u5b83.", - "\u96c6\u4e2d\u7cbe\u795e\u8207\u518d\u6b21\u767c\u554f.", - "\u5916\u8868\u4e0d\u592a\u597d.", - "\u90a3\u662f\u65b7\u7136\u5de6\u53f3.", - "\u6700\u597d\u4e0d\u73fe\u5728\u544a\u8a34\u4f60.", - "\u975e\u5e38\u61f7\u7591.", - "\u662f - \u80af\u5b9a\u7684.", - "\u9019\u662f\u80af\u5b9a\u7684.", - "\u73fe\u5728\u7121\u6cd5\u9810\u6e2c.", - "\u5f88\u6709\u53ef\u80fd\u7684.", - "\u7a0d\u5f8c\u518d\u554f\u904e.", - "\u6211\u7684\u56de\u8986\u662f\u4e0d.", - "\u5916\u8868\u5f88\u597d.", - "\u4e0d\u8981\u6307\u671b\u5b83.", - "\u662f\u7684, \u5728\u9069\u7576\u7684\u6642\u5019.", - "\u6211\u7684\u4f86\u6e90\u8aaa\u4e0d.", - "\u975e\u4e5f.", - "\u4f60\u6703\u9700\u8981\u7b49\u5f85.", - "\u6211\u6709\u6211\u7684\u61f7\u7591.", - "\u5916\u8868\u666e\u901a.", - "\u5728\u6211\u662f\u89ba\u5f97\u597d\u770b\u7684!", - "\u8ab0\u77e5\u9053?", - "\u5f88\u597d\u770b!", - "\u4e5f\u8a31\u5427.", - "\u4f60\u5728\u958b\u73a9\u7b11\u55ce?", - "\u4e0d\u8981\u8ced\u4e86.", - "\u5fd8\u4e86\u5b83\u5427." - ], + "balls": { + "0": "\u6a19\u8a8c\u9ede\u5230\u662f\u7684.", + "1": "\u662f\u7684.", + "2": "\u56de\u8986\u6726\u6727, \u8acb\u518d\u5617\u8a66.", + "3": "\u7121\u6240\u8cea\u7591.", + "4": "\u6211\u7684\u4f86\u6e90\u8aaa\u4e0d.", + "5": "\u5c31\u5982\u6211\u6240\u770b\u898b\u7684, \u662f.", + "6": "\u4f60\u6216\u6703\u4f9d\u8cf4\u8457\u5b83.", + "7": "\u96c6\u4e2d\u7cbe\u795e\u8207\u518d\u6b21\u767c\u554f.", + "8": "\u5916\u8868\u4e0d\u592a\u597d.", + "9": "\u90a3\u662f\u65b7\u7136\u5de6\u53f3.", + "10": "\u6700\u597d\u4e0d\u73fe\u5728\u544a\u8a34\u4f60.", + "11": "\u975e\u5e38\u61f7\u7591.", + "12": "\u662f - \u80af\u5b9a\u7684.", + "13": "\u9019\u662f\u80af\u5b9a\u7684.", + "14": "\u73fe\u5728\u7121\u6cd5\u9810\u6e2c.", + "15": "\u5f88\u6709\u53ef\u80fd\u7684.", + "16": "\u7a0d\u5f8c\u518d\u554f\u904e.", + "17": "\u6211\u7684\u56de\u8986\u662f\u4e0d.", + "18": "\u5916\u8868\u5f88\u597d.", + "19": "\u4e0d\u8981\u6307\u671b\u5b83.", + "20": "\u662f\u7684, \u5728\u9069\u7576\u7684\u6642\u5019.", + "22": "\u975e\u4e5f.", + "23": "\u4f60\u6703\u9700\u8981\u7b49\u5f85.", + "24": "\u6211\u6709\u6211\u7684\u61f7\u7591.", + "25": "\u5916\u8868\u666e\u901a.", + "26": "\u5728\u6211\u662f\u89ba\u5f97\u597d\u770b\u7684!", + "27": "\u8ab0\u77e5\u9053?", + "28": "\u5f88\u597d\u770b!", + "29": "\u4e5f\u8a31\u5427.", + "30": "\u4f60\u5728\u958b\u73a9\u7b11\u55ce?", + "31": "\u4e0d\u8981\u8ced\u4e86.", + "32": "\u5fd8\u4e86\u5b83\u5427." + }, "nodatafound": "\u6c92\u6709\u767c\u73fe\u4e4b\u524d\u7684\u6578\u64da.", "currentlang": "\/me \u76ee\u524d\u8a9e\u8a00\u8a2d\u7f6e\u70ba: %%LANGUAGE%%", "langerror": "\/me \u4f60\u6240\u9078\u64c7\u7684\u8a9e\u8a00\u4e0d\u53ef\u7528. \u8acb\u8a2a\u554f %%LINK%% \u4ee5\u67e5\u8a62\u5217\u8868\u88e1\u53ef\u7528\u7684\u8a9e\u8a00.", From cd1e72df2539e263de0560ab6c57fe5542b28c04 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 5 Jul 2015 16:27:17 +0100 Subject: [PATCH 181/281] Updated language files Renamed/added some language files. --- lang/de.json | 206 ++++++++++++++++++++++++++++++++++ lang/es-ES.json | 206 ++++++++++++++++++++++++++++++++++ lang/langIndex.json | 8 +- lang/lv-LV.json | 206 ++++++++++++++++++++++++++++++++++ lang/lv.json | 207 ----------------------------------- lang/{pt.json => pt-BR.json} | 69 ++++++------ lang/{zh.json => zh-TW.json} | 69 ++++++------ 7 files changed, 691 insertions(+), 280 deletions(-) create mode 100644 lang/de.json create mode 100644 lang/es-ES.json create mode 100644 lang/lv-LV.json delete mode 100644 lang/lv.json rename lang/{pt.json => pt-BR.json} (91%) rename lang/{zh.json => zh-TW.json} (91%) diff --git a/lang/de.json b/lang/de.json new file mode 100644 index 00000000..73887998 --- /dev/null +++ b/lang/de.json @@ -0,0 +1,206 @@ +{ + "cookies": [ + "hat dir einen leckeren Schokoladen Keks gegeben!", + "hat dir einen selbstgemachten Haferfloken Keks gegeben!", + "hat dir einen schmucklosen, dreckigen und alten Keks gegeben. Es war der letzte in seinem Rucksack. Toll.", + "hat dir einen Zucker Cookie gegeben. Was, kein Zuckerguss und Streuseln? 0\/10 w\u00fcrden es nicht essen.", + "gibt dir einen Schokoladen Keks. Oh Warte, da sind Rosinen drine. Bleck!", + "gibt dir einen riesigen Keks.", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Warum arbeitest du momentan an keinen Projekten?\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Mach jemanden Besonderes heute ein Kompliment!\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Riskiere etwas!\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Geh nach drau\u00dfen!\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Vergiss nicht, dein Gem\u00fcse zu essen!\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Do you even lift\"?", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"m808 pls!\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Wenn du deine H\u00fcften bewegest, bekommst du alle Frauen.\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Ich liebe dich!\"", + "gibt dir einen goldenen Keks. Du kannst ihn nicht essen, da er aus Gold ist. Verdammt!", + "gibt dir einen Oreo Keks mit einem Glas Milch!", + "gibt dir einen Regenbogen Keks gemacht mit Liebe :heart:", + "gibt dir einen alten Keks, der im Regen gelassen wurde. Er ist schimmlig.", + "backt dir einen frischen Keks, er schmeckt wunderbar." + ], + "balls": { + "0": "Die Zeichen deuten auf Ja.", + "1": "Ja.", + "2": "Versuch es sp\u00e4ter nochmal.", + "3": "Ohne jeden Zweifel.", + "4": "Meine Quellen sagen Nein.", + "5": "So wie ich das sehe, ja.", + "6": "Du kannst dich darauf verlassen.", + "7": "Konzentriere dich und frage erneut.", + "8": "Sieht nicht so gut aus.", + "9": "Es ist umstritten.", + "10": "Ich sage dir lieber nicht die Antwort.", + "11": "Sehr Zweifelhaft.", + "12": "Ja, definitiv.", + "13": "Es ist sicher.", + "14": "Kann ich nicht vorhersagen.", + "15": "sehr wahrscheinlich", + "16": "Frag sp\u00e4ter erneut", + "17": "Meine Antwort ist Nein.", + "18": "Sieht gut aus.", + "19": "Z\u00e4hl nicht darauf.", + "20": "Ja, in geraumer Zeit.", + "22": "Definitiv nicht.", + "23": "Du wirst warten m\u00fcssen.", + "24": "Ich habe meine Zweifel.", + "25": "Sieht so und so aus.", + "26": "Sieht gut aus f\u00fcr mich!", + "27": "Wer wei\u00df?", + "28": "Sieht gut aus!", + "29": "Wahrscheinlich.", + "30": "Willst du mich verarschen?", + "31": "Du kannst nicht darauf z\u00e4hlen", + "32": "Vergiss es." + }, + "nodatafound": "Keine vorhergehenden Daten gefunden.", + "currentlang": "\/me Zurzeit eingestellte Sprache: %%LANGUAGE%%", + "langerror": "\/me Die ausgew\u00e4hlte Sprache ist nicht verf\u00fcgbar. Bitte besuche %%LINK%%, um eine Liste der verf\u00fcgbaren Sprachen zu finden.", + "langset": "\/me Nun eingestellte Sprache: %%LANGUAGE%%", + "retrievingdata": "Ruft zuvor gespeicherte Daten ab.", + "datarestored": "Zuvor gespeicherte Daten erfolgreich abgerufen.", + "greyuser": "Nur Bouncer und aufw\u00e4rts k\u00f6nnen den Bot betreiben.", + "bouncer": "Der Bot kann keine Leute in der Warteliste verschieben, wenn er von einem Bouncer betrieben wird.", + "online": "\/me %%BOTNAME%% v%%VERSION%% online!", + "welcome": "\/me Willkommen %%NAME%%", + "welcomeback": "\/me Willkommen zur\u00fcck, %%NAME%%", + "songknown": "\/me @%%NAME%%, dieser Song ist im Verlauf.", + "notavailable": "\/me @%%NAME%% dieser Song war nicht verf\u00fcgbar.", + "timelimit": "\/me @%%NAME%%, dein Song \u00fcberschreitet die Maximall\u00e4nge von %%MAXLENGTH%% Minuten. Du ben\u00f6tigst eine Erlaubnis, um l\u00e4ngere Songs spielen zu k\u00f6nnen.", + "permissionownsong": "\/me :up: @%%NAME%% hat die Erlaubnis, seine eigene Produktion zu spielen.", + "isblacklisted": "\/me Dieser Song steht auf der %%BLACKLIST%% Blacklist! \u00dcberspringe...", + "isopen": "\/me Das Roulette ist nun ge\u00f6ffnet! Schreibe !join, um teilzunehmen.", + "winnerpicked": "\/me Ein Gewinner wurde gefunden! @%%NAME%% auf die Position %%POSITION%%.", + "ball": "\/me %%NAME%%s Frage war: \u201e%%QUESTION%%\u201c und %%BOTNAME%%s Antwort ist: \u201e%%RESPONSE%%\u201c", + "notghosting": "[%%NAME1%%] %%NAME2%% ghostet nicht.", + "ghosting": "[%%NAME1%%] %%NAME2%% ghostet entweder oder ist nicht hier.", + "alreadyadding": "\/me Benutzer wird bereits hinzugef\u00fcgt! Die gew\u00fcnschte Position wurde zu %%POSITION%% ge\u00e4ndert.", + "adding": "\/me @%%NAME%% wurde der Warteschlange hinzugef\u00fcgt. Derzeitige Warteschlange: %%POSITION%%.", + "usernotfound": "\/me Benutzer nicht gefunden.", + "notdisconnected": "\/me @%%NAME%%s Verbindung wurde in meiner Zeit hier nicht getrennt.", + "noposition": "\/me Letzte Position unbekannt. Die Warteschlange muss sich mindestens einmal aktualisieren, um die letzte Position eines Benutzers zu registrieren.", + "toolongago": "\/me @%%NAME%%s letzter Verbindungsabbruch ist zu lange her: %%TIME%%.", + "valid": "\/me @%%NAME%%s Verbindung brach vor %%TIME%% ab und sollte an der Position %%POSITION%% stehen.", + "warning1": "\/me @%%NAME%%, du warst f\u00fcr %%TIME%% AFK. Bitte antworte in den n\u00e4chsten 2 Minuten oder du wirst entfernt.", + "warning2": "\/me @%%NAME%%, du wirst bald aufgrund von AFK entfernt, falls du nicht antwortest.", + "afkremove": "\/me @%%NAME%%, du wurdest entfernt, da du f\u00fcr %%TIME%% AFK warst. Du warst auf Position %%POSITION%%. Chatte mindestens einmal alle %%MAXIMUMAFK%% Minuten, wenn du einen Song spielen m\u00f6chtest.", + "caps": "\/me @%%NAME%%, l\u00f6se bitte deine Feststelltaste los.", + "askskip": "\/me @%%NAME%%, verlange kein \u00dcberspringen.", + "spam": "\/me @%%NAME%%, spamme bitte nicht.", + "roomadvertising": "\/me @%%NAME%%, poste bitte keine Links zu anderen R\u00e4umen.", + "adfly": "\/me @%%NAME%%, bitte \u00e4ndere dein Autowootprogramm. Wir empfehlen PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Schlagw\u00f6rter: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Ung\u00fcltige Schlagw\u00f6rter. Versuche etwas Anderes. [Schlagw\u00f6rter: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Zuf\u00e4llige GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] Ung\u00fcltige Anfrage. Versuche es erneut.", + "invalidtime": "\/me [@%%NAME%%] Ung\u00fcltig festgelegte Zeit.", + "nouserspecified": "\/me [@%%NAME%%] Kein Benutzer festgelegt.", + "invaliduserspecified": "\/me [@%%NAME%%] Ung\u00fcltiger Benutzer festgelegt.", + "nolistspecified": "\/me [@%%NAME%%] Keine Liste festgelegt.", + "invalidlistspecified": "\/me [@%%NAME%%] Ung\u00fcltige Liste festgelegt.", + "novaliduserspecified": "\/me [@%%NAME%%] Kein g\u00fcltiger Benutzer festgelegt.", + "nolimitspecified": "\/me [@%%NAME%%] Kein Limit festgelegt.", + "invalidlimitspecified": "\/me [@%%NAME%%] Ung\u00fcltiges Limit.", + "invalidpositionspecified": "\/me [@%%NAME%%] Ung\u00fcltige Position festgelegt.", + "whois": "\/me [%%NAME1%%] Benutzername: %%NAME2%%, ID: %%ID%%, Rang: %%RANK%%, Beigetreten: %%JOINED%%, Level: %%LEVEL%%, Sprache: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% freigeschaltet.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% deaktiviert.", + "cmddeletion": "Befehll\u00f6schung", + "afkremoval": "AFK Entfernung", + "afksremoved": "AFK ist entfernt", + "afklimit": "AFK Limit", + "autodisable": "Autodeaktivierung", + "autoskip": "Autoskip", + "newblacklisted": "\/me [@%%NAME%%] Dieser Song ist auf der %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Blacklist Info - author: %%AUTHOR%%, Titel: %%TITLE%%, mid: %%SONGID%%", + "blacklist": "blacklist", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "chatfilter", + "historyskip": "historyskip", + "lockdown": "lockdown", + "lockguard": "lockguard", + "usercommands": "usercommands", + "motd": "MotD", + "welcomemsg": "Willkommen Nachricht", + "songstats": "Song Statistik", + "etarestriction": "eta restriction", + "voteskip": "voteskip", + "voteskiplimit": "\/me [@%%NAME%%] Voteskip limit liegt momentan bei %%LIMIT%% mehs.", + "voteskipexceededlimit": "\/me @%%NAME%%, Der Song hat das Voteskip limit erreicht (%%LIMIT%% mehs).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Ung\u00fcltiges Voteskip Limit, bitte gib eine Nummer ein, um dies einzustellen.", + "voteskipsetlimit": "\/me [@%%NAME%%] Voteskip limit ist eingestellt auf %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] %%AMOUNT%% Benutzer haben in den letzten %%TIME%% Minuten gechattet.", + "maximumafktimeset": "\/me [@%%NAME%%] Die maximal erlaubte AFK Zeit liebt bei %%TIME%% Minuten.", + "afkstatusreset": "\/me [@%%NAME%%] Resette den AFK status von @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ist inactiv seid %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% war l\u00e4nger inactiv als %%BOTNAME%%'s online ist.", + "autowoot": "\/me Wir empfehlen PlugCubed f\u00fcr autowooting: http:\/\/plugcubed.net\/", + "brandambassador": "\/me A Brand Ambassador ist die Stimme der plug.dj users. Sie promoten und unterst\u00fctzen die Community und teilen die Plug.Dj Nachricht \u00fcber die ganze Welt.https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Du musst ein Manager sein oder die F\u00e4higkeit haben, Bouncer+ zu aktivieren.", + "chatcleared": "\/me [@%%NAME%%] hat den Chat gereinigt.", + "deletechat": "\/me [@%%NAME%%] hat alle Nachrichten von %%USERNAME%% entfernt.", + "commandslink": "\/me %%BOTNAME%% Commands: %%LINK%%", + "eatcookie": "\/me isst einen Keks.", + "nousercookie": "\/em sieht %%NAME%% nicht im Raum und isst den Keks selber.", + "selfcookie": "\/me @%%NAME%%, du bist heute nicht so gut drauf, oder? Gibt sich selbst einfach einen Keks. Teile es lieber mit anderen Menschen!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] Der cycleguard ist eingestellt auf %%TIME%% Minuten.", + "dclookuprank": "\/me [@%%NAME%%] Nur Bouncer und h\u00f6her k\u00f6nnen ein lookup f\u00fcr andere machen.", + "emojilist": "\/me Emoji list: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, du bist nicht auf der Warteliste.", + "youarenext": "\/me @%%NAME%%, du bist dran nach diesem Song.", + "youaredj": "\/me @%%NAME%%, Du djst gerade.", + "eta": "\/me @%%NAME%%, du bist in der Position %%POSITION%% in der Warteliste und wirst in ungef\u00e4hr %%TIME%% Minuten dran sein.", + "facebook": "\/me Like uns auf facebook: %%LINK%%", + "starterhelp": "\/me Dieses Bild hilft dir, auf Plug.Dj klar zu kommen: %%LINK%%", + "roulettejoin": "@%%NAME%% ist dem Roulette beigetreten (F\u00fcr den Befehl !leave aus, wenn du es verlassen willst).", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ist schon im Chatraum seid %%TIME%% Minuten.", + "kickrank": "\/me [@%%NAME%%] Du kannst keine Benutzer mit einem Rank, der gleich oder h\u00f6her als deiner ist!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% du wurdest von der Community verbannt f\u00fcr %%TIME%% Minuten.", + "kill": "\/me Fahre herunter.", + "logout": "\/me [@%%NAME%%] Loge mich aus %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% hat das Roulette verlassen!", + "songlink": "\/me [@%%NAME%%] Link zum momentanen song: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% hat lockskip benutzt.", + "usedskip": "\/me [%%NAME%% hat skip benutzt.", + "skippos": "\/me [@%%NAME%%] Djs werden von nun auf Position %%POSITION%% verschoben, wenn sie \u00fcbersprungen wurden.", + "lockguardtime": "\/me [@%%NAME%%] der lockguard ist gesetzt auf %%TIME%% Minuten.", + "maxlengthtime": "\/me [@%%NAME%%] Die maximal erlaubte Song-L\u00e4nge ist gesetzt auf %%TIME%% Minuten.", + "motdset": "\/me MotD gesetzt auf: %%MSG%%", + "motdintervalset": "\/me MotD interval gesetzt auf: %%INTERVAL%%.", + "currentbotname": "\/me Der Bot hei\u00dft momentan: %%BOTNAME%%", + "botnameset": "\/me Der Bot hei\u00dft nun: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, bitte versuch nicht, mich auf die Warteliste zu setzen", + "move": "\/me [%%NAME%% hat move benutzt]", + "mutednotime": "\/me [@%%NAME%%] Muted @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Du kannst Benutzer maximal f\u00fcr %%TIME%% Minuten stumm schalten.", + "mutedtime": "\/me [@%%NAME%%] Muted @%%USERNAME%% f\u00fcr %%TIME%% Minuten.", + "unmuted": "\/me [@%%NAME%%] Unmuted @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] Du kannst Benutzer mit einem Rank, welcher gleich oder h\u00f6her ist, muten.", + "oplist": "\/me OP Liste: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Bin gleich zur\u00fcck.", + "removenotinwl": "\/me [@%%NAME%%] Benutzer @%%USERNAME%% ist nicht auf der Warteliste.", + "roomrules": "\/me Du kannst die Regeln f\u00fcr den Chatroom hier finden: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", + "forceskip": "\/me [%%NAME%% hatforceskip benutzt]", + "madeby": "\/me Der Bot wurde entwickelt von %%NAME%%.", + "activefor": "Ich bin inaktiv seid %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Ung\u00fcltiger Benutzer festgelegt. (Keine Namen mit einem Leerzeichen!)", + "swapwlonly": "\/me [@%%NAME%%] Bitte vertausch nur Benutzer, die in der Warteliste sind", + "swapping": "\/me Vertausche %%NAME1%% mit %%NAME2%%.", + "genres": "\/me Du kannst die Chatroom Genres hier finden: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] Der Benutzer ist nicht gesperrt.", + "unmutedeveryone": "\/me [@%%NAME%%] Keiner ist jetzt mehr stumm geschaltet.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Nur Manager und h\u00f6her k\u00f6nnen alle Leute gleichzeitig unmuten.", + "notmuted": "\/me [@%%NAME%%] Dieser Benutzer ist nicht stumm geschaltet!", + "unmuterank": "\/me [@%%NAME%%] Du kannst Personen mit einem Rank, der gleich oder h\u00f6her ist als deiner, nicht unmuten.", + "commandscd": "\/me [@%%NAME%%] Der cooldown f\u00fcr Commands ist nun festgelegt auf %%TIME%% seconds.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w\/m): %%RATIO%%.", + "website": "\/me Bitte besuch unsere Website: %%LINK%%", + "youtube": "\/me [%%NAME%%] Subscribe unseren Youtube Channel! %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file diff --git a/lang/es-ES.json b/lang/es-ES.json new file mode 100644 index 00000000..4fc14796 --- /dev/null +++ b/lang/es-ES.json @@ -0,0 +1,206 @@ +{ + "cookies": [ + "te ha dado una galleta con chispas de chocolate!", + "te ha dado una galleta de avena hecha en casa!", + "te ha dado una galleta vieja y seca. Era la ultima que quedaba en la bolsa. Asqueroso.", + "te da una galleta de azucar. \u00bfQue, sin crema ni chispas? 0\/10 nunca la tocare.", + "te da una galleta de chocolate. Espera, son pasa. Que asco!", + "te da una galleta enorme. Si la tocas te da mas galletas. Raro.", + "te da una galleta de la fortuna. Se puede leer \"\u00bfPor que no estas trabajando en ningun proyecto?\"", + "te da una galleta de la fortuna. Se puede leer \"Dale a ese alguien especial un cumplido\"", + "te da una galleta de la fortuna. Se puede leer \"\u00a1Arriesgate!\"", + "te da una galleta de la fortuna. Se puede leer \"Ve afuera.\"", + "te da una galleta de la fortuna. Se puede leer \"\u00a1No te olvides de comer tus vegetales!\"", + "te da una galleta de la fortuna. Se puede leer \"\u00bfSiquiera haces pesas?\"", + "te da una galleta de la fortuna. Se puede leer \"m808 pls\"", + "te da una galleta de la fortuna. Se puede leer \"Si mueves tus caderas, tendras a todas las chicas.\"", + "te da una galleta de la fortuna. Se puede leer \"Te amo.\"", + "te da una Galleta Dorada. No la puedes comer porque esta hecha de oro. Rayos.", + "te da una galleta Oreo con un vaso de leche!", + "te da una galleta arcoiris hecha con amor :heart:", + "te da una galleta vieja que se dejo en la lluvia, esta mohosa.", + "te cocina galletas frescas, huelen muy bien." + ], + "balls": { + "0": "Los signos apuntan a que s\u00ed.", + "1": "S\u00ed.", + "2": "Respuesta vaga, vuelve a intentarlo.", + "3": "Sin lugar a duda.", + "4": "Mis fuentes dicen que no.", + "5": "Como yo lo veo, si.", + "6": "Puedes confiar en ello.", + "7": "Concentrate y pregunta de nuevo.", + "8": "Las perspectivas no son buenas.", + "9": "Es decididamente as\u00ed.", + "10": "Mejor no decirte ahora.", + "11": "Muy dudoso.", + "12": "Si - definitivamente.", + "13": "Es cierto.", + "14": "No lo puedo predecir ahora.", + "15": "Lo m\u00e1s probable.", + "16": "Pregunta de nuevo mas tarde.", + "17": "Mi respuesta es no.", + "18": "Buen pron\u00f3stico.", + "19": "No cuentes con ello.", + "20": "Si, en su debido tiempo.", + "22": "Definitivamente no.", + "23": "Tendras que esperar.", + "24": "Tengo mis dudas.", + "25": "Se ve normal.", + "26": "\u00a1Se ve muy bien para mi!", + "27": "\u00bfQui\u00e9n sabe?", + "28": "\u00a1Pinta bien!", + "29": "Probablemente.", + "30": "\u00bfEstas bromeando?", + "31": "No apuestes en ello.", + "32": "Olvidalo." + }, + "nodatafound": "No se ha encontrado datos anteriores.", + "currentlang": "\/me Idioma actualmente puesto en %%LANGUAGE%%", + "langerror": "\/me El lenguaje que seleccionaste no esta disponible. Por favor visita %%LINK%% para encontrar la lista de lenguajes disponibles.", + "langset": "\/me El lenguaje se ha cambiado a: %%LANGUAGE%%", + "retrievingdata": "Recuperando datos anteriormente guardados.", + "datarestored": "Datos anteriormente guardados fueron recuperados.", + "greyuser": "Solo guardaespaldas y mayores rangos pueden correr un bot.", + "bouncer": "El bot no puede mover personas cuando es ejecutado por un guardaespaldas.", + "online": "\/me %%BOTNAME%% v%%VERSION%% en linea!", + "welcome": "\/me Bienvenido %%NAME%%", + "welcomeback": "\/me Bienvenido de vuelta, %%NAME%%", + "songknown": "\/me @%%NAME%%, esta cancion esta en el historial de Dj.", + "notavailable": "\/me @%%NAME%%, la cancion que tocaste no estaba disponible.", + "timelimit": "\/me @%%NAME%%, tu cancion es mas larga que %%MAXLENGTH%% minutos, necesitas permisos para tocar canciones mas largas.", + "permissionownsong": "\/me :up: @%%NAME%% tiene permisos para tocar su propia produccion!", + "isblacklisted": "\/me Esta cancion esta en %%BLACKLIST%% lista negra! Saltando...", + "isopen": "\/me \u00a1La ruleta esta abierta! \u00a1Escribe !join para participar! (Un juego en el que un participante al azar es movido a una posicion cualquiera en la lista de espera).", + "winnerpicked": "\/me \u00a1Un ganador a sido escogido! @%%NAME%% movido a %%POSITION%%", + "ball": "\/me %%NAME%% su pregunta fue: \"%%QUESTION%%\" y la respues de %%BOTNAME%% es: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% no esta ghosteando.", + "ghosting": "[%%NAME1%%] %%NAME2%% o esta ghosteando o no esta aqui.", + "alreadyadding": "\/me El usuario esta siendo a\u00f1adido! Cambiando la posicion deseada a %%POSITION%%.", + "adding": "\/me @%%NAME%% agregado a la cola. Cola actual: %%POSITION%%.", + "usernotfound": "\/me Usuario no encontrado.", + "notdisconnected": "\/me @%%NAME%% no se desconecto mientras estuve aqui.", + "noposition": "\/me No se conoce la ultima posicion. La lista de espera necesita actualizarte por lo menos una vez para registrar la ultima posicion del usuario.", + "toolongago": "\/me la ultima desconexion de @%%NAME%% fue hace mucho tiempo: %%TIME%%.", + "valid": "\/me @%%NAME%% se desconecto hace %%TIME%% y deberia estar en la posicion %%POSITION%%.", + "warning1": "\/me @%%NAME%%, haz estado afk por %%TIME%%, por favor responde en 2 minutos o seras removido.", + "warning2": "\/me @%%NAME%%, seras removido dentro de poco por estar afk si no respondes.", + "afkremove": "\/me @%%NAME%%, haz sido removido por estar afk por %%TIME%%. Estabas en la posicion %%POSITION%%. Chatea por lo menos una vez cada %%MAXIMUMAFK%% minutos si quieres tocar una cancion.", + "caps": "\/me @%%NAME%%, no chatees en mayusculas por favor.", + "askskip": "\/me @%%NAME%%, no pidas skips.", + "spam": "\/me @%%NAME%%, por favor no spamees.", + "roomadvertising": "\/me @%%NAME%%, no postees links hacia otras salas por favor.", + "adfly": "\/me @%%NAME%%, por favor cambia tu programa de \"autogenial\". Te sugerimos PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Etiquetas invalidas, por favor prueba algo diferente. [Etiquetas: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Random GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] Solicitud no v\u00e1lida, vuelva a intentarlo.", + "invalidtime": "\/me [@%%NAME%%] Tiempo especificado invalido.", + "nouserspecified": "\/me [@%%NAME%%] Usuario no especificado.", + "invaliduserspecified": "\/me [@%%NAME%%] Usuario especificado invalido.", + "nolistspecified": "\/me [@%%NAME%%] Ninguna lista especificada.", + "invalidlistspecified": "\/me [@%%NAME%%] Lista especificada invalida.", + "novaliduserspecified": "\/me [@%%NAME%%] Ningun usuario valido especificado.", + "nolimitspecified": "\/me [@%%NAME%%] Ningun limite especificado.", + "invalidlimitspecified": "\/me [@%%NAME%%] Limite invalido.", + "invalidpositionspecified": "\/me [@%%NAME%%] Posicion especificada invalida.", + "whois": "\/me [%%NAME1%%] Usuario: %%NAME2%%, ID: %%ID%%, Rango: %%RANK%%, Entro: %%JOINED%%, Nivel: %%LEVEL%%, Lenguaje: %%LANGUAGE%%, Avatar: %%AVATAR%%, Perfil: %%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% activado.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% desactivado.", + "cmddeletion": "eliminaci\u00f3n de comandos", + "afkremoval": "Removedor de AFK", + "afksremoved": "AFKs removidos", + "afklimit": "Limite AFK", + "autodisable": "Autodesactivar", + "autoskip": "Autoskip", + "newblacklisted": "\/me [@%%NAME%%] Esta cancion esta en %%BLACKLIST%% lista negra! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Informacion de la lista negra - autor: %%AUTHOR%%, titulo: %%TITLE%%, Id: %%SONGID%%", + "blacklist": "lista negra", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "filtro de chat", + "historyskip": "historyskip", + "lockdown": "lockdown", + "lockguard": "lockguard", + "usercommands": "usercommands", + "motd": "MotD", + "welcomemsg": "mensaje de bienvenida", + "songstats": "estad\u00edsticas de canciones", + "etarestriction": "restriccion eta", + "voteskip": "voteskip", + "voteskiplimit": "\/me [@%%NAME%%] El limite de voteskip esta actualmente en %%LIMIT%% aburridos.", + "voteskipexceededlimit": "\/me @%%NAME%%, tu cancion excede el limite de voteskip (%%LIMIT%% aburridos).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Limite de voteskip invalido, prueba de nuevo usando un numero de referencia para el numero de aburridos.", + "voteskipsetlimit": "\/me [@%%NAME%%] Limite del voteskip puesto en %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] Han habido %%AMOUNT%%usuarios chateando en los ultimos %%TIME%% minutos.", + "maximumafktimeset": "\/me [@%%NAME%%] Duracion maxima de afk puesta en %%TIME%% minutos.", + "afkstatusreset": "\/me [@%%NAME%%] Estado afk reseteado @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ha estado inactivo por %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% ha estado inactivo mas tiempo de lo que %%BOTNAME%% ha estado online.", + "autowoot": "\/me Te recomendamos PlugCubed para el autogenial: http:\/\/plugcubed.net\/", + "brandambassador": "\/me Un Embajador de la Marca es la voz de los usuarios de plug.dj. Ellos promueven eventos, unen a la comunidad y comparten la pagina por todo el mundo. Si necesitas mas informacion: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Necesitas ser manager o mas para habilitar Bouncer+.", + "chatcleared": "\/me [@%%NAME%%] Limpio el chat.", + "deletechat": "\/me [@%%NAME%%] Limpio el chat de %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% comandos: %%LINK%%", + "eatcookie": "\/me me como una galleta.", + "nousercookie": "\/me no veo a %%NAME%% en la sala y me como la galleta.", + "selfcookie": "me @%%NAME%%, eres un poco codicioso, no? Dandote galletas a ti mismo, bah. \u00a1Comparte con otras personas!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] El cycleguard esta puesto en %%TIME%% minuto(s).", + "dclookuprank": "\/me [@%%NAME%%] Solo guardaespaldas y para arriba puedes buscar a otros.", + "emojilist": "\/me Lista de Emojis: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, no estas en la lista de espera.", + "youarenext": "\/me @%%NAME%%, vas a estar de Dj despues de esta cancion.", + "youaredj": "\/me @%%NAME%%, estas de Dj actualmente.", + "eta": "\/me @%%NAME%%, eres la posicion %%POSITION%% en la lista de espera y llegaras a ser Dj en aproximadamente %%TIME%%.", + "facebook": "\/me Danos like en facebook: %%LINK%%", + "starterhelp": "\/me Esta imagen te ayudara a empezar en plug.dj: %%LINK%%", + "roulettejoin": "@%%NAME%% entro en la ruleta! (!leave si lo lamentas)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ha estado en la sala por %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] no puedes kickear usuarios con rangos iguales o mayores a los tuyos.", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% seras kickeado de la comunidad por %%TIME%% minutos.", + "kill": "\/me Apagando.", + "logout": "\/me [@%%NAME%%] Cerrando sesion %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% salio de la ruleta!", + "songlink": "\/me [@%%NAME%%] Link de la cancion actual: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% uso lockskip]", + "usedskip": "\/me [%%NAME%% uso skip]", + "skippos": "\/me [@%%NAME%%] Djs ahora seran movidos a la posicion %%POSITION%% cuando skip.", + "lockguardtime": "\/me [@%%NAME%%] El lockguard esta puesto en %%TIME%% minuto(s).", + "maxlengthtime": "\/me [@%%NAME%%] La duracion maxima de una cancion esta en %%TIME%% minutos.", + "motdset": "\/me MotD puesto a: %%MSG%%", + "motdintervalset": "\/me Intervalo del MotD puesto en %%INTERVAL%%.", + "currentbotname": "\/me El nombre actual del bot es: %%BOTNAME%%", + "botnameset": "\/me El nombre del bot se ha cambiado a: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, no me trates de agregar a la lista de espera, por favor.", + "move": "\/me [%%NAME%% uso mover]", + "mutednotime": "\/me [@%%NAME%%] Muteo @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Tu solo puedes silenciar por un maximo de %%TIME%% minutos.", + "mutedtime": "\/me [@%%NAME%%] Silencio @%%USERNAME%% por %%TIME%% minutos.", + "unmuted": "\/me [@%%NAME%%] desmuteo @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%]Tu no puedes mutear personas con el mismo rango o mayor que el tuyo.", + "oplist": "\/me Lista OP: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Vuelvo enseguida.", + "removenotinwl": "\/me [@%%NAME%%] Usuario especificado @%%USERNAME%% no esta en la lista de espera.", + "roomrules": "\/me Por favor lee las reglas de la sala aqui: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Geniales totales: %%WOOTS%%, aburridos totales: %%MEHS%%, agarradas: %%GRABS%%.", + "forceskip": "\/me [%%NAME%% uso forceskip]", + "madeby": "\/me Este bot fue hecho por %%NAME%%.", + "activefor": "He estado activo por %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Usuario invalido especificado. (\u00a1Sin nombres con espacios!)", + "swapwlonly": "\/me [@%%NAME%%] \u00a1Por favor solo cambia usuarios que estan en la lista de espera!", + "swapping": "\/me Cambiando %%NAME1%% con %%NAME2%%.", + "genres": "\/me Encuentra los generos que se tocan en esta sala: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] El usuario no fue baneado.", + "unmutedeveryone": "\/me [@%%NAME%%] Todos fueron desmuteados.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Solo managers y mas alto pueden desmutear a todos de una vez.", + "notmuted": "\/me [@%%NAME%%] ese usuario no estaba silenciado.", + "unmuterank": "\/me [@%%NAME%%] No puedes desmutear personas con el mismo o mayor rango que tu.", + "commandscd": "\/me [@%%NAME%%] El tiempo de reutilizaci\u00f3n de los comandos para los usuarios esta puesto ahora en %%TIME%% segundos.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ geniales: %%WOOT%%, aburridos: %%MEHS%%, ratio (g\/a): %%RATIO%%.", + "website": "\/me Por favor visita nuestra pagina web: %%LINK%%", + "youtube": "\/me [%%NAME%%] Suscribete a nosotros en youtube: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file diff --git a/lang/langIndex.json b/lang/langIndex.json index 91985061..94586f54 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,10 +1,12 @@ { "english": "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", - "portuguese": "https://rawgit.com/Yemasthui/basicBot/master/lang/pt.json", + "portuguese": "https://rawgit.com/Yemasthui/basicBot/master/lang/pt-BR.json", "french": "https://rawgit.com/Yemasthui/basicBot/master/lang/fr.json", "turkish": "https://rawgit.com/Yemasthui/basicBot/master/lang/tr.json", "serbian": "https://rawgit.com/Yemasthui/basicBot/master/lang/sr.json", - "chinese": "https://rawgit.com/Yemasthui/basicBot/master/lang/zh.json", + "chinese": "https://rawgit.com/Yemasthui/basicBot/master/lang/zh-TW.json", "dutch": "https://rawgit.com/Yemasthui/basicBot/master/lang/nl.json", - "latvian": "https://rawgit.com/Yemasthui/basicBot/master/lang/lv.json" + "latvian": "https://rawgit.com/Yemasthui/basicBot/master/lang/lv-LV.json", + "german": "https://rawgit.com/Yemasthui/basicBot/master/lang/de.json", + "spanish": "https://rawgit.com/Yemasthui/basicBot/master/lang/es-ES.json" } \ No newline at end of file diff --git a/lang/lv-LV.json b/lang/lv-LV.json new file mode 100644 index 00000000..da513bf8 --- /dev/null +++ b/lang/lv-LV.json @@ -0,0 +1,206 @@ +{ + "cookies": [ + "iedeva Tev \u0161okol\u0101des cepumu!", + "iedeva Tev m\u012bkstu m\u0101j\u0101s gatavotu auzu cepumu!", + "Iedeva Tev sausu un vecu cepumu. Vi\u0146\u0161 bija p\u0113d\u0113jais mais\u0101. Fuj!", + "iedeva Tev cukura cepumu. Ko? bez glaz\u016bras un neapkais\u012bts? 0\/10 lab\u0101k neaiztiec.", + "Iedeva Tev cepumu ar \u0161okol\u0101d\u0113s gabali\u0146iem. Uzgaidi.. T\u0101s ir roz\u012bnes. Fuj!", + "iedeva Tev milz\u012bgu cepumu! Bakstot vi\u0146u, tas tev dod vair\u0101k cepumu. D\u012bvaini..", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''K\u0101d\u0113\u013c Tu nestr\u0101d\u0101 pie neviena projekta?''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Izsaki k\u0101dam komplimentu!''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Uz\u0146emies risku!''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Izej \u0101r\u0101, pastaig\u0101jies.''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Neaizmirsti ap\u0113st savus d\u0101rzen\u012b\u0161us!''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Vai Tu visp\u0101r vari pacelt?''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts \"m808 pls\"", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Padejo, dab\u016bsi visas d\u0101mas.''", + "iedeva Tev laimes cepumu. Tur rakst\u012bts ''Es m\u012blu Tevi.''", + "iedeva Tev Zelta Cepumu. Tu nevari to \u0113st, jo tas tais\u012bts no zelta.", + "iedeva Tev Oreo ar gl\u0101zi piena.", + "iedeva Tev varav\u012bksnes cepumu, gatavots ar m\u012blest\u012bbu. :heart:", + "iedeva Tev vecu cepumu, vi\u0146\u0161 pamests \u0101r\u0101, liet\u016b. Tas ir sapel\u0113jis.", + "gatavo Tev svaigus cepumus, tie smar\u017eo burv\u012bgi." + ], + "balls": { + "0": "Paz\u012bmes liecina, ka j\u0101.", + "1": "J\u0101. ", + "2": "Atbilde neskaidra, m\u0113\u0123ini v\u0113lreiz.", + "3": "Bez \u0161aub\u0101m!", + "4": "Mani avoti saka, ka n\u0113.", + "5": "Domaju, ka j\u0101.", + "6": "Tu vari uz to pa\u013cauties. ", + "7": "Koncentr\u0113jies un pajaut\u0101 v\u0113lreiz!", + "8": "Izredzes nav tik lielas.", + "9": "Tas noteikti t\u0101 ir!", + "10": "Lab\u0101k Tev to tagad neteikt.", + "11": "\u013boti ap\u0161aub\u0101mi!", + "12": "J\u0101 - Noteikti.", + "13": "Tas ir dro\u0161i!", + "14": "Pagaid\u0101m nevaru prognoz\u0113t.", + "15": "Visticam\u0101k. ", + "16": "Pajaut\u0101 v\u0113l\u0101k v\u0113lreiz.", + "17": "Mana atbilde ir, n\u0113.", + "18": "Izredzes ir labas!", + "19": "Uz to ner\u0113\u0137inies!", + "20": "Sav\u0101 laik\u0101, J\u0101!", + "22": "Noteikti n\u0113!", + "23": "Tev b\u016bs j\u0101uzgaida. ", + "24": "Man ir savas \u0161aubas..", + "25": "Vid\u0113jas izredzes.", + "26": "Manupr\u0101t izskat\u0101s labi!", + "27": "Kas to lai zina?", + "28": "Izskat\u0101s labi! ", + "29": "Iesp\u0113jams..", + "30": "Vai Tu joko?", + "31": "Uz to nepa\u013caujies.", + "32": "Aizmirsti par to!" + }, + "nodatafound": "Iepriek\u0161\u0113jie dati nav atrasti. ", + "currentlang": "\/me Valoda pa\u0161laik iestat\u012bta uz: %%LANGUAGE%%", + "langerror": "\/me Tava izv\u0113l\u0113t\u0101 valoda nav pieejama! Lai atrastu pieejam\u0101s valodas: %%LINK%%", + "langset": "\/me Valoda nomain\u012bta uz: %%LANGUAGE%%", + "retrievingdata": "Atg\u016bstu iepriek\u0161 saglab\u0101tos datus.", + "datarestored": "Iepriek\u0161\u0113jie saglab\u0101tie dati veiksm\u012bgi iel\u0101d\u0113ti.", + "greyuser": "Tikai uzraugi un augst\u0101ki var palaist botu.", + "bouncer": "Bots nevar p\u0101rvietot cilv\u0113kus, kad tas darbojas k\u0101 uzraugs.", + "online": "\/me %%BOTNAME%% v%%VERSION%% tie\u0161saist\u0113!", + "welcome": "\/me \u010cau %%NAME%%", + "welcomeback": "\/me Sveiciens ar atgriez\u0161anos, %%NAME%%", + "songknown": "\/me @%%NAME%%, \u0161\u012b dziesma ir DJ v\u0113stur\u0113.", + "notavailable": "\/me @%%NAME%%, dziesma ko Tu sp\u0113l\u0113ji nebija pieejama.", + "timelimit": "\/me @%%NAME%%, Tava dziesma ir gar\u0101ka nek\u0101 %%MAXLENGTH%% min\u016btes, Tev ir nepiecie\u0161ama at\u013cauja, lai sp\u0113l\u0113tu gar\u0101kas dziesmas.", + "permissionownsong": "\/me :up: @%%NAME%% ir at\u013cauja, lai sp\u0113l\u0113tu vi\u0146\u0101 pa\u0161u produkciju!", + "isblacklisted": "\/me \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101! Izlai\u017eam...", + "isopen": "\/me Rulete tagad ir atv\u0113rta! Rakstiet !join lai piedal\u012btos!", + "winnerpicked": "\/me Uzvar\u0113t\u0101js ir izv\u0113l\u0113ts! @%%NAME%% p\u0101rmetam uz %%POSITION%%.", + "ball": "\/me %%NAME%%'a jaut\u0101jums bija: \"%%QUESTION%%\" un %%BOTNAME%%'a atbilde ir: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% nespokoj\u0101s.", + "ghosting": "[%%NAME1%%] %%NAME2%% spokoj\u0101s, vai ar\u012b neatrodas \u0161eit.", + "alreadyadding": "\/me Lietot\u0101js tiek pievienots! Main\u012bt v\u0113lamo poz\u012bciju, uz %%POSITION%%.", + "adding": "\/me Pievieno @%%NAME%% iek\u0161 rindas. J\u016bsu vieta rind\u0101: %%POSITION%%.", + "usernotfound": "\/me Lietot\u0101js nav atrasts. ", + "notdisconnected": "\/me @%%NAME%% nebija atvienojies, kam\u0113r biju \u0161eit.", + "noposition": "\/me Vieta rind\u0101 nav zin\u0101ma. Rinda j\u0101atjaunina lai atrastu lietot\u0101ja vietu rind\u0101.", + "toolongago": "\/me @%%NAME%%'s atvieno\u0161an\u0101s bija p\u0101rak ilga: %%TIME%%", + "valid": "\/me @%%NAME%% atvienoj\u0101s pirms: %%TIME%% un vieta rind\u0101 j\u0101b\u016bt: %%POSITION%%", + "warning1": "\/me @%%NAME%%, Tu esi AFK jau %%TIME%%, l\u016bdzu atbildi 2 min\u016b\u0161u laik\u0101, vai tiksi no\u0146emts.", + "warning2": "\/me @%%NAME%%, Ja neatbild\u0113si, Tu tiksi no\u0146emts par b\u016b\u0161anu AFK.", + "afkremove": "\/me @%%NAME%%. Tu tiki no\u0146emts no rindas, jo biji afk %%TIME%%. Tu biji %%POSITION%% rind\u0101. N\u0101kamaj\u0101 reiz\u0113 \u010dato reizi %%MAXIMUMAFK%% min\u016btes, ja gribi palikt rind\u0101.", + "caps": "\/me @%%NAME%%, L\u016bdzu, neturi CAPSLOCK pogu.", + "askskip": "\/me @%%NAME%%, neprasi lai izlai\u017e.", + "spam": "\/me @%%NAME%%, l\u016bdzu, nespamo.", + "roomadvertising": "\/me @%%NAME%%, l\u016bdzu, neliec saites uz cit\u0101m kopien\u0101m.", + "adfly": "\/me @%%NAME%%, L\u016bdzu mainiet savu \"autowoot\" programmu. M\u0113s iesak\u0101m \u0161o. http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] [%%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "invalidgiftags": "\/me [@%%NAME%%] [%%TAGS%%] Neder\u012bgs tags.", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "invalidgifrandom": "\/me [@%%NAME%%] Neder\u012bgs piepras\u012bjums.", + "invalidtime": "\/me [@%%NAME%%] Nedr\u012bgs laiks.", + "nouserspecified": "\/me [@%%NAME%%] Nenoteikts lietot\u0101js.", + "invaliduserspecified": "\/me [@%%NAME%%] Neder\u012bgs lietot\u0101js.", + "nolistspecified": "\/me [@%%NAME%%] Nenoteikts saraksts.", + "invalidlistspecified": "\/me [@%%NAME%%] Noteikts neder\u012bgs saraksts.", + "novaliduserspecified": "\/me [@%%NAME%%] Neder\u012bgs lietot\u0101js.", + "nolimitspecified": "\/me [@%%NAME%%] Nav noteikts limits.", + "invalidlimitspecified": "\/me [@%%NAME%%] Neder\u012bgs limits.", + "invalidpositionspecified": "\/me [@%%NAME%%] Preciz\u0113ta neder\u012bga poz\u012bcija.", + "whois": "\/me [%%NAME1%%] Lietot\u0101jv\u0101rds: %%NAME2%%, ID: %%ID%%, Ranks: %%RANK%%, Pievienojies: %%JOINED%%, L\u012bmenis: %%LEVEL%%, Valoda: %%LANGUAGE%%, Avatars: %%AVATAR%%, Status: %%STATUS%%, Profils: %%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% iesl\u0113gts.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% izsl\u0113gts.", + "cmddeletion": "komandu dz\u0113\u0161ana.", + "afkremoval": "AFK dz\u0113\u0161ana", + "afksremoved": "AFK dz\u0113sti", + "afklimit": "AFK limits ", + "autodisable": "autodisable", + "autoskip": "autoskip", + "newblacklisted": "\/me [@%%NAME%%] \u0160\u012b dziesma pieder %%BLACKLIST%% melnajam sarakstam! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Meln\u0101 saraksta info - autors: %%AUTHOR%%, virsraksts: %%TITLE%%, mid: %%SONGID%%", + "blacklist": "melnais saraksts", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "\u010cata Filtrs", + "historyskip": "historyskip", + "lockdown": "lockdown", + "lockguard": "lockguard", + "usercommands": "lietot\u0101jkomandas", + "motd": "MotD ", + "welcomemsg": "Sveiciens", + "songstats": "dziesmu statistika", + "etarestriction": "eta robe\u017eas", + "voteskip": "izlaist ar balso\u0161anu", + "voteskiplimit": "\/me [@%%NAME%%] Voteskip limits iestat\u012bts uz %%LIMIT%% meh'iem", + "voteskipexceededlimit": "\/me @%%NAME%%, Tava dziesma p\u0101rsniedz \"voteskip\" limitu (%%LIMIT%% meh'i).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Neder\u012bgs \"Voteskip\" limits! Nor\u0101diet numuru priek\u0161 meh'iem", + "voteskipsetlimit": "\/me [@%%NAME%%] \"voteskip\" limits ir iestat\u012bts uz %%LIMIT%%", + "activeusersintime": "\/me [@%%NAME%%] P\u0113dej\u0101s %%TIME%% min\u016bt\u0113s, \u0161eit \u010datoja %%AMOUNT%% lietot\u0101ji.", + "maximumafktimeset": "\/me [@%%NAME%%] Maksim\u0101lais AFK ilgums iestat\u012bts uz %%TIME%% min\u016bt\u0113m.", + "afkstatusreset": "\/me [@%%NAME%%] No\u0146\u0113ma @%% AFK no %%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs jau %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs ilg\u0101k nek\u0101 %%BOTNAME%%'s ir piesl\u0113dzies.", + "autowoot": "\/me M\u0113s iesak\u0101m \u0161o priek\u0161 \"autowoot\" : http:\/\/plugcubed.net\/", + "brandambassador": "\/me P\u0101rst\u0101vji, jeb (Brand Ambassador) ir plug.dj pal\u012bgi, kas pal\u012bdz lietot\u0101jiem atbild\u0113t uz jaut\u0101jumiem. K\u0101 ar\u012b vi\u0146i veido pas\u0101kumus, un pal\u012bdz. :) Vair\u0101k info: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Jums ir j\u0101b\u016bt mened\u017eerim, vai augst\u0101k lai pievienotu Uzraugus.", + "chatcleared": "\/me [@%%NAME%%] \u010cats izt\u012br\u012bts.", + "deletechat": "\/me [@%%NAME%%] Izt\u012brija \u010datu no %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% komandas: %%LINK%% ", + "eatcookie": "\/me \u0146amm\u0101 cepumu.", + "nousercookie": "\/em nevar\u0113ju atrast %%NAME%%, tap\u0113c \u0113d\u012b\u0161u cepumus es pats. :P", + "selfcookie": "\/me @%%NAME%%, tu esi cietsird\u012bgs! Dod pats sev cepumus, bah. Padalies ar citiem!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%% ", + "cycleguardtime": "\/me [@%%NAME%%] \"cycleguard\" ir iestat\u012bts uz %%TIME%% min\u016bti.", + "dclookuprank": "\/me [@%%NAME%%] Tikai uzraugi, un augst\u0101ki var uzmekl\u0113t citus.", + "emojilist": "\/me Smaidi\u0146i: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, tu n\u0113esi rind\u0101.", + "youarenext": "\/me @%%NAME%%, tu b\u016bsi DJ p\u0113c \u0161\u012bs dziesmas!", + "youaredj": "\/me @%%NAME%% Tu esi DJ.", + "eta": "\/me @%%NAME%%, Tu esi %%POSITION%% rind\u0101, un k\u0101psi uz skatuves apm\u0113ram p\u0113c %%TIME%%.", + "facebook": "\/me Spie\u017eat pat\u012bk musu facebook'\u0101: %%LINK%%", + "starterhelp": "\/me \u0160\u012b bilde jums pal\u012bdz\u0113s start\u0113t iek\u0161 plug: %%LINK%%", + "roulettejoin": "\/me @%%NAME%% pievienoj\u0101s ruletei! (!leave ja tu p\u0101rdom\u0101ji)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ir \u0161aj\u0101 kopien\u0101 jau %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] J\u016bs nevarat izmest lietot\u0101jus kuriem ir vien\u0101ds, vai augst\u0101ks ranks k\u0101 Tev!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% J\u016bs tiekat izmests no kopienas uz %%TIME%% min\u016bt\u0113m.", + "kill": "\/me Izsl\u0113dzos, att\u0101! :(", + "logout": "\/me [@%%NAME%%] <-- Slepkava.. Izsl\u0113dz %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% pameta ruleti! Baidies?", + "songlink": "\/me [@%%NAME%%] Saite uz pa\u0161reiz\u0113jo dziesmu: %%LINK%% ", + "usedlockskip": "\/me [%%NAME%% lietoja \"lockskip\"]", + "usedskip": "\/me [%%NAME%% izlaida dziesmu]", + "skippos": "\/me [@%%NAME%%] DJ tiks p\u0101rmesti uz %%POSITION%% vietu rind\u0101, ja izlaid\u012bs dziesmu.", + "lockguardtime": "\/me [@%%NAME%%] \"lockguard\" ir iestat\u012bts uz %%TIME%% min\u016bti.", + "maxlengthtime": "\/me [@%%NAME%%] Maksim\u0101lais dziesmas garums ir iestat\u012bts uz %%TIME%% min\u016bt\u0113m.", + "motdset": "\/me MotD iestat\u012bts: %%MSG%%", + "motdintervalset": "\/me MotD interv\u0101ls iestat\u012bts: %%INTERVAL%%.", + "currentbotname": "\/me Bota v\u0101rds ir iestat\u012bts k\u0101: %%BOTNAME%%", + "botnameset": "\/me Bota v\u0101rds iestat\u012bts k\u0101: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, l\u016bdzu, nem\u0113\u0123ini mani pievienot rindai.", + "move": "\/me [%%NAME%% p\u0101rvietoja]", + "mutednotime": "\/me [@%%NAME%%] Apklusin\u0101ja @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Tu vari apklusin\u0101t tikai uz %%TIME%% min\u016bt\u0113m.", + "mutedtime": "\/me [@%%NAME%%] Apklusin\u0101ja @%%USERNAME%% uz %%TIME%% min\u016bt\u0113m.", + "unmuted": "\/me [@%%NAME%%] at\u013c\u0101va run\u0101t @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] J\u016bs n\u0113varat apklusin\u0101t lietot\u0101jus, kas ir t\u0101d\u0101 pa\u0161\u0101, vai augst\u0101k\u0101 rank\u0101 par tevi.", + "oplist": "\/me OP saraksts: %%LINK%% ", + "pong": "\/me Pong! ", + "reload": "\/me Dr\u012bz b\u016b\u0161u atpaka\u013c.", + "removenotinwl": "\/me [@%%NAME%%] @%%USERNAME%% nav rind\u0101.", + "roomrules": "\/me Kopienas noteikumi izlas\u0101mi \u0161eit: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Woot'i: %%WOOTS%%, Meh'i: %%MEHS%%, Pa\u0146\u0113ma: %%GRABS%%.", + "forceskip": "\/me [%%NAME%% piespieda izlaist dziesmu]", + "madeby": "\/me \u0160o botu izveidoja %%NAME%%.", + "activefor": "Esmu bijis akt\u012bvs jau %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Nor\u0101d\u012bts neder\u012bgs lietot\u0101js. (V\u0101rdus bez atstarp\u0113m!!)", + "swapwlonly": "\/me [@%%NAME%%] L\u016bdzu, mainies tikai ar lietot\u0101jiem kas atrodas rind\u0101!", + "swapping": "\/me Mainu %%NAME1%% ar %%NAME2%%.", + "genres": "\/me Kopienas \u017eanrus vari atrast \u0161eit: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] Lietot\u0101js nav banots.", + "unmutedeveryone": "\/me [@%%NAME%%] At\u013c\u0101va visiem run\u0101t,", + "unmuteeveryonerank": "\/me [@%%NAME%%] Tikai mened\u017eeris un augst\u0101ki var at\u013caut visiem run\u0101t vienlaikus.", + "notmuted": "\/me [@%%NAME%%] \u0160is lietot\u0101js netika apklusin\u0101ts.", + "unmuterank": "\/me [@%%NAME%%] J\u016bs nevarat at\u013caut run\u0101t lietot\u0101jiem ar t\u0101du pa\u0161u, vai augst\u0101ku ranku k\u0101 tev.", + "commandscd": "\/me [@%%NAME%%] Komandu \"anti-spam\" laiks priek\u0161 lietot\u0101jiem ir iestat\u012bts uz %%TIME%% sekund\u0113m.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Woot'i: %%WOOT%%, Meh'i: %%MEHS%%, Procentu\u0101li: %%RATIO%%.", + "website": "\/me M\u016bsu m\u0101jaslapa: %%LINK%%", + "youtube": "\/me [%%NAME%%] Abon\u0113jiet m\u016bs Youtub\u0113: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%\/M." +} \ No newline at end of file diff --git a/lang/lv.json b/lang/lv.json deleted file mode 100644 index 9622f3b4..00000000 --- a/lang/lv.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "cookies": [ - "iedeva jums \u0161okol\u0101des cepumu! ", - "iedeva jums m\u012bkstu m\u0101j\u0101s gatavotu auzu cepumu! ", - "Iedeva tuk\u0161u, sausu, un vecu cepumu. Vi\u0146\u0161 bija p\u0113d\u0113jais mais\u0101. Fuj.", - "iedeva jums cukura cepumu. Ko, bez glaz\u016bras un neapkais\u012bts? 0\/10 lab\u0101k neaiztiec.", - "Iedeva Jums cepumu ar \u0161okol\u0101d\u0113s gabali\u0146iem. Uzgaidi.. T\u0101s ir roz\u012bnes. Fuj!", - "iedeva jums milz\u012bgu cepumu. Bakstot to, tas tev dod vair\u0101k cepumu. D\u012bvaini.", - "iedeva jums laimes cepumu. Tur sac\u012bts ''K\u0101d\u0113\u013c J\u016bs nestr\u0101d\u0101jat pie neviena projekta?''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Izsaki k\u0101dam \u012bpa\u0161am komplimentu.''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Uz\u0146emies risku!''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Izej \u0101r\u0101.''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Neaizmirsti ap\u0113st savus d\u0101rzen\u012b\u0161us!''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Vai Tu visp\u0101r vari pacelt?''", - "iedeva Jums laimes cepumu. Tur teikts: \"m808 pls\"", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Ja kustin\u0101si gurnus, ieg\u016bsi visas d\u0101mas.''", - "iedeva jums laimes cepumu. Tur sac\u012bts ''Es m\u012blu Tevi.''", - "iedeva jums Zelta Cepumu. Tu nevari to \u0113st, jo tas tais\u012bts no zelta. Nol\u0101d\u0113ts.", - "iedeva jums Oreo cepumu ar gl\u0101zi piena. ", - "iedeva jums varav\u012bksnes cepumu, gatavots ar m\u012blest\u012bbu :heart:", - "iedeva jums vecu cepumu, kas bija pamests \u0101r\u0101, liet\u016b. Tas ir sapel\u0113jis.", - "gatavo Tev svaigus cepumus, tie smar\u017eo burv\u012bgi." - ], - "balls": [ - "Paz\u012bmes liecina, ka j\u0101.", - "J\u0101. ", - "Atbilde neskaidra, m\u0113\u0123ini v\u0113lreiz.", - "Bez \u0161aub\u0101m!", - "Mani avoti saka, ka n\u0113.", - "Domaju, ka j\u0101.", - "Tu vari uz to pa\u013cauties. ", - "Koncentr\u0113jies un pajaut\u0101 v\u0113lreiz!", - "Izredzes nav tik lielas.", - "Tas noteikti t\u0101 ir!", - "Lab\u0101k Tev to tagad neteikt.", - "\u013boti ap\u0161aub\u0101mi!", - "J\u0101 - Noteikti.", - "Tas ir dro\u0161i!", - "Pagaid\u0101m nevaru prognoz\u0113t.", - "Visticam\u0101k. ", - "Pajaut\u0101 v\u0113l\u0101k v\u0113lreiz.", - "Mana atbilde ir, n\u0113.", - "Izredzes ir labas!", - "Uz to ner\u0113\u0137inies!", - "Sav\u0101 laik\u0101, J\u0101!", - "Mani avoti saka ka n\u0113.", - "Noteikti n\u0113!", - "Tev b\u016bs j\u0101uzgaida. ", - "Man ir savas \u0161aubas..", - "Vid\u0113jas izredzes.", - "Manupr\u0101t izskat\u0101s labi!", - "Kas to lai zina?", - "Izskat\u0101s labi! ", - "Iesp\u0113jams..", - "Vai Tu joko?", - "Uz to nepa\u013caujies.", - "Aizmirsti par to!" - ], - "nodatafound": "Iepriek\u0161\u0113jie dati nav atrasti. ", - "currentlang": "\/me Valoda pa\u0161laik iestat\u012bta uz: %%LANGUAGE%%", - "langerror": "\/me Tava izv\u0113l\u0113t\u0101 valoda nav pieejama! Lai atrastu pieejam\u0101s valodas: %%LINK%%", - "langset": "\/me Valoda nomain\u012bta uz: %%LANGUAGE%%", - "retrievingdata": "Atg\u016bstu iepriek\u0161 saglab\u0101tos datus.", - "datarestored": "Iepriek\u0161\u0113jie saglab\u0101tie dati veiksm\u012bgi iel\u0101d\u0113ti.", - "greyuser": "Tikai uzraugi un augst\u0101ki var palaist botu.", - "bouncer": "Bots nevar p\u0101rvietot cilv\u0113kus, kad tas darbojas k\u0101 uzraugs.", - "online": "\/me %%BOTNAME%% v%%VERSION%% tie\u0161saist\u0113!", - "welcome": "\/me \u010cau %%NAME%%", - "welcomeback": "\/me Sveiciens ar atgriez\u0161anos %%NAME%%", - "songknown": "\/me @%%NAME%%, \u0161\u012b dziesma ir DJ v\u0113stur\u0113.", - "notavailable": "\/me @%%NAME%%, dziesma ko j\u016bs sp\u0113l\u0113j\u0101t nebija pieejama.", - "timelimit": "\/me @%%NAME%%, j\u016bsu dziesma ir gar\u0101ka nek\u0101 %%MAXLENGTH%% min\u016btes, jums ir nepiecie\u0161ama at\u013cauja, lai sp\u0113l\u0113tu gar\u0101kas dziesmas.", - "permissionownsong": "\/me :up: @%%NAME%% ir at\u013cauja, lai sp\u0113l\u0113tu vi\u0146\u0101 pa\u0161u produkciju!", - "isblacklisted": "\/me \u0160\u012b dziesma ir %%BLACKLIST%% melnaj\u0101 sarakst\u0101! Izlai\u017eam...", - "isopen": "\/me Rulete tagad ir atv\u0113rta! Rakstiet !join lai piedal\u012btos!", - "winnerpicked": "\/me Uzvar\u0113t\u0101js ir izv\u0113l\u0113ts! @%%NAME%% p\u0101rmetam uz %%POSITION%%.", - "ball": "\/me %%NAME%%'s jaut\u0101jums bija: \"%%QUESTION%%\" un %%BOTNAME%%'a atbilde ir: \"%%RESPONSE%%\"", - "notghosting": "[%%NAME1%%] %%NAME2%% nespokoj\u0101s.", - "ghosting": "[%%NAME1%%] %%NAME2%% spokoj\u0101s, vai ar\u012b neatrodas \u0161eit.", - "alreadyadding": "\/me Lietot\u0101js tiek pievienots! Main\u012bt v\u0113lamo poz\u012bciju, uz %%POSITION%%.", - "adding": "\/me Pievieno @%%NAME%% iek\u0161 rindas. J\u016bsu vieta rind\u0101: %%POSITION%%.", - "usernotfound": "\/me Lietot\u0101js nav atrasts.", - "notdisconnected": "\/me @%%NAME%% nebija atvienojies, kam\u0113r biju \u0161eit.", - "noposition": "\/me Vieta rind\u0101 nav zin\u0101ma. Rinda j\u0101atjaunina lai atrastu lietot\u0101ja vietu rind\u0101.", - "toolongago": "\/me @%%NAME%%'s atvieno\u0161an\u0101s bija p\u0101rak ilga: %%TIME%%", - "valid": "\/me @%%NAME%%atvienoj\u0101s pirms: %%TIME%% un vieta rind\u0101 j\u0101b\u016bt: %%POSITION%%", - "warning1": "\/me @%%NAME%%, J\u016bs esat AFK jau %%TIME%%, l\u016bdzu atbildiet 2 min\u016b\u0161u laik\u0101, vai tiksiet no\u0146emts.", - "warning2": "\/me @%%NAME%%, J\u016bs tiksiet no\u0146emts d\u0113\u013c AFK, ja neatbild\u0113siet.", - "afkremove": "\/me @%%NAME%%. JTu tiki no\u0146emts no rindas, jo biji afk %%TIME%%. Tu biji kart\u0101 %%POSITION%%. N\u0101kamaj\u0101 reiz\u0113 \u010dato reizi %%MAXIMUMAFK%% min\u016btes, ja gribi palikt rind\u0101.", - "caps": "\/me @%%NAME%%, L\u016bdzu, neturi CAPSLOCK pogu.", - "askskip": "\/me @%%NAME%%, nel\u016bdz lai izlai\u017e.", - "spam": "\/me @%%NAME%%, l\u016bdzu, nespamo.", - "roomadvertising": "\/me @%%NAME%%, l\u016bdzu, neliec saites uz cit\u0101m kopien\u0101m.", - "adfly": "\/me @%%NAME%%,L\u016bdzu mainiet savu \"autowoot\" programmu. M\u0113s iesak\u0101m \u0161o. http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tegi: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Neder\u012bga eti\u0137ete, m\u0113\u0123iniet kaut ko citu. [Tegi: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Nejau\u0161s GIFs]", - "invalidgifrandom": "\/me [@%%NAME%%] Neder\u012bgs piepras\u012bjums, m\u0113\u0123ini v\u0113lreiz.", - "invalidtime": "\/me [@%%NAME%%] Noteikts nedr\u012bgs laiks.", - "nouserspecified": "\/me [@%%NAME%%] Lietot\u0101js nav preciz\u0113ts.", - "invaliduserspecified": "\/me [@%%NAME%%] Neder\u012bgs lietot\u0101js.", - "nolistspecified": "\/me [@%%NAME%%] Nenoteikts saraksts.", - "invalidlistspecified": "\/me [@%%NAME%%] Noteikts neder\u012bgs saraksts.", - "novaliduserspecified": "\/me [@%%NAME%%] Nav noteikts der\u012bgs lietot\u0101js.", - "nolimitspecified": "\/me [@%%NAME%%] Nav noteikts limits.", - "invalidlimitspecified": "\/me [@%%NAME%%] Neder\u012bgs limits.", - "invalidpositionspecified": "\/me [@%%NAME%%] Preciz\u0113ta neder\u012bga poz\u012bcija.", - "whois": "\/me [%%NAME1%%] Lietot\u0101js: %%NAME2%%, ID: %%ID%%, Ranks: %%RANK%%, Pievienojies: %%JOINED%%, L\u012bmenis: %%LEVEL%%, Valoda: %%LANGUAGE%%, Avatars: %%AVATAR%%, Status: %%STATUS%%, Profils: %%PROFILE%%", - "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% iesl\u0113gta.", - "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% izslegta", - "cmddeletion": "komandu dz\u0113\u0161ana.", - "afkremoval": "AFK izdz\u0113\u0161ana", - "afksremoved": "AFK izdz\u0113sts", - "afklimit": "AFK limits ", - "autodisable": "autoizsleg\u0161ana", - "autoskip": "autoizlaiz\u0161ana", - "newblacklisted": "\/me [@%%NAME%%] \u0160\u012b dziesma pieder %%BLACKLIST%% melnajam sarakstam [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", - "blinfo": "[@%%NAME%%]Meln\u0101 saraksta info - autors: %%AUTHOR%%, virsraksts: %%TITLE%%, mid: %%SONGID%%", - "blacklist": "melnais saraksts", - "cycleguard": "rin\u0137o\u0161anas sargs", - "timeguard": "Laikraugs", - "chatfilter": "\u010cata Filtrs", - "historyskip": "V\u0113stures izlaiz\u0161ana", - "lockdown": "Sl\u0113gts ", - "lockguard": "Sl\u0113gtraugs", - "usercommands": "lietot\u0101jkomandas", - "motd": "MotD ", - "welcomemsg": "Iel\u016bg\u0161anas v\u0113stule.", - "songstats": "dziesmas statistika", - "etarestriction": "eta robe\u017eas", - "voteskip": "izlaist ar balso\u0161anu", - "voteskiplimit": "\/me [@%%NAME%%] Izlaiz\u0161ana ar balso\u0161anu limits ir uzst\u0101d\u012bts uz %%LIMIT%% meh'iem", - "voteskipexceededlimit": "\/me @%%NAME%%, J\u016bsu dziesma ir p\u0101rsniegusi \"izlaist ar balso\u0161anu\" limitu (%%LIMIT%% meh'i).", - "voteskipinvalidlimit": "\/me [@%%NAME%%] Neder\u012bga \"Izlaiz\u0161ana ar balso\u0161anu\" m\u0113\u0123iniet v\u0113lreiz un nor\u0101diet der\u012bgu meh'u skaitu", - "voteskipsetlimit": "\/me [@%%NAME%%] \"Izlaizt ar balso\u0161anu\" limits ir iestat\u012bts uz %%LIMIT%%", - "activeusersintime": "\/me [@%%NAME%%] P\u0113dej\u0101s %%TIME%% min\u016bt\u0113s, \u0161it \u010datoja %%AMOUNT%% lietot\u0101ji.", - "maximumafktimeset": "\/me [@%%NAME%%] Maksim\u0101lais AFK ilgums iestat\u012bts uz %%TIME%% min\u016bt\u0113m.", - "afkstatusreset": "\/me [@%%NAME%%]Resetart\u0113ja afk statusu priek\u0161 @%%USERNAME%%.", - "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs jau %%TIME%%.", - "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% ir neakt\u012bvs ilg\u0101k nek\u0101 %%BOTNAME%%'s ir online.", - "autowoot": "\/me M\u0113s iesak\u0101m \u0161o priek\u0161 \"autowoot\" : http:\/\/plugcubed.net\/", - "brandambassador": "\/me Mened\u017eeri ir plug.dj pal\u012bgi, kas pal\u012bdz lietot\u0101jiem atbild\u0113t uz jaut\u0101jumiem. K\u0101 ar\u012b vi\u0146i veido pas\u0101kumus, un pal\u012bdz. :) Vair\u0101k info: https:\/\/plug.dj\/ba", - "bouncerplusrank": "\/me [@%%NAME%%] Jums ir j\u0101b\u016bt mened\u017eerim, vai augst\u0101k lai pievienotu Uzraugus.", - "chatcleared": "\/me [@%%NAME%%] \u010cats izt\u012br\u012bts.", - "deletechat": "\/me [@%%NAME%%] Izt\u012brija \u010d\u0101tu no %%USERNAME%%.", - "commandslink": "\/me %%BOTNAME%% komandas: %%LINK%% ", - "eatcookie": "\/me \u0146amm\u0101 cepumu.", - "nousercookie": "\/em nevar\u0113ju atrast %%NAME%%, tap\u0113c \u0113d\u012b\u0161u cepumus es pats. :P", - "selfcookie": "\/me @%%NAME%%, tu esi cietsird\u012bgs! Dod pats sev cepumus, bah. Padalies ar citiem!", - "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%% ", - "cycleguardtime": "\/me [@%%NAME%%] Ap\u013co\u0161anas sargs ir uzst\u0101d\u012bts uz %%TIME%% Min\u016bti", - "dclookuprank": "\/me [@%%NAME%%] Tikai uzraugi, un augst\u0101ki var uzmekl\u0113t citus.", - "emojilist": "\/me Smaidi\u0146i: %%LINK%%", - "notinwaitlist": "\/me @%%NAME%%, J\u016bs n\u0113esat rind\u0101.", - "youarenext": "\/me @%%NAME%%, tu b\u016bsi DJ p\u0113c \u0161\u012bs dziesmas!", - "youaredj": "\/me @%%NAME%% J\u016bs esat DJ", - "eta": "\/me @%%NAME%%, j\u016bs esat %%POSITION%%. rind\u0101, un k\u0101psiet uz skatuves apm\u0113ram p\u0113c %%TIME%%.", - "facebook": "\/me Spie\u017eat pat\u012bk musu facebook'\u0101: %%LINK%%", - "starterhelp": "\/me \u0160\u012b bilde jums pal\u012bdz\u0113s start\u0113t iek\u0161 plug: %%LINK%%", - "roulettejoin": "\/me @%%NAME%% pievienoj\u0101s ruletei! (!leave ja tu p\u0101rdom\u0101ji)", - "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ir \u0161aj\u0101 kopien\u0101 jau %%TIME%%.", - "kickrank": "\/me [@%%NAME%%] J\u016bs nevarat izmest lietot\u0101jus kuriem ir vien\u0101ds, vai augst\u0101ks ranks k\u0101 Tev!", - "kick": "\/me [@%%NAME%%], @%%USERNAME%% J\u016bs tiekat izmests no kopienas uz %%TIME%% min\u016bt\u0113m.", - "kill": "\/me Izsl\u0113dz\u0101s...", - "logout": "\/me [@%%NAME%%] Atvieno %%BOTNAME%%", - "rouletteleave": "\/me @%%NAME%% pameta ruleti! ", - "songlink": "\/me [@%%NAME%%] Saite uz pa\u0161reiz\u0113jo dziesmu: %%LINK%% ", - "usedlockskip": "\/me [%%NAME%% aizliedz izlaist dziesmu]", - "usedskip": "\/me [%%NAME%% izlaida dziesmu]", - "skippos": "\/me [@%%NAME%%] DJ tiks p\u0101rmesti uz %%POSITION%% vietu rind\u0101, ja izlaid\u012bs dziesmu.", - "lockguardtime": "\/me [@%%NAME%%] Aizsl\u0113dza rindu uz %%TIME%% min\u016bti.", - "maxlengthtime": "\/me [@%%NAME%%] Maksim\u0101lais dziesmas garums ir iestat\u012bts uz %%TIME%% min\u016bt\u0113m.", - "motdset": "\/me MotD iestat\u012bts: %%MSG%%", - "motdintervalset": "\/me MotD interv\u0101ls iestat\u012bts: %%INTERVAL%%.", - "currentbotname": "\/me Bota v\u0101rds pa\u0161laik iestat\u012bts uz: %%BOTNAME%%", - "botnameset": "\/me Bota v\u0101rds iestat\u012bts uz: %%BOTNAME%%", - "addbotwaitlist": "\/me @%%NAME%%, l\u016bdzu, nem\u0113\u0123ini mani pievienot rindai.", - "move": "\/me [%%NAME%% p\u0101rvietoja.]", - "mutednotime": "\/me [@%%NAME%%] Apklusin\u0101ja @%%USERNAME%%.", - "mutedmaxtime": "\/me [@%%NAME%%] J\u016bs varat apklusin\u0101t tikai uz %%TIME%% min\u016bt\u0113m.", - "mutedtime": "\/me [@%%NAME%%] Apklusin\u0101ja @%%USERNAME%% uz %%TIME%% min\u016bt\u0113m.", - "unmuted": "\/me [@%%NAME%%] at\u013c\u0101va run\u0101t @%%USERNAME%%", - "muterank": "\/me [@%%NAME%%] J\u016bs n\u0113varat apklusin\u0101t lietot\u0101jus, kas ir t\u0101d\u0101 pa\u0161\u0101, vai augst\u0101k\u0101 rank\u0101 par tevi.", - "oplist": "\/me OP saraksts: %%LINK%% ", - "pong": "\/me Pong! ", - "reload": "\/me Dr\u012bz b\u016b\u0161u atpaka\u013c.", - "removenotinwl": "\/me [@%%NAME%%] @%%USERNAME%% nav rind\u0101.", - "roomrules": "\/me Kopienas noteikumi izlas\u0101mi \u0161eit: %%LINK%%", - "sessionstats": "\/me [@%%NAME%%]Woot'i:%%WOOTS%%, Meh'i: %%MEHS%%, Pa\u0146emti: %%GRABS%%.", - "forceskip": "\/me [%%NAME%% piespieda izlaist dziesmu]", - "madeby": "\/me \u0160o botu izveidoja %%NAME%%.", - "activefor": "Esmu bijis akt\u012bvs jau %%TIME%%.", - "swapinvalid": "\/me [@%%NAME%%] Nor\u0101d\u012bts neder\u012bgs lietot\u0101js. (V\u0101rdus bez atstarp\u0113m!!)", - "swapwlonly": "\/me [@%%NAME%%] L\u016bdzu, mainies tikai ar lietot\u0101jiem kas atrodas rind\u0101!", - "swapping": "\/me Mainu %%NAME1%% ar %%NAME2%%.", - "genres": "\/me Kopienas \u017eanrus vari atrast \u0161eit: %%LINK%%", - "notbanned": "\/me [@%%NAME%%] Lietot\u0101js nav nobanots.", - "unmutedeveryone": "\/me [@%%NAME%%] At\u013c\u0101va visiem run\u0101t,", - "unmuteeveryonerank": "\/me [@%%NAME%%] Tikai mened\u017eeris un augst\u0101k var at\u013caut visiem run\u0101t vienlaikus.", - "notmuted": "\/me [@%%NAME%%] \u0160is lietot\u0101js netika apklusin\u0101ts.", - "unmuterank": "\/me [@%%NAME%%] J\u016bs nevarat at\u013caut run\u0101t lietot\u0101jiem ar t\u0101du pa\u0161u, vai augst\u0101ku ranku k\u0101 tev.", - "commandscd": "\/me [@%%NAME%%] Komandu \"anti-spam\" laiks priek\u0161 lietot\u0101jiem ir iestat\u012bts uz %%TIME%% sekund\u0113m.", - "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Woot'i: %%WOOT%%, Meh'i: %%MEHS%%, Procentu\u0101li: %%RATIO%%.", - "website": "\/me M\u016bsu m\u0101jaslapa: %%LINK%%", - "youtube": "\/me [%%NAME%%] Abon\u0113jiet m\u016bs Youtub\u0113: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%\/M." -} \ No newline at end of file diff --git a/lang/pt.json b/lang/pt-BR.json similarity index 91% rename from lang/pt.json rename to lang/pt-BR.json index b996001f..5bf10258 100644 --- a/lang/pt.json +++ b/lang/pt-BR.json @@ -21,41 +21,40 @@ "deu-lhe um biscoito que foi esquecido na chuva... e est\u00e1 mofado.", "te trouxe biscoitos fresquinhos... parecem deliciosos!" ], - "balls": [ - "Sinais apontam que sim.", - "Sim.", - "Tente novamente mais tarde.", - "Sem d\u00favidas.", - "Minhas fontes dizem que n\u00e3o.", - "Ao meu ver, sim.", - "Pode contar com isso.", - "Concentre-se e pergunte novamente.", - "Acho que n\u00e3o.", - "Definitivamente.", - "Melhor n\u00e3o te falar...", - "\u00c9 duvidoso.", - "Sim. Definitivamente!", - "\u00c9 certo.", - "N\u00e3o posso prever agora.", - "Provavelmente.", - "Pergunte-me depois.", - "Minha resposta \u00e9 n\u00e3o.", - "Parece bom.", - "N\u00e3o conte com isso.", - "Sim, em seu devido tempo.", - "Minhas fontes dizem que n\u00e3o.", - "Definitivamente n\u00e3o.", - "Voc\u00ea vai ter que esperar...", - "Eu tenho minhas d\u00favidas.", - "Um tanto...", - "Parece bom para mim!", - "Quem sabe?", - "Claro!", - "Provavelmente.", - "Est\u00e1 brincando?", - "N\u00e3o aposte nisso.", - "Esque\u00e7a..." - ], + "balls": { + "0": "Sinais apontam que sim.", + "1": "Sim.", + "2": "Tente novamente mais tarde.", + "3": "Sem d\u00favidas.", + "4": "Minhas fontes dizem que n\u00e3o.", + "5": "Ao meu ver, sim.", + "6": "Pode contar com isso.", + "7": "Concentre-se e pergunte novamente.", + "8": "Acho que n\u00e3o.", + "9": "Definitivamente.", + "10": "Melhor n\u00e3o te falar...", + "11": "\u00c9 duvidoso.", + "12": "Sim. Definitivamente!", + "13": "\u00c9 certo.", + "14": "N\u00e3o posso prever agora.", + "15": "Provavelmente.", + "16": "Pergunte-me depois.", + "17": "Minha resposta \u00e9 n\u00e3o.", + "18": "Parece bom.", + "19": "N\u00e3o conte com isso.", + "20": "Sim, em seu devido tempo.", + "22": "Definitivamente n\u00e3o.", + "23": "Voc\u00ea vai ter que esperar...", + "24": "Eu tenho minhas d\u00favidas.", + "25": "Um tanto...", + "26": "Parece bom para mim!", + "27": "Quem sabe?", + "28": "Claro!", + "29": "Provavelmente.", + "30": "Est\u00e1 brincando?", + "31": "N\u00e3o aposte nisso.", + "32": "Esque\u00e7a..." + }, "nodatafound": "Dados anteriores n\u00e3o encontrados.", "currentlang": "\/me Idioma definido: %%LANGUAGE%%", "langerror": "\/me O idioma que voc\u00ea selecionou n\u00e3o est\u00e1 dispon\u00edvel. Por favor, visite %%LINK%% para encontrar uma lista de idiomas dispon\u00edveis.", diff --git a/lang/zh.json b/lang/zh-TW.json similarity index 91% rename from lang/zh.json rename to lang/zh-TW.json index 06bb7c2c..0f8dbd4e 100644 --- a/lang/zh.json +++ b/lang/zh-TW.json @@ -21,41 +21,40 @@ "\u7d66\u4f60\u4e00\u500b\u96e8\u5929\u88e1\u5269\u4e0b\u7684\u8001\u9905\u4e7e, \u5b83\u5df2\u7d93\u767c\u9709\u4e86.", "\u70d8\u7119\u4e86\u4e00\u500b\u65b0\u9bae\u9905\u4e7e\u7d66\u4f60, \u771f\u7684\u5f88\u82ac\u9999\u5594." ], - "balls": [ - "\u6a19\u8a8c\u9ede\u5230\u662f\u7684.", - "\u662f\u7684.", - "\u56de\u8986\u6726\u6727, \u8acb\u518d\u5617\u8a66.", - "\u7121\u6240\u8cea\u7591.", - "\u6211\u7684\u4f86\u6e90\u8aaa\u4e0d.", - "\u5c31\u5982\u6211\u6240\u770b\u898b\u7684, \u662f.", - "\u4f60\u6216\u6703\u4f9d\u8cf4\u8457\u5b83.", - "\u96c6\u4e2d\u7cbe\u795e\u8207\u518d\u6b21\u767c\u554f.", - "\u5916\u8868\u4e0d\u592a\u597d.", - "\u90a3\u662f\u65b7\u7136\u5de6\u53f3.", - "\u6700\u597d\u4e0d\u73fe\u5728\u544a\u8a34\u4f60.", - "\u975e\u5e38\u61f7\u7591.", - "\u662f - \u80af\u5b9a\u7684.", - "\u9019\u662f\u80af\u5b9a\u7684.", - "\u73fe\u5728\u7121\u6cd5\u9810\u6e2c.", - "\u5f88\u6709\u53ef\u80fd\u7684.", - "\u7a0d\u5f8c\u518d\u554f\u904e.", - "\u6211\u7684\u56de\u8986\u662f\u4e0d.", - "\u5916\u8868\u5f88\u597d.", - "\u4e0d\u8981\u6307\u671b\u5b83.", - "\u662f\u7684, \u5728\u9069\u7576\u7684\u6642\u5019.", - "\u6211\u7684\u4f86\u6e90\u8aaa\u4e0d.", - "\u975e\u4e5f.", - "\u4f60\u6703\u9700\u8981\u7b49\u5f85.", - "\u6211\u6709\u6211\u7684\u61f7\u7591.", - "\u5916\u8868\u666e\u901a.", - "\u5728\u6211\u662f\u89ba\u5f97\u597d\u770b\u7684!", - "\u8ab0\u77e5\u9053?", - "\u5f88\u597d\u770b!", - "\u4e5f\u8a31\u5427.", - "\u4f60\u5728\u958b\u73a9\u7b11\u55ce?", - "\u4e0d\u8981\u8ced\u4e86.", - "\u5fd8\u4e86\u5b83\u5427." - ], + "balls": { + "0": "\u6a19\u8a8c\u9ede\u5230\u662f\u7684.", + "1": "\u662f\u7684.", + "2": "\u56de\u8986\u6726\u6727, \u8acb\u518d\u5617\u8a66.", + "3": "\u7121\u6240\u8cea\u7591.", + "4": "\u6211\u7684\u4f86\u6e90\u8aaa\u4e0d.", + "5": "\u5c31\u5982\u6211\u6240\u770b\u898b\u7684, \u662f.", + "6": "\u4f60\u6216\u6703\u4f9d\u8cf4\u8457\u5b83.", + "7": "\u96c6\u4e2d\u7cbe\u795e\u8207\u518d\u6b21\u767c\u554f.", + "8": "\u5916\u8868\u4e0d\u592a\u597d.", + "9": "\u90a3\u662f\u65b7\u7136\u5de6\u53f3.", + "10": "\u6700\u597d\u4e0d\u73fe\u5728\u544a\u8a34\u4f60.", + "11": "\u975e\u5e38\u61f7\u7591.", + "12": "\u662f - \u80af\u5b9a\u7684.", + "13": "\u9019\u662f\u80af\u5b9a\u7684.", + "14": "\u73fe\u5728\u7121\u6cd5\u9810\u6e2c.", + "15": "\u5f88\u6709\u53ef\u80fd\u7684.", + "16": "\u7a0d\u5f8c\u518d\u554f\u904e.", + "17": "\u6211\u7684\u56de\u8986\u662f\u4e0d.", + "18": "\u5916\u8868\u5f88\u597d.", + "19": "\u4e0d\u8981\u6307\u671b\u5b83.", + "20": "\u662f\u7684, \u5728\u9069\u7576\u7684\u6642\u5019.", + "22": "\u975e\u4e5f.", + "23": "\u4f60\u6703\u9700\u8981\u7b49\u5f85.", + "24": "\u6211\u6709\u6211\u7684\u61f7\u7591.", + "25": "\u5916\u8868\u666e\u901a.", + "26": "\u5728\u6211\u662f\u89ba\u5f97\u597d\u770b\u7684!", + "27": "\u8ab0\u77e5\u9053?", + "28": "\u5f88\u597d\u770b!", + "29": "\u4e5f\u8a31\u5427.", + "30": "\u4f60\u5728\u958b\u73a9\u7b11\u55ce?", + "31": "\u4e0d\u8981\u8ced\u4e86.", + "32": "\u5fd8\u4e86\u5b83\u5427." + }, "nodatafound": "\u6c92\u6709\u767c\u73fe\u4e4b\u524d\u7684\u6578\u64da.", "currentlang": "\/me \u76ee\u524d\u8a9e\u8a00\u8a2d\u7f6e\u70ba: %%LANGUAGE%%", "langerror": "\/me \u4f60\u6240\u9078\u64c7\u7684\u8a9e\u8a00\u4e0d\u53ef\u7528. \u8acb\u8a2a\u554f %%LINK%% \u4ee5\u67e5\u8a62\u5217\u8868\u88e1\u53ef\u7528\u7684\u8a9e\u8a00.", From df21ae9f1d68b841daa801796504e38f35ba9c26 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 5 Jul 2015 17:26:55 +0100 Subject: [PATCH 182/281] DC abuse fix --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 12a5977a..b3e41baa 100644 --- a/basicBot.js +++ b/basicBot.js @@ -542,7 +542,7 @@ } } var newPosition = user.lastDC.position - songsPassed - afksRemoved; - if (newPosition <= 0) newPosition = 1; + if (newPosition <= 0) newPosition = -1; var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); basicBot.userUtilities.moveUser(user.id, newPosition, true); return msg; From 5ad61101528895e42578e5f24d44ab70c5957ddb Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 5 Jul 2015 17:26:55 +0100 Subject: [PATCH 183/281] DC abuse fix --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 95f4d903..faef3121 100644 --- a/basicBot.js +++ b/basicBot.js @@ -542,7 +542,7 @@ } } var newPosition = user.lastDC.position - songsPassed - afksRemoved; - if (newPosition <= 0) newPosition = 1; + if (newPosition <= 0) newPosition = -1; var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); basicBot.userUtilities.moveUser(user.id, newPosition, true); return msg; From 9d4c1bff80275c42645c001aa49ebee7fe9b235b Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 7 Jul 2015 17:16:34 +0100 Subject: [PATCH 184/281] DC fix basicBot will not add users to the waitlist if their position is less/equal to 0 --- basicBot.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/basicBot.js b/basicBot.js index b3e41baa..d6f1963a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -542,7 +542,7 @@ } } var newPosition = user.lastDC.position - songsPassed - afksRemoved; - if (newPosition <= 0) newPosition = -1; + if (newPosition <= 0) return subChat(basicBot.chat.notdisconnected, {name: name}); var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); basicBot.userUtilities.moveUser(user.id, newPosition, true); return msg; @@ -1255,7 +1255,7 @@ /*if (basicBot.settings.cmdDeletion) { API.moderateDeleteChat(chat.cid); }*/ - + //basicBot.room.allcommand = false; //setTimeout(function () { basicBot.room.allcommand = true; @@ -1489,7 +1489,7 @@ if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if( !basicBot.commands.executable(this.rank, chat) ) return void (0); else{ - + } } }, @@ -2102,7 +2102,7 @@ case 'pt': ch += 'Por favor, fale Inglês.'; break; case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; case 'cs': ch += 'Mluvte prosím anglicky.'; break; - case 'sr': ch += 'Молим Вас, говорите енглески.'; break; + case 'sr': ch += 'Молим Вас, говорите енглески.'; break; } ch += ' English please.'; API.sendChat(ch); @@ -2212,7 +2212,7 @@ if (user === false || !user.inRoom) { return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); } - else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); + else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); } } }, @@ -2230,8 +2230,8 @@ function get_id(api_key, fixedtag, func) { $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { + "https://tv.giphy.com/v1/gifs/random?", + { "format": "json", "api_key": api_key, "rating": rating, @@ -2260,8 +2260,8 @@ function get_random_id(api_key, func) { $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { + "https://tv.giphy.com/v1/gifs/random?", + { "format": "json", "api_key": api_key, "rating": rating @@ -3106,7 +3106,7 @@ if (basicBot.settings.bouncerPlus) msg += 'ON'; else msg += 'OFF'; msg += '. '; - + msg += basicBot.chat.blacklist + ': '; if (basicBot.settings.blacklistEnabled) msg += 'ON'; else msg += 'OFF'; @@ -3283,7 +3283,7 @@ } } }, - + togglemotdCommand: { command: 'togglemotd', rank: 'bouncer', From 32cd929077188cfc77fb648fcbf1e6fc1d2f00f9 Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 7 Jul 2015 17:16:34 +0100 Subject: [PATCH 185/281] DC fix basicBot will not add users to the waitlist if their position is less/equal to 0 --- basicBot.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/basicBot.js b/basicBot.js index faef3121..ab0d965b 100644 --- a/basicBot.js +++ b/basicBot.js @@ -542,7 +542,7 @@ } } var newPosition = user.lastDC.position - songsPassed - afksRemoved; - if (newPosition <= 0) newPosition = -1; + if (newPosition <= 0) return subChat(basicBot.chat.notdisconnected, {name: name}); var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); basicBot.userUtilities.moveUser(user.id, newPosition, true); return msg; @@ -1255,7 +1255,7 @@ /*if (basicBot.settings.cmdDeletion) { API.moderateDeleteChat(chat.cid); }*/ - + //basicBot.room.allcommand = false; //setTimeout(function () { basicBot.room.allcommand = true; @@ -1489,7 +1489,7 @@ if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if( !basicBot.commands.executable(this.rank, chat) ) return void (0); else{ - + } } }, @@ -2102,7 +2102,7 @@ case 'pt': ch += 'Por favor, fale Inglês.'; break; case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; case 'cs': ch += 'Mluvte prosím anglicky.'; break; - case 'sr': ch += 'Молим Вас, говорите енглески.'; break; + case 'sr': ch += 'Молим Вас, говорите енглески.'; break; } ch += ' English please.'; API.sendChat(ch); @@ -2212,7 +2212,7 @@ if (user === false || !user.inRoom) { return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); } - else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); + else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); } } }, @@ -2230,8 +2230,8 @@ function get_id(api_key, fixedtag, func) { $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { + "https://tv.giphy.com/v1/gifs/random?", + { "format": "json", "api_key": api_key, "rating": rating, @@ -2260,8 +2260,8 @@ function get_random_id(api_key, func) { $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { + "https://tv.giphy.com/v1/gifs/random?", + { "format": "json", "api_key": api_key, "rating": rating @@ -3106,7 +3106,7 @@ if (basicBot.settings.bouncerPlus) msg += 'ON'; else msg += 'OFF'; msg += '. '; - + msg += basicBot.chat.blacklist + ': '; if (basicBot.settings.blacklistEnabled) msg += 'ON'; else msg += 'OFF'; @@ -3283,7 +3283,7 @@ } } }, - + togglemotdCommand: { command: 'togglemotd', rank: 'bouncer', From 38836125cf6bbadfcbf81e0978d7ef8853cb898f Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 9 Jul 2015 18:33:20 +0100 Subject: [PATCH 186/281] Updated de.json file --- lang/de.json | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/lang/de.json b/lang/de.json index 73887998..2eb848d0 100644 --- a/lang/de.json +++ b/lang/de.json @@ -3,7 +3,7 @@ "hat dir einen leckeren Schokoladen Keks gegeben!", "hat dir einen selbstgemachten Haferfloken Keks gegeben!", "hat dir einen schmucklosen, dreckigen und alten Keks gegeben. Es war der letzte in seinem Rucksack. Toll.", - "hat dir einen Zucker Cookie gegeben. Was, kein Zuckerguss und Streuseln? 0\/10 w\u00fcrden es nicht essen.", + "hat dir ein Zuckerpl\u00e4tzchen gegeben. Was, kein Zuckerguss und Streuseln? 0\/10 w\u00fcrden es nicht essen.", "gibt dir einen Schokoladen Keks. Oh Warte, da sind Rosinen drine. Bleck!", "gibt dir einen riesigen Keks.", "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Warum arbeitest du momentan an keinen Projekten?\"", @@ -13,11 +13,11 @@ "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Vergiss nicht, dein Gem\u00fcse zu essen!\"", "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Do you even lift\"?", "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"m808 pls!\"", - "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Wenn du deine H\u00fcften bewegest, bekommst du alle Frauen.\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Wenn du deine H\u00fcften bewegst, bekommst du alle Frauen.\"", "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Ich liebe dich!\"", "gibt dir einen goldenen Keks. Du kannst ihn nicht essen, da er aus Gold ist. Verdammt!", "gibt dir einen Oreo Keks mit einem Glas Milch!", - "gibt dir einen Regenbogen Keks gemacht mit Liebe :heart:", + "gibt dir einen Regenbogen Keks gemacht mit Liebe <3", "gibt dir einen alten Keks, der im Regen gelassen wurde. Er ist schimmlig.", "backt dir einen frischen Keks, er schmeckt wunderbar." ], @@ -63,11 +63,11 @@ "datarestored": "Zuvor gespeicherte Daten erfolgreich abgerufen.", "greyuser": "Nur Bouncer und aufw\u00e4rts k\u00f6nnen den Bot betreiben.", "bouncer": "Der Bot kann keine Leute in der Warteliste verschieben, wenn er von einem Bouncer betrieben wird.", - "online": "\/me %%BOTNAME%% v%%VERSION%% online!", + "online": "\/me %%BOTNAME%% v%%VERSION%% ist online!", "welcome": "\/me Willkommen %%NAME%%", "welcomeback": "\/me Willkommen zur\u00fcck, %%NAME%%", - "songknown": "\/me @%%NAME%%, dieser Song ist im Verlauf.", - "notavailable": "\/me @%%NAME%% dieser Song war nicht verf\u00fcgbar.", + "songknown": "\/me @%%NAME%%, dieser Song ist im DJ Verlauf.", + "notavailable": "\/me @%%NAME%% der Song, den du gespielt hast, war nicht verf\u00fcgbar.", "timelimit": "\/me @%%NAME%%, dein Song \u00fcberschreitet die Maximall\u00e4nge von %%MAXLENGTH%% Minuten. Du ben\u00f6tigst eine Erlaubnis, um l\u00e4ngere Songs spielen zu k\u00f6nnen.", "permissionownsong": "\/me :up: @%%NAME%% hat die Erlaubnis, seine eigene Produktion zu spielen.", "isblacklisted": "\/me Dieser Song steht auf der %%BLACKLIST%% Blacklist! \u00dcberspringe...", @@ -77,23 +77,23 @@ "notghosting": "[%%NAME1%%] %%NAME2%% ghostet nicht.", "ghosting": "[%%NAME1%%] %%NAME2%% ghostet entweder oder ist nicht hier.", "alreadyadding": "\/me Benutzer wird bereits hinzugef\u00fcgt! Die gew\u00fcnschte Position wurde zu %%POSITION%% ge\u00e4ndert.", - "adding": "\/me @%%NAME%% wurde der Warteschlange hinzugef\u00fcgt. Derzeitige Warteschlange: %%POSITION%%.", + "adding": "\/me @%%NAME%% wurde der Warteschlange hinzugef\u00fcgt. Derzeitige Position in der Warteschlange: %%POSITION%%.", "usernotfound": "\/me Benutzer nicht gefunden.", "notdisconnected": "\/me @%%NAME%%s Verbindung wurde in meiner Zeit hier nicht getrennt.", "noposition": "\/me Letzte Position unbekannt. Die Warteschlange muss sich mindestens einmal aktualisieren, um die letzte Position eines Benutzers zu registrieren.", "toolongago": "\/me @%%NAME%%s letzter Verbindungsabbruch ist zu lange her: %%TIME%%.", "valid": "\/me @%%NAME%%s Verbindung brach vor %%TIME%% ab und sollte an der Position %%POSITION%% stehen.", "warning1": "\/me @%%NAME%%, du warst f\u00fcr %%TIME%% AFK. Bitte antworte in den n\u00e4chsten 2 Minuten oder du wirst entfernt.", - "warning2": "\/me @%%NAME%%, du wirst bald aufgrund von AFK entfernt, falls du nicht antwortest.", + "warning2": "\/me @%%NAME%%, du wirst bald entfernt, weil du AFK bist, falls du nicht antwortest.", "afkremove": "\/me @%%NAME%%, du wurdest entfernt, da du f\u00fcr %%TIME%% AFK warst. Du warst auf Position %%POSITION%%. Chatte mindestens einmal alle %%MAXIMUMAFK%% Minuten, wenn du einen Song spielen m\u00f6chtest.", "caps": "\/me @%%NAME%%, l\u00f6se bitte deine Feststelltaste los.", "askskip": "\/me @%%NAME%%, verlange kein \u00dcberspringen.", "spam": "\/me @%%NAME%%, spamme bitte nicht.", "roomadvertising": "\/me @%%NAME%%, poste bitte keine Links zu anderen R\u00e4umen.", "adfly": "\/me @%%NAME%%, bitte \u00e4ndere dein Autowootprogramm. Wir empfehlen PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Schlagw\u00f6rter: %%TAGS%%]", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Schlagw\u00f6rter: %%TAGS%%]", "invalidgiftags": "\/me [@%%NAME%%] Ung\u00fcltige Schlagw\u00f6rter. Versuche etwas Anderes. [Schlagw\u00f6rter: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Zuf\u00e4llige GIF]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Zuf\u00e4llige GIF]", "invalidgifrandom": "\/me [@%%NAME%%] Ung\u00fcltige Anfrage. Versuche es erneut.", "invalidtime": "\/me [@%%NAME%%] Ung\u00fcltig festgelegte Zeit.", "nouserspecified": "\/me [@%%NAME%%] Kein Benutzer festgelegt.", @@ -105,7 +105,7 @@ "invalidlimitspecified": "\/me [@%%NAME%%] Ung\u00fcltiges Limit.", "invalidpositionspecified": "\/me [@%%NAME%%] Ung\u00fcltige Position festgelegt.", "whois": "\/me [%%NAME1%%] Benutzername: %%NAME2%%, ID: %%ID%%, Rang: %%RANK%%, Beigetreten: %%JOINED%%, Level: %%LEVEL%%, Sprache: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", - "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% freigeschaltet.", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% aktiviert.", "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% deaktiviert.", "cmddeletion": "Befehll\u00f6schung", "afkremoval": "AFK Entfernung", @@ -114,7 +114,7 @@ "autodisable": "Autodeaktivierung", "autoskip": "Autoskip", "newblacklisted": "\/me [@%%NAME%%] Dieser Song ist auf der %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", - "blinfo": "[@%%NAME%%] Blacklist Info - author: %%AUTHOR%%, Titel: %%TITLE%%, mid: %%SONGID%%", + "blinfo": "[@%%NAME%%] Blacklist Informationen - Autor: %%AUTHOR%%, Titel: %%TITLE%%, mid: %%SONGID%%", "blacklist": "blacklist", "cycleguard": "cycleguard", "timeguard": "timeguard", @@ -133,16 +133,16 @@ "voteskipinvalidlimit": "\/me [@%%NAME%%] Ung\u00fcltiges Voteskip Limit, bitte gib eine Nummer ein, um dies einzustellen.", "voteskipsetlimit": "\/me [@%%NAME%%] Voteskip limit ist eingestellt auf %%LIMIT%%.", "activeusersintime": "\/me [@%%NAME%%] %%AMOUNT%% Benutzer haben in den letzten %%TIME%% Minuten gechattet.", - "maximumafktimeset": "\/me [@%%NAME%%] Die maximal erlaubte AFK Zeit liebt bei %%TIME%% Minuten.", + "maximumafktimeset": "\/me [@%%NAME%%] Die maximal erlaubte AFK Zeit liegt bei %%TIME%% Minuten.", "afkstatusreset": "\/me [@%%NAME%%] Resette den AFK status von @%%USERNAME%%.", - "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ist inactiv seid %%TIME%%.", - "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% war l\u00e4nger inactiv als %%BOTNAME%%'s online ist.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ist inaktiv seit %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% war l\u00e4nger inaktiv als %%BOTNAME%%'s online ist.", "autowoot": "\/me Wir empfehlen PlugCubed f\u00fcr autowooting: http:\/\/plugcubed.net\/", "brandambassador": "\/me A Brand Ambassador ist die Stimme der plug.dj users. Sie promoten und unterst\u00fctzen die Community und teilen die Plug.Dj Nachricht \u00fcber die ganze Welt.https:\/\/plug.dj\/ba", "bouncerplusrank": "\/me [@%%NAME%%] Du musst ein Manager sein oder die F\u00e4higkeit haben, Bouncer+ zu aktivieren.", "chatcleared": "\/me [@%%NAME%%] hat den Chat gereinigt.", "deletechat": "\/me [@%%NAME%%] hat alle Nachrichten von %%USERNAME%% entfernt.", - "commandslink": "\/me %%BOTNAME%% Commands: %%LINK%%", + "commandslink": "\/me %%BOTNAME%% Befehle: %%LINK%%", "eatcookie": "\/me isst einen Keks.", "nousercookie": "\/em sieht %%NAME%% nicht im Raum und isst den Keks selber.", "selfcookie": "\/me @%%NAME%%, du bist heute nicht so gut drauf, oder? Gibt sich selbst einfach einen Keks. Teile es lieber mit anderen Menschen!", @@ -156,14 +156,14 @@ "eta": "\/me @%%NAME%%, du bist in der Position %%POSITION%% in der Warteliste und wirst in ungef\u00e4hr %%TIME%% Minuten dran sein.", "facebook": "\/me Like uns auf facebook: %%LINK%%", "starterhelp": "\/me Dieses Bild hilft dir, auf Plug.Dj klar zu kommen: %%LINK%%", - "roulettejoin": "@%%NAME%% ist dem Roulette beigetreten (F\u00fcr den Befehl !leave aus, wenn du es verlassen willst).", - "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ist schon im Chatraum seid %%TIME%% Minuten.", - "kickrank": "\/me [@%%NAME%%] Du kannst keine Benutzer mit einem Rank, der gleich oder h\u00f6her als deiner ist!", + "roulettejoin": "@%%NAME%% ist dem Roulette beigetreten (F\u00fchr den Befehl !leave aus, wenn du es verlassen willst).", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ist schon im Chatraum seit %%TIME%% Minuten.", + "kickrank": "\/me [@%%NAME%%] Du kannst keine Benutzer kicken, die den gleichen oder einen h\u00f6heren Rang als du haben!", "kick": "\/me [@%%NAME%%], @%%USERNAME%% du wurdest von der Community verbannt f\u00fcr %%TIME%% Minuten.", "kill": "\/me Fahre herunter.", - "logout": "\/me [@%%NAME%%] Loge mich aus %%BOTNAME%%", + "logout": "\/me [@%%NAME%%] Logge mich aus %%BOTNAME%%", "rouletteleave": "\/me @%%NAME%% hat das Roulette verlassen!", - "songlink": "\/me [@%%NAME%%] Link zum momentanen song: %%LINK%%", + "songlink": "\/me [@%%NAME%%] Link zum momentanen Song: %%LINK%%", "usedlockskip": "\/me [%%NAME%% hat lockskip benutzt.", "usedskip": "\/me [%%NAME%% hat skip benutzt.", "skippos": "\/me [@%%NAME%%] Djs werden von nun auf Position %%POSITION%% verschoben, wenn sie \u00fcbersprungen wurden.", @@ -179,18 +179,18 @@ "mutedmaxtime": "\/me [@%%NAME%%] Du kannst Benutzer maximal f\u00fcr %%TIME%% Minuten stumm schalten.", "mutedtime": "\/me [@%%NAME%%] Muted @%%USERNAME%% f\u00fcr %%TIME%% Minuten.", "unmuted": "\/me [@%%NAME%%] Unmuted @%%USERNAME%%.", - "muterank": "\/me [@%%NAME%%] Du kannst Benutzer mit einem Rank, welcher gleich oder h\u00f6her ist, muten.", + "muterank": "\/me [@%%NAME%%] Du kannst Benutzer nicht stumm schalten, welche den gleichen oder einen h\u00f6heren Rang als du haben.", "oplist": "\/me OP Liste: %%LINK%%", "pong": "\/me Pong!", "reload": "\/me Bin gleich zur\u00fcck.", "removenotinwl": "\/me [@%%NAME%%] Benutzer @%%USERNAME%% ist nicht auf der Warteliste.", "roomrules": "\/me Du kannst die Regeln f\u00fcr den Chatroom hier finden: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", - "forceskip": "\/me [%%NAME%% hatforceskip benutzt]", + "forceskip": "\/me [%%NAME%% hat forceskip benutzt]", "madeby": "\/me Der Bot wurde entwickelt von %%NAME%%.", - "activefor": "Ich bin inaktiv seid %%TIME%%.", + "activefor": "Ich bin inaktiv seit %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] Ung\u00fcltiger Benutzer festgelegt. (Keine Namen mit einem Leerzeichen!)", - "swapwlonly": "\/me [@%%NAME%%] Bitte vertausch nur Benutzer, die in der Warteliste sind", + "swapwlonly": "\/me [@%%NAME%%] Bitte vertausch nur Benutzer, die in der Warteliste sind!", "swapping": "\/me Vertausche %%NAME1%% mit %%NAME2%%.", "genres": "\/me Du kannst die Chatroom Genres hier finden: %%LINK%%", "notbanned": "\/me [@%%NAME%%] Der Benutzer ist nicht gesperrt.", From b2d5bef28cb1421660bda6b7f0b52ecd805d3b24 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 9 Jul 2015 18:33:20 +0100 Subject: [PATCH 187/281] Updated de.json file --- lang/de.json | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/lang/de.json b/lang/de.json index 73887998..2eb848d0 100644 --- a/lang/de.json +++ b/lang/de.json @@ -3,7 +3,7 @@ "hat dir einen leckeren Schokoladen Keks gegeben!", "hat dir einen selbstgemachten Haferfloken Keks gegeben!", "hat dir einen schmucklosen, dreckigen und alten Keks gegeben. Es war der letzte in seinem Rucksack. Toll.", - "hat dir einen Zucker Cookie gegeben. Was, kein Zuckerguss und Streuseln? 0\/10 w\u00fcrden es nicht essen.", + "hat dir ein Zuckerpl\u00e4tzchen gegeben. Was, kein Zuckerguss und Streuseln? 0\/10 w\u00fcrden es nicht essen.", "gibt dir einen Schokoladen Keks. Oh Warte, da sind Rosinen drine. Bleck!", "gibt dir einen riesigen Keks.", "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Warum arbeitest du momentan an keinen Projekten?\"", @@ -13,11 +13,11 @@ "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Vergiss nicht, dein Gem\u00fcse zu essen!\"", "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Do you even lift\"?", "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"m808 pls!\"", - "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Wenn du deine H\u00fcften bewegest, bekommst du alle Frauen.\"", + "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Wenn du deine H\u00fcften bewegst, bekommst du alle Frauen.\"", "gibt dir einen Gl\u00fcckskeks. Darauf steht: \"Ich liebe dich!\"", "gibt dir einen goldenen Keks. Du kannst ihn nicht essen, da er aus Gold ist. Verdammt!", "gibt dir einen Oreo Keks mit einem Glas Milch!", - "gibt dir einen Regenbogen Keks gemacht mit Liebe :heart:", + "gibt dir einen Regenbogen Keks gemacht mit Liebe <3", "gibt dir einen alten Keks, der im Regen gelassen wurde. Er ist schimmlig.", "backt dir einen frischen Keks, er schmeckt wunderbar." ], @@ -63,11 +63,11 @@ "datarestored": "Zuvor gespeicherte Daten erfolgreich abgerufen.", "greyuser": "Nur Bouncer und aufw\u00e4rts k\u00f6nnen den Bot betreiben.", "bouncer": "Der Bot kann keine Leute in der Warteliste verschieben, wenn er von einem Bouncer betrieben wird.", - "online": "\/me %%BOTNAME%% v%%VERSION%% online!", + "online": "\/me %%BOTNAME%% v%%VERSION%% ist online!", "welcome": "\/me Willkommen %%NAME%%", "welcomeback": "\/me Willkommen zur\u00fcck, %%NAME%%", - "songknown": "\/me @%%NAME%%, dieser Song ist im Verlauf.", - "notavailable": "\/me @%%NAME%% dieser Song war nicht verf\u00fcgbar.", + "songknown": "\/me @%%NAME%%, dieser Song ist im DJ Verlauf.", + "notavailable": "\/me @%%NAME%% der Song, den du gespielt hast, war nicht verf\u00fcgbar.", "timelimit": "\/me @%%NAME%%, dein Song \u00fcberschreitet die Maximall\u00e4nge von %%MAXLENGTH%% Minuten. Du ben\u00f6tigst eine Erlaubnis, um l\u00e4ngere Songs spielen zu k\u00f6nnen.", "permissionownsong": "\/me :up: @%%NAME%% hat die Erlaubnis, seine eigene Produktion zu spielen.", "isblacklisted": "\/me Dieser Song steht auf der %%BLACKLIST%% Blacklist! \u00dcberspringe...", @@ -77,23 +77,23 @@ "notghosting": "[%%NAME1%%] %%NAME2%% ghostet nicht.", "ghosting": "[%%NAME1%%] %%NAME2%% ghostet entweder oder ist nicht hier.", "alreadyadding": "\/me Benutzer wird bereits hinzugef\u00fcgt! Die gew\u00fcnschte Position wurde zu %%POSITION%% ge\u00e4ndert.", - "adding": "\/me @%%NAME%% wurde der Warteschlange hinzugef\u00fcgt. Derzeitige Warteschlange: %%POSITION%%.", + "adding": "\/me @%%NAME%% wurde der Warteschlange hinzugef\u00fcgt. Derzeitige Position in der Warteschlange: %%POSITION%%.", "usernotfound": "\/me Benutzer nicht gefunden.", "notdisconnected": "\/me @%%NAME%%s Verbindung wurde in meiner Zeit hier nicht getrennt.", "noposition": "\/me Letzte Position unbekannt. Die Warteschlange muss sich mindestens einmal aktualisieren, um die letzte Position eines Benutzers zu registrieren.", "toolongago": "\/me @%%NAME%%s letzter Verbindungsabbruch ist zu lange her: %%TIME%%.", "valid": "\/me @%%NAME%%s Verbindung brach vor %%TIME%% ab und sollte an der Position %%POSITION%% stehen.", "warning1": "\/me @%%NAME%%, du warst f\u00fcr %%TIME%% AFK. Bitte antworte in den n\u00e4chsten 2 Minuten oder du wirst entfernt.", - "warning2": "\/me @%%NAME%%, du wirst bald aufgrund von AFK entfernt, falls du nicht antwortest.", + "warning2": "\/me @%%NAME%%, du wirst bald entfernt, weil du AFK bist, falls du nicht antwortest.", "afkremove": "\/me @%%NAME%%, du wurdest entfernt, da du f\u00fcr %%TIME%% AFK warst. Du warst auf Position %%POSITION%%. Chatte mindestens einmal alle %%MAXIMUMAFK%% Minuten, wenn du einen Song spielen m\u00f6chtest.", "caps": "\/me @%%NAME%%, l\u00f6se bitte deine Feststelltaste los.", "askskip": "\/me @%%NAME%%, verlange kein \u00dcberspringen.", "spam": "\/me @%%NAME%%, spamme bitte nicht.", "roomadvertising": "\/me @%%NAME%%, poste bitte keine Links zu anderen R\u00e4umen.", "adfly": "\/me @%%NAME%%, bitte \u00e4ndere dein Autowootprogramm. Wir empfehlen PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Schlagw\u00f6rter: %%TAGS%%]", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Schlagw\u00f6rter: %%TAGS%%]", "invalidgiftags": "\/me [@%%NAME%%] Ung\u00fcltige Schlagw\u00f6rter. Versuche etwas Anderes. [Schlagw\u00f6rter: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Zuf\u00e4llige GIF]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Zuf\u00e4llige GIF]", "invalidgifrandom": "\/me [@%%NAME%%] Ung\u00fcltige Anfrage. Versuche es erneut.", "invalidtime": "\/me [@%%NAME%%] Ung\u00fcltig festgelegte Zeit.", "nouserspecified": "\/me [@%%NAME%%] Kein Benutzer festgelegt.", @@ -105,7 +105,7 @@ "invalidlimitspecified": "\/me [@%%NAME%%] Ung\u00fcltiges Limit.", "invalidpositionspecified": "\/me [@%%NAME%%] Ung\u00fcltige Position festgelegt.", "whois": "\/me [%%NAME1%%] Benutzername: %%NAME2%%, ID: %%ID%%, Rang: %%RANK%%, Beigetreten: %%JOINED%%, Level: %%LEVEL%%, Sprache: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", - "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% freigeschaltet.", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% aktiviert.", "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% deaktiviert.", "cmddeletion": "Befehll\u00f6schung", "afkremoval": "AFK Entfernung", @@ -114,7 +114,7 @@ "autodisable": "Autodeaktivierung", "autoskip": "Autoskip", "newblacklisted": "\/me [@%%NAME%%] Dieser Song ist auf der %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", - "blinfo": "[@%%NAME%%] Blacklist Info - author: %%AUTHOR%%, Titel: %%TITLE%%, mid: %%SONGID%%", + "blinfo": "[@%%NAME%%] Blacklist Informationen - Autor: %%AUTHOR%%, Titel: %%TITLE%%, mid: %%SONGID%%", "blacklist": "blacklist", "cycleguard": "cycleguard", "timeguard": "timeguard", @@ -133,16 +133,16 @@ "voteskipinvalidlimit": "\/me [@%%NAME%%] Ung\u00fcltiges Voteskip Limit, bitte gib eine Nummer ein, um dies einzustellen.", "voteskipsetlimit": "\/me [@%%NAME%%] Voteskip limit ist eingestellt auf %%LIMIT%%.", "activeusersintime": "\/me [@%%NAME%%] %%AMOUNT%% Benutzer haben in den letzten %%TIME%% Minuten gechattet.", - "maximumafktimeset": "\/me [@%%NAME%%] Die maximal erlaubte AFK Zeit liebt bei %%TIME%% Minuten.", + "maximumafktimeset": "\/me [@%%NAME%%] Die maximal erlaubte AFK Zeit liegt bei %%TIME%% Minuten.", "afkstatusreset": "\/me [@%%NAME%%] Resette den AFK status von @%%USERNAME%%.", - "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ist inactiv seid %%TIME%%.", - "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% war l\u00e4nger inactiv als %%BOTNAME%%'s online ist.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% ist inaktiv seit %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% war l\u00e4nger inaktiv als %%BOTNAME%%'s online ist.", "autowoot": "\/me Wir empfehlen PlugCubed f\u00fcr autowooting: http:\/\/plugcubed.net\/", "brandambassador": "\/me A Brand Ambassador ist die Stimme der plug.dj users. Sie promoten und unterst\u00fctzen die Community und teilen die Plug.Dj Nachricht \u00fcber die ganze Welt.https:\/\/plug.dj\/ba", "bouncerplusrank": "\/me [@%%NAME%%] Du musst ein Manager sein oder die F\u00e4higkeit haben, Bouncer+ zu aktivieren.", "chatcleared": "\/me [@%%NAME%%] hat den Chat gereinigt.", "deletechat": "\/me [@%%NAME%%] hat alle Nachrichten von %%USERNAME%% entfernt.", - "commandslink": "\/me %%BOTNAME%% Commands: %%LINK%%", + "commandslink": "\/me %%BOTNAME%% Befehle: %%LINK%%", "eatcookie": "\/me isst einen Keks.", "nousercookie": "\/em sieht %%NAME%% nicht im Raum und isst den Keks selber.", "selfcookie": "\/me @%%NAME%%, du bist heute nicht so gut drauf, oder? Gibt sich selbst einfach einen Keks. Teile es lieber mit anderen Menschen!", @@ -156,14 +156,14 @@ "eta": "\/me @%%NAME%%, du bist in der Position %%POSITION%% in der Warteliste und wirst in ungef\u00e4hr %%TIME%% Minuten dran sein.", "facebook": "\/me Like uns auf facebook: %%LINK%%", "starterhelp": "\/me Dieses Bild hilft dir, auf Plug.Dj klar zu kommen: %%LINK%%", - "roulettejoin": "@%%NAME%% ist dem Roulette beigetreten (F\u00fcr den Befehl !leave aus, wenn du es verlassen willst).", - "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ist schon im Chatraum seid %%TIME%% Minuten.", - "kickrank": "\/me [@%%NAME%%] Du kannst keine Benutzer mit einem Rank, der gleich oder h\u00f6her als deiner ist!", + "roulettejoin": "@%%NAME%% ist dem Roulette beigetreten (F\u00fchr den Befehl !leave aus, wenn du es verlassen willst).", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% ist schon im Chatraum seit %%TIME%% Minuten.", + "kickrank": "\/me [@%%NAME%%] Du kannst keine Benutzer kicken, die den gleichen oder einen h\u00f6heren Rang als du haben!", "kick": "\/me [@%%NAME%%], @%%USERNAME%% du wurdest von der Community verbannt f\u00fcr %%TIME%% Minuten.", "kill": "\/me Fahre herunter.", - "logout": "\/me [@%%NAME%%] Loge mich aus %%BOTNAME%%", + "logout": "\/me [@%%NAME%%] Logge mich aus %%BOTNAME%%", "rouletteleave": "\/me @%%NAME%% hat das Roulette verlassen!", - "songlink": "\/me [@%%NAME%%] Link zum momentanen song: %%LINK%%", + "songlink": "\/me [@%%NAME%%] Link zum momentanen Song: %%LINK%%", "usedlockskip": "\/me [%%NAME%% hat lockskip benutzt.", "usedskip": "\/me [%%NAME%% hat skip benutzt.", "skippos": "\/me [@%%NAME%%] Djs werden von nun auf Position %%POSITION%% verschoben, wenn sie \u00fcbersprungen wurden.", @@ -179,18 +179,18 @@ "mutedmaxtime": "\/me [@%%NAME%%] Du kannst Benutzer maximal f\u00fcr %%TIME%% Minuten stumm schalten.", "mutedtime": "\/me [@%%NAME%%] Muted @%%USERNAME%% f\u00fcr %%TIME%% Minuten.", "unmuted": "\/me [@%%NAME%%] Unmuted @%%USERNAME%%.", - "muterank": "\/me [@%%NAME%%] Du kannst Benutzer mit einem Rank, welcher gleich oder h\u00f6her ist, muten.", + "muterank": "\/me [@%%NAME%%] Du kannst Benutzer nicht stumm schalten, welche den gleichen oder einen h\u00f6heren Rang als du haben.", "oplist": "\/me OP Liste: %%LINK%%", "pong": "\/me Pong!", "reload": "\/me Bin gleich zur\u00fcck.", "removenotinwl": "\/me [@%%NAME%%] Benutzer @%%USERNAME%% ist nicht auf der Warteliste.", "roomrules": "\/me Du kannst die Regeln f\u00fcr den Chatroom hier finden: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", - "forceskip": "\/me [%%NAME%% hatforceskip benutzt]", + "forceskip": "\/me [%%NAME%% hat forceskip benutzt]", "madeby": "\/me Der Bot wurde entwickelt von %%NAME%%.", - "activefor": "Ich bin inaktiv seid %%TIME%%.", + "activefor": "Ich bin inaktiv seit %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] Ung\u00fcltiger Benutzer festgelegt. (Keine Namen mit einem Leerzeichen!)", - "swapwlonly": "\/me [@%%NAME%%] Bitte vertausch nur Benutzer, die in der Warteliste sind", + "swapwlonly": "\/me [@%%NAME%%] Bitte vertausch nur Benutzer, die in der Warteliste sind!", "swapping": "\/me Vertausche %%NAME1%% mit %%NAME2%%.", "genres": "\/me Du kannst die Chatroom Genres hier finden: %%LINK%%", "notbanned": "\/me [@%%NAME%%] Der Benutzer ist nicht gesperrt.", From 7ca6b1bf4bb165196670d3175db16729ee0b1e64 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 10 Jul 2015 15:56:11 +0100 Subject: [PATCH 188/281] Moved autoskip under settings. --- basicBot.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/basicBot.js b/basicBot.js index d6f1963a..e4a5b632 100644 --- a/basicBot.js +++ b/basicBot.js @@ -157,7 +157,7 @@ basicBot.room.afkList = room.afkList; basicBot.room.historyList = room.historyList; basicBot.room.mutedUsers = room.mutedUsers; - basicBot.room.autoskip = room.autoskip; + //basicBot.room.autoskip = room.autoskip; basicBot.room.roomstats = room.roomstats; basicBot.room.messages = room.messages; basicBot.room.queue = room.queue; @@ -256,6 +256,7 @@ startupVolume: 0, // 0-100 startupEmoji: false, // true or false autowoot: true, + autoskip: false, smartSkip: true, cmdDeletion: true, maximumAfk: 120, @@ -320,7 +321,7 @@ usercommand: true, allcommand: true, afkInterval: null, - autoskip: false, + //autoskip: false, autoskipTimer: null, autodisableInterval: null, autodisableFunc: function () { @@ -1057,7 +1058,7 @@ user.ownSong = false; } clearTimeout(basicBot.room.autoskipTimer); - if (basicBot.room.autoskip) { + if (basicBot.settings.autoskip) { var remaining = obj.media.duration * 1000; var startcid = API.getMedia().cid; basicBot.room.autoskipTimer = setTimeout(function() { @@ -1673,13 +1674,13 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - if (basicBot.room.autoskip) { - basicBot.room.autoskip = !basicBot.room.autoskip; + if (basicBot.settings.autoskip) { + basicBot.settings.autoskip = !basicBot.settings.autoskip; clearTimeout(basicBot.room.autoskipTimer); return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); } else { - basicBot.room.autoskip = !basicBot.room.autoskip; + basicBot.settings.autoskip = !basicBot.settings.autoskip; return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); } } @@ -3148,7 +3149,7 @@ msg += '. '; msg += basicBot.chat.autoskip + ': '; - if (basicBot.room.autoskip) msg += 'ON'; + if (basicBot.settings.autoskip) msg += 'ON'; else msg += 'OFF'; msg += '. '; From a50a846a774208e077248a0aa0c34af9413e9067 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 10 Jul 2015 15:56:11 +0100 Subject: [PATCH 189/281] Moved autoskip under settings. --- basicBot.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/basicBot.js b/basicBot.js index ab0d965b..a112bdd7 100644 --- a/basicBot.js +++ b/basicBot.js @@ -157,7 +157,7 @@ basicBot.room.afkList = room.afkList; basicBot.room.historyList = room.historyList; basicBot.room.mutedUsers = room.mutedUsers; - basicBot.room.autoskip = room.autoskip; + //basicBot.room.autoskip = room.autoskip; basicBot.room.roomstats = room.roomstats; basicBot.room.messages = room.messages; basicBot.room.queue = room.queue; @@ -256,6 +256,7 @@ startupVolume: 0, // 0-100 startupEmoji: false, // true or false autowoot: true, + autoskip: false, smartSkip: true, cmdDeletion: true, maximumAfk: 120, @@ -320,7 +321,7 @@ usercommand: true, allcommand: true, afkInterval: null, - autoskip: false, + //autoskip: false, autoskipTimer: null, autodisableInterval: null, autodisableFunc: function () { @@ -1057,7 +1058,7 @@ user.ownSong = false; } clearTimeout(basicBot.room.autoskipTimer); - if (basicBot.room.autoskip) { + if (basicBot.settings.autoskip) { var remaining = obj.media.duration * 1000; var startcid = API.getMedia().cid; basicBot.room.autoskipTimer = setTimeout(function() { @@ -1673,13 +1674,13 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - if (basicBot.room.autoskip) { - basicBot.room.autoskip = !basicBot.room.autoskip; + if (basicBot.settings.autoskip) { + basicBot.settings.autoskip = !basicBot.settings.autoskip; clearTimeout(basicBot.room.autoskipTimer); return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); } else { - basicBot.room.autoskip = !basicBot.room.autoskip; + basicBot.settings.autoskip = !basicBot.settings.autoskip; return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); } } @@ -3148,7 +3149,7 @@ msg += '. '; msg += basicBot.chat.autoskip + ': '; - if (basicBot.room.autoskip) msg += 'ON'; + if (basicBot.settings.autoskip) msg += 'ON'; else msg += 'OFF'; msg += '. '; From fd1797f4453a16b387030cdfbeb0226d3014173f Mon Sep 17 00:00:00 2001 From: Moondye7 Date: Sat, 11 Jul 2015 00:12:24 +0200 Subject: [PATCH 190/281] Update commands.md --- commands.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/commands.md b/commands.md index 6a967bc3..a16d618d 100644 --- a/commands.md +++ b/commands.md @@ -12,11 +12,14 @@ Manager |:------:|:---------:|:--------------------------------------:| |!afklimit | X | sets the maximum afk time | |!botname | (botname) | change the default bot name | +|!bouncer+ | | disable bouncer+ | +|!skippos | X | set the position to which skip and lockskip moves the dj | |!clearchat | |clears the chat | |!cycle | | toggle DJ cycle | |!cycletimer | X | set the maximum DJ cycle time for when cycleguard is enabled | |!language | (language) | specify the language you would like the bot to use | |!locktimer | X | set the maximum time the waitlist can be locked if lockguard is enabled | +|!maxlength | X | specify the maximum length a song can be when timeguard is enabled | |!logout | | logs out account bot is hosted on | |!refresh | | refreshes the browser of whoever runs the bot | |!usercmdcd | X | set the cooldown on commands by grey users | @@ -31,11 +34,9 @@ Bouncer+ |!add | @user | add user to the waitlist | |!afkremoval | | toggles the afk check | |!autoskip | | skips songs automatically when they're done (use when the circles-bug happens) | -|!bouncer+ | | disable bouncer+ | |~~!deletechat~~ | ~~@user~~ | ~~delete all the chats by a certain user~~ | |!lock | | lock the waitlist | |!lockdown | | lock down the room: only staff can chat | -|!maxlength | X | specify the maximum length a song can be when timeguard is enabled | |!move | @user (X) | moves user to position X on the waitlist, default is position 1 | |!remove | @user | remove user from the waitlist | |!roulette | | start a roulette | @@ -54,6 +55,7 @@ Bouncer |!autodisable | | toggle the autodisable | |!ban | @user | bans user for 1 day | |!blacklist / !bl | blacklistname | add the song to the specified blacklist | +|!commanddeletion | | toggles if bot commands gets deleted | |!blinfo | | get information required to blacklist a song | |!cycleguard | | toggles the cycleguard | |!dclookup / !dc | (@user) | do dclookup for user | @@ -73,7 +75,7 @@ Bouncer |!restricteta | | toggles the restriction on eta: grey users can use it once an hour | |!sessionstats | | display stats for the current session | |!skip | (reason) | skips the dj using smartskip. actions such as locking and moving user depends on various factors (the position the dj is moved to can be set with !skippos) | -|!skippos | X | set the position to which skip and lockskip moves the dj | +|!historyskip | | skips all songs in the dj history | |!status | | display the bot's status and some settings | |!timeguard | | toggle the timeguard | |!togglebl | | toggle the blacklist | From 814e8baea782d3e185b313c9154273e379994496 Mon Sep 17 00:00:00 2001 From: Moondye7 Date: Sat, 11 Jul 2015 00:12:24 +0200 Subject: [PATCH 191/281] Update commands.md --- commands.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/commands.md b/commands.md index 6a967bc3..a16d618d 100644 --- a/commands.md +++ b/commands.md @@ -12,11 +12,14 @@ Manager |:------:|:---------:|:--------------------------------------:| |!afklimit | X | sets the maximum afk time | |!botname | (botname) | change the default bot name | +|!bouncer+ | | disable bouncer+ | +|!skippos | X | set the position to which skip and lockskip moves the dj | |!clearchat | |clears the chat | |!cycle | | toggle DJ cycle | |!cycletimer | X | set the maximum DJ cycle time for when cycleguard is enabled | |!language | (language) | specify the language you would like the bot to use | |!locktimer | X | set the maximum time the waitlist can be locked if lockguard is enabled | +|!maxlength | X | specify the maximum length a song can be when timeguard is enabled | |!logout | | logs out account bot is hosted on | |!refresh | | refreshes the browser of whoever runs the bot | |!usercmdcd | X | set the cooldown on commands by grey users | @@ -31,11 +34,9 @@ Bouncer+ |!add | @user | add user to the waitlist | |!afkremoval | | toggles the afk check | |!autoskip | | skips songs automatically when they're done (use when the circles-bug happens) | -|!bouncer+ | | disable bouncer+ | |~~!deletechat~~ | ~~@user~~ | ~~delete all the chats by a certain user~~ | |!lock | | lock the waitlist | |!lockdown | | lock down the room: only staff can chat | -|!maxlength | X | specify the maximum length a song can be when timeguard is enabled | |!move | @user (X) | moves user to position X on the waitlist, default is position 1 | |!remove | @user | remove user from the waitlist | |!roulette | | start a roulette | @@ -54,6 +55,7 @@ Bouncer |!autodisable | | toggle the autodisable | |!ban | @user | bans user for 1 day | |!blacklist / !bl | blacklistname | add the song to the specified blacklist | +|!commanddeletion | | toggles if bot commands gets deleted | |!blinfo | | get information required to blacklist a song | |!cycleguard | | toggles the cycleguard | |!dclookup / !dc | (@user) | do dclookup for user | @@ -73,7 +75,7 @@ Bouncer |!restricteta | | toggles the restriction on eta: grey users can use it once an hour | |!sessionstats | | display stats for the current session | |!skip | (reason) | skips the dj using smartskip. actions such as locking and moving user depends on various factors (the position the dj is moved to can be set with !skippos) | -|!skippos | X | set the position to which skip and lockskip moves the dj | +|!historyskip | | skips all songs in the dj history | |!status | | display the bot's status and some settings | |!timeguard | | toggle the timeguard | |!togglebl | | toggle the blacklist | From 36ae3772eef01a786611414b8a0f89b4daa2d7b1 Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 10 Jul 2015 23:39:51 +0100 Subject: [PATCH 192/281] Updated commands list and changed bouncer+ permission - Removed duplicate - Changed bouncer+ permission from mod to manager --- basicBot.js | 2 +- commands.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index e4a5b632..527e4a7a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1811,7 +1811,7 @@ bouncerPlusCommand: { command: 'bouncer+', - rank: 'mod', + rank: 'manager', type: 'exact', functionality: function (chat, cmd) { if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); diff --git a/commands.md b/commands.md index a16d618d..9d06417d 100644 --- a/commands.md +++ b/commands.md @@ -12,7 +12,7 @@ Manager |:------:|:---------:|:--------------------------------------:| |!afklimit | X | sets the maximum afk time | |!botname | (botname) | change the default bot name | -|!bouncer+ | | disable bouncer+ | +|!bouncer+ | | toggle bouncer+ | |!skippos | X | set the position to which skip and lockskip moves the dj | |!clearchat | |clears the chat | |!cycle | | toggle DJ cycle | @@ -75,7 +75,6 @@ Bouncer |!restricteta | | toggles the restriction on eta: grey users can use it once an hour | |!sessionstats | | display stats for the current session | |!skip | (reason) | skips the dj using smartskip. actions such as locking and moving user depends on various factors (the position the dj is moved to can be set with !skippos) | -|!historyskip | | skips all songs in the dj history | |!status | | display the bot's status and some settings | |!timeguard | | toggle the timeguard | |!togglebl | | toggle the blacklist | From 19c29c9971c587d5add39e14f4a080010ddc8dad Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 10 Jul 2015 23:39:51 +0100 Subject: [PATCH 193/281] Updated commands list and changed bouncer+ permission - Removed duplicate - Changed bouncer+ permission from mod to manager --- basicBot.js | 2 +- commands.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/basicBot.js b/basicBot.js index a112bdd7..dfcc85c8 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1811,7 +1811,7 @@ bouncerPlusCommand: { command: 'bouncer+', - rank: 'mod', + rank: 'manager', type: 'exact', functionality: function (chat, cmd) { if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); diff --git a/commands.md b/commands.md index a16d618d..9d06417d 100644 --- a/commands.md +++ b/commands.md @@ -12,7 +12,7 @@ Manager |:------:|:---------:|:--------------------------------------:| |!afklimit | X | sets the maximum afk time | |!botname | (botname) | change the default bot name | -|!bouncer+ | | disable bouncer+ | +|!bouncer+ | | toggle bouncer+ | |!skippos | X | set the position to which skip and lockskip moves the dj | |!clearchat | |clears the chat | |!cycle | | toggle DJ cycle | @@ -75,7 +75,6 @@ Bouncer |!restricteta | | toggles the restriction on eta: grey users can use it once an hour | |!sessionstats | | display stats for the current session | |!skip | (reason) | skips the dj using smartskip. actions such as locking and moving user depends on various factors (the position the dj is moved to can be set with !skippos) | -|!historyskip | | skips all songs in the dj history | |!status | | display the bot's status and some settings | |!timeguard | | toggle the timeguard | |!togglebl | | toggle the blacklist | From c89b1dc9c127776246bb797e98d7ea236e0e9766 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 11 Jul 2015 22:35:02 +0100 Subject: [PATCH 194/281] Updated README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f34eb309..f28654f0 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ basicBot ======== -A not so basic bot for plug.dj +A not so basic bot for plug.dj -[GET THE GOOGLE CHROME EXTENSION HERE!!!](http://s.benzi.io/bscbtxtnsn) +[Get the Chrome Extension](https://chrome.google.com/webstore/detail/basicbot/bjinmbkeneigmkkkpcmcokphbjkepeie) --------------------------------------------------------------------- [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/***REMOVED***/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.benzi.io/97dW.svg)](https://facebook.com/groups/basicBot) [![twitter](http://i.benzi.io/4KEn.svg)](https://twitter.com/bscBt) @@ -12,7 +12,7 @@ Stay updated on **basicBot**'s development by following the project on Twitter [ Created by [***REMOVED***](https://github.com/***REMOVED***) but now maintained by [Benzi](https://github.com/Benzi). -(You can email me via hi@benzi.io or send me a message on [Gitter](https://gitter.im/Benzi) if you have any queries about the bot) +(You can email me via [bnz.mngn@gmail.com](mailto:bnz.mngn@gmail.com) or send me a message on [Gitter](https://gitter.im/Benzi) if you have any queries about the bot) !!!TO CUSTOMIZE: USE [THIS REPOSITORY](https://github.com/***REMOVED***/basicBot-customization)!!! ============================================================================================== @@ -103,8 +103,8 @@ Disclaimer ---------- This bot is developed independently. Changes may be made without notice. There is no guarantee for the bot to be functioning perfectly. -Plug.dj admins have the right to request changes. -By using this chatbot you agree to not use it for violating plug.dj's Terms of Service. +Plug.dj admins have the right to request changes. +By using this chatbot you agree to not use it for violating plug.dj's Terms of Service. You also agree not to alter the bot's code, unless in the cases explicitly stated above, for personal use, or for the sole purpose of submitting a pull request with a bug fix or a feature update, at which point it will be looked at and decided by the authors of the project. Please refer to the original author/repository at all times, even on personal forks that are not private. Any requests for changes can be requested via email, through github or via plug.dj. From 4b0dcc53027e495340f232b87a57a9729113d3ff Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 11 Jul 2015 22:35:02 +0100 Subject: [PATCH 195/281] Updated README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ec6806f2..f7897ad8 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ basicBot ======== -A not so basic bot for plug.dj +A not so basic bot for plug.dj -[GET THE GOOGLE CHROME EXTENSION HERE!!!](http://s.benzi.io/bscbtxtnsn) +[Get the Chrome Extension](https://chrome.google.com/webstore/detail/basicbot/bjinmbkeneigmkkkpcmcokphbjkepeie) --------------------------------------------------------------------- [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Yemasthui/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.benzi.io/97dW.svg)](https://facebook.com/groups/basicBot) [![twitter](http://i.benzi.io/4KEn.svg)](https://twitter.com/bscBt) @@ -12,7 +12,7 @@ Stay updated on **basicBot**'s development by following the project on Twitter [ Created by [Yemasthui](https://github.com/Yemasthui) but now maintained by [Benzi](https://github.com/Benzi). -(You can email me via hi@benzi.io or send me a message on [Gitter](https://gitter.im/Benzi) if you have any queries about the bot) +(You can email me via [bnz.mngn@gmail.com](mailto:bnz.mngn@gmail.com) or send me a message on [Gitter](https://gitter.im/Benzi) if you have any queries about the bot) !!!TO CUSTOMIZE: USE [THIS REPOSITORY](https://github.com/Yemasthui/basicBot-customization)!!! ============================================================================================== @@ -103,8 +103,8 @@ Disclaimer ---------- This bot is developed independently. Changes may be made without notice. There is no guarantee for the bot to be functioning perfectly. -Plug.dj admins have the right to request changes. -By using this chatbot you agree to not use it for violating plug.dj's Terms of Service. +Plug.dj admins have the right to request changes. +By using this chatbot you agree to not use it for violating plug.dj's Terms of Service. You also agree not to alter the bot's code, unless in the cases explicitly stated above, for personal use, or for the sole purpose of submitting a pull request with a bug fix or a feature update, at which point it will be looked at and decided by the authors of the project. Please refer to the original author/repository at all times, even on personal forks that are not private. Any requests for changes can be requested via email, through github or via plug.dj. From 0790f4a77d9aaaac7b584d938277664916bf8ee2 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 13 Jul 2015 23:44:53 +0100 Subject: [PATCH 196/281] Cleaned up indentation --- basicBot.js | 6976 +++++++++++++++++++++++++-------------------------- 1 file changed, 3488 insertions(+), 3488 deletions(-) diff --git a/basicBot.js b/basicBot.js index 527e4a7a..9d07033a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1,3645 +1,3645 @@ /** - *Copyright 2014 ***REMOVED*** - *Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. - *This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. - */ +*Copyright 2014 ***REMOVED*** +*Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. +*This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. +*/ (function () { - /*window.onerror = function() { - var room = JSON.parse(localStorage.getItem("basicBotRoom")); - window.location = 'https://plug.dj' + room.name; - };*/ + /*window.onerror = function() { + var room = JSON.parse(localStorage.getItem("basicBotRoom")); + window.location = 'https://plug.dj' + room.name; + };*/ - API.getWaitListPosition = function(id){ - if(typeof id === 'undefined' || id === null){ - id = API.getUser().id; - } - var wl = API.getWaitList(); - for(var i = 0; i < wl.length; i++){ - if(wl[i].id === id){ - return i; - } - } - return -1; + API.getWaitListPosition = function(id){ + if(typeof id === 'undefined' || id === null){ + id = API.getUser().id; + } + var wl = API.getWaitList(); + for(var i = 0; i < wl.length; i++){ + if(wl[i].id === id){ + return i; + } + } + return -1; + }; + + var kill = function () { + clearInterval(basicBot.room.autodisableInterval); + clearInterval(basicBot.room.afkInterval); + basicBot.status = false; + }; + + // This socket server is used solely for statistical and troubleshooting purposes. + // This server may not always be up, but will be used to get live data at any given time. + + var socket = function () { + function loadSocket() { + SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; + sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); + sock.onopen = function() { + console.log('Connected to socket!'); + sendToSocket(); + }; + sock.onclose = function() { + console.log('Disconnected from socket, reconnecting every minute ..'); + var reconnect = setTimeout(function(){ loadSocket() }, 60 * 1000); + }; + sock.onmessage = function(broadcast) { + var rawBroadcast = broadcast.data; + var broadcastMessage = rawBroadcast.replace(/["\\]+/g, ''); + API.chatLog(broadcastMessage); + console.log(broadcastMessage); + }; + } + if (typeof SockJS == 'undefined') { + $.getScript('https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js', loadSocket); + } else loadSocket(); + } + + var sendToSocket = function () { + var basicBotSettings = basicBot.settings; + var basicBotRoom = basicBot.room; + var basicBotInfo = { + time: Date.now(), + version: basicBot.version }; - - var kill = function () { - clearInterval(basicBot.room.autodisableInterval); - clearInterval(basicBot.room.afkInterval); - basicBot.status = false; + var data = {users:API.getUsers(),userinfo:API.getUser(),room:location.pathname,basicBotSettings:basicBotSettings,basicBotRoom:basicBotRoom,basicBotInfo:basicBotInfo}; + return sock.msg(data); + }; + + var storeToStorage = function () { + localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); + localStorage.setItem("basicBotRoom", JSON.stringify(basicBot.room)); + var basicBotStorageInfo = { + time: Date.now(), + stored: true, + version: basicBot.version }; + localStorage.setItem("basicBotStorageInfo", JSON.stringify(basicBotStorageInfo)); - // This socket server is used solely for statistical and troubleshooting purposes. - // This server may not always be up, but will be used to get live data at any given time. - - var socket = function () { - function loadSocket() { - SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; - sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); - sock.onopen = function() { - console.log('Connected to socket!'); - sendToSocket(); - }; - sock.onclose = function() { - console.log('Disconnected from socket, reconnecting every minute ..'); - var reconnect = setTimeout(function(){ loadSocket() }, 60 * 1000); - }; - sock.onmessage = function(broadcast) { - var rawBroadcast = broadcast.data; - var broadcastMessage = rawBroadcast.replace(/["\\]+/g, ''); - API.chatLog(broadcastMessage); - console.log(broadcastMessage); - }; - } - if (typeof SockJS == 'undefined') { - $.getScript('https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js', loadSocket); - } else loadSocket(); - } + }; - var sendToSocket = function () { - var basicBotSettings = basicBot.settings; - var basicBotRoom = basicBot.room; - var basicBotInfo = { - time: Date.now(), - version: basicBot.version - }; - var data = {users:API.getUsers(),userinfo:API.getUser(),room:location.pathname,basicBotSettings:basicBotSettings,basicBotRoom:basicBotRoom,basicBotInfo:basicBotInfo}; - return sock.msg(data); - }; + var subChat = function (chat, obj) { + if (typeof chat === "undefined") { + API.chatLog("There is a chat text missing."); + console.log("There is a chat text missing."); + return "[Error] No text message found."; - var storeToStorage = function () { - localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); - localStorage.setItem("basicBotRoom", JSON.stringify(basicBot.room)); - var basicBotStorageInfo = { - time: Date.now(), - stored: true, - version: basicBot.version - }; - localStorage.setItem("basicBotStorageInfo", JSON.stringify(basicBotStorageInfo)); + // TODO: Get missing chat messages from source. + } + var lit = '%%'; + for (var prop in obj) { + chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); + } + return chat; + }; + var loadChat = function (cb) { + if (!cb) cb = function () { }; + $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { + var link = basicBot.chatLink; + if (json !== null && typeof json !== "undefined") { + langIndex = json; + link = langIndex[basicBot.settings.language.toLowerCase()]; + if (basicBot.settings.chatLink !== basicBot.chatLink) { + link = basicBot.settings.chatLink; + } + else { + if (typeof link === "undefined") { + link = basicBot.chatLink; + } + } + $.get(link, function (json) { + if (json !== null && typeof json !== "undefined") { + if (typeof json === "string") json = JSON.parse(json); + basicBot.chat = json; + cb(); + } + }); + } + else { + $.get(basicBot.chatLink, function (json) { + if (json !== null && typeof json !== "undefined") { + if (typeof json === "string") json = JSON.parse(json); + basicBot.chat = json; + cb(); + } + }); + } + }); + }; + + var retrieveSettings = function () { + var settings = JSON.parse(localStorage.getItem("basicBotsettings")); + if (settings !== null) { + for (var prop in settings) { + basicBot.settings[prop] = settings[prop]; + } + } + }; + + var retrieveFromStorage = function () { + var info = localStorage.getItem("basicBotStorageInfo"); + if (info === null) API.chatLog(basicBot.chat.nodatafound); + else { + var settings = JSON.parse(localStorage.getItem("basicBotsettings")); + var room = JSON.parse(localStorage.getItem("basicBotRoom")); + var elapsed = Date.now() - JSON.parse(info).time; + if ((elapsed < 1 * 60 * 60 * 1000)) { + API.chatLog(basicBot.chat.retrievingdata); + for (var prop in settings) { + basicBot.settings[prop] = settings[prop]; + } + basicBot.room.users = room.users; + basicBot.room.afkList = room.afkList; + basicBot.room.historyList = room.historyList; + basicBot.room.mutedUsers = room.mutedUsers; + //basicBot.room.autoskip = room.autoskip; + basicBot.room.roomstats = room.roomstats; + basicBot.room.messages = room.messages; + basicBot.room.queue = room.queue; + basicBot.room.newBlacklisted = room.newBlacklisted; + API.chatLog(basicBot.chat.datarestored); + } + } + var json_sett = null; + var roominfo = document.getElementById("room-settings"); + info = roominfo.textContent; + var ref_bot = "@basicBot="; + var ind_ref = info.indexOf(ref_bot); + if (ind_ref > 0) { + var link = info.substring(ind_ref + ref_bot.length, info.length); + var ind_space = null; + if (link.indexOf(" ") < link.indexOf("\n")) ind_space = link.indexOf(" "); + else ind_space = link.indexOf("\n"); + link = link.substring(0, ind_space); + $.get(link, function (json) { + if (json !== null && typeof json !== "undefined") { + json_sett = JSON.parse(json); + for (var prop in json_sett) { + basicBot.settings[prop] = json_sett[prop]; + } + } + }); + } - var subChat = function (chat, obj) { - if (typeof chat === "undefined") { - API.chatLog("There is a chat text missing."); - console.log("There is a chat text missing."); - return "[Error] No text message found."; + }; - // TODO: Get missing chat messages from source. + String.prototype.splitBetween = function (a, b) { + var self = this; + self = this.split(a); + for (var i = 0; i < self.length; i++) { + self[i] = self[i].split(b); + } + var arr = []; + for (var i = 0; i < self.length; i++) { + if (Array.isArray(self[i])) { + for (var j = 0; j < self[i].length; j++) { + arr.push(self[i][j]); } - var lit = '%%'; - for (var prop in obj) { - chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); + } + else arr.push(self[i]); + } + return arr; + }; + + String.prototype.startsWith = function(str) { + return this.substring(0, str.length) === str; + }; + + var linkFixer = function (msg) { + var parts = msg.splitBetween(' -1) return 10; + } + if (u.gRole < 2) return u.role; + else { + switch (u.gRole) { + case 2: + return 7; + case 3: + return 8; + case 4: + return 9; + case 5: + return 10; + } + } + return 0; + }, + moveUser: function (id, pos, priority) { + var user = basicBot.userUtilities.lookupUser(id); + var wlist = API.getWaitList(); + if (API.getWaitListPosition(id) === -1) { + if (wlist.length < 50) { + API.moderateAddDJ(id); + if (pos !== 0) setTimeout(function (id, pos) { + API.moderateMoveDJ(id, pos); + }, 1250, id, pos); + } + else { + var alreadyQueued = -1; + for (var i = 0; i < basicBot.room.queue.id.length; i++) { + if (basicBot.room.queue.id[i] === id) alreadyQueued = i; + } + if (alreadyQueued !== -1) { + basicBot.room.queue.position[alreadyQueued] = pos; + return API.sendChat(subChat(basicBot.chat.alreadyadding, {position: basicBot.room.queue.position[alreadyQueued]})); + } + basicBot.roomUtilities.booth.lockBooth(); + if (priority) { + basicBot.room.queue.id.unshift(id); + basicBot.room.queue.position.unshift(pos); + } + else { + basicBot.room.queue.id.push(id); + basicBot.room.queue.position.push(pos); + } + var name = user.username; + return API.sendChat(subChat(basicBot.chat.adding, {name: name, position: basicBot.room.queue.position.length})); + } + } + else API.moderateMoveDJ(id, pos); + }, + dclookup: function (id) { + var user = basicBot.userUtilities.lookupUser(id); + if (typeof user === 'boolean') return basicBot.chat.usernotfound; + var name = user.username; + if (user.lastDC.time === null) return subChat(basicBot.chat.notdisconnected, {name: name}); + var dc = user.lastDC.time; + var pos = user.lastDC.position; + if (pos === null) return basicBot.chat.noposition; + var timeDc = Date.now() - dc; + var validDC = false; + if (basicBot.settings.maximumDc * 60 * 1000 > timeDc) { + validDC = true; + } + var time = basicBot.roomUtilities.msToStr(timeDc); + if (!validDC) return (subChat(basicBot.chat.toolongago, {name: basicBot.userUtilities.getUser(user).username, time: time})); + var songsPassed = basicBot.room.roomstats.songCount - user.lastDC.songCount; + var afksRemoved = 0; + var afkList = basicBot.room.afkList; + for (var i = 0; i < afkList.length; i++) { + var timeAfk = afkList[i][1]; + var posAfk = afkList[i][2]; + if (dc < timeAfk && posAfk < pos) { + afksRemoved++; + } + } + var newPosition = user.lastDC.position - songsPassed - afksRemoved; + if (newPosition <= 0) return subChat(basicBot.chat.notdisconnected, {name: name}); + var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); + basicBot.userUtilities.moveUser(user.id, newPosition, true); + return msg; + } + }, + + roomUtilities: { + rankToNumber: function (rankString) { + var rankInt = null; + switch (rankString) { + case "admin": + rankInt = 10; + break; + case "ambassador": + rankInt = 7; + break; + case "host": + rankInt = 5; + break; + case "cohost": + rankInt = 4; + break; + case "manager": + rankInt = 3; + break; + case "bouncer": + rankInt = 2; + break; + case "residentdj": + rankInt = 1; + break; + case "user": + rankInt = 0; + break; + } + return rankInt; + }, + msToStr: function (msTime) { + var ms, msg, timeAway; + msg = ''; + timeAway = { + 'days': 0, + 'hours': 0, + 'minutes': 0, + 'seconds': 0 }; - $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { - var link = basicBot.chatLink; - if (json !== null && typeof json !== "undefined") { - langIndex = json; - link = langIndex[basicBot.settings.language.toLowerCase()]; - if (basicBot.settings.chatLink !== basicBot.chatLink) { - link = basicBot.settings.chatLink; - } - else { - if (typeof link === "undefined") { - link = basicBot.chatLink; + 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.minutes < 1 && timeAway.hours < 1 && timeAway.days < 1) { + msg += timeAway.seconds.toString() + 's'; + } + if (msg !== '') { + return msg; + } else { + return false; + } + }, + booth: { + lockTimer: setTimeout(function () { + }, 1000), + locked: false, + lockBooth: function () { + API.moderateLockWaitList(!basicBot.roomUtilities.booth.locked); + basicBot.roomUtilities.booth.locked = false; + if (basicBot.settings.lockGuard) { + basicBot.roomUtilities.booth.lockTimer = setTimeout(function () { + API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); + }, basicBot.settings.maximumLocktime * 60 * 1000); + } + }, + unlockBooth: function () { + API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); + clearTimeout(basicBot.roomUtilities.booth.lockTimer); + } + }, + afkCheck: function () { + if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); + var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); + var djlist = API.getWaitList(); + var lastPos = Math.min(djlist.length, basicBot.settings.afkpositionCheck); + if (lastPos - 1 > djlist.length) return void (0); + for (var i = 0; i < lastPos; i++) { + if (typeof djlist[i] !== 'undefined') { + var id = djlist[i].id; + var user = basicBot.userUtilities.lookupUser(id); + if (typeof user !== 'boolean') { + var plugUser = basicBot.userUtilities.getUser(user); + if (rank !== null && basicBot.userUtilities.getPermission(plugUser) <= rank) { + var name = plugUser.username; + var lastActive = basicBot.userUtilities.getLastActivity(user); + var inactivity = Date.now() - lastActive; + var time = basicBot.roomUtilities.msToStr(inactivity); + var warncount = user.afkWarningCount; + if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { + if (warncount === 0) { + API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); + user.afkWarningCount = 3; + user.afkCountdown = setTimeout(function (userToChange) { + userToChange.afkWarningCount = 1; + }, 90 * 1000, user); + } + else if (warncount === 1) { + API.sendChat(subChat(basicBot.chat.warning2, {name: name})); + user.afkWarningCount = 3; + user.afkCountdown = setTimeout(function (userToChange) { + userToChange.afkWarningCount = 2; + }, 30 * 1000, user); + } + else if (warncount === 2) { + var pos = API.getWaitListPosition(id); + if (pos !== -1) { + pos++; + basicBot.room.afkList.push([id, Date.now(), pos]); + user.lastDC = { + + time: null, + position: null, + songCount: 0 + }; + API.moderateRemoveDJ(id); + API.sendChat(subChat(basicBot.chat.afkremove, {name: name, time: time, position: pos, maximumafk: basicBot.settings.maximumAfk})); } + user.afkWarningCount = 0; + } } - $.get(link, function (json) { - if (json !== null && typeof json !== "undefined") { - if (typeof json === "string") json = JSON.parse(json); - basicBot.chat = json; - cb(); - } - }); + } } - else { - $.get(basicBot.chatLink, function (json) { - if (json !== null && typeof json !== "undefined") { - if (typeof json === "string") json = JSON.parse(json); - basicBot.chat = json; - cb(); - } - }); + } + } + }, + smartSkip: function (reason) { + var dj = API.getDJ(); + var id = dj.id; + var waitlistlength = API.getWaitList().length; + var locked = false; + basicBot.room.queueable = false; + + if (waitlistlength == 50) { + basicBot.roomUtilities.booth.lockBooth(); + locked = true; + } + setTimeout(function (id) { + API.moderateForceSkip(); + setTimeout(function () { + if (typeof reason !== 'undefined') { + API.sendChat(reason); } - }); - }; - - var retrieveSettings = function () { - var settings = JSON.parse(localStorage.getItem("basicBotsettings")); - if (settings !== null) { - for (var prop in settings) { - basicBot.settings[prop] = settings[prop]; + }, 500); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.skipPosition, false); + basicBot.room.queueable = true; + if (locked) { + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); } + }, 1500, id); + }, 1000, id); + }, + changeDJCycle: function () { + var toggle = $(".cycle-toggle"); + if (toggle.hasClass("disabled")) { + toggle.click(); + if (basicBot.settings.cycleGuard) { + basicBot.room.cycleTimer = setTimeout(function () { + if (toggle.hasClass("enabled")) toggle.click(); + }, basicBot.settings.cycleMaxTime * 60 * 1000); + } } - }; - - var retrieveFromStorage = function () { - var info = localStorage.getItem("basicBotStorageInfo"); - if (info === null) API.chatLog(basicBot.chat.nodatafound); else { - var settings = JSON.parse(localStorage.getItem("basicBotsettings")); - var room = JSON.parse(localStorage.getItem("basicBotRoom")); - var elapsed = Date.now() - JSON.parse(info).time; - if ((elapsed < 1 * 60 * 60 * 1000)) { - API.chatLog(basicBot.chat.retrievingdata); - for (var prop in settings) { - basicBot.settings[prop] = settings[prop]; - } - basicBot.room.users = room.users; - basicBot.room.afkList = room.afkList; - basicBot.room.historyList = room.historyList; - basicBot.room.mutedUsers = room.mutedUsers; - //basicBot.room.autoskip = room.autoskip; - basicBot.room.roomstats = room.roomstats; - basicBot.room.messages = room.messages; - basicBot.room.queue = room.queue; - basicBot.room.newBlacklisted = room.newBlacklisted; - API.chatLog(basicBot.chat.datarestored); + toggle.click(); + clearTimeout(basicBot.room.cycleTimer); + } + + // TODO: Use API.moderateDJCycle(true/false) + }, + intervalMessage: function () { + var interval; + if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; + else interval = basicBot.settings.messageInterval; + if ((basicBot.room.roomstats.songCount % interval) === 0 && basicBot.status) { + var msg; + if (basicBot.settings.motdEnabled) { + msg = basicBot.settings.motd; + } + else { + if (basicBot.settings.intervalMessages.length === 0) return void (0); + var messageNumber = basicBot.room.roomstats.songCount % basicBot.settings.intervalMessages.length; + msg = basicBot.settings.intervalMessages[messageNumber]; + } + API.sendChat('/me ' + msg); + } + }, + updateBlacklists: function () { + for (var bl in basicBot.settings.blacklists) { + basicBot.room.blacklists[bl] = []; + if (typeof basicBot.settings.blacklists[bl] === 'function') { + basicBot.room.blacklists[bl] = basicBot.settings.blacklists(); + } + else if (typeof basicBot.settings.blacklists[bl] === 'string') { + if (basicBot.settings.blacklists[bl] === '') { + continue; + } + try { + (function (l) { + $.get(basicBot.settings.blacklists[l], function (data) { + if (typeof data === 'string') { + data = JSON.parse(data); + } + var list = []; + for (var prop in data) { + if (typeof data[prop].mid !== 'undefined') { + list.push(data[prop].mid); + } + } + basicBot.room.blacklists[l] = list; + }) + })(bl); + } + catch (e) { + API.chatLog('Error setting' + bl + 'blacklist.'); + console.log('Error setting' + bl + 'blacklist.'); + console.log(e); } + } } - var json_sett = null; - var roominfo = document.getElementById("room-settings"); - info = roominfo.textContent; - var ref_bot = "@basicBot="; - var ind_ref = info.indexOf(ref_bot); - if (ind_ref > 0) { - var link = info.substring(ind_ref + ref_bot.length, info.length); - var ind_space = null; - if (link.indexOf(" ") < link.indexOf("\n")) ind_space = link.indexOf(" "); - else ind_space = link.indexOf("\n"); - link = link.substring(0, ind_space); - $.get(link, function (json) { - if (json !== null && typeof json !== "undefined") { - json_sett = JSON.parse(json); - for (var prop in json_sett) { - basicBot.settings[prop] = json_sett[prop]; - } - } - }); + }, + logNewBlacklistedSongs: function () { + if (typeof console.table !== 'undefined') { + console.table(basicBot.room.newBlacklisted); + } + else { + console.log(basicBot.room.newBlacklisted); + } + }, + exportNewBlacklistedSongs: function () { + var list = {}; + for (var i = 0; i < basicBot.room.newBlacklisted.length; i++) { + var track = basicBot.room.newBlacklisted[i]; + list[track.list] = []; + list[track.list].push({ + title: track.title, + author: track.author, + mid: track.mid + }); + } + return list; + } + }, + eventChat: function (chat) { + chat.message = linkFixer(chat.message); + chat.message = decodeEntities(chat.message); + chat.message = chat.message.trim(); + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === chat.uid) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); + if (basicBot.room.users[i].username !== chat.un) { + basicBot.room.users[i].username = chat.un; + } + } + } + if (basicBot.chatUtilities.chatFilter(chat)) return void (0); + if (!basicBot.chatUtilities.commandCheck(chat)) + basicBot.chatUtilities.action(chat); + }, + eventUserjoin: function (user) { + var known = false; + var index = null; + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === user.id) { + known = true; + index = i; + } + } + var greet = true; + var welcomeback = null; + if (known) { + basicBot.room.users[index].inRoom = true; + var u = basicBot.userUtilities.lookupUser(user.id); + var jt = u.jointime; + var t = Date.now() - jt; + if (t < 10 * 1000) greet = false; + else welcomeback = true; + } + else { + basicBot.room.users.push(new basicBot.User(user.id, user.username)); + welcomeback = false; + } + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === user.id) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); + basicBot.room.users[j].jointime = Date.now(); } - }; - - String.prototype.splitBetween = function (a, b) { - var self = this; - self = this.split(a); - for (var i = 0; i < self.length; i++) { - self[i] = self[i].split(b); + } + if (basicBot.settings.welcome && greet) { + welcomeback ? + setTimeout(function (user) { + API.sendChat(subChat(basicBot.chat.welcomeback, {name: user.username})); + }, 1 * 1000, user) + : + setTimeout(function (user) { + API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); + }, 1 * 1000, user); + } + }, + eventUserleave: function (user) { + var lastDJ = API.getHistory()[0].user.id; + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === user.id) { + basicBot.userUtilities.updateDC(basicBot.room.users[i]); + basicBot.room.users[i].inRoom = false; + if (lastDJ == user.id){ + var user = basicBot.userUtilities.lookupUser(basicBot.room.users[i].id); + basicBot.userUtilities.updatePosition(user, 0); + user.lastDC.time = null; + user.lastDC.position = user.lastKnownPosition; + } } - var arr = []; - for (var i = 0; i < self.length; i++) { - if (Array.isArray(self[i])) { - for (var j = 0; j < self[i].length; j++) { - arr.push(self[i][j]); - } - } - else arr.push(self[i]); + } + }, + eventVoteupdate: function (obj) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === obj.user.id) { + if (obj.vote === 1) { + basicBot.room.users[i].votes.woot++; + } + else { + basicBot.room.users[i].votes.meh++; + } } - return arr; - }; + } + + var mehs = API.getScore().negative; + var woots = API.getScore().positive; + var dj = API.getDJ(); + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + + if (basicBot.settings.voteSkip) { + if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { + API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + } + } - String.prototype.startsWith = function(str) { - return this.substring(0, str.length) === str; - }; + }, + eventCurateupdate: function (obj) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === obj.user.id) { + basicBot.room.users[i].votes.curate++; + } + } + }, + eventDjadvance: function (obj) { + if (basicBot.settings.autowoot) { + $("#woot").click(); // autowoot + } + + var user = basicBot.userUtilities.lookupUser(obj.dj.id) + for(var i = 0; i < basicBot.room.users.length; i++){ + if(basicBot.room.users[i].id === user.id){ + basicBot.room.users[i].lastDC = { + time: null, + position: null, + songCount: 0 + }; + } + } - var linkFixer = function (msg) { - var parts = msg.splitBetween(' -1) { + API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + } + } + }, 2000); + var newMedia = obj.media; + var timeLimitSkip = setTimeout(function () { + if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }, 2000); + var format = obj.media.format; + var cid = obj.media.cid; + var naSkip = setTimeout(function () { + if (format == 1){ + $.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + cid + '&key=AIzaSyDcfWu9cGaDnTjPKhg_dy9mUh6H7i4ePZ0&part=snippet&callback=?', function (track){ + if (typeof(track.items[0]) === 'undefined'){ + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }); + } + else { + var checkSong = SC.get('/tracks/' + cid, function (track){ + if (typeof track.title === 'undefined'){ + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }); + } + }, 2000); + clearTimeout(historySkip); + if (basicBot.settings.historySkip) { + var alreadyPlayed = false; + var apihistory = API.getHistory(); + var name = obj.dj.username; + var historySkip = setTimeout(function () { + for (var i = 0; i < apihistory.length; i++) { + if (apihistory[i].media.cid === obj.media.cid) { + basicBot.room.historyList[i].push(+new Date()); + alreadyPlayed = true; + API.sendChat(subChat(basicBot.chat.songknown, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + } + if (!alreadyPlayed) { + basicBot.room.historyList.push([obj.media.cid, +new Date()]); + } + }, 2000); + } + if (user.ownSong) { + API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); + user.ownSong = false; + } + clearTimeout(basicBot.room.autoskipTimer); + if (basicBot.settings.autoskip) { + var remaining = obj.media.duration * 1000; + var startcid = API.getMedia().cid; + basicBot.room.autoskipTimer = setTimeout(function() { + var endcid = API.getMedia().cid; + if (startcid === endcid) { + //API.sendChat('Song stuck, skipping...'); + API.moderateForceSkip(); + } + }, remaining + 5000); + } + storeToStorage(); + sendToSocket(); + }, + eventWaitlistupdate: function (users) { + if (users.length < 50) { + if (basicBot.room.queue.id.length > 0 && basicBot.room.queueable) { + basicBot.room.queueable = false; + setTimeout(function () { + basicBot.room.queueable = true; + }, 500); + basicBot.room.queueing++; + var id, pos; + setTimeout( + function () { + id = basicBot.room.queue.id.splice(0, 1)[0]; + pos = basicBot.room.queue.position.splice(0, 1)[0]; + API.moderateAddDJ(id, pos); + setTimeout( + function (id, pos) { + API.moderateMoveDJ(id, pos); + basicBot.room.queueing--; + if (basicBot.room.queue.id.length === 0) setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1000, id, pos); + }, 1000 + basicBot.room.queueing * 2500); + } + } + for (var i = 0; i < users.length; i++) { + var user = basicBot.userUtilities.lookupUser(users[i].id); + basicBot.userUtilities.updatePosition(user, API.getWaitListPosition(users[i].id) + 1); + } + }, + chatcleaner: function (chat) { + if (!basicBot.settings.filterChat) return false; + if (basicBot.userUtilities.getPermission(chat.uid) > 1) return false; + var msg = chat.message; + var containsLetters = false; + for (var i = 0; i < msg.length; i++) { + ch = msg.charAt(i); + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch === ':' || ch === '^') containsLetters = true; + } + if (msg === '') { + return true; + } + if (!containsLetters && (msg.length === 1 || msg.length > 3)) return true; + msg = msg.replace(/[ ,;.:\/=~+%^*\-\\"'&@#]/g, ''); + var capitals = 0; + var ch; + for (var i = 0; i < msg.length; i++) { + ch = msg.charAt(i); + if (ch >= 'A' && ch <= 'Z') capitals++; + } + if (capitals >= 40) { + API.sendChat(subChat(basicBot.chat.caps, {name: chat.un})); + return true; + } + msg = msg.toLowerCase(); + if (msg === 'skip') { + API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); + return true; + } + for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { + if (msg === basicBot.chatUtilities.spam[j]) { + API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); + return true; + } + } + return false; + }, + chatUtilities: { + chatFilter: function (chat) { + var msg = chat.message; + var perm = basicBot.userUtilities.getPermission(chat.uid); + var user = basicBot.userUtilities.lookupUser(chat.uid); + var isMuted = false; + for (var i = 0; i < basicBot.room.mutedUsers.length; i++) { + if (basicBot.room.mutedUsers[i] === chat.uid) isMuted = true; + } + if (isMuted) { + API.moderateDeleteChat(chat.cid); + return true; + } + if (basicBot.settings.lockdownEnabled) { + if (perm === 0) { + API.moderateDeleteChat(chat.cid); + return true; + } + } + if (basicBot.chatcleaner(chat)) { + API.moderateDeleteChat(chat.cid); + return true; + } + if (basicBot.settings.cmdDeletion && msg.startsWith(basicBot.settings.commandLiteral)) { + API.moderateDeleteChat(chat.cid); + } + /** + var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; + if (plugRoomLinkPatt.exec(msg)) { + if (perm === 0) { + API.sendChat(subChat(basicBot.chat.roomadvertising, {name: chat.un})); + API.moderateDeleteChat(chat.cid); + return true; + } + } + **/ + if (msg.indexOf('http://adf.ly/') > -1) { + API.moderateDeleteChat(chat.cid); + API.sendChat(subChat(basicBot.chat.adfly, {name: chat.un})); + return true; + } + if (msg.indexOf('autojoin was not enabled') > 0 || msg.indexOf('AFK message was not enabled') > 0 || msg.indexOf('!afkdisable') > 0 || msg.indexOf('!joindisable') > 0 || msg.indexOf('autojoin disabled') > 0 || msg.indexOf('AFK message disabled') > 0) { + API.moderateDeleteChat(chat.cid); + return true; + } - var decodeEntities = function (s) { - var str, temp = document.createElement('p'); - temp.innerHTML = s; - str = temp.textContent || temp.innerText; - temp = null; - return str; - }; + var rlJoinChat = basicBot.chat.roulettejoin; + var rlLeaveChat = basicBot.chat.rouletteleave; + + var joinedroulette = rlJoinChat.split('%%NAME%%'); + if (joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; + else joinedroulette = joinedroulette[0]; - var botCreator = "Matthew (***REMOVED***)"; - var botMaintainer = "Benzi (Quoona)" - var botCreatorIDs = ["3851534", "4105209"]; - - var basicBot = { - version: "2.8.9", - status: false, - name: "basicBot", - loggedInID: null, - scriptLink: "https://rawgit.com/***REMOVED***/basicBot/master/basicBot.js", - cmdLink: "http://git.io/245Ppg", - chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", - chat: null, - loadChat: loadChat, - retrieveSettings: retrieveSettings, - retrieveFromStorage: retrieveFromStorage, - settings: { - botName: "basicBot", - language: "english", - chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", - roomLock: false, // Requires an extension to re-load the script - startupCap: 1, // 1-200 - startupVolume: 0, // 0-100 - startupEmoji: false, // true or false - autowoot: true, - autoskip: false, - smartSkip: true, - cmdDeletion: true, - maximumAfk: 120, - afkRemoval: true, - maximumDc: 60, - bouncerPlus: true, - blacklistEnabled: true, - lockdownEnabled: false, - lockGuard: false, - maximumLocktime: 10, - cycleGuard: true, - maximumCycletime: 10, - voteSkip: false, - voteSkipLimit: 10, - historySkip: false, - timeGuard: true, - maximumSongLength: 10, - autodisable: true, - commandCooldown: 30, - usercommandsEnabled: true, - skipPosition: 3, - skipReasons: [ - ["theme", "This song does not fit the room theme. "], - ["op", "This song is on the OP list. "], - ["history", "This song is in the history. "], - ["mix", "You played a mix, which is against the rules. "], - ["sound", "The song you played had bad sound quality or no sound. "], - ["nsfw", "The song you contained was NSFW (image or sound). "], - ["unavailable", "The song you played was not available for some users. "] - ], - afkpositionCheck: 15, - afkRankCheck: "ambassador", - motdEnabled: false, - motdInterval: 5, - motd: "Temporary Message of the Day", - filterChat: true, - etaRestriction: false, - welcome: true, - opLink: null, - rulesLink: null, - themeLink: null, - fbLink: null, - youtubeLink: null, - website: null, - intervalMessages: [], - messageInterval: 5, - songstats: true, - commandLiteral: "!", - blacklists: { - NSFW: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/NSFWlist.json", - OP: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/OPlist.json", - BANNED: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/BANNEDlist.json" + var leftroulette = rlLeaveChat.split('%%NAME%%'); + if (leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; + else leftroulette = leftroulette[0]; + + if ((msg.indexOf(joinedroulette) > -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { + setTimeout(function (id) { + API.moderateDeleteChat(id); + }, 5 * 1000, chat.cid); + return true; + } + return false; + }, + commandCheck: function (chat) { + var cmd; + if (chat.message.charAt(0) === basicBot.settings.commandLiteral) { + var space = chat.message.indexOf(' '); + if (space === -1) { + cmd = chat.message; + } + else cmd = chat.message.substring(0, space); + } + else return false; + var userPerm = basicBot.userUtilities.getPermission(chat.uid); + //console.log("name: " + chat.un + ", perm: " + userPerm); + if (chat.message !== basicBot.settings.commandLiteral + 'join' && chat.message !== basicBot.settings.commandLiteral + "leave") { + if (userPerm === 0 && !basicBot.room.usercommand) return void (0); + if (!basicBot.room.allcommand) return void (0); + } + if (chat.message === basicBot.settings.commandLiteral + 'eta' && basicBot.settings.etaRestriction) { + if (userPerm < 2) { + var u = basicBot.userUtilities.lookupUser(chat.uid); + if (u.lastEta !== null && (Date.now() - u.lastEta) < 1 * 60 * 60 * 1000) { + API.moderateDeleteChat(chat.cid); + return void (0); + } + else u.lastEta = Date.now(); + } + } + var executed = false; + + for (var comm in basicBot.commands) { + var cmdCall = basicBot.commands[comm].command; + if (!Array.isArray(cmdCall)) { + cmdCall = [cmdCall] + } + for (var i = 0; i < cmdCall.length; i++) { + if (basicBot.settings.commandLiteral + cmdCall[i] === cmd) { + basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[i]); + executed = true; + break; + } + } } - }, - room: { - name: null, - users: [], - afkList: [], - mutedUsers: [], - bannedUsers: [], - skippable: true, - usercommand: true, - allcommand: true, - afkInterval: null, - //autoskip: false, - autoskipTimer: null, - autodisableInterval: null, - autodisableFunc: function () { - if (basicBot.status && basicBot.settings.autodisable) { - API.sendChat('!afkdisable'); - API.sendChat('!joindisable'); - } - }, - queueing: 0, - queueable: true, - currentDJID: null, - historyList: [], - cycleTimer: setTimeout(function () { - }, 1), - roomstats: { - accountName: null, - totalWoots: 0, - totalCurates: 0, - totalMehs: 0, - launchTime: null, - songCount: 0, - chatmessages: 0 - }, - messages: { - from: [], - to: [], - message: [] - }, - queue: { - id: [], - position: [] - }, - blacklists: { - }, - newBlacklisted: [], - newBlacklistedSongFunction: null, - roulette: { - rouletteStatus: false, - participants: [], - countdown: null, - startRoulette: function () { - basicBot.room.roulette.rouletteStatus = true; - basicBot.room.roulette.countdown = setTimeout(function () { - basicBot.room.roulette.endRoulette(); - }, 60 * 1000); - API.sendChat(basicBot.chat.isopen); - }, - endRoulette: function () { - basicBot.room.roulette.rouletteStatus = false; - var ind = Math.floor(Math.random() * basicBot.room.roulette.participants.length); - var winner = basicBot.room.roulette.participants[ind]; - basicBot.room.roulette.participants = []; - var pos = Math.floor((Math.random() * API.getWaitList().length) + 1); - var user = basicBot.userUtilities.lookupUser(winner); - var name = user.username; - API.sendChat(subChat(basicBot.chat.winnerpicked, {name: name, position: pos})); - setTimeout(function (winner, pos) { - basicBot.userUtilities.moveUser(winner, pos, false); - }, 1 * 1000, winner, pos); + if (executed && userPerm === 0) { + basicBot.room.usercommand = false; + setTimeout(function () { + basicBot.room.usercommand = true; + }, basicBot.settings.commandCooldown * 1000); + } + if (executed) { + /*if (basicBot.settings.cmdDeletion) { + API.moderateDeleteChat(chat.cid); + }*/ + + //basicBot.room.allcommand = false; + //setTimeout(function () { + basicBot.room.allcommand = true; + //}, 5 * 1000); + } + return executed; + }, + action: function (chat) { + var user = basicBot.userUtilities.lookupUser(chat.uid); + if (chat.type === 'message') { + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === chat.uid) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); } + + } } + basicBot.room.roomstats.chatmessages++; + }, + spam: [ + 'hueh', 'hu3', 'brbr', 'heu', 'brbr', 'kkkk', 'spoder', 'mafia', 'zuera', 'zueira', + 'zueria', 'aehoo', 'aheu', 'alguem', 'algum', 'brazil', 'zoeira', 'fuckadmins', 'affff', 'vaisefoder', 'huenaarea', + 'hitler', 'ashua', 'ahsu', 'ashau', 'lulz', 'huehue', 'hue', 'huehuehue', 'merda', 'pqp', 'puta', 'mulher', 'pula', 'retarda', 'caralho', 'filha', 'ppk', + 'gringo', 'fuder', 'foder', 'hua', 'ahue', 'modafuka', 'modafoka', 'mudafuka', 'mudafoka', 'ooooooooooooooo', 'foda' + ], + curses: [ + 'nigger', 'faggot', 'nigga', 'niqqa', 'motherfucker', 'modafocka' + ] }, - User: function (id, name) { - this.id = id; - this.username = name; - this.jointime = Date.now(); - this.lastActivity = Date.now(); - this.votes = { - woot: 0, - meh: 0, - curate: 0 - }; - this.lastEta = null; - this.afkWarningCount = 0; - this.afkCountdown = null; - this.inRoom = true; - this.isMuted = false; - this.lastDC = { - time: null, - position: null, - songCount: 0 - }; - this.lastKnownPosition = null; + connectAPI: function () { + this.proxy = { + eventChat: $.proxy(this.eventChat, this), + eventUserskip: $.proxy(this.eventUserskip, this), + eventUserjoin: $.proxy(this.eventUserjoin, this), + eventUserleave: $.proxy(this.eventUserleave, this), + //eventFriendjoin: $.proxy(this.eventFriendjoin, this), + eventVoteupdate: $.proxy(this.eventVoteupdate, this), + eventCurateupdate: $.proxy(this.eventCurateupdate, this), + eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), + eventDjadvance: $.proxy(this.eventDjadvance, this), + //eventDjupdate: $.proxy(this.eventDjupdate, this), + eventWaitlistupdate: $.proxy(this.eventWaitlistupdate, this), + eventVoteskip: $.proxy(this.eventVoteskip, this), + eventModskip: $.proxy(this.eventModskip, this), + eventChatcommand: $.proxy(this.eventChatcommand, this), + eventHistoryupdate: $.proxy(this.eventHistoryupdate, this), + + }; + API.on(API.CHAT, this.proxy.eventChat); + API.on(API.USER_SKIP, this.proxy.eventUserskip); + API.on(API.USER_JOIN, this.proxy.eventUserjoin); + API.on(API.USER_LEAVE, this.proxy.eventUserleave); + API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); + API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); + API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); + API.on(API.ADVANCE, this.proxy.eventDjadvance); + API.on(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); + API.on(API.MOD_SKIP, this.proxy.eventModskip); + API.on(API.CHAT_COMMAND, this.proxy.eventChatcommand); + API.on(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); }, - userUtilities: { - getJointime: function (user) { - return user.jointime; - }, - getUser: function (user) { - return API.getUser(user.id); - }, - updatePosition: function (user, newPos) { - user.lastKnownPosition = newPos; - }, - updateDC: function (user) { - user.lastDC.time = Date.now(); - user.lastDC.position = user.lastKnownPosition; - user.lastDC.songCount = basicBot.room.roomstats.songCount; - }, - setLastActivity: function (user) { - user.lastActivity = Date.now(); - user.afkWarningCount = 0; - clearTimeout(user.afkCountdown); - }, - getLastActivity: function (user) { - return user.lastActivity; - }, - getWarningCount: function (user) { - return user.afkWarningCount; - }, - setWarningCount: function (user, value) { - user.afkWarningCount = value; - }, - lookupUser: function (id) { - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === id) { - return basicBot.room.users[i]; - } - } - return false; - }, - lookupUserName: function (name) { - for (var i = 0; i < basicBot.room.users.length; i++) { - var match = basicBot.room.users[i].username.trim() == name.trim(); - if (match) { - return basicBot.room.users[i]; - } - } - return false; - }, - voteRatio: function (id) { - var user = basicBot.userUtilities.lookupUser(id); - var votes = user.votes; - if (votes.meh === 0) votes.ratio = 1; - else votes.ratio = (votes.woot / votes.meh).toFixed(2); - return votes; + disconnectAPI: function () { + API.off(API.CHAT, this.proxy.eventChat); + API.off(API.USER_SKIP, this.proxy.eventUserskip); + API.off(API.USER_JOIN, this.proxy.eventUserjoin); + API.off(API.USER_LEAVE, this.proxy.eventUserleave); + API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); + API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); + API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); + API.off(API.ADVANCE, this.proxy.eventDjadvance); + API.off(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); + API.off(API.MOD_SKIP, this.proxy.eventModskip); + API.off(API.CHAT_COMMAND, this.proxy.eventChatcommand); + API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); + }, + startup: function () { + Function.prototype.toString = function () { + return 'Function.' + }; + var u = API.getUser(); + if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); + if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); + basicBot.connectAPI(); + API.moderateDeleteChat = function (cid) { + $.ajax({ + url: "https://plug.dj/_/chat/" + cid, + type: "DELETE" + }) + }; + + basicBot.room.name = window.location.pathname; + var Check; + + console.log(basicBot.room.name); + + var detect = function(){ + if(basicBot.room.name != window.location.pathname){ + console.log("Killing bot after room change."); + storeToStorage(); + basicBot.disconnectAPI(); + setTimeout(function () { + kill(); + }, 1000); + if (basicBot.settings.roomLock){ + window.location = 'https://plug.dj' + basicBot.room.name; + } + else { + clearInterval(Check); + } + } + }; + + Check = setInterval(function(){ detect() }, 2000); + + retrieveSettings(); + retrieveFromStorage(); + window.bot = basicBot; + basicBot.roomUtilities.updateBlacklists(); + setInterval(basicBot.roomUtilities.updateBlacklists, 60 * 60 * 1000); + basicBot.getNewBlacklistedSongs = basicBot.roomUtilities.exportNewBlacklistedSongs; + basicBot.logNewBlacklistedSongs = basicBot.roomUtilities.logNewBlacklistedSongs; + if (basicBot.room.roomstats.launchTime === null) { + basicBot.room.roomstats.launchTime = Date.now(); + } + + for (var j = 0; j < basicBot.room.users.length; j++) { + basicBot.room.users[j].inRoom = false; + } + var userlist = API.getUsers(); + for (var i = 0; i < userlist.length; i++) { + var known = false; + var ind = null; + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.room.users[j].id === userlist[i].id) { + known = true; + ind = j; + } + } + if (known) { + basicBot.room.users[ind].inRoom = true; + } + else { + basicBot.room.users.push(new basicBot.User(userlist[i].id, userlist[i].username)); + ind = basicBot.room.users.length - 1; + } + var wlIndex = API.getWaitListPosition(basicBot.room.users[ind].id) + 1; + basicBot.userUtilities.updatePosition(basicBot.room.users[ind], wlIndex); + } + basicBot.room.afkInterval = setInterval(function () { + basicBot.roomUtilities.afkCheck() + }, 10 * 1000); + basicBot.room.autodisableInterval = setInterval(function () { + basicBot.room.autodisableFunc(); + }, 60 * 60 * 1000); + basicBot.loggedInID = API.getUser().id; + basicBot.status = true; + API.sendChat('/cap ' + basicBot.settings.startupCap); + API.setVolume(basicBot.settings.startupVolume); + if (basicBot.settings.autowoot) { + $("#woot").click(); + } + if (basicBot.settings.startupEmoji) { + var emojibuttonoff = $(".icon-emoji-off"); + if (emojibuttonoff.length > 0) { + emojibuttonoff[0].click(); + } + API.chatLog(':smile: Emojis enabled.'); + } + else { + var emojibuttonon = $(".icon-emoji-on"); + if (emojibuttonon.length > 0) { + emojibuttonon[0].click(); + } + API.chatLog('Emojis disabled.'); + } + API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); + API.chatLog('Volume set to ' + basicBot.settings.startupVolume); + socket(); + loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); + }, + commands: { + executable: function (minRank, chat) { + var id = chat.uid; + var perm = basicBot.userUtilities.getPermission(id); + var minPerm; + switch (minRank) { + case 'admin': + minPerm = 10; + break; + case 'ambassador': + minPerm = 7; + break; + case 'host': + minPerm = 5; + break; + case 'cohost': + minPerm = 4; + break; + case 'manager': + minPerm = 3; + break; + case 'mod': + if (basicBot.settings.bouncerPlus) { + minPerm = 2; + } + else { + minPerm = 3; + } + break; + case 'bouncer': + minPerm = 2; + break; + case 'residentdj': + minPerm = 1; + break; + case 'user': + minPerm = 0; + break; + default: + API.chatLog('error assigning minimum permission'); + } + return perm >= minPerm; + + }, + /** + command: { + command: 'cmd', + rank: 'user/bouncer/mod/manager', + type: 'startsWith/exact', + functionality: function(chat, cmd){ + if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if( !basicBot.commands.executable(this.rank, chat) ) return void (0); + else{ + + } + } + }, + **/ + + activeCommand: { + command: 'active', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var now = Date.now(); + var chatters = 0; + var time; - }, - getPermission: function (obj) { //1 requests - var u; - if (typeof obj === "object") u = obj; - else u = API.getUser(obj); - for (var i = 0; i < botCreatorIDs.length; i++) { - if (botCreatorIDs[i].indexOf(u.id) > -1) return 10; - } - if (u.gRole < 2) return u.role; + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + var since = durationOnline / 1000; + + if (msg.length === cmd.length) time = since; else { - switch (u.gRole) { - case 2: - return 7; - case 3: - return 8; - case 4: - return 9; - case 5: - return 10; - } - } - return 0; - }, - moveUser: function (id, pos, priority) { - var user = basicBot.userUtilities.lookupUser(id); - var wlist = API.getWaitList(); - if (API.getWaitListPosition(id) === -1) { - if (wlist.length < 50) { - API.moderateAddDJ(id); - if (pos !== 0) setTimeout(function (id, pos) { - API.moderateMoveDJ(id, pos); - }, 1250, id, pos); - } - else { - var alreadyQueued = -1; - for (var i = 0; i < basicBot.room.queue.id.length; i++) { - if (basicBot.room.queue.id[i] === id) alreadyQueued = i; - } - if (alreadyQueued !== -1) { - basicBot.room.queue.position[alreadyQueued] = pos; - return API.sendChat(subChat(basicBot.chat.alreadyadding, {position: basicBot.room.queue.position[alreadyQueued]})); - } - basicBot.roomUtilities.booth.lockBooth(); - if (priority) { - basicBot.room.queue.id.unshift(id); - basicBot.room.queue.position.unshift(pos); - } - else { - basicBot.room.queue.id.push(id); - basicBot.room.queue.position.push(pos); - } - var name = user.username; - return API.sendChat(subChat(basicBot.chat.adding, {name: name, position: basicBot.room.queue.position.length})); - } + time = msg.substring(cmd.length + 1); + if (isNaN(time)) return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); } - else API.moderateMoveDJ(id, pos); - }, - dclookup: function (id) { - var user = basicBot.userUtilities.lookupUser(id); - if (typeof user === 'boolean') return basicBot.chat.usernotfound; - var name = user.username; - if (user.lastDC.time === null) return subChat(basicBot.chat.notdisconnected, {name: name}); - var dc = user.lastDC.time; - var pos = user.lastDC.position; - if (pos === null) return basicBot.chat.noposition; - var timeDc = Date.now() - dc; - var validDC = false; - if (basicBot.settings.maximumDc * 60 * 1000 > timeDc) { - validDC = true; - } - var time = basicBot.roomUtilities.msToStr(timeDc); - if (!validDC) return (subChat(basicBot.chat.toolongago, {name: basicBot.userUtilities.getUser(user).username, time: time})); - var songsPassed = basicBot.room.roomstats.songCount - user.lastDC.songCount; - var afksRemoved = 0; - var afkList = basicBot.room.afkList; - for (var i = 0; i < afkList.length; i++) { - var timeAfk = afkList[i][1]; - var posAfk = afkList[i][2]; - if (dc < timeAfk && posAfk < pos) { - afksRemoved++; - } + for (var i = 0; i < basicBot.room.users.length; i++) { + userTime = basicBot.userUtilities.getLastActivity(basicBot.room.users[i]); + if ((now - userTime) <= (time * 60 * 1000)) { + chatters++; + } } - var newPosition = user.lastDC.position - songsPassed - afksRemoved; - if (newPosition <= 0) return subChat(basicBot.chat.notdisconnected, {name: name}); - var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); - basicBot.userUtilities.moveUser(user.id, newPosition, true); - return msg; + API.sendChat(subChat(basicBot.chat.activeusersintime, {name: chat.un, amount: chatters, time: time})); + } } - }, - - roomUtilities: { - rankToNumber: function (rankString) { - var rankInt = null; - switch (rankString) { - case "admin": - rankInt = 10; - break; - case "ambassador": - rankInt = 7; - break; - case "host": - rankInt = 5; - break; - case "cohost": - rankInt = 4; - break; - case "manager": - rankInt = 3; - break; - case "bouncer": - rankInt = 2; - break; - case "residentdj": - rankInt = 1; - break; - case "user": - rankInt = 0; - break; - } - return rankInt; - }, - 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.minutes < 1 && timeAway.hours < 1 && timeAway.days < 1) { - msg += timeAway.seconds.toString() + 's'; - } - if (msg !== '') { - return msg; - } else { - return false; - } - }, - booth: { - lockTimer: setTimeout(function () { - }, 1000), - locked: false, - lockBooth: function () { - API.moderateLockWaitList(!basicBot.roomUtilities.booth.locked); - basicBot.roomUtilities.booth.locked = false; - if (basicBot.settings.lockGuard) { - basicBot.roomUtilities.booth.lockTimer = setTimeout(function () { - API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); - }, basicBot.settings.maximumLocktime * 60 * 1000); - } - }, - unlockBooth: function () { - API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); - clearTimeout(basicBot.roomUtilities.booth.lockTimer); + }, + + addCommand: { + command: 'add', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (msg.length > cmd.length + 2) { + if (typeof user !== 'undefined') { + if (basicBot.room.roomevent) { + basicBot.room.eventArtists.push(user.id); + } + API.moderateAddDJ(user.id); + } else API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + } + } + } + }, + + afklimitCommand: { + command: 'afklimit', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolimitspecified, {name: chat.un})); + var limit = msg.substring(cmd.length + 1); + if (!isNaN(limit)) { + basicBot.settings.maximumAfk = parseInt(limit, 10); + API.sendChat(subChat(basicBot.chat.maximumafktimeset, {name: chat.un, time: basicBot.settings.maximumAfk})); + } + else API.sendChat(subChat(basicBot.chat.invalidlimitspecified, {name: chat.un})); + } + } + }, + + afkremovalCommand: { + command: 'afkremoval', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.afkRemoval) { + basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; + clearInterval(basicBot.room.afkInterval); + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.afkremoval})); } - }, - afkCheck: function () { - if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); - var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); - var djlist = API.getWaitList(); - var lastPos = Math.min(djlist.length, basicBot.settings.afkpositionCheck); - if (lastPos - 1 > djlist.length) return void (0); - for (var i = 0; i < lastPos; i++) { - if (typeof djlist[i] !== 'undefined') { - var id = djlist[i].id; - var user = basicBot.userUtilities.lookupUser(id); - if (typeof user !== 'boolean') { - var plugUser = basicBot.userUtilities.getUser(user); - if (rank !== null && basicBot.userUtilities.getPermission(plugUser) <= rank) { - var name = plugUser.username; - var lastActive = basicBot.userUtilities.getLastActivity(user); - var inactivity = Date.now() - lastActive; - var time = basicBot.roomUtilities.msToStr(inactivity); - var warncount = user.afkWarningCount; - if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { - if (warncount === 0) { - API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); - user.afkWarningCount = 3; - user.afkCountdown = setTimeout(function (userToChange) { - userToChange.afkWarningCount = 1; - }, 90 * 1000, user); - } - else if (warncount === 1) { - API.sendChat(subChat(basicBot.chat.warning2, {name: name})); - user.afkWarningCount = 3; - user.afkCountdown = setTimeout(function (userToChange) { - userToChange.afkWarningCount = 2; - }, 30 * 1000, user); - } - else if (warncount === 2) { - var pos = API.getWaitListPosition(id); - if (pos !== -1) { - pos++; - basicBot.room.afkList.push([id, Date.now(), pos]); - user.lastDC = { - - time: null, - position: null, - songCount: 0 - }; - API.moderateRemoveDJ(id); - API.sendChat(subChat(basicBot.chat.afkremove, {name: name, time: time, position: pos, maximumafk: basicBot.settings.maximumAfk})); - } - user.afkWarningCount = 0; - } - } - } - } - } + else { + basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; + basicBot.room.afkInterval = setInterval(function () { + basicBot.roomUtilities.afkCheck() + }, 2 * 1000); + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.afkremoval})); } - }, - smartSkip: function (reason) { - var dj = API.getDJ(); - var id = dj.id; - var waitlistlength = API.getWaitList().length; - var locked = false; - basicBot.room.queueable = false; - - if (waitlistlength == 50) { - basicBot.roomUtilities.booth.lockBooth(); - locked = true; + } + } + }, + + afkresetCommand: { + command: 'afkreset', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + basicBot.userUtilities.setLastActivity(user); + API.sendChat(subChat(basicBot.chat.afkstatusreset, {name: chat.un, username: name})); + } + } + }, + + afktimeCommand: { + command: 'afktime', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var lastActive = basicBot.userUtilities.getLastActivity(user); + var inactivity = Date.now() - lastActive; + var time = basicBot.roomUtilities.msToStr(inactivity); + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + + if (inactivity == durationOnline){ + API.sendChat(subChat(basicBot.chat.inactivelonger, {botname: basicBot.settings.botName, name: chat.un, username: name})); + } else { + API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); } - setTimeout(function (id) { - API.moderateForceSkip(); - setTimeout(function () { - if (typeof reason !== 'undefined') { - API.sendChat(reason); - } - }, 500); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.skipPosition, false); - basicBot.room.queueable = true; - if (locked) { - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - } - }, 1500, id); - }, 1000, id); - }, - changeDJCycle: function () { - var toggle = $(".cycle-toggle"); - if (toggle.hasClass("disabled")) { - toggle.click(); - if (basicBot.settings.cycleGuard) { - basicBot.room.cycleTimer = setTimeout(function () { - if (toggle.hasClass("enabled")) toggle.click(); - }, basicBot.settings.cycleMaxTime * 60 * 1000); - } + } + } + }, + + autodisableCommand: { + command: 'autodisable', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.autodisable) { + basicBot.settings.autodisable = !basicBot.settings.autodisable; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autodisable})); } else { - toggle.click(); - clearTimeout(basicBot.room.cycleTimer); + basicBot.settings.autodisable = !basicBot.settings.autodisable; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autodisable})); } - // TODO: Use API.moderateDJCycle(true/false) - }, - intervalMessage: function () { - var interval; - if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; - else interval = basicBot.settings.messageInterval; - if ((basicBot.room.roomstats.songCount % interval) === 0 && basicBot.status) { - var msg; - if (basicBot.settings.motdEnabled) { - msg = basicBot.settings.motd; - } - else { - if (basicBot.settings.intervalMessages.length === 0) return void (0); - var messageNumber = basicBot.room.roomstats.songCount % basicBot.settings.intervalMessages.length; - msg = basicBot.settings.intervalMessages[messageNumber]; - } - API.sendChat('/me ' + msg); - } - }, - updateBlacklists: function () { - for (var bl in basicBot.settings.blacklists) { - basicBot.room.blacklists[bl] = []; - if (typeof basicBot.settings.blacklists[bl] === 'function') { - basicBot.room.blacklists[bl] = basicBot.settings.blacklists(); - } - else if (typeof basicBot.settings.blacklists[bl] === 'string') { - if (basicBot.settings.blacklists[bl] === '') { - continue; - } - try { - (function (l) { - $.get(basicBot.settings.blacklists[l], function (data) { - if (typeof data === 'string') { - data = JSON.parse(data); - } - var list = []; - for (var prop in data) { - if (typeof data[prop].mid !== 'undefined') { - list.push(data[prop].mid); - } - } - basicBot.room.blacklists[l] = list; - }) - })(bl); - } - catch (e) { - API.chatLog('Error setting' + bl + 'blacklist.'); - console.log('Error setting' + bl + 'blacklist.'); - console.log(e); - } - } - } - }, - logNewBlacklistedSongs: function () { - if (typeof console.table !== 'undefined') { - console.table(basicBot.room.newBlacklisted); + } + } + }, + + autoskipCommand: { + command: 'autoskip', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.autoskip) { + basicBot.settings.autoskip = !basicBot.settings.autoskip; + clearTimeout(basicBot.room.autoskipTimer); + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); } else { - console.log(basicBot.room.newBlacklisted); + basicBot.settings.autoskip = !basicBot.settings.autoskip; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); } - }, - exportNewBlacklistedSongs: function () { - var list = {}; - for (var i = 0; i < basicBot.room.newBlacklisted.length; i++) { - var track = basicBot.room.newBlacklisted[i]; - list[track.list] = []; - list[track.list].push({ - title: track.title, - author: track.author, - mid: track.mid - }); - } - return list; + } } - }, - eventChat: function (chat) { - chat.message = linkFixer(chat.message); - chat.message = decodeEntities(chat.message); - chat.message = chat.message.trim(); - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === chat.uid) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); - if (basicBot.room.users[i].username !== chat.un) { - basicBot.room.users[i].username = chat.un; - } - } + }, + + autowootCommand: { + command: 'autowoot', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.autowoot); + } } - if (basicBot.chatUtilities.chatFilter(chat)) return void (0); - if (!basicBot.chatUtilities.commandCheck(chat)) - basicBot.chatUtilities.action(chat); - }, - eventUserjoin: function (user) { - var known = false; - var index = null; - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === user.id) { - known = true; - index = i; - } + }, + + baCommand: { + command: 'ba', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.brandambassador); + } } - var greet = true; - var welcomeback = null; - if (known) { - basicBot.room.users[index].inRoom = true; - var u = basicBot.userUtilities.lookupUser(user.id); - var jt = u.jointime; - var t = Date.now() - jt; - if (t < 10 * 1000) greet = false; - else welcomeback = true; + }, + + ballCommand: { + command: ['8ball', 'ask'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var crowd = API.getUsers(); + var msg = chat.message; + var argument = msg.substring(cmd.length + 1).replace(/@/g, ''); + var randomUser = Math.floor(Math.random() * crowd.length); + var randomBall = Math.floor(Math.random() * basicBot.chat.balls.length); + var randomSentence = Math.floor(Math.random() * 1); + API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.chat.balls[randomBall]})); + } } - else { - basicBot.room.users.push(new basicBot.User(user.id, user.username)); - welcomeback = false; + }, + + banCommand: { + command: 'ban', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + API.moderateBanUser(user.id, 1, API.BAN.DAY); + } } - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === user.id) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); - basicBot.room.users[j].jointime = Date.now(); + }, + + blacklistCommand: { + command: ['blacklist', 'bl'], + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolistspecified, {name: chat.un})); + var list = msg.substr(cmd.length + 1); + if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); + else { + var media = API.getMedia(); + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + var track = { + list: list, + author: media.author, + title: media.title, + mid: media.format + ':' + media.cid + }; + basicBot.room.newBlacklisted.push(track); + basicBot.room.blacklists[list].push(media.format + ':' + media.cid); + API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { + basicBot.room.newBlacklistedSongFunction(track); + } } - + } } - if (basicBot.settings.welcome && greet) { - welcomeback ? - setTimeout(function (user) { - API.sendChat(subChat(basicBot.chat.welcomeback, {name: user.username})); - }, 1 * 1000, user) - : - setTimeout(function (user) { - API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); - }, 1 * 1000, user); + }, + + blinfoCommand: { + command: 'blinfo', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var author = API.getMedia().author; + var title = API.getMedia().title; + var name = chat.un; + var format = API.getMedia().format; + var cid = API.getMedia().cid; + var songid = format + ":" + cid; + + API.sendChat(subChat(basicBot.chat.blinfo, {name: name, author: author, title: title, songid: songid})); + } } - }, - eventUserleave: function (user) { - var lastDJ = API.getHistory()[0].user.id; - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === user.id) { - basicBot.userUtilities.updateDC(basicBot.room.users[i]); - basicBot.room.users[i].inRoom = false; - if (lastDJ == user.id){ - var user = basicBot.userUtilities.lookupUser(basicBot.room.users[i].id); - basicBot.userUtilities.updatePosition(user, 0); - user.lastDC.time = null; - user.lastDC.position = user.lastKnownPosition; + }, + + bouncerPlusCommand: { + command: 'bouncer+', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (basicBot.settings.bouncerPlus) { + basicBot.settings.bouncerPlus = false; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': 'Bouncer+'})); + } + else { + if (!basicBot.settings.bouncerPlus) { + var id = chat.uid; + var perm = basicBot.userUtilities.getPermission(id); + if (perm > 2) { + basicBot.settings.bouncerPlus = true; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': 'Bouncer+'})); } + } + else return API.sendChat(subChat(basicBot.chat.bouncerplusrank, {name: chat.un})); } + } } - }, - eventVoteupdate: function (obj) { - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === obj.user.id) { - if (obj.vote === 1) { - basicBot.room.users[i].votes.woot++; - } - else { - basicBot.room.users[i].votes.meh++; - } - } - } - - var mehs = API.getScore().negative; - var woots = API.getScore().positive; - var dj = API.getDJ(); - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - - if (basicBot.settings.voteSkip) { - if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { - API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); - } - else { - API.moderateForceSkip(); - } + }, + + botnameCommand: { + command: 'botname', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentbotname, {botname: basicBot.settings.botName})); + var argument = msg.substring(cmd.length + 1); + if (argument) { + basicBot.settings.botName = argument; + API.sendChat(subChat(basicBot.chat.botnameset, {botName: basicBot.settings.botName})); } + } } - - }, - eventCurateupdate: function (obj) { - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === obj.user.id) { - basicBot.room.users[i].votes.curate++; - } + }, + + clearchatCommand: { + command: 'clearchat', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var currentchat = $('#chat-messages').children(); + for (var i = 0; i < currentchat.length; i++) { + API.moderateDeleteChat(currentchat[i].getAttribute("data-cid")); + } + return API.sendChat(subChat(basicBot.chat.chatcleared, {name: chat.un})); + } } - }, - eventDjadvance: function (obj) { - if (basicBot.settings.autowoot) { - $("#woot").click(); // autowoot + }, + + commandsCommand: { + command: 'commands', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); + } } - - var user = basicBot.userUtilities.lookupUser(obj.dj.id) - for(var i = 0; i < basicBot.room.users.length; i++){ - if(basicBot.room.users[i].id === user.id){ - basicBot.room.users[i].lastDC = { - time: null, - position: null, - songCount: 0 - }; + }, + + cmddeletionCommand: { + command: ['commanddeletion', 'cmddeletion', 'cmddel'], + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.cmdDeletion) { + basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cmddeletion})); } + else { + basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + } + } } + }, + + cookieCommand: { + command: 'cookie', + rank: 'user', + type: 'startsWith', + getCookie: function (chat) { + var c = Math.floor(Math.random() * basicBot.chat.cookies.length); + return basicBot.chat.cookies[c]; + }, + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; - var lastplay = obj.lastPlay; - if (typeof lastplay === 'undefined') return; - if (basicBot.settings.songstats) { - if (typeof basicBot.chat.songstatistics === "undefined") { - API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") + var space = msg.indexOf(' '); + if (space === -1) { + API.sendChat(basicBot.chat.eatcookie); + return false; } else { - API.sendChat(subChat(basicBot.chat.songstatistics, {artist: lastplay.media.author, title: lastplay.media.title, woots: lastplay.score.positive, grabs: lastplay.score.grabs, mehs: lastplay.score.negative})) - } - } - basicBot.room.roomstats.totalWoots += lastplay.score.positive; - basicBot.room.roomstats.totalMehs += lastplay.score.negative; - basicBot.room.roomstats.totalCurates += lastplay.score.grabs; - basicBot.room.roomstats.songCount++; - basicBot.roomUtilities.intervalMessage(); - basicBot.room.currentDJID = obj.dj.id; - - var blacklistSkip = setTimeout(function () { - var mid = obj.media.format + ':' + obj.media.cid; - for (var bl in basicBot.room.blacklists) { - if (basicBot.settings.blacklistEnabled) { - if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { - API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - } - } - }, 2000); - var newMedia = obj.media; - var timeLimitSkip = setTimeout(function () { - if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - }, 2000); - var format = obj.media.format; - var cid = obj.media.cid; - var naSkip = setTimeout(function () { - if (format == 1){ - $.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + cid + '&key=AIzaSyDcfWu9cGaDnTjPKhg_dy9mUh6H7i4ePZ0&part=snippet&callback=?', function (track){ - if (typeof(track.items[0]) === 'undefined'){ - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - }); + var name = msg.substring(space + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false || !user.inRoom) { + return API.sendChat(subChat(basicBot.chat.nousercookie, {name: name})); + } + else if (user.username === chat.un) { + return API.sendChat(subChat(basicBot.chat.selfcookie, {name: name})); + } + else { + return API.sendChat(subChat(basicBot.chat.cookie, {nameto: user.username, namefrom: chat.un, cookie: this.getCookie()})); + } + } + } + } + }, + + cycleCommand: { + command: 'cycle', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.changeDJCycle(); + } + } + }, + + cycleguardCommand: { + command: 'cycleguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.cycleGuard) { + basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cycleguard})); } else { - var checkSong = SC.get('/tracks/' + cid, function (track){ - if (typeof track.title === 'undefined'){ - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - }); + basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cycleguard})); } - }, 2000); - clearTimeout(historySkip); - if (basicBot.settings.historySkip) { - var alreadyPlayed = false; - var apihistory = API.getHistory(); - var name = obj.dj.username; - var historySkip = setTimeout(function () { - for (var i = 0; i < apihistory.length; i++) { - if (apihistory[i].media.cid === obj.media.cid) { - basicBot.room.historyList[i].push(+new Date()); - alreadyPlayed = true; - API.sendChat(subChat(basicBot.chat.songknown, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - } - if (!alreadyPlayed) { - basicBot.room.historyList.push([obj.media.cid, +new Date()]); - } - }, 2000); - } - if (user.ownSong) { - API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); - user.ownSong = false; - } - clearTimeout(basicBot.room.autoskipTimer); - if (basicBot.settings.autoskip) { - var remaining = obj.media.duration * 1000; - var startcid = API.getMedia().cid; - basicBot.room.autoskipTimer = setTimeout(function() { - var endcid = API.getMedia().cid; - if (startcid === endcid) { - //API.sendChat('Song stuck, skipping...'); - API.moderateForceSkip(); - } - }, remaining + 5000); + + } } - storeToStorage(); - sendToSocket(); - }, - eventWaitlistupdate: function (users) { - if (users.length < 50) { - if (basicBot.room.queue.id.length > 0 && basicBot.room.queueable) { - basicBot.room.queueable = false; - setTimeout(function () { - basicBot.room.queueable = true; - }, 500); - basicBot.room.queueing++; - var id, pos; - setTimeout( - function () { - id = basicBot.room.queue.id.splice(0, 1)[0]; - pos = basicBot.room.queue.position.splice(0, 1)[0]; - API.moderateAddDJ(id, pos); - setTimeout( - function (id, pos) { - API.moderateMoveDJ(id, pos); - basicBot.room.queueing--; - if (basicBot.room.queue.id.length === 0) setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1000, id, pos); - }, 1000 + basicBot.room.queueing * 2500); - } - } - for (var i = 0; i < users.length; i++) { - var user = basicBot.userUtilities.lookupUser(users[i].id); - basicBot.userUtilities.updatePosition(user, API.getWaitListPosition(users[i].id) + 1); + }, + + cycletimerCommand: { + command: 'cycletimer', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var cycleTime = msg.substring(cmd.length + 1); + if (!isNaN(cycleTime) && cycleTime !== "") { + basicBot.settings.maximumCycletime = cycleTime; + return API.sendChat(subChat(basicBot.chat.cycleguardtime, {name: chat.un, time: basicBot.settings.maximumCycletime})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + + } } - }, - chatcleaner: function (chat) { - if (!basicBot.settings.filterChat) return false; - if (basicBot.userUtilities.getPermission(chat.uid) > 1) return false; - var msg = chat.message; - var containsLetters = false; - for (var i = 0; i < msg.length; i++) { - ch = msg.charAt(i); - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch === ':' || ch === '^') containsLetters = true; + }, + + dclookupCommand: { + command: ['dclookup', 'dc'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substring(cmd.length + 2); + var perm = basicBot.userUtilities.getPermission(chat.uid); + if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var toChat = basicBot.userUtilities.dclookup(user.id); + API.sendChat(toChat); + } } - if (msg === '') { - return true; + }, + + /*deletechatCommand: { + command: 'deletechat', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var chats = $('.from'); + var message = $('.message'); + var emote = $('.emote'); + var from = $('.un.clickable'); + for (var i = 0; i < chats.length; i++) { + var n = from[i].textContent; + if (name.trim() === n.trim()) { + + // var messagecid = $(message)[i].getAttribute('data-cid'); + // var emotecid = $(emote)[i].getAttribute('data-cid'); + // API.moderateDeleteChat(messagecid); + + // try { + // API.moderateDeleteChat(messagecid); + // } + // finally { + // API.moderateDeleteChat(emotecid); + // } + + if (typeof $(message)[i].getAttribute('data-cid') == "undefined"){ + API.moderateDeleteChat($(emote)[i].getAttribute('data-cid')); // works well with normal messages but not with emotes due to emotes and messages are seperate. + } else { + API.moderateDeleteChat($(message)[i].getAttribute('data-cid')); + } + } + } + API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); + } + } + },*/ + + emojiCommand: { + command: 'emoji', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var link = 'http://www.emoji-cheat-sheet.com/'; + API.sendChat(subChat(basicBot.chat.emojilist, {link: link})); + } } - if (!containsLetters && (msg.length === 1 || msg.length > 3)) return true; - msg = msg.replace(/[ ,;.:\/=~+%^*\-\\"'&@#]/g, ''); - var capitals = 0; - var ch; - for (var i = 0; i < msg.length; i++) { - ch = msg.charAt(i); - if (ch >= 'A' && ch <= 'Z') capitals++; + }, + + englishCommand: { + command: 'english', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if(chat.message.length === cmd.length) return API.sendChat('/me No user specified.'); + var name = chat.message.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if(typeof user === 'boolean') return API.sendChat('/me Invalid user specified.'); + var lang = basicBot.userUtilities.getUser(user).language; + var ch = '/me @' + name + ' '; + switch(lang){ + case 'en': break; + case 'da': ch += 'Vær venlig at tale engelsk.'; break; + case 'de': ch += 'Bitte sprechen Sie Englisch.'; break; + case 'es': ch += 'Por favor, hable Inglés.'; break; + case 'fr': ch += 'Parlez anglais, s\'il vous plaît.'; break; + case 'nl': ch += 'Spreek Engels, alstublieft.'; break; + case 'pl': ch += 'Proszę mówić po angielsku.'; break; + case 'pt': ch += 'Por favor, fale Inglês.'; break; + case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; + case 'cs': ch += 'Mluvte prosím anglicky.'; break; + case 'sr': ch += 'Молим Вас, говорите енглески.'; break; + } + ch += ' English please.'; + API.sendChat(ch); + } } - if (capitals >= 40) { - API.sendChat(subChat(basicBot.chat.caps, {name: chat.un})); - return true; + }, + + etaCommand: { + command: 'eta', + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var perm = basicBot.userUtilities.getPermission(chat.uid); + var msg = chat.message; + var dj = API.getDJ().username; + var name; + if (msg.length > cmd.length) { + if (perm < 2) return void (0); + name = msg.substring(cmd.length + 2); + } else name = chat.un; + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var pos = API.getWaitListPosition(user.id); + var realpos = pos + 1; + if (name == dj) return API.sendChat(subChat(basicBot.chat.youaredj, {name: name})); + if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); + if (pos == 0) return API.sendChat(subChat(basicBot.chat.youarenext, {name: name})); + var timeRemaining = API.getTimeRemaining(); + var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; + var estimateString = basicBot.roomUtilities.msToStr(estimateMS); + API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString, position: realpos})); + } } - msg = msg.toLowerCase(); - if (msg === 'skip') { - API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); - return true; + }, + + fbCommand: { + command: 'fb', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.fbLink === "string") + API.sendChat(subChat(basicBot.chat.facebook, {link: basicBot.settings.fbLink})); + } } - for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { - if (msg === basicBot.chatUtilities.spam[j]) { - API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); - return true; + }, + + filterCommand: { + command: 'filter', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.filterChat) { + basicBot.settings.filterChat = !basicBot.settings.filterChat; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.chatfilter})); + } + else { + basicBot.settings.filterChat = !basicBot.settings.filterChat; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.chatfilter})); } + } } - return false; - }, - chatUtilities: { - chatFilter: function (chat) { + }, + + forceskipCommand: { + command: ['forceskip', 'fs'], + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.forceskip, {name: chat.un})); + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + + } + } + }, + + ghostbusterCommand: { + command: 'ghostbuster', + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { var msg = chat.message; - var perm = basicBot.userUtilities.getPermission(chat.uid); - var user = basicBot.userUtilities.lookupUser(chat.uid); - var isMuted = false; - for (var i = 0; i < basicBot.room.mutedUsers.length; i++) { - if (basicBot.room.mutedUsers[i] === chat.uid) isMuted = true; - } - if (isMuted) { - API.moderateDeleteChat(chat.cid); - return true; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substr(cmd.length + 2); } - if (basicBot.settings.lockdownEnabled) { - if (perm === 0) { - API.moderateDeleteChat(chat.cid); - return true; - } + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false || !user.inRoom) { + return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); } - if (basicBot.chatcleaner(chat)) { - API.moderateDeleteChat(chat.cid); - return true; + else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); + } + } + }, + + gifCommand: { + command: ['gif', 'giphy'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length !== cmd.length) { + function get_id(api_key, fixedtag, func) + { + $.getJSON( + "https://tv.giphy.com/v1/gifs/random?", + { + "format": "json", + "api_key": api_key, + "rating": rating, + "tag": fixedtag + }, + function(response) + { + func(response.data.id); + } + ) + } + var api_key = "dc6zaTOxFJmzC"; // public beta key + var rating = "pg-13"; // PG 13 gifs + var tag = msg.substr(cmd.length + 1); + var fixedtag = tag.replace(/ /g,"+"); + var commatag = tag.replace(/ /g,", "); + get_id(api_key, tag, function(id) { + if (typeof id !== 'undefined') { + API.sendChat(subChat(basicBot.chat.validgiftags, {name: chat.un, id: id, tags: commatag})); + } else { + API.sendChat(subChat(basicBot.chat.invalidgiftags, {name: chat.un, tags: commatag})); + } + }); } - if (basicBot.settings.cmdDeletion && msg.startsWith(basicBot.settings.commandLiteral)) { - API.moderateDeleteChat(chat.cid); + else { + function get_random_id(api_key, func) + { + $.getJSON( + "https://tv.giphy.com/v1/gifs/random?", + { + "format": "json", + "api_key": api_key, + "rating": rating + }, + function(response) + { + func(response.data.id); + } + ) + } + var api_key = "dc6zaTOxFJmzC"; // public beta key + var rating = "pg-13"; // PG 13 gifs + get_random_id(api_key, function(id) { + if (typeof id !== 'undefined') { + API.sendChat(subChat(basicBot.chat.validgifrandom, {name: chat.un, id: id})); + } else { + API.sendChat(subChat(basicBot.chat.invalidgifrandom, {name: chat.un})); + } + }); + } + } + } + }, + + helpCommand: { + command: 'help', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var link = "(Updated link coming soon)"; + API.sendChat(subChat(basicBot.chat.starterhelp, {link: link})); + } + } + }, + + historyskipCommand: { + command: 'historyskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.historySkip) { + basicBot.settings.historySkip = !basicBot.settings.historySkip; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.historyskip})); } - /** - var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - if (plugRoomLinkPatt.exec(msg)) { - if (perm === 0) { - API.sendChat(subChat(basicBot.chat.roomadvertising, {name: chat.un})); - API.moderateDeleteChat(chat.cid); - return true; - } + else { + basicBot.settings.historySkip = !basicBot.settings.historySkip; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.historyskip})); } - **/ - if (msg.indexOf('http://adf.ly/') > -1) { - API.moderateDeleteChat(chat.cid); - API.sendChat(subChat(basicBot.chat.adfly, {name: chat.un})); - return true; + } + } + }, + + joinCommand: { + command: 'join', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.roulette.rouletteStatus && basicBot.room.roulette.participants.indexOf(chat.uid) < 0) { + basicBot.room.roulette.participants.push(chat.uid); + API.sendChat(subChat(basicBot.chat.roulettejoin, {name: chat.un})); + } + } + } + }, + + jointimeCommand: { + command: 'jointime', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var join = basicBot.userUtilities.getJointime(user); + var time = Date.now() - join; + var timeString = basicBot.roomUtilities.msToStr(time); + API.sendChat(subChat(basicBot.chat.jointime, {namefrom: chat.un, username: name, time: timeString})); + } + } + }, + + kickCommand: { + command: 'kick', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var lastSpace = msg.lastIndexOf(' '); + var time; + var name; + if (lastSpace === msg.indexOf(' ')) { + time = 0.25; + name = msg.substring(cmd.length + 2); } - if (msg.indexOf('autojoin was not enabled') > 0 || msg.indexOf('AFK message was not enabled') > 0 || msg.indexOf('!afkdisable') > 0 || msg.indexOf('!joindisable') > 0 || msg.indexOf('autojoin disabled') > 0 || msg.indexOf('AFK message disabled') > 0) { - API.moderateDeleteChat(chat.cid); - return true; + else { + time = msg.substring(lastSpace + 1); + name = msg.substring(cmd.length + 2, lastSpace); } - var rlJoinChat = basicBot.chat.roulettejoin; - var rlLeaveChat = basicBot.chat.rouletteleave; + var user = basicBot.userUtilities.lookupUserName(name); + var from = chat.un; + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var joinedroulette = rlJoinChat.split('%%NAME%%'); - if (joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; - else joinedroulette = joinedroulette[0]; + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permTokick = basicBot.userUtilities.getPermission(user.id); - var leftroulette = rlLeaveChat.split('%%NAME%%'); - if (leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; - else leftroulette = leftroulette[0]; + if (permFrom <= permTokick) + return API.sendChat(subChat(basicBot.chat.kickrank, {name: chat.un})); - if ((msg.indexOf(joinedroulette) > -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { - setTimeout(function (id) { - API.moderateDeleteChat(id); - }, 5 * 1000, chat.cid); - return true; + if (!isNaN(time)) { + API.sendChat(subChat(basicBot.chat.kick, {name: chat.un, username: name, time: time})); + if (time > 24 * 60 * 60) API.moderateBanUser(user.id, 1, API.BAN.PERMA); + else API.moderateBanUser(user.id, 1, API.BAN.DAY); + setTimeout(function (id, name) { + API.moderateUnbanUser(id); + console.log('Unbanned @' + name + '. (' + id + ')'); + }, time * 60 * 1000, user.id, name); } - return false; - }, - commandCheck: function (chat) { - var cmd; - if (chat.message.charAt(0) === basicBot.settings.commandLiteral) { - var space = chat.message.indexOf(' '); - if (space === -1) { - cmd = chat.message; - } - else cmd = chat.message.substring(0, space); - } - else return false; - var userPerm = basicBot.userUtilities.getPermission(chat.uid); - //console.log("name: " + chat.un + ", perm: " + userPerm); - if (chat.message !== basicBot.settings.commandLiteral + 'join' && chat.message !== basicBot.settings.commandLiteral + "leave") { - if (userPerm === 0 && !basicBot.room.usercommand) return void (0); - if (!basicBot.room.allcommand) return void (0); - } - if (chat.message === basicBot.settings.commandLiteral + 'eta' && basicBot.settings.etaRestriction) { - if (userPerm < 2) { - var u = basicBot.userUtilities.lookupUser(chat.uid); - if (u.lastEta !== null && (Date.now() - u.lastEta) < 1 * 60 * 60 * 1000) { - API.moderateDeleteChat(chat.cid); - return void (0); - } - else u.lastEta = Date.now(); - } + else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + killCommand: { + command: 'kill', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + storeToStorage(); + sendToSocket(); + API.sendChat(basicBot.chat.kill); + basicBot.disconnectAPI(); + setTimeout(function () { + kill(); + }, 1000); + } + } + }, + + languageCommand: { + command: 'language', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); + var argument = msg.substring(cmd.length + 1); + + $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { + var langIndex = json; + var link = langIndex[argument.toLowerCase()]; + if (typeof link === "undefined") { + API.sendChat(subChat(basicBot.chat.langerror, {link: "http://git.io/vJ9nI"})); + } + else { + basicBot.settings.language = argument; + loadChat(); + API.sendChat(subChat(basicBot.chat.langset, {language: basicBot.settings.language})); + } + }); + } + } + }, + + leaveCommand: { + command: 'leave', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var ind = basicBot.room.roulette.participants.indexOf(chat.uid); + if (ind > -1) { + basicBot.room.roulette.participants.splice(ind, 1); + API.sendChat(subChat(basicBot.chat.rouletteleave, {name: chat.un})); + } + } + } + }, + + linkCommand: { + command: 'link', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var media = API.getMedia(); + var from = chat.un; + var user = basicBot.userUtilities.lookupUser(chat.uid); + var perm = basicBot.userUtilities.getPermission(chat.uid); + var dj = API.getDJ().id; + var isDj = false; + if (dj === chat.uid) isDj = true; + if (perm >= 1 || isDj) { + if (media.format === 1) { + var linkToSong = "http://youtu.be/" + media.cid; + API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); + } + if (media.format === 2) { + SC.get('/tracks/' + media.cid, function (sound) { + API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: sound.permalink_url})); + }); + } } - var executed = false; - - for (var comm in basicBot.commands) { - var cmdCall = basicBot.commands[comm].command; - if (!Array.isArray(cmdCall)) { - cmdCall = [cmdCall] - } - for (var i = 0; i < cmdCall.length; i++) { - if (basicBot.settings.commandLiteral + cmdCall[i] === cmd) { - basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[i]); - executed = true; - break; - } - } + } + } + }, + + lockCommand: { + command: 'lock', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.booth.lockBooth(); + } + } + }, + + lockdownCommand: { + command: 'lockdown', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var temp = basicBot.settings.lockdownEnabled; + basicBot.settings.lockdownEnabled = !temp; + if (basicBot.settings.lockdownEnabled) { + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockdown})); } - - if (executed && userPerm === 0) { - basicBot.room.usercommand = false; - setTimeout(function () { - basicBot.room.usercommand = true; - }, basicBot.settings.commandCooldown * 1000); + else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); + } + } + }, + + lockguardCommand: { + command: 'lockguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.lockGuard) { + basicBot.settings.lockGuard = !basicBot.settings.lockGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockguard})); } - if (executed) { - /*if (basicBot.settings.cmdDeletion) { - API.moderateDeleteChat(chat.cid); - }*/ - - //basicBot.room.allcommand = false; - //setTimeout(function () { - basicBot.room.allcommand = true; - //}, 5 * 1000); + else { + basicBot.settings.lockGuard = !basicBot.settings.lockGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockguard})); } - return executed; - }, - action: function (chat) { - var user = basicBot.userUtilities.lookupUser(chat.uid); - if (chat.type === 'message') { - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === chat.uid) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); - } - - } + } + } + }, + + lockskipCommand: { + command: 'lockskip', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.skippable) { + var dj = API.getDJ(); + var id = dj.id; + var name = dj.username; + var msgSend = '@' + name + ': '; + basicBot.room.queueable = false; + + if (chat.message.length === cmd.length) { + API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); + basicBot.roomUtilities.booth.lockBooth(); + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1500, id); + }, 1000, id); + return void (0); + } + var validReason = false; + var msg = chat.message; + var reason = msg.substring(cmd.length + 1); + for (var i = 0; i < basicBot.settings.lockskipReasons.length; i++) { + var r = basicBot.settings.lockskipReasons[i][0]; + if (reason.indexOf(r) !== -1) { + validReason = true; + msgSend += basicBot.settings.lockskipReasons[i][1]; + } + } + if (validReason) { + API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); + basicBot.roomUtilities.booth.lockBooth(); + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + API.sendChat(msgSend); + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1500, id); + }, 1000, id); + return void (0); + } } - basicBot.room.roomstats.chatmessages++; - }, - spam: [ - 'hueh', 'hu3', 'brbr', 'heu', 'brbr', 'kkkk', 'spoder', 'mafia', 'zuera', 'zueira', - 'zueria', 'aehoo', 'aheu', 'alguem', 'algum', 'brazil', 'zoeira', 'fuckadmins', 'affff', 'vaisefoder', 'huenaarea', - 'hitler', 'ashua', 'ahsu', 'ashau', 'lulz', 'huehue', 'hue', 'huehuehue', 'merda', 'pqp', 'puta', 'mulher', 'pula', 'retarda', 'caralho', 'filha', 'ppk', - 'gringo', 'fuder', 'foder', 'hua', 'ahue', 'modafuka', 'modafoka', 'mudafuka', 'mudafoka', 'ooooooooooooooo', 'foda' - ], - curses: [ - 'nigger', 'faggot', 'nigga', 'niqqa', 'motherfucker', 'modafocka' - ] - }, - connectAPI: function () { - this.proxy = { - eventChat: $.proxy(this.eventChat, this), - eventUserskip: $.proxy(this.eventUserskip, this), - eventUserjoin: $.proxy(this.eventUserjoin, this), - eventUserleave: $.proxy(this.eventUserleave, this), - //eventFriendjoin: $.proxy(this.eventFriendjoin, this), - eventVoteupdate: $.proxy(this.eventVoteupdate, this), - eventCurateupdate: $.proxy(this.eventCurateupdate, this), - eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), - eventDjadvance: $.proxy(this.eventDjadvance, this), - //eventDjupdate: $.proxy(this.eventDjupdate, this), - eventWaitlistupdate: $.proxy(this.eventWaitlistupdate, this), - eventVoteskip: $.proxy(this.eventVoteskip, this), - eventModskip: $.proxy(this.eventModskip, this), - eventChatcommand: $.proxy(this.eventChatcommand, this), - eventHistoryupdate: $.proxy(this.eventHistoryupdate, this), - - }; - API.on(API.CHAT, this.proxy.eventChat); - API.on(API.USER_SKIP, this.proxy.eventUserskip); - API.on(API.USER_JOIN, this.proxy.eventUserjoin); - API.on(API.USER_LEAVE, this.proxy.eventUserleave); - API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); - API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); - API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); - API.on(API.ADVANCE, this.proxy.eventDjadvance); - API.on(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); - API.on(API.MOD_SKIP, this.proxy.eventModskip); - API.on(API.CHAT_COMMAND, this.proxy.eventChatcommand); - API.on(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); - }, - disconnectAPI: function () { - API.off(API.CHAT, this.proxy.eventChat); - API.off(API.USER_SKIP, this.proxy.eventUserskip); - API.off(API.USER_JOIN, this.proxy.eventUserjoin); - API.off(API.USER_LEAVE, this.proxy.eventUserleave); - API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); - API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); - API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); - API.off(API.ADVANCE, this.proxy.eventDjadvance); - API.off(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); - API.off(API.MOD_SKIP, this.proxy.eventModskip); - API.off(API.CHAT_COMMAND, this.proxy.eventChatcommand); - API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); - }, - startup: function () { - Function.prototype.toString = function () { - return 'Function.' - }; - var u = API.getUser(); - if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); - if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); - basicBot.connectAPI(); - API.moderateDeleteChat = function (cid) { - $.ajax({ - url: "https://plug.dj/_/chat/" + cid, - type: "DELETE" - }) - }; - - basicBot.room.name = window.location.pathname; - var Check; - - console.log(basicBot.room.name); - - var detect = function(){ - if(basicBot.room.name != window.location.pathname){ - console.log("Killing bot after room change."); - storeToStorage(); - basicBot.disconnectAPI(); - setTimeout(function () { - kill(); - }, 1000); - if (basicBot.settings.roomLock){ - window.location = 'https://plug.dj' + basicBot.room.name; - } - else { - clearInterval(Check); - } + } + } + }, + + locktimerCommand: { + command: 'locktimer', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var lockTime = msg.substring(cmd.length + 1); + if (!isNaN(lockTime) && lockTime !== "") { + basicBot.settings.maximumLocktime = lockTime; + return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, time: basicBot.settings.maximumLocktime})); } - }; - - Check = setInterval(function(){ detect() }, 2000); - - retrieveSettings(); - retrieveFromStorage(); - window.bot = basicBot; - basicBot.roomUtilities.updateBlacklists(); - setInterval(basicBot.roomUtilities.updateBlacklists, 60 * 60 * 1000); - basicBot.getNewBlacklistedSongs = basicBot.roomUtilities.exportNewBlacklistedSongs; - basicBot.logNewBlacklistedSongs = basicBot.roomUtilities.logNewBlacklistedSongs; - if (basicBot.room.roomstats.launchTime === null) { - basicBot.room.roomstats.launchTime = Date.now(); + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } } - - for (var j = 0; j < basicBot.room.users.length; j++) { - basicBot.room.users[j].inRoom = false; - } - var userlist = API.getUsers(); - for (var i = 0; i < userlist.length; i++) { - var known = false; - var ind = null; - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.room.users[j].id === userlist[i].id) { - known = true; - ind = j; - } + }, + + logoutCommand: { + command: 'logout', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); + setTimeout(function () { + $(".logout").mousedown() + }, 1000); + } + } + }, + + maxlengthCommand: { + command: 'maxlength', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var maxTime = msg.substring(cmd.length + 1); + if (!isNaN(maxTime)) { + basicBot.settings.maximumSongLength = maxTime; + return API.sendChat(subChat(basicBot.chat.maxlengthtime, {name: chat.un, time: basicBot.settings.maximumSongLength})); } - if (known) { - basicBot.room.users[ind].inRoom = true; + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + motdCommand: { + command: 'motd', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat('/me MotD: ' + basicBot.settings.motd); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.motdEnabled) basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + if (isNaN(argument)) { + basicBot.settings.motd = argument; + API.sendChat(subChat(basicBot.chat.motdset, {msg: basicBot.settings.motd})); } else { - basicBot.room.users.push(new basicBot.User(userlist[i].id, userlist[i].username)); - ind = basicBot.room.users.length - 1; - } - var wlIndex = API.getWaitListPosition(basicBot.room.users[ind].id) + 1; - basicBot.userUtilities.updatePosition(basicBot.room.users[ind], wlIndex); - } - basicBot.room.afkInterval = setInterval(function () { - basicBot.roomUtilities.afkCheck() - }, 10 * 1000); - basicBot.room.autodisableInterval = setInterval(function () { - basicBot.room.autodisableFunc(); - }, 60 * 60 * 1000); - basicBot.loggedInID = API.getUser().id; - basicBot.status = true; - API.sendChat('/cap ' + basicBot.settings.startupCap); - API.setVolume(basicBot.settings.startupVolume); - if (basicBot.settings.autowoot) { - $("#woot").click(); - } - if (basicBot.settings.startupEmoji) { - var emojibuttonoff = $(".icon-emoji-off"); - if (emojibuttonoff.length > 0) { - emojibuttonoff[0].click(); - } - API.chatLog(':smile: Emojis enabled.'); + basicBot.settings.motdInterval = argument; + API.sendChat(subChat(basicBot.chat.motdintervalset, {interval: basicBot.settings.motdInterval})); + } + } } - else { - var emojibuttonon = $(".icon-emoji-on"); - if (emojibuttonon.length > 0) { - emojibuttonon[0].click(); + }, + + moveCommand: { + command: 'move', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var firstSpace = msg.indexOf(' '); + var lastSpace = msg.lastIndexOf(' '); + var pos; + var name; + if (isNaN(parseInt(msg.substring(lastSpace + 1)))) { + pos = 1; + name = msg.substring(cmd.length + 2); } - API.chatLog('Emojis disabled.'); + else { + pos = parseInt(msg.substring(lastSpace + 1)); + name = msg.substring(cmd.length + 2, lastSpace); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + if (user.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbotwaitlist, {name: chat.un})); + if (!isNaN(pos)) { + API.sendChat(subChat(basicBot.chat.move, {name: chat.un})); + basicBot.userUtilities.moveUser(user.id, pos, false); + } else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); + } } - API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); - API.chatLog('Volume set to ' + basicBot.settings.startupVolume); - socket(); - loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); - }, - commands: { - executable: function (minRank, chat) { - var id = chat.uid; - var perm = basicBot.userUtilities.getPermission(id); - var minPerm; - switch (minRank) { - case 'admin': - minPerm = 10; - break; - case 'ambassador': - minPerm = 7; - break; - case 'host': - minPerm = 5; - break; - case 'cohost': - minPerm = 4; - break; - case 'manager': - minPerm = 3; - break; - case 'mod': - if (basicBot.settings.bouncerPlus) { - minPerm = 2; - } - else { - minPerm = 3; - } - break; - case 'bouncer': - minPerm = 2; - break; - case 'residentdj': - minPerm = 1; - break; - case 'user': - minPerm = 0; - break; - default: - API.chatLog('error assigning minimum permission'); - } - return perm >= minPerm; - - }, - /** - command: { - command: 'cmd', - rank: 'user/bouncer/mod/manager', - type: 'startsWith/exact', - functionality: function(chat, cmd){ - if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if( !basicBot.commands.executable(this.rank, chat) ) return void (0); - else{ - - } - } - }, - **/ - - activeCommand: { - command: 'active', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var now = Date.now(); - var chatters = 0; - var time; - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - var since = durationOnline / 1000; - - if (msg.length === cmd.length) time = since; - else { - time = msg.substring(cmd.length + 1); - if (isNaN(time)) return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - for (var i = 0; i < basicBot.room.users.length; i++) { - userTime = basicBot.userUtilities.getLastActivity(basicBot.room.users[i]); - if ((now - userTime) <= (time * 60 * 1000)) { - chatters++; - } - } - API.sendChat(subChat(basicBot.chat.activeusersintime, {name: chat.un, amount: chatters, time: time})); - } + }, + + muteCommand: { + command: 'mute', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var lastSpace = msg.lastIndexOf(' '); + var time = null; + var name; + if (lastSpace === msg.indexOf(' ')) { + name = msg.substring(cmd.length + 2); + time = 45; } - }, - - addCommand: { - command: 'add', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (msg.length > cmd.length + 2) { - if (typeof user !== 'undefined') { - if (basicBot.room.roomevent) { - basicBot.room.eventArtists.push(user.id); - } - API.moderateAddDJ(user.id); - } else API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - } - } + else { + time = msg.substring(lastSpace + 1); + if (isNaN(time) || time == "" || time == null || typeof time == "undefined") { + return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + name = msg.substring(cmd.length + 2, lastSpace); + } + var from = chat.un; + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permFrom > permUser) { + /* + basicBot.room.mutedUsers.push(user.id); + if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); + else { + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === id) { + indexMuted = i; + wasMuted = true; + } + } + if (indexMuted > -1) { + basicBot.room.mutedUsers.splice(indexMuted); + var u = basicBot.userUtilities.lookupUser(id); + var name = u.username; + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + }, time * 60 * 1000, user.id); + } + */ + if (time > 45) { + API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + } + else if (time === 45) { + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + + } + else if (time > 30) { + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + else if (time > 15) { + API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + else { + API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } } - }, + else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); + } + } + }, + + opCommand: { + command: 'op', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.opLink === "string") + return API.sendChat(subChat(basicBot.chat.oplist, {link: basicBot.settings.opLink})); + } + } + }, + + pingCommand: { + command: 'ping', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.pong) + } + } + }, + + refreshCommand: { + command: 'refresh', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + sendToSocket(); + storeToStorage(); + basicBot.disconnectAPI(); + setTimeout(function () { + window.location.reload(false); + }, 1000); - afklimitCommand: { - command: 'afklimit', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolimitspecified, {name: chat.un})); - var limit = msg.substring(cmd.length + 1); - if (!isNaN(limit)) { - basicBot.settings.maximumAfk = parseInt(limit, 10); - API.sendChat(subChat(basicBot.chat.maximumafktimeset, {name: chat.un, time: basicBot.settings.maximumAfk})); - } - else API.sendChat(subChat(basicBot.chat.invalidlimitspecified, {name: chat.un})); - } + } + } + }, + + reloadCommand: { + command: 'reload', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.reload); + sendToSocket(); + storeToStorage(); + basicBot.disconnectAPI(); + kill(); + setTimeout(function () { + $.getScript(basicBot.scriptLink); + }, 2000); + } + } + }, + + removeCommand: { + command: 'remove', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length > cmd.length + 2) { + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user !== 'boolean') { + user.lastDC = { + time: null, + position: null, + songCount: 0 + }; + if (API.getDJ().id === user.id) { + API.moderateForceSkip(); + setTimeout(function () { + API.moderateRemoveDJ(user.id); + }, 1 * 1000, user); + } + else API.moderateRemoveDJ(user.id); + } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); + } else API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + } + } + }, + + restrictetaCommand: { + command: 'restricteta', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.etaRestriction) { + basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.etarestriction})); } - }, - - afkremovalCommand: { - command: 'afkremoval', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.afkRemoval) { - basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; - clearInterval(basicBot.room.afkInterval); - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.afkremoval})); - } - else { - basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; - basicBot.room.afkInterval = setInterval(function () { - basicBot.roomUtilities.afkCheck() - }, 2 * 1000); - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.afkremoval})); - } - } + else { + basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.etarestriction})); } - }, - - afkresetCommand: { - command: 'afkreset', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - basicBot.userUtilities.setLastActivity(user); - API.sendChat(subChat(basicBot.chat.afkstatusreset, {name: chat.un, username: name})); + } + } + }, + + rouletteCommand: { + command: 'roulette', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (!basicBot.room.roulette.rouletteStatus) { + basicBot.room.roulette.startRoulette(); + } + } + } + }, + + rulesCommand: { + command: 'rules', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.rulesLink === "string") + return API.sendChat(subChat(basicBot.chat.roomrules, {link: basicBot.settings.rulesLink})); + } + } + }, + + sessionstatsCommand: { + command: 'sessionstats', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var from = chat.un; + var woots = basicBot.room.roomstats.totalWoots; + var mehs = basicBot.room.roomstats.totalMehs; + var grabs = basicBot.room.roomstats.totalCurates; + API.sendChat(subChat(basicBot.chat.sessionstats, {name: from, woots: woots, mehs: mehs, grabs: grabs})); + } + } + }, + + skipCommand: { + command: ['skip', 'smartskip'], + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.skippable) { + + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + var dj = API.getDJ(); + var name = dj.username; + var msgSend = '@' + name + ', '; + + if (chat.message.length === cmd.length) { + API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); } - } - }, - - afktimeCommand: { - command: 'afktime', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var lastActive = basicBot.userUtilities.getLastActivity(user); - var inactivity = Date.now() - lastActive; - var time = basicBot.roomUtilities.msToStr(inactivity); - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - - if (inactivity == durationOnline){ - API.sendChat(subChat(basicBot.chat.inactivelonger, {botname: basicBot.settings.botName, name: chat.un, username: name})); - } else { - API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); - } + API.moderateForceSkip(); } - } - }, - - autodisableCommand: { - command: 'autodisable', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.autodisable) { - basicBot.settings.autodisable = !basicBot.settings.autodisable; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autodisable})); - } - else { - basicBot.settings.autodisable = !basicBot.settings.autodisable; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autodisable})); - } - + } + var validReason = false; + var msg = chat.message; + var reason = msg.substring(cmd.length + 1); + for (var i = 0; i < basicBot.settings.skipReasons.length; i++) { + var r = basicBot.settings.skipReasons[i][0]; + if (reason.indexOf(r) !== -1) { + validReason = true; + msgSend += basicBot.settings.skipReasons[i][1]; } - } - }, - - autoskipCommand: { - command: 'autoskip', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.autoskip) { - basicBot.settings.autoskip = !basicBot.settings.autoskip; - clearTimeout(basicBot.room.autoskipTimer); - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); - } - else { - basicBot.settings.autoskip = !basicBot.settings.autoskip; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); - } + } + if (validReason) { + API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(msgSend); } - } - }, - - autowootCommand: { - command: 'autowoot', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - API.sendChat(basicBot.chat.autowoot); + API.moderateForceSkip(); + setTimeout(function () { + API.sendChat(msgSend); + }, 500); } + } } - }, - - baCommand: { - command: 'ba', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.brandambassador); - } + } + } + }, + + skipposCommand: { + command: 'skippos', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var pos = msg.substring(cmd.length + 1); + if (!isNaN(pos)) { + basicBot.settings.skipPosition = pos; + return API.sendChat(subChat(basicBot.chat.skippos, {name: chat.un, position: basicBot.settings.skipPosition})); } - }, - - ballCommand: { - command: ['8ball', 'ask'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var crowd = API.getUsers(); - var msg = chat.message; - var argument = msg.substring(cmd.length + 1).replace(/@/g, ''); - var randomUser = Math.floor(Math.random() * crowd.length); - var randomBall = Math.floor(Math.random() * basicBot.chat.balls.length); - var randomSentence = Math.floor(Math.random() * 1); - API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.chat.balls[randomBall]})); - } + else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); + } + } + }, + + songstatsCommand: { + command: 'songstats', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.songstats) { + basicBot.settings.songstats = !basicBot.settings.songstats; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.songstats})); } - }, - - banCommand: { - command: 'ban', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - API.moderateBanUser(user.id, 1, API.BAN.DAY); - } + else { + basicBot.settings.songstats = !basicBot.settings.songstats; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.songstats})); } - }, - - blacklistCommand: { - command: ['blacklist', 'bl'], - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolistspecified, {name: chat.un})); - var list = msg.substr(cmd.length + 1); - if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); - else { - var media = API.getMedia(); - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - var track = { - list: list, - author: media.author, - title: media.title, - mid: media.format + ':' + media.cid - }; - basicBot.room.newBlacklisted.push(track); - basicBot.room.blacklists[list].push(media.format + ':' + media.cid); - API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); - } - else { - API.moderateForceSkip(); - } - if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { - basicBot.room.newBlacklistedSongFunction(track); - } - } - } + } + } + }, + + sourceCommand: { + command: 'source', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat('/me This bot was created by ' + botCreator + ', but is now maintained by ' + botMaintainer + "."); + } + } + }, + + statusCommand: { + command: 'status', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var from = chat.un; + var msg = '[@' + from + '] '; + + msg += basicBot.chat.afkremoval + ': '; + if (basicBot.settings.afkRemoval) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + msg += basicBot.chat.afksremoved + ": " + basicBot.room.afkList.length + '. '; + msg += basicBot.chat.afklimit + ': ' + basicBot.settings.maximumAfk + '. '; + + msg += 'Bouncer+: '; + if (basicBot.settings.bouncerPlus) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.blacklist + ': '; + if (basicBot.settings.blacklistEnabled) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.lockguard + ': '; + if (basicBot.settings.lockGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.cycleguard + ': '; + if (basicBot.settings.cycleGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.timeguard + ': '; + if (basicBot.settings.timeGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.chatfilter + ': '; + if (basicBot.settings.filterChat) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.historyskip + ': '; + if (basicBot.settings.historySkip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.voteskip + ': '; + if (basicBot.settings.voteSkip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.cmddeletion + ': '; + if (basicBot.settings.cmdDeletion) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.autoskip + ': '; + if (basicBot.settings.autoskip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + // TODO: Display more toggleable bot settings. + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + var since = basicBot.roomUtilities.msToStr(durationOnline); + msg += subChat(basicBot.chat.activefor, {time: since}); + + /* + // least efficient way to go about this, but it works :) + if (msg.length > 256){ + firstpart = msg.substr(0, 256); + secondpart = msg.substr(256); + API.sendChat(firstpart); + setTimeout(function () { + API.sendChat(secondpart); + }, 300); } - }, - - blinfoCommand: { - command: 'blinfo', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var author = API.getMedia().author; - var title = API.getMedia().title; - var name = chat.un; - var format = API.getMedia().format; - var cid = API.getMedia().cid; - var songid = format + ":" + cid; - - API.sendChat(subChat(basicBot.chat.blinfo, {name: name, author: author, title: title, songid: songid})); - } + else { + API.sendChat(msg); } - }, + */ - bouncerPlusCommand: { - command: 'bouncer+', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (basicBot.settings.bouncerPlus) { - basicBot.settings.bouncerPlus = false; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': 'Bouncer+'})); - } - else { - if (!basicBot.settings.bouncerPlus) { - var id = chat.uid; - var perm = basicBot.userUtilities.getPermission(id); - if (perm > 2) { - basicBot.settings.bouncerPlus = true; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': 'Bouncer+'})); - } - } - else return API.sendChat(subChat(basicBot.chat.bouncerplusrank, {name: chat.un})); - } + // This is a more efficient solution + if (msg.length > 241){ + var split = msg.match(/.{1,241}/g); + for (var i = 0; i < split.length; i++) { + var func = function(index) { + setTimeout(function() { + API.sendChat("/me " + split[index]); + }, 500 * index); } + func(i); + } } - }, - - botnameCommand: { - command: 'botname', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentbotname, {botname: basicBot.settings.botName})); - var argument = msg.substring(cmd.length + 1); - if (argument) { - basicBot.settings.botName = argument; - API.sendChat(subChat(basicBot.chat.botnameset, {botName: basicBot.settings.botName})); - } - } + else { + return API.sendChat(msg); } - }, - - clearchatCommand: { - command: 'clearchat', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var currentchat = $('#chat-messages').children(); - for (var i = 0; i < currentchat.length; i++) { - API.moderateDeleteChat(currentchat[i].getAttribute("data-cid")); - } - return API.sendChat(subChat(basicBot.chat.chatcleared, {name: chat.un})); - } + } + } + }, + + swapCommand: { + command: 'swap', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var firstSpace = msg.indexOf(' '); + var lastSpace = msg.lastIndexOf(' '); + var name1 = msg.substring(cmd.length + 2, lastSpace); + var name2 = msg.substring(lastSpace + 2); + var user1 = basicBot.userUtilities.lookupUserName(name1); + var user2 = basicBot.userUtilities.lookupUserName(name2); + if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); + if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); + var p1 = API.getWaitListPosition(user1.id) + 1; + var p2 = API.getWaitListPosition(user2.id) + 1; + if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); + API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); + if (p1 < p2) { + basicBot.userUtilities.moveUser(user2.id, p1, false); + setTimeout(function (user1, p2) { + basicBot.userUtilities.moveUser(user1.id, p2, false); + }, 2000, user1, p2); } - }, - - commandsCommand: { - command: 'commands', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); - } + else { + basicBot.userUtilities.moveUser(user1.id, p2, false); + setTimeout(function (user2, p1) { + basicBot.userUtilities.moveUser(user2.id, p1, false); + }, 2000, user2, p1); } - }, - - cmddeletionCommand: { - command: ['commanddeletion', 'cmddeletion', 'cmddel'], - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.cmdDeletion) { - basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cmddeletion})); - } - else { - basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cmddeletion})); - } - } + } + } + }, + + themeCommand: { + command: 'theme', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.themeLink === "string") + API.sendChat(subChat(basicBot.chat.genres, {link: basicBot.settings.themeLink})); + } + } + }, + + timeguardCommand: { + command: 'timeguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.timeGuard) { + basicBot.settings.timeGuard = !basicBot.settings.timeGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.timeguard})); } - }, - - cookieCommand: { - command: 'cookie', - rank: 'user', - type: 'startsWith', - getCookie: function (chat) { - var c = Math.floor(Math.random() * basicBot.chat.cookies.length); - return basicBot.chat.cookies[c]; - }, - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - - var space = msg.indexOf(' '); - if (space === -1) { - API.sendChat(basicBot.chat.eatcookie); - return false; - } - else { - var name = msg.substring(space + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false || !user.inRoom) { - return API.sendChat(subChat(basicBot.chat.nousercookie, {name: name})); - } - else if (user.username === chat.un) { - return API.sendChat(subChat(basicBot.chat.selfcookie, {name: name})); - } - else { - return API.sendChat(subChat(basicBot.chat.cookie, {nameto: user.username, namefrom: chat.un, cookie: this.getCookie()})); - } - } - } - } - }, - - cycleCommand: { - command: 'cycle', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.changeDJCycle(); - } - } - }, - - cycleguardCommand: { - command: 'cycleguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.cycleGuard) { - basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cycleguard})); - } - else { - basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cycleguard})); - } - - } - } - }, - - cycletimerCommand: { - command: 'cycletimer', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var cycleTime = msg.substring(cmd.length + 1); - if (!isNaN(cycleTime) && cycleTime !== "") { - basicBot.settings.maximumCycletime = cycleTime; - return API.sendChat(subChat(basicBot.chat.cycleguardtime, {name: chat.un, time: basicBot.settings.maximumCycletime})); - } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - - } - } - }, - - dclookupCommand: { - command: ['dclookup', 'dc'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substring(cmd.length + 2); - var perm = basicBot.userUtilities.getPermission(chat.uid); - if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); - } - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var toChat = basicBot.userUtilities.dclookup(user.id); - API.sendChat(toChat); - } - } - }, - - /*deletechatCommand: { - command: 'deletechat', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var chats = $('.from'); - var message = $('.message'); - var emote = $('.emote'); - var from = $('.un.clickable'); - for (var i = 0; i < chats.length; i++) { - var n = from[i].textContent; - if (name.trim() === n.trim()) { - - // var messagecid = $(message)[i].getAttribute('data-cid'); - // var emotecid = $(emote)[i].getAttribute('data-cid'); - // API.moderateDeleteChat(messagecid); - - // try { - // API.moderateDeleteChat(messagecid); - // } - // finally { - // API.moderateDeleteChat(emotecid); - // } - - if (typeof $(message)[i].getAttribute('data-cid') == "undefined"){ - API.moderateDeleteChat($(emote)[i].getAttribute('data-cid')); // works well with normal messages but not with emotes due to emotes and messages are seperate. - } else { - API.moderateDeleteChat($(message)[i].getAttribute('data-cid')); - } - } - } - API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); - } - } - },*/ - - emojiCommand: { - command: 'emoji', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var link = 'http://www.emoji-cheat-sheet.com/'; - API.sendChat(subChat(basicBot.chat.emojilist, {link: link})); - } - } - }, - - englishCommand: { - command: 'english', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if(chat.message.length === cmd.length) return API.sendChat('/me No user specified.'); - var name = chat.message.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if(typeof user === 'boolean') return API.sendChat('/me Invalid user specified.'); - var lang = basicBot.userUtilities.getUser(user).language; - var ch = '/me @' + name + ' '; - switch(lang){ - case 'en': break; - case 'da': ch += 'Vær venlig at tale engelsk.'; break; - case 'de': ch += 'Bitte sprechen Sie Englisch.'; break; - case 'es': ch += 'Por favor, hable Inglés.'; break; - case 'fr': ch += 'Parlez anglais, s\'il vous plaît.'; break; - case 'nl': ch += 'Spreek Engels, alstublieft.'; break; - case 'pl': ch += 'Proszę mówić po angielsku.'; break; - case 'pt': ch += 'Por favor, fale Inglês.'; break; - case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; - case 'cs': ch += 'Mluvte prosím anglicky.'; break; - case 'sr': ch += 'Молим Вас, говорите енглески.'; break; - } - ch += ' English please.'; - API.sendChat(ch); - } - } - }, - - etaCommand: { - command: 'eta', - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var perm = basicBot.userUtilities.getPermission(chat.uid); - var msg = chat.message; - var dj = API.getDJ().username; - var name; - if (msg.length > cmd.length) { - if (perm < 2) return void (0); - name = msg.substring(cmd.length + 2); - } else name = chat.un; - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var pos = API.getWaitListPosition(user.id); - var realpos = pos + 1; - if (name == dj) return API.sendChat(subChat(basicBot.chat.youaredj, {name: name})); - if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); - if (pos == 0) return API.sendChat(subChat(basicBot.chat.youarenext, {name: name})); - var timeRemaining = API.getTimeRemaining(); - var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; - var estimateString = basicBot.roomUtilities.msToStr(estimateMS); - API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString, position: realpos})); - } - } - }, - - fbCommand: { - command: 'fb', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.fbLink === "string") - API.sendChat(subChat(basicBot.chat.facebook, {link: basicBot.settings.fbLink})); - } - } - }, - - filterCommand: { - command: 'filter', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.filterChat) { - basicBot.settings.filterChat = !basicBot.settings.filterChat; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.chatfilter})); - } - else { - basicBot.settings.filterChat = !basicBot.settings.filterChat; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.chatfilter})); - } - } - } - }, - - forceskipCommand: { - command: ['forceskip', 'fs'], - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.forceskip, {name: chat.un})); - API.moderateForceSkip(); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - - } - } - }, - - ghostbusterCommand: { - command: 'ghostbuster', - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substr(cmd.length + 2); - } - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false || !user.inRoom) { - return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); - } - else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); - } - } - }, - - gifCommand: { - command: ['gif', 'giphy'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length !== cmd.length) { - function get_id(api_key, fixedtag, func) - { - $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { - "format": "json", - "api_key": api_key, - "rating": rating, - "tag": fixedtag - }, - function(response) - { - func(response.data.id); - } - ) - } - var api_key = "dc6zaTOxFJmzC"; // public beta key - var rating = "pg-13"; // PG 13 gifs - var tag = msg.substr(cmd.length + 1); - var fixedtag = tag.replace(/ /g,"+"); - var commatag = tag.replace(/ /g,", "); - get_id(api_key, tag, function(id) { - if (typeof id !== 'undefined') { - API.sendChat(subChat(basicBot.chat.validgiftags, {name: chat.un, id: id, tags: commatag})); - } else { - API.sendChat(subChat(basicBot.chat.invalidgiftags, {name: chat.un, tags: commatag})); - } - }); - } - else { - function get_random_id(api_key, func) - { - $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { - "format": "json", - "api_key": api_key, - "rating": rating - }, - function(response) - { - func(response.data.id); - } - ) - } - var api_key = "dc6zaTOxFJmzC"; // public beta key - var rating = "pg-13"; // PG 13 gifs - get_random_id(api_key, function(id) { - if (typeof id !== 'undefined') { - API.sendChat(subChat(basicBot.chat.validgifrandom, {name: chat.un, id: id})); - } else { - API.sendChat(subChat(basicBot.chat.invalidgifrandom, {name: chat.un})); - } - }); - } - } - } - }, - - helpCommand: { - command: 'help', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var link = "(Updated link coming soon)"; - API.sendChat(subChat(basicBot.chat.starterhelp, {link: link})); - } - } - }, - - historyskipCommand: { - command: 'historyskip', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.historySkip) { - basicBot.settings.historySkip = !basicBot.settings.historySkip; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.historyskip})); - } - else { - basicBot.settings.historySkip = !basicBot.settings.historySkip; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.historyskip})); - } - } - } - }, - - joinCommand: { - command: 'join', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.roulette.rouletteStatus && basicBot.room.roulette.participants.indexOf(chat.uid) < 0) { - basicBot.room.roulette.participants.push(chat.uid); - API.sendChat(subChat(basicBot.chat.roulettejoin, {name: chat.un})); - } - } - } - }, - - jointimeCommand: { - command: 'jointime', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var join = basicBot.userUtilities.getJointime(user); - var time = Date.now() - join; - var timeString = basicBot.roomUtilities.msToStr(time); - API.sendChat(subChat(basicBot.chat.jointime, {namefrom: chat.un, username: name, time: timeString})); - } - } - }, - - kickCommand: { - command: 'kick', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var lastSpace = msg.lastIndexOf(' '); - var time; - var name; - if (lastSpace === msg.indexOf(' ')) { - time = 0.25; - name = msg.substring(cmd.length + 2); - } - else { - time = msg.substring(lastSpace + 1); - name = msg.substring(cmd.length + 2, lastSpace); - } - - var user = basicBot.userUtilities.lookupUserName(name); - var from = chat.un; - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - var permTokick = basicBot.userUtilities.getPermission(user.id); - - if (permFrom <= permTokick) - return API.sendChat(subChat(basicBot.chat.kickrank, {name: chat.un})); - - if (!isNaN(time)) { - API.sendChat(subChat(basicBot.chat.kick, {name: chat.un, username: name, time: time})); - if (time > 24 * 60 * 60) API.moderateBanUser(user.id, 1, API.BAN.PERMA); - else API.moderateBanUser(user.id, 1, API.BAN.DAY); - setTimeout(function (id, name) { - API.moderateUnbanUser(id); - console.log('Unbanned @' + name + '. (' + id + ')'); - }, time * 60 * 1000, user.id, name); - } - else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - killCommand: { - command: 'kill', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - storeToStorage(); - sendToSocket(); - API.sendChat(basicBot.chat.kill); - basicBot.disconnectAPI(); - setTimeout(function () { - kill(); - }, 1000); - } - } - }, - - languageCommand: { - command: 'language', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); - var argument = msg.substring(cmd.length + 1); - - $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { - var langIndex = json; - var link = langIndex[argument.toLowerCase()]; - if (typeof link === "undefined") { - API.sendChat(subChat(basicBot.chat.langerror, {link: "http://git.io/vJ9nI"})); - } - else { - basicBot.settings.language = argument; - loadChat(); - API.sendChat(subChat(basicBot.chat.langset, {language: basicBot.settings.language})); - } - }); - } - } - }, - - leaveCommand: { - command: 'leave', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var ind = basicBot.room.roulette.participants.indexOf(chat.uid); - if (ind > -1) { - basicBot.room.roulette.participants.splice(ind, 1); - API.sendChat(subChat(basicBot.chat.rouletteleave, {name: chat.un})); - } - } - } - }, - - linkCommand: { - command: 'link', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var media = API.getMedia(); - var from = chat.un; - var user = basicBot.userUtilities.lookupUser(chat.uid); - var perm = basicBot.userUtilities.getPermission(chat.uid); - var dj = API.getDJ().id; - var isDj = false; - if (dj === chat.uid) isDj = true; - if (perm >= 1 || isDj) { - if (media.format === 1) { - var linkToSong = "http://youtu.be/" + media.cid; - API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); - } - if (media.format === 2) { - SC.get('/tracks/' + media.cid, function (sound) { - API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: sound.permalink_url})); - }); - } - } - } - } - }, - - lockCommand: { - command: 'lock', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.booth.lockBooth(); - } - } - }, - - lockdownCommand: { - command: 'lockdown', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var temp = basicBot.settings.lockdownEnabled; - basicBot.settings.lockdownEnabled = !temp; - if (basicBot.settings.lockdownEnabled) { - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockdown})); - } - else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); - } - } - }, - - lockguardCommand: { - command: 'lockguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.lockGuard) { - basicBot.settings.lockGuard = !basicBot.settings.lockGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockguard})); - } - else { - basicBot.settings.lockGuard = !basicBot.settings.lockGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockguard})); - } - } - } - }, - - lockskipCommand: { - command: 'lockskip', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.skippable) { - var dj = API.getDJ(); - var id = dj.id; - var name = dj.username; - var msgSend = '@' + name + ': '; - basicBot.room.queueable = false; - - if (chat.message.length === cmd.length) { - API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); - basicBot.roomUtilities.booth.lockBooth(); - setTimeout(function (id) { - API.moderateForceSkip(); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); - basicBot.room.queueable = true; - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1500, id); - }, 1000, id); - return void (0); - } - var validReason = false; - var msg = chat.message; - var reason = msg.substring(cmd.length + 1); - for (var i = 0; i < basicBot.settings.lockskipReasons.length; i++) { - var r = basicBot.settings.lockskipReasons[i][0]; - if (reason.indexOf(r) !== -1) { - validReason = true; - msgSend += basicBot.settings.lockskipReasons[i][1]; - } - } - if (validReason) { - API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); - basicBot.roomUtilities.booth.lockBooth(); - setTimeout(function (id) { - API.moderateForceSkip(); - basicBot.room.skippable = false; - API.sendChat(msgSend); - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); - basicBot.room.queueable = true; - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1500, id); - }, 1000, id); - return void (0); - } - } - } - } - }, - - locktimerCommand: { - command: 'locktimer', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var lockTime = msg.substring(cmd.length + 1); - if (!isNaN(lockTime) && lockTime !== "") { - basicBot.settings.maximumLocktime = lockTime; - return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, time: basicBot.settings.maximumLocktime})); - } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - logoutCommand: { - command: 'logout', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); - setTimeout(function () { - $(".logout").mousedown() - }, 1000); - } - } - }, - - maxlengthCommand: { - command: 'maxlength', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var maxTime = msg.substring(cmd.length + 1); - if (!isNaN(maxTime)) { - basicBot.settings.maximumSongLength = maxTime; - return API.sendChat(subChat(basicBot.chat.maxlengthtime, {name: chat.un, time: basicBot.settings.maximumSongLength})); - } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - motdCommand: { - command: 'motd', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat('/me MotD: ' + basicBot.settings.motd); - var argument = msg.substring(cmd.length + 1); - if (!basicBot.settings.motdEnabled) basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - if (isNaN(argument)) { - basicBot.settings.motd = argument; - API.sendChat(subChat(basicBot.chat.motdset, {msg: basicBot.settings.motd})); - } - else { - basicBot.settings.motdInterval = argument; - API.sendChat(subChat(basicBot.chat.motdintervalset, {interval: basicBot.settings.motdInterval})); - } - } - } - }, - - moveCommand: { - command: 'move', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var firstSpace = msg.indexOf(' '); - var lastSpace = msg.lastIndexOf(' '); - var pos; - var name; - if (isNaN(parseInt(msg.substring(lastSpace + 1)))) { - pos = 1; - name = msg.substring(cmd.length + 2); - } - else { - pos = parseInt(msg.substring(lastSpace + 1)); - name = msg.substring(cmd.length + 2, lastSpace); - } - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - if (user.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbotwaitlist, {name: chat.un})); - if (!isNaN(pos)) { - API.sendChat(subChat(basicBot.chat.move, {name: chat.un})); - basicBot.userUtilities.moveUser(user.id, pos, false); - } else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); - } - } - }, - - muteCommand: { - command: 'mute', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var lastSpace = msg.lastIndexOf(' '); - var time = null; - var name; - if (lastSpace === msg.indexOf(' ')) { - name = msg.substring(cmd.length + 2); - time = 45; - } - else { - time = msg.substring(lastSpace + 1); - if (isNaN(time) || time == "" || time == null || typeof time == "undefined") { - return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - name = msg.substring(cmd.length + 2, lastSpace); - } - var from = chat.un; - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - var permUser = basicBot.userUtilities.getPermission(user.id); - if (permFrom > permUser) { - /* - basicBot.room.mutedUsers.push(user.id); - if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); - else { - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === id) { - indexMuted = i; - wasMuted = true; - } - } - if (indexMuted > -1) { - basicBot.room.mutedUsers.splice(indexMuted); - var u = basicBot.userUtilities.lookupUser(id); - var name = u.username; - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - }, time * 60 * 1000, user.id); - } - */ - if (time > 45) { - API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - } - else if (time === 45) { - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - - } - else if (time > 30) { - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } - else if (time > 15) { - API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } - else { - API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } - } - else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); - } - } - }, - - opCommand: { - command: 'op', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.opLink === "string") - return API.sendChat(subChat(basicBot.chat.oplist, {link: basicBot.settings.opLink})); - } - } - }, - - pingCommand: { - command: 'ping', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.pong) - } - } - }, - - refreshCommand: { - command: 'refresh', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - sendToSocket(); - storeToStorage(); - basicBot.disconnectAPI(); - setTimeout(function () { - window.location.reload(false); - }, 1000); - - } - } - }, - - reloadCommand: { - command: 'reload', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.reload); - sendToSocket(); - storeToStorage(); - basicBot.disconnectAPI(); - kill(); - setTimeout(function () { - $.getScript(basicBot.scriptLink); - }, 2000); - } - } - }, - - removeCommand: { - command: 'remove', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length > cmd.length + 2) { - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user !== 'boolean') { - user.lastDC = { - time: null, - position: null, - songCount: 0 - }; - if (API.getDJ().id === user.id) { - API.moderateForceSkip(); - setTimeout(function () { - API.moderateRemoveDJ(user.id); - }, 1 * 1000, user); - } - else API.moderateRemoveDJ(user.id); - } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); - } else API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - } - } - }, - - restrictetaCommand: { - command: 'restricteta', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.etaRestriction) { - basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.etarestriction})); - } - else { - basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.etarestriction})); - } - } - } - }, - - rouletteCommand: { - command: 'roulette', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (!basicBot.room.roulette.rouletteStatus) { - basicBot.room.roulette.startRoulette(); - } - } - } - }, - - rulesCommand: { - command: 'rules', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.rulesLink === "string") - return API.sendChat(subChat(basicBot.chat.roomrules, {link: basicBot.settings.rulesLink})); - } - } - }, - - sessionstatsCommand: { - command: 'sessionstats', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var from = chat.un; - var woots = basicBot.room.roomstats.totalWoots; - var mehs = basicBot.room.roomstats.totalMehs; - var grabs = basicBot.room.roomstats.totalCurates; - API.sendChat(subChat(basicBot.chat.sessionstats, {name: from, woots: woots, mehs: mehs, grabs: grabs})); - } - } - }, - - skipCommand: { - command: ['skip', 'smartskip'], - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.skippable) { - - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - var dj = API.getDJ(); - var name = dj.username; - var msgSend = '@' + name + ', '; - - if (chat.message.length === cmd.length) { - API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); - } - else { - API.moderateForceSkip(); - } - } - var validReason = false; - var msg = chat.message; - var reason = msg.substring(cmd.length + 1); - for (var i = 0; i < basicBot.settings.skipReasons.length; i++) { - var r = basicBot.settings.skipReasons[i][0]; - if (reason.indexOf(r) !== -1) { - validReason = true; - msgSend += basicBot.settings.skipReasons[i][1]; - } - } - if (validReason) { - API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(msgSend); - } - else { - API.moderateForceSkip(); - setTimeout(function () { - API.sendChat(msgSend); - }, 500); - } - } - } - } - } - }, - - skipposCommand: { - command: 'skippos', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var pos = msg.substring(cmd.length + 1); - if (!isNaN(pos)) { - basicBot.settings.skipPosition = pos; - return API.sendChat(subChat(basicBot.chat.skippos, {name: chat.un, position: basicBot.settings.skipPosition})); - } - else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); - } - } - }, - - songstatsCommand: { - command: 'songstats', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.songstats) { - basicBot.settings.songstats = !basicBot.settings.songstats; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.songstats})); - } - else { - basicBot.settings.songstats = !basicBot.settings.songstats; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.songstats})); - } - } - } - }, - - sourceCommand: { - command: 'source', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat('/me This bot was created by ' + botCreator + ', but is now maintained by ' + botMaintainer + "."); - } - } - }, - - statusCommand: { - command: 'status', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var from = chat.un; - var msg = '[@' + from + '] '; - - msg += basicBot.chat.afkremoval + ': '; - if (basicBot.settings.afkRemoval) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - msg += basicBot.chat.afksremoved + ": " + basicBot.room.afkList.length + '. '; - msg += basicBot.chat.afklimit + ': ' + basicBot.settings.maximumAfk + '. '; - - msg += 'Bouncer+: '; - if (basicBot.settings.bouncerPlus) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.blacklist + ': '; - if (basicBot.settings.blacklistEnabled) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.lockguard + ': '; - if (basicBot.settings.lockGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.cycleguard + ': '; - if (basicBot.settings.cycleGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.timeguard + ': '; - if (basicBot.settings.timeGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.chatfilter + ': '; - if (basicBot.settings.filterChat) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.historyskip + ': '; - if (basicBot.settings.historySkip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.voteskip + ': '; - if (basicBot.settings.voteSkip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.cmddeletion + ': '; - if (basicBot.settings.cmdDeletion) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.autoskip + ': '; - if (basicBot.settings.autoskip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - // TODO: Display more toggleable bot settings. - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - var since = basicBot.roomUtilities.msToStr(durationOnline); - msg += subChat(basicBot.chat.activefor, {time: since}); - - /* - // least efficient way to go about this, but it works :) - if (msg.length > 256){ - firstpart = msg.substr(0, 256); - secondpart = msg.substr(256); - API.sendChat(firstpart); - setTimeout(function () { - API.sendChat(secondpart); - }, 300); - } - else { - API.sendChat(msg); - } - */ - - // This is a more efficient solution - if (msg.length > 241){ - var split = msg.match(/.{1,241}/g); - for (var i = 0; i < split.length; i++) { - var func = function(index) { - setTimeout(function() { - API.sendChat("/me " + split[index]); - }, 500 * index); - } - func(i); - } - } - else { - return API.sendChat(msg); - } - } - } - }, - - swapCommand: { - command: 'swap', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var firstSpace = msg.indexOf(' '); - var lastSpace = msg.lastIndexOf(' '); - var name1 = msg.substring(cmd.length + 2, lastSpace); - var name2 = msg.substring(lastSpace + 2); - var user1 = basicBot.userUtilities.lookupUserName(name1); - var user2 = basicBot.userUtilities.lookupUserName(name2); - if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); - if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); - var p1 = API.getWaitListPosition(user1.id) + 1; - var p2 = API.getWaitListPosition(user2.id) + 1; - if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); - API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); - if (p1 < p2) { - basicBot.userUtilities.moveUser(user2.id, p1, false); - setTimeout(function (user1, p2) { - basicBot.userUtilities.moveUser(user1.id, p2, false); - }, 2000, user1, p2); - } - else { - basicBot.userUtilities.moveUser(user1.id, p2, false); - setTimeout(function (user2, p1) { - basicBot.userUtilities.moveUser(user2.id, p1, false); - }, 2000, user2, p1); - } - } - } - }, - - themeCommand: { - command: 'theme', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.themeLink === "string") - API.sendChat(subChat(basicBot.chat.genres, {link: basicBot.settings.themeLink})); - } - } - }, - - timeguardCommand: { - command: 'timeguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.timeGuard) { - basicBot.settings.timeGuard = !basicBot.settings.timeGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.timeguard})); - } - else { - basicBot.settings.timeGuard = !basicBot.settings.timeGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.timeguard})); - } - - } - } - }, - - toggleblCommand: { - command: 'togglebl', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var temp = basicBot.settings.blacklistEnabled; - basicBot.settings.blacklistEnabled = !temp; - if (basicBot.settings.blacklistEnabled) { - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.blacklist})); - } - else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.blacklist})); - } - } - }, - - togglemotdCommand: { - command: 'togglemotd', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.motdEnabled) { - basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.motd})); - } - else { - basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.motd})); - } - } - } - }, - - togglevoteskipCommand: { - command: 'togglevoteskip', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.voteSkip) { - basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); - } - else { - basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); - } - } + else { + basicBot.settings.timeGuard = !basicBot.settings.timeGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.timeguard})); } - }, - unbanCommand: { - command: 'unban', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - $(".icon-population").click(); - $(".icon-ban").click(); - setTimeout(function (chat) { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(); - var name = msg.substring(cmd.length + 2); - var bannedUsers = API.getBannedUsers(); - var found = false; - var bannedUser = null; - for (var i = 0; i < bannedUsers.length; i++) { - var user = bannedUsers[i]; - if (user.username === name) { - bannedUser = user; - found = true; - } - } - if (!found) { - $(".icon-chat").click(); - return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); - } - API.moderateUnbanUser(bannedUser.id); - console.log("Unbanned " + name); - setTimeout(function () { - $(".icon-chat").click(); - }, 1000); - }, 1000, chat); - } + } + } + }, + + toggleblCommand: { + command: 'togglebl', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var temp = basicBot.settings.blacklistEnabled; + basicBot.settings.blacklistEnabled = !temp; + if (basicBot.settings.blacklistEnabled) { + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.blacklist})); + } + else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.blacklist})); + } + } + }, + + togglemotdCommand: { + command: 'togglemotd', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.motdEnabled) { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.motd})); } - }, - - unlockCommand: { - command: 'unlock', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.booth.unlockBooth(); - } + else { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.motd})); } - }, - - unmuteCommand: { - command: 'unmute', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - /** - if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { - if (permFrom > 2) { - basicBot.room.mutedUsers = []; - return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); - } - else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); - } - **/ - var from = chat.un; - var name = msg.substr(cmd.length + 2); - - var user = basicBot.userUtilities.lookupUserName(name); - - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - - var permUser = basicBot.userUtilities.getPermission(user.id); - if (permFrom > permUser) { - /* - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === user.id) { - indexMuted = i; - wasMuted = true; - } - - } - if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); - basicBot.room.mutedUsers.splice(indexMuted); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - */ - try { - API.moderateUnmuteUser(user.id); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - catch (e) { - API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); - } - } - else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); - } + } + } + }, + + togglevoteskipCommand: { + command: 'togglevoteskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.voteSkip) { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); } - }, - - usercmdcdCommand: { - command: 'usercmdcd', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var cd = msg.substring(cmd.length + 1); - if (!isNaN(cd)) { - basicBot.settings.commandCooldown = cd; - return API.sendChat(subChat(basicBot.chat.commandscd, {name: chat.un, time: basicBot.settings.commandCooldown})); - } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } + else { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); } - }, - - usercommandsCommand: { - command: 'usercommands', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.usercommandsEnabled) { - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.usercommands})); - basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; - } - else { - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.usercommands})); - basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; - } - } + } + } + }, + + unbanCommand: { + command: 'unban', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + $(".icon-population").click(); + $(".icon-ban").click(); + setTimeout(function (chat) { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(); + var name = msg.substring(cmd.length + 2); + var bannedUsers = API.getBannedUsers(); + var found = false; + var bannedUser = null; + for (var i = 0; i < bannedUsers.length; i++) { + var user = bannedUsers[i]; + if (user.username === name) { + bannedUser = user; + found = true; + } + } + if (!found) { + $(".icon-chat").click(); + return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); + } + API.moderateUnbanUser(bannedUser.id); + console.log("Unbanned " + name); + setTimeout(function () { + $(".icon-chat").click(); + }, 1000); + }, 1000, chat); + } + } + }, + + unlockCommand: { + command: 'unlock', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.booth.unlockBooth(); + } + } + }, + + unmuteCommand: { + command: 'unmute', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + /** + if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { + if (permFrom > 2) { + basicBot.room.mutedUsers = []; + return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); + } + else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); + } + **/ + var from = chat.un; + var name = msg.substr(cmd.length + 2); + + var user = basicBot.userUtilities.lookupUserName(name); + + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permFrom > permUser) { + /* + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === user.id) { + indexMuted = i; + wasMuted = true; + } + + } + if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + basicBot.room.mutedUsers.splice(indexMuted); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + */ + try { + API.moderateUnmuteUser(user.id); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + catch (e) { + API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + } + } + else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); + } + } + }, + + usercmdcdCommand: { + command: 'usercmdcd', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var cd = msg.substring(cmd.length + 1); + if (!isNaN(cd)) { + basicBot.settings.commandCooldown = cd; + return API.sendChat(subChat(basicBot.chat.commandscd, {name: chat.un, time: basicBot.settings.commandCooldown})); } - }, - - voteratioCommand: { - command: 'voteratio', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false) return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var vratio = user.votes; - var ratio = vratio.woot / vratio.meh; - API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woot: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); - } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + usercommandsCommand: { + command: 'usercommands', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.usercommandsEnabled) { + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.usercommands})); + basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; } - }, - - voteskipCommand: { - command: 'voteskip', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); - var argument = msg.substring(cmd.length + 1); - if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - if (isNaN(argument)) { - API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); - } - else { - basicBot.settings.voteSkipLimit = argument; - API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); - } - } + else { + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.usercommands})); + basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; } - }, - - welcomeCommand: { - command: 'welcome', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.welcome) { - basicBot.settings.welcome = !basicBot.settings.welcome; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); - } - else { - basicBot.settings.welcome = !basicBot.settings.welcome; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.welcomemsg})); - } - } + } + } + }, + + voteratioCommand: { + command: 'voteratio', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false) return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var vratio = user.votes; + var ratio = vratio.woot / vratio.meh; + API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woot: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); + } + } + }, + + voteskipCommand: { + command: 'voteskip', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + if (isNaN(argument)) { + API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); } - }, - - websiteCommand: { - command: 'website', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.website === "string") - API.sendChat(subChat(basicBot.chat.website, {link: basicBot.settings.website})); - } + else { + basicBot.settings.voteSkipLimit = argument; + API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); } - }, - - whoisCommand: { - command: 'whois', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substr(cmd.length + 2); - } - users = API.getUsers(); - var len = users.length; - for (var i = 0; i < len; ++i){ - if (users[i].username == name){ - var id = users[i].id; - var avatar = API.getUser(id).avatarID; - var level = API.getUser(id).level; - var rawjoined = API.getUser(id).joined; - var joined = rawjoined.substr(0, 10); - var rawlang = API.getUser(id).language; - if (rawlang == "en"){ - var language = "English"; - } else if (rawlang == "bg"){ - var language = "Bulgarian"; - } else if (rawlang == "cs"){ - var language = "Czech"; - } else if (rawlang == "fi"){ - var language = "Finnish" - } else if (rawlang == "fr"){ - var language = "French" - } else if (rawlang == "pt"){ - var language = "Portuguese" - } else if (rawlang == "zh"){ - var language = "Chinese" - } else if (rawlang == "sk"){ - var language = "Slovak" - } else if (rawlang == "nl"){ - var language = "Dutch" - } else if (rawlang == "ms"){ - var language = "Malay" - } - var rawrank = API.getUser(id).role; - if (rawrank == "0"){ - var rank = "User"; - } else if (rawrank == "1"){ - var rank = "Resident DJ"; - } else if (rawrank == "2"){ - var rank = "Bouncer"; - } else if (rawrank == "3"){ - var rank = "Manager" - } else if (rawrank == "4"){ - var rank = "Co-Host" - } else if (rawrank == "5"){ - var rank = "Host" - } else if (rawrank == "7"){ - var rank = "Brand Ambassador" - } else if (rawrank == "10"){ - var rank = "Admin" - } - var slug = API.getUser(id).slug; - if (typeof slug !== 'undefined') { - var profile = "https://plug.dj/@/" + slug; - } else { - var profile = "~"; - } - - API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, joined: joined, rank: rank})); - } - } - } + } + } + }, + + welcomeCommand: { + command: 'welcome', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.welcome) { + basicBot.settings.welcome = !basicBot.settings.welcome; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); } - }, - - youtubeCommand: { - command: 'youtube', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.youtubeLink === "string") - API.sendChat(subChat(basicBot.chat.youtube, {name: chat.un, link: basicBot.settings.youtubeLink})); - } + else { + basicBot.settings.welcome = !basicBot.settings.welcome; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.welcomemsg})); } + } + } + }, + + websiteCommand: { + command: 'website', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.website === "string") + API.sendChat(subChat(basicBot.chat.website, {link: basicBot.settings.website})); + } } + }, + + whoisCommand: { + command: 'whois', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substr(cmd.length + 2); + } + users = API.getUsers(); + var len = users.length; + for (var i = 0; i < len; ++i){ + if (users[i].username == name){ + var id = users[i].id; + var avatar = API.getUser(id).avatarID; + var level = API.getUser(id).level; + var rawjoined = API.getUser(id).joined; + var joined = rawjoined.substr(0, 10); + var rawlang = API.getUser(id).language; + if (rawlang == "en"){ + var language = "English"; + } else if (rawlang == "bg"){ + var language = "Bulgarian"; + } else if (rawlang == "cs"){ + var language = "Czech"; + } else if (rawlang == "fi"){ + var language = "Finnish" + } else if (rawlang == "fr"){ + var language = "French" + } else if (rawlang == "pt"){ + var language = "Portuguese" + } else if (rawlang == "zh"){ + var language = "Chinese" + } else if (rawlang == "sk"){ + var language = "Slovak" + } else if (rawlang == "nl"){ + var language = "Dutch" + } else if (rawlang == "ms"){ + var language = "Malay" + } + var rawrank = API.getUser(id).role; + if (rawrank == "0"){ + var rank = "User"; + } else if (rawrank == "1"){ + var rank = "Resident DJ"; + } else if (rawrank == "2"){ + var rank = "Bouncer"; + } else if (rawrank == "3"){ + var rank = "Manager" + } else if (rawrank == "4"){ + var rank = "Co-Host" + } else if (rawrank == "5"){ + var rank = "Host" + } else if (rawrank == "7"){ + var rank = "Brand Ambassador" + } else if (rawrank == "10"){ + var rank = "Admin" + } + var slug = API.getUser(id).slug; + if (typeof slug !== 'undefined') { + var profile = "https://plug.dj/@/" + slug; + } else { + var profile = "~"; + } + + API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, joined: joined, rank: rank})); + } + } + } + } + }, + + youtubeCommand: { + command: 'youtube', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.youtubeLink === "string") + API.sendChat(subChat(basicBot.chat.youtube, {name: chat.un, link: basicBot.settings.youtubeLink})); + } + } + } } - }; + }; - loadChat(basicBot.startup); -}).call(this); + loadChat(basicBot.startup); + }).call(this); From 46aacfd32dc4e6064bb6e16ac8fa21eaf873f390 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 13 Jul 2015 23:44:53 +0100 Subject: [PATCH 197/281] Cleaned up indentation --- basicBot.js | 6976 +++++++++++++++++++++++++-------------------------- 1 file changed, 3488 insertions(+), 3488 deletions(-) diff --git a/basicBot.js b/basicBot.js index dfcc85c8..1bd7dbf0 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1,3645 +1,3645 @@ /** - *Copyright 2014 Yemasthui - *Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. - *This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. - */ +*Copyright 2014 Yemasthui +*Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. +*This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. +*/ (function () { - /*window.onerror = function() { - var room = JSON.parse(localStorage.getItem("basicBotRoom")); - window.location = 'https://plug.dj' + room.name; - };*/ + /*window.onerror = function() { + var room = JSON.parse(localStorage.getItem("basicBotRoom")); + window.location = 'https://plug.dj' + room.name; + };*/ - API.getWaitListPosition = function(id){ - if(typeof id === 'undefined' || id === null){ - id = API.getUser().id; - } - var wl = API.getWaitList(); - for(var i = 0; i < wl.length; i++){ - if(wl[i].id === id){ - return i; - } - } - return -1; + API.getWaitListPosition = function(id){ + if(typeof id === 'undefined' || id === null){ + id = API.getUser().id; + } + var wl = API.getWaitList(); + for(var i = 0; i < wl.length; i++){ + if(wl[i].id === id){ + return i; + } + } + return -1; + }; + + var kill = function () { + clearInterval(basicBot.room.autodisableInterval); + clearInterval(basicBot.room.afkInterval); + basicBot.status = false; + }; + + // This socket server is used solely for statistical and troubleshooting purposes. + // This server may not always be up, but will be used to get live data at any given time. + + var socket = function () { + function loadSocket() { + SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; + sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); + sock.onopen = function() { + console.log('Connected to socket!'); + sendToSocket(); + }; + sock.onclose = function() { + console.log('Disconnected from socket, reconnecting every minute ..'); + var reconnect = setTimeout(function(){ loadSocket() }, 60 * 1000); + }; + sock.onmessage = function(broadcast) { + var rawBroadcast = broadcast.data; + var broadcastMessage = rawBroadcast.replace(/["\\]+/g, ''); + API.chatLog(broadcastMessage); + console.log(broadcastMessage); + }; + } + if (typeof SockJS == 'undefined') { + $.getScript('https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js', loadSocket); + } else loadSocket(); + } + + var sendToSocket = function () { + var basicBotSettings = basicBot.settings; + var basicBotRoom = basicBot.room; + var basicBotInfo = { + time: Date.now(), + version: basicBot.version }; - - var kill = function () { - clearInterval(basicBot.room.autodisableInterval); - clearInterval(basicBot.room.afkInterval); - basicBot.status = false; + var data = {users:API.getUsers(),userinfo:API.getUser(),room:location.pathname,basicBotSettings:basicBotSettings,basicBotRoom:basicBotRoom,basicBotInfo:basicBotInfo}; + return sock.msg(data); + }; + + var storeToStorage = function () { + localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); + localStorage.setItem("basicBotRoom", JSON.stringify(basicBot.room)); + var basicBotStorageInfo = { + time: Date.now(), + stored: true, + version: basicBot.version }; + localStorage.setItem("basicBotStorageInfo", JSON.stringify(basicBotStorageInfo)); - // This socket server is used solely for statistical and troubleshooting purposes. - // This server may not always be up, but will be used to get live data at any given time. - - var socket = function () { - function loadSocket() { - SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; - sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); - sock.onopen = function() { - console.log('Connected to socket!'); - sendToSocket(); - }; - sock.onclose = function() { - console.log('Disconnected from socket, reconnecting every minute ..'); - var reconnect = setTimeout(function(){ loadSocket() }, 60 * 1000); - }; - sock.onmessage = function(broadcast) { - var rawBroadcast = broadcast.data; - var broadcastMessage = rawBroadcast.replace(/["\\]+/g, ''); - API.chatLog(broadcastMessage); - console.log(broadcastMessage); - }; - } - if (typeof SockJS == 'undefined') { - $.getScript('https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js', loadSocket); - } else loadSocket(); - } + }; - var sendToSocket = function () { - var basicBotSettings = basicBot.settings; - var basicBotRoom = basicBot.room; - var basicBotInfo = { - time: Date.now(), - version: basicBot.version - }; - var data = {users:API.getUsers(),userinfo:API.getUser(),room:location.pathname,basicBotSettings:basicBotSettings,basicBotRoom:basicBotRoom,basicBotInfo:basicBotInfo}; - return sock.msg(data); - }; + var subChat = function (chat, obj) { + if (typeof chat === "undefined") { + API.chatLog("There is a chat text missing."); + console.log("There is a chat text missing."); + return "[Error] No text message found."; - var storeToStorage = function () { - localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); - localStorage.setItem("basicBotRoom", JSON.stringify(basicBot.room)); - var basicBotStorageInfo = { - time: Date.now(), - stored: true, - version: basicBot.version - }; - localStorage.setItem("basicBotStorageInfo", JSON.stringify(basicBotStorageInfo)); + // TODO: Get missing chat messages from source. + } + var lit = '%%'; + for (var prop in obj) { + chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); + } + return chat; + }; + var loadChat = function (cb) { + if (!cb) cb = function () { }; + $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { + var link = basicBot.chatLink; + if (json !== null && typeof json !== "undefined") { + langIndex = json; + link = langIndex[basicBot.settings.language.toLowerCase()]; + if (basicBot.settings.chatLink !== basicBot.chatLink) { + link = basicBot.settings.chatLink; + } + else { + if (typeof link === "undefined") { + link = basicBot.chatLink; + } + } + $.get(link, function (json) { + if (json !== null && typeof json !== "undefined") { + if (typeof json === "string") json = JSON.parse(json); + basicBot.chat = json; + cb(); + } + }); + } + else { + $.get(basicBot.chatLink, function (json) { + if (json !== null && typeof json !== "undefined") { + if (typeof json === "string") json = JSON.parse(json); + basicBot.chat = json; + cb(); + } + }); + } + }); + }; + + var retrieveSettings = function () { + var settings = JSON.parse(localStorage.getItem("basicBotsettings")); + if (settings !== null) { + for (var prop in settings) { + basicBot.settings[prop] = settings[prop]; + } + } + }; + + var retrieveFromStorage = function () { + var info = localStorage.getItem("basicBotStorageInfo"); + if (info === null) API.chatLog(basicBot.chat.nodatafound); + else { + var settings = JSON.parse(localStorage.getItem("basicBotsettings")); + var room = JSON.parse(localStorage.getItem("basicBotRoom")); + var elapsed = Date.now() - JSON.parse(info).time; + if ((elapsed < 1 * 60 * 60 * 1000)) { + API.chatLog(basicBot.chat.retrievingdata); + for (var prop in settings) { + basicBot.settings[prop] = settings[prop]; + } + basicBot.room.users = room.users; + basicBot.room.afkList = room.afkList; + basicBot.room.historyList = room.historyList; + basicBot.room.mutedUsers = room.mutedUsers; + //basicBot.room.autoskip = room.autoskip; + basicBot.room.roomstats = room.roomstats; + basicBot.room.messages = room.messages; + basicBot.room.queue = room.queue; + basicBot.room.newBlacklisted = room.newBlacklisted; + API.chatLog(basicBot.chat.datarestored); + } + } + var json_sett = null; + var roominfo = document.getElementById("room-settings"); + info = roominfo.textContent; + var ref_bot = "@basicBot="; + var ind_ref = info.indexOf(ref_bot); + if (ind_ref > 0) { + var link = info.substring(ind_ref + ref_bot.length, info.length); + var ind_space = null; + if (link.indexOf(" ") < link.indexOf("\n")) ind_space = link.indexOf(" "); + else ind_space = link.indexOf("\n"); + link = link.substring(0, ind_space); + $.get(link, function (json) { + if (json !== null && typeof json !== "undefined") { + json_sett = JSON.parse(json); + for (var prop in json_sett) { + basicBot.settings[prop] = json_sett[prop]; + } + } + }); + } - var subChat = function (chat, obj) { - if (typeof chat === "undefined") { - API.chatLog("There is a chat text missing."); - console.log("There is a chat text missing."); - return "[Error] No text message found."; + }; - // TODO: Get missing chat messages from source. + String.prototype.splitBetween = function (a, b) { + var self = this; + self = this.split(a); + for (var i = 0; i < self.length; i++) { + self[i] = self[i].split(b); + } + var arr = []; + for (var i = 0; i < self.length; i++) { + if (Array.isArray(self[i])) { + for (var j = 0; j < self[i].length; j++) { + arr.push(self[i][j]); } - var lit = '%%'; - for (var prop in obj) { - chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); + } + else arr.push(self[i]); + } + return arr; + }; + + String.prototype.startsWith = function(str) { + return this.substring(0, str.length) === str; + }; + + var linkFixer = function (msg) { + var parts = msg.splitBetween(' -1) return 10; + } + if (u.gRole < 2) return u.role; + else { + switch (u.gRole) { + case 2: + return 7; + case 3: + return 8; + case 4: + return 9; + case 5: + return 10; + } + } + return 0; + }, + moveUser: function (id, pos, priority) { + var user = basicBot.userUtilities.lookupUser(id); + var wlist = API.getWaitList(); + if (API.getWaitListPosition(id) === -1) { + if (wlist.length < 50) { + API.moderateAddDJ(id); + if (pos !== 0) setTimeout(function (id, pos) { + API.moderateMoveDJ(id, pos); + }, 1250, id, pos); + } + else { + var alreadyQueued = -1; + for (var i = 0; i < basicBot.room.queue.id.length; i++) { + if (basicBot.room.queue.id[i] === id) alreadyQueued = i; + } + if (alreadyQueued !== -1) { + basicBot.room.queue.position[alreadyQueued] = pos; + return API.sendChat(subChat(basicBot.chat.alreadyadding, {position: basicBot.room.queue.position[alreadyQueued]})); + } + basicBot.roomUtilities.booth.lockBooth(); + if (priority) { + basicBot.room.queue.id.unshift(id); + basicBot.room.queue.position.unshift(pos); + } + else { + basicBot.room.queue.id.push(id); + basicBot.room.queue.position.push(pos); + } + var name = user.username; + return API.sendChat(subChat(basicBot.chat.adding, {name: name, position: basicBot.room.queue.position.length})); + } + } + else API.moderateMoveDJ(id, pos); + }, + dclookup: function (id) { + var user = basicBot.userUtilities.lookupUser(id); + if (typeof user === 'boolean') return basicBot.chat.usernotfound; + var name = user.username; + if (user.lastDC.time === null) return subChat(basicBot.chat.notdisconnected, {name: name}); + var dc = user.lastDC.time; + var pos = user.lastDC.position; + if (pos === null) return basicBot.chat.noposition; + var timeDc = Date.now() - dc; + var validDC = false; + if (basicBot.settings.maximumDc * 60 * 1000 > timeDc) { + validDC = true; + } + var time = basicBot.roomUtilities.msToStr(timeDc); + if (!validDC) return (subChat(basicBot.chat.toolongago, {name: basicBot.userUtilities.getUser(user).username, time: time})); + var songsPassed = basicBot.room.roomstats.songCount - user.lastDC.songCount; + var afksRemoved = 0; + var afkList = basicBot.room.afkList; + for (var i = 0; i < afkList.length; i++) { + var timeAfk = afkList[i][1]; + var posAfk = afkList[i][2]; + if (dc < timeAfk && posAfk < pos) { + afksRemoved++; + } + } + var newPosition = user.lastDC.position - songsPassed - afksRemoved; + if (newPosition <= 0) return subChat(basicBot.chat.notdisconnected, {name: name}); + var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); + basicBot.userUtilities.moveUser(user.id, newPosition, true); + return msg; + } + }, + + roomUtilities: { + rankToNumber: function (rankString) { + var rankInt = null; + switch (rankString) { + case "admin": + rankInt = 10; + break; + case "ambassador": + rankInt = 7; + break; + case "host": + rankInt = 5; + break; + case "cohost": + rankInt = 4; + break; + case "manager": + rankInt = 3; + break; + case "bouncer": + rankInt = 2; + break; + case "residentdj": + rankInt = 1; + break; + case "user": + rankInt = 0; + break; + } + return rankInt; + }, + msToStr: function (msTime) { + var ms, msg, timeAway; + msg = ''; + timeAway = { + 'days': 0, + 'hours': 0, + 'minutes': 0, + 'seconds': 0 }; - $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { - var link = basicBot.chatLink; - if (json !== null && typeof json !== "undefined") { - langIndex = json; - link = langIndex[basicBot.settings.language.toLowerCase()]; - if (basicBot.settings.chatLink !== basicBot.chatLink) { - link = basicBot.settings.chatLink; - } - else { - if (typeof link === "undefined") { - link = basicBot.chatLink; + 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.minutes < 1 && timeAway.hours < 1 && timeAway.days < 1) { + msg += timeAway.seconds.toString() + 's'; + } + if (msg !== '') { + return msg; + } else { + return false; + } + }, + booth: { + lockTimer: setTimeout(function () { + }, 1000), + locked: false, + lockBooth: function () { + API.moderateLockWaitList(!basicBot.roomUtilities.booth.locked); + basicBot.roomUtilities.booth.locked = false; + if (basicBot.settings.lockGuard) { + basicBot.roomUtilities.booth.lockTimer = setTimeout(function () { + API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); + }, basicBot.settings.maximumLocktime * 60 * 1000); + } + }, + unlockBooth: function () { + API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); + clearTimeout(basicBot.roomUtilities.booth.lockTimer); + } + }, + afkCheck: function () { + if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); + var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); + var djlist = API.getWaitList(); + var lastPos = Math.min(djlist.length, basicBot.settings.afkpositionCheck); + if (lastPos - 1 > djlist.length) return void (0); + for (var i = 0; i < lastPos; i++) { + if (typeof djlist[i] !== 'undefined') { + var id = djlist[i].id; + var user = basicBot.userUtilities.lookupUser(id); + if (typeof user !== 'boolean') { + var plugUser = basicBot.userUtilities.getUser(user); + if (rank !== null && basicBot.userUtilities.getPermission(plugUser) <= rank) { + var name = plugUser.username; + var lastActive = basicBot.userUtilities.getLastActivity(user); + var inactivity = Date.now() - lastActive; + var time = basicBot.roomUtilities.msToStr(inactivity); + var warncount = user.afkWarningCount; + if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { + if (warncount === 0) { + API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); + user.afkWarningCount = 3; + user.afkCountdown = setTimeout(function (userToChange) { + userToChange.afkWarningCount = 1; + }, 90 * 1000, user); + } + else if (warncount === 1) { + API.sendChat(subChat(basicBot.chat.warning2, {name: name})); + user.afkWarningCount = 3; + user.afkCountdown = setTimeout(function (userToChange) { + userToChange.afkWarningCount = 2; + }, 30 * 1000, user); + } + else if (warncount === 2) { + var pos = API.getWaitListPosition(id); + if (pos !== -1) { + pos++; + basicBot.room.afkList.push([id, Date.now(), pos]); + user.lastDC = { + + time: null, + position: null, + songCount: 0 + }; + API.moderateRemoveDJ(id); + API.sendChat(subChat(basicBot.chat.afkremove, {name: name, time: time, position: pos, maximumafk: basicBot.settings.maximumAfk})); } + user.afkWarningCount = 0; + } } - $.get(link, function (json) { - if (json !== null && typeof json !== "undefined") { - if (typeof json === "string") json = JSON.parse(json); - basicBot.chat = json; - cb(); - } - }); + } } - else { - $.get(basicBot.chatLink, function (json) { - if (json !== null && typeof json !== "undefined") { - if (typeof json === "string") json = JSON.parse(json); - basicBot.chat = json; - cb(); - } - }); + } + } + }, + smartSkip: function (reason) { + var dj = API.getDJ(); + var id = dj.id; + var waitlistlength = API.getWaitList().length; + var locked = false; + basicBot.room.queueable = false; + + if (waitlistlength == 50) { + basicBot.roomUtilities.booth.lockBooth(); + locked = true; + } + setTimeout(function (id) { + API.moderateForceSkip(); + setTimeout(function () { + if (typeof reason !== 'undefined') { + API.sendChat(reason); } - }); - }; - - var retrieveSettings = function () { - var settings = JSON.parse(localStorage.getItem("basicBotsettings")); - if (settings !== null) { - for (var prop in settings) { - basicBot.settings[prop] = settings[prop]; + }, 500); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.skipPosition, false); + basicBot.room.queueable = true; + if (locked) { + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); } + }, 1500, id); + }, 1000, id); + }, + changeDJCycle: function () { + var toggle = $(".cycle-toggle"); + if (toggle.hasClass("disabled")) { + toggle.click(); + if (basicBot.settings.cycleGuard) { + basicBot.room.cycleTimer = setTimeout(function () { + if (toggle.hasClass("enabled")) toggle.click(); + }, basicBot.settings.cycleMaxTime * 60 * 1000); + } } - }; - - var retrieveFromStorage = function () { - var info = localStorage.getItem("basicBotStorageInfo"); - if (info === null) API.chatLog(basicBot.chat.nodatafound); else { - var settings = JSON.parse(localStorage.getItem("basicBotsettings")); - var room = JSON.parse(localStorage.getItem("basicBotRoom")); - var elapsed = Date.now() - JSON.parse(info).time; - if ((elapsed < 1 * 60 * 60 * 1000)) { - API.chatLog(basicBot.chat.retrievingdata); - for (var prop in settings) { - basicBot.settings[prop] = settings[prop]; - } - basicBot.room.users = room.users; - basicBot.room.afkList = room.afkList; - basicBot.room.historyList = room.historyList; - basicBot.room.mutedUsers = room.mutedUsers; - //basicBot.room.autoskip = room.autoskip; - basicBot.room.roomstats = room.roomstats; - basicBot.room.messages = room.messages; - basicBot.room.queue = room.queue; - basicBot.room.newBlacklisted = room.newBlacklisted; - API.chatLog(basicBot.chat.datarestored); + toggle.click(); + clearTimeout(basicBot.room.cycleTimer); + } + + // TODO: Use API.moderateDJCycle(true/false) + }, + intervalMessage: function () { + var interval; + if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; + else interval = basicBot.settings.messageInterval; + if ((basicBot.room.roomstats.songCount % interval) === 0 && basicBot.status) { + var msg; + if (basicBot.settings.motdEnabled) { + msg = basicBot.settings.motd; + } + else { + if (basicBot.settings.intervalMessages.length === 0) return void (0); + var messageNumber = basicBot.room.roomstats.songCount % basicBot.settings.intervalMessages.length; + msg = basicBot.settings.intervalMessages[messageNumber]; + } + API.sendChat('/me ' + msg); + } + }, + updateBlacklists: function () { + for (var bl in basicBot.settings.blacklists) { + basicBot.room.blacklists[bl] = []; + if (typeof basicBot.settings.blacklists[bl] === 'function') { + basicBot.room.blacklists[bl] = basicBot.settings.blacklists(); + } + else if (typeof basicBot.settings.blacklists[bl] === 'string') { + if (basicBot.settings.blacklists[bl] === '') { + continue; + } + try { + (function (l) { + $.get(basicBot.settings.blacklists[l], function (data) { + if (typeof data === 'string') { + data = JSON.parse(data); + } + var list = []; + for (var prop in data) { + if (typeof data[prop].mid !== 'undefined') { + list.push(data[prop].mid); + } + } + basicBot.room.blacklists[l] = list; + }) + })(bl); + } + catch (e) { + API.chatLog('Error setting' + bl + 'blacklist.'); + console.log('Error setting' + bl + 'blacklist.'); + console.log(e); } + } } - var json_sett = null; - var roominfo = document.getElementById("room-settings"); - info = roominfo.textContent; - var ref_bot = "@basicBot="; - var ind_ref = info.indexOf(ref_bot); - if (ind_ref > 0) { - var link = info.substring(ind_ref + ref_bot.length, info.length); - var ind_space = null; - if (link.indexOf(" ") < link.indexOf("\n")) ind_space = link.indexOf(" "); - else ind_space = link.indexOf("\n"); - link = link.substring(0, ind_space); - $.get(link, function (json) { - if (json !== null && typeof json !== "undefined") { - json_sett = JSON.parse(json); - for (var prop in json_sett) { - basicBot.settings[prop] = json_sett[prop]; - } - } - }); + }, + logNewBlacklistedSongs: function () { + if (typeof console.table !== 'undefined') { + console.table(basicBot.room.newBlacklisted); + } + else { + console.log(basicBot.room.newBlacklisted); + } + }, + exportNewBlacklistedSongs: function () { + var list = {}; + for (var i = 0; i < basicBot.room.newBlacklisted.length; i++) { + var track = basicBot.room.newBlacklisted[i]; + list[track.list] = []; + list[track.list].push({ + title: track.title, + author: track.author, + mid: track.mid + }); + } + return list; + } + }, + eventChat: function (chat) { + chat.message = linkFixer(chat.message); + chat.message = decodeEntities(chat.message); + chat.message = chat.message.trim(); + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === chat.uid) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); + if (basicBot.room.users[i].username !== chat.un) { + basicBot.room.users[i].username = chat.un; + } + } + } + if (basicBot.chatUtilities.chatFilter(chat)) return void (0); + if (!basicBot.chatUtilities.commandCheck(chat)) + basicBot.chatUtilities.action(chat); + }, + eventUserjoin: function (user) { + var known = false; + var index = null; + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === user.id) { + known = true; + index = i; + } + } + var greet = true; + var welcomeback = null; + if (known) { + basicBot.room.users[index].inRoom = true; + var u = basicBot.userUtilities.lookupUser(user.id); + var jt = u.jointime; + var t = Date.now() - jt; + if (t < 10 * 1000) greet = false; + else welcomeback = true; + } + else { + basicBot.room.users.push(new basicBot.User(user.id, user.username)); + welcomeback = false; + } + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === user.id) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); + basicBot.room.users[j].jointime = Date.now(); } - }; - - String.prototype.splitBetween = function (a, b) { - var self = this; - self = this.split(a); - for (var i = 0; i < self.length; i++) { - self[i] = self[i].split(b); + } + if (basicBot.settings.welcome && greet) { + welcomeback ? + setTimeout(function (user) { + API.sendChat(subChat(basicBot.chat.welcomeback, {name: user.username})); + }, 1 * 1000, user) + : + setTimeout(function (user) { + API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); + }, 1 * 1000, user); + } + }, + eventUserleave: function (user) { + var lastDJ = API.getHistory()[0].user.id; + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === user.id) { + basicBot.userUtilities.updateDC(basicBot.room.users[i]); + basicBot.room.users[i].inRoom = false; + if (lastDJ == user.id){ + var user = basicBot.userUtilities.lookupUser(basicBot.room.users[i].id); + basicBot.userUtilities.updatePosition(user, 0); + user.lastDC.time = null; + user.lastDC.position = user.lastKnownPosition; + } } - var arr = []; - for (var i = 0; i < self.length; i++) { - if (Array.isArray(self[i])) { - for (var j = 0; j < self[i].length; j++) { - arr.push(self[i][j]); - } - } - else arr.push(self[i]); + } + }, + eventVoteupdate: function (obj) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === obj.user.id) { + if (obj.vote === 1) { + basicBot.room.users[i].votes.woot++; + } + else { + basicBot.room.users[i].votes.meh++; + } } - return arr; - }; + } + + var mehs = API.getScore().negative; + var woots = API.getScore().positive; + var dj = API.getDJ(); + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + + if (basicBot.settings.voteSkip) { + if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { + API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + } + } - String.prototype.startsWith = function(str) { - return this.substring(0, str.length) === str; - }; + }, + eventCurateupdate: function (obj) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === obj.user.id) { + basicBot.room.users[i].votes.curate++; + } + } + }, + eventDjadvance: function (obj) { + if (basicBot.settings.autowoot) { + $("#woot").click(); // autowoot + } + + var user = basicBot.userUtilities.lookupUser(obj.dj.id) + for(var i = 0; i < basicBot.room.users.length; i++){ + if(basicBot.room.users[i].id === user.id){ + basicBot.room.users[i].lastDC = { + time: null, + position: null, + songCount: 0 + }; + } + } - var linkFixer = function (msg) { - var parts = msg.splitBetween(' -1) { + API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + } + } + }, 2000); + var newMedia = obj.media; + var timeLimitSkip = setTimeout(function () { + if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }, 2000); + var format = obj.media.format; + var cid = obj.media.cid; + var naSkip = setTimeout(function () { + if (format == 1){ + $.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + cid + '&key=AIzaSyDcfWu9cGaDnTjPKhg_dy9mUh6H7i4ePZ0&part=snippet&callback=?', function (track){ + if (typeof(track.items[0]) === 'undefined'){ + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }); + } + else { + var checkSong = SC.get('/tracks/' + cid, function (track){ + if (typeof track.title === 'undefined'){ + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }); + } + }, 2000); + clearTimeout(historySkip); + if (basicBot.settings.historySkip) { + var alreadyPlayed = false; + var apihistory = API.getHistory(); + var name = obj.dj.username; + var historySkip = setTimeout(function () { + for (var i = 0; i < apihistory.length; i++) { + if (apihistory[i].media.cid === obj.media.cid) { + basicBot.room.historyList[i].push(+new Date()); + alreadyPlayed = true; + API.sendChat(subChat(basicBot.chat.songknown, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + } + if (!alreadyPlayed) { + basicBot.room.historyList.push([obj.media.cid, +new Date()]); + } + }, 2000); + } + if (user.ownSong) { + API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); + user.ownSong = false; + } + clearTimeout(basicBot.room.autoskipTimer); + if (basicBot.settings.autoskip) { + var remaining = obj.media.duration * 1000; + var startcid = API.getMedia().cid; + basicBot.room.autoskipTimer = setTimeout(function() { + var endcid = API.getMedia().cid; + if (startcid === endcid) { + //API.sendChat('Song stuck, skipping...'); + API.moderateForceSkip(); + } + }, remaining + 5000); + } + storeToStorage(); + sendToSocket(); + }, + eventWaitlistupdate: function (users) { + if (users.length < 50) { + if (basicBot.room.queue.id.length > 0 && basicBot.room.queueable) { + basicBot.room.queueable = false; + setTimeout(function () { + basicBot.room.queueable = true; + }, 500); + basicBot.room.queueing++; + var id, pos; + setTimeout( + function () { + id = basicBot.room.queue.id.splice(0, 1)[0]; + pos = basicBot.room.queue.position.splice(0, 1)[0]; + API.moderateAddDJ(id, pos); + setTimeout( + function (id, pos) { + API.moderateMoveDJ(id, pos); + basicBot.room.queueing--; + if (basicBot.room.queue.id.length === 0) setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1000, id, pos); + }, 1000 + basicBot.room.queueing * 2500); + } + } + for (var i = 0; i < users.length; i++) { + var user = basicBot.userUtilities.lookupUser(users[i].id); + basicBot.userUtilities.updatePosition(user, API.getWaitListPosition(users[i].id) + 1); + } + }, + chatcleaner: function (chat) { + if (!basicBot.settings.filterChat) return false; + if (basicBot.userUtilities.getPermission(chat.uid) > 1) return false; + var msg = chat.message; + var containsLetters = false; + for (var i = 0; i < msg.length; i++) { + ch = msg.charAt(i); + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch === ':' || ch === '^') containsLetters = true; + } + if (msg === '') { + return true; + } + if (!containsLetters && (msg.length === 1 || msg.length > 3)) return true; + msg = msg.replace(/[ ,;.:\/=~+%^*\-\\"'&@#]/g, ''); + var capitals = 0; + var ch; + for (var i = 0; i < msg.length; i++) { + ch = msg.charAt(i); + if (ch >= 'A' && ch <= 'Z') capitals++; + } + if (capitals >= 40) { + API.sendChat(subChat(basicBot.chat.caps, {name: chat.un})); + return true; + } + msg = msg.toLowerCase(); + if (msg === 'skip') { + API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); + return true; + } + for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { + if (msg === basicBot.chatUtilities.spam[j]) { + API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); + return true; + } + } + return false; + }, + chatUtilities: { + chatFilter: function (chat) { + var msg = chat.message; + var perm = basicBot.userUtilities.getPermission(chat.uid); + var user = basicBot.userUtilities.lookupUser(chat.uid); + var isMuted = false; + for (var i = 0; i < basicBot.room.mutedUsers.length; i++) { + if (basicBot.room.mutedUsers[i] === chat.uid) isMuted = true; + } + if (isMuted) { + API.moderateDeleteChat(chat.cid); + return true; + } + if (basicBot.settings.lockdownEnabled) { + if (perm === 0) { + API.moderateDeleteChat(chat.cid); + return true; + } + } + if (basicBot.chatcleaner(chat)) { + API.moderateDeleteChat(chat.cid); + return true; + } + if (basicBot.settings.cmdDeletion && msg.startsWith(basicBot.settings.commandLiteral)) { + API.moderateDeleteChat(chat.cid); + } + /** + var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; + if (plugRoomLinkPatt.exec(msg)) { + if (perm === 0) { + API.sendChat(subChat(basicBot.chat.roomadvertising, {name: chat.un})); + API.moderateDeleteChat(chat.cid); + return true; + } + } + **/ + if (msg.indexOf('http://adf.ly/') > -1) { + API.moderateDeleteChat(chat.cid); + API.sendChat(subChat(basicBot.chat.adfly, {name: chat.un})); + return true; + } + if (msg.indexOf('autojoin was not enabled') > 0 || msg.indexOf('AFK message was not enabled') > 0 || msg.indexOf('!afkdisable') > 0 || msg.indexOf('!joindisable') > 0 || msg.indexOf('autojoin disabled') > 0 || msg.indexOf('AFK message disabled') > 0) { + API.moderateDeleteChat(chat.cid); + return true; + } - var decodeEntities = function (s) { - var str, temp = document.createElement('p'); - temp.innerHTML = s; - str = temp.textContent || temp.innerText; - temp = null; - return str; - }; + var rlJoinChat = basicBot.chat.roulettejoin; + var rlLeaveChat = basicBot.chat.rouletteleave; + + var joinedroulette = rlJoinChat.split('%%NAME%%'); + if (joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; + else joinedroulette = joinedroulette[0]; - var botCreator = "Matthew (Yemasthui)"; - var botMaintainer = "Benzi (Quoona)" - var botCreatorIDs = ["3851534", "4105209"]; - - var basicBot = { - version: "2.8.9", - status: false, - name: "basicBot", - loggedInID: null, - scriptLink: "https://rawgit.com/Yemasthui/basicBot/master/basicBot.js", - cmdLink: "http://git.io/245Ppg", - chatLink: "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", - chat: null, - loadChat: loadChat, - retrieveSettings: retrieveSettings, - retrieveFromStorage: retrieveFromStorage, - settings: { - botName: "basicBot", - language: "english", - chatLink: "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", - roomLock: false, // Requires an extension to re-load the script - startupCap: 1, // 1-200 - startupVolume: 0, // 0-100 - startupEmoji: false, // true or false - autowoot: true, - autoskip: false, - smartSkip: true, - cmdDeletion: true, - maximumAfk: 120, - afkRemoval: true, - maximumDc: 60, - bouncerPlus: true, - blacklistEnabled: true, - lockdownEnabled: false, - lockGuard: false, - maximumLocktime: 10, - cycleGuard: true, - maximumCycletime: 10, - voteSkip: false, - voteSkipLimit: 10, - historySkip: false, - timeGuard: true, - maximumSongLength: 10, - autodisable: true, - commandCooldown: 30, - usercommandsEnabled: true, - skipPosition: 3, - skipReasons: [ - ["theme", "This song does not fit the room theme. "], - ["op", "This song is on the OP list. "], - ["history", "This song is in the history. "], - ["mix", "You played a mix, which is against the rules. "], - ["sound", "The song you played had bad sound quality or no sound. "], - ["nsfw", "The song you contained was NSFW (image or sound). "], - ["unavailable", "The song you played was not available for some users. "] - ], - afkpositionCheck: 15, - afkRankCheck: "ambassador", - motdEnabled: false, - motdInterval: 5, - motd: "Temporary Message of the Day", - filterChat: true, - etaRestriction: false, - welcome: true, - opLink: null, - rulesLink: null, - themeLink: null, - fbLink: null, - youtubeLink: null, - website: null, - intervalMessages: [], - messageInterval: 5, - songstats: true, - commandLiteral: "!", - blacklists: { - NSFW: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/NSFWlist.json", - OP: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/OPlist.json", - BANNED: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/BANNEDlist.json" + var leftroulette = rlLeaveChat.split('%%NAME%%'); + if (leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; + else leftroulette = leftroulette[0]; + + if ((msg.indexOf(joinedroulette) > -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { + setTimeout(function (id) { + API.moderateDeleteChat(id); + }, 5 * 1000, chat.cid); + return true; + } + return false; + }, + commandCheck: function (chat) { + var cmd; + if (chat.message.charAt(0) === basicBot.settings.commandLiteral) { + var space = chat.message.indexOf(' '); + if (space === -1) { + cmd = chat.message; + } + else cmd = chat.message.substring(0, space); + } + else return false; + var userPerm = basicBot.userUtilities.getPermission(chat.uid); + //console.log("name: " + chat.un + ", perm: " + userPerm); + if (chat.message !== basicBot.settings.commandLiteral + 'join' && chat.message !== basicBot.settings.commandLiteral + "leave") { + if (userPerm === 0 && !basicBot.room.usercommand) return void (0); + if (!basicBot.room.allcommand) return void (0); + } + if (chat.message === basicBot.settings.commandLiteral + 'eta' && basicBot.settings.etaRestriction) { + if (userPerm < 2) { + var u = basicBot.userUtilities.lookupUser(chat.uid); + if (u.lastEta !== null && (Date.now() - u.lastEta) < 1 * 60 * 60 * 1000) { + API.moderateDeleteChat(chat.cid); + return void (0); + } + else u.lastEta = Date.now(); + } + } + var executed = false; + + for (var comm in basicBot.commands) { + var cmdCall = basicBot.commands[comm].command; + if (!Array.isArray(cmdCall)) { + cmdCall = [cmdCall] + } + for (var i = 0; i < cmdCall.length; i++) { + if (basicBot.settings.commandLiteral + cmdCall[i] === cmd) { + basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[i]); + executed = true; + break; + } + } } - }, - room: { - name: null, - users: [], - afkList: [], - mutedUsers: [], - bannedUsers: [], - skippable: true, - usercommand: true, - allcommand: true, - afkInterval: null, - //autoskip: false, - autoskipTimer: null, - autodisableInterval: null, - autodisableFunc: function () { - if (basicBot.status && basicBot.settings.autodisable) { - API.sendChat('!afkdisable'); - API.sendChat('!joindisable'); - } - }, - queueing: 0, - queueable: true, - currentDJID: null, - historyList: [], - cycleTimer: setTimeout(function () { - }, 1), - roomstats: { - accountName: null, - totalWoots: 0, - totalCurates: 0, - totalMehs: 0, - launchTime: null, - songCount: 0, - chatmessages: 0 - }, - messages: { - from: [], - to: [], - message: [] - }, - queue: { - id: [], - position: [] - }, - blacklists: { - }, - newBlacklisted: [], - newBlacklistedSongFunction: null, - roulette: { - rouletteStatus: false, - participants: [], - countdown: null, - startRoulette: function () { - basicBot.room.roulette.rouletteStatus = true; - basicBot.room.roulette.countdown = setTimeout(function () { - basicBot.room.roulette.endRoulette(); - }, 60 * 1000); - API.sendChat(basicBot.chat.isopen); - }, - endRoulette: function () { - basicBot.room.roulette.rouletteStatus = false; - var ind = Math.floor(Math.random() * basicBot.room.roulette.participants.length); - var winner = basicBot.room.roulette.participants[ind]; - basicBot.room.roulette.participants = []; - var pos = Math.floor((Math.random() * API.getWaitList().length) + 1); - var user = basicBot.userUtilities.lookupUser(winner); - var name = user.username; - API.sendChat(subChat(basicBot.chat.winnerpicked, {name: name, position: pos})); - setTimeout(function (winner, pos) { - basicBot.userUtilities.moveUser(winner, pos, false); - }, 1 * 1000, winner, pos); + if (executed && userPerm === 0) { + basicBot.room.usercommand = false; + setTimeout(function () { + basicBot.room.usercommand = true; + }, basicBot.settings.commandCooldown * 1000); + } + if (executed) { + /*if (basicBot.settings.cmdDeletion) { + API.moderateDeleteChat(chat.cid); + }*/ + + //basicBot.room.allcommand = false; + //setTimeout(function () { + basicBot.room.allcommand = true; + //}, 5 * 1000); + } + return executed; + }, + action: function (chat) { + var user = basicBot.userUtilities.lookupUser(chat.uid); + if (chat.type === 'message') { + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === chat.uid) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); } + + } } + basicBot.room.roomstats.chatmessages++; + }, + spam: [ + 'hueh', 'hu3', 'brbr', 'heu', 'brbr', 'kkkk', 'spoder', 'mafia', 'zuera', 'zueira', + 'zueria', 'aehoo', 'aheu', 'alguem', 'algum', 'brazil', 'zoeira', 'fuckadmins', 'affff', 'vaisefoder', 'huenaarea', + 'hitler', 'ashua', 'ahsu', 'ashau', 'lulz', 'huehue', 'hue', 'huehuehue', 'merda', 'pqp', 'puta', 'mulher', 'pula', 'retarda', 'caralho', 'filha', 'ppk', + 'gringo', 'fuder', 'foder', 'hua', 'ahue', 'modafuka', 'modafoka', 'mudafuka', 'mudafoka', 'ooooooooooooooo', 'foda' + ], + curses: [ + 'nigger', 'faggot', 'nigga', 'niqqa', 'motherfucker', 'modafocka' + ] }, - User: function (id, name) { - this.id = id; - this.username = name; - this.jointime = Date.now(); - this.lastActivity = Date.now(); - this.votes = { - woot: 0, - meh: 0, - curate: 0 - }; - this.lastEta = null; - this.afkWarningCount = 0; - this.afkCountdown = null; - this.inRoom = true; - this.isMuted = false; - this.lastDC = { - time: null, - position: null, - songCount: 0 - }; - this.lastKnownPosition = null; + connectAPI: function () { + this.proxy = { + eventChat: $.proxy(this.eventChat, this), + eventUserskip: $.proxy(this.eventUserskip, this), + eventUserjoin: $.proxy(this.eventUserjoin, this), + eventUserleave: $.proxy(this.eventUserleave, this), + //eventFriendjoin: $.proxy(this.eventFriendjoin, this), + eventVoteupdate: $.proxy(this.eventVoteupdate, this), + eventCurateupdate: $.proxy(this.eventCurateupdate, this), + eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), + eventDjadvance: $.proxy(this.eventDjadvance, this), + //eventDjupdate: $.proxy(this.eventDjupdate, this), + eventWaitlistupdate: $.proxy(this.eventWaitlistupdate, this), + eventVoteskip: $.proxy(this.eventVoteskip, this), + eventModskip: $.proxy(this.eventModskip, this), + eventChatcommand: $.proxy(this.eventChatcommand, this), + eventHistoryupdate: $.proxy(this.eventHistoryupdate, this), + + }; + API.on(API.CHAT, this.proxy.eventChat); + API.on(API.USER_SKIP, this.proxy.eventUserskip); + API.on(API.USER_JOIN, this.proxy.eventUserjoin); + API.on(API.USER_LEAVE, this.proxy.eventUserleave); + API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); + API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); + API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); + API.on(API.ADVANCE, this.proxy.eventDjadvance); + API.on(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); + API.on(API.MOD_SKIP, this.proxy.eventModskip); + API.on(API.CHAT_COMMAND, this.proxy.eventChatcommand); + API.on(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); }, - userUtilities: { - getJointime: function (user) { - return user.jointime; - }, - getUser: function (user) { - return API.getUser(user.id); - }, - updatePosition: function (user, newPos) { - user.lastKnownPosition = newPos; - }, - updateDC: function (user) { - user.lastDC.time = Date.now(); - user.lastDC.position = user.lastKnownPosition; - user.lastDC.songCount = basicBot.room.roomstats.songCount; - }, - setLastActivity: function (user) { - user.lastActivity = Date.now(); - user.afkWarningCount = 0; - clearTimeout(user.afkCountdown); - }, - getLastActivity: function (user) { - return user.lastActivity; - }, - getWarningCount: function (user) { - return user.afkWarningCount; - }, - setWarningCount: function (user, value) { - user.afkWarningCount = value; - }, - lookupUser: function (id) { - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === id) { - return basicBot.room.users[i]; - } - } - return false; - }, - lookupUserName: function (name) { - for (var i = 0; i < basicBot.room.users.length; i++) { - var match = basicBot.room.users[i].username.trim() == name.trim(); - if (match) { - return basicBot.room.users[i]; - } - } - return false; - }, - voteRatio: function (id) { - var user = basicBot.userUtilities.lookupUser(id); - var votes = user.votes; - if (votes.meh === 0) votes.ratio = 1; - else votes.ratio = (votes.woot / votes.meh).toFixed(2); - return votes; + disconnectAPI: function () { + API.off(API.CHAT, this.proxy.eventChat); + API.off(API.USER_SKIP, this.proxy.eventUserskip); + API.off(API.USER_JOIN, this.proxy.eventUserjoin); + API.off(API.USER_LEAVE, this.proxy.eventUserleave); + API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); + API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); + API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); + API.off(API.ADVANCE, this.proxy.eventDjadvance); + API.off(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); + API.off(API.MOD_SKIP, this.proxy.eventModskip); + API.off(API.CHAT_COMMAND, this.proxy.eventChatcommand); + API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); + }, + startup: function () { + Function.prototype.toString = function () { + return 'Function.' + }; + var u = API.getUser(); + if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); + if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); + basicBot.connectAPI(); + API.moderateDeleteChat = function (cid) { + $.ajax({ + url: "https://plug.dj/_/chat/" + cid, + type: "DELETE" + }) + }; + + basicBot.room.name = window.location.pathname; + var Check; + + console.log(basicBot.room.name); + + var detect = function(){ + if(basicBot.room.name != window.location.pathname){ + console.log("Killing bot after room change."); + storeToStorage(); + basicBot.disconnectAPI(); + setTimeout(function () { + kill(); + }, 1000); + if (basicBot.settings.roomLock){ + window.location = 'https://plug.dj' + basicBot.room.name; + } + else { + clearInterval(Check); + } + } + }; + + Check = setInterval(function(){ detect() }, 2000); + + retrieveSettings(); + retrieveFromStorage(); + window.bot = basicBot; + basicBot.roomUtilities.updateBlacklists(); + setInterval(basicBot.roomUtilities.updateBlacklists, 60 * 60 * 1000); + basicBot.getNewBlacklistedSongs = basicBot.roomUtilities.exportNewBlacklistedSongs; + basicBot.logNewBlacklistedSongs = basicBot.roomUtilities.logNewBlacklistedSongs; + if (basicBot.room.roomstats.launchTime === null) { + basicBot.room.roomstats.launchTime = Date.now(); + } + + for (var j = 0; j < basicBot.room.users.length; j++) { + basicBot.room.users[j].inRoom = false; + } + var userlist = API.getUsers(); + for (var i = 0; i < userlist.length; i++) { + var known = false; + var ind = null; + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.room.users[j].id === userlist[i].id) { + known = true; + ind = j; + } + } + if (known) { + basicBot.room.users[ind].inRoom = true; + } + else { + basicBot.room.users.push(new basicBot.User(userlist[i].id, userlist[i].username)); + ind = basicBot.room.users.length - 1; + } + var wlIndex = API.getWaitListPosition(basicBot.room.users[ind].id) + 1; + basicBot.userUtilities.updatePosition(basicBot.room.users[ind], wlIndex); + } + basicBot.room.afkInterval = setInterval(function () { + basicBot.roomUtilities.afkCheck() + }, 10 * 1000); + basicBot.room.autodisableInterval = setInterval(function () { + basicBot.room.autodisableFunc(); + }, 60 * 60 * 1000); + basicBot.loggedInID = API.getUser().id; + basicBot.status = true; + API.sendChat('/cap ' + basicBot.settings.startupCap); + API.setVolume(basicBot.settings.startupVolume); + if (basicBot.settings.autowoot) { + $("#woot").click(); + } + if (basicBot.settings.startupEmoji) { + var emojibuttonoff = $(".icon-emoji-off"); + if (emojibuttonoff.length > 0) { + emojibuttonoff[0].click(); + } + API.chatLog(':smile: Emojis enabled.'); + } + else { + var emojibuttonon = $(".icon-emoji-on"); + if (emojibuttonon.length > 0) { + emojibuttonon[0].click(); + } + API.chatLog('Emojis disabled.'); + } + API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); + API.chatLog('Volume set to ' + basicBot.settings.startupVolume); + socket(); + loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); + }, + commands: { + executable: function (minRank, chat) { + var id = chat.uid; + var perm = basicBot.userUtilities.getPermission(id); + var minPerm; + switch (minRank) { + case 'admin': + minPerm = 10; + break; + case 'ambassador': + minPerm = 7; + break; + case 'host': + minPerm = 5; + break; + case 'cohost': + minPerm = 4; + break; + case 'manager': + minPerm = 3; + break; + case 'mod': + if (basicBot.settings.bouncerPlus) { + minPerm = 2; + } + else { + minPerm = 3; + } + break; + case 'bouncer': + minPerm = 2; + break; + case 'residentdj': + minPerm = 1; + break; + case 'user': + minPerm = 0; + break; + default: + API.chatLog('error assigning minimum permission'); + } + return perm >= minPerm; + + }, + /** + command: { + command: 'cmd', + rank: 'user/bouncer/mod/manager', + type: 'startsWith/exact', + functionality: function(chat, cmd){ + if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if( !basicBot.commands.executable(this.rank, chat) ) return void (0); + else{ + + } + } + }, + **/ + + activeCommand: { + command: 'active', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var now = Date.now(); + var chatters = 0; + var time; - }, - getPermission: function (obj) { //1 requests - var u; - if (typeof obj === "object") u = obj; - else u = API.getUser(obj); - for (var i = 0; i < botCreatorIDs.length; i++) { - if (botCreatorIDs[i].indexOf(u.id) > -1) return 10; - } - if (u.gRole < 2) return u.role; + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + var since = durationOnline / 1000; + + if (msg.length === cmd.length) time = since; else { - switch (u.gRole) { - case 2: - return 7; - case 3: - return 8; - case 4: - return 9; - case 5: - return 10; - } - } - return 0; - }, - moveUser: function (id, pos, priority) { - var user = basicBot.userUtilities.lookupUser(id); - var wlist = API.getWaitList(); - if (API.getWaitListPosition(id) === -1) { - if (wlist.length < 50) { - API.moderateAddDJ(id); - if (pos !== 0) setTimeout(function (id, pos) { - API.moderateMoveDJ(id, pos); - }, 1250, id, pos); - } - else { - var alreadyQueued = -1; - for (var i = 0; i < basicBot.room.queue.id.length; i++) { - if (basicBot.room.queue.id[i] === id) alreadyQueued = i; - } - if (alreadyQueued !== -1) { - basicBot.room.queue.position[alreadyQueued] = pos; - return API.sendChat(subChat(basicBot.chat.alreadyadding, {position: basicBot.room.queue.position[alreadyQueued]})); - } - basicBot.roomUtilities.booth.lockBooth(); - if (priority) { - basicBot.room.queue.id.unshift(id); - basicBot.room.queue.position.unshift(pos); - } - else { - basicBot.room.queue.id.push(id); - basicBot.room.queue.position.push(pos); - } - var name = user.username; - return API.sendChat(subChat(basicBot.chat.adding, {name: name, position: basicBot.room.queue.position.length})); - } + time = msg.substring(cmd.length + 1); + if (isNaN(time)) return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); } - else API.moderateMoveDJ(id, pos); - }, - dclookup: function (id) { - var user = basicBot.userUtilities.lookupUser(id); - if (typeof user === 'boolean') return basicBot.chat.usernotfound; - var name = user.username; - if (user.lastDC.time === null) return subChat(basicBot.chat.notdisconnected, {name: name}); - var dc = user.lastDC.time; - var pos = user.lastDC.position; - if (pos === null) return basicBot.chat.noposition; - var timeDc = Date.now() - dc; - var validDC = false; - if (basicBot.settings.maximumDc * 60 * 1000 > timeDc) { - validDC = true; - } - var time = basicBot.roomUtilities.msToStr(timeDc); - if (!validDC) return (subChat(basicBot.chat.toolongago, {name: basicBot.userUtilities.getUser(user).username, time: time})); - var songsPassed = basicBot.room.roomstats.songCount - user.lastDC.songCount; - var afksRemoved = 0; - var afkList = basicBot.room.afkList; - for (var i = 0; i < afkList.length; i++) { - var timeAfk = afkList[i][1]; - var posAfk = afkList[i][2]; - if (dc < timeAfk && posAfk < pos) { - afksRemoved++; - } + for (var i = 0; i < basicBot.room.users.length; i++) { + userTime = basicBot.userUtilities.getLastActivity(basicBot.room.users[i]); + if ((now - userTime) <= (time * 60 * 1000)) { + chatters++; + } } - var newPosition = user.lastDC.position - songsPassed - afksRemoved; - if (newPosition <= 0) return subChat(basicBot.chat.notdisconnected, {name: name}); - var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); - basicBot.userUtilities.moveUser(user.id, newPosition, true); - return msg; + API.sendChat(subChat(basicBot.chat.activeusersintime, {name: chat.un, amount: chatters, time: time})); + } } - }, - - roomUtilities: { - rankToNumber: function (rankString) { - var rankInt = null; - switch (rankString) { - case "admin": - rankInt = 10; - break; - case "ambassador": - rankInt = 7; - break; - case "host": - rankInt = 5; - break; - case "cohost": - rankInt = 4; - break; - case "manager": - rankInt = 3; - break; - case "bouncer": - rankInt = 2; - break; - case "residentdj": - rankInt = 1; - break; - case "user": - rankInt = 0; - break; - } - return rankInt; - }, - 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.minutes < 1 && timeAway.hours < 1 && timeAway.days < 1) { - msg += timeAway.seconds.toString() + 's'; - } - if (msg !== '') { - return msg; - } else { - return false; - } - }, - booth: { - lockTimer: setTimeout(function () { - }, 1000), - locked: false, - lockBooth: function () { - API.moderateLockWaitList(!basicBot.roomUtilities.booth.locked); - basicBot.roomUtilities.booth.locked = false; - if (basicBot.settings.lockGuard) { - basicBot.roomUtilities.booth.lockTimer = setTimeout(function () { - API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); - }, basicBot.settings.maximumLocktime * 60 * 1000); - } - }, - unlockBooth: function () { - API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); - clearTimeout(basicBot.roomUtilities.booth.lockTimer); + }, + + addCommand: { + command: 'add', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (msg.length > cmd.length + 2) { + if (typeof user !== 'undefined') { + if (basicBot.room.roomevent) { + basicBot.room.eventArtists.push(user.id); + } + API.moderateAddDJ(user.id); + } else API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + } + } + } + }, + + afklimitCommand: { + command: 'afklimit', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolimitspecified, {name: chat.un})); + var limit = msg.substring(cmd.length + 1); + if (!isNaN(limit)) { + basicBot.settings.maximumAfk = parseInt(limit, 10); + API.sendChat(subChat(basicBot.chat.maximumafktimeset, {name: chat.un, time: basicBot.settings.maximumAfk})); + } + else API.sendChat(subChat(basicBot.chat.invalidlimitspecified, {name: chat.un})); + } + } + }, + + afkremovalCommand: { + command: 'afkremoval', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.afkRemoval) { + basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; + clearInterval(basicBot.room.afkInterval); + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.afkremoval})); } - }, - afkCheck: function () { - if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); - var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); - var djlist = API.getWaitList(); - var lastPos = Math.min(djlist.length, basicBot.settings.afkpositionCheck); - if (lastPos - 1 > djlist.length) return void (0); - for (var i = 0; i < lastPos; i++) { - if (typeof djlist[i] !== 'undefined') { - var id = djlist[i].id; - var user = basicBot.userUtilities.lookupUser(id); - if (typeof user !== 'boolean') { - var plugUser = basicBot.userUtilities.getUser(user); - if (rank !== null && basicBot.userUtilities.getPermission(plugUser) <= rank) { - var name = plugUser.username; - var lastActive = basicBot.userUtilities.getLastActivity(user); - var inactivity = Date.now() - lastActive; - var time = basicBot.roomUtilities.msToStr(inactivity); - var warncount = user.afkWarningCount; - if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { - if (warncount === 0) { - API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); - user.afkWarningCount = 3; - user.afkCountdown = setTimeout(function (userToChange) { - userToChange.afkWarningCount = 1; - }, 90 * 1000, user); - } - else if (warncount === 1) { - API.sendChat(subChat(basicBot.chat.warning2, {name: name})); - user.afkWarningCount = 3; - user.afkCountdown = setTimeout(function (userToChange) { - userToChange.afkWarningCount = 2; - }, 30 * 1000, user); - } - else if (warncount === 2) { - var pos = API.getWaitListPosition(id); - if (pos !== -1) { - pos++; - basicBot.room.afkList.push([id, Date.now(), pos]); - user.lastDC = { - - time: null, - position: null, - songCount: 0 - }; - API.moderateRemoveDJ(id); - API.sendChat(subChat(basicBot.chat.afkremove, {name: name, time: time, position: pos, maximumafk: basicBot.settings.maximumAfk})); - } - user.afkWarningCount = 0; - } - } - } - } - } + else { + basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; + basicBot.room.afkInterval = setInterval(function () { + basicBot.roomUtilities.afkCheck() + }, 2 * 1000); + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.afkremoval})); } - }, - smartSkip: function (reason) { - var dj = API.getDJ(); - var id = dj.id; - var waitlistlength = API.getWaitList().length; - var locked = false; - basicBot.room.queueable = false; - - if (waitlistlength == 50) { - basicBot.roomUtilities.booth.lockBooth(); - locked = true; + } + } + }, + + afkresetCommand: { + command: 'afkreset', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + basicBot.userUtilities.setLastActivity(user); + API.sendChat(subChat(basicBot.chat.afkstatusreset, {name: chat.un, username: name})); + } + } + }, + + afktimeCommand: { + command: 'afktime', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var lastActive = basicBot.userUtilities.getLastActivity(user); + var inactivity = Date.now() - lastActive; + var time = basicBot.roomUtilities.msToStr(inactivity); + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + + if (inactivity == durationOnline){ + API.sendChat(subChat(basicBot.chat.inactivelonger, {botname: basicBot.settings.botName, name: chat.un, username: name})); + } else { + API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); } - setTimeout(function (id) { - API.moderateForceSkip(); - setTimeout(function () { - if (typeof reason !== 'undefined') { - API.sendChat(reason); - } - }, 500); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.skipPosition, false); - basicBot.room.queueable = true; - if (locked) { - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - } - }, 1500, id); - }, 1000, id); - }, - changeDJCycle: function () { - var toggle = $(".cycle-toggle"); - if (toggle.hasClass("disabled")) { - toggle.click(); - if (basicBot.settings.cycleGuard) { - basicBot.room.cycleTimer = setTimeout(function () { - if (toggle.hasClass("enabled")) toggle.click(); - }, basicBot.settings.cycleMaxTime * 60 * 1000); - } + } + } + }, + + autodisableCommand: { + command: 'autodisable', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.autodisable) { + basicBot.settings.autodisable = !basicBot.settings.autodisable; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autodisable})); } else { - toggle.click(); - clearTimeout(basicBot.room.cycleTimer); + basicBot.settings.autodisable = !basicBot.settings.autodisable; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autodisable})); } - // TODO: Use API.moderateDJCycle(true/false) - }, - intervalMessage: function () { - var interval; - if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; - else interval = basicBot.settings.messageInterval; - if ((basicBot.room.roomstats.songCount % interval) === 0 && basicBot.status) { - var msg; - if (basicBot.settings.motdEnabled) { - msg = basicBot.settings.motd; - } - else { - if (basicBot.settings.intervalMessages.length === 0) return void (0); - var messageNumber = basicBot.room.roomstats.songCount % basicBot.settings.intervalMessages.length; - msg = basicBot.settings.intervalMessages[messageNumber]; - } - API.sendChat('/me ' + msg); - } - }, - updateBlacklists: function () { - for (var bl in basicBot.settings.blacklists) { - basicBot.room.blacklists[bl] = []; - if (typeof basicBot.settings.blacklists[bl] === 'function') { - basicBot.room.blacklists[bl] = basicBot.settings.blacklists(); - } - else if (typeof basicBot.settings.blacklists[bl] === 'string') { - if (basicBot.settings.blacklists[bl] === '') { - continue; - } - try { - (function (l) { - $.get(basicBot.settings.blacklists[l], function (data) { - if (typeof data === 'string') { - data = JSON.parse(data); - } - var list = []; - for (var prop in data) { - if (typeof data[prop].mid !== 'undefined') { - list.push(data[prop].mid); - } - } - basicBot.room.blacklists[l] = list; - }) - })(bl); - } - catch (e) { - API.chatLog('Error setting' + bl + 'blacklist.'); - console.log('Error setting' + bl + 'blacklist.'); - console.log(e); - } - } - } - }, - logNewBlacklistedSongs: function () { - if (typeof console.table !== 'undefined') { - console.table(basicBot.room.newBlacklisted); + } + } + }, + + autoskipCommand: { + command: 'autoskip', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.autoskip) { + basicBot.settings.autoskip = !basicBot.settings.autoskip; + clearTimeout(basicBot.room.autoskipTimer); + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); } else { - console.log(basicBot.room.newBlacklisted); + basicBot.settings.autoskip = !basicBot.settings.autoskip; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); } - }, - exportNewBlacklistedSongs: function () { - var list = {}; - for (var i = 0; i < basicBot.room.newBlacklisted.length; i++) { - var track = basicBot.room.newBlacklisted[i]; - list[track.list] = []; - list[track.list].push({ - title: track.title, - author: track.author, - mid: track.mid - }); - } - return list; + } } - }, - eventChat: function (chat) { - chat.message = linkFixer(chat.message); - chat.message = decodeEntities(chat.message); - chat.message = chat.message.trim(); - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === chat.uid) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); - if (basicBot.room.users[i].username !== chat.un) { - basicBot.room.users[i].username = chat.un; - } - } + }, + + autowootCommand: { + command: 'autowoot', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.autowoot); + } } - if (basicBot.chatUtilities.chatFilter(chat)) return void (0); - if (!basicBot.chatUtilities.commandCheck(chat)) - basicBot.chatUtilities.action(chat); - }, - eventUserjoin: function (user) { - var known = false; - var index = null; - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === user.id) { - known = true; - index = i; - } + }, + + baCommand: { + command: 'ba', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.brandambassador); + } } - var greet = true; - var welcomeback = null; - if (known) { - basicBot.room.users[index].inRoom = true; - var u = basicBot.userUtilities.lookupUser(user.id); - var jt = u.jointime; - var t = Date.now() - jt; - if (t < 10 * 1000) greet = false; - else welcomeback = true; + }, + + ballCommand: { + command: ['8ball', 'ask'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var crowd = API.getUsers(); + var msg = chat.message; + var argument = msg.substring(cmd.length + 1).replace(/@/g, ''); + var randomUser = Math.floor(Math.random() * crowd.length); + var randomBall = Math.floor(Math.random() * basicBot.chat.balls.length); + var randomSentence = Math.floor(Math.random() * 1); + API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.chat.balls[randomBall]})); + } } - else { - basicBot.room.users.push(new basicBot.User(user.id, user.username)); - welcomeback = false; + }, + + banCommand: { + command: 'ban', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + API.moderateBanUser(user.id, 1, API.BAN.DAY); + } } - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === user.id) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); - basicBot.room.users[j].jointime = Date.now(); + }, + + blacklistCommand: { + command: ['blacklist', 'bl'], + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolistspecified, {name: chat.un})); + var list = msg.substr(cmd.length + 1); + if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); + else { + var media = API.getMedia(); + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + var track = { + list: list, + author: media.author, + title: media.title, + mid: media.format + ':' + media.cid + }; + basicBot.room.newBlacklisted.push(track); + basicBot.room.blacklists[list].push(media.format + ':' + media.cid); + API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { + basicBot.room.newBlacklistedSongFunction(track); + } } - + } } - if (basicBot.settings.welcome && greet) { - welcomeback ? - setTimeout(function (user) { - API.sendChat(subChat(basicBot.chat.welcomeback, {name: user.username})); - }, 1 * 1000, user) - : - setTimeout(function (user) { - API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); - }, 1 * 1000, user); + }, + + blinfoCommand: { + command: 'blinfo', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var author = API.getMedia().author; + var title = API.getMedia().title; + var name = chat.un; + var format = API.getMedia().format; + var cid = API.getMedia().cid; + var songid = format + ":" + cid; + + API.sendChat(subChat(basicBot.chat.blinfo, {name: name, author: author, title: title, songid: songid})); + } } - }, - eventUserleave: function (user) { - var lastDJ = API.getHistory()[0].user.id; - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === user.id) { - basicBot.userUtilities.updateDC(basicBot.room.users[i]); - basicBot.room.users[i].inRoom = false; - if (lastDJ == user.id){ - var user = basicBot.userUtilities.lookupUser(basicBot.room.users[i].id); - basicBot.userUtilities.updatePosition(user, 0); - user.lastDC.time = null; - user.lastDC.position = user.lastKnownPosition; + }, + + bouncerPlusCommand: { + command: 'bouncer+', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (basicBot.settings.bouncerPlus) { + basicBot.settings.bouncerPlus = false; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': 'Bouncer+'})); + } + else { + if (!basicBot.settings.bouncerPlus) { + var id = chat.uid; + var perm = basicBot.userUtilities.getPermission(id); + if (perm > 2) { + basicBot.settings.bouncerPlus = true; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': 'Bouncer+'})); } + } + else return API.sendChat(subChat(basicBot.chat.bouncerplusrank, {name: chat.un})); } + } } - }, - eventVoteupdate: function (obj) { - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === obj.user.id) { - if (obj.vote === 1) { - basicBot.room.users[i].votes.woot++; - } - else { - basicBot.room.users[i].votes.meh++; - } - } - } - - var mehs = API.getScore().negative; - var woots = API.getScore().positive; - var dj = API.getDJ(); - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - - if (basicBot.settings.voteSkip) { - if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { - API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); - } - else { - API.moderateForceSkip(); - } + }, + + botnameCommand: { + command: 'botname', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentbotname, {botname: basicBot.settings.botName})); + var argument = msg.substring(cmd.length + 1); + if (argument) { + basicBot.settings.botName = argument; + API.sendChat(subChat(basicBot.chat.botnameset, {botName: basicBot.settings.botName})); } + } } - - }, - eventCurateupdate: function (obj) { - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === obj.user.id) { - basicBot.room.users[i].votes.curate++; - } + }, + + clearchatCommand: { + command: 'clearchat', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var currentchat = $('#chat-messages').children(); + for (var i = 0; i < currentchat.length; i++) { + API.moderateDeleteChat(currentchat[i].getAttribute("data-cid")); + } + return API.sendChat(subChat(basicBot.chat.chatcleared, {name: chat.un})); + } } - }, - eventDjadvance: function (obj) { - if (basicBot.settings.autowoot) { - $("#woot").click(); // autowoot + }, + + commandsCommand: { + command: 'commands', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); + } } - - var user = basicBot.userUtilities.lookupUser(obj.dj.id) - for(var i = 0; i < basicBot.room.users.length; i++){ - if(basicBot.room.users[i].id === user.id){ - basicBot.room.users[i].lastDC = { - time: null, - position: null, - songCount: 0 - }; + }, + + cmddeletionCommand: { + command: ['commanddeletion', 'cmddeletion', 'cmddel'], + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.cmdDeletion) { + basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cmddeletion})); } + else { + basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + } + } } + }, + + cookieCommand: { + command: 'cookie', + rank: 'user', + type: 'startsWith', + getCookie: function (chat) { + var c = Math.floor(Math.random() * basicBot.chat.cookies.length); + return basicBot.chat.cookies[c]; + }, + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; - var lastplay = obj.lastPlay; - if (typeof lastplay === 'undefined') return; - if (basicBot.settings.songstats) { - if (typeof basicBot.chat.songstatistics === "undefined") { - API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") + var space = msg.indexOf(' '); + if (space === -1) { + API.sendChat(basicBot.chat.eatcookie); + return false; } else { - API.sendChat(subChat(basicBot.chat.songstatistics, {artist: lastplay.media.author, title: lastplay.media.title, woots: lastplay.score.positive, grabs: lastplay.score.grabs, mehs: lastplay.score.negative})) - } - } - basicBot.room.roomstats.totalWoots += lastplay.score.positive; - basicBot.room.roomstats.totalMehs += lastplay.score.negative; - basicBot.room.roomstats.totalCurates += lastplay.score.grabs; - basicBot.room.roomstats.songCount++; - basicBot.roomUtilities.intervalMessage(); - basicBot.room.currentDJID = obj.dj.id; - - var blacklistSkip = setTimeout(function () { - var mid = obj.media.format + ':' + obj.media.cid; - for (var bl in basicBot.room.blacklists) { - if (basicBot.settings.blacklistEnabled) { - if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { - API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - } - } - }, 2000); - var newMedia = obj.media; - var timeLimitSkip = setTimeout(function () { - if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - }, 2000); - var format = obj.media.format; - var cid = obj.media.cid; - var naSkip = setTimeout(function () { - if (format == 1){ - $.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + cid + '&key=AIzaSyDcfWu9cGaDnTjPKhg_dy9mUh6H7i4ePZ0&part=snippet&callback=?', function (track){ - if (typeof(track.items[0]) === 'undefined'){ - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - }); + var name = msg.substring(space + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false || !user.inRoom) { + return API.sendChat(subChat(basicBot.chat.nousercookie, {name: name})); + } + else if (user.username === chat.un) { + return API.sendChat(subChat(basicBot.chat.selfcookie, {name: name})); + } + else { + return API.sendChat(subChat(basicBot.chat.cookie, {nameto: user.username, namefrom: chat.un, cookie: this.getCookie()})); + } + } + } + } + }, + + cycleCommand: { + command: 'cycle', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.changeDJCycle(); + } + } + }, + + cycleguardCommand: { + command: 'cycleguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.cycleGuard) { + basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cycleguard})); } else { - var checkSong = SC.get('/tracks/' + cid, function (track){ - if (typeof track.title === 'undefined'){ - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - }); + basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cycleguard})); } - }, 2000); - clearTimeout(historySkip); - if (basicBot.settings.historySkip) { - var alreadyPlayed = false; - var apihistory = API.getHistory(); - var name = obj.dj.username; - var historySkip = setTimeout(function () { - for (var i = 0; i < apihistory.length; i++) { - if (apihistory[i].media.cid === obj.media.cid) { - basicBot.room.historyList[i].push(+new Date()); - alreadyPlayed = true; - API.sendChat(subChat(basicBot.chat.songknown, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - } - if (!alreadyPlayed) { - basicBot.room.historyList.push([obj.media.cid, +new Date()]); - } - }, 2000); - } - if (user.ownSong) { - API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); - user.ownSong = false; - } - clearTimeout(basicBot.room.autoskipTimer); - if (basicBot.settings.autoskip) { - var remaining = obj.media.duration * 1000; - var startcid = API.getMedia().cid; - basicBot.room.autoskipTimer = setTimeout(function() { - var endcid = API.getMedia().cid; - if (startcid === endcid) { - //API.sendChat('Song stuck, skipping...'); - API.moderateForceSkip(); - } - }, remaining + 5000); + + } } - storeToStorage(); - sendToSocket(); - }, - eventWaitlistupdate: function (users) { - if (users.length < 50) { - if (basicBot.room.queue.id.length > 0 && basicBot.room.queueable) { - basicBot.room.queueable = false; - setTimeout(function () { - basicBot.room.queueable = true; - }, 500); - basicBot.room.queueing++; - var id, pos; - setTimeout( - function () { - id = basicBot.room.queue.id.splice(0, 1)[0]; - pos = basicBot.room.queue.position.splice(0, 1)[0]; - API.moderateAddDJ(id, pos); - setTimeout( - function (id, pos) { - API.moderateMoveDJ(id, pos); - basicBot.room.queueing--; - if (basicBot.room.queue.id.length === 0) setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1000, id, pos); - }, 1000 + basicBot.room.queueing * 2500); - } - } - for (var i = 0; i < users.length; i++) { - var user = basicBot.userUtilities.lookupUser(users[i].id); - basicBot.userUtilities.updatePosition(user, API.getWaitListPosition(users[i].id) + 1); + }, + + cycletimerCommand: { + command: 'cycletimer', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var cycleTime = msg.substring(cmd.length + 1); + if (!isNaN(cycleTime) && cycleTime !== "") { + basicBot.settings.maximumCycletime = cycleTime; + return API.sendChat(subChat(basicBot.chat.cycleguardtime, {name: chat.un, time: basicBot.settings.maximumCycletime})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + + } } - }, - chatcleaner: function (chat) { - if (!basicBot.settings.filterChat) return false; - if (basicBot.userUtilities.getPermission(chat.uid) > 1) return false; - var msg = chat.message; - var containsLetters = false; - for (var i = 0; i < msg.length; i++) { - ch = msg.charAt(i); - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch === ':' || ch === '^') containsLetters = true; + }, + + dclookupCommand: { + command: ['dclookup', 'dc'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substring(cmd.length + 2); + var perm = basicBot.userUtilities.getPermission(chat.uid); + if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var toChat = basicBot.userUtilities.dclookup(user.id); + API.sendChat(toChat); + } } - if (msg === '') { - return true; + }, + + /*deletechatCommand: { + command: 'deletechat', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var chats = $('.from'); + var message = $('.message'); + var emote = $('.emote'); + var from = $('.un.clickable'); + for (var i = 0; i < chats.length; i++) { + var n = from[i].textContent; + if (name.trim() === n.trim()) { + + // var messagecid = $(message)[i].getAttribute('data-cid'); + // var emotecid = $(emote)[i].getAttribute('data-cid'); + // API.moderateDeleteChat(messagecid); + + // try { + // API.moderateDeleteChat(messagecid); + // } + // finally { + // API.moderateDeleteChat(emotecid); + // } + + if (typeof $(message)[i].getAttribute('data-cid') == "undefined"){ + API.moderateDeleteChat($(emote)[i].getAttribute('data-cid')); // works well with normal messages but not with emotes due to emotes and messages are seperate. + } else { + API.moderateDeleteChat($(message)[i].getAttribute('data-cid')); + } + } + } + API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); + } + } + },*/ + + emojiCommand: { + command: 'emoji', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var link = 'http://www.emoji-cheat-sheet.com/'; + API.sendChat(subChat(basicBot.chat.emojilist, {link: link})); + } } - if (!containsLetters && (msg.length === 1 || msg.length > 3)) return true; - msg = msg.replace(/[ ,;.:\/=~+%^*\-\\"'&@#]/g, ''); - var capitals = 0; - var ch; - for (var i = 0; i < msg.length; i++) { - ch = msg.charAt(i); - if (ch >= 'A' && ch <= 'Z') capitals++; + }, + + englishCommand: { + command: 'english', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if(chat.message.length === cmd.length) return API.sendChat('/me No user specified.'); + var name = chat.message.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if(typeof user === 'boolean') return API.sendChat('/me Invalid user specified.'); + var lang = basicBot.userUtilities.getUser(user).language; + var ch = '/me @' + name + ' '; + switch(lang){ + case 'en': break; + case 'da': ch += 'Vær venlig at tale engelsk.'; break; + case 'de': ch += 'Bitte sprechen Sie Englisch.'; break; + case 'es': ch += 'Por favor, hable Inglés.'; break; + case 'fr': ch += 'Parlez anglais, s\'il vous plaît.'; break; + case 'nl': ch += 'Spreek Engels, alstublieft.'; break; + case 'pl': ch += 'Proszę mówić po angielsku.'; break; + case 'pt': ch += 'Por favor, fale Inglês.'; break; + case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; + case 'cs': ch += 'Mluvte prosím anglicky.'; break; + case 'sr': ch += 'Молим Вас, говорите енглески.'; break; + } + ch += ' English please.'; + API.sendChat(ch); + } } - if (capitals >= 40) { - API.sendChat(subChat(basicBot.chat.caps, {name: chat.un})); - return true; + }, + + etaCommand: { + command: 'eta', + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var perm = basicBot.userUtilities.getPermission(chat.uid); + var msg = chat.message; + var dj = API.getDJ().username; + var name; + if (msg.length > cmd.length) { + if (perm < 2) return void (0); + name = msg.substring(cmd.length + 2); + } else name = chat.un; + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var pos = API.getWaitListPosition(user.id); + var realpos = pos + 1; + if (name == dj) return API.sendChat(subChat(basicBot.chat.youaredj, {name: name})); + if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); + if (pos == 0) return API.sendChat(subChat(basicBot.chat.youarenext, {name: name})); + var timeRemaining = API.getTimeRemaining(); + var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; + var estimateString = basicBot.roomUtilities.msToStr(estimateMS); + API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString, position: realpos})); + } } - msg = msg.toLowerCase(); - if (msg === 'skip') { - API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); - return true; + }, + + fbCommand: { + command: 'fb', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.fbLink === "string") + API.sendChat(subChat(basicBot.chat.facebook, {link: basicBot.settings.fbLink})); + } } - for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { - if (msg === basicBot.chatUtilities.spam[j]) { - API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); - return true; + }, + + filterCommand: { + command: 'filter', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.filterChat) { + basicBot.settings.filterChat = !basicBot.settings.filterChat; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.chatfilter})); + } + else { + basicBot.settings.filterChat = !basicBot.settings.filterChat; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.chatfilter})); } + } } - return false; - }, - chatUtilities: { - chatFilter: function (chat) { + }, + + forceskipCommand: { + command: ['forceskip', 'fs'], + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.forceskip, {name: chat.un})); + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + + } + } + }, + + ghostbusterCommand: { + command: 'ghostbuster', + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { var msg = chat.message; - var perm = basicBot.userUtilities.getPermission(chat.uid); - var user = basicBot.userUtilities.lookupUser(chat.uid); - var isMuted = false; - for (var i = 0; i < basicBot.room.mutedUsers.length; i++) { - if (basicBot.room.mutedUsers[i] === chat.uid) isMuted = true; - } - if (isMuted) { - API.moderateDeleteChat(chat.cid); - return true; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substr(cmd.length + 2); } - if (basicBot.settings.lockdownEnabled) { - if (perm === 0) { - API.moderateDeleteChat(chat.cid); - return true; - } + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false || !user.inRoom) { + return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); } - if (basicBot.chatcleaner(chat)) { - API.moderateDeleteChat(chat.cid); - return true; + else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); + } + } + }, + + gifCommand: { + command: ['gif', 'giphy'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length !== cmd.length) { + function get_id(api_key, fixedtag, func) + { + $.getJSON( + "https://tv.giphy.com/v1/gifs/random?", + { + "format": "json", + "api_key": api_key, + "rating": rating, + "tag": fixedtag + }, + function(response) + { + func(response.data.id); + } + ) + } + var api_key = "dc6zaTOxFJmzC"; // public beta key + var rating = "pg-13"; // PG 13 gifs + var tag = msg.substr(cmd.length + 1); + var fixedtag = tag.replace(/ /g,"+"); + var commatag = tag.replace(/ /g,", "); + get_id(api_key, tag, function(id) { + if (typeof id !== 'undefined') { + API.sendChat(subChat(basicBot.chat.validgiftags, {name: chat.un, id: id, tags: commatag})); + } else { + API.sendChat(subChat(basicBot.chat.invalidgiftags, {name: chat.un, tags: commatag})); + } + }); } - if (basicBot.settings.cmdDeletion && msg.startsWith(basicBot.settings.commandLiteral)) { - API.moderateDeleteChat(chat.cid); + else { + function get_random_id(api_key, func) + { + $.getJSON( + "https://tv.giphy.com/v1/gifs/random?", + { + "format": "json", + "api_key": api_key, + "rating": rating + }, + function(response) + { + func(response.data.id); + } + ) + } + var api_key = "dc6zaTOxFJmzC"; // public beta key + var rating = "pg-13"; // PG 13 gifs + get_random_id(api_key, function(id) { + if (typeof id !== 'undefined') { + API.sendChat(subChat(basicBot.chat.validgifrandom, {name: chat.un, id: id})); + } else { + API.sendChat(subChat(basicBot.chat.invalidgifrandom, {name: chat.un})); + } + }); + } + } + } + }, + + helpCommand: { + command: 'help', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var link = "(Updated link coming soon)"; + API.sendChat(subChat(basicBot.chat.starterhelp, {link: link})); + } + } + }, + + historyskipCommand: { + command: 'historyskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.historySkip) { + basicBot.settings.historySkip = !basicBot.settings.historySkip; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.historyskip})); } - /** - var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - if (plugRoomLinkPatt.exec(msg)) { - if (perm === 0) { - API.sendChat(subChat(basicBot.chat.roomadvertising, {name: chat.un})); - API.moderateDeleteChat(chat.cid); - return true; - } + else { + basicBot.settings.historySkip = !basicBot.settings.historySkip; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.historyskip})); } - **/ - if (msg.indexOf('http://adf.ly/') > -1) { - API.moderateDeleteChat(chat.cid); - API.sendChat(subChat(basicBot.chat.adfly, {name: chat.un})); - return true; + } + } + }, + + joinCommand: { + command: 'join', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.roulette.rouletteStatus && basicBot.room.roulette.participants.indexOf(chat.uid) < 0) { + basicBot.room.roulette.participants.push(chat.uid); + API.sendChat(subChat(basicBot.chat.roulettejoin, {name: chat.un})); + } + } + } + }, + + jointimeCommand: { + command: 'jointime', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var join = basicBot.userUtilities.getJointime(user); + var time = Date.now() - join; + var timeString = basicBot.roomUtilities.msToStr(time); + API.sendChat(subChat(basicBot.chat.jointime, {namefrom: chat.un, username: name, time: timeString})); + } + } + }, + + kickCommand: { + command: 'kick', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var lastSpace = msg.lastIndexOf(' '); + var time; + var name; + if (lastSpace === msg.indexOf(' ')) { + time = 0.25; + name = msg.substring(cmd.length + 2); } - if (msg.indexOf('autojoin was not enabled') > 0 || msg.indexOf('AFK message was not enabled') > 0 || msg.indexOf('!afkdisable') > 0 || msg.indexOf('!joindisable') > 0 || msg.indexOf('autojoin disabled') > 0 || msg.indexOf('AFK message disabled') > 0) { - API.moderateDeleteChat(chat.cid); - return true; + else { + time = msg.substring(lastSpace + 1); + name = msg.substring(cmd.length + 2, lastSpace); } - var rlJoinChat = basicBot.chat.roulettejoin; - var rlLeaveChat = basicBot.chat.rouletteleave; + var user = basicBot.userUtilities.lookupUserName(name); + var from = chat.un; + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var joinedroulette = rlJoinChat.split('%%NAME%%'); - if (joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; - else joinedroulette = joinedroulette[0]; + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permTokick = basicBot.userUtilities.getPermission(user.id); - var leftroulette = rlLeaveChat.split('%%NAME%%'); - if (leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; - else leftroulette = leftroulette[0]; + if (permFrom <= permTokick) + return API.sendChat(subChat(basicBot.chat.kickrank, {name: chat.un})); - if ((msg.indexOf(joinedroulette) > -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { - setTimeout(function (id) { - API.moderateDeleteChat(id); - }, 5 * 1000, chat.cid); - return true; + if (!isNaN(time)) { + API.sendChat(subChat(basicBot.chat.kick, {name: chat.un, username: name, time: time})); + if (time > 24 * 60 * 60) API.moderateBanUser(user.id, 1, API.BAN.PERMA); + else API.moderateBanUser(user.id, 1, API.BAN.DAY); + setTimeout(function (id, name) { + API.moderateUnbanUser(id); + console.log('Unbanned @' + name + '. (' + id + ')'); + }, time * 60 * 1000, user.id, name); } - return false; - }, - commandCheck: function (chat) { - var cmd; - if (chat.message.charAt(0) === basicBot.settings.commandLiteral) { - var space = chat.message.indexOf(' '); - if (space === -1) { - cmd = chat.message; - } - else cmd = chat.message.substring(0, space); - } - else return false; - var userPerm = basicBot.userUtilities.getPermission(chat.uid); - //console.log("name: " + chat.un + ", perm: " + userPerm); - if (chat.message !== basicBot.settings.commandLiteral + 'join' && chat.message !== basicBot.settings.commandLiteral + "leave") { - if (userPerm === 0 && !basicBot.room.usercommand) return void (0); - if (!basicBot.room.allcommand) return void (0); - } - if (chat.message === basicBot.settings.commandLiteral + 'eta' && basicBot.settings.etaRestriction) { - if (userPerm < 2) { - var u = basicBot.userUtilities.lookupUser(chat.uid); - if (u.lastEta !== null && (Date.now() - u.lastEta) < 1 * 60 * 60 * 1000) { - API.moderateDeleteChat(chat.cid); - return void (0); - } - else u.lastEta = Date.now(); - } + else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + killCommand: { + command: 'kill', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + storeToStorage(); + sendToSocket(); + API.sendChat(basicBot.chat.kill); + basicBot.disconnectAPI(); + setTimeout(function () { + kill(); + }, 1000); + } + } + }, + + languageCommand: { + command: 'language', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); + var argument = msg.substring(cmd.length + 1); + + $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { + var langIndex = json; + var link = langIndex[argument.toLowerCase()]; + if (typeof link === "undefined") { + API.sendChat(subChat(basicBot.chat.langerror, {link: "http://git.io/vJ9nI"})); + } + else { + basicBot.settings.language = argument; + loadChat(); + API.sendChat(subChat(basicBot.chat.langset, {language: basicBot.settings.language})); + } + }); + } + } + }, + + leaveCommand: { + command: 'leave', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var ind = basicBot.room.roulette.participants.indexOf(chat.uid); + if (ind > -1) { + basicBot.room.roulette.participants.splice(ind, 1); + API.sendChat(subChat(basicBot.chat.rouletteleave, {name: chat.un})); + } + } + } + }, + + linkCommand: { + command: 'link', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var media = API.getMedia(); + var from = chat.un; + var user = basicBot.userUtilities.lookupUser(chat.uid); + var perm = basicBot.userUtilities.getPermission(chat.uid); + var dj = API.getDJ().id; + var isDj = false; + if (dj === chat.uid) isDj = true; + if (perm >= 1 || isDj) { + if (media.format === 1) { + var linkToSong = "http://youtu.be/" + media.cid; + API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); + } + if (media.format === 2) { + SC.get('/tracks/' + media.cid, function (sound) { + API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: sound.permalink_url})); + }); + } } - var executed = false; - - for (var comm in basicBot.commands) { - var cmdCall = basicBot.commands[comm].command; - if (!Array.isArray(cmdCall)) { - cmdCall = [cmdCall] - } - for (var i = 0; i < cmdCall.length; i++) { - if (basicBot.settings.commandLiteral + cmdCall[i] === cmd) { - basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[i]); - executed = true; - break; - } - } + } + } + }, + + lockCommand: { + command: 'lock', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.booth.lockBooth(); + } + } + }, + + lockdownCommand: { + command: 'lockdown', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var temp = basicBot.settings.lockdownEnabled; + basicBot.settings.lockdownEnabled = !temp; + if (basicBot.settings.lockdownEnabled) { + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockdown})); } - - if (executed && userPerm === 0) { - basicBot.room.usercommand = false; - setTimeout(function () { - basicBot.room.usercommand = true; - }, basicBot.settings.commandCooldown * 1000); + else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); + } + } + }, + + lockguardCommand: { + command: 'lockguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.lockGuard) { + basicBot.settings.lockGuard = !basicBot.settings.lockGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockguard})); } - if (executed) { - /*if (basicBot.settings.cmdDeletion) { - API.moderateDeleteChat(chat.cid); - }*/ - - //basicBot.room.allcommand = false; - //setTimeout(function () { - basicBot.room.allcommand = true; - //}, 5 * 1000); + else { + basicBot.settings.lockGuard = !basicBot.settings.lockGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockguard})); } - return executed; - }, - action: function (chat) { - var user = basicBot.userUtilities.lookupUser(chat.uid); - if (chat.type === 'message') { - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === chat.uid) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); - } - - } + } + } + }, + + lockskipCommand: { + command: 'lockskip', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.skippable) { + var dj = API.getDJ(); + var id = dj.id; + var name = dj.username; + var msgSend = '@' + name + ': '; + basicBot.room.queueable = false; + + if (chat.message.length === cmd.length) { + API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); + basicBot.roomUtilities.booth.lockBooth(); + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1500, id); + }, 1000, id); + return void (0); + } + var validReason = false; + var msg = chat.message; + var reason = msg.substring(cmd.length + 1); + for (var i = 0; i < basicBot.settings.lockskipReasons.length; i++) { + var r = basicBot.settings.lockskipReasons[i][0]; + if (reason.indexOf(r) !== -1) { + validReason = true; + msgSend += basicBot.settings.lockskipReasons[i][1]; + } + } + if (validReason) { + API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); + basicBot.roomUtilities.booth.lockBooth(); + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + API.sendChat(msgSend); + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1500, id); + }, 1000, id); + return void (0); + } } - basicBot.room.roomstats.chatmessages++; - }, - spam: [ - 'hueh', 'hu3', 'brbr', 'heu', 'brbr', 'kkkk', 'spoder', 'mafia', 'zuera', 'zueira', - 'zueria', 'aehoo', 'aheu', 'alguem', 'algum', 'brazil', 'zoeira', 'fuckadmins', 'affff', 'vaisefoder', 'huenaarea', - 'hitler', 'ashua', 'ahsu', 'ashau', 'lulz', 'huehue', 'hue', 'huehuehue', 'merda', 'pqp', 'puta', 'mulher', 'pula', 'retarda', 'caralho', 'filha', 'ppk', - 'gringo', 'fuder', 'foder', 'hua', 'ahue', 'modafuka', 'modafoka', 'mudafuka', 'mudafoka', 'ooooooooooooooo', 'foda' - ], - curses: [ - 'nigger', 'faggot', 'nigga', 'niqqa', 'motherfucker', 'modafocka' - ] - }, - connectAPI: function () { - this.proxy = { - eventChat: $.proxy(this.eventChat, this), - eventUserskip: $.proxy(this.eventUserskip, this), - eventUserjoin: $.proxy(this.eventUserjoin, this), - eventUserleave: $.proxy(this.eventUserleave, this), - //eventFriendjoin: $.proxy(this.eventFriendjoin, this), - eventVoteupdate: $.proxy(this.eventVoteupdate, this), - eventCurateupdate: $.proxy(this.eventCurateupdate, this), - eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), - eventDjadvance: $.proxy(this.eventDjadvance, this), - //eventDjupdate: $.proxy(this.eventDjupdate, this), - eventWaitlistupdate: $.proxy(this.eventWaitlistupdate, this), - eventVoteskip: $.proxy(this.eventVoteskip, this), - eventModskip: $.proxy(this.eventModskip, this), - eventChatcommand: $.proxy(this.eventChatcommand, this), - eventHistoryupdate: $.proxy(this.eventHistoryupdate, this), - - }; - API.on(API.CHAT, this.proxy.eventChat); - API.on(API.USER_SKIP, this.proxy.eventUserskip); - API.on(API.USER_JOIN, this.proxy.eventUserjoin); - API.on(API.USER_LEAVE, this.proxy.eventUserleave); - API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); - API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); - API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); - API.on(API.ADVANCE, this.proxy.eventDjadvance); - API.on(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); - API.on(API.MOD_SKIP, this.proxy.eventModskip); - API.on(API.CHAT_COMMAND, this.proxy.eventChatcommand); - API.on(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); - }, - disconnectAPI: function () { - API.off(API.CHAT, this.proxy.eventChat); - API.off(API.USER_SKIP, this.proxy.eventUserskip); - API.off(API.USER_JOIN, this.proxy.eventUserjoin); - API.off(API.USER_LEAVE, this.proxy.eventUserleave); - API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); - API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); - API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); - API.off(API.ADVANCE, this.proxy.eventDjadvance); - API.off(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); - API.off(API.MOD_SKIP, this.proxy.eventModskip); - API.off(API.CHAT_COMMAND, this.proxy.eventChatcommand); - API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); - }, - startup: function () { - Function.prototype.toString = function () { - return 'Function.' - }; - var u = API.getUser(); - if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); - if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); - basicBot.connectAPI(); - API.moderateDeleteChat = function (cid) { - $.ajax({ - url: "https://plug.dj/_/chat/" + cid, - type: "DELETE" - }) - }; - - basicBot.room.name = window.location.pathname; - var Check; - - console.log(basicBot.room.name); - - var detect = function(){ - if(basicBot.room.name != window.location.pathname){ - console.log("Killing bot after room change."); - storeToStorage(); - basicBot.disconnectAPI(); - setTimeout(function () { - kill(); - }, 1000); - if (basicBot.settings.roomLock){ - window.location = 'https://plug.dj' + basicBot.room.name; - } - else { - clearInterval(Check); - } + } + } + }, + + locktimerCommand: { + command: 'locktimer', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var lockTime = msg.substring(cmd.length + 1); + if (!isNaN(lockTime) && lockTime !== "") { + basicBot.settings.maximumLocktime = lockTime; + return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, time: basicBot.settings.maximumLocktime})); } - }; - - Check = setInterval(function(){ detect() }, 2000); - - retrieveSettings(); - retrieveFromStorage(); - window.bot = basicBot; - basicBot.roomUtilities.updateBlacklists(); - setInterval(basicBot.roomUtilities.updateBlacklists, 60 * 60 * 1000); - basicBot.getNewBlacklistedSongs = basicBot.roomUtilities.exportNewBlacklistedSongs; - basicBot.logNewBlacklistedSongs = basicBot.roomUtilities.logNewBlacklistedSongs; - if (basicBot.room.roomstats.launchTime === null) { - basicBot.room.roomstats.launchTime = Date.now(); + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } } - - for (var j = 0; j < basicBot.room.users.length; j++) { - basicBot.room.users[j].inRoom = false; - } - var userlist = API.getUsers(); - for (var i = 0; i < userlist.length; i++) { - var known = false; - var ind = null; - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.room.users[j].id === userlist[i].id) { - known = true; - ind = j; - } + }, + + logoutCommand: { + command: 'logout', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); + setTimeout(function () { + $(".logout").mousedown() + }, 1000); + } + } + }, + + maxlengthCommand: { + command: 'maxlength', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var maxTime = msg.substring(cmd.length + 1); + if (!isNaN(maxTime)) { + basicBot.settings.maximumSongLength = maxTime; + return API.sendChat(subChat(basicBot.chat.maxlengthtime, {name: chat.un, time: basicBot.settings.maximumSongLength})); } - if (known) { - basicBot.room.users[ind].inRoom = true; + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + motdCommand: { + command: 'motd', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat('/me MotD: ' + basicBot.settings.motd); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.motdEnabled) basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + if (isNaN(argument)) { + basicBot.settings.motd = argument; + API.sendChat(subChat(basicBot.chat.motdset, {msg: basicBot.settings.motd})); } else { - basicBot.room.users.push(new basicBot.User(userlist[i].id, userlist[i].username)); - ind = basicBot.room.users.length - 1; - } - var wlIndex = API.getWaitListPosition(basicBot.room.users[ind].id) + 1; - basicBot.userUtilities.updatePosition(basicBot.room.users[ind], wlIndex); - } - basicBot.room.afkInterval = setInterval(function () { - basicBot.roomUtilities.afkCheck() - }, 10 * 1000); - basicBot.room.autodisableInterval = setInterval(function () { - basicBot.room.autodisableFunc(); - }, 60 * 60 * 1000); - basicBot.loggedInID = API.getUser().id; - basicBot.status = true; - API.sendChat('/cap ' + basicBot.settings.startupCap); - API.setVolume(basicBot.settings.startupVolume); - if (basicBot.settings.autowoot) { - $("#woot").click(); - } - if (basicBot.settings.startupEmoji) { - var emojibuttonoff = $(".icon-emoji-off"); - if (emojibuttonoff.length > 0) { - emojibuttonoff[0].click(); - } - API.chatLog(':smile: Emojis enabled.'); + basicBot.settings.motdInterval = argument; + API.sendChat(subChat(basicBot.chat.motdintervalset, {interval: basicBot.settings.motdInterval})); + } + } } - else { - var emojibuttonon = $(".icon-emoji-on"); - if (emojibuttonon.length > 0) { - emojibuttonon[0].click(); + }, + + moveCommand: { + command: 'move', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var firstSpace = msg.indexOf(' '); + var lastSpace = msg.lastIndexOf(' '); + var pos; + var name; + if (isNaN(parseInt(msg.substring(lastSpace + 1)))) { + pos = 1; + name = msg.substring(cmd.length + 2); } - API.chatLog('Emojis disabled.'); + else { + pos = parseInt(msg.substring(lastSpace + 1)); + name = msg.substring(cmd.length + 2, lastSpace); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + if (user.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbotwaitlist, {name: chat.un})); + if (!isNaN(pos)) { + API.sendChat(subChat(basicBot.chat.move, {name: chat.un})); + basicBot.userUtilities.moveUser(user.id, pos, false); + } else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); + } } - API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); - API.chatLog('Volume set to ' + basicBot.settings.startupVolume); - socket(); - loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); - }, - commands: { - executable: function (minRank, chat) { - var id = chat.uid; - var perm = basicBot.userUtilities.getPermission(id); - var minPerm; - switch (minRank) { - case 'admin': - minPerm = 10; - break; - case 'ambassador': - minPerm = 7; - break; - case 'host': - minPerm = 5; - break; - case 'cohost': - minPerm = 4; - break; - case 'manager': - minPerm = 3; - break; - case 'mod': - if (basicBot.settings.bouncerPlus) { - minPerm = 2; - } - else { - minPerm = 3; - } - break; - case 'bouncer': - minPerm = 2; - break; - case 'residentdj': - minPerm = 1; - break; - case 'user': - minPerm = 0; - break; - default: - API.chatLog('error assigning minimum permission'); - } - return perm >= minPerm; - - }, - /** - command: { - command: 'cmd', - rank: 'user/bouncer/mod/manager', - type: 'startsWith/exact', - functionality: function(chat, cmd){ - if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if( !basicBot.commands.executable(this.rank, chat) ) return void (0); - else{ - - } - } - }, - **/ - - activeCommand: { - command: 'active', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var now = Date.now(); - var chatters = 0; - var time; - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - var since = durationOnline / 1000; - - if (msg.length === cmd.length) time = since; - else { - time = msg.substring(cmd.length + 1); - if (isNaN(time)) return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - for (var i = 0; i < basicBot.room.users.length; i++) { - userTime = basicBot.userUtilities.getLastActivity(basicBot.room.users[i]); - if ((now - userTime) <= (time * 60 * 1000)) { - chatters++; - } - } - API.sendChat(subChat(basicBot.chat.activeusersintime, {name: chat.un, amount: chatters, time: time})); - } + }, + + muteCommand: { + command: 'mute', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var lastSpace = msg.lastIndexOf(' '); + var time = null; + var name; + if (lastSpace === msg.indexOf(' ')) { + name = msg.substring(cmd.length + 2); + time = 45; } - }, - - addCommand: { - command: 'add', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (msg.length > cmd.length + 2) { - if (typeof user !== 'undefined') { - if (basicBot.room.roomevent) { - basicBot.room.eventArtists.push(user.id); - } - API.moderateAddDJ(user.id); - } else API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - } - } + else { + time = msg.substring(lastSpace + 1); + if (isNaN(time) || time == "" || time == null || typeof time == "undefined") { + return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + name = msg.substring(cmd.length + 2, lastSpace); + } + var from = chat.un; + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permFrom > permUser) { + /* + basicBot.room.mutedUsers.push(user.id); + if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); + else { + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === id) { + indexMuted = i; + wasMuted = true; + } + } + if (indexMuted > -1) { + basicBot.room.mutedUsers.splice(indexMuted); + var u = basicBot.userUtilities.lookupUser(id); + var name = u.username; + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + }, time * 60 * 1000, user.id); + } + */ + if (time > 45) { + API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + } + else if (time === 45) { + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + + } + else if (time > 30) { + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + else if (time > 15) { + API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + else { + API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } } - }, + else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); + } + } + }, + + opCommand: { + command: 'op', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.opLink === "string") + return API.sendChat(subChat(basicBot.chat.oplist, {link: basicBot.settings.opLink})); + } + } + }, + + pingCommand: { + command: 'ping', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.pong) + } + } + }, + + refreshCommand: { + command: 'refresh', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + sendToSocket(); + storeToStorage(); + basicBot.disconnectAPI(); + setTimeout(function () { + window.location.reload(false); + }, 1000); - afklimitCommand: { - command: 'afklimit', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolimitspecified, {name: chat.un})); - var limit = msg.substring(cmd.length + 1); - if (!isNaN(limit)) { - basicBot.settings.maximumAfk = parseInt(limit, 10); - API.sendChat(subChat(basicBot.chat.maximumafktimeset, {name: chat.un, time: basicBot.settings.maximumAfk})); - } - else API.sendChat(subChat(basicBot.chat.invalidlimitspecified, {name: chat.un})); - } + } + } + }, + + reloadCommand: { + command: 'reload', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.reload); + sendToSocket(); + storeToStorage(); + basicBot.disconnectAPI(); + kill(); + setTimeout(function () { + $.getScript(basicBot.scriptLink); + }, 2000); + } + } + }, + + removeCommand: { + command: 'remove', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length > cmd.length + 2) { + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user !== 'boolean') { + user.lastDC = { + time: null, + position: null, + songCount: 0 + }; + if (API.getDJ().id === user.id) { + API.moderateForceSkip(); + setTimeout(function () { + API.moderateRemoveDJ(user.id); + }, 1 * 1000, user); + } + else API.moderateRemoveDJ(user.id); + } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); + } else API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + } + } + }, + + restrictetaCommand: { + command: 'restricteta', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.etaRestriction) { + basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.etarestriction})); } - }, - - afkremovalCommand: { - command: 'afkremoval', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.afkRemoval) { - basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; - clearInterval(basicBot.room.afkInterval); - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.afkremoval})); - } - else { - basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; - basicBot.room.afkInterval = setInterval(function () { - basicBot.roomUtilities.afkCheck() - }, 2 * 1000); - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.afkremoval})); - } - } + else { + basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.etarestriction})); } - }, - - afkresetCommand: { - command: 'afkreset', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - basicBot.userUtilities.setLastActivity(user); - API.sendChat(subChat(basicBot.chat.afkstatusreset, {name: chat.un, username: name})); + } + } + }, + + rouletteCommand: { + command: 'roulette', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (!basicBot.room.roulette.rouletteStatus) { + basicBot.room.roulette.startRoulette(); + } + } + } + }, + + rulesCommand: { + command: 'rules', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.rulesLink === "string") + return API.sendChat(subChat(basicBot.chat.roomrules, {link: basicBot.settings.rulesLink})); + } + } + }, + + sessionstatsCommand: { + command: 'sessionstats', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var from = chat.un; + var woots = basicBot.room.roomstats.totalWoots; + var mehs = basicBot.room.roomstats.totalMehs; + var grabs = basicBot.room.roomstats.totalCurates; + API.sendChat(subChat(basicBot.chat.sessionstats, {name: from, woots: woots, mehs: mehs, grabs: grabs})); + } + } + }, + + skipCommand: { + command: ['skip', 'smartskip'], + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.skippable) { + + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + var dj = API.getDJ(); + var name = dj.username; + var msgSend = '@' + name + ', '; + + if (chat.message.length === cmd.length) { + API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); } - } - }, - - afktimeCommand: { - command: 'afktime', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var lastActive = basicBot.userUtilities.getLastActivity(user); - var inactivity = Date.now() - lastActive; - var time = basicBot.roomUtilities.msToStr(inactivity); - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - - if (inactivity == durationOnline){ - API.sendChat(subChat(basicBot.chat.inactivelonger, {botname: basicBot.settings.botName, name: chat.un, username: name})); - } else { - API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); - } + API.moderateForceSkip(); } - } - }, - - autodisableCommand: { - command: 'autodisable', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.autodisable) { - basicBot.settings.autodisable = !basicBot.settings.autodisable; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autodisable})); - } - else { - basicBot.settings.autodisable = !basicBot.settings.autodisable; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autodisable})); - } - + } + var validReason = false; + var msg = chat.message; + var reason = msg.substring(cmd.length + 1); + for (var i = 0; i < basicBot.settings.skipReasons.length; i++) { + var r = basicBot.settings.skipReasons[i][0]; + if (reason.indexOf(r) !== -1) { + validReason = true; + msgSend += basicBot.settings.skipReasons[i][1]; } - } - }, - - autoskipCommand: { - command: 'autoskip', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.autoskip) { - basicBot.settings.autoskip = !basicBot.settings.autoskip; - clearTimeout(basicBot.room.autoskipTimer); - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); - } - else { - basicBot.settings.autoskip = !basicBot.settings.autoskip; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); - } + } + if (validReason) { + API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(msgSend); } - } - }, - - autowootCommand: { - command: 'autowoot', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - API.sendChat(basicBot.chat.autowoot); + API.moderateForceSkip(); + setTimeout(function () { + API.sendChat(msgSend); + }, 500); } + } } - }, - - baCommand: { - command: 'ba', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.brandambassador); - } + } + } + }, + + skipposCommand: { + command: 'skippos', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var pos = msg.substring(cmd.length + 1); + if (!isNaN(pos)) { + basicBot.settings.skipPosition = pos; + return API.sendChat(subChat(basicBot.chat.skippos, {name: chat.un, position: basicBot.settings.skipPosition})); } - }, - - ballCommand: { - command: ['8ball', 'ask'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var crowd = API.getUsers(); - var msg = chat.message; - var argument = msg.substring(cmd.length + 1).replace(/@/g, ''); - var randomUser = Math.floor(Math.random() * crowd.length); - var randomBall = Math.floor(Math.random() * basicBot.chat.balls.length); - var randomSentence = Math.floor(Math.random() * 1); - API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.chat.balls[randomBall]})); - } + else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); + } + } + }, + + songstatsCommand: { + command: 'songstats', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.songstats) { + basicBot.settings.songstats = !basicBot.settings.songstats; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.songstats})); } - }, - - banCommand: { - command: 'ban', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - API.moderateBanUser(user.id, 1, API.BAN.DAY); - } + else { + basicBot.settings.songstats = !basicBot.settings.songstats; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.songstats})); } - }, - - blacklistCommand: { - command: ['blacklist', 'bl'], - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolistspecified, {name: chat.un})); - var list = msg.substr(cmd.length + 1); - if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); - else { - var media = API.getMedia(); - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - var track = { - list: list, - author: media.author, - title: media.title, - mid: media.format + ':' + media.cid - }; - basicBot.room.newBlacklisted.push(track); - basicBot.room.blacklists[list].push(media.format + ':' + media.cid); - API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); - } - else { - API.moderateForceSkip(); - } - if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { - basicBot.room.newBlacklistedSongFunction(track); - } - } - } + } + } + }, + + sourceCommand: { + command: 'source', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat('/me This bot was created by ' + botCreator + ', but is now maintained by ' + botMaintainer + "."); + } + } + }, + + statusCommand: { + command: 'status', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var from = chat.un; + var msg = '[@' + from + '] '; + + msg += basicBot.chat.afkremoval + ': '; + if (basicBot.settings.afkRemoval) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + msg += basicBot.chat.afksremoved + ": " + basicBot.room.afkList.length + '. '; + msg += basicBot.chat.afklimit + ': ' + basicBot.settings.maximumAfk + '. '; + + msg += 'Bouncer+: '; + if (basicBot.settings.bouncerPlus) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.blacklist + ': '; + if (basicBot.settings.blacklistEnabled) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.lockguard + ': '; + if (basicBot.settings.lockGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.cycleguard + ': '; + if (basicBot.settings.cycleGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.timeguard + ': '; + if (basicBot.settings.timeGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.chatfilter + ': '; + if (basicBot.settings.filterChat) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.historyskip + ': '; + if (basicBot.settings.historySkip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.voteskip + ': '; + if (basicBot.settings.voteSkip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.cmddeletion + ': '; + if (basicBot.settings.cmdDeletion) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.autoskip + ': '; + if (basicBot.settings.autoskip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + // TODO: Display more toggleable bot settings. + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + var since = basicBot.roomUtilities.msToStr(durationOnline); + msg += subChat(basicBot.chat.activefor, {time: since}); + + /* + // least efficient way to go about this, but it works :) + if (msg.length > 256){ + firstpart = msg.substr(0, 256); + secondpart = msg.substr(256); + API.sendChat(firstpart); + setTimeout(function () { + API.sendChat(secondpart); + }, 300); } - }, - - blinfoCommand: { - command: 'blinfo', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var author = API.getMedia().author; - var title = API.getMedia().title; - var name = chat.un; - var format = API.getMedia().format; - var cid = API.getMedia().cid; - var songid = format + ":" + cid; - - API.sendChat(subChat(basicBot.chat.blinfo, {name: name, author: author, title: title, songid: songid})); - } + else { + API.sendChat(msg); } - }, + */ - bouncerPlusCommand: { - command: 'bouncer+', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (basicBot.settings.bouncerPlus) { - basicBot.settings.bouncerPlus = false; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': 'Bouncer+'})); - } - else { - if (!basicBot.settings.bouncerPlus) { - var id = chat.uid; - var perm = basicBot.userUtilities.getPermission(id); - if (perm > 2) { - basicBot.settings.bouncerPlus = true; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': 'Bouncer+'})); - } - } - else return API.sendChat(subChat(basicBot.chat.bouncerplusrank, {name: chat.un})); - } + // This is a more efficient solution + if (msg.length > 241){ + var split = msg.match(/.{1,241}/g); + for (var i = 0; i < split.length; i++) { + var func = function(index) { + setTimeout(function() { + API.sendChat("/me " + split[index]); + }, 500 * index); } + func(i); + } } - }, - - botnameCommand: { - command: 'botname', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentbotname, {botname: basicBot.settings.botName})); - var argument = msg.substring(cmd.length + 1); - if (argument) { - basicBot.settings.botName = argument; - API.sendChat(subChat(basicBot.chat.botnameset, {botName: basicBot.settings.botName})); - } - } + else { + return API.sendChat(msg); } - }, - - clearchatCommand: { - command: 'clearchat', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var currentchat = $('#chat-messages').children(); - for (var i = 0; i < currentchat.length; i++) { - API.moderateDeleteChat(currentchat[i].getAttribute("data-cid")); - } - return API.sendChat(subChat(basicBot.chat.chatcleared, {name: chat.un})); - } + } + } + }, + + swapCommand: { + command: 'swap', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var firstSpace = msg.indexOf(' '); + var lastSpace = msg.lastIndexOf(' '); + var name1 = msg.substring(cmd.length + 2, lastSpace); + var name2 = msg.substring(lastSpace + 2); + var user1 = basicBot.userUtilities.lookupUserName(name1); + var user2 = basicBot.userUtilities.lookupUserName(name2); + if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); + if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); + var p1 = API.getWaitListPosition(user1.id) + 1; + var p2 = API.getWaitListPosition(user2.id) + 1; + if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); + API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); + if (p1 < p2) { + basicBot.userUtilities.moveUser(user2.id, p1, false); + setTimeout(function (user1, p2) { + basicBot.userUtilities.moveUser(user1.id, p2, false); + }, 2000, user1, p2); } - }, - - commandsCommand: { - command: 'commands', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); - } + else { + basicBot.userUtilities.moveUser(user1.id, p2, false); + setTimeout(function (user2, p1) { + basicBot.userUtilities.moveUser(user2.id, p1, false); + }, 2000, user2, p1); } - }, - - cmddeletionCommand: { - command: ['commanddeletion', 'cmddeletion', 'cmddel'], - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.cmdDeletion) { - basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cmddeletion})); - } - else { - basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cmddeletion})); - } - } + } + } + }, + + themeCommand: { + command: 'theme', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.themeLink === "string") + API.sendChat(subChat(basicBot.chat.genres, {link: basicBot.settings.themeLink})); + } + } + }, + + timeguardCommand: { + command: 'timeguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.timeGuard) { + basicBot.settings.timeGuard = !basicBot.settings.timeGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.timeguard})); } - }, - - cookieCommand: { - command: 'cookie', - rank: 'user', - type: 'startsWith', - getCookie: function (chat) { - var c = Math.floor(Math.random() * basicBot.chat.cookies.length); - return basicBot.chat.cookies[c]; - }, - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - - var space = msg.indexOf(' '); - if (space === -1) { - API.sendChat(basicBot.chat.eatcookie); - return false; - } - else { - var name = msg.substring(space + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false || !user.inRoom) { - return API.sendChat(subChat(basicBot.chat.nousercookie, {name: name})); - } - else if (user.username === chat.un) { - return API.sendChat(subChat(basicBot.chat.selfcookie, {name: name})); - } - else { - return API.sendChat(subChat(basicBot.chat.cookie, {nameto: user.username, namefrom: chat.un, cookie: this.getCookie()})); - } - } - } - } - }, - - cycleCommand: { - command: 'cycle', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.changeDJCycle(); - } - } - }, - - cycleguardCommand: { - command: 'cycleguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.cycleGuard) { - basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cycleguard})); - } - else { - basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cycleguard})); - } - - } - } - }, - - cycletimerCommand: { - command: 'cycletimer', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var cycleTime = msg.substring(cmd.length + 1); - if (!isNaN(cycleTime) && cycleTime !== "") { - basicBot.settings.maximumCycletime = cycleTime; - return API.sendChat(subChat(basicBot.chat.cycleguardtime, {name: chat.un, time: basicBot.settings.maximumCycletime})); - } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - - } - } - }, - - dclookupCommand: { - command: ['dclookup', 'dc'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substring(cmd.length + 2); - var perm = basicBot.userUtilities.getPermission(chat.uid); - if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); - } - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var toChat = basicBot.userUtilities.dclookup(user.id); - API.sendChat(toChat); - } - } - }, - - /*deletechatCommand: { - command: 'deletechat', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var chats = $('.from'); - var message = $('.message'); - var emote = $('.emote'); - var from = $('.un.clickable'); - for (var i = 0; i < chats.length; i++) { - var n = from[i].textContent; - if (name.trim() === n.trim()) { - - // var messagecid = $(message)[i].getAttribute('data-cid'); - // var emotecid = $(emote)[i].getAttribute('data-cid'); - // API.moderateDeleteChat(messagecid); - - // try { - // API.moderateDeleteChat(messagecid); - // } - // finally { - // API.moderateDeleteChat(emotecid); - // } - - if (typeof $(message)[i].getAttribute('data-cid') == "undefined"){ - API.moderateDeleteChat($(emote)[i].getAttribute('data-cid')); // works well with normal messages but not with emotes due to emotes and messages are seperate. - } else { - API.moderateDeleteChat($(message)[i].getAttribute('data-cid')); - } - } - } - API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); - } - } - },*/ - - emojiCommand: { - command: 'emoji', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var link = 'http://www.emoji-cheat-sheet.com/'; - API.sendChat(subChat(basicBot.chat.emojilist, {link: link})); - } - } - }, - - englishCommand: { - command: 'english', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if(chat.message.length === cmd.length) return API.sendChat('/me No user specified.'); - var name = chat.message.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if(typeof user === 'boolean') return API.sendChat('/me Invalid user specified.'); - var lang = basicBot.userUtilities.getUser(user).language; - var ch = '/me @' + name + ' '; - switch(lang){ - case 'en': break; - case 'da': ch += 'Vær venlig at tale engelsk.'; break; - case 'de': ch += 'Bitte sprechen Sie Englisch.'; break; - case 'es': ch += 'Por favor, hable Inglés.'; break; - case 'fr': ch += 'Parlez anglais, s\'il vous plaît.'; break; - case 'nl': ch += 'Spreek Engels, alstublieft.'; break; - case 'pl': ch += 'Proszę mówić po angielsku.'; break; - case 'pt': ch += 'Por favor, fale Inglês.'; break; - case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; - case 'cs': ch += 'Mluvte prosím anglicky.'; break; - case 'sr': ch += 'Молим Вас, говорите енглески.'; break; - } - ch += ' English please.'; - API.sendChat(ch); - } - } - }, - - etaCommand: { - command: 'eta', - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var perm = basicBot.userUtilities.getPermission(chat.uid); - var msg = chat.message; - var dj = API.getDJ().username; - var name; - if (msg.length > cmd.length) { - if (perm < 2) return void (0); - name = msg.substring(cmd.length + 2); - } else name = chat.un; - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var pos = API.getWaitListPosition(user.id); - var realpos = pos + 1; - if (name == dj) return API.sendChat(subChat(basicBot.chat.youaredj, {name: name})); - if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); - if (pos == 0) return API.sendChat(subChat(basicBot.chat.youarenext, {name: name})); - var timeRemaining = API.getTimeRemaining(); - var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; - var estimateString = basicBot.roomUtilities.msToStr(estimateMS); - API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString, position: realpos})); - } - } - }, - - fbCommand: { - command: 'fb', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.fbLink === "string") - API.sendChat(subChat(basicBot.chat.facebook, {link: basicBot.settings.fbLink})); - } - } - }, - - filterCommand: { - command: 'filter', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.filterChat) { - basicBot.settings.filterChat = !basicBot.settings.filterChat; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.chatfilter})); - } - else { - basicBot.settings.filterChat = !basicBot.settings.filterChat; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.chatfilter})); - } - } - } - }, - - forceskipCommand: { - command: ['forceskip', 'fs'], - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.forceskip, {name: chat.un})); - API.moderateForceSkip(); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - - } - } - }, - - ghostbusterCommand: { - command: 'ghostbuster', - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substr(cmd.length + 2); - } - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false || !user.inRoom) { - return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); - } - else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); - } - } - }, - - gifCommand: { - command: ['gif', 'giphy'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length !== cmd.length) { - function get_id(api_key, fixedtag, func) - { - $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { - "format": "json", - "api_key": api_key, - "rating": rating, - "tag": fixedtag - }, - function(response) - { - func(response.data.id); - } - ) - } - var api_key = "dc6zaTOxFJmzC"; // public beta key - var rating = "pg-13"; // PG 13 gifs - var tag = msg.substr(cmd.length + 1); - var fixedtag = tag.replace(/ /g,"+"); - var commatag = tag.replace(/ /g,", "); - get_id(api_key, tag, function(id) { - if (typeof id !== 'undefined') { - API.sendChat(subChat(basicBot.chat.validgiftags, {name: chat.un, id: id, tags: commatag})); - } else { - API.sendChat(subChat(basicBot.chat.invalidgiftags, {name: chat.un, tags: commatag})); - } - }); - } - else { - function get_random_id(api_key, func) - { - $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { - "format": "json", - "api_key": api_key, - "rating": rating - }, - function(response) - { - func(response.data.id); - } - ) - } - var api_key = "dc6zaTOxFJmzC"; // public beta key - var rating = "pg-13"; // PG 13 gifs - get_random_id(api_key, function(id) { - if (typeof id !== 'undefined') { - API.sendChat(subChat(basicBot.chat.validgifrandom, {name: chat.un, id: id})); - } else { - API.sendChat(subChat(basicBot.chat.invalidgifrandom, {name: chat.un})); - } - }); - } - } - } - }, - - helpCommand: { - command: 'help', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var link = "(Updated link coming soon)"; - API.sendChat(subChat(basicBot.chat.starterhelp, {link: link})); - } - } - }, - - historyskipCommand: { - command: 'historyskip', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.historySkip) { - basicBot.settings.historySkip = !basicBot.settings.historySkip; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.historyskip})); - } - else { - basicBot.settings.historySkip = !basicBot.settings.historySkip; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.historyskip})); - } - } - } - }, - - joinCommand: { - command: 'join', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.roulette.rouletteStatus && basicBot.room.roulette.participants.indexOf(chat.uid) < 0) { - basicBot.room.roulette.participants.push(chat.uid); - API.sendChat(subChat(basicBot.chat.roulettejoin, {name: chat.un})); - } - } - } - }, - - jointimeCommand: { - command: 'jointime', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var join = basicBot.userUtilities.getJointime(user); - var time = Date.now() - join; - var timeString = basicBot.roomUtilities.msToStr(time); - API.sendChat(subChat(basicBot.chat.jointime, {namefrom: chat.un, username: name, time: timeString})); - } - } - }, - - kickCommand: { - command: 'kick', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var lastSpace = msg.lastIndexOf(' '); - var time; - var name; - if (lastSpace === msg.indexOf(' ')) { - time = 0.25; - name = msg.substring(cmd.length + 2); - } - else { - time = msg.substring(lastSpace + 1); - name = msg.substring(cmd.length + 2, lastSpace); - } - - var user = basicBot.userUtilities.lookupUserName(name); - var from = chat.un; - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - var permTokick = basicBot.userUtilities.getPermission(user.id); - - if (permFrom <= permTokick) - return API.sendChat(subChat(basicBot.chat.kickrank, {name: chat.un})); - - if (!isNaN(time)) { - API.sendChat(subChat(basicBot.chat.kick, {name: chat.un, username: name, time: time})); - if (time > 24 * 60 * 60) API.moderateBanUser(user.id, 1, API.BAN.PERMA); - else API.moderateBanUser(user.id, 1, API.BAN.DAY); - setTimeout(function (id, name) { - API.moderateUnbanUser(id); - console.log('Unbanned @' + name + '. (' + id + ')'); - }, time * 60 * 1000, user.id, name); - } - else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - killCommand: { - command: 'kill', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - storeToStorage(); - sendToSocket(); - API.sendChat(basicBot.chat.kill); - basicBot.disconnectAPI(); - setTimeout(function () { - kill(); - }, 1000); - } - } - }, - - languageCommand: { - command: 'language', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); - var argument = msg.substring(cmd.length + 1); - - $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { - var langIndex = json; - var link = langIndex[argument.toLowerCase()]; - if (typeof link === "undefined") { - API.sendChat(subChat(basicBot.chat.langerror, {link: "http://git.io/vJ9nI"})); - } - else { - basicBot.settings.language = argument; - loadChat(); - API.sendChat(subChat(basicBot.chat.langset, {language: basicBot.settings.language})); - } - }); - } - } - }, - - leaveCommand: { - command: 'leave', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var ind = basicBot.room.roulette.participants.indexOf(chat.uid); - if (ind > -1) { - basicBot.room.roulette.participants.splice(ind, 1); - API.sendChat(subChat(basicBot.chat.rouletteleave, {name: chat.un})); - } - } - } - }, - - linkCommand: { - command: 'link', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var media = API.getMedia(); - var from = chat.un; - var user = basicBot.userUtilities.lookupUser(chat.uid); - var perm = basicBot.userUtilities.getPermission(chat.uid); - var dj = API.getDJ().id; - var isDj = false; - if (dj === chat.uid) isDj = true; - if (perm >= 1 || isDj) { - if (media.format === 1) { - var linkToSong = "http://youtu.be/" + media.cid; - API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); - } - if (media.format === 2) { - SC.get('/tracks/' + media.cid, function (sound) { - API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: sound.permalink_url})); - }); - } - } - } - } - }, - - lockCommand: { - command: 'lock', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.booth.lockBooth(); - } - } - }, - - lockdownCommand: { - command: 'lockdown', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var temp = basicBot.settings.lockdownEnabled; - basicBot.settings.lockdownEnabled = !temp; - if (basicBot.settings.lockdownEnabled) { - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockdown})); - } - else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); - } - } - }, - - lockguardCommand: { - command: 'lockguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.lockGuard) { - basicBot.settings.lockGuard = !basicBot.settings.lockGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockguard})); - } - else { - basicBot.settings.lockGuard = !basicBot.settings.lockGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockguard})); - } - } - } - }, - - lockskipCommand: { - command: 'lockskip', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.skippable) { - var dj = API.getDJ(); - var id = dj.id; - var name = dj.username; - var msgSend = '@' + name + ': '; - basicBot.room.queueable = false; - - if (chat.message.length === cmd.length) { - API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); - basicBot.roomUtilities.booth.lockBooth(); - setTimeout(function (id) { - API.moderateForceSkip(); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); - basicBot.room.queueable = true; - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1500, id); - }, 1000, id); - return void (0); - } - var validReason = false; - var msg = chat.message; - var reason = msg.substring(cmd.length + 1); - for (var i = 0; i < basicBot.settings.lockskipReasons.length; i++) { - var r = basicBot.settings.lockskipReasons[i][0]; - if (reason.indexOf(r) !== -1) { - validReason = true; - msgSend += basicBot.settings.lockskipReasons[i][1]; - } - } - if (validReason) { - API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); - basicBot.roomUtilities.booth.lockBooth(); - setTimeout(function (id) { - API.moderateForceSkip(); - basicBot.room.skippable = false; - API.sendChat(msgSend); - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); - basicBot.room.queueable = true; - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1500, id); - }, 1000, id); - return void (0); - } - } - } - } - }, - - locktimerCommand: { - command: 'locktimer', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var lockTime = msg.substring(cmd.length + 1); - if (!isNaN(lockTime) && lockTime !== "") { - basicBot.settings.maximumLocktime = lockTime; - return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, time: basicBot.settings.maximumLocktime})); - } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - logoutCommand: { - command: 'logout', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); - setTimeout(function () { - $(".logout").mousedown() - }, 1000); - } - } - }, - - maxlengthCommand: { - command: 'maxlength', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var maxTime = msg.substring(cmd.length + 1); - if (!isNaN(maxTime)) { - basicBot.settings.maximumSongLength = maxTime; - return API.sendChat(subChat(basicBot.chat.maxlengthtime, {name: chat.un, time: basicBot.settings.maximumSongLength})); - } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - motdCommand: { - command: 'motd', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat('/me MotD: ' + basicBot.settings.motd); - var argument = msg.substring(cmd.length + 1); - if (!basicBot.settings.motdEnabled) basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - if (isNaN(argument)) { - basicBot.settings.motd = argument; - API.sendChat(subChat(basicBot.chat.motdset, {msg: basicBot.settings.motd})); - } - else { - basicBot.settings.motdInterval = argument; - API.sendChat(subChat(basicBot.chat.motdintervalset, {interval: basicBot.settings.motdInterval})); - } - } - } - }, - - moveCommand: { - command: 'move', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var firstSpace = msg.indexOf(' '); - var lastSpace = msg.lastIndexOf(' '); - var pos; - var name; - if (isNaN(parseInt(msg.substring(lastSpace + 1)))) { - pos = 1; - name = msg.substring(cmd.length + 2); - } - else { - pos = parseInt(msg.substring(lastSpace + 1)); - name = msg.substring(cmd.length + 2, lastSpace); - } - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - if (user.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbotwaitlist, {name: chat.un})); - if (!isNaN(pos)) { - API.sendChat(subChat(basicBot.chat.move, {name: chat.un})); - basicBot.userUtilities.moveUser(user.id, pos, false); - } else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); - } - } - }, - - muteCommand: { - command: 'mute', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var lastSpace = msg.lastIndexOf(' '); - var time = null; - var name; - if (lastSpace === msg.indexOf(' ')) { - name = msg.substring(cmd.length + 2); - time = 45; - } - else { - time = msg.substring(lastSpace + 1); - if (isNaN(time) || time == "" || time == null || typeof time == "undefined") { - return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - name = msg.substring(cmd.length + 2, lastSpace); - } - var from = chat.un; - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - var permUser = basicBot.userUtilities.getPermission(user.id); - if (permFrom > permUser) { - /* - basicBot.room.mutedUsers.push(user.id); - if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); - else { - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === id) { - indexMuted = i; - wasMuted = true; - } - } - if (indexMuted > -1) { - basicBot.room.mutedUsers.splice(indexMuted); - var u = basicBot.userUtilities.lookupUser(id); - var name = u.username; - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - }, time * 60 * 1000, user.id); - } - */ - if (time > 45) { - API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - } - else if (time === 45) { - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - - } - else if (time > 30) { - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } - else if (time > 15) { - API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } - else { - API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } - } - else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); - } - } - }, - - opCommand: { - command: 'op', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.opLink === "string") - return API.sendChat(subChat(basicBot.chat.oplist, {link: basicBot.settings.opLink})); - } - } - }, - - pingCommand: { - command: 'ping', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.pong) - } - } - }, - - refreshCommand: { - command: 'refresh', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - sendToSocket(); - storeToStorage(); - basicBot.disconnectAPI(); - setTimeout(function () { - window.location.reload(false); - }, 1000); - - } - } - }, - - reloadCommand: { - command: 'reload', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.reload); - sendToSocket(); - storeToStorage(); - basicBot.disconnectAPI(); - kill(); - setTimeout(function () { - $.getScript(basicBot.scriptLink); - }, 2000); - } - } - }, - - removeCommand: { - command: 'remove', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length > cmd.length + 2) { - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user !== 'boolean') { - user.lastDC = { - time: null, - position: null, - songCount: 0 - }; - if (API.getDJ().id === user.id) { - API.moderateForceSkip(); - setTimeout(function () { - API.moderateRemoveDJ(user.id); - }, 1 * 1000, user); - } - else API.moderateRemoveDJ(user.id); - } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); - } else API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - } - } - }, - - restrictetaCommand: { - command: 'restricteta', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.etaRestriction) { - basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.etarestriction})); - } - else { - basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.etarestriction})); - } - } - } - }, - - rouletteCommand: { - command: 'roulette', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (!basicBot.room.roulette.rouletteStatus) { - basicBot.room.roulette.startRoulette(); - } - } - } - }, - - rulesCommand: { - command: 'rules', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.rulesLink === "string") - return API.sendChat(subChat(basicBot.chat.roomrules, {link: basicBot.settings.rulesLink})); - } - } - }, - - sessionstatsCommand: { - command: 'sessionstats', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var from = chat.un; - var woots = basicBot.room.roomstats.totalWoots; - var mehs = basicBot.room.roomstats.totalMehs; - var grabs = basicBot.room.roomstats.totalCurates; - API.sendChat(subChat(basicBot.chat.sessionstats, {name: from, woots: woots, mehs: mehs, grabs: grabs})); - } - } - }, - - skipCommand: { - command: ['skip', 'smartskip'], - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.skippable) { - - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - var dj = API.getDJ(); - var name = dj.username; - var msgSend = '@' + name + ', '; - - if (chat.message.length === cmd.length) { - API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); - } - else { - API.moderateForceSkip(); - } - } - var validReason = false; - var msg = chat.message; - var reason = msg.substring(cmd.length + 1); - for (var i = 0; i < basicBot.settings.skipReasons.length; i++) { - var r = basicBot.settings.skipReasons[i][0]; - if (reason.indexOf(r) !== -1) { - validReason = true; - msgSend += basicBot.settings.skipReasons[i][1]; - } - } - if (validReason) { - API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(msgSend); - } - else { - API.moderateForceSkip(); - setTimeout(function () { - API.sendChat(msgSend); - }, 500); - } - } - } - } - } - }, - - skipposCommand: { - command: 'skippos', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var pos = msg.substring(cmd.length + 1); - if (!isNaN(pos)) { - basicBot.settings.skipPosition = pos; - return API.sendChat(subChat(basicBot.chat.skippos, {name: chat.un, position: basicBot.settings.skipPosition})); - } - else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); - } - } - }, - - songstatsCommand: { - command: 'songstats', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.songstats) { - basicBot.settings.songstats = !basicBot.settings.songstats; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.songstats})); - } - else { - basicBot.settings.songstats = !basicBot.settings.songstats; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.songstats})); - } - } - } - }, - - sourceCommand: { - command: 'source', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat('/me This bot was created by ' + botCreator + ', but is now maintained by ' + botMaintainer + "."); - } - } - }, - - statusCommand: { - command: 'status', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var from = chat.un; - var msg = '[@' + from + '] '; - - msg += basicBot.chat.afkremoval + ': '; - if (basicBot.settings.afkRemoval) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - msg += basicBot.chat.afksremoved + ": " + basicBot.room.afkList.length + '. '; - msg += basicBot.chat.afklimit + ': ' + basicBot.settings.maximumAfk + '. '; - - msg += 'Bouncer+: '; - if (basicBot.settings.bouncerPlus) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.blacklist + ': '; - if (basicBot.settings.blacklistEnabled) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.lockguard + ': '; - if (basicBot.settings.lockGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.cycleguard + ': '; - if (basicBot.settings.cycleGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.timeguard + ': '; - if (basicBot.settings.timeGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.chatfilter + ': '; - if (basicBot.settings.filterChat) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.historyskip + ': '; - if (basicBot.settings.historySkip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.voteskip + ': '; - if (basicBot.settings.voteSkip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.cmddeletion + ': '; - if (basicBot.settings.cmdDeletion) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.autoskip + ': '; - if (basicBot.settings.autoskip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - // TODO: Display more toggleable bot settings. - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - var since = basicBot.roomUtilities.msToStr(durationOnline); - msg += subChat(basicBot.chat.activefor, {time: since}); - - /* - // least efficient way to go about this, but it works :) - if (msg.length > 256){ - firstpart = msg.substr(0, 256); - secondpart = msg.substr(256); - API.sendChat(firstpart); - setTimeout(function () { - API.sendChat(secondpart); - }, 300); - } - else { - API.sendChat(msg); - } - */ - - // This is a more efficient solution - if (msg.length > 241){ - var split = msg.match(/.{1,241}/g); - for (var i = 0; i < split.length; i++) { - var func = function(index) { - setTimeout(function() { - API.sendChat("/me " + split[index]); - }, 500 * index); - } - func(i); - } - } - else { - return API.sendChat(msg); - } - } - } - }, - - swapCommand: { - command: 'swap', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var firstSpace = msg.indexOf(' '); - var lastSpace = msg.lastIndexOf(' '); - var name1 = msg.substring(cmd.length + 2, lastSpace); - var name2 = msg.substring(lastSpace + 2); - var user1 = basicBot.userUtilities.lookupUserName(name1); - var user2 = basicBot.userUtilities.lookupUserName(name2); - if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); - if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); - var p1 = API.getWaitListPosition(user1.id) + 1; - var p2 = API.getWaitListPosition(user2.id) + 1; - if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); - API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); - if (p1 < p2) { - basicBot.userUtilities.moveUser(user2.id, p1, false); - setTimeout(function (user1, p2) { - basicBot.userUtilities.moveUser(user1.id, p2, false); - }, 2000, user1, p2); - } - else { - basicBot.userUtilities.moveUser(user1.id, p2, false); - setTimeout(function (user2, p1) { - basicBot.userUtilities.moveUser(user2.id, p1, false); - }, 2000, user2, p1); - } - } - } - }, - - themeCommand: { - command: 'theme', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.themeLink === "string") - API.sendChat(subChat(basicBot.chat.genres, {link: basicBot.settings.themeLink})); - } - } - }, - - timeguardCommand: { - command: 'timeguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.timeGuard) { - basicBot.settings.timeGuard = !basicBot.settings.timeGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.timeguard})); - } - else { - basicBot.settings.timeGuard = !basicBot.settings.timeGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.timeguard})); - } - - } - } - }, - - toggleblCommand: { - command: 'togglebl', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var temp = basicBot.settings.blacklistEnabled; - basicBot.settings.blacklistEnabled = !temp; - if (basicBot.settings.blacklistEnabled) { - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.blacklist})); - } - else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.blacklist})); - } - } - }, - - togglemotdCommand: { - command: 'togglemotd', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.motdEnabled) { - basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.motd})); - } - else { - basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.motd})); - } - } - } - }, - - togglevoteskipCommand: { - command: 'togglevoteskip', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.voteSkip) { - basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); - } - else { - basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); - } - } + else { + basicBot.settings.timeGuard = !basicBot.settings.timeGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.timeguard})); } - }, - unbanCommand: { - command: 'unban', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - $(".icon-population").click(); - $(".icon-ban").click(); - setTimeout(function (chat) { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(); - var name = msg.substring(cmd.length + 2); - var bannedUsers = API.getBannedUsers(); - var found = false; - var bannedUser = null; - for (var i = 0; i < bannedUsers.length; i++) { - var user = bannedUsers[i]; - if (user.username === name) { - bannedUser = user; - found = true; - } - } - if (!found) { - $(".icon-chat").click(); - return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); - } - API.moderateUnbanUser(bannedUser.id); - console.log("Unbanned " + name); - setTimeout(function () { - $(".icon-chat").click(); - }, 1000); - }, 1000, chat); - } + } + } + }, + + toggleblCommand: { + command: 'togglebl', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var temp = basicBot.settings.blacklistEnabled; + basicBot.settings.blacklistEnabled = !temp; + if (basicBot.settings.blacklistEnabled) { + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.blacklist})); + } + else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.blacklist})); + } + } + }, + + togglemotdCommand: { + command: 'togglemotd', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.motdEnabled) { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.motd})); } - }, - - unlockCommand: { - command: 'unlock', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.booth.unlockBooth(); - } + else { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.motd})); } - }, - - unmuteCommand: { - command: 'unmute', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - /** - if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { - if (permFrom > 2) { - basicBot.room.mutedUsers = []; - return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); - } - else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); - } - **/ - var from = chat.un; - var name = msg.substr(cmd.length + 2); - - var user = basicBot.userUtilities.lookupUserName(name); - - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - - var permUser = basicBot.userUtilities.getPermission(user.id); - if (permFrom > permUser) { - /* - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === user.id) { - indexMuted = i; - wasMuted = true; - } - - } - if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); - basicBot.room.mutedUsers.splice(indexMuted); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - */ - try { - API.moderateUnmuteUser(user.id); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - catch (e) { - API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); - } - } - else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); - } + } + } + }, + + togglevoteskipCommand: { + command: 'togglevoteskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.voteSkip) { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); } - }, - - usercmdcdCommand: { - command: 'usercmdcd', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var cd = msg.substring(cmd.length + 1); - if (!isNaN(cd)) { - basicBot.settings.commandCooldown = cd; - return API.sendChat(subChat(basicBot.chat.commandscd, {name: chat.un, time: basicBot.settings.commandCooldown})); - } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } + else { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); } - }, - - usercommandsCommand: { - command: 'usercommands', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.usercommandsEnabled) { - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.usercommands})); - basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; - } - else { - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.usercommands})); - basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; - } - } + } + } + }, + + unbanCommand: { + command: 'unban', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + $(".icon-population").click(); + $(".icon-ban").click(); + setTimeout(function (chat) { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(); + var name = msg.substring(cmd.length + 2); + var bannedUsers = API.getBannedUsers(); + var found = false; + var bannedUser = null; + for (var i = 0; i < bannedUsers.length; i++) { + var user = bannedUsers[i]; + if (user.username === name) { + bannedUser = user; + found = true; + } + } + if (!found) { + $(".icon-chat").click(); + return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); + } + API.moderateUnbanUser(bannedUser.id); + console.log("Unbanned " + name); + setTimeout(function () { + $(".icon-chat").click(); + }, 1000); + }, 1000, chat); + } + } + }, + + unlockCommand: { + command: 'unlock', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.booth.unlockBooth(); + } + } + }, + + unmuteCommand: { + command: 'unmute', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + /** + if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { + if (permFrom > 2) { + basicBot.room.mutedUsers = []; + return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); + } + else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); + } + **/ + var from = chat.un; + var name = msg.substr(cmd.length + 2); + + var user = basicBot.userUtilities.lookupUserName(name); + + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permFrom > permUser) { + /* + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === user.id) { + indexMuted = i; + wasMuted = true; + } + + } + if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + basicBot.room.mutedUsers.splice(indexMuted); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + */ + try { + API.moderateUnmuteUser(user.id); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + catch (e) { + API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + } + } + else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); + } + } + }, + + usercmdcdCommand: { + command: 'usercmdcd', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var cd = msg.substring(cmd.length + 1); + if (!isNaN(cd)) { + basicBot.settings.commandCooldown = cd; + return API.sendChat(subChat(basicBot.chat.commandscd, {name: chat.un, time: basicBot.settings.commandCooldown})); } - }, - - voteratioCommand: { - command: 'voteratio', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false) return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var vratio = user.votes; - var ratio = vratio.woot / vratio.meh; - API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woot: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); - } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + usercommandsCommand: { + command: 'usercommands', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.usercommandsEnabled) { + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.usercommands})); + basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; } - }, - - voteskipCommand: { - command: 'voteskip', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); - var argument = msg.substring(cmd.length + 1); - if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - if (isNaN(argument)) { - API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); - } - else { - basicBot.settings.voteSkipLimit = argument; - API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); - } - } + else { + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.usercommands})); + basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; } - }, - - welcomeCommand: { - command: 'welcome', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.welcome) { - basicBot.settings.welcome = !basicBot.settings.welcome; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); - } - else { - basicBot.settings.welcome = !basicBot.settings.welcome; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.welcomemsg})); - } - } + } + } + }, + + voteratioCommand: { + command: 'voteratio', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false) return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var vratio = user.votes; + var ratio = vratio.woot / vratio.meh; + API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woot: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); + } + } + }, + + voteskipCommand: { + command: 'voteskip', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + if (isNaN(argument)) { + API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); } - }, - - websiteCommand: { - command: 'website', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.website === "string") - API.sendChat(subChat(basicBot.chat.website, {link: basicBot.settings.website})); - } + else { + basicBot.settings.voteSkipLimit = argument; + API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); } - }, - - whoisCommand: { - command: 'whois', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substr(cmd.length + 2); - } - users = API.getUsers(); - var len = users.length; - for (var i = 0; i < len; ++i){ - if (users[i].username == name){ - var id = users[i].id; - var avatar = API.getUser(id).avatarID; - var level = API.getUser(id).level; - var rawjoined = API.getUser(id).joined; - var joined = rawjoined.substr(0, 10); - var rawlang = API.getUser(id).language; - if (rawlang == "en"){ - var language = "English"; - } else if (rawlang == "bg"){ - var language = "Bulgarian"; - } else if (rawlang == "cs"){ - var language = "Czech"; - } else if (rawlang == "fi"){ - var language = "Finnish" - } else if (rawlang == "fr"){ - var language = "French" - } else if (rawlang == "pt"){ - var language = "Portuguese" - } else if (rawlang == "zh"){ - var language = "Chinese" - } else if (rawlang == "sk"){ - var language = "Slovak" - } else if (rawlang == "nl"){ - var language = "Dutch" - } else if (rawlang == "ms"){ - var language = "Malay" - } - var rawrank = API.getUser(id).role; - if (rawrank == "0"){ - var rank = "User"; - } else if (rawrank == "1"){ - var rank = "Resident DJ"; - } else if (rawrank == "2"){ - var rank = "Bouncer"; - } else if (rawrank == "3"){ - var rank = "Manager" - } else if (rawrank == "4"){ - var rank = "Co-Host" - } else if (rawrank == "5"){ - var rank = "Host" - } else if (rawrank == "7"){ - var rank = "Brand Ambassador" - } else if (rawrank == "10"){ - var rank = "Admin" - } - var slug = API.getUser(id).slug; - if (typeof slug !== 'undefined') { - var profile = "https://plug.dj/@/" + slug; - } else { - var profile = "~"; - } - - API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, joined: joined, rank: rank})); - } - } - } + } + } + }, + + welcomeCommand: { + command: 'welcome', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.welcome) { + basicBot.settings.welcome = !basicBot.settings.welcome; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); } - }, - - youtubeCommand: { - command: 'youtube', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.youtubeLink === "string") - API.sendChat(subChat(basicBot.chat.youtube, {name: chat.un, link: basicBot.settings.youtubeLink})); - } + else { + basicBot.settings.welcome = !basicBot.settings.welcome; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.welcomemsg})); } + } + } + }, + + websiteCommand: { + command: 'website', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.website === "string") + API.sendChat(subChat(basicBot.chat.website, {link: basicBot.settings.website})); + } } + }, + + whoisCommand: { + command: 'whois', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substr(cmd.length + 2); + } + users = API.getUsers(); + var len = users.length; + for (var i = 0; i < len; ++i){ + if (users[i].username == name){ + var id = users[i].id; + var avatar = API.getUser(id).avatarID; + var level = API.getUser(id).level; + var rawjoined = API.getUser(id).joined; + var joined = rawjoined.substr(0, 10); + var rawlang = API.getUser(id).language; + if (rawlang == "en"){ + var language = "English"; + } else if (rawlang == "bg"){ + var language = "Bulgarian"; + } else if (rawlang == "cs"){ + var language = "Czech"; + } else if (rawlang == "fi"){ + var language = "Finnish" + } else if (rawlang == "fr"){ + var language = "French" + } else if (rawlang == "pt"){ + var language = "Portuguese" + } else if (rawlang == "zh"){ + var language = "Chinese" + } else if (rawlang == "sk"){ + var language = "Slovak" + } else if (rawlang == "nl"){ + var language = "Dutch" + } else if (rawlang == "ms"){ + var language = "Malay" + } + var rawrank = API.getUser(id).role; + if (rawrank == "0"){ + var rank = "User"; + } else if (rawrank == "1"){ + var rank = "Resident DJ"; + } else if (rawrank == "2"){ + var rank = "Bouncer"; + } else if (rawrank == "3"){ + var rank = "Manager" + } else if (rawrank == "4"){ + var rank = "Co-Host" + } else if (rawrank == "5"){ + var rank = "Host" + } else if (rawrank == "7"){ + var rank = "Brand Ambassador" + } else if (rawrank == "10"){ + var rank = "Admin" + } + var slug = API.getUser(id).slug; + if (typeof slug !== 'undefined') { + var profile = "https://plug.dj/@/" + slug; + } else { + var profile = "~"; + } + + API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, joined: joined, rank: rank})); + } + } + } + } + }, + + youtubeCommand: { + command: 'youtube', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.youtubeLink === "string") + API.sendChat(subChat(basicBot.chat.youtube, {name: chat.un, link: basicBot.settings.youtubeLink})); + } + } + } } - }; + }; - loadChat(basicBot.startup); -}).call(this); + loadChat(basicBot.startup); + }).call(this); From 7c0b2d7dcc5ee2cd63616c2f7486b507f1ef5f4c Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 14 Jul 2015 02:17:59 +0100 Subject: [PATCH 198/281] Revert "Cleaned up indentation" This reverts commit 0790f4a77d9aaaac7b584d938277664916bf8ee2. --- basicBot.js | 6986 +++++++++++++++++++++++++-------------------------- 1 file changed, 3493 insertions(+), 3493 deletions(-) diff --git a/basicBot.js b/basicBot.js index 9d07033a..527e4a7a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1,3645 +1,3645 @@ /** -*Copyright 2014 ***REMOVED*** -*Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. -*This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. -*/ + *Copyright 2014 ***REMOVED*** + *Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. + *This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. + */ (function () { - /*window.onerror = function() { - var room = JSON.parse(localStorage.getItem("basicBotRoom")); - window.location = 'https://plug.dj' + room.name; - };*/ + /*window.onerror = function() { + var room = JSON.parse(localStorage.getItem("basicBotRoom")); + window.location = 'https://plug.dj' + room.name; + };*/ - API.getWaitListPosition = function(id){ - if(typeof id === 'undefined' || id === null){ - id = API.getUser().id; - } - var wl = API.getWaitList(); - for(var i = 0; i < wl.length; i++){ - if(wl[i].id === id){ - return i; - } - } - return -1; - }; - - var kill = function () { - clearInterval(basicBot.room.autodisableInterval); - clearInterval(basicBot.room.afkInterval); - basicBot.status = false; - }; - - // This socket server is used solely for statistical and troubleshooting purposes. - // This server may not always be up, but will be used to get live data at any given time. - - var socket = function () { - function loadSocket() { - SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; - sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); - sock.onopen = function() { - console.log('Connected to socket!'); - sendToSocket(); - }; - sock.onclose = function() { - console.log('Disconnected from socket, reconnecting every minute ..'); - var reconnect = setTimeout(function(){ loadSocket() }, 60 * 1000); - }; - sock.onmessage = function(broadcast) { - var rawBroadcast = broadcast.data; - var broadcastMessage = rawBroadcast.replace(/["\\]+/g, ''); - API.chatLog(broadcastMessage); - console.log(broadcastMessage); - }; - } - if (typeof SockJS == 'undefined') { - $.getScript('https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js', loadSocket); - } else loadSocket(); - } - - var sendToSocket = function () { - var basicBotSettings = basicBot.settings; - var basicBotRoom = basicBot.room; - var basicBotInfo = { - time: Date.now(), - version: basicBot.version - }; - var data = {users:API.getUsers(),userinfo:API.getUser(),room:location.pathname,basicBotSettings:basicBotSettings,basicBotRoom:basicBotRoom,basicBotInfo:basicBotInfo}; - return sock.msg(data); - }; - - var storeToStorage = function () { - localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); - localStorage.setItem("basicBotRoom", JSON.stringify(basicBot.room)); - var basicBotStorageInfo = { - time: Date.now(), - stored: true, - version: basicBot.version + API.getWaitListPosition = function(id){ + if(typeof id === 'undefined' || id === null){ + id = API.getUser().id; + } + var wl = API.getWaitList(); + for(var i = 0; i < wl.length; i++){ + if(wl[i].id === id){ + return i; + } + } + return -1; }; - localStorage.setItem("basicBotStorageInfo", JSON.stringify(basicBotStorageInfo)); - - }; - var subChat = function (chat, obj) { - if (typeof chat === "undefined") { - API.chatLog("There is a chat text missing."); - console.log("There is a chat text missing."); - return "[Error] No text message found."; - - // TODO: Get missing chat messages from source. - } - var lit = '%%'; - for (var prop in obj) { - chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); - } - return chat; - }; - - var loadChat = function (cb) { - if (!cb) cb = function () { + var kill = function () { + clearInterval(basicBot.room.autodisableInterval); + clearInterval(basicBot.room.afkInterval); + basicBot.status = false; }; - $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { - var link = basicBot.chatLink; - if (json !== null && typeof json !== "undefined") { - langIndex = json; - link = langIndex[basicBot.settings.language.toLowerCase()]; - if (basicBot.settings.chatLink !== basicBot.chatLink) { - link = basicBot.settings.chatLink; - } - else { - if (typeof link === "undefined") { - link = basicBot.chatLink; - } - } - $.get(link, function (json) { - if (json !== null && typeof json !== "undefined") { - if (typeof json === "string") json = JSON.parse(json); - basicBot.chat = json; - cb(); - } - }); - } - else { - $.get(basicBot.chatLink, function (json) { - if (json !== null && typeof json !== "undefined") { - if (typeof json === "string") json = JSON.parse(json); - basicBot.chat = json; - cb(); - } - }); - } - }); - }; - - var retrieveSettings = function () { - var settings = JSON.parse(localStorage.getItem("basicBotsettings")); - if (settings !== null) { - for (var prop in settings) { - basicBot.settings[prop] = settings[prop]; - } - } - }; - - var retrieveFromStorage = function () { - var info = localStorage.getItem("basicBotStorageInfo"); - if (info === null) API.chatLog(basicBot.chat.nodatafound); - else { - var settings = JSON.parse(localStorage.getItem("basicBotsettings")); - var room = JSON.parse(localStorage.getItem("basicBotRoom")); - var elapsed = Date.now() - JSON.parse(info).time; - if ((elapsed < 1 * 60 * 60 * 1000)) { - API.chatLog(basicBot.chat.retrievingdata); - for (var prop in settings) { - basicBot.settings[prop] = settings[prop]; - } - basicBot.room.users = room.users; - basicBot.room.afkList = room.afkList; - basicBot.room.historyList = room.historyList; - basicBot.room.mutedUsers = room.mutedUsers; - //basicBot.room.autoskip = room.autoskip; - basicBot.room.roomstats = room.roomstats; - basicBot.room.messages = room.messages; - basicBot.room.queue = room.queue; - basicBot.room.newBlacklisted = room.newBlacklisted; - API.chatLog(basicBot.chat.datarestored); - } - } - var json_sett = null; - var roominfo = document.getElementById("room-settings"); - info = roominfo.textContent; - var ref_bot = "@basicBot="; - var ind_ref = info.indexOf(ref_bot); - if (ind_ref > 0) { - var link = info.substring(ind_ref + ref_bot.length, info.length); - var ind_space = null; - if (link.indexOf(" ") < link.indexOf("\n")) ind_space = link.indexOf(" "); - else ind_space = link.indexOf("\n"); - link = link.substring(0, ind_space); - $.get(link, function (json) { - if (json !== null && typeof json !== "undefined") { - json_sett = JSON.parse(json); - for (var prop in json_sett) { - basicBot.settings[prop] = json_sett[prop]; - } - } - }); - } - }; + // This socket server is used solely for statistical and troubleshooting purposes. + // This server may not always be up, but will be used to get live data at any given time. - String.prototype.splitBetween = function (a, b) { - var self = this; - self = this.split(a); - for (var i = 0; i < self.length; i++) { - self[i] = self[i].split(b); - } - var arr = []; - for (var i = 0; i < self.length; i++) { - if (Array.isArray(self[i])) { - for (var j = 0; j < self[i].length; j++) { - arr.push(self[i][j]); + var socket = function () { + function loadSocket() { + SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; + sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); + sock.onopen = function() { + console.log('Connected to socket!'); + sendToSocket(); + }; + sock.onclose = function() { + console.log('Disconnected from socket, reconnecting every minute ..'); + var reconnect = setTimeout(function(){ loadSocket() }, 60 * 1000); + }; + sock.onmessage = function(broadcast) { + var rawBroadcast = broadcast.data; + var broadcastMessage = rawBroadcast.replace(/["\\]+/g, ''); + API.chatLog(broadcastMessage); + console.log(broadcastMessage); + }; } - } - else arr.push(self[i]); + if (typeof SockJS == 'undefined') { + $.getScript('https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js', loadSocket); + } else loadSocket(); } - return arr; - }; - - String.prototype.startsWith = function(str) { - return this.substring(0, str.length) === str; - }; - - var linkFixer = function (msg) { - var parts = msg.splitBetween(' -1) return 10; - } - if (u.gRole < 2) return u.role; - else { - switch (u.gRole) { - case 2: - return 7; - case 3: - return 8; - case 4: - return 9; - case 5: - return 10; - } - } - return 0; - }, - moveUser: function (id, pos, priority) { - var user = basicBot.userUtilities.lookupUser(id); - var wlist = API.getWaitList(); - if (API.getWaitListPosition(id) === -1) { - if (wlist.length < 50) { - API.moderateAddDJ(id); - if (pos !== 0) setTimeout(function (id, pos) { - API.moderateMoveDJ(id, pos); - }, 1250, id, pos); - } - else { - var alreadyQueued = -1; - for (var i = 0; i < basicBot.room.queue.id.length; i++) { - if (basicBot.room.queue.id[i] === id) alreadyQueued = i; - } - if (alreadyQueued !== -1) { - basicBot.room.queue.position[alreadyQueued] = pos; - return API.sendChat(subChat(basicBot.chat.alreadyadding, {position: basicBot.room.queue.position[alreadyQueued]})); - } - basicBot.roomUtilities.booth.lockBooth(); - if (priority) { - basicBot.room.queue.id.unshift(id); - basicBot.room.queue.position.unshift(pos); - } - else { - basicBot.room.queue.id.push(id); - basicBot.room.queue.position.push(pos); - } - var name = user.username; - return API.sendChat(subChat(basicBot.chat.adding, {name: name, position: basicBot.room.queue.position.length})); - } - } - else API.moderateMoveDJ(id, pos); - }, - dclookup: function (id) { - var user = basicBot.userUtilities.lookupUser(id); - if (typeof user === 'boolean') return basicBot.chat.usernotfound; - var name = user.username; - if (user.lastDC.time === null) return subChat(basicBot.chat.notdisconnected, {name: name}); - var dc = user.lastDC.time; - var pos = user.lastDC.position; - if (pos === null) return basicBot.chat.noposition; - var timeDc = Date.now() - dc; - var validDC = false; - if (basicBot.settings.maximumDc * 60 * 1000 > timeDc) { - validDC = true; - } - var time = basicBot.roomUtilities.msToStr(timeDc); - if (!validDC) return (subChat(basicBot.chat.toolongago, {name: basicBot.userUtilities.getUser(user).username, time: time})); - var songsPassed = basicBot.room.roomstats.songCount - user.lastDC.songCount; - var afksRemoved = 0; - var afkList = basicBot.room.afkList; - for (var i = 0; i < afkList.length; i++) { - var timeAfk = afkList[i][1]; - var posAfk = afkList[i][2]; - if (dc < timeAfk && posAfk < pos) { - afksRemoved++; - } - } - var newPosition = user.lastDC.position - songsPassed - afksRemoved; - if (newPosition <= 0) return subChat(basicBot.chat.notdisconnected, {name: name}); - var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); - basicBot.userUtilities.moveUser(user.id, newPosition, true); - return msg; - } - }, - - roomUtilities: { - rankToNumber: function (rankString) { - var rankInt = null; - switch (rankString) { - case "admin": - rankInt = 10; - break; - case "ambassador": - rankInt = 7; - break; - case "host": - rankInt = 5; - break; - case "cohost": - rankInt = 4; - break; - case "manager": - rankInt = 3; - break; - case "bouncer": - rankInt = 2; - break; - case "residentdj": - rankInt = 1; - break; - case "user": - rankInt = 0; - break; - } - return rankInt; - }, - msToStr: function (msTime) { - var ms, msg, timeAway; - msg = ''; - timeAway = { - 'days': 0, - 'hours': 0, - 'minutes': 0, - 'seconds': 0 + + var sendToSocket = function () { + var basicBotSettings = basicBot.settings; + var basicBotRoom = basicBot.room; + var basicBotInfo = { + time: Date.now(), + version: basicBot.version }; - ms = { - 'day': 24 * 60 * 60 * 1000, - 'hour': 60 * 60 * 1000, - 'minute': 60 * 1000, - 'second': 1000 + var data = {users:API.getUsers(),userinfo:API.getUser(),room:location.pathname,basicBotSettings:basicBotSettings,basicBotRoom:basicBotRoom,basicBotInfo:basicBotInfo}; + return sock.msg(data); + }; + + var storeToStorage = function () { + localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); + localStorage.setItem("basicBotRoom", JSON.stringify(basicBot.room)); + var basicBotStorageInfo = { + time: Date.now(), + stored: true, + version: basicBot.version }; - 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.minutes < 1 && timeAway.hours < 1 && timeAway.days < 1) { - msg += timeAway.seconds.toString() + 's'; - } - if (msg !== '') { - return msg; - } else { - return false; + localStorage.setItem("basicBotStorageInfo", JSON.stringify(basicBotStorageInfo)); + + }; + + var subChat = function (chat, obj) { + if (typeof chat === "undefined") { + API.chatLog("There is a chat text missing."); + console.log("There is a chat text missing."); + return "[Error] No text message found."; + + // TODO: Get missing chat messages from source. } - }, - booth: { - lockTimer: setTimeout(function () { - }, 1000), - locked: false, - lockBooth: function () { - API.moderateLockWaitList(!basicBot.roomUtilities.booth.locked); - basicBot.roomUtilities.booth.locked = false; - if (basicBot.settings.lockGuard) { - basicBot.roomUtilities.booth.lockTimer = setTimeout(function () { - API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); - }, basicBot.settings.maximumLocktime * 60 * 1000); - } - }, - unlockBooth: function () { - API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); - clearTimeout(basicBot.roomUtilities.booth.lockTimer); + var lit = '%%'; + for (var prop in obj) { + chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); } - }, - afkCheck: function () { - if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); - var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); - var djlist = API.getWaitList(); - var lastPos = Math.min(djlist.length, basicBot.settings.afkpositionCheck); - if (lastPos - 1 > djlist.length) return void (0); - for (var i = 0; i < lastPos; i++) { - if (typeof djlist[i] !== 'undefined') { - var id = djlist[i].id; - var user = basicBot.userUtilities.lookupUser(id); - if (typeof user !== 'boolean') { - var plugUser = basicBot.userUtilities.getUser(user); - if (rank !== null && basicBot.userUtilities.getPermission(plugUser) <= rank) { - var name = plugUser.username; - var lastActive = basicBot.userUtilities.getLastActivity(user); - var inactivity = Date.now() - lastActive; - var time = basicBot.roomUtilities.msToStr(inactivity); - var warncount = user.afkWarningCount; - if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { - if (warncount === 0) { - API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); - user.afkWarningCount = 3; - user.afkCountdown = setTimeout(function (userToChange) { - userToChange.afkWarningCount = 1; - }, 90 * 1000, user); - } - else if (warncount === 1) { - API.sendChat(subChat(basicBot.chat.warning2, {name: name})); - user.afkWarningCount = 3; - user.afkCountdown = setTimeout(function (userToChange) { - userToChange.afkWarningCount = 2; - }, 30 * 1000, user); - } - else if (warncount === 2) { - var pos = API.getWaitListPosition(id); - if (pos !== -1) { - pos++; - basicBot.room.afkList.push([id, Date.now(), pos]); - user.lastDC = { + return chat; + }; - time: null, - position: null, - songCount: 0 - }; - API.moderateRemoveDJ(id); - API.sendChat(subChat(basicBot.chat.afkremove, {name: name, time: time, position: pos, maximumafk: basicBot.settings.maximumAfk})); + var loadChat = function (cb) { + if (!cb) cb = function () { + }; + $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { + var link = basicBot.chatLink; + if (json !== null && typeof json !== "undefined") { + langIndex = json; + link = langIndex[basicBot.settings.language.toLowerCase()]; + if (basicBot.settings.chatLink !== basicBot.chatLink) { + link = basicBot.settings.chatLink; + } + else { + if (typeof link === "undefined") { + link = basicBot.chatLink; } - user.afkWarningCount = 0; - } } - } - } - } - } - }, - smartSkip: function (reason) { - var dj = API.getDJ(); - var id = dj.id; - var waitlistlength = API.getWaitList().length; - var locked = false; - basicBot.room.queueable = false; - - if (waitlistlength == 50) { - basicBot.roomUtilities.booth.lockBooth(); - locked = true; - } - setTimeout(function (id) { - API.moderateForceSkip(); - setTimeout(function () { - if (typeof reason !== 'undefined') { - API.sendChat(reason); + $.get(link, function (json) { + if (json !== null && typeof json !== "undefined") { + if (typeof json === "string") json = JSON.parse(json); + basicBot.chat = json; + cb(); + } + }); } - }, 500); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.skipPosition, false); - basicBot.room.queueable = true; - if (locked) { - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); + else { + $.get(basicBot.chatLink, function (json) { + if (json !== null && typeof json !== "undefined") { + if (typeof json === "string") json = JSON.parse(json); + basicBot.chat = json; + cb(); + } + }); } - }, 1500, id); - }, 1000, id); - }, - changeDJCycle: function () { - var toggle = $(".cycle-toggle"); - if (toggle.hasClass("disabled")) { - toggle.click(); - if (basicBot.settings.cycleGuard) { - basicBot.room.cycleTimer = setTimeout(function () { - if (toggle.hasClass("enabled")) toggle.click(); - }, basicBot.settings.cycleMaxTime * 60 * 1000); - } - } - else { - toggle.click(); - clearTimeout(basicBot.room.cycleTimer); - } + }); + }; - // TODO: Use API.moderateDJCycle(true/false) - }, - intervalMessage: function () { - var interval; - if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; - else interval = basicBot.settings.messageInterval; - if ((basicBot.room.roomstats.songCount % interval) === 0 && basicBot.status) { - var msg; - if (basicBot.settings.motdEnabled) { - msg = basicBot.settings.motd; - } - else { - if (basicBot.settings.intervalMessages.length === 0) return void (0); - var messageNumber = basicBot.room.roomstats.songCount % basicBot.settings.intervalMessages.length; - msg = basicBot.settings.intervalMessages[messageNumber]; - } - API.sendChat('/me ' + msg); - } - }, - updateBlacklists: function () { - for (var bl in basicBot.settings.blacklists) { - basicBot.room.blacklists[bl] = []; - if (typeof basicBot.settings.blacklists[bl] === 'function') { - basicBot.room.blacklists[bl] = basicBot.settings.blacklists(); - } - else if (typeof basicBot.settings.blacklists[bl] === 'string') { - if (basicBot.settings.blacklists[bl] === '') { - continue; + var retrieveSettings = function () { + var settings = JSON.parse(localStorage.getItem("basicBotsettings")); + if (settings !== null) { + for (var prop in settings) { + basicBot.settings[prop] = settings[prop]; } - try { - (function (l) { - $.get(basicBot.settings.blacklists[l], function (data) { - if (typeof data === 'string') { - data = JSON.parse(data); - } - var list = []; - for (var prop in data) { - if (typeof data[prop].mid !== 'undefined') { - list.push(data[prop].mid); - } - } - basicBot.room.blacklists[l] = list; - }) - })(bl); - } - catch (e) { - API.chatLog('Error setting' + bl + 'blacklist.'); - console.log('Error setting' + bl + 'blacklist.'); - console.log(e); - } - } - } - }, - logNewBlacklistedSongs: function () { - if (typeof console.table !== 'undefined') { - console.table(basicBot.room.newBlacklisted); - } - else { - console.log(basicBot.room.newBlacklisted); - } - }, - exportNewBlacklistedSongs: function () { - var list = {}; - for (var i = 0; i < basicBot.room.newBlacklisted.length; i++) { - var track = basicBot.room.newBlacklisted[i]; - list[track.list] = []; - list[track.list].push({ - title: track.title, - author: track.author, - mid: track.mid - }); - } - return list; - } - }, - eventChat: function (chat) { - chat.message = linkFixer(chat.message); - chat.message = decodeEntities(chat.message); - chat.message = chat.message.trim(); - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === chat.uid) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); - if (basicBot.room.users[i].username !== chat.un) { - basicBot.room.users[i].username = chat.un; - } - } - } - if (basicBot.chatUtilities.chatFilter(chat)) return void (0); - if (!basicBot.chatUtilities.commandCheck(chat)) - basicBot.chatUtilities.action(chat); - }, - eventUserjoin: function (user) { - var known = false; - var index = null; - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === user.id) { - known = true; - index = i; - } - } - var greet = true; - var welcomeback = null; - if (known) { - basicBot.room.users[index].inRoom = true; - var u = basicBot.userUtilities.lookupUser(user.id); - var jt = u.jointime; - var t = Date.now() - jt; - if (t < 10 * 1000) greet = false; - else welcomeback = true; - } - else { - basicBot.room.users.push(new basicBot.User(user.id, user.username)); - welcomeback = false; - } - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === user.id) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); - basicBot.room.users[j].jointime = Date.now(); - } - - } - if (basicBot.settings.welcome && greet) { - welcomeback ? - setTimeout(function (user) { - API.sendChat(subChat(basicBot.chat.welcomeback, {name: user.username})); - }, 1 * 1000, user) - : - setTimeout(function (user) { - API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); - }, 1 * 1000, user); - } - }, - eventUserleave: function (user) { - var lastDJ = API.getHistory()[0].user.id; - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === user.id) { - basicBot.userUtilities.updateDC(basicBot.room.users[i]); - basicBot.room.users[i].inRoom = false; - if (lastDJ == user.id){ - var user = basicBot.userUtilities.lookupUser(basicBot.room.users[i].id); - basicBot.userUtilities.updatePosition(user, 0); - user.lastDC.time = null; - user.lastDC.position = user.lastKnownPosition; - } - } - } - }, - eventVoteupdate: function (obj) { - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === obj.user.id) { - if (obj.vote === 1) { - basicBot.room.users[i].votes.woot++; - } - else { - basicBot.room.users[i].votes.meh++; - } - } - } - - var mehs = API.getScore().negative; - var woots = API.getScore().positive; - var dj = API.getDJ(); - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - - if (basicBot.settings.voteSkip) { - if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { - API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); - } - else { - API.moderateForceSkip(); - } - } - } - - }, - eventCurateupdate: function (obj) { - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === obj.user.id) { - basicBot.room.users[i].votes.curate++; } - } - }, - eventDjadvance: function (obj) { - if (basicBot.settings.autowoot) { - $("#woot").click(); // autowoot - } - - var user = basicBot.userUtilities.lookupUser(obj.dj.id) - for(var i = 0; i < basicBot.room.users.length; i++){ - if(basicBot.room.users[i].id === user.id){ - basicBot.room.users[i].lastDC = { - time: null, - position: null, - songCount: 0 - }; - } - } + }; - var lastplay = obj.lastPlay; - if (typeof lastplay === 'undefined') return; - if (basicBot.settings.songstats) { - if (typeof basicBot.chat.songstatistics === "undefined") { - API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") - } + var retrieveFromStorage = function () { + var info = localStorage.getItem("basicBotStorageInfo"); + if (info === null) API.chatLog(basicBot.chat.nodatafound); else { - API.sendChat(subChat(basicBot.chat.songstatistics, {artist: lastplay.media.author, title: lastplay.media.title, woots: lastplay.score.positive, grabs: lastplay.score.grabs, mehs: lastplay.score.negative})) - } - } - basicBot.room.roomstats.totalWoots += lastplay.score.positive; - basicBot.room.roomstats.totalMehs += lastplay.score.negative; - basicBot.room.roomstats.totalCurates += lastplay.score.grabs; - basicBot.room.roomstats.songCount++; - basicBot.roomUtilities.intervalMessage(); - basicBot.room.currentDJID = obj.dj.id; - - var blacklistSkip = setTimeout(function () { - var mid = obj.media.format + ':' + obj.media.cid; - for (var bl in basicBot.room.blacklists) { - if (basicBot.settings.blacklistEnabled) { - if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { - API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } + var settings = JSON.parse(localStorage.getItem("basicBotsettings")); + var room = JSON.parse(localStorage.getItem("basicBotRoom")); + var elapsed = Date.now() - JSON.parse(info).time; + if ((elapsed < 1 * 60 * 60 * 1000)) { + API.chatLog(basicBot.chat.retrievingdata); + for (var prop in settings) { + basicBot.settings[prop] = settings[prop]; + } + basicBot.room.users = room.users; + basicBot.room.afkList = room.afkList; + basicBot.room.historyList = room.historyList; + basicBot.room.mutedUsers = room.mutedUsers; + //basicBot.room.autoskip = room.autoskip; + basicBot.room.roomstats = room.roomstats; + basicBot.room.messages = room.messages; + basicBot.room.queue = room.queue; + basicBot.room.newBlacklisted = room.newBlacklisted; + API.chatLog(basicBot.chat.datarestored); } - } } - }, 2000); - var newMedia = obj.media; - var timeLimitSkip = setTimeout(function () { - if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } + var json_sett = null; + var roominfo = document.getElementById("room-settings"); + info = roominfo.textContent; + var ref_bot = "@basicBot="; + var ind_ref = info.indexOf(ref_bot); + if (ind_ref > 0) { + var link = info.substring(ind_ref + ref_bot.length, info.length); + var ind_space = null; + if (link.indexOf(" ") < link.indexOf("\n")) ind_space = link.indexOf(" "); + else ind_space = link.indexOf("\n"); + link = link.substring(0, ind_space); + $.get(link, function (json) { + if (json !== null && typeof json !== "undefined") { + json_sett = JSON.parse(json); + for (var prop in json_sett) { + basicBot.settings[prop] = json_sett[prop]; + } + } + }); } - }, 2000); - var format = obj.media.format; - var cid = obj.media.cid; - var naSkip = setTimeout(function () { - if (format == 1){ - $.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + cid + '&key=AIzaSyDcfWu9cGaDnTjPKhg_dy9mUh6H7i4ePZ0&part=snippet&callback=?', function (track){ - if (typeof(track.items[0]) === 'undefined'){ - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - }); + + }; + + String.prototype.splitBetween = function (a, b) { + var self = this; + self = this.split(a); + for (var i = 0; i < self.length; i++) { + self[i] = self[i].split(b); } - else { - var checkSong = SC.get('/tracks/' + cid, function (track){ - if (typeof track.title === 'undefined'){ - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } + var arr = []; + for (var i = 0; i < self.length; i++) { + if (Array.isArray(self[i])) { + for (var j = 0; j < self[i].length; j++) { + arr.push(self[i][j]); + } } - }); + else arr.push(self[i]); } - }, 2000); - clearTimeout(historySkip); - if (basicBot.settings.historySkip) { - var alreadyPlayed = false; - var apihistory = API.getHistory(); - var name = obj.dj.username; - var historySkip = setTimeout(function () { - for (var i = 0; i < apihistory.length; i++) { - if (apihistory[i].media.cid === obj.media.cid) { - basicBot.room.historyList[i].push(+new Date()); - alreadyPlayed = true; - API.sendChat(subChat(basicBot.chat.songknown, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - } - if (!alreadyPlayed) { - basicBot.room.historyList.push([obj.media.cid, +new Date()]); - } - }, 2000); - } - if (user.ownSong) { - API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); - user.ownSong = false; - } - clearTimeout(basicBot.room.autoskipTimer); - if (basicBot.settings.autoskip) { - var remaining = obj.media.duration * 1000; - var startcid = API.getMedia().cid; - basicBot.room.autoskipTimer = setTimeout(function() { - var endcid = API.getMedia().cid; - if (startcid === endcid) { - //API.sendChat('Song stuck, skipping...'); - API.moderateForceSkip(); - } - }, remaining + 5000); - } - storeToStorage(); - sendToSocket(); - }, - eventWaitlistupdate: function (users) { - if (users.length < 50) { - if (basicBot.room.queue.id.length > 0 && basicBot.room.queueable) { - basicBot.room.queueable = false; - setTimeout(function () { - basicBot.room.queueable = true; - }, 500); - basicBot.room.queueing++; - var id, pos; - setTimeout( - function () { - id = basicBot.room.queue.id.splice(0, 1)[0]; - pos = basicBot.room.queue.position.splice(0, 1)[0]; - API.moderateAddDJ(id, pos); - setTimeout( - function (id, pos) { - API.moderateMoveDJ(id, pos); - basicBot.room.queueing--; - if (basicBot.room.queue.id.length === 0) setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1000, id, pos); - }, 1000 + basicBot.room.queueing * 2500); - } - } - for (var i = 0; i < users.length; i++) { - var user = basicBot.userUtilities.lookupUser(users[i].id); - basicBot.userUtilities.updatePosition(user, API.getWaitListPosition(users[i].id) + 1); - } - }, - chatcleaner: function (chat) { - if (!basicBot.settings.filterChat) return false; - if (basicBot.userUtilities.getPermission(chat.uid) > 1) return false; - var msg = chat.message; - var containsLetters = false; - for (var i = 0; i < msg.length; i++) { - ch = msg.charAt(i); - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch === ':' || ch === '^') containsLetters = true; - } - if (msg === '') { - return true; - } - if (!containsLetters && (msg.length === 1 || msg.length > 3)) return true; - msg = msg.replace(/[ ,;.:\/=~+%^*\-\\"'&@#]/g, ''); - var capitals = 0; - var ch; - for (var i = 0; i < msg.length; i++) { - ch = msg.charAt(i); - if (ch >= 'A' && ch <= 'Z') capitals++; - } - if (capitals >= 40) { - API.sendChat(subChat(basicBot.chat.caps, {name: chat.un})); - return true; - } - msg = msg.toLowerCase(); - if (msg === 'skip') { - API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); - return true; - } - for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { - if (msg === basicBot.chatUtilities.spam[j]) { - API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); - return true; - } - } - return false; - }, - chatUtilities: { - chatFilter: function (chat) { - var msg = chat.message; - var perm = basicBot.userUtilities.getPermission(chat.uid); - var user = basicBot.userUtilities.lookupUser(chat.uid); - var isMuted = false; - for (var i = 0; i < basicBot.room.mutedUsers.length; i++) { - if (basicBot.room.mutedUsers[i] === chat.uid) isMuted = true; - } - if (isMuted) { - API.moderateDeleteChat(chat.cid); - return true; - } - if (basicBot.settings.lockdownEnabled) { - if (perm === 0) { - API.moderateDeleteChat(chat.cid); - return true; - } - } - if (basicBot.chatcleaner(chat)) { - API.moderateDeleteChat(chat.cid); - return true; - } - if (basicBot.settings.cmdDeletion && msg.startsWith(basicBot.settings.commandLiteral)) { - API.moderateDeleteChat(chat.cid); - } - /** - var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - if (plugRoomLinkPatt.exec(msg)) { - if (perm === 0) { - API.sendChat(subChat(basicBot.chat.roomadvertising, {name: chat.un})); - API.moderateDeleteChat(chat.cid); - return true; - } - } - **/ - if (msg.indexOf('http://adf.ly/') > -1) { - API.moderateDeleteChat(chat.cid); - API.sendChat(subChat(basicBot.chat.adfly, {name: chat.un})); - return true; - } - if (msg.indexOf('autojoin was not enabled') > 0 || msg.indexOf('AFK message was not enabled') > 0 || msg.indexOf('!afkdisable') > 0 || msg.indexOf('!joindisable') > 0 || msg.indexOf('autojoin disabled') > 0 || msg.indexOf('AFK message disabled') > 0) { - API.moderateDeleteChat(chat.cid); - return true; - } - - var rlJoinChat = basicBot.chat.roulettejoin; - var rlLeaveChat = basicBot.chat.rouletteleave; + return arr; + }; - var joinedroulette = rlJoinChat.split('%%NAME%%'); - if (joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; - else joinedroulette = joinedroulette[0]; + String.prototype.startsWith = function(str) { + return this.substring(0, str.length) === str; + }; - var leftroulette = rlLeaveChat.split('%%NAME%%'); - if (leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; - else leftroulette = leftroulette[0]; + var linkFixer = function (msg) { + var parts = msg.splitBetween(' -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { - setTimeout(function (id) { - API.moderateDeleteChat(id); - }, 5 * 1000, chat.cid); - return true; - } - return false; - }, - commandCheck: function (chat) { - var cmd; - if (chat.message.charAt(0) === basicBot.settings.commandLiteral) { - var space = chat.message.indexOf(' '); - if (space === -1) { - cmd = chat.message; - } - else cmd = chat.message.substring(0, space); - } - else return false; - var userPerm = basicBot.userUtilities.getPermission(chat.uid); - //console.log("name: " + chat.un + ", perm: " + userPerm); - if (chat.message !== basicBot.settings.commandLiteral + 'join' && chat.message !== basicBot.settings.commandLiteral + "leave") { - if (userPerm === 0 && !basicBot.room.usercommand) return void (0); - if (!basicBot.room.allcommand) return void (0); - } - if (chat.message === basicBot.settings.commandLiteral + 'eta' && basicBot.settings.etaRestriction) { - if (userPerm < 2) { - var u = basicBot.userUtilities.lookupUser(chat.uid); - if (u.lastEta !== null && (Date.now() - u.lastEta) < 1 * 60 * 60 * 1000) { - API.moderateDeleteChat(chat.cid); - return void (0); - } - else u.lastEta = Date.now(); - } - } - var executed = false; - - for (var comm in basicBot.commands) { - var cmdCall = basicBot.commands[comm].command; - if (!Array.isArray(cmdCall)) { - cmdCall = [cmdCall] - } - for (var i = 0; i < cmdCall.length; i++) { - if (basicBot.settings.commandLiteral + cmdCall[i] === cmd) { - basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[i]); - executed = true; - break; - } - } - } + var decodeEntities = function (s) { + var str, temp = document.createElement('p'); + temp.innerHTML = s; + str = temp.textContent || temp.innerText; + temp = null; + return str; + }; - if (executed && userPerm === 0) { - basicBot.room.usercommand = false; - setTimeout(function () { - basicBot.room.usercommand = true; - }, basicBot.settings.commandCooldown * 1000); + var botCreator = "Matthew (***REMOVED***)"; + var botMaintainer = "Benzi (Quoona)" + var botCreatorIDs = ["3851534", "4105209"]; + + var basicBot = { + version: "2.8.9", + status: false, + name: "basicBot", + loggedInID: null, + scriptLink: "https://rawgit.com/***REMOVED***/basicBot/master/basicBot.js", + cmdLink: "http://git.io/245Ppg", + chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", + chat: null, + loadChat: loadChat, + retrieveSettings: retrieveSettings, + retrieveFromStorage: retrieveFromStorage, + settings: { + botName: "basicBot", + language: "english", + chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", + roomLock: false, // Requires an extension to re-load the script + startupCap: 1, // 1-200 + startupVolume: 0, // 0-100 + startupEmoji: false, // true or false + autowoot: true, + autoskip: false, + smartSkip: true, + cmdDeletion: true, + maximumAfk: 120, + afkRemoval: true, + maximumDc: 60, + bouncerPlus: true, + blacklistEnabled: true, + lockdownEnabled: false, + lockGuard: false, + maximumLocktime: 10, + cycleGuard: true, + maximumCycletime: 10, + voteSkip: false, + voteSkipLimit: 10, + historySkip: false, + timeGuard: true, + maximumSongLength: 10, + autodisable: true, + commandCooldown: 30, + usercommandsEnabled: true, + skipPosition: 3, + skipReasons: [ + ["theme", "This song does not fit the room theme. "], + ["op", "This song is on the OP list. "], + ["history", "This song is in the history. "], + ["mix", "You played a mix, which is against the rules. "], + ["sound", "The song you played had bad sound quality or no sound. "], + ["nsfw", "The song you contained was NSFW (image or sound). "], + ["unavailable", "The song you played was not available for some users. "] + ], + afkpositionCheck: 15, + afkRankCheck: "ambassador", + motdEnabled: false, + motdInterval: 5, + motd: "Temporary Message of the Day", + filterChat: true, + etaRestriction: false, + welcome: true, + opLink: null, + rulesLink: null, + themeLink: null, + fbLink: null, + youtubeLink: null, + website: null, + intervalMessages: [], + messageInterval: 5, + songstats: true, + commandLiteral: "!", + blacklists: { + NSFW: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/NSFWlist.json", + OP: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/OPlist.json", + BANNED: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/BANNEDlist.json" } - if (executed) { - /*if (basicBot.settings.cmdDeletion) { - API.moderateDeleteChat(chat.cid); - }*/ - - //basicBot.room.allcommand = false; - //setTimeout(function () { - basicBot.room.allcommand = true; - //}, 5 * 1000); - } - return executed; - }, - action: function (chat) { - var user = basicBot.userUtilities.lookupUser(chat.uid); - if (chat.type === 'message') { - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === chat.uid) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); + }, + room: { + name: null, + users: [], + afkList: [], + mutedUsers: [], + bannedUsers: [], + skippable: true, + usercommand: true, + allcommand: true, + afkInterval: null, + //autoskip: false, + autoskipTimer: null, + autodisableInterval: null, + autodisableFunc: function () { + if (basicBot.status && basicBot.settings.autodisable) { + API.sendChat('!afkdisable'); + API.sendChat('!joindisable'); } + }, + queueing: 0, + queueable: true, + currentDJID: null, + historyList: [], + cycleTimer: setTimeout(function () { + }, 1), + roomstats: { + accountName: null, + totalWoots: 0, + totalCurates: 0, + totalMehs: 0, + launchTime: null, + songCount: 0, + chatmessages: 0 + }, + messages: { + from: [], + to: [], + message: [] + }, + queue: { + id: [], + position: [] + }, + blacklists: { - } + }, + newBlacklisted: [], + newBlacklistedSongFunction: null, + roulette: { + rouletteStatus: false, + participants: [], + countdown: null, + startRoulette: function () { + basicBot.room.roulette.rouletteStatus = true; + basicBot.room.roulette.countdown = setTimeout(function () { + basicBot.room.roulette.endRoulette(); + }, 60 * 1000); + API.sendChat(basicBot.chat.isopen); + }, + endRoulette: function () { + basicBot.room.roulette.rouletteStatus = false; + var ind = Math.floor(Math.random() * basicBot.room.roulette.participants.length); + var winner = basicBot.room.roulette.participants[ind]; + basicBot.room.roulette.participants = []; + var pos = Math.floor((Math.random() * API.getWaitList().length) + 1); + var user = basicBot.userUtilities.lookupUser(winner); + var name = user.username; + API.sendChat(subChat(basicBot.chat.winnerpicked, {name: name, position: pos})); + setTimeout(function (winner, pos) { + basicBot.userUtilities.moveUser(winner, pos, false); + }, 1 * 1000, winner, pos); + } } - basicBot.room.roomstats.chatmessages++; - }, - spam: [ - 'hueh', 'hu3', 'brbr', 'heu', 'brbr', 'kkkk', 'spoder', 'mafia', 'zuera', 'zueira', - 'zueria', 'aehoo', 'aheu', 'alguem', 'algum', 'brazil', 'zoeira', 'fuckadmins', 'affff', 'vaisefoder', 'huenaarea', - 'hitler', 'ashua', 'ahsu', 'ashau', 'lulz', 'huehue', 'hue', 'huehuehue', 'merda', 'pqp', 'puta', 'mulher', 'pula', 'retarda', 'caralho', 'filha', 'ppk', - 'gringo', 'fuder', 'foder', 'hua', 'ahue', 'modafuka', 'modafoka', 'mudafuka', 'mudafoka', 'ooooooooooooooo', 'foda' - ], - curses: [ - 'nigger', 'faggot', 'nigga', 'niqqa', 'motherfucker', 'modafocka' - ] - }, - connectAPI: function () { - this.proxy = { - eventChat: $.proxy(this.eventChat, this), - eventUserskip: $.proxy(this.eventUserskip, this), - eventUserjoin: $.proxy(this.eventUserjoin, this), - eventUserleave: $.proxy(this.eventUserleave, this), - //eventFriendjoin: $.proxy(this.eventFriendjoin, this), - eventVoteupdate: $.proxy(this.eventVoteupdate, this), - eventCurateupdate: $.proxy(this.eventCurateupdate, this), - eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), - eventDjadvance: $.proxy(this.eventDjadvance, this), - //eventDjupdate: $.proxy(this.eventDjupdate, this), - eventWaitlistupdate: $.proxy(this.eventWaitlistupdate, this), - eventVoteskip: $.proxy(this.eventVoteskip, this), - eventModskip: $.proxy(this.eventModskip, this), - eventChatcommand: $.proxy(this.eventChatcommand, this), - eventHistoryupdate: $.proxy(this.eventHistoryupdate, this), - - }; - API.on(API.CHAT, this.proxy.eventChat); - API.on(API.USER_SKIP, this.proxy.eventUserskip); - API.on(API.USER_JOIN, this.proxy.eventUserjoin); - API.on(API.USER_LEAVE, this.proxy.eventUserleave); - API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); - API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); - API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); - API.on(API.ADVANCE, this.proxy.eventDjadvance); - API.on(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); - API.on(API.MOD_SKIP, this.proxy.eventModskip); - API.on(API.CHAT_COMMAND, this.proxy.eventChatcommand); - API.on(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); - }, - disconnectAPI: function () { - API.off(API.CHAT, this.proxy.eventChat); - API.off(API.USER_SKIP, this.proxy.eventUserskip); - API.off(API.USER_JOIN, this.proxy.eventUserjoin); - API.off(API.USER_LEAVE, this.proxy.eventUserleave); - API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); - API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); - API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); - API.off(API.ADVANCE, this.proxy.eventDjadvance); - API.off(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); - API.off(API.MOD_SKIP, this.proxy.eventModskip); - API.off(API.CHAT_COMMAND, this.proxy.eventChatcommand); - API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); }, - startup: function () { - Function.prototype.toString = function () { - return 'Function.' - }; - var u = API.getUser(); - if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); - if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); - basicBot.connectAPI(); - API.moderateDeleteChat = function (cid) { - $.ajax({ - url: "https://plug.dj/_/chat/" + cid, - type: "DELETE" - }) - }; - - basicBot.room.name = window.location.pathname; - var Check; - - console.log(basicBot.room.name); - - var detect = function(){ - if(basicBot.room.name != window.location.pathname){ - console.log("Killing bot after room change."); - storeToStorage(); - basicBot.disconnectAPI(); - setTimeout(function () { - kill(); - }, 1000); - if (basicBot.settings.roomLock){ - window.location = 'https://plug.dj' + basicBot.room.name; - } - else { - clearInterval(Check); - } - } - }; - - Check = setInterval(function(){ detect() }, 2000); - - retrieveSettings(); - retrieveFromStorage(); - window.bot = basicBot; - basicBot.roomUtilities.updateBlacklists(); - setInterval(basicBot.roomUtilities.updateBlacklists, 60 * 60 * 1000); - basicBot.getNewBlacklistedSongs = basicBot.roomUtilities.exportNewBlacklistedSongs; - basicBot.logNewBlacklistedSongs = basicBot.roomUtilities.logNewBlacklistedSongs; - if (basicBot.room.roomstats.launchTime === null) { - basicBot.room.roomstats.launchTime = Date.now(); - } - - for (var j = 0; j < basicBot.room.users.length; j++) { - basicBot.room.users[j].inRoom = false; - } - var userlist = API.getUsers(); - for (var i = 0; i < userlist.length; i++) { - var known = false; - var ind = null; - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.room.users[j].id === userlist[i].id) { - known = true; - ind = j; - } - } - if (known) { - basicBot.room.users[ind].inRoom = true; - } - else { - basicBot.room.users.push(new basicBot.User(userlist[i].id, userlist[i].username)); - ind = basicBot.room.users.length - 1; - } - var wlIndex = API.getWaitListPosition(basicBot.room.users[ind].id) + 1; - basicBot.userUtilities.updatePosition(basicBot.room.users[ind], wlIndex); - } - basicBot.room.afkInterval = setInterval(function () { - basicBot.roomUtilities.afkCheck() - }, 10 * 1000); - basicBot.room.autodisableInterval = setInterval(function () { - basicBot.room.autodisableFunc(); - }, 60 * 60 * 1000); - basicBot.loggedInID = API.getUser().id; - basicBot.status = true; - API.sendChat('/cap ' + basicBot.settings.startupCap); - API.setVolume(basicBot.settings.startupVolume); - if (basicBot.settings.autowoot) { - $("#woot").click(); - } - if (basicBot.settings.startupEmoji) { - var emojibuttonoff = $(".icon-emoji-off"); - if (emojibuttonoff.length > 0) { - emojibuttonoff[0].click(); - } - API.chatLog(':smile: Emojis enabled.'); - } - else { - var emojibuttonon = $(".icon-emoji-on"); - if (emojibuttonon.length > 0) { - emojibuttonon[0].click(); - } - API.chatLog('Emojis disabled.'); - } - API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); - API.chatLog('Volume set to ' + basicBot.settings.startupVolume); - socket(); - loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); + User: function (id, name) { + this.id = id; + this.username = name; + this.jointime = Date.now(); + this.lastActivity = Date.now(); + this.votes = { + woot: 0, + meh: 0, + curate: 0 + }; + this.lastEta = null; + this.afkWarningCount = 0; + this.afkCountdown = null; + this.inRoom = true; + this.isMuted = false; + this.lastDC = { + time: null, + position: null, + songCount: 0 + }; + this.lastKnownPosition = null; }, - commands: { - executable: function (minRank, chat) { - var id = chat.uid; - var perm = basicBot.userUtilities.getPermission(id); - var minPerm; - switch (minRank) { - case 'admin': - minPerm = 10; - break; - case 'ambassador': - minPerm = 7; - break; - case 'host': - minPerm = 5; - break; - case 'cohost': - minPerm = 4; - break; - case 'manager': - minPerm = 3; - break; - case 'mod': - if (basicBot.settings.bouncerPlus) { - minPerm = 2; - } - else { - minPerm = 3; - } - break; - case 'bouncer': - minPerm = 2; - break; - case 'residentdj': - minPerm = 1; - break; - case 'user': - minPerm = 0; - break; - default: - API.chatLog('error assigning minimum permission'); - } - return perm >= minPerm; - - }, - /** - command: { - command: 'cmd', - rank: 'user/bouncer/mod/manager', - type: 'startsWith/exact', - functionality: function(chat, cmd){ - if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if( !basicBot.commands.executable(this.rank, chat) ) return void (0); - else{ - - } - } - }, - **/ - - activeCommand: { - command: 'active', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var now = Date.now(); - var chatters = 0; - var time; - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - var since = durationOnline / 1000; - - if (msg.length === cmd.length) time = since; - else { - time = msg.substring(cmd.length + 1); - if (isNaN(time)) return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } + userUtilities: { + getJointime: function (user) { + return user.jointime; + }, + getUser: function (user) { + return API.getUser(user.id); + }, + updatePosition: function (user, newPos) { + user.lastKnownPosition = newPos; + }, + updateDC: function (user) { + user.lastDC.time = Date.now(); + user.lastDC.position = user.lastKnownPosition; + user.lastDC.songCount = basicBot.room.roomstats.songCount; + }, + setLastActivity: function (user) { + user.lastActivity = Date.now(); + user.afkWarningCount = 0; + clearTimeout(user.afkCountdown); + }, + getLastActivity: function (user) { + return user.lastActivity; + }, + getWarningCount: function (user) { + return user.afkWarningCount; + }, + setWarningCount: function (user, value) { + user.afkWarningCount = value; + }, + lookupUser: function (id) { for (var i = 0; i < basicBot.room.users.length; i++) { - userTime = basicBot.userUtilities.getLastActivity(basicBot.room.users[i]); - if ((now - userTime) <= (time * 60 * 1000)) { - chatters++; - } + if (basicBot.room.users[i].id === id) { + return basicBot.room.users[i]; + } } - API.sendChat(subChat(basicBot.chat.activeusersintime, {name: chat.un, amount: chatters, time: time})); - } - } - }, - - addCommand: { - command: 'add', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (msg.length > cmd.length + 2) { - if (typeof user !== 'undefined') { - if (basicBot.room.roomevent) { - basicBot.room.eventArtists.push(user.id); - } - API.moderateAddDJ(user.id); - } else API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - } - } - } - }, - - afklimitCommand: { - command: 'afklimit', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolimitspecified, {name: chat.un})); - var limit = msg.substring(cmd.length + 1); - if (!isNaN(limit)) { - basicBot.settings.maximumAfk = parseInt(limit, 10); - API.sendChat(subChat(basicBot.chat.maximumafktimeset, {name: chat.un, time: basicBot.settings.maximumAfk})); - } - else API.sendChat(subChat(basicBot.chat.invalidlimitspecified, {name: chat.un})); - } - } - }, - - afkremovalCommand: { - command: 'afkremoval', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.afkRemoval) { - basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; - clearInterval(basicBot.room.afkInterval); - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.afkremoval})); + return false; + }, + lookupUserName: function (name) { + for (var i = 0; i < basicBot.room.users.length; i++) { + var match = basicBot.room.users[i].username.trim() == name.trim(); + if (match) { + return basicBot.room.users[i]; + } } + return false; + }, + voteRatio: function (id) { + var user = basicBot.userUtilities.lookupUser(id); + var votes = user.votes; + if (votes.meh === 0) votes.ratio = 1; + else votes.ratio = (votes.woot / votes.meh).toFixed(2); + return votes; + + }, + getPermission: function (obj) { //1 requests + var u; + if (typeof obj === "object") u = obj; + else u = API.getUser(obj); + for (var i = 0; i < botCreatorIDs.length; i++) { + if (botCreatorIDs[i].indexOf(u.id) > -1) return 10; + } + if (u.gRole < 2) return u.role; else { - basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; - basicBot.room.afkInterval = setInterval(function () { - basicBot.roomUtilities.afkCheck() - }, 2 * 1000); - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.afkremoval})); + switch (u.gRole) { + case 2: + return 7; + case 3: + return 8; + case 4: + return 9; + case 5: + return 10; + } } - } - } - }, - - afkresetCommand: { - command: 'afkreset', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - basicBot.userUtilities.setLastActivity(user); - API.sendChat(subChat(basicBot.chat.afkstatusreset, {name: chat.un, username: name})); - } + return 0; + }, + moveUser: function (id, pos, priority) { + var user = basicBot.userUtilities.lookupUser(id); + var wlist = API.getWaitList(); + if (API.getWaitListPosition(id) === -1) { + if (wlist.length < 50) { + API.moderateAddDJ(id); + if (pos !== 0) setTimeout(function (id, pos) { + API.moderateMoveDJ(id, pos); + }, 1250, id, pos); + } + else { + var alreadyQueued = -1; + for (var i = 0; i < basicBot.room.queue.id.length; i++) { + if (basicBot.room.queue.id[i] === id) alreadyQueued = i; + } + if (alreadyQueued !== -1) { + basicBot.room.queue.position[alreadyQueued] = pos; + return API.sendChat(subChat(basicBot.chat.alreadyadding, {position: basicBot.room.queue.position[alreadyQueued]})); + } + basicBot.roomUtilities.booth.lockBooth(); + if (priority) { + basicBot.room.queue.id.unshift(id); + basicBot.room.queue.position.unshift(pos); + } + else { + basicBot.room.queue.id.push(id); + basicBot.room.queue.position.push(pos); + } + var name = user.username; + return API.sendChat(subChat(basicBot.chat.adding, {name: name, position: basicBot.room.queue.position.length})); + } + } + else API.moderateMoveDJ(id, pos); + }, + dclookup: function (id) { + var user = basicBot.userUtilities.lookupUser(id); + if (typeof user === 'boolean') return basicBot.chat.usernotfound; + var name = user.username; + if (user.lastDC.time === null) return subChat(basicBot.chat.notdisconnected, {name: name}); + var dc = user.lastDC.time; + var pos = user.lastDC.position; + if (pos === null) return basicBot.chat.noposition; + var timeDc = Date.now() - dc; + var validDC = false; + if (basicBot.settings.maximumDc * 60 * 1000 > timeDc) { + validDC = true; + } + var time = basicBot.roomUtilities.msToStr(timeDc); + if (!validDC) return (subChat(basicBot.chat.toolongago, {name: basicBot.userUtilities.getUser(user).username, time: time})); + var songsPassed = basicBot.room.roomstats.songCount - user.lastDC.songCount; + var afksRemoved = 0; + var afkList = basicBot.room.afkList; + for (var i = 0; i < afkList.length; i++) { + var timeAfk = afkList[i][1]; + var posAfk = afkList[i][2]; + if (dc < timeAfk && posAfk < pos) { + afksRemoved++; + } + } + var newPosition = user.lastDC.position - songsPassed - afksRemoved; + if (newPosition <= 0) return subChat(basicBot.chat.notdisconnected, {name: name}); + var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); + basicBot.userUtilities.moveUser(user.id, newPosition, true); + return msg; } - }, - - afktimeCommand: { - command: 'afktime', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var lastActive = basicBot.userUtilities.getLastActivity(user); - var inactivity = Date.now() - lastActive; - var time = basicBot.roomUtilities.msToStr(inactivity); - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - - if (inactivity == durationOnline){ - API.sendChat(subChat(basicBot.chat.inactivelonger, {botname: basicBot.settings.botName, name: chat.un, username: name})); + }, + + roomUtilities: { + rankToNumber: function (rankString) { + var rankInt = null; + switch (rankString) { + case "admin": + rankInt = 10; + break; + case "ambassador": + rankInt = 7; + break; + case "host": + rankInt = 5; + break; + case "cohost": + rankInt = 4; + break; + case "manager": + rankInt = 3; + break; + case "bouncer": + rankInt = 2; + break; + case "residentdj": + rankInt = 1; + break; + case "user": + rankInt = 0; + break; + } + return rankInt; + }, + 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.minutes < 1 && timeAway.hours < 1 && timeAway.days < 1) { + msg += timeAway.seconds.toString() + 's'; + } + if (msg !== '') { + return msg; } else { - API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); + return false; } - } - } - }, - - autodisableCommand: { - command: 'autodisable', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.autodisable) { - basicBot.settings.autodisable = !basicBot.settings.autodisable; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autodisable})); + }, + booth: { + lockTimer: setTimeout(function () { + }, 1000), + locked: false, + lockBooth: function () { + API.moderateLockWaitList(!basicBot.roomUtilities.booth.locked); + basicBot.roomUtilities.booth.locked = false; + if (basicBot.settings.lockGuard) { + basicBot.roomUtilities.booth.lockTimer = setTimeout(function () { + API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); + }, basicBot.settings.maximumLocktime * 60 * 1000); + } + }, + unlockBooth: function () { + API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); + clearTimeout(basicBot.roomUtilities.booth.lockTimer); + } + }, + afkCheck: function () { + if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); + var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); + var djlist = API.getWaitList(); + var lastPos = Math.min(djlist.length, basicBot.settings.afkpositionCheck); + if (lastPos - 1 > djlist.length) return void (0); + for (var i = 0; i < lastPos; i++) { + if (typeof djlist[i] !== 'undefined') { + var id = djlist[i].id; + var user = basicBot.userUtilities.lookupUser(id); + if (typeof user !== 'boolean') { + var plugUser = basicBot.userUtilities.getUser(user); + if (rank !== null && basicBot.userUtilities.getPermission(plugUser) <= rank) { + var name = plugUser.username; + var lastActive = basicBot.userUtilities.getLastActivity(user); + var inactivity = Date.now() - lastActive; + var time = basicBot.roomUtilities.msToStr(inactivity); + var warncount = user.afkWarningCount; + if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { + if (warncount === 0) { + API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); + user.afkWarningCount = 3; + user.afkCountdown = setTimeout(function (userToChange) { + userToChange.afkWarningCount = 1; + }, 90 * 1000, user); + } + else if (warncount === 1) { + API.sendChat(subChat(basicBot.chat.warning2, {name: name})); + user.afkWarningCount = 3; + user.afkCountdown = setTimeout(function (userToChange) { + userToChange.afkWarningCount = 2; + }, 30 * 1000, user); + } + else if (warncount === 2) { + var pos = API.getWaitListPosition(id); + if (pos !== -1) { + pos++; + basicBot.room.afkList.push([id, Date.now(), pos]); + user.lastDC = { + + time: null, + position: null, + songCount: 0 + }; + API.moderateRemoveDJ(id); + API.sendChat(subChat(basicBot.chat.afkremove, {name: name, time: time, position: pos, maximumafk: basicBot.settings.maximumAfk})); + } + user.afkWarningCount = 0; + } + } + } + } + } + } + }, + smartSkip: function (reason) { + var dj = API.getDJ(); + var id = dj.id; + var waitlistlength = API.getWaitList().length; + var locked = false; + basicBot.room.queueable = false; + + if (waitlistlength == 50) { + basicBot.roomUtilities.booth.lockBooth(); + locked = true; + } + setTimeout(function (id) { + API.moderateForceSkip(); + setTimeout(function () { + if (typeof reason !== 'undefined') { + API.sendChat(reason); + } + }, 500); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.skipPosition, false); + basicBot.room.queueable = true; + if (locked) { + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + } + }, 1500, id); + }, 1000, id); + }, + changeDJCycle: function () { + var toggle = $(".cycle-toggle"); + if (toggle.hasClass("disabled")) { + toggle.click(); + if (basicBot.settings.cycleGuard) { + basicBot.room.cycleTimer = setTimeout(function () { + if (toggle.hasClass("enabled")) toggle.click(); + }, basicBot.settings.cycleMaxTime * 60 * 1000); + } } else { - basicBot.settings.autodisable = !basicBot.settings.autodisable; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autodisable})); + toggle.click(); + clearTimeout(basicBot.room.cycleTimer); } - } - } - }, - - autoskipCommand: { - command: 'autoskip', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.autoskip) { - basicBot.settings.autoskip = !basicBot.settings.autoskip; - clearTimeout(basicBot.room.autoskipTimer); - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); + // TODO: Use API.moderateDJCycle(true/false) + }, + intervalMessage: function () { + var interval; + if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; + else interval = basicBot.settings.messageInterval; + if ((basicBot.room.roomstats.songCount % interval) === 0 && basicBot.status) { + var msg; + if (basicBot.settings.motdEnabled) { + msg = basicBot.settings.motd; + } + else { + if (basicBot.settings.intervalMessages.length === 0) return void (0); + var messageNumber = basicBot.room.roomstats.songCount % basicBot.settings.intervalMessages.length; + msg = basicBot.settings.intervalMessages[messageNumber]; + } + API.sendChat('/me ' + msg); + } + }, + updateBlacklists: function () { + for (var bl in basicBot.settings.blacklists) { + basicBot.room.blacklists[bl] = []; + if (typeof basicBot.settings.blacklists[bl] === 'function') { + basicBot.room.blacklists[bl] = basicBot.settings.blacklists(); + } + else if (typeof basicBot.settings.blacklists[bl] === 'string') { + if (basicBot.settings.blacklists[bl] === '') { + continue; + } + try { + (function (l) { + $.get(basicBot.settings.blacklists[l], function (data) { + if (typeof data === 'string') { + data = JSON.parse(data); + } + var list = []; + for (var prop in data) { + if (typeof data[prop].mid !== 'undefined') { + list.push(data[prop].mid); + } + } + basicBot.room.blacklists[l] = list; + }) + })(bl); + } + catch (e) { + API.chatLog('Error setting' + bl + 'blacklist.'); + console.log('Error setting' + bl + 'blacklist.'); + console.log(e); + } + } + } + }, + logNewBlacklistedSongs: function () { + if (typeof console.table !== 'undefined') { + console.table(basicBot.room.newBlacklisted); } else { - basicBot.settings.autoskip = !basicBot.settings.autoskip; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); + console.log(basicBot.room.newBlacklisted); } - } + }, + exportNewBlacklistedSongs: function () { + var list = {}; + for (var i = 0; i < basicBot.room.newBlacklisted.length; i++) { + var track = basicBot.room.newBlacklisted[i]; + list[track.list] = []; + list[track.list].push({ + title: track.title, + author: track.author, + mid: track.mid + }); + } + return list; } - }, - - autowootCommand: { - command: 'autowoot', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.autowoot); - } + }, + eventChat: function (chat) { + chat.message = linkFixer(chat.message); + chat.message = decodeEntities(chat.message); + chat.message = chat.message.trim(); + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === chat.uid) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); + if (basicBot.room.users[i].username !== chat.un) { + basicBot.room.users[i].username = chat.un; + } + } } - }, - - baCommand: { - command: 'ba', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.brandambassador); - } + if (basicBot.chatUtilities.chatFilter(chat)) return void (0); + if (!basicBot.chatUtilities.commandCheck(chat)) + basicBot.chatUtilities.action(chat); + }, + eventUserjoin: function (user) { + var known = false; + var index = null; + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === user.id) { + known = true; + index = i; + } } - }, - - ballCommand: { - command: ['8ball', 'ask'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var crowd = API.getUsers(); - var msg = chat.message; - var argument = msg.substring(cmd.length + 1).replace(/@/g, ''); - var randomUser = Math.floor(Math.random() * crowd.length); - var randomBall = Math.floor(Math.random() * basicBot.chat.balls.length); - var randomSentence = Math.floor(Math.random() * 1); - API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.chat.balls[randomBall]})); - } + var greet = true; + var welcomeback = null; + if (known) { + basicBot.room.users[index].inRoom = true; + var u = basicBot.userUtilities.lookupUser(user.id); + var jt = u.jointime; + var t = Date.now() - jt; + if (t < 10 * 1000) greet = false; + else welcomeback = true; } - }, - - banCommand: { - command: 'ban', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - API.moderateBanUser(user.id, 1, API.BAN.DAY); - } + else { + basicBot.room.users.push(new basicBot.User(user.id, user.username)); + welcomeback = false; } - }, - - blacklistCommand: { - command: ['blacklist', 'bl'], - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolistspecified, {name: chat.un})); - var list = msg.substr(cmd.length + 1); - if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); - else { - var media = API.getMedia(); - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - var track = { - list: list, - author: media.author, - title: media.title, - mid: media.format + ':' + media.cid - }; - basicBot.room.newBlacklisted.push(track); - basicBot.room.blacklists[list].push(media.format + ':' + media.cid); - API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); - } - else { - API.moderateForceSkip(); - } - if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { - basicBot.room.newBlacklistedSongFunction(track); - } + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === user.id) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); + basicBot.room.users[j].jointime = Date.now(); } - } + } - }, - - blinfoCommand: { - command: 'blinfo', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var author = API.getMedia().author; - var title = API.getMedia().title; - var name = chat.un; - var format = API.getMedia().format; - var cid = API.getMedia().cid; - var songid = format + ":" + cid; - - API.sendChat(subChat(basicBot.chat.blinfo, {name: name, author: author, title: title, songid: songid})); - } + if (basicBot.settings.welcome && greet) { + welcomeback ? + setTimeout(function (user) { + API.sendChat(subChat(basicBot.chat.welcomeback, {name: user.username})); + }, 1 * 1000, user) + : + setTimeout(function (user) { + API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); + }, 1 * 1000, user); } - }, - - bouncerPlusCommand: { - command: 'bouncer+', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (basicBot.settings.bouncerPlus) { - basicBot.settings.bouncerPlus = false; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': 'Bouncer+'})); - } - else { - if (!basicBot.settings.bouncerPlus) { - var id = chat.uid; - var perm = basicBot.userUtilities.getPermission(id); - if (perm > 2) { - basicBot.settings.bouncerPlus = true; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': 'Bouncer+'})); + }, + eventUserleave: function (user) { + var lastDJ = API.getHistory()[0].user.id; + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === user.id) { + basicBot.userUtilities.updateDC(basicBot.room.users[i]); + basicBot.room.users[i].inRoom = false; + if (lastDJ == user.id){ + var user = basicBot.userUtilities.lookupUser(basicBot.room.users[i].id); + basicBot.userUtilities.updatePosition(user, 0); + user.lastDC.time = null; + user.lastDC.position = user.lastKnownPosition; } - } - else return API.sendChat(subChat(basicBot.chat.bouncerplusrank, {name: chat.un})); } - } } - }, - - botnameCommand: { - command: 'botname', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentbotname, {botname: basicBot.settings.botName})); - var argument = msg.substring(cmd.length + 1); - if (argument) { - basicBot.settings.botName = argument; - API.sendChat(subChat(basicBot.chat.botnameset, {botName: basicBot.settings.botName})); - } - } - } - }, - - clearchatCommand: { - command: 'clearchat', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var currentchat = $('#chat-messages').children(); - for (var i = 0; i < currentchat.length; i++) { - API.moderateDeleteChat(currentchat[i].getAttribute("data-cid")); - } - return API.sendChat(subChat(basicBot.chat.chatcleared, {name: chat.un})); - } + }, + eventVoteupdate: function (obj) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === obj.user.id) { + if (obj.vote === 1) { + basicBot.room.users[i].votes.woot++; + } + else { + basicBot.room.users[i].votes.meh++; + } + } } - }, - - commandsCommand: { - command: 'commands', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); - } + + var mehs = API.getScore().negative; + var woots = API.getScore().positive; + var dj = API.getDJ(); + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + + if (basicBot.settings.voteSkip) { + if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { + API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + } } - }, - - cmddeletionCommand: { - command: ['commanddeletion', 'cmddeletion', 'cmddel'], - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.cmdDeletion) { - basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + + }, + eventCurateupdate: function (obj) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === obj.user.id) { + basicBot.room.users[i].votes.curate++; } - else { - basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + } + }, + eventDjadvance: function (obj) { + if (basicBot.settings.autowoot) { + $("#woot").click(); // autowoot + } + + var user = basicBot.userUtilities.lookupUser(obj.dj.id) + for(var i = 0; i < basicBot.room.users.length; i++){ + if(basicBot.room.users[i].id === user.id){ + basicBot.room.users[i].lastDC = { + time: null, + position: null, + songCount: 0 + }; } - } } - }, - - cookieCommand: { - command: 'cookie', - rank: 'user', - type: 'startsWith', - getCookie: function (chat) { - var c = Math.floor(Math.random() * basicBot.chat.cookies.length); - return basicBot.chat.cookies[c]; - }, - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var space = msg.indexOf(' '); - if (space === -1) { - API.sendChat(basicBot.chat.eatcookie); - return false; + var lastplay = obj.lastPlay; + if (typeof lastplay === 'undefined') return; + if (basicBot.settings.songstats) { + if (typeof basicBot.chat.songstatistics === "undefined") { + API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") } else { - var name = msg.substring(space + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false || !user.inRoom) { - return API.sendChat(subChat(basicBot.chat.nousercookie, {name: name})); - } - else if (user.username === chat.un) { - return API.sendChat(subChat(basicBot.chat.selfcookie, {name: name})); - } - else { - return API.sendChat(subChat(basicBot.chat.cookie, {nameto: user.username, namefrom: chat.un, cookie: this.getCookie()})); - } - } - } - } - }, - - cycleCommand: { - command: 'cycle', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.changeDJCycle(); - } - } - }, - - cycleguardCommand: { - command: 'cycleguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.cycleGuard) { - basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cycleguard})); + API.sendChat(subChat(basicBot.chat.songstatistics, {artist: lastplay.media.author, title: lastplay.media.title, woots: lastplay.score.positive, grabs: lastplay.score.grabs, mehs: lastplay.score.negative})) + } + } + basicBot.room.roomstats.totalWoots += lastplay.score.positive; + basicBot.room.roomstats.totalMehs += lastplay.score.negative; + basicBot.room.roomstats.totalCurates += lastplay.score.grabs; + basicBot.room.roomstats.songCount++; + basicBot.roomUtilities.intervalMessage(); + basicBot.room.currentDJID = obj.dj.id; + + var blacklistSkip = setTimeout(function () { + var mid = obj.media.format + ':' + obj.media.cid; + for (var bl in basicBot.room.blacklists) { + if (basicBot.settings.blacklistEnabled) { + if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { + API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + } + } + }, 2000); + var newMedia = obj.media; + var timeLimitSkip = setTimeout(function () { + if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }, 2000); + var format = obj.media.format; + var cid = obj.media.cid; + var naSkip = setTimeout(function () { + if (format == 1){ + $.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + cid + '&key=AIzaSyDcfWu9cGaDnTjPKhg_dy9mUh6H7i4ePZ0&part=snippet&callback=?', function (track){ + if (typeof(track.items[0]) === 'undefined'){ + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }); } else { - basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cycleguard})); + var checkSong = SC.get('/tracks/' + cid, function (track){ + if (typeof track.title === 'undefined'){ + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }); } - - } + }, 2000); + clearTimeout(historySkip); + if (basicBot.settings.historySkip) { + var alreadyPlayed = false; + var apihistory = API.getHistory(); + var name = obj.dj.username; + var historySkip = setTimeout(function () { + for (var i = 0; i < apihistory.length; i++) { + if (apihistory[i].media.cid === obj.media.cid) { + basicBot.room.historyList[i].push(+new Date()); + alreadyPlayed = true; + API.sendChat(subChat(basicBot.chat.songknown, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + } + if (!alreadyPlayed) { + basicBot.room.historyList.push([obj.media.cid, +new Date()]); + } + }, 2000); } - }, - - cycletimerCommand: { - command: 'cycletimer', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var cycleTime = msg.substring(cmd.length + 1); - if (!isNaN(cycleTime) && cycleTime !== "") { - basicBot.settings.maximumCycletime = cycleTime; - return API.sendChat(subChat(basicBot.chat.cycleguardtime, {name: chat.un, time: basicBot.settings.maximumCycletime})); - } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - - } + if (user.ownSong) { + API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); + user.ownSong = false; + } + clearTimeout(basicBot.room.autoskipTimer); + if (basicBot.settings.autoskip) { + var remaining = obj.media.duration * 1000; + var startcid = API.getMedia().cid; + basicBot.room.autoskipTimer = setTimeout(function() { + var endcid = API.getMedia().cid; + if (startcid === endcid) { + //API.sendChat('Song stuck, skipping...'); + API.moderateForceSkip(); + } + }, remaining + 5000); } - }, - - dclookupCommand: { - command: ['dclookup', 'dc'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substring(cmd.length + 2); - var perm = basicBot.userUtilities.getPermission(chat.uid); - if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); - } - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var toChat = basicBot.userUtilities.dclookup(user.id); - API.sendChat(toChat); - } + storeToStorage(); + sendToSocket(); + }, + eventWaitlistupdate: function (users) { + if (users.length < 50) { + if (basicBot.room.queue.id.length > 0 && basicBot.room.queueable) { + basicBot.room.queueable = false; + setTimeout(function () { + basicBot.room.queueable = true; + }, 500); + basicBot.room.queueing++; + var id, pos; + setTimeout( + function () { + id = basicBot.room.queue.id.splice(0, 1)[0]; + pos = basicBot.room.queue.position.splice(0, 1)[0]; + API.moderateAddDJ(id, pos); + setTimeout( + function (id, pos) { + API.moderateMoveDJ(id, pos); + basicBot.room.queueing--; + if (basicBot.room.queue.id.length === 0) setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1000, id, pos); + }, 1000 + basicBot.room.queueing * 2500); + } + } + for (var i = 0; i < users.length; i++) { + var user = basicBot.userUtilities.lookupUser(users[i].id); + basicBot.userUtilities.updatePosition(user, API.getWaitListPosition(users[i].id) + 1); + } + }, + chatcleaner: function (chat) { + if (!basicBot.settings.filterChat) return false; + if (basicBot.userUtilities.getPermission(chat.uid) > 1) return false; + var msg = chat.message; + var containsLetters = false; + for (var i = 0; i < msg.length; i++) { + ch = msg.charAt(i); + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch === ':' || ch === '^') containsLetters = true; } - }, - - /*deletechatCommand: { - command: 'deletechat', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var chats = $('.from'); - var message = $('.message'); - var emote = $('.emote'); - var from = $('.un.clickable'); - for (var i = 0; i < chats.length; i++) { - var n = from[i].textContent; - if (name.trim() === n.trim()) { - - // var messagecid = $(message)[i].getAttribute('data-cid'); - // var emotecid = $(emote)[i].getAttribute('data-cid'); - // API.moderateDeleteChat(messagecid); - - // try { - // API.moderateDeleteChat(messagecid); - // } - // finally { - // API.moderateDeleteChat(emotecid); - // } - - if (typeof $(message)[i].getAttribute('data-cid') == "undefined"){ - API.moderateDeleteChat($(emote)[i].getAttribute('data-cid')); // works well with normal messages but not with emotes due to emotes and messages are seperate. - } else { - API.moderateDeleteChat($(message)[i].getAttribute('data-cid')); - } - } - } - API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); - } - } - },*/ - - emojiCommand: { - command: 'emoji', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var link = 'http://www.emoji-cheat-sheet.com/'; - API.sendChat(subChat(basicBot.chat.emojilist, {link: link})); - } + if (msg === '') { + return true; } - }, - - englishCommand: { - command: 'english', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if(chat.message.length === cmd.length) return API.sendChat('/me No user specified.'); - var name = chat.message.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if(typeof user === 'boolean') return API.sendChat('/me Invalid user specified.'); - var lang = basicBot.userUtilities.getUser(user).language; - var ch = '/me @' + name + ' '; - switch(lang){ - case 'en': break; - case 'da': ch += 'Vær venlig at tale engelsk.'; break; - case 'de': ch += 'Bitte sprechen Sie Englisch.'; break; - case 'es': ch += 'Por favor, hable Inglés.'; break; - case 'fr': ch += 'Parlez anglais, s\'il vous plaît.'; break; - case 'nl': ch += 'Spreek Engels, alstublieft.'; break; - case 'pl': ch += 'Proszę mówić po angielsku.'; break; - case 'pt': ch += 'Por favor, fale Inglês.'; break; - case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; - case 'cs': ch += 'Mluvte prosím anglicky.'; break; - case 'sr': ch += 'Молим Вас, говорите енглески.'; break; - } - ch += ' English please.'; - API.sendChat(ch); - } + if (!containsLetters && (msg.length === 1 || msg.length > 3)) return true; + msg = msg.replace(/[ ,;.:\/=~+%^*\-\\"'&@#]/g, ''); + var capitals = 0; + var ch; + for (var i = 0; i < msg.length; i++) { + ch = msg.charAt(i); + if (ch >= 'A' && ch <= 'Z') capitals++; } - }, - - etaCommand: { - command: 'eta', - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var perm = basicBot.userUtilities.getPermission(chat.uid); - var msg = chat.message; - var dj = API.getDJ().username; - var name; - if (msg.length > cmd.length) { - if (perm < 2) return void (0); - name = msg.substring(cmd.length + 2); - } else name = chat.un; - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var pos = API.getWaitListPosition(user.id); - var realpos = pos + 1; - if (name == dj) return API.sendChat(subChat(basicBot.chat.youaredj, {name: name})); - if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); - if (pos == 0) return API.sendChat(subChat(basicBot.chat.youarenext, {name: name})); - var timeRemaining = API.getTimeRemaining(); - var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; - var estimateString = basicBot.roomUtilities.msToStr(estimateMS); - API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString, position: realpos})); - } + if (capitals >= 40) { + API.sendChat(subChat(basicBot.chat.caps, {name: chat.un})); + return true; } - }, - - fbCommand: { - command: 'fb', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.fbLink === "string") - API.sendChat(subChat(basicBot.chat.facebook, {link: basicBot.settings.fbLink})); - } + msg = msg.toLowerCase(); + if (msg === 'skip') { + API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); + return true; } - }, - - filterCommand: { - command: 'filter', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.filterChat) { - basicBot.settings.filterChat = !basicBot.settings.filterChat; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.chatfilter})); + for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { + if (msg === basicBot.chatUtilities.spam[j]) { + API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); + return true; } - else { - basicBot.settings.filterChat = !basicBot.settings.filterChat; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.chatfilter})); - } - } } - }, - - forceskipCommand: { - command: ['forceskip', 'fs'], - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.forceskip, {name: chat.un})); - API.moderateForceSkip(); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - - } - } - }, - - ghostbusterCommand: { - command: 'ghostbuster', - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { + return false; + }, + chatUtilities: { + chatFilter: function (chat) { var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substr(cmd.length + 2); + var perm = basicBot.userUtilities.getPermission(chat.uid); + var user = basicBot.userUtilities.lookupUser(chat.uid); + var isMuted = false; + for (var i = 0; i < basicBot.room.mutedUsers.length; i++) { + if (basicBot.room.mutedUsers[i] === chat.uid) isMuted = true; } - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false || !user.inRoom) { - return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); + if (isMuted) { + API.moderateDeleteChat(chat.cid); + return true; } - else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); - } - } - }, - - gifCommand: { - command: ['gif', 'giphy'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length !== cmd.length) { - function get_id(api_key, fixedtag, func) - { - $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { - "format": "json", - "api_key": api_key, - "rating": rating, - "tag": fixedtag - }, - function(response) - { - func(response.data.id); - } - ) - } - var api_key = "dc6zaTOxFJmzC"; // public beta key - var rating = "pg-13"; // PG 13 gifs - var tag = msg.substr(cmd.length + 1); - var fixedtag = tag.replace(/ /g,"+"); - var commatag = tag.replace(/ /g,", "); - get_id(api_key, tag, function(id) { - if (typeof id !== 'undefined') { - API.sendChat(subChat(basicBot.chat.validgiftags, {name: chat.un, id: id, tags: commatag})); - } else { - API.sendChat(subChat(basicBot.chat.invalidgiftags, {name: chat.un, tags: commatag})); - } - }); + if (basicBot.settings.lockdownEnabled) { + if (perm === 0) { + API.moderateDeleteChat(chat.cid); + return true; + } } - else { - function get_random_id(api_key, func) - { - $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { - "format": "json", - "api_key": api_key, - "rating": rating - }, - function(response) - { - func(response.data.id); - } - ) - } - var api_key = "dc6zaTOxFJmzC"; // public beta key - var rating = "pg-13"; // PG 13 gifs - get_random_id(api_key, function(id) { - if (typeof id !== 'undefined') { - API.sendChat(subChat(basicBot.chat.validgifrandom, {name: chat.un, id: id})); - } else { - API.sendChat(subChat(basicBot.chat.invalidgifrandom, {name: chat.un})); - } - }); - } - } - } - }, - - helpCommand: { - command: 'help', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var link = "(Updated link coming soon)"; - API.sendChat(subChat(basicBot.chat.starterhelp, {link: link})); - } - } - }, - - historyskipCommand: { - command: 'historyskip', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.historySkip) { - basicBot.settings.historySkip = !basicBot.settings.historySkip; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.historyskip})); + if (basicBot.chatcleaner(chat)) { + API.moderateDeleteChat(chat.cid); + return true; } - else { - basicBot.settings.historySkip = !basicBot.settings.historySkip; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.historyskip})); + if (basicBot.settings.cmdDeletion && msg.startsWith(basicBot.settings.commandLiteral)) { + API.moderateDeleteChat(chat.cid); } - } - } - }, - - joinCommand: { - command: 'join', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.roulette.rouletteStatus && basicBot.room.roulette.participants.indexOf(chat.uid) < 0) { - basicBot.room.roulette.participants.push(chat.uid); - API.sendChat(subChat(basicBot.chat.roulettejoin, {name: chat.un})); - } - } - } - }, - - jointimeCommand: { - command: 'jointime', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var join = basicBot.userUtilities.getJointime(user); - var time = Date.now() - join; - var timeString = basicBot.roomUtilities.msToStr(time); - API.sendChat(subChat(basicBot.chat.jointime, {namefrom: chat.un, username: name, time: timeString})); - } - } - }, - - kickCommand: { - command: 'kick', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var lastSpace = msg.lastIndexOf(' '); - var time; - var name; - if (lastSpace === msg.indexOf(' ')) { - time = 0.25; - name = msg.substring(cmd.length + 2); + /** + var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; + if (plugRoomLinkPatt.exec(msg)) { + if (perm === 0) { + API.sendChat(subChat(basicBot.chat.roomadvertising, {name: chat.un})); + API.moderateDeleteChat(chat.cid); + return true; + } } - else { - time = msg.substring(lastSpace + 1); - name = msg.substring(cmd.length + 2, lastSpace); + **/ + if (msg.indexOf('http://adf.ly/') > -1) { + API.moderateDeleteChat(chat.cid); + API.sendChat(subChat(basicBot.chat.adfly, {name: chat.un})); + return true; + } + if (msg.indexOf('autojoin was not enabled') > 0 || msg.indexOf('AFK message was not enabled') > 0 || msg.indexOf('!afkdisable') > 0 || msg.indexOf('!joindisable') > 0 || msg.indexOf('autojoin disabled') > 0 || msg.indexOf('AFK message disabled') > 0) { + API.moderateDeleteChat(chat.cid); + return true; } - var user = basicBot.userUtilities.lookupUserName(name); - var from = chat.un; - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var rlJoinChat = basicBot.chat.roulettejoin; + var rlLeaveChat = basicBot.chat.rouletteleave; - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - var permTokick = basicBot.userUtilities.getPermission(user.id); + var joinedroulette = rlJoinChat.split('%%NAME%%'); + if (joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; + else joinedroulette = joinedroulette[0]; - if (permFrom <= permTokick) - return API.sendChat(subChat(basicBot.chat.kickrank, {name: chat.un})); + var leftroulette = rlLeaveChat.split('%%NAME%%'); + if (leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; + else leftroulette = leftroulette[0]; - if (!isNaN(time)) { - API.sendChat(subChat(basicBot.chat.kick, {name: chat.un, username: name, time: time})); - if (time > 24 * 60 * 60) API.moderateBanUser(user.id, 1, API.BAN.PERMA); - else API.moderateBanUser(user.id, 1, API.BAN.DAY); - setTimeout(function (id, name) { - API.moderateUnbanUser(id); - console.log('Unbanned @' + name + '. (' + id + ')'); - }, time * 60 * 1000, user.id, name); - } - else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - killCommand: { - command: 'kill', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - storeToStorage(); - sendToSocket(); - API.sendChat(basicBot.chat.kill); - basicBot.disconnectAPI(); - setTimeout(function () { - kill(); - }, 1000); - } - } - }, - - languageCommand: { - command: 'language', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); - var argument = msg.substring(cmd.length + 1); - - $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { - var langIndex = json; - var link = langIndex[argument.toLowerCase()]; - if (typeof link === "undefined") { - API.sendChat(subChat(basicBot.chat.langerror, {link: "http://git.io/vJ9nI"})); - } - else { - basicBot.settings.language = argument; - loadChat(); - API.sendChat(subChat(basicBot.chat.langset, {language: basicBot.settings.language})); - } - }); - } - } - }, - - leaveCommand: { - command: 'leave', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var ind = basicBot.room.roulette.participants.indexOf(chat.uid); - if (ind > -1) { - basicBot.room.roulette.participants.splice(ind, 1); - API.sendChat(subChat(basicBot.chat.rouletteleave, {name: chat.un})); - } - } - } - }, - - linkCommand: { - command: 'link', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var media = API.getMedia(); - var from = chat.un; - var user = basicBot.userUtilities.lookupUser(chat.uid); - var perm = basicBot.userUtilities.getPermission(chat.uid); - var dj = API.getDJ().id; - var isDj = false; - if (dj === chat.uid) isDj = true; - if (perm >= 1 || isDj) { - if (media.format === 1) { - var linkToSong = "http://youtu.be/" + media.cid; - API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); - } - if (media.format === 2) { - SC.get('/tracks/' + media.cid, function (sound) { - API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: sound.permalink_url})); - }); - } + if ((msg.indexOf(joinedroulette) > -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { + setTimeout(function (id) { + API.moderateDeleteChat(id); + }, 5 * 1000, chat.cid); + return true; } - } - } - }, - - lockCommand: { - command: 'lock', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.booth.lockBooth(); - } - } - }, - - lockdownCommand: { - command: 'lockdown', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var temp = basicBot.settings.lockdownEnabled; - basicBot.settings.lockdownEnabled = !temp; - if (basicBot.settings.lockdownEnabled) { - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockdown})); + return false; + }, + commandCheck: function (chat) { + var cmd; + if (chat.message.charAt(0) === basicBot.settings.commandLiteral) { + var space = chat.message.indexOf(' '); + if (space === -1) { + cmd = chat.message; + } + else cmd = chat.message.substring(0, space); + } + else return false; + var userPerm = basicBot.userUtilities.getPermission(chat.uid); + //console.log("name: " + chat.un + ", perm: " + userPerm); + if (chat.message !== basicBot.settings.commandLiteral + 'join' && chat.message !== basicBot.settings.commandLiteral + "leave") { + if (userPerm === 0 && !basicBot.room.usercommand) return void (0); + if (!basicBot.room.allcommand) return void (0); + } + if (chat.message === basicBot.settings.commandLiteral + 'eta' && basicBot.settings.etaRestriction) { + if (userPerm < 2) { + var u = basicBot.userUtilities.lookupUser(chat.uid); + if (u.lastEta !== null && (Date.now() - u.lastEta) < 1 * 60 * 60 * 1000) { + API.moderateDeleteChat(chat.cid); + return void (0); + } + else u.lastEta = Date.now(); + } } - else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); - } - } - }, - - lockguardCommand: { - command: 'lockguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.lockGuard) { - basicBot.settings.lockGuard = !basicBot.settings.lockGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockguard})); + var executed = false; + + for (var comm in basicBot.commands) { + var cmdCall = basicBot.commands[comm].command; + if (!Array.isArray(cmdCall)) { + cmdCall = [cmdCall] + } + for (var i = 0; i < cmdCall.length; i++) { + if (basicBot.settings.commandLiteral + cmdCall[i] === cmd) { + basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[i]); + executed = true; + break; + } + } } - else { - basicBot.settings.lockGuard = !basicBot.settings.lockGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockguard})); + + if (executed && userPerm === 0) { + basicBot.room.usercommand = false; + setTimeout(function () { + basicBot.room.usercommand = true; + }, basicBot.settings.commandCooldown * 1000); } - } - } - }, - - lockskipCommand: { - command: 'lockskip', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.skippable) { - var dj = API.getDJ(); - var id = dj.id; - var name = dj.username; - var msgSend = '@' + name + ': '; - basicBot.room.queueable = false; - - if (chat.message.length === cmd.length) { - API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); - basicBot.roomUtilities.booth.lockBooth(); - setTimeout(function (id) { - API.moderateForceSkip(); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); - basicBot.room.queueable = true; - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1500, id); - }, 1000, id); - return void (0); - } - var validReason = false; - var msg = chat.message; - var reason = msg.substring(cmd.length + 1); - for (var i = 0; i < basicBot.settings.lockskipReasons.length; i++) { - var r = basicBot.settings.lockskipReasons[i][0]; - if (reason.indexOf(r) !== -1) { - validReason = true; - msgSend += basicBot.settings.lockskipReasons[i][1]; - } - } - if (validReason) { - API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); - basicBot.roomUtilities.booth.lockBooth(); - setTimeout(function (id) { - API.moderateForceSkip(); - basicBot.room.skippable = false; - API.sendChat(msgSend); - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); - basicBot.room.queueable = true; - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1500, id); - }, 1000, id); - return void (0); - } + if (executed) { + /*if (basicBot.settings.cmdDeletion) { + API.moderateDeleteChat(chat.cid); + }*/ + + //basicBot.room.allcommand = false; + //setTimeout(function () { + basicBot.room.allcommand = true; + //}, 5 * 1000); } - } - } - }, - - locktimerCommand: { - command: 'locktimer', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var lockTime = msg.substring(cmd.length + 1); - if (!isNaN(lockTime) && lockTime !== "") { - basicBot.settings.maximumLocktime = lockTime; - return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, time: basicBot.settings.maximumLocktime})); + return executed; + }, + action: function (chat) { + var user = basicBot.userUtilities.lookupUser(chat.uid); + if (chat.type === 'message') { + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === chat.uid) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); + } + + } } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - logoutCommand: { - command: 'logout', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); - setTimeout(function () { - $(".logout").mousedown() - }, 1000); - } - } - }, - - maxlengthCommand: { - command: 'maxlength', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var maxTime = msg.substring(cmd.length + 1); - if (!isNaN(maxTime)) { - basicBot.settings.maximumSongLength = maxTime; - return API.sendChat(subChat(basicBot.chat.maxlengthtime, {name: chat.un, time: basicBot.settings.maximumSongLength})); + basicBot.room.roomstats.chatmessages++; + }, + spam: [ + 'hueh', 'hu3', 'brbr', 'heu', 'brbr', 'kkkk', 'spoder', 'mafia', 'zuera', 'zueira', + 'zueria', 'aehoo', 'aheu', 'alguem', 'algum', 'brazil', 'zoeira', 'fuckadmins', 'affff', 'vaisefoder', 'huenaarea', + 'hitler', 'ashua', 'ahsu', 'ashau', 'lulz', 'huehue', 'hue', 'huehuehue', 'merda', 'pqp', 'puta', 'mulher', 'pula', 'retarda', 'caralho', 'filha', 'ppk', + 'gringo', 'fuder', 'foder', 'hua', 'ahue', 'modafuka', 'modafoka', 'mudafuka', 'mudafoka', 'ooooooooooooooo', 'foda' + ], + curses: [ + 'nigger', 'faggot', 'nigga', 'niqqa', 'motherfucker', 'modafocka' + ] + }, + connectAPI: function () { + this.proxy = { + eventChat: $.proxy(this.eventChat, this), + eventUserskip: $.proxy(this.eventUserskip, this), + eventUserjoin: $.proxy(this.eventUserjoin, this), + eventUserleave: $.proxy(this.eventUserleave, this), + //eventFriendjoin: $.proxy(this.eventFriendjoin, this), + eventVoteupdate: $.proxy(this.eventVoteupdate, this), + eventCurateupdate: $.proxy(this.eventCurateupdate, this), + eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), + eventDjadvance: $.proxy(this.eventDjadvance, this), + //eventDjupdate: $.proxy(this.eventDjupdate, this), + eventWaitlistupdate: $.proxy(this.eventWaitlistupdate, this), + eventVoteskip: $.proxy(this.eventVoteskip, this), + eventModskip: $.proxy(this.eventModskip, this), + eventChatcommand: $.proxy(this.eventChatcommand, this), + eventHistoryupdate: $.proxy(this.eventHistoryupdate, this), + + }; + API.on(API.CHAT, this.proxy.eventChat); + API.on(API.USER_SKIP, this.proxy.eventUserskip); + API.on(API.USER_JOIN, this.proxy.eventUserjoin); + API.on(API.USER_LEAVE, this.proxy.eventUserleave); + API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); + API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); + API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); + API.on(API.ADVANCE, this.proxy.eventDjadvance); + API.on(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); + API.on(API.MOD_SKIP, this.proxy.eventModskip); + API.on(API.CHAT_COMMAND, this.proxy.eventChatcommand); + API.on(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); + }, + disconnectAPI: function () { + API.off(API.CHAT, this.proxy.eventChat); + API.off(API.USER_SKIP, this.proxy.eventUserskip); + API.off(API.USER_JOIN, this.proxy.eventUserjoin); + API.off(API.USER_LEAVE, this.proxy.eventUserleave); + API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); + API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); + API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); + API.off(API.ADVANCE, this.proxy.eventDjadvance); + API.off(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); + API.off(API.MOD_SKIP, this.proxy.eventModskip); + API.off(API.CHAT_COMMAND, this.proxy.eventChatcommand); + API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); + }, + startup: function () { + Function.prototype.toString = function () { + return 'Function.' + }; + var u = API.getUser(); + if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); + if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); + basicBot.connectAPI(); + API.moderateDeleteChat = function (cid) { + $.ajax({ + url: "https://plug.dj/_/chat/" + cid, + type: "DELETE" + }) + }; + + basicBot.room.name = window.location.pathname; + var Check; + + console.log(basicBot.room.name); + + var detect = function(){ + if(basicBot.room.name != window.location.pathname){ + console.log("Killing bot after room change."); + storeToStorage(); + basicBot.disconnectAPI(); + setTimeout(function () { + kill(); + }, 1000); + if (basicBot.settings.roomLock){ + window.location = 'https://plug.dj' + basicBot.room.name; + } + else { + clearInterval(Check); + } } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } + }; + + Check = setInterval(function(){ detect() }, 2000); + + retrieveSettings(); + retrieveFromStorage(); + window.bot = basicBot; + basicBot.roomUtilities.updateBlacklists(); + setInterval(basicBot.roomUtilities.updateBlacklists, 60 * 60 * 1000); + basicBot.getNewBlacklistedSongs = basicBot.roomUtilities.exportNewBlacklistedSongs; + basicBot.logNewBlacklistedSongs = basicBot.roomUtilities.logNewBlacklistedSongs; + if (basicBot.room.roomstats.launchTime === null) { + basicBot.room.roomstats.launchTime = Date.now(); } - }, - - motdCommand: { - command: 'motd', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat('/me MotD: ' + basicBot.settings.motd); - var argument = msg.substring(cmd.length + 1); - if (!basicBot.settings.motdEnabled) basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - if (isNaN(argument)) { - basicBot.settings.motd = argument; - API.sendChat(subChat(basicBot.chat.motdset, {msg: basicBot.settings.motd})); - } - else { - basicBot.settings.motdInterval = argument; - API.sendChat(subChat(basicBot.chat.motdintervalset, {interval: basicBot.settings.motdInterval})); + + for (var j = 0; j < basicBot.room.users.length; j++) { + basicBot.room.users[j].inRoom = false; + } + var userlist = API.getUsers(); + for (var i = 0; i < userlist.length; i++) { + var known = false; + var ind = null; + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.room.users[j].id === userlist[i].id) { + known = true; + ind = j; + } } - } - } - }, - - moveCommand: { - command: 'move', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var firstSpace = msg.indexOf(' '); - var lastSpace = msg.lastIndexOf(' '); - var pos; - var name; - if (isNaN(parseInt(msg.substring(lastSpace + 1)))) { - pos = 1; - name = msg.substring(cmd.length + 2); + if (known) { + basicBot.room.users[ind].inRoom = true; } else { - pos = parseInt(msg.substring(lastSpace + 1)); - name = msg.substring(cmd.length + 2, lastSpace); - } - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - if (user.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbotwaitlist, {name: chat.un})); - if (!isNaN(pos)) { - API.sendChat(subChat(basicBot.chat.move, {name: chat.un})); - basicBot.userUtilities.moveUser(user.id, pos, false); - } else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); - } + basicBot.room.users.push(new basicBot.User(userlist[i].id, userlist[i].username)); + ind = basicBot.room.users.length - 1; + } + var wlIndex = API.getWaitListPosition(basicBot.room.users[ind].id) + 1; + basicBot.userUtilities.updatePosition(basicBot.room.users[ind], wlIndex); + } + basicBot.room.afkInterval = setInterval(function () { + basicBot.roomUtilities.afkCheck() + }, 10 * 1000); + basicBot.room.autodisableInterval = setInterval(function () { + basicBot.room.autodisableFunc(); + }, 60 * 60 * 1000); + basicBot.loggedInID = API.getUser().id; + basicBot.status = true; + API.sendChat('/cap ' + basicBot.settings.startupCap); + API.setVolume(basicBot.settings.startupVolume); + if (basicBot.settings.autowoot) { + $("#woot").click(); + } + if (basicBot.settings.startupEmoji) { + var emojibuttonoff = $(".icon-emoji-off"); + if (emojibuttonoff.length > 0) { + emojibuttonoff[0].click(); + } + API.chatLog(':smile: Emojis enabled.'); } - }, - - muteCommand: { - command: 'mute', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var lastSpace = msg.lastIndexOf(' '); - var time = null; - var name; - if (lastSpace === msg.indexOf(' ')) { - name = msg.substring(cmd.length + 2); - time = 45; - } - else { - time = msg.substring(lastSpace + 1); - if (isNaN(time) || time == "" || time == null || typeof time == "undefined") { - return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - name = msg.substring(cmd.length + 2, lastSpace); - } - var from = chat.un; - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - var permUser = basicBot.userUtilities.getPermission(user.id); - if (permFrom > permUser) { - /* - basicBot.room.mutedUsers.push(user.id); - if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); - else { - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === id) { - indexMuted = i; - wasMuted = true; - } - } - if (indexMuted > -1) { - basicBot.room.mutedUsers.splice(indexMuted); - var u = basicBot.userUtilities.lookupUser(id); - var name = u.username; - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - }, time * 60 * 1000, user.id); - } - */ - if (time > 45) { - API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - } - else if (time === 45) { - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - - } - else if (time > 30) { - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } - else if (time > 15) { - API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } - else { - API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } + else { + var emojibuttonon = $(".icon-emoji-on"); + if (emojibuttonon.length > 0) { + emojibuttonon[0].click(); } - else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); - } - } - }, - - opCommand: { - command: 'op', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.opLink === "string") - return API.sendChat(subChat(basicBot.chat.oplist, {link: basicBot.settings.opLink})); - } + API.chatLog('Emojis disabled.'); } - }, - - pingCommand: { - command: 'ping', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.pong) - } - } - }, - - refreshCommand: { - command: 'refresh', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - sendToSocket(); - storeToStorage(); - basicBot.disconnectAPI(); - setTimeout(function () { - window.location.reload(false); - }, 1000); + API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); + API.chatLog('Volume set to ' + basicBot.settings.startupVolume); + socket(); + loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); + }, + commands: { + executable: function (minRank, chat) { + var id = chat.uid; + var perm = basicBot.userUtilities.getPermission(id); + var minPerm; + switch (minRank) { + case 'admin': + minPerm = 10; + break; + case 'ambassador': + minPerm = 7; + break; + case 'host': + minPerm = 5; + break; + case 'cohost': + minPerm = 4; + break; + case 'manager': + minPerm = 3; + break; + case 'mod': + if (basicBot.settings.bouncerPlus) { + minPerm = 2; + } + else { + minPerm = 3; + } + break; + case 'bouncer': + minPerm = 2; + break; + case 'residentdj': + minPerm = 1; + break; + case 'user': + minPerm = 0; + break; + default: + API.chatLog('error assigning minimum permission'); + } + return perm >= minPerm; - } - } - }, - - reloadCommand: { - command: 'reload', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.reload); - sendToSocket(); - storeToStorage(); - basicBot.disconnectAPI(); - kill(); - setTimeout(function () { - $.getScript(basicBot.scriptLink); - }, 2000); - } - } - }, - - removeCommand: { - command: 'remove', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length > cmd.length + 2) { - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user !== 'boolean') { - user.lastDC = { - time: null, - position: null, - songCount: 0 - }; - if (API.getDJ().id === user.id) { - API.moderateForceSkip(); - setTimeout(function () { - API.moderateRemoveDJ(user.id); - }, 1 * 1000, user); - } - else API.moderateRemoveDJ(user.id); - } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); - } else API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - } - } - }, - - restrictetaCommand: { - command: 'restricteta', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.etaRestriction) { - basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.etarestriction})); - } - else { - basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.etarestriction})); + }, + /** + command: { + command: 'cmd', + rank: 'user/bouncer/mod/manager', + type: 'startsWith/exact', + functionality: function(chat, cmd){ + if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if( !basicBot.commands.executable(this.rank, chat) ) return void (0); + else{ + + } + } + }, + **/ + + activeCommand: { + command: 'active', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var now = Date.now(); + var chatters = 0; + var time; + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + var since = durationOnline / 1000; + + if (msg.length === cmd.length) time = since; + else { + time = msg.substring(cmd.length + 1); + if (isNaN(time)) return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + for (var i = 0; i < basicBot.room.users.length; i++) { + userTime = basicBot.userUtilities.getLastActivity(basicBot.room.users[i]); + if ((now - userTime) <= (time * 60 * 1000)) { + chatters++; + } + } + API.sendChat(subChat(basicBot.chat.activeusersintime, {name: chat.un, amount: chatters, time: time})); + } } - } - } - }, - - rouletteCommand: { - command: 'roulette', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (!basicBot.room.roulette.rouletteStatus) { - basicBot.room.roulette.startRoulette(); - } - } - } - }, - - rulesCommand: { - command: 'rules', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.rulesLink === "string") - return API.sendChat(subChat(basicBot.chat.roomrules, {link: basicBot.settings.rulesLink})); - } - } - }, - - sessionstatsCommand: { - command: 'sessionstats', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var from = chat.un; - var woots = basicBot.room.roomstats.totalWoots; - var mehs = basicBot.room.roomstats.totalMehs; - var grabs = basicBot.room.roomstats.totalCurates; - API.sendChat(subChat(basicBot.chat.sessionstats, {name: from, woots: woots, mehs: mehs, grabs: grabs})); - } - } - }, - - skipCommand: { - command: ['skip', 'smartskip'], - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.skippable) { - - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - var dj = API.getDJ(); - var name = dj.username; - var msgSend = '@' + name + ', '; - - if (chat.message.length === cmd.length) { - API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); + }, + + addCommand: { + command: 'add', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (msg.length > cmd.length + 2) { + if (typeof user !== 'undefined') { + if (basicBot.room.roomevent) { + basicBot.room.eventArtists.push(user.id); + } + API.moderateAddDJ(user.id); + } else API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + } } + } + }, + + afklimitCommand: { + command: 'afklimit', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - API.moderateForceSkip(); + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolimitspecified, {name: chat.un})); + var limit = msg.substring(cmd.length + 1); + if (!isNaN(limit)) { + basicBot.settings.maximumAfk = parseInt(limit, 10); + API.sendChat(subChat(basicBot.chat.maximumafktimeset, {name: chat.un, time: basicBot.settings.maximumAfk})); + } + else API.sendChat(subChat(basicBot.chat.invalidlimitspecified, {name: chat.un})); } - } - var validReason = false; - var msg = chat.message; - var reason = msg.substring(cmd.length + 1); - for (var i = 0; i < basicBot.settings.skipReasons.length; i++) { - var r = basicBot.settings.skipReasons[i][0]; - if (reason.indexOf(r) !== -1) { - validReason = true; - msgSend += basicBot.settings.skipReasons[i][1]; + } + }, + + afkremovalCommand: { + command: 'afkremoval', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.afkRemoval) { + basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; + clearInterval(basicBot.room.afkInterval); + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.afkremoval})); + } + else { + basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; + basicBot.room.afkInterval = setInterval(function () { + basicBot.roomUtilities.afkCheck() + }, 2 * 1000); + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.afkremoval})); + } } - } - if (validReason) { - API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(msgSend); + } + }, + + afkresetCommand: { + command: 'afkreset', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + basicBot.userUtilities.setLastActivity(user); + API.sendChat(subChat(basicBot.chat.afkstatusreset, {name: chat.un, username: name})); } + } + }, + + afktimeCommand: { + command: 'afktime', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - API.moderateForceSkip(); - setTimeout(function () { - API.sendChat(msgSend); - }, 500); + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var lastActive = basicBot.userUtilities.getLastActivity(user); + var inactivity = Date.now() - lastActive; + var time = basicBot.roomUtilities.msToStr(inactivity); + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + + if (inactivity == durationOnline){ + API.sendChat(subChat(basicBot.chat.inactivelonger, {botname: basicBot.settings.botName, name: chat.un, username: name})); + } else { + API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); + } } - } } - } - } - }, - - skipposCommand: { - command: 'skippos', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var pos = msg.substring(cmd.length + 1); - if (!isNaN(pos)) { - basicBot.settings.skipPosition = pos; - return API.sendChat(subChat(basicBot.chat.skippos, {name: chat.un, position: basicBot.settings.skipPosition})); + }, + + autodisableCommand: { + command: 'autodisable', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.autodisable) { + basicBot.settings.autodisable = !basicBot.settings.autodisable; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autodisable})); + } + else { + basicBot.settings.autodisable = !basicBot.settings.autodisable; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autodisable})); + } + + } } - else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); - } - } - }, - - songstatsCommand: { - command: 'songstats', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.songstats) { - basicBot.settings.songstats = !basicBot.settings.songstats; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.songstats})); + }, + + autoskipCommand: { + command: 'autoskip', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.autoskip) { + basicBot.settings.autoskip = !basicBot.settings.autoskip; + clearTimeout(basicBot.room.autoskipTimer); + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); + } + else { + basicBot.settings.autoskip = !basicBot.settings.autoskip; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); + } + } } - else { - basicBot.settings.songstats = !basicBot.settings.songstats; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.songstats})); + }, + + autowootCommand: { + command: 'autowoot', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.autowoot); + } } - } - } - }, - - sourceCommand: { - command: 'source', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat('/me This bot was created by ' + botCreator + ', but is now maintained by ' + botMaintainer + "."); - } - } - }, - - statusCommand: { - command: 'status', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var from = chat.un; - var msg = '[@' + from + '] '; - - msg += basicBot.chat.afkremoval + ': '; - if (basicBot.settings.afkRemoval) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - msg += basicBot.chat.afksremoved + ": " + basicBot.room.afkList.length + '. '; - msg += basicBot.chat.afklimit + ': ' + basicBot.settings.maximumAfk + '. '; - - msg += 'Bouncer+: '; - if (basicBot.settings.bouncerPlus) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.blacklist + ': '; - if (basicBot.settings.blacklistEnabled) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.lockguard + ': '; - if (basicBot.settings.lockGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.cycleguard + ': '; - if (basicBot.settings.cycleGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.timeguard + ': '; - if (basicBot.settings.timeGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.chatfilter + ': '; - if (basicBot.settings.filterChat) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.historyskip + ': '; - if (basicBot.settings.historySkip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.voteskip + ': '; - if (basicBot.settings.voteSkip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.cmddeletion + ': '; - if (basicBot.settings.cmdDeletion) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.autoskip + ': '; - if (basicBot.settings.autoskip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - // TODO: Display more toggleable bot settings. - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - var since = basicBot.roomUtilities.msToStr(durationOnline); - msg += subChat(basicBot.chat.activefor, {time: since}); - - /* - // least efficient way to go about this, but it works :) - if (msg.length > 256){ - firstpart = msg.substr(0, 256); - secondpart = msg.substr(256); - API.sendChat(firstpart); - setTimeout(function () { - API.sendChat(secondpart); - }, 300); + }, + + baCommand: { + command: 'ba', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.brandambassador); + } } - else { - API.sendChat(msg); + }, + + ballCommand: { + command: ['8ball', 'ask'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var crowd = API.getUsers(); + var msg = chat.message; + var argument = msg.substring(cmd.length + 1).replace(/@/g, ''); + var randomUser = Math.floor(Math.random() * crowd.length); + var randomBall = Math.floor(Math.random() * basicBot.chat.balls.length); + var randomSentence = Math.floor(Math.random() * 1); + API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.chat.balls[randomBall]})); + } } - */ + }, - // This is a more efficient solution - if (msg.length > 241){ - var split = msg.match(/.{1,241}/g); - for (var i = 0; i < split.length; i++) { - var func = function(index) { - setTimeout(function() { - API.sendChat("/me " + split[index]); - }, 500 * index); + banCommand: { + command: 'ban', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + API.moderateBanUser(user.id, 1, API.BAN.DAY); } - func(i); - } - } - else { - return API.sendChat(msg); } - } - } - }, - - swapCommand: { - command: 'swap', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var firstSpace = msg.indexOf(' '); - var lastSpace = msg.lastIndexOf(' '); - var name1 = msg.substring(cmd.length + 2, lastSpace); - var name2 = msg.substring(lastSpace + 2); - var user1 = basicBot.userUtilities.lookupUserName(name1); - var user2 = basicBot.userUtilities.lookupUserName(name2); - if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); - if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); - var p1 = API.getWaitListPosition(user1.id) + 1; - var p2 = API.getWaitListPosition(user2.id) + 1; - if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); - API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); - if (p1 < p2) { - basicBot.userUtilities.moveUser(user2.id, p1, false); - setTimeout(function (user1, p2) { - basicBot.userUtilities.moveUser(user1.id, p2, false); - }, 2000, user1, p2); + }, + + blacklistCommand: { + command: ['blacklist', 'bl'], + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolistspecified, {name: chat.un})); + var list = msg.substr(cmd.length + 1); + if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); + else { + var media = API.getMedia(); + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + var track = { + list: list, + author: media.author, + title: media.title, + mid: media.format + ':' + media.cid + }; + basicBot.room.newBlacklisted.push(track); + basicBot.room.blacklists[list].push(media.format + ':' + media.cid); + API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { + basicBot.room.newBlacklistedSongFunction(track); + } + } + } } - else { - basicBot.userUtilities.moveUser(user1.id, p2, false); - setTimeout(function (user2, p1) { - basicBot.userUtilities.moveUser(user2.id, p1, false); - }, 2000, user2, p1); + }, + + blinfoCommand: { + command: 'blinfo', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var author = API.getMedia().author; + var title = API.getMedia().title; + var name = chat.un; + var format = API.getMedia().format; + var cid = API.getMedia().cid; + var songid = format + ":" + cid; + + API.sendChat(subChat(basicBot.chat.blinfo, {name: name, author: author, title: title, songid: songid})); + } } - } - } - }, - - themeCommand: { - command: 'theme', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.themeLink === "string") - API.sendChat(subChat(basicBot.chat.genres, {link: basicBot.settings.themeLink})); - } - } - }, - - timeguardCommand: { - command: 'timeguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.timeGuard) { - basicBot.settings.timeGuard = !basicBot.settings.timeGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.timeguard})); + }, + + bouncerPlusCommand: { + command: 'bouncer+', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (basicBot.settings.bouncerPlus) { + basicBot.settings.bouncerPlus = false; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': 'Bouncer+'})); + } + else { + if (!basicBot.settings.bouncerPlus) { + var id = chat.uid; + var perm = basicBot.userUtilities.getPermission(id); + if (perm > 2) { + basicBot.settings.bouncerPlus = true; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': 'Bouncer+'})); + } + } + else return API.sendChat(subChat(basicBot.chat.bouncerplusrank, {name: chat.un})); + } + } } - else { - basicBot.settings.timeGuard = !basicBot.settings.timeGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.timeguard})); + }, + + botnameCommand: { + command: 'botname', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentbotname, {botname: basicBot.settings.botName})); + var argument = msg.substring(cmd.length + 1); + if (argument) { + basicBot.settings.botName = argument; + API.sendChat(subChat(basicBot.chat.botnameset, {botName: basicBot.settings.botName})); + } + } } + }, - } - } - }, - - toggleblCommand: { - command: 'togglebl', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var temp = basicBot.settings.blacklistEnabled; - basicBot.settings.blacklistEnabled = !temp; - if (basicBot.settings.blacklistEnabled) { - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.blacklist})); - } - else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.blacklist})); - } - } - }, - - togglemotdCommand: { - command: 'togglemotd', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.motdEnabled) { - basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.motd})); + clearchatCommand: { + command: 'clearchat', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var currentchat = $('#chat-messages').children(); + for (var i = 0; i < currentchat.length; i++) { + API.moderateDeleteChat(currentchat[i].getAttribute("data-cid")); + } + return API.sendChat(subChat(basicBot.chat.chatcleared, {name: chat.un})); + } } - else { - basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.motd})); + }, + + commandsCommand: { + command: 'commands', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); + } } - } - } - }, - - togglevoteskipCommand: { - command: 'togglevoteskip', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.voteSkip) { - basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); + }, + + cmddeletionCommand: { + command: ['commanddeletion', 'cmddeletion', 'cmddel'], + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.cmdDeletion) { + basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + } + else { + basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + } + } } - else { - basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); + }, + + cookieCommand: { + command: 'cookie', + rank: 'user', + type: 'startsWith', + getCookie: function (chat) { + var c = Math.floor(Math.random() * basicBot.chat.cookies.length); + return basicBot.chat.cookies[c]; + }, + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + + var space = msg.indexOf(' '); + if (space === -1) { + API.sendChat(basicBot.chat.eatcookie); + return false; + } + else { + var name = msg.substring(space + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false || !user.inRoom) { + return API.sendChat(subChat(basicBot.chat.nousercookie, {name: name})); + } + else if (user.username === chat.un) { + return API.sendChat(subChat(basicBot.chat.selfcookie, {name: name})); + } + else { + return API.sendChat(subChat(basicBot.chat.cookie, {nameto: user.username, namefrom: chat.un, cookie: this.getCookie()})); + } + } + } } - } - } - }, - - unbanCommand: { - command: 'unban', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - $(".icon-population").click(); - $(".icon-ban").click(); - setTimeout(function (chat) { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(); - var name = msg.substring(cmd.length + 2); - var bannedUsers = API.getBannedUsers(); - var found = false; - var bannedUser = null; - for (var i = 0; i < bannedUsers.length; i++) { - var user = bannedUsers[i]; - if (user.username === name) { - bannedUser = user; - found = true; - } - } - if (!found) { - $(".icon-chat").click(); - return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); - } - API.moderateUnbanUser(bannedUser.id); - console.log("Unbanned " + name); - setTimeout(function () { - $(".icon-chat").click(); - }, 1000); - }, 1000, chat); - } - } - }, - - unlockCommand: { - command: 'unlock', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.booth.unlockBooth(); - } - } - }, - - unmuteCommand: { - command: 'unmute', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - /** - if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { - if (permFrom > 2) { - basicBot.room.mutedUsers = []; - return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); - } - else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); - } - **/ - var from = chat.un; - var name = msg.substr(cmd.length + 2); - - var user = basicBot.userUtilities.lookupUserName(name); - - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - - var permUser = basicBot.userUtilities.getPermission(user.id); - if (permFrom > permUser) { - /* - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === user.id) { - indexMuted = i; - wasMuted = true; - } - - } - if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); - basicBot.room.mutedUsers.splice(indexMuted); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - */ - try { - API.moderateUnmuteUser(user.id); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - catch (e) { - API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); - } - } - else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); - } - } - }, - - usercmdcdCommand: { - command: 'usercmdcd', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var cd = msg.substring(cmd.length + 1); - if (!isNaN(cd)) { - basicBot.settings.commandCooldown = cd; - return API.sendChat(subChat(basicBot.chat.commandscd, {name: chat.un, time: basicBot.settings.commandCooldown})); + }, + + cycleCommand: { + command: 'cycle', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.changeDJCycle(); + } } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - usercommandsCommand: { - command: 'usercommands', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.usercommandsEnabled) { - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.usercommands})); - basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; + }, + + cycleguardCommand: { + command: 'cycleguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.cycleGuard) { + basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cycleguard})); + } + else { + basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cycleguard})); + } + + } } - else { - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.usercommands})); - basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; + }, + + cycletimerCommand: { + command: 'cycletimer', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var cycleTime = msg.substring(cmd.length + 1); + if (!isNaN(cycleTime) && cycleTime !== "") { + basicBot.settings.maximumCycletime = cycleTime; + return API.sendChat(subChat(basicBot.chat.cycleguardtime, {name: chat.un, time: basicBot.settings.maximumCycletime})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + + } } - } - } - }, - - voteratioCommand: { - command: 'voteratio', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false) return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var vratio = user.votes; - var ratio = vratio.woot / vratio.meh; - API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woot: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); - } - } - }, - - voteskipCommand: { - command: 'voteskip', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); - var argument = msg.substring(cmd.length + 1); - if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - if (isNaN(argument)) { - API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); + }, + + dclookupCommand: { + command: ['dclookup', 'dc'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substring(cmd.length + 2); + var perm = basicBot.userUtilities.getPermission(chat.uid); + if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var toChat = basicBot.userUtilities.dclookup(user.id); + API.sendChat(toChat); + } } - else { - basicBot.settings.voteSkipLimit = argument; - API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); + }, + + /*deletechatCommand: { + command: 'deletechat', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var chats = $('.from'); + var message = $('.message'); + var emote = $('.emote'); + var from = $('.un.clickable'); + for (var i = 0; i < chats.length; i++) { + var n = from[i].textContent; + if (name.trim() === n.trim()) { + + // var messagecid = $(message)[i].getAttribute('data-cid'); + // var emotecid = $(emote)[i].getAttribute('data-cid'); + // API.moderateDeleteChat(messagecid); + + // try { + // API.moderateDeleteChat(messagecid); + // } + // finally { + // API.moderateDeleteChat(emotecid); + // } + + if (typeof $(message)[i].getAttribute('data-cid') == "undefined"){ + API.moderateDeleteChat($(emote)[i].getAttribute('data-cid')); // works well with normal messages but not with emotes due to emotes and messages are seperate. + } else { + API.moderateDeleteChat($(message)[i].getAttribute('data-cid')); + } + } + } + API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); + } } - } - } - }, - - welcomeCommand: { - command: 'welcome', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.welcome) { - basicBot.settings.welcome = !basicBot.settings.welcome; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + },*/ + + emojiCommand: { + command: 'emoji', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var link = 'http://www.emoji-cheat-sheet.com/'; + API.sendChat(subChat(basicBot.chat.emojilist, {link: link})); + } } - else { - basicBot.settings.welcome = !basicBot.settings.welcome; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + }, + + englishCommand: { + command: 'english', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if(chat.message.length === cmd.length) return API.sendChat('/me No user specified.'); + var name = chat.message.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if(typeof user === 'boolean') return API.sendChat('/me Invalid user specified.'); + var lang = basicBot.userUtilities.getUser(user).language; + var ch = '/me @' + name + ' '; + switch(lang){ + case 'en': break; + case 'da': ch += 'Vær venlig at tale engelsk.'; break; + case 'de': ch += 'Bitte sprechen Sie Englisch.'; break; + case 'es': ch += 'Por favor, hable Inglés.'; break; + case 'fr': ch += 'Parlez anglais, s\'il vous plaît.'; break; + case 'nl': ch += 'Spreek Engels, alstublieft.'; break; + case 'pl': ch += 'Proszę mówić po angielsku.'; break; + case 'pt': ch += 'Por favor, fale Inglês.'; break; + case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; + case 'cs': ch += 'Mluvte prosím anglicky.'; break; + case 'sr': ch += 'Молим Вас, говорите енглески.'; break; + } + ch += ' English please.'; + API.sendChat(ch); + } + } + }, + + etaCommand: { + command: 'eta', + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var perm = basicBot.userUtilities.getPermission(chat.uid); + var msg = chat.message; + var dj = API.getDJ().username; + var name; + if (msg.length > cmd.length) { + if (perm < 2) return void (0); + name = msg.substring(cmd.length + 2); + } else name = chat.un; + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var pos = API.getWaitListPosition(user.id); + var realpos = pos + 1; + if (name == dj) return API.sendChat(subChat(basicBot.chat.youaredj, {name: name})); + if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); + if (pos == 0) return API.sendChat(subChat(basicBot.chat.youarenext, {name: name})); + var timeRemaining = API.getTimeRemaining(); + var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; + var estimateString = basicBot.roomUtilities.msToStr(estimateMS); + API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString, position: realpos})); + } + } + }, + + fbCommand: { + command: 'fb', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.fbLink === "string") + API.sendChat(subChat(basicBot.chat.facebook, {link: basicBot.settings.fbLink})); + } + } + }, + + filterCommand: { + command: 'filter', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.filterChat) { + basicBot.settings.filterChat = !basicBot.settings.filterChat; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.chatfilter})); + } + else { + basicBot.settings.filterChat = !basicBot.settings.filterChat; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.chatfilter})); + } + } + } + }, + + forceskipCommand: { + command: ['forceskip', 'fs'], + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.forceskip, {name: chat.un})); + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + + } + } + }, + + ghostbusterCommand: { + command: 'ghostbuster', + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substr(cmd.length + 2); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false || !user.inRoom) { + return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); + } + else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); + } + } + }, + + gifCommand: { + command: ['gif', 'giphy'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length !== cmd.length) { + function get_id(api_key, fixedtag, func) + { + $.getJSON( + "https://tv.giphy.com/v1/gifs/random?", + { + "format": "json", + "api_key": api_key, + "rating": rating, + "tag": fixedtag + }, + function(response) + { + func(response.data.id); + } + ) + } + var api_key = "dc6zaTOxFJmzC"; // public beta key + var rating = "pg-13"; // PG 13 gifs + var tag = msg.substr(cmd.length + 1); + var fixedtag = tag.replace(/ /g,"+"); + var commatag = tag.replace(/ /g,", "); + get_id(api_key, tag, function(id) { + if (typeof id !== 'undefined') { + API.sendChat(subChat(basicBot.chat.validgiftags, {name: chat.un, id: id, tags: commatag})); + } else { + API.sendChat(subChat(basicBot.chat.invalidgiftags, {name: chat.un, tags: commatag})); + } + }); + } + else { + function get_random_id(api_key, func) + { + $.getJSON( + "https://tv.giphy.com/v1/gifs/random?", + { + "format": "json", + "api_key": api_key, + "rating": rating + }, + function(response) + { + func(response.data.id); + } + ) + } + var api_key = "dc6zaTOxFJmzC"; // public beta key + var rating = "pg-13"; // PG 13 gifs + get_random_id(api_key, function(id) { + if (typeof id !== 'undefined') { + API.sendChat(subChat(basicBot.chat.validgifrandom, {name: chat.un, id: id})); + } else { + API.sendChat(subChat(basicBot.chat.invalidgifrandom, {name: chat.un})); + } + }); + } + } + } + }, + + helpCommand: { + command: 'help', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var link = "(Updated link coming soon)"; + API.sendChat(subChat(basicBot.chat.starterhelp, {link: link})); + } + } + }, + + historyskipCommand: { + command: 'historyskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.historySkip) { + basicBot.settings.historySkip = !basicBot.settings.historySkip; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.historyskip})); + } + else { + basicBot.settings.historySkip = !basicBot.settings.historySkip; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.historyskip})); + } + } + } + }, + + joinCommand: { + command: 'join', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.roulette.rouletteStatus && basicBot.room.roulette.participants.indexOf(chat.uid) < 0) { + basicBot.room.roulette.participants.push(chat.uid); + API.sendChat(subChat(basicBot.chat.roulettejoin, {name: chat.un})); + } + } + } + }, + + jointimeCommand: { + command: 'jointime', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var join = basicBot.userUtilities.getJointime(user); + var time = Date.now() - join; + var timeString = basicBot.roomUtilities.msToStr(time); + API.sendChat(subChat(basicBot.chat.jointime, {namefrom: chat.un, username: name, time: timeString})); + } + } + }, + + kickCommand: { + command: 'kick', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var lastSpace = msg.lastIndexOf(' '); + var time; + var name; + if (lastSpace === msg.indexOf(' ')) { + time = 0.25; + name = msg.substring(cmd.length + 2); + } + else { + time = msg.substring(lastSpace + 1); + name = msg.substring(cmd.length + 2, lastSpace); + } + + var user = basicBot.userUtilities.lookupUserName(name); + var from = chat.un; + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permTokick = basicBot.userUtilities.getPermission(user.id); + + if (permFrom <= permTokick) + return API.sendChat(subChat(basicBot.chat.kickrank, {name: chat.un})); + + if (!isNaN(time)) { + API.sendChat(subChat(basicBot.chat.kick, {name: chat.un, username: name, time: time})); + if (time > 24 * 60 * 60) API.moderateBanUser(user.id, 1, API.BAN.PERMA); + else API.moderateBanUser(user.id, 1, API.BAN.DAY); + setTimeout(function (id, name) { + API.moderateUnbanUser(id); + console.log('Unbanned @' + name + '. (' + id + ')'); + }, time * 60 * 1000, user.id, name); + } + else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + killCommand: { + command: 'kill', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + storeToStorage(); + sendToSocket(); + API.sendChat(basicBot.chat.kill); + basicBot.disconnectAPI(); + setTimeout(function () { + kill(); + }, 1000); + } + } + }, + + languageCommand: { + command: 'language', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); + var argument = msg.substring(cmd.length + 1); + + $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { + var langIndex = json; + var link = langIndex[argument.toLowerCase()]; + if (typeof link === "undefined") { + API.sendChat(subChat(basicBot.chat.langerror, {link: "http://git.io/vJ9nI"})); + } + else { + basicBot.settings.language = argument; + loadChat(); + API.sendChat(subChat(basicBot.chat.langset, {language: basicBot.settings.language})); + } + }); + } + } + }, + + leaveCommand: { + command: 'leave', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var ind = basicBot.room.roulette.participants.indexOf(chat.uid); + if (ind > -1) { + basicBot.room.roulette.participants.splice(ind, 1); + API.sendChat(subChat(basicBot.chat.rouletteleave, {name: chat.un})); + } + } + } + }, + + linkCommand: { + command: 'link', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var media = API.getMedia(); + var from = chat.un; + var user = basicBot.userUtilities.lookupUser(chat.uid); + var perm = basicBot.userUtilities.getPermission(chat.uid); + var dj = API.getDJ().id; + var isDj = false; + if (dj === chat.uid) isDj = true; + if (perm >= 1 || isDj) { + if (media.format === 1) { + var linkToSong = "http://youtu.be/" + media.cid; + API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); + } + if (media.format === 2) { + SC.get('/tracks/' + media.cid, function (sound) { + API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: sound.permalink_url})); + }); + } + } + } + } + }, + + lockCommand: { + command: 'lock', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.booth.lockBooth(); + } + } + }, + + lockdownCommand: { + command: 'lockdown', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var temp = basicBot.settings.lockdownEnabled; + basicBot.settings.lockdownEnabled = !temp; + if (basicBot.settings.lockdownEnabled) { + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockdown})); + } + else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); + } + } + }, + + lockguardCommand: { + command: 'lockguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.lockGuard) { + basicBot.settings.lockGuard = !basicBot.settings.lockGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockguard})); + } + else { + basicBot.settings.lockGuard = !basicBot.settings.lockGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockguard})); + } + } + } + }, + + lockskipCommand: { + command: 'lockskip', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.skippable) { + var dj = API.getDJ(); + var id = dj.id; + var name = dj.username; + var msgSend = '@' + name + ': '; + basicBot.room.queueable = false; + + if (chat.message.length === cmd.length) { + API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); + basicBot.roomUtilities.booth.lockBooth(); + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1500, id); + }, 1000, id); + return void (0); + } + var validReason = false; + var msg = chat.message; + var reason = msg.substring(cmd.length + 1); + for (var i = 0; i < basicBot.settings.lockskipReasons.length; i++) { + var r = basicBot.settings.lockskipReasons[i][0]; + if (reason.indexOf(r) !== -1) { + validReason = true; + msgSend += basicBot.settings.lockskipReasons[i][1]; + } + } + if (validReason) { + API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); + basicBot.roomUtilities.booth.lockBooth(); + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + API.sendChat(msgSend); + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1500, id); + }, 1000, id); + return void (0); + } + } + } + } + }, + + locktimerCommand: { + command: 'locktimer', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var lockTime = msg.substring(cmd.length + 1); + if (!isNaN(lockTime) && lockTime !== "") { + basicBot.settings.maximumLocktime = lockTime; + return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, time: basicBot.settings.maximumLocktime})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + logoutCommand: { + command: 'logout', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); + setTimeout(function () { + $(".logout").mousedown() + }, 1000); + } + } + }, + + maxlengthCommand: { + command: 'maxlength', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var maxTime = msg.substring(cmd.length + 1); + if (!isNaN(maxTime)) { + basicBot.settings.maximumSongLength = maxTime; + return API.sendChat(subChat(basicBot.chat.maxlengthtime, {name: chat.un, time: basicBot.settings.maximumSongLength})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + motdCommand: { + command: 'motd', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat('/me MotD: ' + basicBot.settings.motd); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.motdEnabled) basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + if (isNaN(argument)) { + basicBot.settings.motd = argument; + API.sendChat(subChat(basicBot.chat.motdset, {msg: basicBot.settings.motd})); + } + else { + basicBot.settings.motdInterval = argument; + API.sendChat(subChat(basicBot.chat.motdintervalset, {interval: basicBot.settings.motdInterval})); + } + } + } + }, + + moveCommand: { + command: 'move', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var firstSpace = msg.indexOf(' '); + var lastSpace = msg.lastIndexOf(' '); + var pos; + var name; + if (isNaN(parseInt(msg.substring(lastSpace + 1)))) { + pos = 1; + name = msg.substring(cmd.length + 2); + } + else { + pos = parseInt(msg.substring(lastSpace + 1)); + name = msg.substring(cmd.length + 2, lastSpace); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + if (user.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbotwaitlist, {name: chat.un})); + if (!isNaN(pos)) { + API.sendChat(subChat(basicBot.chat.move, {name: chat.un})); + basicBot.userUtilities.moveUser(user.id, pos, false); + } else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); + } + } + }, + + muteCommand: { + command: 'mute', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var lastSpace = msg.lastIndexOf(' '); + var time = null; + var name; + if (lastSpace === msg.indexOf(' ')) { + name = msg.substring(cmd.length + 2); + time = 45; + } + else { + time = msg.substring(lastSpace + 1); + if (isNaN(time) || time == "" || time == null || typeof time == "undefined") { + return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + name = msg.substring(cmd.length + 2, lastSpace); + } + var from = chat.un; + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permFrom > permUser) { + /* + basicBot.room.mutedUsers.push(user.id); + if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); + else { + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === id) { + indexMuted = i; + wasMuted = true; + } + } + if (indexMuted > -1) { + basicBot.room.mutedUsers.splice(indexMuted); + var u = basicBot.userUtilities.lookupUser(id); + var name = u.username; + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + }, time * 60 * 1000, user.id); + } + */ + if (time > 45) { + API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + } + else if (time === 45) { + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + + } + else if (time > 30) { + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + else if (time > 15) { + API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + else { + API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + } + else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); + } + } + }, + + opCommand: { + command: 'op', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.opLink === "string") + return API.sendChat(subChat(basicBot.chat.oplist, {link: basicBot.settings.opLink})); + } + } + }, + + pingCommand: { + command: 'ping', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.pong) + } + } + }, + + refreshCommand: { + command: 'refresh', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + sendToSocket(); + storeToStorage(); + basicBot.disconnectAPI(); + setTimeout(function () { + window.location.reload(false); + }, 1000); + + } + } + }, + + reloadCommand: { + command: 'reload', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.reload); + sendToSocket(); + storeToStorage(); + basicBot.disconnectAPI(); + kill(); + setTimeout(function () { + $.getScript(basicBot.scriptLink); + }, 2000); + } + } + }, + + removeCommand: { + command: 'remove', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length > cmd.length + 2) { + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user !== 'boolean') { + user.lastDC = { + time: null, + position: null, + songCount: 0 + }; + if (API.getDJ().id === user.id) { + API.moderateForceSkip(); + setTimeout(function () { + API.moderateRemoveDJ(user.id); + }, 1 * 1000, user); + } + else API.moderateRemoveDJ(user.id); + } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); + } else API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + } + } + }, + + restrictetaCommand: { + command: 'restricteta', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.etaRestriction) { + basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.etarestriction})); + } + else { + basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.etarestriction})); + } + } + } + }, + + rouletteCommand: { + command: 'roulette', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (!basicBot.room.roulette.rouletteStatus) { + basicBot.room.roulette.startRoulette(); + } + } + } + }, + + rulesCommand: { + command: 'rules', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.rulesLink === "string") + return API.sendChat(subChat(basicBot.chat.roomrules, {link: basicBot.settings.rulesLink})); + } + } + }, + + sessionstatsCommand: { + command: 'sessionstats', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var from = chat.un; + var woots = basicBot.room.roomstats.totalWoots; + var mehs = basicBot.room.roomstats.totalMehs; + var grabs = basicBot.room.roomstats.totalCurates; + API.sendChat(subChat(basicBot.chat.sessionstats, {name: from, woots: woots, mehs: mehs, grabs: grabs})); + } + } + }, + + skipCommand: { + command: ['skip', 'smartskip'], + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.skippable) { + + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + var dj = API.getDJ(); + var name = dj.username; + var msgSend = '@' + name + ', '; + + if (chat.message.length === cmd.length) { + API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + } + var validReason = false; + var msg = chat.message; + var reason = msg.substring(cmd.length + 1); + for (var i = 0; i < basicBot.settings.skipReasons.length; i++) { + var r = basicBot.settings.skipReasons[i][0]; + if (reason.indexOf(r) !== -1) { + validReason = true; + msgSend += basicBot.settings.skipReasons[i][1]; + } + } + if (validReason) { + API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(msgSend); + } + else { + API.moderateForceSkip(); + setTimeout(function () { + API.sendChat(msgSend); + }, 500); + } + } + } + } + } + }, + + skipposCommand: { + command: 'skippos', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var pos = msg.substring(cmd.length + 1); + if (!isNaN(pos)) { + basicBot.settings.skipPosition = pos; + return API.sendChat(subChat(basicBot.chat.skippos, {name: chat.un, position: basicBot.settings.skipPosition})); + } + else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); + } + } + }, + + songstatsCommand: { + command: 'songstats', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.songstats) { + basicBot.settings.songstats = !basicBot.settings.songstats; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.songstats})); + } + else { + basicBot.settings.songstats = !basicBot.settings.songstats; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.songstats})); + } + } + } + }, + + sourceCommand: { + command: 'source', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat('/me This bot was created by ' + botCreator + ', but is now maintained by ' + botMaintainer + "."); + } + } + }, + + statusCommand: { + command: 'status', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var from = chat.un; + var msg = '[@' + from + '] '; + + msg += basicBot.chat.afkremoval + ': '; + if (basicBot.settings.afkRemoval) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + msg += basicBot.chat.afksremoved + ": " + basicBot.room.afkList.length + '. '; + msg += basicBot.chat.afklimit + ': ' + basicBot.settings.maximumAfk + '. '; + + msg += 'Bouncer+: '; + if (basicBot.settings.bouncerPlus) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.blacklist + ': '; + if (basicBot.settings.blacklistEnabled) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.lockguard + ': '; + if (basicBot.settings.lockGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.cycleguard + ': '; + if (basicBot.settings.cycleGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.timeguard + ': '; + if (basicBot.settings.timeGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.chatfilter + ': '; + if (basicBot.settings.filterChat) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.historyskip + ': '; + if (basicBot.settings.historySkip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.voteskip + ': '; + if (basicBot.settings.voteSkip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.cmddeletion + ': '; + if (basicBot.settings.cmdDeletion) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.autoskip + ': '; + if (basicBot.settings.autoskip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + // TODO: Display more toggleable bot settings. + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + var since = basicBot.roomUtilities.msToStr(durationOnline); + msg += subChat(basicBot.chat.activefor, {time: since}); + + /* + // least efficient way to go about this, but it works :) + if (msg.length > 256){ + firstpart = msg.substr(0, 256); + secondpart = msg.substr(256); + API.sendChat(firstpart); + setTimeout(function () { + API.sendChat(secondpart); + }, 300); + } + else { + API.sendChat(msg); + } + */ + + // This is a more efficient solution + if (msg.length > 241){ + var split = msg.match(/.{1,241}/g); + for (var i = 0; i < split.length; i++) { + var func = function(index) { + setTimeout(function() { + API.sendChat("/me " + split[index]); + }, 500 * index); + } + func(i); + } + } + else { + return API.sendChat(msg); + } + } + } + }, + + swapCommand: { + command: 'swap', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var firstSpace = msg.indexOf(' '); + var lastSpace = msg.lastIndexOf(' '); + var name1 = msg.substring(cmd.length + 2, lastSpace); + var name2 = msg.substring(lastSpace + 2); + var user1 = basicBot.userUtilities.lookupUserName(name1); + var user2 = basicBot.userUtilities.lookupUserName(name2); + if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); + if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); + var p1 = API.getWaitListPosition(user1.id) + 1; + var p2 = API.getWaitListPosition(user2.id) + 1; + if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); + API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); + if (p1 < p2) { + basicBot.userUtilities.moveUser(user2.id, p1, false); + setTimeout(function (user1, p2) { + basicBot.userUtilities.moveUser(user1.id, p2, false); + }, 2000, user1, p2); + } + else { + basicBot.userUtilities.moveUser(user1.id, p2, false); + setTimeout(function (user2, p1) { + basicBot.userUtilities.moveUser(user2.id, p1, false); + }, 2000, user2, p1); + } + } + } + }, + + themeCommand: { + command: 'theme', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.themeLink === "string") + API.sendChat(subChat(basicBot.chat.genres, {link: basicBot.settings.themeLink})); + } + } + }, + + timeguardCommand: { + command: 'timeguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.timeGuard) { + basicBot.settings.timeGuard = !basicBot.settings.timeGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.timeguard})); + } + else { + basicBot.settings.timeGuard = !basicBot.settings.timeGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.timeguard})); + } + + } + } + }, + + toggleblCommand: { + command: 'togglebl', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var temp = basicBot.settings.blacklistEnabled; + basicBot.settings.blacklistEnabled = !temp; + if (basicBot.settings.blacklistEnabled) { + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.blacklist})); + } + else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.blacklist})); + } + } + }, + + togglemotdCommand: { + command: 'togglemotd', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.motdEnabled) { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.motd})); + } + else { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.motd})); + } + } + } + }, + + togglevoteskipCommand: { + command: 'togglevoteskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.voteSkip) { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); + } + else { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); + } + } + } + }, + + unbanCommand: { + command: 'unban', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + $(".icon-population").click(); + $(".icon-ban").click(); + setTimeout(function (chat) { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(); + var name = msg.substring(cmd.length + 2); + var bannedUsers = API.getBannedUsers(); + var found = false; + var bannedUser = null; + for (var i = 0; i < bannedUsers.length; i++) { + var user = bannedUsers[i]; + if (user.username === name) { + bannedUser = user; + found = true; + } + } + if (!found) { + $(".icon-chat").click(); + return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); + } + API.moderateUnbanUser(bannedUser.id); + console.log("Unbanned " + name); + setTimeout(function () { + $(".icon-chat").click(); + }, 1000); + }, 1000, chat); + } + } + }, + + unlockCommand: { + command: 'unlock', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.booth.unlockBooth(); + } + } + }, + + unmuteCommand: { + command: 'unmute', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + /** + if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { + if (permFrom > 2) { + basicBot.room.mutedUsers = []; + return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); + } + else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); + } + **/ + var from = chat.un; + var name = msg.substr(cmd.length + 2); + + var user = basicBot.userUtilities.lookupUserName(name); + + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permFrom > permUser) { + /* + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === user.id) { + indexMuted = i; + wasMuted = true; + } + + } + if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + basicBot.room.mutedUsers.splice(indexMuted); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + */ + try { + API.moderateUnmuteUser(user.id); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + catch (e) { + API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + } + } + else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); + } + } + }, + + usercmdcdCommand: { + command: 'usercmdcd', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var cd = msg.substring(cmd.length + 1); + if (!isNaN(cd)) { + basicBot.settings.commandCooldown = cd; + return API.sendChat(subChat(basicBot.chat.commandscd, {name: chat.un, time: basicBot.settings.commandCooldown})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + usercommandsCommand: { + command: 'usercommands', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.usercommandsEnabled) { + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.usercommands})); + basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; + } + else { + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.usercommands})); + basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; + } + } + } + }, + + voteratioCommand: { + command: 'voteratio', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false) return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var vratio = user.votes; + var ratio = vratio.woot / vratio.meh; + API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woot: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); + } + } + }, + + voteskipCommand: { + command: 'voteskip', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + if (isNaN(argument)) { + API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); + } + else { + basicBot.settings.voteSkipLimit = argument; + API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); + } + } + } + }, + + welcomeCommand: { + command: 'welcome', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.welcome) { + basicBot.settings.welcome = !basicBot.settings.welcome; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + } + else { + basicBot.settings.welcome = !basicBot.settings.welcome; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + } + } + } + }, + + websiteCommand: { + command: 'website', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.website === "string") + API.sendChat(subChat(basicBot.chat.website, {link: basicBot.settings.website})); + } + } + }, + + whoisCommand: { + command: 'whois', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substr(cmd.length + 2); + } + users = API.getUsers(); + var len = users.length; + for (var i = 0; i < len; ++i){ + if (users[i].username == name){ + var id = users[i].id; + var avatar = API.getUser(id).avatarID; + var level = API.getUser(id).level; + var rawjoined = API.getUser(id).joined; + var joined = rawjoined.substr(0, 10); + var rawlang = API.getUser(id).language; + if (rawlang == "en"){ + var language = "English"; + } else if (rawlang == "bg"){ + var language = "Bulgarian"; + } else if (rawlang == "cs"){ + var language = "Czech"; + } else if (rawlang == "fi"){ + var language = "Finnish" + } else if (rawlang == "fr"){ + var language = "French" + } else if (rawlang == "pt"){ + var language = "Portuguese" + } else if (rawlang == "zh"){ + var language = "Chinese" + } else if (rawlang == "sk"){ + var language = "Slovak" + } else if (rawlang == "nl"){ + var language = "Dutch" + } else if (rawlang == "ms"){ + var language = "Malay" + } + var rawrank = API.getUser(id).role; + if (rawrank == "0"){ + var rank = "User"; + } else if (rawrank == "1"){ + var rank = "Resident DJ"; + } else if (rawrank == "2"){ + var rank = "Bouncer"; + } else if (rawrank == "3"){ + var rank = "Manager" + } else if (rawrank == "4"){ + var rank = "Co-Host" + } else if (rawrank == "5"){ + var rank = "Host" + } else if (rawrank == "7"){ + var rank = "Brand Ambassador" + } else if (rawrank == "10"){ + var rank = "Admin" + } + var slug = API.getUser(id).slug; + if (typeof slug !== 'undefined') { + var profile = "https://plug.dj/@/" + slug; + } else { + var profile = "~"; + } + + API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, joined: joined, rank: rank})); + } + } + } + } + }, + + youtubeCommand: { + command: 'youtube', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.youtubeLink === "string") + API.sendChat(subChat(basicBot.chat.youtube, {name: chat.un, link: basicBot.settings.youtubeLink})); + } } - } - } - }, - - websiteCommand: { - command: 'website', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.website === "string") - API.sendChat(subChat(basicBot.chat.website, {link: basicBot.settings.website})); - } - } - }, - - whoisCommand: { - command: 'whois', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substr(cmd.length + 2); - } - users = API.getUsers(); - var len = users.length; - for (var i = 0; i < len; ++i){ - if (users[i].username == name){ - var id = users[i].id; - var avatar = API.getUser(id).avatarID; - var level = API.getUser(id).level; - var rawjoined = API.getUser(id).joined; - var joined = rawjoined.substr(0, 10); - var rawlang = API.getUser(id).language; - if (rawlang == "en"){ - var language = "English"; - } else if (rawlang == "bg"){ - var language = "Bulgarian"; - } else if (rawlang == "cs"){ - var language = "Czech"; - } else if (rawlang == "fi"){ - var language = "Finnish" - } else if (rawlang == "fr"){ - var language = "French" - } else if (rawlang == "pt"){ - var language = "Portuguese" - } else if (rawlang == "zh"){ - var language = "Chinese" - } else if (rawlang == "sk"){ - var language = "Slovak" - } else if (rawlang == "nl"){ - var language = "Dutch" - } else if (rawlang == "ms"){ - var language = "Malay" - } - var rawrank = API.getUser(id).role; - if (rawrank == "0"){ - var rank = "User"; - } else if (rawrank == "1"){ - var rank = "Resident DJ"; - } else if (rawrank == "2"){ - var rank = "Bouncer"; - } else if (rawrank == "3"){ - var rank = "Manager" - } else if (rawrank == "4"){ - var rank = "Co-Host" - } else if (rawrank == "5"){ - var rank = "Host" - } else if (rawrank == "7"){ - var rank = "Brand Ambassador" - } else if (rawrank == "10"){ - var rank = "Admin" - } - var slug = API.getUser(id).slug; - if (typeof slug !== 'undefined') { - var profile = "https://plug.dj/@/" + slug; - } else { - var profile = "~"; - } - - API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, joined: joined, rank: rank})); - } - } - } - } - }, - - youtubeCommand: { - command: 'youtube', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.youtubeLink === "string") - API.sendChat(subChat(basicBot.chat.youtube, {name: chat.un, link: basicBot.settings.youtubeLink})); - } } - } } - }; + }; - loadChat(basicBot.startup); - }).call(this); + loadChat(basicBot.startup); +}).call(this); From 3a6629c4f4fa2ef3db48c70bedbaa19cc2500eaa Mon Sep 17 00:00:00 2001 From: Benzi Date: Tue, 14 Jul 2015 02:17:59 +0100 Subject: [PATCH 199/281] Revert "Cleaned up indentation" This reverts commit 46aacfd32dc4e6064bb6e16ac8fa21eaf873f390. --- basicBot.js | 6986 +++++++++++++++++++++++++-------------------------- 1 file changed, 3493 insertions(+), 3493 deletions(-) diff --git a/basicBot.js b/basicBot.js index 1bd7dbf0..dfcc85c8 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1,3645 +1,3645 @@ /** -*Copyright 2014 Yemasthui -*Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. -*This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. -*/ + *Copyright 2014 Yemasthui + *Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. + *This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. + */ (function () { - /*window.onerror = function() { - var room = JSON.parse(localStorage.getItem("basicBotRoom")); - window.location = 'https://plug.dj' + room.name; - };*/ + /*window.onerror = function() { + var room = JSON.parse(localStorage.getItem("basicBotRoom")); + window.location = 'https://plug.dj' + room.name; + };*/ - API.getWaitListPosition = function(id){ - if(typeof id === 'undefined' || id === null){ - id = API.getUser().id; - } - var wl = API.getWaitList(); - for(var i = 0; i < wl.length; i++){ - if(wl[i].id === id){ - return i; - } - } - return -1; - }; - - var kill = function () { - clearInterval(basicBot.room.autodisableInterval); - clearInterval(basicBot.room.afkInterval); - basicBot.status = false; - }; - - // This socket server is used solely for statistical and troubleshooting purposes. - // This server may not always be up, but will be used to get live data at any given time. - - var socket = function () { - function loadSocket() { - SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; - sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); - sock.onopen = function() { - console.log('Connected to socket!'); - sendToSocket(); - }; - sock.onclose = function() { - console.log('Disconnected from socket, reconnecting every minute ..'); - var reconnect = setTimeout(function(){ loadSocket() }, 60 * 1000); - }; - sock.onmessage = function(broadcast) { - var rawBroadcast = broadcast.data; - var broadcastMessage = rawBroadcast.replace(/["\\]+/g, ''); - API.chatLog(broadcastMessage); - console.log(broadcastMessage); - }; - } - if (typeof SockJS == 'undefined') { - $.getScript('https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js', loadSocket); - } else loadSocket(); - } - - var sendToSocket = function () { - var basicBotSettings = basicBot.settings; - var basicBotRoom = basicBot.room; - var basicBotInfo = { - time: Date.now(), - version: basicBot.version - }; - var data = {users:API.getUsers(),userinfo:API.getUser(),room:location.pathname,basicBotSettings:basicBotSettings,basicBotRoom:basicBotRoom,basicBotInfo:basicBotInfo}; - return sock.msg(data); - }; - - var storeToStorage = function () { - localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); - localStorage.setItem("basicBotRoom", JSON.stringify(basicBot.room)); - var basicBotStorageInfo = { - time: Date.now(), - stored: true, - version: basicBot.version + API.getWaitListPosition = function(id){ + if(typeof id === 'undefined' || id === null){ + id = API.getUser().id; + } + var wl = API.getWaitList(); + for(var i = 0; i < wl.length; i++){ + if(wl[i].id === id){ + return i; + } + } + return -1; }; - localStorage.setItem("basicBotStorageInfo", JSON.stringify(basicBotStorageInfo)); - - }; - var subChat = function (chat, obj) { - if (typeof chat === "undefined") { - API.chatLog("There is a chat text missing."); - console.log("There is a chat text missing."); - return "[Error] No text message found."; - - // TODO: Get missing chat messages from source. - } - var lit = '%%'; - for (var prop in obj) { - chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); - } - return chat; - }; - - var loadChat = function (cb) { - if (!cb) cb = function () { + var kill = function () { + clearInterval(basicBot.room.autodisableInterval); + clearInterval(basicBot.room.afkInterval); + basicBot.status = false; }; - $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { - var link = basicBot.chatLink; - if (json !== null && typeof json !== "undefined") { - langIndex = json; - link = langIndex[basicBot.settings.language.toLowerCase()]; - if (basicBot.settings.chatLink !== basicBot.chatLink) { - link = basicBot.settings.chatLink; - } - else { - if (typeof link === "undefined") { - link = basicBot.chatLink; - } - } - $.get(link, function (json) { - if (json !== null && typeof json !== "undefined") { - if (typeof json === "string") json = JSON.parse(json); - basicBot.chat = json; - cb(); - } - }); - } - else { - $.get(basicBot.chatLink, function (json) { - if (json !== null && typeof json !== "undefined") { - if (typeof json === "string") json = JSON.parse(json); - basicBot.chat = json; - cb(); - } - }); - } - }); - }; - - var retrieveSettings = function () { - var settings = JSON.parse(localStorage.getItem("basicBotsettings")); - if (settings !== null) { - for (var prop in settings) { - basicBot.settings[prop] = settings[prop]; - } - } - }; - - var retrieveFromStorage = function () { - var info = localStorage.getItem("basicBotStorageInfo"); - if (info === null) API.chatLog(basicBot.chat.nodatafound); - else { - var settings = JSON.parse(localStorage.getItem("basicBotsettings")); - var room = JSON.parse(localStorage.getItem("basicBotRoom")); - var elapsed = Date.now() - JSON.parse(info).time; - if ((elapsed < 1 * 60 * 60 * 1000)) { - API.chatLog(basicBot.chat.retrievingdata); - for (var prop in settings) { - basicBot.settings[prop] = settings[prop]; - } - basicBot.room.users = room.users; - basicBot.room.afkList = room.afkList; - basicBot.room.historyList = room.historyList; - basicBot.room.mutedUsers = room.mutedUsers; - //basicBot.room.autoskip = room.autoskip; - basicBot.room.roomstats = room.roomstats; - basicBot.room.messages = room.messages; - basicBot.room.queue = room.queue; - basicBot.room.newBlacklisted = room.newBlacklisted; - API.chatLog(basicBot.chat.datarestored); - } - } - var json_sett = null; - var roominfo = document.getElementById("room-settings"); - info = roominfo.textContent; - var ref_bot = "@basicBot="; - var ind_ref = info.indexOf(ref_bot); - if (ind_ref > 0) { - var link = info.substring(ind_ref + ref_bot.length, info.length); - var ind_space = null; - if (link.indexOf(" ") < link.indexOf("\n")) ind_space = link.indexOf(" "); - else ind_space = link.indexOf("\n"); - link = link.substring(0, ind_space); - $.get(link, function (json) { - if (json !== null && typeof json !== "undefined") { - json_sett = JSON.parse(json); - for (var prop in json_sett) { - basicBot.settings[prop] = json_sett[prop]; - } - } - }); - } - }; + // This socket server is used solely for statistical and troubleshooting purposes. + // This server may not always be up, but will be used to get live data at any given time. - String.prototype.splitBetween = function (a, b) { - var self = this; - self = this.split(a); - for (var i = 0; i < self.length; i++) { - self[i] = self[i].split(b); - } - var arr = []; - for (var i = 0; i < self.length; i++) { - if (Array.isArray(self[i])) { - for (var j = 0; j < self[i].length; j++) { - arr.push(self[i][j]); + var socket = function () { + function loadSocket() { + SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; + sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); + sock.onopen = function() { + console.log('Connected to socket!'); + sendToSocket(); + }; + sock.onclose = function() { + console.log('Disconnected from socket, reconnecting every minute ..'); + var reconnect = setTimeout(function(){ loadSocket() }, 60 * 1000); + }; + sock.onmessage = function(broadcast) { + var rawBroadcast = broadcast.data; + var broadcastMessage = rawBroadcast.replace(/["\\]+/g, ''); + API.chatLog(broadcastMessage); + console.log(broadcastMessage); + }; } - } - else arr.push(self[i]); + if (typeof SockJS == 'undefined') { + $.getScript('https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js', loadSocket); + } else loadSocket(); } - return arr; - }; - - String.prototype.startsWith = function(str) { - return this.substring(0, str.length) === str; - }; - - var linkFixer = function (msg) { - var parts = msg.splitBetween(' -1) return 10; - } - if (u.gRole < 2) return u.role; - else { - switch (u.gRole) { - case 2: - return 7; - case 3: - return 8; - case 4: - return 9; - case 5: - return 10; - } - } - return 0; - }, - moveUser: function (id, pos, priority) { - var user = basicBot.userUtilities.lookupUser(id); - var wlist = API.getWaitList(); - if (API.getWaitListPosition(id) === -1) { - if (wlist.length < 50) { - API.moderateAddDJ(id); - if (pos !== 0) setTimeout(function (id, pos) { - API.moderateMoveDJ(id, pos); - }, 1250, id, pos); - } - else { - var alreadyQueued = -1; - for (var i = 0; i < basicBot.room.queue.id.length; i++) { - if (basicBot.room.queue.id[i] === id) alreadyQueued = i; - } - if (alreadyQueued !== -1) { - basicBot.room.queue.position[alreadyQueued] = pos; - return API.sendChat(subChat(basicBot.chat.alreadyadding, {position: basicBot.room.queue.position[alreadyQueued]})); - } - basicBot.roomUtilities.booth.lockBooth(); - if (priority) { - basicBot.room.queue.id.unshift(id); - basicBot.room.queue.position.unshift(pos); - } - else { - basicBot.room.queue.id.push(id); - basicBot.room.queue.position.push(pos); - } - var name = user.username; - return API.sendChat(subChat(basicBot.chat.adding, {name: name, position: basicBot.room.queue.position.length})); - } - } - else API.moderateMoveDJ(id, pos); - }, - dclookup: function (id) { - var user = basicBot.userUtilities.lookupUser(id); - if (typeof user === 'boolean') return basicBot.chat.usernotfound; - var name = user.username; - if (user.lastDC.time === null) return subChat(basicBot.chat.notdisconnected, {name: name}); - var dc = user.lastDC.time; - var pos = user.lastDC.position; - if (pos === null) return basicBot.chat.noposition; - var timeDc = Date.now() - dc; - var validDC = false; - if (basicBot.settings.maximumDc * 60 * 1000 > timeDc) { - validDC = true; - } - var time = basicBot.roomUtilities.msToStr(timeDc); - if (!validDC) return (subChat(basicBot.chat.toolongago, {name: basicBot.userUtilities.getUser(user).username, time: time})); - var songsPassed = basicBot.room.roomstats.songCount - user.lastDC.songCount; - var afksRemoved = 0; - var afkList = basicBot.room.afkList; - for (var i = 0; i < afkList.length; i++) { - var timeAfk = afkList[i][1]; - var posAfk = afkList[i][2]; - if (dc < timeAfk && posAfk < pos) { - afksRemoved++; - } - } - var newPosition = user.lastDC.position - songsPassed - afksRemoved; - if (newPosition <= 0) return subChat(basicBot.chat.notdisconnected, {name: name}); - var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); - basicBot.userUtilities.moveUser(user.id, newPosition, true); - return msg; - } - }, - - roomUtilities: { - rankToNumber: function (rankString) { - var rankInt = null; - switch (rankString) { - case "admin": - rankInt = 10; - break; - case "ambassador": - rankInt = 7; - break; - case "host": - rankInt = 5; - break; - case "cohost": - rankInt = 4; - break; - case "manager": - rankInt = 3; - break; - case "bouncer": - rankInt = 2; - break; - case "residentdj": - rankInt = 1; - break; - case "user": - rankInt = 0; - break; - } - return rankInt; - }, - msToStr: function (msTime) { - var ms, msg, timeAway; - msg = ''; - timeAway = { - 'days': 0, - 'hours': 0, - 'minutes': 0, - 'seconds': 0 + + var sendToSocket = function () { + var basicBotSettings = basicBot.settings; + var basicBotRoom = basicBot.room; + var basicBotInfo = { + time: Date.now(), + version: basicBot.version }; - ms = { - 'day': 24 * 60 * 60 * 1000, - 'hour': 60 * 60 * 1000, - 'minute': 60 * 1000, - 'second': 1000 + var data = {users:API.getUsers(),userinfo:API.getUser(),room:location.pathname,basicBotSettings:basicBotSettings,basicBotRoom:basicBotRoom,basicBotInfo:basicBotInfo}; + return sock.msg(data); + }; + + var storeToStorage = function () { + localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); + localStorage.setItem("basicBotRoom", JSON.stringify(basicBot.room)); + var basicBotStorageInfo = { + time: Date.now(), + stored: true, + version: basicBot.version }; - 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.minutes < 1 && timeAway.hours < 1 && timeAway.days < 1) { - msg += timeAway.seconds.toString() + 's'; - } - if (msg !== '') { - return msg; - } else { - return false; + localStorage.setItem("basicBotStorageInfo", JSON.stringify(basicBotStorageInfo)); + + }; + + var subChat = function (chat, obj) { + if (typeof chat === "undefined") { + API.chatLog("There is a chat text missing."); + console.log("There is a chat text missing."); + return "[Error] No text message found."; + + // TODO: Get missing chat messages from source. } - }, - booth: { - lockTimer: setTimeout(function () { - }, 1000), - locked: false, - lockBooth: function () { - API.moderateLockWaitList(!basicBot.roomUtilities.booth.locked); - basicBot.roomUtilities.booth.locked = false; - if (basicBot.settings.lockGuard) { - basicBot.roomUtilities.booth.lockTimer = setTimeout(function () { - API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); - }, basicBot.settings.maximumLocktime * 60 * 1000); - } - }, - unlockBooth: function () { - API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); - clearTimeout(basicBot.roomUtilities.booth.lockTimer); + var lit = '%%'; + for (var prop in obj) { + chat = chat.replace(lit + prop.toUpperCase() + lit, obj[prop]); } - }, - afkCheck: function () { - if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); - var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); - var djlist = API.getWaitList(); - var lastPos = Math.min(djlist.length, basicBot.settings.afkpositionCheck); - if (lastPos - 1 > djlist.length) return void (0); - for (var i = 0; i < lastPos; i++) { - if (typeof djlist[i] !== 'undefined') { - var id = djlist[i].id; - var user = basicBot.userUtilities.lookupUser(id); - if (typeof user !== 'boolean') { - var plugUser = basicBot.userUtilities.getUser(user); - if (rank !== null && basicBot.userUtilities.getPermission(plugUser) <= rank) { - var name = plugUser.username; - var lastActive = basicBot.userUtilities.getLastActivity(user); - var inactivity = Date.now() - lastActive; - var time = basicBot.roomUtilities.msToStr(inactivity); - var warncount = user.afkWarningCount; - if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { - if (warncount === 0) { - API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); - user.afkWarningCount = 3; - user.afkCountdown = setTimeout(function (userToChange) { - userToChange.afkWarningCount = 1; - }, 90 * 1000, user); - } - else if (warncount === 1) { - API.sendChat(subChat(basicBot.chat.warning2, {name: name})); - user.afkWarningCount = 3; - user.afkCountdown = setTimeout(function (userToChange) { - userToChange.afkWarningCount = 2; - }, 30 * 1000, user); - } - else if (warncount === 2) { - var pos = API.getWaitListPosition(id); - if (pos !== -1) { - pos++; - basicBot.room.afkList.push([id, Date.now(), pos]); - user.lastDC = { + return chat; + }; - time: null, - position: null, - songCount: 0 - }; - API.moderateRemoveDJ(id); - API.sendChat(subChat(basicBot.chat.afkremove, {name: name, time: time, position: pos, maximumafk: basicBot.settings.maximumAfk})); + var loadChat = function (cb) { + if (!cb) cb = function () { + }; + $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { + var link = basicBot.chatLink; + if (json !== null && typeof json !== "undefined") { + langIndex = json; + link = langIndex[basicBot.settings.language.toLowerCase()]; + if (basicBot.settings.chatLink !== basicBot.chatLink) { + link = basicBot.settings.chatLink; + } + else { + if (typeof link === "undefined") { + link = basicBot.chatLink; } - user.afkWarningCount = 0; - } } - } - } - } - } - }, - smartSkip: function (reason) { - var dj = API.getDJ(); - var id = dj.id; - var waitlistlength = API.getWaitList().length; - var locked = false; - basicBot.room.queueable = false; - - if (waitlistlength == 50) { - basicBot.roomUtilities.booth.lockBooth(); - locked = true; - } - setTimeout(function (id) { - API.moderateForceSkip(); - setTimeout(function () { - if (typeof reason !== 'undefined') { - API.sendChat(reason); + $.get(link, function (json) { + if (json !== null && typeof json !== "undefined") { + if (typeof json === "string") json = JSON.parse(json); + basicBot.chat = json; + cb(); + } + }); } - }, 500); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.skipPosition, false); - basicBot.room.queueable = true; - if (locked) { - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); + else { + $.get(basicBot.chatLink, function (json) { + if (json !== null && typeof json !== "undefined") { + if (typeof json === "string") json = JSON.parse(json); + basicBot.chat = json; + cb(); + } + }); } - }, 1500, id); - }, 1000, id); - }, - changeDJCycle: function () { - var toggle = $(".cycle-toggle"); - if (toggle.hasClass("disabled")) { - toggle.click(); - if (basicBot.settings.cycleGuard) { - basicBot.room.cycleTimer = setTimeout(function () { - if (toggle.hasClass("enabled")) toggle.click(); - }, basicBot.settings.cycleMaxTime * 60 * 1000); - } - } - else { - toggle.click(); - clearTimeout(basicBot.room.cycleTimer); - } + }); + }; - // TODO: Use API.moderateDJCycle(true/false) - }, - intervalMessage: function () { - var interval; - if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; - else interval = basicBot.settings.messageInterval; - if ((basicBot.room.roomstats.songCount % interval) === 0 && basicBot.status) { - var msg; - if (basicBot.settings.motdEnabled) { - msg = basicBot.settings.motd; - } - else { - if (basicBot.settings.intervalMessages.length === 0) return void (0); - var messageNumber = basicBot.room.roomstats.songCount % basicBot.settings.intervalMessages.length; - msg = basicBot.settings.intervalMessages[messageNumber]; - } - API.sendChat('/me ' + msg); - } - }, - updateBlacklists: function () { - for (var bl in basicBot.settings.blacklists) { - basicBot.room.blacklists[bl] = []; - if (typeof basicBot.settings.blacklists[bl] === 'function') { - basicBot.room.blacklists[bl] = basicBot.settings.blacklists(); - } - else if (typeof basicBot.settings.blacklists[bl] === 'string') { - if (basicBot.settings.blacklists[bl] === '') { - continue; + var retrieveSettings = function () { + var settings = JSON.parse(localStorage.getItem("basicBotsettings")); + if (settings !== null) { + for (var prop in settings) { + basicBot.settings[prop] = settings[prop]; } - try { - (function (l) { - $.get(basicBot.settings.blacklists[l], function (data) { - if (typeof data === 'string') { - data = JSON.parse(data); - } - var list = []; - for (var prop in data) { - if (typeof data[prop].mid !== 'undefined') { - list.push(data[prop].mid); - } - } - basicBot.room.blacklists[l] = list; - }) - })(bl); - } - catch (e) { - API.chatLog('Error setting' + bl + 'blacklist.'); - console.log('Error setting' + bl + 'blacklist.'); - console.log(e); - } - } - } - }, - logNewBlacklistedSongs: function () { - if (typeof console.table !== 'undefined') { - console.table(basicBot.room.newBlacklisted); - } - else { - console.log(basicBot.room.newBlacklisted); - } - }, - exportNewBlacklistedSongs: function () { - var list = {}; - for (var i = 0; i < basicBot.room.newBlacklisted.length; i++) { - var track = basicBot.room.newBlacklisted[i]; - list[track.list] = []; - list[track.list].push({ - title: track.title, - author: track.author, - mid: track.mid - }); - } - return list; - } - }, - eventChat: function (chat) { - chat.message = linkFixer(chat.message); - chat.message = decodeEntities(chat.message); - chat.message = chat.message.trim(); - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === chat.uid) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); - if (basicBot.room.users[i].username !== chat.un) { - basicBot.room.users[i].username = chat.un; - } - } - } - if (basicBot.chatUtilities.chatFilter(chat)) return void (0); - if (!basicBot.chatUtilities.commandCheck(chat)) - basicBot.chatUtilities.action(chat); - }, - eventUserjoin: function (user) { - var known = false; - var index = null; - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === user.id) { - known = true; - index = i; - } - } - var greet = true; - var welcomeback = null; - if (known) { - basicBot.room.users[index].inRoom = true; - var u = basicBot.userUtilities.lookupUser(user.id); - var jt = u.jointime; - var t = Date.now() - jt; - if (t < 10 * 1000) greet = false; - else welcomeback = true; - } - else { - basicBot.room.users.push(new basicBot.User(user.id, user.username)); - welcomeback = false; - } - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === user.id) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); - basicBot.room.users[j].jointime = Date.now(); - } - - } - if (basicBot.settings.welcome && greet) { - welcomeback ? - setTimeout(function (user) { - API.sendChat(subChat(basicBot.chat.welcomeback, {name: user.username})); - }, 1 * 1000, user) - : - setTimeout(function (user) { - API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); - }, 1 * 1000, user); - } - }, - eventUserleave: function (user) { - var lastDJ = API.getHistory()[0].user.id; - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === user.id) { - basicBot.userUtilities.updateDC(basicBot.room.users[i]); - basicBot.room.users[i].inRoom = false; - if (lastDJ == user.id){ - var user = basicBot.userUtilities.lookupUser(basicBot.room.users[i].id); - basicBot.userUtilities.updatePosition(user, 0); - user.lastDC.time = null; - user.lastDC.position = user.lastKnownPosition; - } - } - } - }, - eventVoteupdate: function (obj) { - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === obj.user.id) { - if (obj.vote === 1) { - basicBot.room.users[i].votes.woot++; - } - else { - basicBot.room.users[i].votes.meh++; - } - } - } - - var mehs = API.getScore().negative; - var woots = API.getScore().positive; - var dj = API.getDJ(); - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - - if (basicBot.settings.voteSkip) { - if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { - API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); - } - else { - API.moderateForceSkip(); - } - } - } - - }, - eventCurateupdate: function (obj) { - for (var i = 0; i < basicBot.room.users.length; i++) { - if (basicBot.room.users[i].id === obj.user.id) { - basicBot.room.users[i].votes.curate++; } - } - }, - eventDjadvance: function (obj) { - if (basicBot.settings.autowoot) { - $("#woot").click(); // autowoot - } - - var user = basicBot.userUtilities.lookupUser(obj.dj.id) - for(var i = 0; i < basicBot.room.users.length; i++){ - if(basicBot.room.users[i].id === user.id){ - basicBot.room.users[i].lastDC = { - time: null, - position: null, - songCount: 0 - }; - } - } + }; - var lastplay = obj.lastPlay; - if (typeof lastplay === 'undefined') return; - if (basicBot.settings.songstats) { - if (typeof basicBot.chat.songstatistics === "undefined") { - API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") - } + var retrieveFromStorage = function () { + var info = localStorage.getItem("basicBotStorageInfo"); + if (info === null) API.chatLog(basicBot.chat.nodatafound); else { - API.sendChat(subChat(basicBot.chat.songstatistics, {artist: lastplay.media.author, title: lastplay.media.title, woots: lastplay.score.positive, grabs: lastplay.score.grabs, mehs: lastplay.score.negative})) - } - } - basicBot.room.roomstats.totalWoots += lastplay.score.positive; - basicBot.room.roomstats.totalMehs += lastplay.score.negative; - basicBot.room.roomstats.totalCurates += lastplay.score.grabs; - basicBot.room.roomstats.songCount++; - basicBot.roomUtilities.intervalMessage(); - basicBot.room.currentDJID = obj.dj.id; - - var blacklistSkip = setTimeout(function () { - var mid = obj.media.format + ':' + obj.media.cid; - for (var bl in basicBot.room.blacklists) { - if (basicBot.settings.blacklistEnabled) { - if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { - API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } + var settings = JSON.parse(localStorage.getItem("basicBotsettings")); + var room = JSON.parse(localStorage.getItem("basicBotRoom")); + var elapsed = Date.now() - JSON.parse(info).time; + if ((elapsed < 1 * 60 * 60 * 1000)) { + API.chatLog(basicBot.chat.retrievingdata); + for (var prop in settings) { + basicBot.settings[prop] = settings[prop]; + } + basicBot.room.users = room.users; + basicBot.room.afkList = room.afkList; + basicBot.room.historyList = room.historyList; + basicBot.room.mutedUsers = room.mutedUsers; + //basicBot.room.autoskip = room.autoskip; + basicBot.room.roomstats = room.roomstats; + basicBot.room.messages = room.messages; + basicBot.room.queue = room.queue; + basicBot.room.newBlacklisted = room.newBlacklisted; + API.chatLog(basicBot.chat.datarestored); } - } } - }, 2000); - var newMedia = obj.media; - var timeLimitSkip = setTimeout(function () { - if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } + var json_sett = null; + var roominfo = document.getElementById("room-settings"); + info = roominfo.textContent; + var ref_bot = "@basicBot="; + var ind_ref = info.indexOf(ref_bot); + if (ind_ref > 0) { + var link = info.substring(ind_ref + ref_bot.length, info.length); + var ind_space = null; + if (link.indexOf(" ") < link.indexOf("\n")) ind_space = link.indexOf(" "); + else ind_space = link.indexOf("\n"); + link = link.substring(0, ind_space); + $.get(link, function (json) { + if (json !== null && typeof json !== "undefined") { + json_sett = JSON.parse(json); + for (var prop in json_sett) { + basicBot.settings[prop] = json_sett[prop]; + } + } + }); } - }, 2000); - var format = obj.media.format; - var cid = obj.media.cid; - var naSkip = setTimeout(function () { - if (format == 1){ - $.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + cid + '&key=AIzaSyDcfWu9cGaDnTjPKhg_dy9mUh6H7i4ePZ0&part=snippet&callback=?', function (track){ - if (typeof(track.items[0]) === 'undefined'){ - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - }); + + }; + + String.prototype.splitBetween = function (a, b) { + var self = this; + self = this.split(a); + for (var i = 0; i < self.length; i++) { + self[i] = self[i].split(b); } - else { - var checkSong = SC.get('/tracks/' + cid, function (track){ - if (typeof track.title === 'undefined'){ - var name = obj.dj.username; - API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } + var arr = []; + for (var i = 0; i < self.length; i++) { + if (Array.isArray(self[i])) { + for (var j = 0; j < self[i].length; j++) { + arr.push(self[i][j]); + } } - }); + else arr.push(self[i]); } - }, 2000); - clearTimeout(historySkip); - if (basicBot.settings.historySkip) { - var alreadyPlayed = false; - var apihistory = API.getHistory(); - var name = obj.dj.username; - var historySkip = setTimeout(function () { - for (var i = 0; i < apihistory.length; i++) { - if (apihistory[i].media.cid === obj.media.cid) { - basicBot.room.historyList[i].push(+new Date()); - alreadyPlayed = true; - API.sendChat(subChat(basicBot.chat.songknown, {name: name})); - if (basicBot.settings.smartSkip){ - return basicBot.roomUtilities.smartSkip(); - } - else { - return API.moderateForceSkip(); - } - } - } - if (!alreadyPlayed) { - basicBot.room.historyList.push([obj.media.cid, +new Date()]); - } - }, 2000); - } - if (user.ownSong) { - API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); - user.ownSong = false; - } - clearTimeout(basicBot.room.autoskipTimer); - if (basicBot.settings.autoskip) { - var remaining = obj.media.duration * 1000; - var startcid = API.getMedia().cid; - basicBot.room.autoskipTimer = setTimeout(function() { - var endcid = API.getMedia().cid; - if (startcid === endcid) { - //API.sendChat('Song stuck, skipping...'); - API.moderateForceSkip(); - } - }, remaining + 5000); - } - storeToStorage(); - sendToSocket(); - }, - eventWaitlistupdate: function (users) { - if (users.length < 50) { - if (basicBot.room.queue.id.length > 0 && basicBot.room.queueable) { - basicBot.room.queueable = false; - setTimeout(function () { - basicBot.room.queueable = true; - }, 500); - basicBot.room.queueing++; - var id, pos; - setTimeout( - function () { - id = basicBot.room.queue.id.splice(0, 1)[0]; - pos = basicBot.room.queue.position.splice(0, 1)[0]; - API.moderateAddDJ(id, pos); - setTimeout( - function (id, pos) { - API.moderateMoveDJ(id, pos); - basicBot.room.queueing--; - if (basicBot.room.queue.id.length === 0) setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1000, id, pos); - }, 1000 + basicBot.room.queueing * 2500); - } - } - for (var i = 0; i < users.length; i++) { - var user = basicBot.userUtilities.lookupUser(users[i].id); - basicBot.userUtilities.updatePosition(user, API.getWaitListPosition(users[i].id) + 1); - } - }, - chatcleaner: function (chat) { - if (!basicBot.settings.filterChat) return false; - if (basicBot.userUtilities.getPermission(chat.uid) > 1) return false; - var msg = chat.message; - var containsLetters = false; - for (var i = 0; i < msg.length; i++) { - ch = msg.charAt(i); - if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch === ':' || ch === '^') containsLetters = true; - } - if (msg === '') { - return true; - } - if (!containsLetters && (msg.length === 1 || msg.length > 3)) return true; - msg = msg.replace(/[ ,;.:\/=~+%^*\-\\"'&@#]/g, ''); - var capitals = 0; - var ch; - for (var i = 0; i < msg.length; i++) { - ch = msg.charAt(i); - if (ch >= 'A' && ch <= 'Z') capitals++; - } - if (capitals >= 40) { - API.sendChat(subChat(basicBot.chat.caps, {name: chat.un})); - return true; - } - msg = msg.toLowerCase(); - if (msg === 'skip') { - API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); - return true; - } - for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { - if (msg === basicBot.chatUtilities.spam[j]) { - API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); - return true; - } - } - return false; - }, - chatUtilities: { - chatFilter: function (chat) { - var msg = chat.message; - var perm = basicBot.userUtilities.getPermission(chat.uid); - var user = basicBot.userUtilities.lookupUser(chat.uid); - var isMuted = false; - for (var i = 0; i < basicBot.room.mutedUsers.length; i++) { - if (basicBot.room.mutedUsers[i] === chat.uid) isMuted = true; - } - if (isMuted) { - API.moderateDeleteChat(chat.cid); - return true; - } - if (basicBot.settings.lockdownEnabled) { - if (perm === 0) { - API.moderateDeleteChat(chat.cid); - return true; - } - } - if (basicBot.chatcleaner(chat)) { - API.moderateDeleteChat(chat.cid); - return true; - } - if (basicBot.settings.cmdDeletion && msg.startsWith(basicBot.settings.commandLiteral)) { - API.moderateDeleteChat(chat.cid); - } - /** - var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; - if (plugRoomLinkPatt.exec(msg)) { - if (perm === 0) { - API.sendChat(subChat(basicBot.chat.roomadvertising, {name: chat.un})); - API.moderateDeleteChat(chat.cid); - return true; - } - } - **/ - if (msg.indexOf('http://adf.ly/') > -1) { - API.moderateDeleteChat(chat.cid); - API.sendChat(subChat(basicBot.chat.adfly, {name: chat.un})); - return true; - } - if (msg.indexOf('autojoin was not enabled') > 0 || msg.indexOf('AFK message was not enabled') > 0 || msg.indexOf('!afkdisable') > 0 || msg.indexOf('!joindisable') > 0 || msg.indexOf('autojoin disabled') > 0 || msg.indexOf('AFK message disabled') > 0) { - API.moderateDeleteChat(chat.cid); - return true; - } - - var rlJoinChat = basicBot.chat.roulettejoin; - var rlLeaveChat = basicBot.chat.rouletteleave; + return arr; + }; - var joinedroulette = rlJoinChat.split('%%NAME%%'); - if (joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; - else joinedroulette = joinedroulette[0]; + String.prototype.startsWith = function(str) { + return this.substring(0, str.length) === str; + }; - var leftroulette = rlLeaveChat.split('%%NAME%%'); - if (leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; - else leftroulette = leftroulette[0]; + var linkFixer = function (msg) { + var parts = msg.splitBetween(' -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { - setTimeout(function (id) { - API.moderateDeleteChat(id); - }, 5 * 1000, chat.cid); - return true; - } - return false; - }, - commandCheck: function (chat) { - var cmd; - if (chat.message.charAt(0) === basicBot.settings.commandLiteral) { - var space = chat.message.indexOf(' '); - if (space === -1) { - cmd = chat.message; - } - else cmd = chat.message.substring(0, space); - } - else return false; - var userPerm = basicBot.userUtilities.getPermission(chat.uid); - //console.log("name: " + chat.un + ", perm: " + userPerm); - if (chat.message !== basicBot.settings.commandLiteral + 'join' && chat.message !== basicBot.settings.commandLiteral + "leave") { - if (userPerm === 0 && !basicBot.room.usercommand) return void (0); - if (!basicBot.room.allcommand) return void (0); - } - if (chat.message === basicBot.settings.commandLiteral + 'eta' && basicBot.settings.etaRestriction) { - if (userPerm < 2) { - var u = basicBot.userUtilities.lookupUser(chat.uid); - if (u.lastEta !== null && (Date.now() - u.lastEta) < 1 * 60 * 60 * 1000) { - API.moderateDeleteChat(chat.cid); - return void (0); - } - else u.lastEta = Date.now(); - } - } - var executed = false; - - for (var comm in basicBot.commands) { - var cmdCall = basicBot.commands[comm].command; - if (!Array.isArray(cmdCall)) { - cmdCall = [cmdCall] - } - for (var i = 0; i < cmdCall.length; i++) { - if (basicBot.settings.commandLiteral + cmdCall[i] === cmd) { - basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[i]); - executed = true; - break; - } - } - } + var decodeEntities = function (s) { + var str, temp = document.createElement('p'); + temp.innerHTML = s; + str = temp.textContent || temp.innerText; + temp = null; + return str; + }; - if (executed && userPerm === 0) { - basicBot.room.usercommand = false; - setTimeout(function () { - basicBot.room.usercommand = true; - }, basicBot.settings.commandCooldown * 1000); + var botCreator = "Matthew (Yemasthui)"; + var botMaintainer = "Benzi (Quoona)" + var botCreatorIDs = ["3851534", "4105209"]; + + var basicBot = { + version: "2.8.9", + status: false, + name: "basicBot", + loggedInID: null, + scriptLink: "https://rawgit.com/Yemasthui/basicBot/master/basicBot.js", + cmdLink: "http://git.io/245Ppg", + chatLink: "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", + chat: null, + loadChat: loadChat, + retrieveSettings: retrieveSettings, + retrieveFromStorage: retrieveFromStorage, + settings: { + botName: "basicBot", + language: "english", + chatLink: "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", + roomLock: false, // Requires an extension to re-load the script + startupCap: 1, // 1-200 + startupVolume: 0, // 0-100 + startupEmoji: false, // true or false + autowoot: true, + autoskip: false, + smartSkip: true, + cmdDeletion: true, + maximumAfk: 120, + afkRemoval: true, + maximumDc: 60, + bouncerPlus: true, + blacklistEnabled: true, + lockdownEnabled: false, + lockGuard: false, + maximumLocktime: 10, + cycleGuard: true, + maximumCycletime: 10, + voteSkip: false, + voteSkipLimit: 10, + historySkip: false, + timeGuard: true, + maximumSongLength: 10, + autodisable: true, + commandCooldown: 30, + usercommandsEnabled: true, + skipPosition: 3, + skipReasons: [ + ["theme", "This song does not fit the room theme. "], + ["op", "This song is on the OP list. "], + ["history", "This song is in the history. "], + ["mix", "You played a mix, which is against the rules. "], + ["sound", "The song you played had bad sound quality or no sound. "], + ["nsfw", "The song you contained was NSFW (image or sound). "], + ["unavailable", "The song you played was not available for some users. "] + ], + afkpositionCheck: 15, + afkRankCheck: "ambassador", + motdEnabled: false, + motdInterval: 5, + motd: "Temporary Message of the Day", + filterChat: true, + etaRestriction: false, + welcome: true, + opLink: null, + rulesLink: null, + themeLink: null, + fbLink: null, + youtubeLink: null, + website: null, + intervalMessages: [], + messageInterval: 5, + songstats: true, + commandLiteral: "!", + blacklists: { + NSFW: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/NSFWlist.json", + OP: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/OPlist.json", + BANNED: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/BANNEDlist.json" } - if (executed) { - /*if (basicBot.settings.cmdDeletion) { - API.moderateDeleteChat(chat.cid); - }*/ - - //basicBot.room.allcommand = false; - //setTimeout(function () { - basicBot.room.allcommand = true; - //}, 5 * 1000); - } - return executed; - }, - action: function (chat) { - var user = basicBot.userUtilities.lookupUser(chat.uid); - if (chat.type === 'message') { - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === chat.uid) { - basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); + }, + room: { + name: null, + users: [], + afkList: [], + mutedUsers: [], + bannedUsers: [], + skippable: true, + usercommand: true, + allcommand: true, + afkInterval: null, + //autoskip: false, + autoskipTimer: null, + autodisableInterval: null, + autodisableFunc: function () { + if (basicBot.status && basicBot.settings.autodisable) { + API.sendChat('!afkdisable'); + API.sendChat('!joindisable'); } + }, + queueing: 0, + queueable: true, + currentDJID: null, + historyList: [], + cycleTimer: setTimeout(function () { + }, 1), + roomstats: { + accountName: null, + totalWoots: 0, + totalCurates: 0, + totalMehs: 0, + launchTime: null, + songCount: 0, + chatmessages: 0 + }, + messages: { + from: [], + to: [], + message: [] + }, + queue: { + id: [], + position: [] + }, + blacklists: { - } + }, + newBlacklisted: [], + newBlacklistedSongFunction: null, + roulette: { + rouletteStatus: false, + participants: [], + countdown: null, + startRoulette: function () { + basicBot.room.roulette.rouletteStatus = true; + basicBot.room.roulette.countdown = setTimeout(function () { + basicBot.room.roulette.endRoulette(); + }, 60 * 1000); + API.sendChat(basicBot.chat.isopen); + }, + endRoulette: function () { + basicBot.room.roulette.rouletteStatus = false; + var ind = Math.floor(Math.random() * basicBot.room.roulette.participants.length); + var winner = basicBot.room.roulette.participants[ind]; + basicBot.room.roulette.participants = []; + var pos = Math.floor((Math.random() * API.getWaitList().length) + 1); + var user = basicBot.userUtilities.lookupUser(winner); + var name = user.username; + API.sendChat(subChat(basicBot.chat.winnerpicked, {name: name, position: pos})); + setTimeout(function (winner, pos) { + basicBot.userUtilities.moveUser(winner, pos, false); + }, 1 * 1000, winner, pos); + } } - basicBot.room.roomstats.chatmessages++; - }, - spam: [ - 'hueh', 'hu3', 'brbr', 'heu', 'brbr', 'kkkk', 'spoder', 'mafia', 'zuera', 'zueira', - 'zueria', 'aehoo', 'aheu', 'alguem', 'algum', 'brazil', 'zoeira', 'fuckadmins', 'affff', 'vaisefoder', 'huenaarea', - 'hitler', 'ashua', 'ahsu', 'ashau', 'lulz', 'huehue', 'hue', 'huehuehue', 'merda', 'pqp', 'puta', 'mulher', 'pula', 'retarda', 'caralho', 'filha', 'ppk', - 'gringo', 'fuder', 'foder', 'hua', 'ahue', 'modafuka', 'modafoka', 'mudafuka', 'mudafoka', 'ooooooooooooooo', 'foda' - ], - curses: [ - 'nigger', 'faggot', 'nigga', 'niqqa', 'motherfucker', 'modafocka' - ] - }, - connectAPI: function () { - this.proxy = { - eventChat: $.proxy(this.eventChat, this), - eventUserskip: $.proxy(this.eventUserskip, this), - eventUserjoin: $.proxy(this.eventUserjoin, this), - eventUserleave: $.proxy(this.eventUserleave, this), - //eventFriendjoin: $.proxy(this.eventFriendjoin, this), - eventVoteupdate: $.proxy(this.eventVoteupdate, this), - eventCurateupdate: $.proxy(this.eventCurateupdate, this), - eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), - eventDjadvance: $.proxy(this.eventDjadvance, this), - //eventDjupdate: $.proxy(this.eventDjupdate, this), - eventWaitlistupdate: $.proxy(this.eventWaitlistupdate, this), - eventVoteskip: $.proxy(this.eventVoteskip, this), - eventModskip: $.proxy(this.eventModskip, this), - eventChatcommand: $.proxy(this.eventChatcommand, this), - eventHistoryupdate: $.proxy(this.eventHistoryupdate, this), - - }; - API.on(API.CHAT, this.proxy.eventChat); - API.on(API.USER_SKIP, this.proxy.eventUserskip); - API.on(API.USER_JOIN, this.proxy.eventUserjoin); - API.on(API.USER_LEAVE, this.proxy.eventUserleave); - API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); - API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); - API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); - API.on(API.ADVANCE, this.proxy.eventDjadvance); - API.on(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); - API.on(API.MOD_SKIP, this.proxy.eventModskip); - API.on(API.CHAT_COMMAND, this.proxy.eventChatcommand); - API.on(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); - }, - disconnectAPI: function () { - API.off(API.CHAT, this.proxy.eventChat); - API.off(API.USER_SKIP, this.proxy.eventUserskip); - API.off(API.USER_JOIN, this.proxy.eventUserjoin); - API.off(API.USER_LEAVE, this.proxy.eventUserleave); - API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); - API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); - API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); - API.off(API.ADVANCE, this.proxy.eventDjadvance); - API.off(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); - API.off(API.MOD_SKIP, this.proxy.eventModskip); - API.off(API.CHAT_COMMAND, this.proxy.eventChatcommand); - API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); }, - startup: function () { - Function.prototype.toString = function () { - return 'Function.' - }; - var u = API.getUser(); - if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); - if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); - basicBot.connectAPI(); - API.moderateDeleteChat = function (cid) { - $.ajax({ - url: "https://plug.dj/_/chat/" + cid, - type: "DELETE" - }) - }; - - basicBot.room.name = window.location.pathname; - var Check; - - console.log(basicBot.room.name); - - var detect = function(){ - if(basicBot.room.name != window.location.pathname){ - console.log("Killing bot after room change."); - storeToStorage(); - basicBot.disconnectAPI(); - setTimeout(function () { - kill(); - }, 1000); - if (basicBot.settings.roomLock){ - window.location = 'https://plug.dj' + basicBot.room.name; - } - else { - clearInterval(Check); - } - } - }; - - Check = setInterval(function(){ detect() }, 2000); - - retrieveSettings(); - retrieveFromStorage(); - window.bot = basicBot; - basicBot.roomUtilities.updateBlacklists(); - setInterval(basicBot.roomUtilities.updateBlacklists, 60 * 60 * 1000); - basicBot.getNewBlacklistedSongs = basicBot.roomUtilities.exportNewBlacklistedSongs; - basicBot.logNewBlacklistedSongs = basicBot.roomUtilities.logNewBlacklistedSongs; - if (basicBot.room.roomstats.launchTime === null) { - basicBot.room.roomstats.launchTime = Date.now(); - } - - for (var j = 0; j < basicBot.room.users.length; j++) { - basicBot.room.users[j].inRoom = false; - } - var userlist = API.getUsers(); - for (var i = 0; i < userlist.length; i++) { - var known = false; - var ind = null; - for (var j = 0; j < basicBot.room.users.length; j++) { - if (basicBot.room.users[j].id === userlist[i].id) { - known = true; - ind = j; - } - } - if (known) { - basicBot.room.users[ind].inRoom = true; - } - else { - basicBot.room.users.push(new basicBot.User(userlist[i].id, userlist[i].username)); - ind = basicBot.room.users.length - 1; - } - var wlIndex = API.getWaitListPosition(basicBot.room.users[ind].id) + 1; - basicBot.userUtilities.updatePosition(basicBot.room.users[ind], wlIndex); - } - basicBot.room.afkInterval = setInterval(function () { - basicBot.roomUtilities.afkCheck() - }, 10 * 1000); - basicBot.room.autodisableInterval = setInterval(function () { - basicBot.room.autodisableFunc(); - }, 60 * 60 * 1000); - basicBot.loggedInID = API.getUser().id; - basicBot.status = true; - API.sendChat('/cap ' + basicBot.settings.startupCap); - API.setVolume(basicBot.settings.startupVolume); - if (basicBot.settings.autowoot) { - $("#woot").click(); - } - if (basicBot.settings.startupEmoji) { - var emojibuttonoff = $(".icon-emoji-off"); - if (emojibuttonoff.length > 0) { - emojibuttonoff[0].click(); - } - API.chatLog(':smile: Emojis enabled.'); - } - else { - var emojibuttonon = $(".icon-emoji-on"); - if (emojibuttonon.length > 0) { - emojibuttonon[0].click(); - } - API.chatLog('Emojis disabled.'); - } - API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); - API.chatLog('Volume set to ' + basicBot.settings.startupVolume); - socket(); - loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); + User: function (id, name) { + this.id = id; + this.username = name; + this.jointime = Date.now(); + this.lastActivity = Date.now(); + this.votes = { + woot: 0, + meh: 0, + curate: 0 + }; + this.lastEta = null; + this.afkWarningCount = 0; + this.afkCountdown = null; + this.inRoom = true; + this.isMuted = false; + this.lastDC = { + time: null, + position: null, + songCount: 0 + }; + this.lastKnownPosition = null; }, - commands: { - executable: function (minRank, chat) { - var id = chat.uid; - var perm = basicBot.userUtilities.getPermission(id); - var minPerm; - switch (minRank) { - case 'admin': - minPerm = 10; - break; - case 'ambassador': - minPerm = 7; - break; - case 'host': - minPerm = 5; - break; - case 'cohost': - minPerm = 4; - break; - case 'manager': - minPerm = 3; - break; - case 'mod': - if (basicBot.settings.bouncerPlus) { - minPerm = 2; - } - else { - minPerm = 3; - } - break; - case 'bouncer': - minPerm = 2; - break; - case 'residentdj': - minPerm = 1; - break; - case 'user': - minPerm = 0; - break; - default: - API.chatLog('error assigning minimum permission'); - } - return perm >= minPerm; - - }, - /** - command: { - command: 'cmd', - rank: 'user/bouncer/mod/manager', - type: 'startsWith/exact', - functionality: function(chat, cmd){ - if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if( !basicBot.commands.executable(this.rank, chat) ) return void (0); - else{ - - } - } - }, - **/ - - activeCommand: { - command: 'active', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var now = Date.now(); - var chatters = 0; - var time; - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - var since = durationOnline / 1000; - - if (msg.length === cmd.length) time = since; - else { - time = msg.substring(cmd.length + 1); - if (isNaN(time)) return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } + userUtilities: { + getJointime: function (user) { + return user.jointime; + }, + getUser: function (user) { + return API.getUser(user.id); + }, + updatePosition: function (user, newPos) { + user.lastKnownPosition = newPos; + }, + updateDC: function (user) { + user.lastDC.time = Date.now(); + user.lastDC.position = user.lastKnownPosition; + user.lastDC.songCount = basicBot.room.roomstats.songCount; + }, + setLastActivity: function (user) { + user.lastActivity = Date.now(); + user.afkWarningCount = 0; + clearTimeout(user.afkCountdown); + }, + getLastActivity: function (user) { + return user.lastActivity; + }, + getWarningCount: function (user) { + return user.afkWarningCount; + }, + setWarningCount: function (user, value) { + user.afkWarningCount = value; + }, + lookupUser: function (id) { for (var i = 0; i < basicBot.room.users.length; i++) { - userTime = basicBot.userUtilities.getLastActivity(basicBot.room.users[i]); - if ((now - userTime) <= (time * 60 * 1000)) { - chatters++; - } + if (basicBot.room.users[i].id === id) { + return basicBot.room.users[i]; + } } - API.sendChat(subChat(basicBot.chat.activeusersintime, {name: chat.un, amount: chatters, time: time})); - } - } - }, - - addCommand: { - command: 'add', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (msg.length > cmd.length + 2) { - if (typeof user !== 'undefined') { - if (basicBot.room.roomevent) { - basicBot.room.eventArtists.push(user.id); - } - API.moderateAddDJ(user.id); - } else API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - } - } - } - }, - - afklimitCommand: { - command: 'afklimit', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolimitspecified, {name: chat.un})); - var limit = msg.substring(cmd.length + 1); - if (!isNaN(limit)) { - basicBot.settings.maximumAfk = parseInt(limit, 10); - API.sendChat(subChat(basicBot.chat.maximumafktimeset, {name: chat.un, time: basicBot.settings.maximumAfk})); - } - else API.sendChat(subChat(basicBot.chat.invalidlimitspecified, {name: chat.un})); - } - } - }, - - afkremovalCommand: { - command: 'afkremoval', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.afkRemoval) { - basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; - clearInterval(basicBot.room.afkInterval); - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.afkremoval})); + return false; + }, + lookupUserName: function (name) { + for (var i = 0; i < basicBot.room.users.length; i++) { + var match = basicBot.room.users[i].username.trim() == name.trim(); + if (match) { + return basicBot.room.users[i]; + } } + return false; + }, + voteRatio: function (id) { + var user = basicBot.userUtilities.lookupUser(id); + var votes = user.votes; + if (votes.meh === 0) votes.ratio = 1; + else votes.ratio = (votes.woot / votes.meh).toFixed(2); + return votes; + + }, + getPermission: function (obj) { //1 requests + var u; + if (typeof obj === "object") u = obj; + else u = API.getUser(obj); + for (var i = 0; i < botCreatorIDs.length; i++) { + if (botCreatorIDs[i].indexOf(u.id) > -1) return 10; + } + if (u.gRole < 2) return u.role; else { - basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; - basicBot.room.afkInterval = setInterval(function () { - basicBot.roomUtilities.afkCheck() - }, 2 * 1000); - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.afkremoval})); + switch (u.gRole) { + case 2: + return 7; + case 3: + return 8; + case 4: + return 9; + case 5: + return 10; + } } - } - } - }, - - afkresetCommand: { - command: 'afkreset', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - basicBot.userUtilities.setLastActivity(user); - API.sendChat(subChat(basicBot.chat.afkstatusreset, {name: chat.un, username: name})); - } + return 0; + }, + moveUser: function (id, pos, priority) { + var user = basicBot.userUtilities.lookupUser(id); + var wlist = API.getWaitList(); + if (API.getWaitListPosition(id) === -1) { + if (wlist.length < 50) { + API.moderateAddDJ(id); + if (pos !== 0) setTimeout(function (id, pos) { + API.moderateMoveDJ(id, pos); + }, 1250, id, pos); + } + else { + var alreadyQueued = -1; + for (var i = 0; i < basicBot.room.queue.id.length; i++) { + if (basicBot.room.queue.id[i] === id) alreadyQueued = i; + } + if (alreadyQueued !== -1) { + basicBot.room.queue.position[alreadyQueued] = pos; + return API.sendChat(subChat(basicBot.chat.alreadyadding, {position: basicBot.room.queue.position[alreadyQueued]})); + } + basicBot.roomUtilities.booth.lockBooth(); + if (priority) { + basicBot.room.queue.id.unshift(id); + basicBot.room.queue.position.unshift(pos); + } + else { + basicBot.room.queue.id.push(id); + basicBot.room.queue.position.push(pos); + } + var name = user.username; + return API.sendChat(subChat(basicBot.chat.adding, {name: name, position: basicBot.room.queue.position.length})); + } + } + else API.moderateMoveDJ(id, pos); + }, + dclookup: function (id) { + var user = basicBot.userUtilities.lookupUser(id); + if (typeof user === 'boolean') return basicBot.chat.usernotfound; + var name = user.username; + if (user.lastDC.time === null) return subChat(basicBot.chat.notdisconnected, {name: name}); + var dc = user.lastDC.time; + var pos = user.lastDC.position; + if (pos === null) return basicBot.chat.noposition; + var timeDc = Date.now() - dc; + var validDC = false; + if (basicBot.settings.maximumDc * 60 * 1000 > timeDc) { + validDC = true; + } + var time = basicBot.roomUtilities.msToStr(timeDc); + if (!validDC) return (subChat(basicBot.chat.toolongago, {name: basicBot.userUtilities.getUser(user).username, time: time})); + var songsPassed = basicBot.room.roomstats.songCount - user.lastDC.songCount; + var afksRemoved = 0; + var afkList = basicBot.room.afkList; + for (var i = 0; i < afkList.length; i++) { + var timeAfk = afkList[i][1]; + var posAfk = afkList[i][2]; + if (dc < timeAfk && posAfk < pos) { + afksRemoved++; + } + } + var newPosition = user.lastDC.position - songsPassed - afksRemoved; + if (newPosition <= 0) return subChat(basicBot.chat.notdisconnected, {name: name}); + var msg = subChat(basicBot.chat.valid, {name: basicBot.userUtilities.getUser(user).username, time: time, position: newPosition}); + basicBot.userUtilities.moveUser(user.id, newPosition, true); + return msg; } - }, - - afktimeCommand: { - command: 'afktime', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var lastActive = basicBot.userUtilities.getLastActivity(user); - var inactivity = Date.now() - lastActive; - var time = basicBot.roomUtilities.msToStr(inactivity); - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - - if (inactivity == durationOnline){ - API.sendChat(subChat(basicBot.chat.inactivelonger, {botname: basicBot.settings.botName, name: chat.un, username: name})); + }, + + roomUtilities: { + rankToNumber: function (rankString) { + var rankInt = null; + switch (rankString) { + case "admin": + rankInt = 10; + break; + case "ambassador": + rankInt = 7; + break; + case "host": + rankInt = 5; + break; + case "cohost": + rankInt = 4; + break; + case "manager": + rankInt = 3; + break; + case "bouncer": + rankInt = 2; + break; + case "residentdj": + rankInt = 1; + break; + case "user": + rankInt = 0; + break; + } + return rankInt; + }, + 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.minutes < 1 && timeAway.hours < 1 && timeAway.days < 1) { + msg += timeAway.seconds.toString() + 's'; + } + if (msg !== '') { + return msg; } else { - API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); + return false; } - } - } - }, - - autodisableCommand: { - command: 'autodisable', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.autodisable) { - basicBot.settings.autodisable = !basicBot.settings.autodisable; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autodisable})); + }, + booth: { + lockTimer: setTimeout(function () { + }, 1000), + locked: false, + lockBooth: function () { + API.moderateLockWaitList(!basicBot.roomUtilities.booth.locked); + basicBot.roomUtilities.booth.locked = false; + if (basicBot.settings.lockGuard) { + basicBot.roomUtilities.booth.lockTimer = setTimeout(function () { + API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); + }, basicBot.settings.maximumLocktime * 60 * 1000); + } + }, + unlockBooth: function () { + API.moderateLockWaitList(basicBot.roomUtilities.booth.locked); + clearTimeout(basicBot.roomUtilities.booth.lockTimer); + } + }, + afkCheck: function () { + if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); + var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); + var djlist = API.getWaitList(); + var lastPos = Math.min(djlist.length, basicBot.settings.afkpositionCheck); + if (lastPos - 1 > djlist.length) return void (0); + for (var i = 0; i < lastPos; i++) { + if (typeof djlist[i] !== 'undefined') { + var id = djlist[i].id; + var user = basicBot.userUtilities.lookupUser(id); + if (typeof user !== 'boolean') { + var plugUser = basicBot.userUtilities.getUser(user); + if (rank !== null && basicBot.userUtilities.getPermission(plugUser) <= rank) { + var name = plugUser.username; + var lastActive = basicBot.userUtilities.getLastActivity(user); + var inactivity = Date.now() - lastActive; + var time = basicBot.roomUtilities.msToStr(inactivity); + var warncount = user.afkWarningCount; + if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { + if (warncount === 0) { + API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); + user.afkWarningCount = 3; + user.afkCountdown = setTimeout(function (userToChange) { + userToChange.afkWarningCount = 1; + }, 90 * 1000, user); + } + else if (warncount === 1) { + API.sendChat(subChat(basicBot.chat.warning2, {name: name})); + user.afkWarningCount = 3; + user.afkCountdown = setTimeout(function (userToChange) { + userToChange.afkWarningCount = 2; + }, 30 * 1000, user); + } + else if (warncount === 2) { + var pos = API.getWaitListPosition(id); + if (pos !== -1) { + pos++; + basicBot.room.afkList.push([id, Date.now(), pos]); + user.lastDC = { + + time: null, + position: null, + songCount: 0 + }; + API.moderateRemoveDJ(id); + API.sendChat(subChat(basicBot.chat.afkremove, {name: name, time: time, position: pos, maximumafk: basicBot.settings.maximumAfk})); + } + user.afkWarningCount = 0; + } + } + } + } + } + } + }, + smartSkip: function (reason) { + var dj = API.getDJ(); + var id = dj.id; + var waitlistlength = API.getWaitList().length; + var locked = false; + basicBot.room.queueable = false; + + if (waitlistlength == 50) { + basicBot.roomUtilities.booth.lockBooth(); + locked = true; + } + setTimeout(function (id) { + API.moderateForceSkip(); + setTimeout(function () { + if (typeof reason !== 'undefined') { + API.sendChat(reason); + } + }, 500); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.skipPosition, false); + basicBot.room.queueable = true; + if (locked) { + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + } + }, 1500, id); + }, 1000, id); + }, + changeDJCycle: function () { + var toggle = $(".cycle-toggle"); + if (toggle.hasClass("disabled")) { + toggle.click(); + if (basicBot.settings.cycleGuard) { + basicBot.room.cycleTimer = setTimeout(function () { + if (toggle.hasClass("enabled")) toggle.click(); + }, basicBot.settings.cycleMaxTime * 60 * 1000); + } } else { - basicBot.settings.autodisable = !basicBot.settings.autodisable; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autodisable})); + toggle.click(); + clearTimeout(basicBot.room.cycleTimer); } - } - } - }, - - autoskipCommand: { - command: 'autoskip', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.autoskip) { - basicBot.settings.autoskip = !basicBot.settings.autoskip; - clearTimeout(basicBot.room.autoskipTimer); - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); + // TODO: Use API.moderateDJCycle(true/false) + }, + intervalMessage: function () { + var interval; + if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; + else interval = basicBot.settings.messageInterval; + if ((basicBot.room.roomstats.songCount % interval) === 0 && basicBot.status) { + var msg; + if (basicBot.settings.motdEnabled) { + msg = basicBot.settings.motd; + } + else { + if (basicBot.settings.intervalMessages.length === 0) return void (0); + var messageNumber = basicBot.room.roomstats.songCount % basicBot.settings.intervalMessages.length; + msg = basicBot.settings.intervalMessages[messageNumber]; + } + API.sendChat('/me ' + msg); + } + }, + updateBlacklists: function () { + for (var bl in basicBot.settings.blacklists) { + basicBot.room.blacklists[bl] = []; + if (typeof basicBot.settings.blacklists[bl] === 'function') { + basicBot.room.blacklists[bl] = basicBot.settings.blacklists(); + } + else if (typeof basicBot.settings.blacklists[bl] === 'string') { + if (basicBot.settings.blacklists[bl] === '') { + continue; + } + try { + (function (l) { + $.get(basicBot.settings.blacklists[l], function (data) { + if (typeof data === 'string') { + data = JSON.parse(data); + } + var list = []; + for (var prop in data) { + if (typeof data[prop].mid !== 'undefined') { + list.push(data[prop].mid); + } + } + basicBot.room.blacklists[l] = list; + }) + })(bl); + } + catch (e) { + API.chatLog('Error setting' + bl + 'blacklist.'); + console.log('Error setting' + bl + 'blacklist.'); + console.log(e); + } + } + } + }, + logNewBlacklistedSongs: function () { + if (typeof console.table !== 'undefined') { + console.table(basicBot.room.newBlacklisted); } else { - basicBot.settings.autoskip = !basicBot.settings.autoskip; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); + console.log(basicBot.room.newBlacklisted); } - } + }, + exportNewBlacklistedSongs: function () { + var list = {}; + for (var i = 0; i < basicBot.room.newBlacklisted.length; i++) { + var track = basicBot.room.newBlacklisted[i]; + list[track.list] = []; + list[track.list].push({ + title: track.title, + author: track.author, + mid: track.mid + }); + } + return list; } - }, - - autowootCommand: { - command: 'autowoot', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.autowoot); - } + }, + eventChat: function (chat) { + chat.message = linkFixer(chat.message); + chat.message = decodeEntities(chat.message); + chat.message = chat.message.trim(); + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === chat.uid) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); + if (basicBot.room.users[i].username !== chat.un) { + basicBot.room.users[i].username = chat.un; + } + } } - }, - - baCommand: { - command: 'ba', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.brandambassador); - } + if (basicBot.chatUtilities.chatFilter(chat)) return void (0); + if (!basicBot.chatUtilities.commandCheck(chat)) + basicBot.chatUtilities.action(chat); + }, + eventUserjoin: function (user) { + var known = false; + var index = null; + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === user.id) { + known = true; + index = i; + } } - }, - - ballCommand: { - command: ['8ball', 'ask'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var crowd = API.getUsers(); - var msg = chat.message; - var argument = msg.substring(cmd.length + 1).replace(/@/g, ''); - var randomUser = Math.floor(Math.random() * crowd.length); - var randomBall = Math.floor(Math.random() * basicBot.chat.balls.length); - var randomSentence = Math.floor(Math.random() * 1); - API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.chat.balls[randomBall]})); - } + var greet = true; + var welcomeback = null; + if (known) { + basicBot.room.users[index].inRoom = true; + var u = basicBot.userUtilities.lookupUser(user.id); + var jt = u.jointime; + var t = Date.now() - jt; + if (t < 10 * 1000) greet = false; + else welcomeback = true; } - }, - - banCommand: { - command: 'ban', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - API.moderateBanUser(user.id, 1, API.BAN.DAY); - } + else { + basicBot.room.users.push(new basicBot.User(user.id, user.username)); + welcomeback = false; } - }, - - blacklistCommand: { - command: ['blacklist', 'bl'], - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolistspecified, {name: chat.un})); - var list = msg.substr(cmd.length + 1); - if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); - else { - var media = API.getMedia(); - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - var track = { - list: list, - author: media.author, - title: media.title, - mid: media.format + ':' + media.cid - }; - basicBot.room.newBlacklisted.push(track); - basicBot.room.blacklists[list].push(media.format + ':' + media.cid); - API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); - } - else { - API.moderateForceSkip(); - } - if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { - basicBot.room.newBlacklistedSongFunction(track); - } + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === user.id) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); + basicBot.room.users[j].jointime = Date.now(); } - } + } - }, - - blinfoCommand: { - command: 'blinfo', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var author = API.getMedia().author; - var title = API.getMedia().title; - var name = chat.un; - var format = API.getMedia().format; - var cid = API.getMedia().cid; - var songid = format + ":" + cid; - - API.sendChat(subChat(basicBot.chat.blinfo, {name: name, author: author, title: title, songid: songid})); - } + if (basicBot.settings.welcome && greet) { + welcomeback ? + setTimeout(function (user) { + API.sendChat(subChat(basicBot.chat.welcomeback, {name: user.username})); + }, 1 * 1000, user) + : + setTimeout(function (user) { + API.sendChat(subChat(basicBot.chat.welcome, {name: user.username})); + }, 1 * 1000, user); } - }, - - bouncerPlusCommand: { - command: 'bouncer+', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (basicBot.settings.bouncerPlus) { - basicBot.settings.bouncerPlus = false; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': 'Bouncer+'})); - } - else { - if (!basicBot.settings.bouncerPlus) { - var id = chat.uid; - var perm = basicBot.userUtilities.getPermission(id); - if (perm > 2) { - basicBot.settings.bouncerPlus = true; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': 'Bouncer+'})); + }, + eventUserleave: function (user) { + var lastDJ = API.getHistory()[0].user.id; + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === user.id) { + basicBot.userUtilities.updateDC(basicBot.room.users[i]); + basicBot.room.users[i].inRoom = false; + if (lastDJ == user.id){ + var user = basicBot.userUtilities.lookupUser(basicBot.room.users[i].id); + basicBot.userUtilities.updatePosition(user, 0); + user.lastDC.time = null; + user.lastDC.position = user.lastKnownPosition; } - } - else return API.sendChat(subChat(basicBot.chat.bouncerplusrank, {name: chat.un})); } - } } - }, - - botnameCommand: { - command: 'botname', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentbotname, {botname: basicBot.settings.botName})); - var argument = msg.substring(cmd.length + 1); - if (argument) { - basicBot.settings.botName = argument; - API.sendChat(subChat(basicBot.chat.botnameset, {botName: basicBot.settings.botName})); - } - } - } - }, - - clearchatCommand: { - command: 'clearchat', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var currentchat = $('#chat-messages').children(); - for (var i = 0; i < currentchat.length; i++) { - API.moderateDeleteChat(currentchat[i].getAttribute("data-cid")); - } - return API.sendChat(subChat(basicBot.chat.chatcleared, {name: chat.un})); - } + }, + eventVoteupdate: function (obj) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === obj.user.id) { + if (obj.vote === 1) { + basicBot.room.users[i].votes.woot++; + } + else { + basicBot.room.users[i].votes.meh++; + } + } } - }, - - commandsCommand: { - command: 'commands', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); - } + + var mehs = API.getScore().negative; + var woots = API.getScore().positive; + var dj = API.getDJ(); + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + + if (basicBot.settings.voteSkip) { + if ((mehs - woots) >= (basicBot.settings.voteSkipLimit)) { + API.sendChat(subChat(basicBot.chat.voteskipexceededlimit, {name: dj.username, limit: basicBot.settings.voteSkipLimit})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + } } - }, - - cmddeletionCommand: { - command: ['commanddeletion', 'cmddeletion', 'cmddel'], - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.cmdDeletion) { - basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + + }, + eventCurateupdate: function (obj) { + for (var i = 0; i < basicBot.room.users.length; i++) { + if (basicBot.room.users[i].id === obj.user.id) { + basicBot.room.users[i].votes.curate++; } - else { - basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + } + }, + eventDjadvance: function (obj) { + if (basicBot.settings.autowoot) { + $("#woot").click(); // autowoot + } + + var user = basicBot.userUtilities.lookupUser(obj.dj.id) + for(var i = 0; i < basicBot.room.users.length; i++){ + if(basicBot.room.users[i].id === user.id){ + basicBot.room.users[i].lastDC = { + time: null, + position: null, + songCount: 0 + }; } - } } - }, - - cookieCommand: { - command: 'cookie', - rank: 'user', - type: 'startsWith', - getCookie: function (chat) { - var c = Math.floor(Math.random() * basicBot.chat.cookies.length); - return basicBot.chat.cookies[c]; - }, - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var space = msg.indexOf(' '); - if (space === -1) { - API.sendChat(basicBot.chat.eatcookie); - return false; + var lastplay = obj.lastPlay; + if (typeof lastplay === 'undefined') return; + if (basicBot.settings.songstats) { + if (typeof basicBot.chat.songstatistics === "undefined") { + API.sendChat("/me " + lastplay.media.author + " - " + lastplay.media.title + ": " + lastplay.score.positive + "W/" + lastplay.score.grabs + "G/" + lastplay.score.negative + "M.") } else { - var name = msg.substring(space + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false || !user.inRoom) { - return API.sendChat(subChat(basicBot.chat.nousercookie, {name: name})); - } - else if (user.username === chat.un) { - return API.sendChat(subChat(basicBot.chat.selfcookie, {name: name})); - } - else { - return API.sendChat(subChat(basicBot.chat.cookie, {nameto: user.username, namefrom: chat.un, cookie: this.getCookie()})); - } - } - } - } - }, - - cycleCommand: { - command: 'cycle', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.changeDJCycle(); - } - } - }, - - cycleguardCommand: { - command: 'cycleguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.cycleGuard) { - basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cycleguard})); + API.sendChat(subChat(basicBot.chat.songstatistics, {artist: lastplay.media.author, title: lastplay.media.title, woots: lastplay.score.positive, grabs: lastplay.score.grabs, mehs: lastplay.score.negative})) + } + } + basicBot.room.roomstats.totalWoots += lastplay.score.positive; + basicBot.room.roomstats.totalMehs += lastplay.score.negative; + basicBot.room.roomstats.totalCurates += lastplay.score.grabs; + basicBot.room.roomstats.songCount++; + basicBot.roomUtilities.intervalMessage(); + basicBot.room.currentDJID = obj.dj.id; + + var blacklistSkip = setTimeout(function () { + var mid = obj.media.format + ':' + obj.media.cid; + for (var bl in basicBot.room.blacklists) { + if (basicBot.settings.blacklistEnabled) { + if (basicBot.room.blacklists[bl].indexOf(mid) > -1) { + API.sendChat(subChat(basicBot.chat.isblacklisted, {blacklist: bl})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + } + } + }, 2000); + var newMedia = obj.media; + var timeLimitSkip = setTimeout(function () { + if (basicBot.settings.timeGuard && newMedia.duration > basicBot.settings.maximumSongLength * 60 && !basicBot.room.roomevent) { + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.timelimit, {name: name, maxlength: basicBot.settings.maximumSongLength})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }, 2000); + var format = obj.media.format; + var cid = obj.media.cid; + var naSkip = setTimeout(function () { + if (format == 1){ + $.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + cid + '&key=AIzaSyDcfWu9cGaDnTjPKhg_dy9mUh6H7i4ePZ0&part=snippet&callback=?', function (track){ + if (typeof(track.items[0]) === 'undefined'){ + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }); } else { - basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cycleguard})); + var checkSong = SC.get('/tracks/' + cid, function (track){ + if (typeof track.title === 'undefined'){ + var name = obj.dj.username; + API.sendChat(subChat(basicBot.chat.notavailable, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + }); } - - } + }, 2000); + clearTimeout(historySkip); + if (basicBot.settings.historySkip) { + var alreadyPlayed = false; + var apihistory = API.getHistory(); + var name = obj.dj.username; + var historySkip = setTimeout(function () { + for (var i = 0; i < apihistory.length; i++) { + if (apihistory[i].media.cid === obj.media.cid) { + basicBot.room.historyList[i].push(+new Date()); + alreadyPlayed = true; + API.sendChat(subChat(basicBot.chat.songknown, {name: name})); + if (basicBot.settings.smartSkip){ + return basicBot.roomUtilities.smartSkip(); + } + else { + return API.moderateForceSkip(); + } + } + } + if (!alreadyPlayed) { + basicBot.room.historyList.push([obj.media.cid, +new Date()]); + } + }, 2000); } - }, - - cycletimerCommand: { - command: 'cycletimer', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var cycleTime = msg.substring(cmd.length + 1); - if (!isNaN(cycleTime) && cycleTime !== "") { - basicBot.settings.maximumCycletime = cycleTime; - return API.sendChat(subChat(basicBot.chat.cycleguardtime, {name: chat.un, time: basicBot.settings.maximumCycletime})); - } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - - } + if (user.ownSong) { + API.sendChat(subChat(basicBot.chat.permissionownsong, {name: user.username})); + user.ownSong = false; + } + clearTimeout(basicBot.room.autoskipTimer); + if (basicBot.settings.autoskip) { + var remaining = obj.media.duration * 1000; + var startcid = API.getMedia().cid; + basicBot.room.autoskipTimer = setTimeout(function() { + var endcid = API.getMedia().cid; + if (startcid === endcid) { + //API.sendChat('Song stuck, skipping...'); + API.moderateForceSkip(); + } + }, remaining + 5000); } - }, - - dclookupCommand: { - command: ['dclookup', 'dc'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substring(cmd.length + 2); - var perm = basicBot.userUtilities.getPermission(chat.uid); - if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); - } - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var toChat = basicBot.userUtilities.dclookup(user.id); - API.sendChat(toChat); - } + storeToStorage(); + sendToSocket(); + }, + eventWaitlistupdate: function (users) { + if (users.length < 50) { + if (basicBot.room.queue.id.length > 0 && basicBot.room.queueable) { + basicBot.room.queueable = false; + setTimeout(function () { + basicBot.room.queueable = true; + }, 500); + basicBot.room.queueing++; + var id, pos; + setTimeout( + function () { + id = basicBot.room.queue.id.splice(0, 1)[0]; + pos = basicBot.room.queue.position.splice(0, 1)[0]; + API.moderateAddDJ(id, pos); + setTimeout( + function (id, pos) { + API.moderateMoveDJ(id, pos); + basicBot.room.queueing--; + if (basicBot.room.queue.id.length === 0) setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1000, id, pos); + }, 1000 + basicBot.room.queueing * 2500); + } + } + for (var i = 0; i < users.length; i++) { + var user = basicBot.userUtilities.lookupUser(users[i].id); + basicBot.userUtilities.updatePosition(user, API.getWaitListPosition(users[i].id) + 1); + } + }, + chatcleaner: function (chat) { + if (!basicBot.settings.filterChat) return false; + if (basicBot.userUtilities.getPermission(chat.uid) > 1) return false; + var msg = chat.message; + var containsLetters = false; + for (var i = 0; i < msg.length; i++) { + ch = msg.charAt(i); + if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9') || ch === ':' || ch === '^') containsLetters = true; } - }, - - /*deletechatCommand: { - command: 'deletechat', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var chats = $('.from'); - var message = $('.message'); - var emote = $('.emote'); - var from = $('.un.clickable'); - for (var i = 0; i < chats.length; i++) { - var n = from[i].textContent; - if (name.trim() === n.trim()) { - - // var messagecid = $(message)[i].getAttribute('data-cid'); - // var emotecid = $(emote)[i].getAttribute('data-cid'); - // API.moderateDeleteChat(messagecid); - - // try { - // API.moderateDeleteChat(messagecid); - // } - // finally { - // API.moderateDeleteChat(emotecid); - // } - - if (typeof $(message)[i].getAttribute('data-cid') == "undefined"){ - API.moderateDeleteChat($(emote)[i].getAttribute('data-cid')); // works well with normal messages but not with emotes due to emotes and messages are seperate. - } else { - API.moderateDeleteChat($(message)[i].getAttribute('data-cid')); - } - } - } - API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); - } - } - },*/ - - emojiCommand: { - command: 'emoji', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var link = 'http://www.emoji-cheat-sheet.com/'; - API.sendChat(subChat(basicBot.chat.emojilist, {link: link})); - } + if (msg === '') { + return true; } - }, - - englishCommand: { - command: 'english', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if(chat.message.length === cmd.length) return API.sendChat('/me No user specified.'); - var name = chat.message.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if(typeof user === 'boolean') return API.sendChat('/me Invalid user specified.'); - var lang = basicBot.userUtilities.getUser(user).language; - var ch = '/me @' + name + ' '; - switch(lang){ - case 'en': break; - case 'da': ch += 'Vær venlig at tale engelsk.'; break; - case 'de': ch += 'Bitte sprechen Sie Englisch.'; break; - case 'es': ch += 'Por favor, hable Inglés.'; break; - case 'fr': ch += 'Parlez anglais, s\'il vous plaît.'; break; - case 'nl': ch += 'Spreek Engels, alstublieft.'; break; - case 'pl': ch += 'Proszę mówić po angielsku.'; break; - case 'pt': ch += 'Por favor, fale Inglês.'; break; - case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; - case 'cs': ch += 'Mluvte prosím anglicky.'; break; - case 'sr': ch += 'Молим Вас, говорите енглески.'; break; - } - ch += ' English please.'; - API.sendChat(ch); - } + if (!containsLetters && (msg.length === 1 || msg.length > 3)) return true; + msg = msg.replace(/[ ,;.:\/=~+%^*\-\\"'&@#]/g, ''); + var capitals = 0; + var ch; + for (var i = 0; i < msg.length; i++) { + ch = msg.charAt(i); + if (ch >= 'A' && ch <= 'Z') capitals++; } - }, - - etaCommand: { - command: 'eta', - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var perm = basicBot.userUtilities.getPermission(chat.uid); - var msg = chat.message; - var dj = API.getDJ().username; - var name; - if (msg.length > cmd.length) { - if (perm < 2) return void (0); - name = msg.substring(cmd.length + 2); - } else name = chat.un; - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var pos = API.getWaitListPosition(user.id); - var realpos = pos + 1; - if (name == dj) return API.sendChat(subChat(basicBot.chat.youaredj, {name: name})); - if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); - if (pos == 0) return API.sendChat(subChat(basicBot.chat.youarenext, {name: name})); - var timeRemaining = API.getTimeRemaining(); - var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; - var estimateString = basicBot.roomUtilities.msToStr(estimateMS); - API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString, position: realpos})); - } + if (capitals >= 40) { + API.sendChat(subChat(basicBot.chat.caps, {name: chat.un})); + return true; } - }, - - fbCommand: { - command: 'fb', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.fbLink === "string") - API.sendChat(subChat(basicBot.chat.facebook, {link: basicBot.settings.fbLink})); - } + msg = msg.toLowerCase(); + if (msg === 'skip') { + API.sendChat(subChat(basicBot.chat.askskip, {name: chat.un})); + return true; } - }, - - filterCommand: { - command: 'filter', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.filterChat) { - basicBot.settings.filterChat = !basicBot.settings.filterChat; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.chatfilter})); + for (var j = 0; j < basicBot.chatUtilities.spam.length; j++) { + if (msg === basicBot.chatUtilities.spam[j]) { + API.sendChat(subChat(basicBot.chat.spam, {name: chat.un})); + return true; } - else { - basicBot.settings.filterChat = !basicBot.settings.filterChat; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.chatfilter})); - } - } } - }, - - forceskipCommand: { - command: ['forceskip', 'fs'], - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.forceskip, {name: chat.un})); - API.moderateForceSkip(); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - - } - } - }, - - ghostbusterCommand: { - command: 'ghostbuster', - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { + return false; + }, + chatUtilities: { + chatFilter: function (chat) { var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substr(cmd.length + 2); + var perm = basicBot.userUtilities.getPermission(chat.uid); + var user = basicBot.userUtilities.lookupUser(chat.uid); + var isMuted = false; + for (var i = 0; i < basicBot.room.mutedUsers.length; i++) { + if (basicBot.room.mutedUsers[i] === chat.uid) isMuted = true; } - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false || !user.inRoom) { - return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); + if (isMuted) { + API.moderateDeleteChat(chat.cid); + return true; } - else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); - } - } - }, - - gifCommand: { - command: ['gif', 'giphy'], - rank: 'user', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length !== cmd.length) { - function get_id(api_key, fixedtag, func) - { - $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { - "format": "json", - "api_key": api_key, - "rating": rating, - "tag": fixedtag - }, - function(response) - { - func(response.data.id); - } - ) - } - var api_key = "dc6zaTOxFJmzC"; // public beta key - var rating = "pg-13"; // PG 13 gifs - var tag = msg.substr(cmd.length + 1); - var fixedtag = tag.replace(/ /g,"+"); - var commatag = tag.replace(/ /g,", "); - get_id(api_key, tag, function(id) { - if (typeof id !== 'undefined') { - API.sendChat(subChat(basicBot.chat.validgiftags, {name: chat.un, id: id, tags: commatag})); - } else { - API.sendChat(subChat(basicBot.chat.invalidgiftags, {name: chat.un, tags: commatag})); - } - }); + if (basicBot.settings.lockdownEnabled) { + if (perm === 0) { + API.moderateDeleteChat(chat.cid); + return true; + } } - else { - function get_random_id(api_key, func) - { - $.getJSON( - "https://tv.giphy.com/v1/gifs/random?", - { - "format": "json", - "api_key": api_key, - "rating": rating - }, - function(response) - { - func(response.data.id); - } - ) - } - var api_key = "dc6zaTOxFJmzC"; // public beta key - var rating = "pg-13"; // PG 13 gifs - get_random_id(api_key, function(id) { - if (typeof id !== 'undefined') { - API.sendChat(subChat(basicBot.chat.validgifrandom, {name: chat.un, id: id})); - } else { - API.sendChat(subChat(basicBot.chat.invalidgifrandom, {name: chat.un})); - } - }); - } - } - } - }, - - helpCommand: { - command: 'help', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var link = "(Updated link coming soon)"; - API.sendChat(subChat(basicBot.chat.starterhelp, {link: link})); - } - } - }, - - historyskipCommand: { - command: 'historyskip', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.historySkip) { - basicBot.settings.historySkip = !basicBot.settings.historySkip; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.historyskip})); + if (basicBot.chatcleaner(chat)) { + API.moderateDeleteChat(chat.cid); + return true; } - else { - basicBot.settings.historySkip = !basicBot.settings.historySkip; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.historyskip})); + if (basicBot.settings.cmdDeletion && msg.startsWith(basicBot.settings.commandLiteral)) { + API.moderateDeleteChat(chat.cid); } - } - } - }, - - joinCommand: { - command: 'join', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.roulette.rouletteStatus && basicBot.room.roulette.participants.indexOf(chat.uid) < 0) { - basicBot.room.roulette.participants.push(chat.uid); - API.sendChat(subChat(basicBot.chat.roulettejoin, {name: chat.un})); - } - } - } - }, - - jointimeCommand: { - command: 'jointime', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var join = basicBot.userUtilities.getJointime(user); - var time = Date.now() - join; - var timeString = basicBot.roomUtilities.msToStr(time); - API.sendChat(subChat(basicBot.chat.jointime, {namefrom: chat.un, username: name, time: timeString})); - } - } - }, - - kickCommand: { - command: 'kick', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var lastSpace = msg.lastIndexOf(' '); - var time; - var name; - if (lastSpace === msg.indexOf(' ')) { - time = 0.25; - name = msg.substring(cmd.length + 2); + /** + var plugRoomLinkPatt = /(\bhttps?:\/\/(www.)?plug\.dj[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; + if (plugRoomLinkPatt.exec(msg)) { + if (perm === 0) { + API.sendChat(subChat(basicBot.chat.roomadvertising, {name: chat.un})); + API.moderateDeleteChat(chat.cid); + return true; + } } - else { - time = msg.substring(lastSpace + 1); - name = msg.substring(cmd.length + 2, lastSpace); + **/ + if (msg.indexOf('http://adf.ly/') > -1) { + API.moderateDeleteChat(chat.cid); + API.sendChat(subChat(basicBot.chat.adfly, {name: chat.un})); + return true; + } + if (msg.indexOf('autojoin was not enabled') > 0 || msg.indexOf('AFK message was not enabled') > 0 || msg.indexOf('!afkdisable') > 0 || msg.indexOf('!joindisable') > 0 || msg.indexOf('autojoin disabled') > 0 || msg.indexOf('AFK message disabled') > 0) { + API.moderateDeleteChat(chat.cid); + return true; } - var user = basicBot.userUtilities.lookupUserName(name); - var from = chat.un; - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var rlJoinChat = basicBot.chat.roulettejoin; + var rlLeaveChat = basicBot.chat.rouletteleave; - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - var permTokick = basicBot.userUtilities.getPermission(user.id); + var joinedroulette = rlJoinChat.split('%%NAME%%'); + if (joinedroulette[1].length > joinedroulette[0].length) joinedroulette = joinedroulette[1]; + else joinedroulette = joinedroulette[0]; - if (permFrom <= permTokick) - return API.sendChat(subChat(basicBot.chat.kickrank, {name: chat.un})); + var leftroulette = rlLeaveChat.split('%%NAME%%'); + if (leftroulette[1].length > leftroulette[0].length) leftroulette = leftroulette[1]; + else leftroulette = leftroulette[0]; - if (!isNaN(time)) { - API.sendChat(subChat(basicBot.chat.kick, {name: chat.un, username: name, time: time})); - if (time > 24 * 60 * 60) API.moderateBanUser(user.id, 1, API.BAN.PERMA); - else API.moderateBanUser(user.id, 1, API.BAN.DAY); - setTimeout(function (id, name) { - API.moderateUnbanUser(id); - console.log('Unbanned @' + name + '. (' + id + ')'); - }, time * 60 * 1000, user.id, name); - } - else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - killCommand: { - command: 'kill', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - storeToStorage(); - sendToSocket(); - API.sendChat(basicBot.chat.kill); - basicBot.disconnectAPI(); - setTimeout(function () { - kill(); - }, 1000); - } - } - }, - - languageCommand: { - command: 'language', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); - var argument = msg.substring(cmd.length + 1); - - $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { - var langIndex = json; - var link = langIndex[argument.toLowerCase()]; - if (typeof link === "undefined") { - API.sendChat(subChat(basicBot.chat.langerror, {link: "http://git.io/vJ9nI"})); - } - else { - basicBot.settings.language = argument; - loadChat(); - API.sendChat(subChat(basicBot.chat.langset, {language: basicBot.settings.language})); - } - }); - } - } - }, - - leaveCommand: { - command: 'leave', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var ind = basicBot.room.roulette.participants.indexOf(chat.uid); - if (ind > -1) { - basicBot.room.roulette.participants.splice(ind, 1); - API.sendChat(subChat(basicBot.chat.rouletteleave, {name: chat.un})); - } - } - } - }, - - linkCommand: { - command: 'link', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var media = API.getMedia(); - var from = chat.un; - var user = basicBot.userUtilities.lookupUser(chat.uid); - var perm = basicBot.userUtilities.getPermission(chat.uid); - var dj = API.getDJ().id; - var isDj = false; - if (dj === chat.uid) isDj = true; - if (perm >= 1 || isDj) { - if (media.format === 1) { - var linkToSong = "http://youtu.be/" + media.cid; - API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); - } - if (media.format === 2) { - SC.get('/tracks/' + media.cid, function (sound) { - API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: sound.permalink_url})); - }); - } + if ((msg.indexOf(joinedroulette) > -1 || msg.indexOf(leftroulette) > -1) && chat.uid === basicBot.loggedInID) { + setTimeout(function (id) { + API.moderateDeleteChat(id); + }, 5 * 1000, chat.cid); + return true; } - } - } - }, - - lockCommand: { - command: 'lock', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.booth.lockBooth(); - } - } - }, - - lockdownCommand: { - command: 'lockdown', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var temp = basicBot.settings.lockdownEnabled; - basicBot.settings.lockdownEnabled = !temp; - if (basicBot.settings.lockdownEnabled) { - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockdown})); + return false; + }, + commandCheck: function (chat) { + var cmd; + if (chat.message.charAt(0) === basicBot.settings.commandLiteral) { + var space = chat.message.indexOf(' '); + if (space === -1) { + cmd = chat.message; + } + else cmd = chat.message.substring(0, space); + } + else return false; + var userPerm = basicBot.userUtilities.getPermission(chat.uid); + //console.log("name: " + chat.un + ", perm: " + userPerm); + if (chat.message !== basicBot.settings.commandLiteral + 'join' && chat.message !== basicBot.settings.commandLiteral + "leave") { + if (userPerm === 0 && !basicBot.room.usercommand) return void (0); + if (!basicBot.room.allcommand) return void (0); + } + if (chat.message === basicBot.settings.commandLiteral + 'eta' && basicBot.settings.etaRestriction) { + if (userPerm < 2) { + var u = basicBot.userUtilities.lookupUser(chat.uid); + if (u.lastEta !== null && (Date.now() - u.lastEta) < 1 * 60 * 60 * 1000) { + API.moderateDeleteChat(chat.cid); + return void (0); + } + else u.lastEta = Date.now(); + } } - else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); - } - } - }, - - lockguardCommand: { - command: 'lockguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.lockGuard) { - basicBot.settings.lockGuard = !basicBot.settings.lockGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockguard})); + var executed = false; + + for (var comm in basicBot.commands) { + var cmdCall = basicBot.commands[comm].command; + if (!Array.isArray(cmdCall)) { + cmdCall = [cmdCall] + } + for (var i = 0; i < cmdCall.length; i++) { + if (basicBot.settings.commandLiteral + cmdCall[i] === cmd) { + basicBot.commands[comm].functionality(chat, basicBot.settings.commandLiteral + cmdCall[i]); + executed = true; + break; + } + } } - else { - basicBot.settings.lockGuard = !basicBot.settings.lockGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockguard})); + + if (executed && userPerm === 0) { + basicBot.room.usercommand = false; + setTimeout(function () { + basicBot.room.usercommand = true; + }, basicBot.settings.commandCooldown * 1000); } - } - } - }, - - lockskipCommand: { - command: 'lockskip', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.skippable) { - var dj = API.getDJ(); - var id = dj.id; - var name = dj.username; - var msgSend = '@' + name + ': '; - basicBot.room.queueable = false; - - if (chat.message.length === cmd.length) { - API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); - basicBot.roomUtilities.booth.lockBooth(); - setTimeout(function (id) { - API.moderateForceSkip(); - basicBot.room.skippable = false; - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); - basicBot.room.queueable = true; - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1500, id); - }, 1000, id); - return void (0); - } - var validReason = false; - var msg = chat.message; - var reason = msg.substring(cmd.length + 1); - for (var i = 0; i < basicBot.settings.lockskipReasons.length; i++) { - var r = basicBot.settings.lockskipReasons[i][0]; - if (reason.indexOf(r) !== -1) { - validReason = true; - msgSend += basicBot.settings.lockskipReasons[i][1]; - } - } - if (validReason) { - API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); - basicBot.roomUtilities.booth.lockBooth(); - setTimeout(function (id) { - API.moderateForceSkip(); - basicBot.room.skippable = false; - API.sendChat(msgSend); - setTimeout(function () { - basicBot.room.skippable = true - }, 5 * 1000); - setTimeout(function (id) { - basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); - basicBot.room.queueable = true; - setTimeout(function () { - basicBot.roomUtilities.booth.unlockBooth(); - }, 1000); - }, 1500, id); - }, 1000, id); - return void (0); - } + if (executed) { + /*if (basicBot.settings.cmdDeletion) { + API.moderateDeleteChat(chat.cid); + }*/ + + //basicBot.room.allcommand = false; + //setTimeout(function () { + basicBot.room.allcommand = true; + //}, 5 * 1000); } - } - } - }, - - locktimerCommand: { - command: 'locktimer', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var lockTime = msg.substring(cmd.length + 1); - if (!isNaN(lockTime) && lockTime !== "") { - basicBot.settings.maximumLocktime = lockTime; - return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, time: basicBot.settings.maximumLocktime})); + return executed; + }, + action: function (chat) { + var user = basicBot.userUtilities.lookupUser(chat.uid); + if (chat.type === 'message') { + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.userUtilities.getUser(basicBot.room.users[j]).id === chat.uid) { + basicBot.userUtilities.setLastActivity(basicBot.room.users[j]); + } + + } } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - logoutCommand: { - command: 'logout', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); - setTimeout(function () { - $(".logout").mousedown() - }, 1000); - } - } - }, - - maxlengthCommand: { - command: 'maxlength', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var maxTime = msg.substring(cmd.length + 1); - if (!isNaN(maxTime)) { - basicBot.settings.maximumSongLength = maxTime; - return API.sendChat(subChat(basicBot.chat.maxlengthtime, {name: chat.un, time: basicBot.settings.maximumSongLength})); + basicBot.room.roomstats.chatmessages++; + }, + spam: [ + 'hueh', 'hu3', 'brbr', 'heu', 'brbr', 'kkkk', 'spoder', 'mafia', 'zuera', 'zueira', + 'zueria', 'aehoo', 'aheu', 'alguem', 'algum', 'brazil', 'zoeira', 'fuckadmins', 'affff', 'vaisefoder', 'huenaarea', + 'hitler', 'ashua', 'ahsu', 'ashau', 'lulz', 'huehue', 'hue', 'huehuehue', 'merda', 'pqp', 'puta', 'mulher', 'pula', 'retarda', 'caralho', 'filha', 'ppk', + 'gringo', 'fuder', 'foder', 'hua', 'ahue', 'modafuka', 'modafoka', 'mudafuka', 'mudafoka', 'ooooooooooooooo', 'foda' + ], + curses: [ + 'nigger', 'faggot', 'nigga', 'niqqa', 'motherfucker', 'modafocka' + ] + }, + connectAPI: function () { + this.proxy = { + eventChat: $.proxy(this.eventChat, this), + eventUserskip: $.proxy(this.eventUserskip, this), + eventUserjoin: $.proxy(this.eventUserjoin, this), + eventUserleave: $.proxy(this.eventUserleave, this), + //eventFriendjoin: $.proxy(this.eventFriendjoin, this), + eventVoteupdate: $.proxy(this.eventVoteupdate, this), + eventCurateupdate: $.proxy(this.eventCurateupdate, this), + eventRoomscoreupdate: $.proxy(this.eventRoomscoreupdate, this), + eventDjadvance: $.proxy(this.eventDjadvance, this), + //eventDjupdate: $.proxy(this.eventDjupdate, this), + eventWaitlistupdate: $.proxy(this.eventWaitlistupdate, this), + eventVoteskip: $.proxy(this.eventVoteskip, this), + eventModskip: $.proxy(this.eventModskip, this), + eventChatcommand: $.proxy(this.eventChatcommand, this), + eventHistoryupdate: $.proxy(this.eventHistoryupdate, this), + + }; + API.on(API.CHAT, this.proxy.eventChat); + API.on(API.USER_SKIP, this.proxy.eventUserskip); + API.on(API.USER_JOIN, this.proxy.eventUserjoin); + API.on(API.USER_LEAVE, this.proxy.eventUserleave); + API.on(API.VOTE_UPDATE, this.proxy.eventVoteupdate); + API.on(API.GRAB_UPDATE, this.proxy.eventCurateupdate); + API.on(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); + API.on(API.ADVANCE, this.proxy.eventDjadvance); + API.on(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); + API.on(API.MOD_SKIP, this.proxy.eventModskip); + API.on(API.CHAT_COMMAND, this.proxy.eventChatcommand); + API.on(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); + }, + disconnectAPI: function () { + API.off(API.CHAT, this.proxy.eventChat); + API.off(API.USER_SKIP, this.proxy.eventUserskip); + API.off(API.USER_JOIN, this.proxy.eventUserjoin); + API.off(API.USER_LEAVE, this.proxy.eventUserleave); + API.off(API.VOTE_UPDATE, this.proxy.eventVoteupdate); + API.off(API.CURATE_UPDATE, this.proxy.eventCurateupdate); + API.off(API.ROOM_SCORE_UPDATE, this.proxy.eventRoomscoreupdate); + API.off(API.ADVANCE, this.proxy.eventDjadvance); + API.off(API.WAIT_LIST_UPDATE, this.proxy.eventWaitlistupdate); + API.off(API.MOD_SKIP, this.proxy.eventModskip); + API.off(API.CHAT_COMMAND, this.proxy.eventChatcommand); + API.off(API.HISTORY_UPDATE, this.proxy.eventHistoryupdate); + }, + startup: function () { + Function.prototype.toString = function () { + return 'Function.' + }; + var u = API.getUser(); + if (basicBot.userUtilities.getPermission(u) < 2) return API.chatLog(basicBot.chat.greyuser); + if (basicBot.userUtilities.getPermission(u) === 2) API.chatLog(basicBot.chat.bouncer); + basicBot.connectAPI(); + API.moderateDeleteChat = function (cid) { + $.ajax({ + url: "https://plug.dj/_/chat/" + cid, + type: "DELETE" + }) + }; + + basicBot.room.name = window.location.pathname; + var Check; + + console.log(basicBot.room.name); + + var detect = function(){ + if(basicBot.room.name != window.location.pathname){ + console.log("Killing bot after room change."); + storeToStorage(); + basicBot.disconnectAPI(); + setTimeout(function () { + kill(); + }, 1000); + if (basicBot.settings.roomLock){ + window.location = 'https://plug.dj' + basicBot.room.name; + } + else { + clearInterval(Check); + } } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } + }; + + Check = setInterval(function(){ detect() }, 2000); + + retrieveSettings(); + retrieveFromStorage(); + window.bot = basicBot; + basicBot.roomUtilities.updateBlacklists(); + setInterval(basicBot.roomUtilities.updateBlacklists, 60 * 60 * 1000); + basicBot.getNewBlacklistedSongs = basicBot.roomUtilities.exportNewBlacklistedSongs; + basicBot.logNewBlacklistedSongs = basicBot.roomUtilities.logNewBlacklistedSongs; + if (basicBot.room.roomstats.launchTime === null) { + basicBot.room.roomstats.launchTime = Date.now(); } - }, - - motdCommand: { - command: 'motd', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat('/me MotD: ' + basicBot.settings.motd); - var argument = msg.substring(cmd.length + 1); - if (!basicBot.settings.motdEnabled) basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - if (isNaN(argument)) { - basicBot.settings.motd = argument; - API.sendChat(subChat(basicBot.chat.motdset, {msg: basicBot.settings.motd})); - } - else { - basicBot.settings.motdInterval = argument; - API.sendChat(subChat(basicBot.chat.motdintervalset, {interval: basicBot.settings.motdInterval})); + + for (var j = 0; j < basicBot.room.users.length; j++) { + basicBot.room.users[j].inRoom = false; + } + var userlist = API.getUsers(); + for (var i = 0; i < userlist.length; i++) { + var known = false; + var ind = null; + for (var j = 0; j < basicBot.room.users.length; j++) { + if (basicBot.room.users[j].id === userlist[i].id) { + known = true; + ind = j; + } } - } - } - }, - - moveCommand: { - command: 'move', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var firstSpace = msg.indexOf(' '); - var lastSpace = msg.lastIndexOf(' '); - var pos; - var name; - if (isNaN(parseInt(msg.substring(lastSpace + 1)))) { - pos = 1; - name = msg.substring(cmd.length + 2); + if (known) { + basicBot.room.users[ind].inRoom = true; } else { - pos = parseInt(msg.substring(lastSpace + 1)); - name = msg.substring(cmd.length + 2, lastSpace); - } - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - if (user.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbotwaitlist, {name: chat.un})); - if (!isNaN(pos)) { - API.sendChat(subChat(basicBot.chat.move, {name: chat.un})); - basicBot.userUtilities.moveUser(user.id, pos, false); - } else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); - } + basicBot.room.users.push(new basicBot.User(userlist[i].id, userlist[i].username)); + ind = basicBot.room.users.length - 1; + } + var wlIndex = API.getWaitListPosition(basicBot.room.users[ind].id) + 1; + basicBot.userUtilities.updatePosition(basicBot.room.users[ind], wlIndex); + } + basicBot.room.afkInterval = setInterval(function () { + basicBot.roomUtilities.afkCheck() + }, 10 * 1000); + basicBot.room.autodisableInterval = setInterval(function () { + basicBot.room.autodisableFunc(); + }, 60 * 60 * 1000); + basicBot.loggedInID = API.getUser().id; + basicBot.status = true; + API.sendChat('/cap ' + basicBot.settings.startupCap); + API.setVolume(basicBot.settings.startupVolume); + if (basicBot.settings.autowoot) { + $("#woot").click(); + } + if (basicBot.settings.startupEmoji) { + var emojibuttonoff = $(".icon-emoji-off"); + if (emojibuttonoff.length > 0) { + emojibuttonoff[0].click(); + } + API.chatLog(':smile: Emojis enabled.'); } - }, - - muteCommand: { - command: 'mute', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var lastSpace = msg.lastIndexOf(' '); - var time = null; - var name; - if (lastSpace === msg.indexOf(' ')) { - name = msg.substring(cmd.length + 2); - time = 45; - } - else { - time = msg.substring(lastSpace + 1); - if (isNaN(time) || time == "" || time == null || typeof time == "undefined") { - return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - name = msg.substring(cmd.length + 2, lastSpace); - } - var from = chat.un; - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - var permUser = basicBot.userUtilities.getPermission(user.id); - if (permFrom > permUser) { - /* - basicBot.room.mutedUsers.push(user.id); - if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); - else { - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === id) { - indexMuted = i; - wasMuted = true; - } - } - if (indexMuted > -1) { - basicBot.room.mutedUsers.splice(indexMuted); - var u = basicBot.userUtilities.lookupUser(id); - var name = u.username; - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - }, time * 60 * 1000, user.id); - } - */ - if (time > 45) { - API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - } - else if (time === 45) { - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - - } - else if (time > 30) { - API.moderateMuteUser(user.id, 1, API.MUTE.LONG); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } - else if (time > 15) { - API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } - else { - API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); - } + else { + var emojibuttonon = $(".icon-emoji-on"); + if (emojibuttonon.length > 0) { + emojibuttonon[0].click(); } - else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); - } - } - }, - - opCommand: { - command: 'op', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.opLink === "string") - return API.sendChat(subChat(basicBot.chat.oplist, {link: basicBot.settings.opLink})); - } + API.chatLog('Emojis disabled.'); } - }, - - pingCommand: { - command: 'ping', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.pong) - } - } - }, - - refreshCommand: { - command: 'refresh', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - sendToSocket(); - storeToStorage(); - basicBot.disconnectAPI(); - setTimeout(function () { - window.location.reload(false); - }, 1000); + API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); + API.chatLog('Volume set to ' + basicBot.settings.startupVolume); + socket(); + loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); + }, + commands: { + executable: function (minRank, chat) { + var id = chat.uid; + var perm = basicBot.userUtilities.getPermission(id); + var minPerm; + switch (minRank) { + case 'admin': + minPerm = 10; + break; + case 'ambassador': + minPerm = 7; + break; + case 'host': + minPerm = 5; + break; + case 'cohost': + minPerm = 4; + break; + case 'manager': + minPerm = 3; + break; + case 'mod': + if (basicBot.settings.bouncerPlus) { + minPerm = 2; + } + else { + minPerm = 3; + } + break; + case 'bouncer': + minPerm = 2; + break; + case 'residentdj': + minPerm = 1; + break; + case 'user': + minPerm = 0; + break; + default: + API.chatLog('error assigning minimum permission'); + } + return perm >= minPerm; - } - } - }, - - reloadCommand: { - command: 'reload', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat(basicBot.chat.reload); - sendToSocket(); - storeToStorage(); - basicBot.disconnectAPI(); - kill(); - setTimeout(function () { - $.getScript(basicBot.scriptLink); - }, 2000); - } - } - }, - - removeCommand: { - command: 'remove', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length > cmd.length + 2) { - var name = msg.substr(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (typeof user !== 'boolean') { - user.lastDC = { - time: null, - position: null, - songCount: 0 - }; - if (API.getDJ().id === user.id) { - API.moderateForceSkip(); - setTimeout(function () { - API.moderateRemoveDJ(user.id); - }, 1 * 1000, user); - } - else API.moderateRemoveDJ(user.id); - } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); - } else API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - } - } - }, - - restrictetaCommand: { - command: 'restricteta', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.etaRestriction) { - basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.etarestriction})); - } - else { - basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.etarestriction})); + }, + /** + command: { + command: 'cmd', + rank: 'user/bouncer/mod/manager', + type: 'startsWith/exact', + functionality: function(chat, cmd){ + if(this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if( !basicBot.commands.executable(this.rank, chat) ) return void (0); + else{ + + } + } + }, + **/ + + activeCommand: { + command: 'active', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var now = Date.now(); + var chatters = 0; + var time; + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + var since = durationOnline / 1000; + + if (msg.length === cmd.length) time = since; + else { + time = msg.substring(cmd.length + 1); + if (isNaN(time)) return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + for (var i = 0; i < basicBot.room.users.length; i++) { + userTime = basicBot.userUtilities.getLastActivity(basicBot.room.users[i]); + if ((now - userTime) <= (time * 60 * 1000)) { + chatters++; + } + } + API.sendChat(subChat(basicBot.chat.activeusersintime, {name: chat.un, amount: chatters, time: time})); + } } - } - } - }, - - rouletteCommand: { - command: 'roulette', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (!basicBot.room.roulette.rouletteStatus) { - basicBot.room.roulette.startRoulette(); - } - } - } - }, - - rulesCommand: { - command: 'rules', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.rulesLink === "string") - return API.sendChat(subChat(basicBot.chat.roomrules, {link: basicBot.settings.rulesLink})); - } - } - }, - - sessionstatsCommand: { - command: 'sessionstats', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var from = chat.un; - var woots = basicBot.room.roomstats.totalWoots; - var mehs = basicBot.room.roomstats.totalMehs; - var grabs = basicBot.room.roomstats.totalCurates; - API.sendChat(subChat(basicBot.chat.sessionstats, {name: from, woots: woots, mehs: mehs, grabs: grabs})); - } - } - }, - - skipCommand: { - command: ['skip', 'smartskip'], - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.room.skippable) { - - var timeLeft = API.getTimeRemaining(); - var timeElapsed = API.getTimeElapsed(); - var dj = API.getDJ(); - var name = dj.username; - var msgSend = '@' + name + ', '; - - if (chat.message.length === cmd.length) { - API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(); + }, + + addCommand: { + command: 'add', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (msg.length > cmd.length + 2) { + if (typeof user !== 'undefined') { + if (basicBot.room.roomevent) { + basicBot.room.eventArtists.push(user.id); + } + API.moderateAddDJ(user.id); + } else API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + } } + } + }, + + afklimitCommand: { + command: 'afklimit', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - API.moderateForceSkip(); + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolimitspecified, {name: chat.un})); + var limit = msg.substring(cmd.length + 1); + if (!isNaN(limit)) { + basicBot.settings.maximumAfk = parseInt(limit, 10); + API.sendChat(subChat(basicBot.chat.maximumafktimeset, {name: chat.un, time: basicBot.settings.maximumAfk})); + } + else API.sendChat(subChat(basicBot.chat.invalidlimitspecified, {name: chat.un})); } - } - var validReason = false; - var msg = chat.message; - var reason = msg.substring(cmd.length + 1); - for (var i = 0; i < basicBot.settings.skipReasons.length; i++) { - var r = basicBot.settings.skipReasons[i][0]; - if (reason.indexOf(r) !== -1) { - validReason = true; - msgSend += basicBot.settings.skipReasons[i][1]; + } + }, + + afkremovalCommand: { + command: 'afkremoval', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.afkRemoval) { + basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; + clearInterval(basicBot.room.afkInterval); + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.afkremoval})); + } + else { + basicBot.settings.afkRemoval = !basicBot.settings.afkRemoval; + basicBot.room.afkInterval = setInterval(function () { + basicBot.roomUtilities.afkCheck() + }, 2 * 1000); + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.afkremoval})); + } } - } - if (validReason) { - API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); - if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ - basicBot.roomUtilities.smartSkip(msgSend); + } + }, + + afkresetCommand: { + command: 'afkreset', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + basicBot.userUtilities.setLastActivity(user); + API.sendChat(subChat(basicBot.chat.afkstatusreset, {name: chat.un, username: name})); } + } + }, + + afktimeCommand: { + command: 'afktime', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - API.moderateForceSkip(); - setTimeout(function () { - API.sendChat(msgSend); - }, 500); + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var lastActive = basicBot.userUtilities.getLastActivity(user); + var inactivity = Date.now() - lastActive; + var time = basicBot.roomUtilities.msToStr(inactivity); + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + + if (inactivity == durationOnline){ + API.sendChat(subChat(basicBot.chat.inactivelonger, {botname: basicBot.settings.botName, name: chat.un, username: name})); + } else { + API.sendChat(subChat(basicBot.chat.inactivefor, {name: chat.un, username: name, time: time})); + } } - } } - } - } - }, - - skipposCommand: { - command: 'skippos', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var pos = msg.substring(cmd.length + 1); - if (!isNaN(pos)) { - basicBot.settings.skipPosition = pos; - return API.sendChat(subChat(basicBot.chat.skippos, {name: chat.un, position: basicBot.settings.skipPosition})); + }, + + autodisableCommand: { + command: 'autodisable', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.autodisable) { + basicBot.settings.autodisable = !basicBot.settings.autodisable; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autodisable})); + } + else { + basicBot.settings.autodisable = !basicBot.settings.autodisable; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autodisable})); + } + + } } - else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); - } - } - }, - - songstatsCommand: { - command: 'songstats', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.songstats) { - basicBot.settings.songstats = !basicBot.settings.songstats; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.songstats})); + }, + + autoskipCommand: { + command: 'autoskip', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.autoskip) { + basicBot.settings.autoskip = !basicBot.settings.autoskip; + clearTimeout(basicBot.room.autoskipTimer); + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.autoskip})); + } + else { + basicBot.settings.autoskip = !basicBot.settings.autoskip; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.autoskip})); + } + } } - else { - basicBot.settings.songstats = !basicBot.settings.songstats; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.songstats})); + }, + + autowootCommand: { + command: 'autowoot', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.autowoot); + } } - } - } - }, - - sourceCommand: { - command: 'source', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - API.sendChat('/me This bot was created by ' + botCreator + ', but is now maintained by ' + botMaintainer + "."); - } - } - }, - - statusCommand: { - command: 'status', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var from = chat.un; - var msg = '[@' + from + '] '; - - msg += basicBot.chat.afkremoval + ': '; - if (basicBot.settings.afkRemoval) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - msg += basicBot.chat.afksremoved + ": " + basicBot.room.afkList.length + '. '; - msg += basicBot.chat.afklimit + ': ' + basicBot.settings.maximumAfk + '. '; - - msg += 'Bouncer+: '; - if (basicBot.settings.bouncerPlus) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.blacklist + ': '; - if (basicBot.settings.blacklistEnabled) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.lockguard + ': '; - if (basicBot.settings.lockGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.cycleguard + ': '; - if (basicBot.settings.cycleGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.timeguard + ': '; - if (basicBot.settings.timeGuard) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.chatfilter + ': '; - if (basicBot.settings.filterChat) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.historyskip + ': '; - if (basicBot.settings.historySkip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.voteskip + ': '; - if (basicBot.settings.voteSkip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.cmddeletion + ': '; - if (basicBot.settings.cmdDeletion) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - msg += basicBot.chat.autoskip + ': '; - if (basicBot.settings.autoskip) msg += 'ON'; - else msg += 'OFF'; - msg += '. '; - - // TODO: Display more toggleable bot settings. - - var launchT = basicBot.room.roomstats.launchTime; - var durationOnline = Date.now() - launchT; - var since = basicBot.roomUtilities.msToStr(durationOnline); - msg += subChat(basicBot.chat.activefor, {time: since}); - - /* - // least efficient way to go about this, but it works :) - if (msg.length > 256){ - firstpart = msg.substr(0, 256); - secondpart = msg.substr(256); - API.sendChat(firstpart); - setTimeout(function () { - API.sendChat(secondpart); - }, 300); + }, + + baCommand: { + command: 'ba', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.brandambassador); + } } - else { - API.sendChat(msg); + }, + + ballCommand: { + command: ['8ball', 'ask'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var crowd = API.getUsers(); + var msg = chat.message; + var argument = msg.substring(cmd.length + 1).replace(/@/g, ''); + var randomUser = Math.floor(Math.random() * crowd.length); + var randomBall = Math.floor(Math.random() * basicBot.chat.balls.length); + var randomSentence = Math.floor(Math.random() * 1); + API.sendChat(subChat(basicBot.chat.ball, {name: chat.un, botname: basicBot.settings.botName, question: argument, response: basicBot.chat.balls[randomBall]})); + } } - */ + }, - // This is a more efficient solution - if (msg.length > 241){ - var split = msg.match(/.{1,241}/g); - for (var i = 0; i < split.length; i++) { - var func = function(index) { - setTimeout(function() { - API.sendChat("/me " + split[index]); - }, 500 * index); + banCommand: { + command: 'ban', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + API.moderateBanUser(user.id, 1, API.BAN.DAY); } - func(i); - } - } - else { - return API.sendChat(msg); } - } - } - }, - - swapCommand: { - command: 'swap', - rank: 'mod', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var firstSpace = msg.indexOf(' '); - var lastSpace = msg.lastIndexOf(' '); - var name1 = msg.substring(cmd.length + 2, lastSpace); - var name2 = msg.substring(lastSpace + 2); - var user1 = basicBot.userUtilities.lookupUserName(name1); - var user2 = basicBot.userUtilities.lookupUserName(name2); - if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); - if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); - var p1 = API.getWaitListPosition(user1.id) + 1; - var p2 = API.getWaitListPosition(user2.id) + 1; - if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); - API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); - if (p1 < p2) { - basicBot.userUtilities.moveUser(user2.id, p1, false); - setTimeout(function (user1, p2) { - basicBot.userUtilities.moveUser(user1.id, p2, false); - }, 2000, user1, p2); + }, + + blacklistCommand: { + command: ['blacklist', 'bl'], + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nolistspecified, {name: chat.un})); + var list = msg.substr(cmd.length + 1); + if (typeof basicBot.room.blacklists[list] === 'undefined') return API.sendChat(subChat(basicBot.chat.invalidlistspecified, {name: chat.un})); + else { + var media = API.getMedia(); + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + var track = { + list: list, + author: media.author, + title: media.title, + mid: media.format + ':' + media.cid + }; + basicBot.room.newBlacklisted.push(track); + basicBot.room.blacklists[list].push(media.format + ':' + media.cid); + API.sendChat(subChat(basicBot.chat.newblacklisted, {name: chat.un, blacklist: list, author: media.author, title: media.title, mid: media.format + ':' + media.cid})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + if (typeof basicBot.room.newBlacklistedSongFunction === 'function') { + basicBot.room.newBlacklistedSongFunction(track); + } + } + } } - else { - basicBot.userUtilities.moveUser(user1.id, p2, false); - setTimeout(function (user2, p1) { - basicBot.userUtilities.moveUser(user2.id, p1, false); - }, 2000, user2, p1); + }, + + blinfoCommand: { + command: 'blinfo', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var author = API.getMedia().author; + var title = API.getMedia().title; + var name = chat.un; + var format = API.getMedia().format; + var cid = API.getMedia().cid; + var songid = format + ":" + cid; + + API.sendChat(subChat(basicBot.chat.blinfo, {name: name, author: author, title: title, songid: songid})); + } } - } - } - }, - - themeCommand: { - command: 'theme', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.themeLink === "string") - API.sendChat(subChat(basicBot.chat.genres, {link: basicBot.settings.themeLink})); - } - } - }, - - timeguardCommand: { - command: 'timeguard', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.timeGuard) { - basicBot.settings.timeGuard = !basicBot.settings.timeGuard; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.timeguard})); + }, + + bouncerPlusCommand: { + command: 'bouncer+', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (basicBot.settings.bouncerPlus) { + basicBot.settings.bouncerPlus = false; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': 'Bouncer+'})); + } + else { + if (!basicBot.settings.bouncerPlus) { + var id = chat.uid; + var perm = basicBot.userUtilities.getPermission(id); + if (perm > 2) { + basicBot.settings.bouncerPlus = true; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': 'Bouncer+'})); + } + } + else return API.sendChat(subChat(basicBot.chat.bouncerplusrank, {name: chat.un})); + } + } } - else { - basicBot.settings.timeGuard = !basicBot.settings.timeGuard; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.timeguard})); + }, + + botnameCommand: { + command: 'botname', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentbotname, {botname: basicBot.settings.botName})); + var argument = msg.substring(cmd.length + 1); + if (argument) { + basicBot.settings.botName = argument; + API.sendChat(subChat(basicBot.chat.botnameset, {botName: basicBot.settings.botName})); + } + } } + }, - } - } - }, - - toggleblCommand: { - command: 'togglebl', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var temp = basicBot.settings.blacklistEnabled; - basicBot.settings.blacklistEnabled = !temp; - if (basicBot.settings.blacklistEnabled) { - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.blacklist})); - } - else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.blacklist})); - } - } - }, - - togglemotdCommand: { - command: 'togglemotd', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.motdEnabled) { - basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.motd})); + clearchatCommand: { + command: 'clearchat', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var currentchat = $('#chat-messages').children(); + for (var i = 0; i < currentchat.length; i++) { + API.moderateDeleteChat(currentchat[i].getAttribute("data-cid")); + } + return API.sendChat(subChat(basicBot.chat.chatcleared, {name: chat.un})); + } } - else { - basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.motd})); + }, + + commandsCommand: { + command: 'commands', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); + } } - } - } - }, - - togglevoteskipCommand: { - command: 'togglevoteskip', - rank: 'bouncer', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.voteSkip) { - basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); + }, + + cmddeletionCommand: { + command: ['commanddeletion', 'cmddeletion', 'cmddel'], + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.cmdDeletion) { + basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + } + else { + basicBot.settings.cmdDeletion = !basicBot.settings.cmdDeletion; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cmddeletion})); + } + } } - else { - basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); + }, + + cookieCommand: { + command: 'cookie', + rank: 'user', + type: 'startsWith', + getCookie: function (chat) { + var c = Math.floor(Math.random() * basicBot.chat.cookies.length); + return basicBot.chat.cookies[c]; + }, + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + + var space = msg.indexOf(' '); + if (space === -1) { + API.sendChat(basicBot.chat.eatcookie); + return false; + } + else { + var name = msg.substring(space + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false || !user.inRoom) { + return API.sendChat(subChat(basicBot.chat.nousercookie, {name: name})); + } + else if (user.username === chat.un) { + return API.sendChat(subChat(basicBot.chat.selfcookie, {name: name})); + } + else { + return API.sendChat(subChat(basicBot.chat.cookie, {nameto: user.username, namefrom: chat.un, cookie: this.getCookie()})); + } + } + } } - } - } - }, - - unbanCommand: { - command: 'unban', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - $(".icon-population").click(); - $(".icon-ban").click(); - setTimeout(function (chat) { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(); - var name = msg.substring(cmd.length + 2); - var bannedUsers = API.getBannedUsers(); - var found = false; - var bannedUser = null; - for (var i = 0; i < bannedUsers.length; i++) { - var user = bannedUsers[i]; - if (user.username === name) { - bannedUser = user; - found = true; - } - } - if (!found) { - $(".icon-chat").click(); - return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); - } - API.moderateUnbanUser(bannedUser.id); - console.log("Unbanned " + name); - setTimeout(function () { - $(".icon-chat").click(); - }, 1000); - }, 1000, chat); - } - } - }, - - unlockCommand: { - command: 'unlock', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - basicBot.roomUtilities.booth.unlockBooth(); - } - } - }, - - unmuteCommand: { - command: 'unmute', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - /** - if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { - if (permFrom > 2) { - basicBot.room.mutedUsers = []; - return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); - } - else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); - } - **/ - var from = chat.un; - var name = msg.substr(cmd.length + 2); - - var user = basicBot.userUtilities.lookupUserName(name); - - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - - var permUser = basicBot.userUtilities.getPermission(user.id); - if (permFrom > permUser) { - /* - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === user.id) { - indexMuted = i; - wasMuted = true; - } - - } - if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); - basicBot.room.mutedUsers.splice(indexMuted); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - */ - try { - API.moderateUnmuteUser(user.id); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - catch (e) { - API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); - } - } - else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); - } - } - }, - - usercmdcdCommand: { - command: 'usercmdcd', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var cd = msg.substring(cmd.length + 1); - if (!isNaN(cd)) { - basicBot.settings.commandCooldown = cd; - return API.sendChat(subChat(basicBot.chat.commandscd, {name: chat.un, time: basicBot.settings.commandCooldown})); + }, + + cycleCommand: { + command: 'cycle', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.changeDJCycle(); + } } - else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); - } - } - }, - - usercommandsCommand: { - command: 'usercommands', - rank: 'manager', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.usercommandsEnabled) { - API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.usercommands})); - basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; + }, + + cycleguardCommand: { + command: 'cycleguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.cycleGuard) { + basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.cycleguard})); + } + else { + basicBot.settings.cycleGuard = !basicBot.settings.cycleGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.cycleguard})); + } + + } } - else { - API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.usercommands})); - basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; + }, + + cycletimerCommand: { + command: 'cycletimer', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var cycleTime = msg.substring(cmd.length + 1); + if (!isNaN(cycleTime) && cycleTime !== "") { + basicBot.settings.maximumCycletime = cycleTime; + return API.sendChat(subChat(basicBot.chat.cycleguardtime, {name: chat.un, time: basicBot.settings.maximumCycletime})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + + } } - } - } - }, - - voteratioCommand: { - command: 'voteratio', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); - var name = msg.substring(cmd.length + 2); - var user = basicBot.userUtilities.lookupUserName(name); - if (user === false) return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - var vratio = user.votes; - var ratio = vratio.woot / vratio.meh; - API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woot: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); - } - } - }, - - voteskipCommand: { - command: 'voteskip', - rank: 'manager', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); - var argument = msg.substring(cmd.length + 1); - if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; - if (isNaN(argument)) { - API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); + }, + + dclookupCommand: { + command: ['dclookup', 'dc'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substring(cmd.length + 2); + var perm = basicBot.userUtilities.getPermission(chat.uid); + if (perm < 2) return API.sendChat(subChat(basicBot.chat.dclookuprank, {name: chat.un})); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var toChat = basicBot.userUtilities.dclookup(user.id); + API.sendChat(toChat); + } } - else { - basicBot.settings.voteSkipLimit = argument; - API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); + }, + + /*deletechatCommand: { + command: 'deletechat', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var chats = $('.from'); + var message = $('.message'); + var emote = $('.emote'); + var from = $('.un.clickable'); + for (var i = 0; i < chats.length; i++) { + var n = from[i].textContent; + if (name.trim() === n.trim()) { + + // var messagecid = $(message)[i].getAttribute('data-cid'); + // var emotecid = $(emote)[i].getAttribute('data-cid'); + // API.moderateDeleteChat(messagecid); + + // try { + // API.moderateDeleteChat(messagecid); + // } + // finally { + // API.moderateDeleteChat(emotecid); + // } + + if (typeof $(message)[i].getAttribute('data-cid') == "undefined"){ + API.moderateDeleteChat($(emote)[i].getAttribute('data-cid')); // works well with normal messages but not with emotes due to emotes and messages are seperate. + } else { + API.moderateDeleteChat($(message)[i].getAttribute('data-cid')); + } + } + } + API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); + } } - } - } - }, - - welcomeCommand: { - command: 'welcome', - rank: 'mod', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (basicBot.settings.welcome) { - basicBot.settings.welcome = !basicBot.settings.welcome; - return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + },*/ + + emojiCommand: { + command: 'emoji', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var link = 'http://www.emoji-cheat-sheet.com/'; + API.sendChat(subChat(basicBot.chat.emojilist, {link: link})); + } } - else { - basicBot.settings.welcome = !basicBot.settings.welcome; - return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + }, + + englishCommand: { + command: 'english', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if(chat.message.length === cmd.length) return API.sendChat('/me No user specified.'); + var name = chat.message.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if(typeof user === 'boolean') return API.sendChat('/me Invalid user specified.'); + var lang = basicBot.userUtilities.getUser(user).language; + var ch = '/me @' + name + ' '; + switch(lang){ + case 'en': break; + case 'da': ch += 'Vær venlig at tale engelsk.'; break; + case 'de': ch += 'Bitte sprechen Sie Englisch.'; break; + case 'es': ch += 'Por favor, hable Inglés.'; break; + case 'fr': ch += 'Parlez anglais, s\'il vous plaît.'; break; + case 'nl': ch += 'Spreek Engels, alstublieft.'; break; + case 'pl': ch += 'Proszę mówić po angielsku.'; break; + case 'pt': ch += 'Por favor, fale Inglês.'; break; + case 'sk': ch += 'Hovorte po anglicky, prosím.'; break; + case 'cs': ch += 'Mluvte prosím anglicky.'; break; + case 'sr': ch += 'Молим Вас, говорите енглески.'; break; + } + ch += ' English please.'; + API.sendChat(ch); + } + } + }, + + etaCommand: { + command: 'eta', + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var perm = basicBot.userUtilities.getPermission(chat.uid); + var msg = chat.message; + var dj = API.getDJ().username; + var name; + if (msg.length > cmd.length) { + if (perm < 2) return void (0); + name = msg.substring(cmd.length + 2); + } else name = chat.un; + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var pos = API.getWaitListPosition(user.id); + var realpos = pos + 1; + if (name == dj) return API.sendChat(subChat(basicBot.chat.youaredj, {name: name})); + if (pos < 0) return API.sendChat(subChat(basicBot.chat.notinwaitlist, {name: name})); + if (pos == 0) return API.sendChat(subChat(basicBot.chat.youarenext, {name: name})); + var timeRemaining = API.getTimeRemaining(); + var estimateMS = ((pos + 1) * 4 * 60 + timeRemaining) * 1000; + var estimateString = basicBot.roomUtilities.msToStr(estimateMS); + API.sendChat(subChat(basicBot.chat.eta, {name: name, time: estimateString, position: realpos})); + } + } + }, + + fbCommand: { + command: 'fb', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.fbLink === "string") + API.sendChat(subChat(basicBot.chat.facebook, {link: basicBot.settings.fbLink})); + } + } + }, + + filterCommand: { + command: 'filter', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.filterChat) { + basicBot.settings.filterChat = !basicBot.settings.filterChat; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.chatfilter})); + } + else { + basicBot.settings.filterChat = !basicBot.settings.filterChat; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.chatfilter})); + } + } + } + }, + + forceskipCommand: { + command: ['forceskip', 'fs'], + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.forceskip, {name: chat.un})); + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + + } + } + }, + + ghostbusterCommand: { + command: 'ghostbuster', + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substr(cmd.length + 2); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false || !user.inRoom) { + return API.sendChat(subChat(basicBot.chat.ghosting, {name1: chat.un, name2: name})); + } + else API.sendChat(subChat(basicBot.chat.notghosting, {name1: chat.un, name2: name})); + } + } + }, + + gifCommand: { + command: ['gif', 'giphy'], + rank: 'user', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length !== cmd.length) { + function get_id(api_key, fixedtag, func) + { + $.getJSON( + "https://tv.giphy.com/v1/gifs/random?", + { + "format": "json", + "api_key": api_key, + "rating": rating, + "tag": fixedtag + }, + function(response) + { + func(response.data.id); + } + ) + } + var api_key = "dc6zaTOxFJmzC"; // public beta key + var rating = "pg-13"; // PG 13 gifs + var tag = msg.substr(cmd.length + 1); + var fixedtag = tag.replace(/ /g,"+"); + var commatag = tag.replace(/ /g,", "); + get_id(api_key, tag, function(id) { + if (typeof id !== 'undefined') { + API.sendChat(subChat(basicBot.chat.validgiftags, {name: chat.un, id: id, tags: commatag})); + } else { + API.sendChat(subChat(basicBot.chat.invalidgiftags, {name: chat.un, tags: commatag})); + } + }); + } + else { + function get_random_id(api_key, func) + { + $.getJSON( + "https://tv.giphy.com/v1/gifs/random?", + { + "format": "json", + "api_key": api_key, + "rating": rating + }, + function(response) + { + func(response.data.id); + } + ) + } + var api_key = "dc6zaTOxFJmzC"; // public beta key + var rating = "pg-13"; // PG 13 gifs + get_random_id(api_key, function(id) { + if (typeof id !== 'undefined') { + API.sendChat(subChat(basicBot.chat.validgifrandom, {name: chat.un, id: id})); + } else { + API.sendChat(subChat(basicBot.chat.invalidgifrandom, {name: chat.un})); + } + }); + } + } + } + }, + + helpCommand: { + command: 'help', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var link = "(Updated link coming soon)"; + API.sendChat(subChat(basicBot.chat.starterhelp, {link: link})); + } + } + }, + + historyskipCommand: { + command: 'historyskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.historySkip) { + basicBot.settings.historySkip = !basicBot.settings.historySkip; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.historyskip})); + } + else { + basicBot.settings.historySkip = !basicBot.settings.historySkip; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.historyskip})); + } + } + } + }, + + joinCommand: { + command: 'join', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.roulette.rouletteStatus && basicBot.room.roulette.participants.indexOf(chat.uid) < 0) { + basicBot.room.roulette.participants.push(chat.uid); + API.sendChat(subChat(basicBot.chat.roulettejoin, {name: chat.un})); + } + } + } + }, + + jointimeCommand: { + command: 'jointime', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var join = basicBot.userUtilities.getJointime(user); + var time = Date.now() - join; + var timeString = basicBot.roomUtilities.msToStr(time); + API.sendChat(subChat(basicBot.chat.jointime, {namefrom: chat.un, username: name, time: timeString})); + } + } + }, + + kickCommand: { + command: 'kick', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var lastSpace = msg.lastIndexOf(' '); + var time; + var name; + if (lastSpace === msg.indexOf(' ')) { + time = 0.25; + name = msg.substring(cmd.length + 2); + } + else { + time = msg.substring(lastSpace + 1); + name = msg.substring(cmd.length + 2, lastSpace); + } + + var user = basicBot.userUtilities.lookupUserName(name); + var from = chat.un; + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permTokick = basicBot.userUtilities.getPermission(user.id); + + if (permFrom <= permTokick) + return API.sendChat(subChat(basicBot.chat.kickrank, {name: chat.un})); + + if (!isNaN(time)) { + API.sendChat(subChat(basicBot.chat.kick, {name: chat.un, username: name, time: time})); + if (time > 24 * 60 * 60) API.moderateBanUser(user.id, 1, API.BAN.PERMA); + else API.moderateBanUser(user.id, 1, API.BAN.DAY); + setTimeout(function (id, name) { + API.moderateUnbanUser(id); + console.log('Unbanned @' + name + '. (' + id + ')'); + }, time * 60 * 1000, user.id, name); + } + else API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + killCommand: { + command: 'kill', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + storeToStorage(); + sendToSocket(); + API.sendChat(basicBot.chat.kill); + basicBot.disconnectAPI(); + setTimeout(function () { + kill(); + }, 1000); + } + } + }, + + languageCommand: { + command: 'language', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); + var argument = msg.substring(cmd.length + 1); + + $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { + var langIndex = json; + var link = langIndex[argument.toLowerCase()]; + if (typeof link === "undefined") { + API.sendChat(subChat(basicBot.chat.langerror, {link: "http://git.io/vJ9nI"})); + } + else { + basicBot.settings.language = argument; + loadChat(); + API.sendChat(subChat(basicBot.chat.langset, {language: basicBot.settings.language})); + } + }); + } + } + }, + + leaveCommand: { + command: 'leave', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var ind = basicBot.room.roulette.participants.indexOf(chat.uid); + if (ind > -1) { + basicBot.room.roulette.participants.splice(ind, 1); + API.sendChat(subChat(basicBot.chat.rouletteleave, {name: chat.un})); + } + } + } + }, + + linkCommand: { + command: 'link', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var media = API.getMedia(); + var from = chat.un; + var user = basicBot.userUtilities.lookupUser(chat.uid); + var perm = basicBot.userUtilities.getPermission(chat.uid); + var dj = API.getDJ().id; + var isDj = false; + if (dj === chat.uid) isDj = true; + if (perm >= 1 || isDj) { + if (media.format === 1) { + var linkToSong = "http://youtu.be/" + media.cid; + API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); + } + if (media.format === 2) { + SC.get('/tracks/' + media.cid, function (sound) { + API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: sound.permalink_url})); + }); + } + } + } + } + }, + + lockCommand: { + command: 'lock', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.booth.lockBooth(); + } + } + }, + + lockdownCommand: { + command: 'lockdown', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var temp = basicBot.settings.lockdownEnabled; + basicBot.settings.lockdownEnabled = !temp; + if (basicBot.settings.lockdownEnabled) { + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockdown})); + } + else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockdown})); + } + } + }, + + lockguardCommand: { + command: 'lockguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.lockGuard) { + basicBot.settings.lockGuard = !basicBot.settings.lockGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.lockguard})); + } + else { + basicBot.settings.lockGuard = !basicBot.settings.lockGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.lockguard})); + } + } + } + }, + + lockskipCommand: { + command: 'lockskip', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.skippable) { + var dj = API.getDJ(); + var id = dj.id; + var name = dj.username; + var msgSend = '@' + name + ': '; + basicBot.room.queueable = false; + + if (chat.message.length === cmd.length) { + API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); + basicBot.roomUtilities.booth.lockBooth(); + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1500, id); + }, 1000, id); + return void (0); + } + var validReason = false; + var msg = chat.message; + var reason = msg.substring(cmd.length + 1); + for (var i = 0; i < basicBot.settings.lockskipReasons.length; i++) { + var r = basicBot.settings.lockskipReasons[i][0]; + if (reason.indexOf(r) !== -1) { + validReason = true; + msgSend += basicBot.settings.lockskipReasons[i][1]; + } + } + if (validReason) { + API.sendChat(subChat(basicBot.chat.usedlockskip, {name: chat.un})); + basicBot.roomUtilities.booth.lockBooth(); + setTimeout(function (id) { + API.moderateForceSkip(); + basicBot.room.skippable = false; + API.sendChat(msgSend); + setTimeout(function () { + basicBot.room.skippable = true + }, 5 * 1000); + setTimeout(function (id) { + basicBot.userUtilities.moveUser(id, basicBot.settings.lockskipPosition, false); + basicBot.room.queueable = true; + setTimeout(function () { + basicBot.roomUtilities.booth.unlockBooth(); + }, 1000); + }, 1500, id); + }, 1000, id); + return void (0); + } + } + } + } + }, + + locktimerCommand: { + command: 'locktimer', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var lockTime = msg.substring(cmd.length + 1); + if (!isNaN(lockTime) && lockTime !== "") { + basicBot.settings.maximumLocktime = lockTime; + return API.sendChat(subChat(basicBot.chat.lockguardtime, {name: chat.un, time: basicBot.settings.maximumLocktime})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + logoutCommand: { + command: 'logout', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.logout, {name: chat.un, botname: basicBot.settings.botName})); + setTimeout(function () { + $(".logout").mousedown() + }, 1000); + } + } + }, + + maxlengthCommand: { + command: 'maxlength', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var maxTime = msg.substring(cmd.length + 1); + if (!isNaN(maxTime)) { + basicBot.settings.maximumSongLength = maxTime; + return API.sendChat(subChat(basicBot.chat.maxlengthtime, {name: chat.un, time: basicBot.settings.maximumSongLength})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + motdCommand: { + command: 'motd', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat('/me MotD: ' + basicBot.settings.motd); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.motdEnabled) basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + if (isNaN(argument)) { + basicBot.settings.motd = argument; + API.sendChat(subChat(basicBot.chat.motdset, {msg: basicBot.settings.motd})); + } + else { + basicBot.settings.motdInterval = argument; + API.sendChat(subChat(basicBot.chat.motdintervalset, {interval: basicBot.settings.motdInterval})); + } + } + } + }, + + moveCommand: { + command: 'move', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var firstSpace = msg.indexOf(' '); + var lastSpace = msg.lastIndexOf(' '); + var pos; + var name; + if (isNaN(parseInt(msg.substring(lastSpace + 1)))) { + pos = 1; + name = msg.substring(cmd.length + 2); + } + else { + pos = parseInt(msg.substring(lastSpace + 1)); + name = msg.substring(cmd.length + 2, lastSpace); + } + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + if (user.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbotwaitlist, {name: chat.un})); + if (!isNaN(pos)) { + API.sendChat(subChat(basicBot.chat.move, {name: chat.un})); + basicBot.userUtilities.moveUser(user.id, pos, false); + } else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); + } + } + }, + + muteCommand: { + command: 'mute', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var lastSpace = msg.lastIndexOf(' '); + var time = null; + var name; + if (lastSpace === msg.indexOf(' ')) { + name = msg.substring(cmd.length + 2); + time = 45; + } + else { + time = msg.substring(lastSpace + 1); + if (isNaN(time) || time == "" || time == null || typeof time == "undefined") { + return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + name = msg.substring(cmd.length + 2, lastSpace); + } + var from = chat.un; + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permFrom > permUser) { + /* + basicBot.room.mutedUsers.push(user.id); + if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); + else { + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === id) { + indexMuted = i; + wasMuted = true; + } + } + if (indexMuted > -1) { + basicBot.room.mutedUsers.splice(indexMuted); + var u = basicBot.userUtilities.lookupUser(id); + var name = u.username; + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + }, time * 60 * 1000, user.id); + } + */ + if (time > 45) { + API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + } + else if (time === 45) { + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + + } + else if (time > 30) { + API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + else if (time > 15) { + API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + else { + API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); + API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); + setTimeout(function (id) { + API.moderateUnmuteUser(id); + }, time * 60 * 1000, user.id); + } + } + else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); + } + } + }, + + opCommand: { + command: 'op', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.opLink === "string") + return API.sendChat(subChat(basicBot.chat.oplist, {link: basicBot.settings.opLink})); + } + } + }, + + pingCommand: { + command: 'ping', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.pong) + } + } + }, + + refreshCommand: { + command: 'refresh', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + sendToSocket(); + storeToStorage(); + basicBot.disconnectAPI(); + setTimeout(function () { + window.location.reload(false); + }, 1000); + + } + } + }, + + reloadCommand: { + command: 'reload', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(basicBot.chat.reload); + sendToSocket(); + storeToStorage(); + basicBot.disconnectAPI(); + kill(); + setTimeout(function () { + $.getScript(basicBot.scriptLink); + }, 2000); + } + } + }, + + removeCommand: { + command: 'remove', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length > cmd.length + 2) { + var name = msg.substr(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user !== 'boolean') { + user.lastDC = { + time: null, + position: null, + songCount: 0 + }; + if (API.getDJ().id === user.id) { + API.moderateForceSkip(); + setTimeout(function () { + API.moderateRemoveDJ(user.id); + }, 1 * 1000, user); + } + else API.moderateRemoveDJ(user.id); + } else API.sendChat(subChat(basicBot.chat.removenotinwl, {name: chat.un, username: name})); + } else API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + } + } + }, + + restrictetaCommand: { + command: 'restricteta', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.etaRestriction) { + basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.etarestriction})); + } + else { + basicBot.settings.etaRestriction = !basicBot.settings.etaRestriction; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.etarestriction})); + } + } + } + }, + + rouletteCommand: { + command: 'roulette', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (!basicBot.room.roulette.rouletteStatus) { + basicBot.room.roulette.startRoulette(); + } + } + } + }, + + rulesCommand: { + command: 'rules', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.rulesLink === "string") + return API.sendChat(subChat(basicBot.chat.roomrules, {link: basicBot.settings.rulesLink})); + } + } + }, + + sessionstatsCommand: { + command: 'sessionstats', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var from = chat.un; + var woots = basicBot.room.roomstats.totalWoots; + var mehs = basicBot.room.roomstats.totalMehs; + var grabs = basicBot.room.roomstats.totalCurates; + API.sendChat(subChat(basicBot.chat.sessionstats, {name: from, woots: woots, mehs: mehs, grabs: grabs})); + } + } + }, + + skipCommand: { + command: ['skip', 'smartskip'], + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.room.skippable) { + + var timeLeft = API.getTimeRemaining(); + var timeElapsed = API.getTimeElapsed(); + var dj = API.getDJ(); + var name = dj.username; + var msgSend = '@' + name + ', '; + + if (chat.message.length === cmd.length) { + API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(); + } + else { + API.moderateForceSkip(); + } + } + var validReason = false; + var msg = chat.message; + var reason = msg.substring(cmd.length + 1); + for (var i = 0; i < basicBot.settings.skipReasons.length; i++) { + var r = basicBot.settings.skipReasons[i][0]; + if (reason.indexOf(r) !== -1) { + validReason = true; + msgSend += basicBot.settings.skipReasons[i][1]; + } + } + if (validReason) { + API.sendChat(subChat(basicBot.chat.usedskip, {name: chat.un})); + if (basicBot.settings.smartSkip && timeLeft > timeElapsed){ + basicBot.roomUtilities.smartSkip(msgSend); + } + else { + API.moderateForceSkip(); + setTimeout(function () { + API.sendChat(msgSend); + }, 500); + } + } + } + } + } + }, + + skipposCommand: { + command: 'skippos', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var pos = msg.substring(cmd.length + 1); + if (!isNaN(pos)) { + basicBot.settings.skipPosition = pos; + return API.sendChat(subChat(basicBot.chat.skippos, {name: chat.un, position: basicBot.settings.skipPosition})); + } + else return API.sendChat(subChat(basicBot.chat.invalidpositionspecified, {name: chat.un})); + } + } + }, + + songstatsCommand: { + command: 'songstats', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.songstats) { + basicBot.settings.songstats = !basicBot.settings.songstats; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.songstats})); + } + else { + basicBot.settings.songstats = !basicBot.settings.songstats; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.songstats})); + } + } + } + }, + + sourceCommand: { + command: 'source', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat('/me This bot was created by ' + botCreator + ', but is now maintained by ' + botMaintainer + "."); + } + } + }, + + statusCommand: { + command: 'status', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var from = chat.un; + var msg = '[@' + from + '] '; + + msg += basicBot.chat.afkremoval + ': '; + if (basicBot.settings.afkRemoval) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + msg += basicBot.chat.afksremoved + ": " + basicBot.room.afkList.length + '. '; + msg += basicBot.chat.afklimit + ': ' + basicBot.settings.maximumAfk + '. '; + + msg += 'Bouncer+: '; + if (basicBot.settings.bouncerPlus) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.blacklist + ': '; + if (basicBot.settings.blacklistEnabled) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.lockguard + ': '; + if (basicBot.settings.lockGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.cycleguard + ': '; + if (basicBot.settings.cycleGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.timeguard + ': '; + if (basicBot.settings.timeGuard) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.chatfilter + ': '; + if (basicBot.settings.filterChat) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.historyskip + ': '; + if (basicBot.settings.historySkip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.voteskip + ': '; + if (basicBot.settings.voteSkip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.cmddeletion + ': '; + if (basicBot.settings.cmdDeletion) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + msg += basicBot.chat.autoskip + ': '; + if (basicBot.settings.autoskip) msg += 'ON'; + else msg += 'OFF'; + msg += '. '; + + // TODO: Display more toggleable bot settings. + + var launchT = basicBot.room.roomstats.launchTime; + var durationOnline = Date.now() - launchT; + var since = basicBot.roomUtilities.msToStr(durationOnline); + msg += subChat(basicBot.chat.activefor, {time: since}); + + /* + // least efficient way to go about this, but it works :) + if (msg.length > 256){ + firstpart = msg.substr(0, 256); + secondpart = msg.substr(256); + API.sendChat(firstpart); + setTimeout(function () { + API.sendChat(secondpart); + }, 300); + } + else { + API.sendChat(msg); + } + */ + + // This is a more efficient solution + if (msg.length > 241){ + var split = msg.match(/.{1,241}/g); + for (var i = 0; i < split.length; i++) { + var func = function(index) { + setTimeout(function() { + API.sendChat("/me " + split[index]); + }, 500 * index); + } + func(i); + } + } + else { + return API.sendChat(msg); + } + } + } + }, + + swapCommand: { + command: 'swap', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var firstSpace = msg.indexOf(' '); + var lastSpace = msg.lastIndexOf(' '); + var name1 = msg.substring(cmd.length + 2, lastSpace); + var name2 = msg.substring(lastSpace + 2); + var user1 = basicBot.userUtilities.lookupUserName(name1); + var user2 = basicBot.userUtilities.lookupUserName(name2); + if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); + if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); + var p1 = API.getWaitListPosition(user1.id) + 1; + var p2 = API.getWaitListPosition(user2.id) + 1; + if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); + API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); + if (p1 < p2) { + basicBot.userUtilities.moveUser(user2.id, p1, false); + setTimeout(function (user1, p2) { + basicBot.userUtilities.moveUser(user1.id, p2, false); + }, 2000, user1, p2); + } + else { + basicBot.userUtilities.moveUser(user1.id, p2, false); + setTimeout(function (user2, p1) { + basicBot.userUtilities.moveUser(user2.id, p1, false); + }, 2000, user2, p1); + } + } + } + }, + + themeCommand: { + command: 'theme', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.themeLink === "string") + API.sendChat(subChat(basicBot.chat.genres, {link: basicBot.settings.themeLink})); + } + } + }, + + timeguardCommand: { + command: 'timeguard', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.timeGuard) { + basicBot.settings.timeGuard = !basicBot.settings.timeGuard; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.timeguard})); + } + else { + basicBot.settings.timeGuard = !basicBot.settings.timeGuard; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.timeguard})); + } + + } + } + }, + + toggleblCommand: { + command: 'togglebl', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var temp = basicBot.settings.blacklistEnabled; + basicBot.settings.blacklistEnabled = !temp; + if (basicBot.settings.blacklistEnabled) { + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.blacklist})); + } + else return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.blacklist})); + } + } + }, + + togglemotdCommand: { + command: 'togglemotd', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.motdEnabled) { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.motd})); + } + else { + basicBot.settings.motdEnabled = !basicBot.settings.motdEnabled; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.motd})); + } + } + } + }, + + togglevoteskipCommand: { + command: 'togglevoteskip', + rank: 'bouncer', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.voteSkip) { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.voteskip})); + } + else { + basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.voteskip})); + } + } + } + }, + + unbanCommand: { + command: 'unban', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + $(".icon-population").click(); + $(".icon-ban").click(); + setTimeout(function (chat) { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(); + var name = msg.substring(cmd.length + 2); + var bannedUsers = API.getBannedUsers(); + var found = false; + var bannedUser = null; + for (var i = 0; i < bannedUsers.length; i++) { + var user = bannedUsers[i]; + if (user.username === name) { + bannedUser = user; + found = true; + } + } + if (!found) { + $(".icon-chat").click(); + return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); + } + API.moderateUnbanUser(bannedUser.id); + console.log("Unbanned " + name); + setTimeout(function () { + $(".icon-chat").click(); + }, 1000); + }, 1000, chat); + } + } + }, + + unlockCommand: { + command: 'unlock', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + basicBot.roomUtilities.booth.unlockBooth(); + } + } + }, + + unmuteCommand: { + command: 'unmute', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + /** + if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { + if (permFrom > 2) { + basicBot.room.mutedUsers = []; + return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); + } + else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); + } + **/ + var from = chat.un; + var name = msg.substr(cmd.length + 2); + + var user = basicBot.userUtilities.lookupUserName(name); + + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permFrom > permUser) { + /* + var muted = basicBot.room.mutedUsers; + var wasMuted = false; + var indexMuted = -1; + for (var i = 0; i < muted.length; i++) { + if (muted[i] === user.id) { + indexMuted = i; + wasMuted = true; + } + + } + if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + basicBot.room.mutedUsers.splice(indexMuted); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + */ + try { + API.moderateUnmuteUser(user.id); + API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); + } + catch (e) { + API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + } + } + else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); + } + } + }, + + usercmdcdCommand: { + command: 'usercmdcd', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var cd = msg.substring(cmd.length + 1); + if (!isNaN(cd)) { + basicBot.settings.commandCooldown = cd; + return API.sendChat(subChat(basicBot.chat.commandscd, {name: chat.un, time: basicBot.settings.commandCooldown})); + } + else return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); + } + } + }, + + usercommandsCommand: { + command: 'usercommands', + rank: 'manager', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.usercommandsEnabled) { + API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.usercommands})); + basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; + } + else { + API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.usercommands})); + basicBot.settings.usercommandsEnabled = !basicBot.settings.usercommandsEnabled; + } + } + } + }, + + voteratioCommand: { + command: 'voteratio', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (user === false) return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var vratio = user.votes; + var ratio = vratio.woot / vratio.meh; + API.sendChat(subChat(basicBot.chat.voteratio, {name: chat.un, username: name, woot: vratio.woot, mehs: vratio.meh, ratio: ratio.toFixed(2)})); + } + } + }, + + voteskipCommand: { + command: 'voteskip', + rank: 'manager', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.voteskiplimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); + var argument = msg.substring(cmd.length + 1); + if (!basicBot.settings.voteSkip) basicBot.settings.voteSkip = !basicBot.settings.voteSkip; + if (isNaN(argument)) { + API.sendChat(subChat(basicBot.chat.voteskipinvalidlimit, {name: chat.un})); + } + else { + basicBot.settings.voteSkipLimit = argument; + API.sendChat(subChat(basicBot.chat.voteskipsetlimit, {name: chat.un, limit: basicBot.settings.voteSkipLimit})); + } + } + } + }, + + welcomeCommand: { + command: 'welcome', + rank: 'mod', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.welcome) { + basicBot.settings.welcome = !basicBot.settings.welcome; + return API.sendChat(subChat(basicBot.chat.toggleoff, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + } + else { + basicBot.settings.welcome = !basicBot.settings.welcome; + return API.sendChat(subChat(basicBot.chat.toggleon, {name: chat.un, 'function': basicBot.chat.welcomemsg})); + } + } + } + }, + + websiteCommand: { + command: 'website', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.website === "string") + API.sendChat(subChat(basicBot.chat.website, {link: basicBot.settings.website})); + } + } + }, + + whoisCommand: { + command: 'whois', + rank: 'bouncer', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + var name; + if (msg.length === cmd.length) name = chat.un; + else { + name = msg.substr(cmd.length + 2); + } + users = API.getUsers(); + var len = users.length; + for (var i = 0; i < len; ++i){ + if (users[i].username == name){ + var id = users[i].id; + var avatar = API.getUser(id).avatarID; + var level = API.getUser(id).level; + var rawjoined = API.getUser(id).joined; + var joined = rawjoined.substr(0, 10); + var rawlang = API.getUser(id).language; + if (rawlang == "en"){ + var language = "English"; + } else if (rawlang == "bg"){ + var language = "Bulgarian"; + } else if (rawlang == "cs"){ + var language = "Czech"; + } else if (rawlang == "fi"){ + var language = "Finnish" + } else if (rawlang == "fr"){ + var language = "French" + } else if (rawlang == "pt"){ + var language = "Portuguese" + } else if (rawlang == "zh"){ + var language = "Chinese" + } else if (rawlang == "sk"){ + var language = "Slovak" + } else if (rawlang == "nl"){ + var language = "Dutch" + } else if (rawlang == "ms"){ + var language = "Malay" + } + var rawrank = API.getUser(id).role; + if (rawrank == "0"){ + var rank = "User"; + } else if (rawrank == "1"){ + var rank = "Resident DJ"; + } else if (rawrank == "2"){ + var rank = "Bouncer"; + } else if (rawrank == "3"){ + var rank = "Manager" + } else if (rawrank == "4"){ + var rank = "Co-Host" + } else if (rawrank == "5"){ + var rank = "Host" + } else if (rawrank == "7"){ + var rank = "Brand Ambassador" + } else if (rawrank == "10"){ + var rank = "Admin" + } + var slug = API.getUser(id).slug; + if (typeof slug !== 'undefined') { + var profile = "https://plug.dj/@/" + slug; + } else { + var profile = "~"; + } + + API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, joined: joined, rank: rank})); + } + } + } + } + }, + + youtubeCommand: { + command: 'youtube', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (typeof basicBot.settings.youtubeLink === "string") + API.sendChat(subChat(basicBot.chat.youtube, {name: chat.un, link: basicBot.settings.youtubeLink})); + } } - } - } - }, - - websiteCommand: { - command: 'website', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.website === "string") - API.sendChat(subChat(basicBot.chat.website, {link: basicBot.settings.website})); - } - } - }, - - whoisCommand: { - command: 'whois', - rank: 'bouncer', - type: 'startsWith', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - var msg = chat.message; - var name; - if (msg.length === cmd.length) name = chat.un; - else { - name = msg.substr(cmd.length + 2); - } - users = API.getUsers(); - var len = users.length; - for (var i = 0; i < len; ++i){ - if (users[i].username == name){ - var id = users[i].id; - var avatar = API.getUser(id).avatarID; - var level = API.getUser(id).level; - var rawjoined = API.getUser(id).joined; - var joined = rawjoined.substr(0, 10); - var rawlang = API.getUser(id).language; - if (rawlang == "en"){ - var language = "English"; - } else if (rawlang == "bg"){ - var language = "Bulgarian"; - } else if (rawlang == "cs"){ - var language = "Czech"; - } else if (rawlang == "fi"){ - var language = "Finnish" - } else if (rawlang == "fr"){ - var language = "French" - } else if (rawlang == "pt"){ - var language = "Portuguese" - } else if (rawlang == "zh"){ - var language = "Chinese" - } else if (rawlang == "sk"){ - var language = "Slovak" - } else if (rawlang == "nl"){ - var language = "Dutch" - } else if (rawlang == "ms"){ - var language = "Malay" - } - var rawrank = API.getUser(id).role; - if (rawrank == "0"){ - var rank = "User"; - } else if (rawrank == "1"){ - var rank = "Resident DJ"; - } else if (rawrank == "2"){ - var rank = "Bouncer"; - } else if (rawrank == "3"){ - var rank = "Manager" - } else if (rawrank == "4"){ - var rank = "Co-Host" - } else if (rawrank == "5"){ - var rank = "Host" - } else if (rawrank == "7"){ - var rank = "Brand Ambassador" - } else if (rawrank == "10"){ - var rank = "Admin" - } - var slug = API.getUser(id).slug; - if (typeof slug !== 'undefined') { - var profile = "https://plug.dj/@/" + slug; - } else { - var profile = "~"; - } - - API.sendChat(subChat(basicBot.chat.whois, {name1: chat.un, name2: name, id: id, avatar: avatar, profile: profile, language: language, level: level, joined: joined, rank: rank})); - } - } - } - } - }, - - youtubeCommand: { - command: 'youtube', - rank: 'user', - type: 'exact', - functionality: function (chat, cmd) { - if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); - if (!basicBot.commands.executable(this.rank, chat)) return void (0); - else { - if (typeof basicBot.settings.youtubeLink === "string") - API.sendChat(subChat(basicBot.chat.youtube, {name: chat.un, link: basicBot.settings.youtubeLink})); - } } - } } - }; + }; - loadChat(basicBot.startup); - }).call(this); + loadChat(basicBot.startup); +}).call(this); From 6ea77d87305746f512f7f51cfd70c8ff667e8ba9 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 18 Jul 2015 20:12:02 +0100 Subject: [PATCH 200/281] Changed socket - Changed socket url - Removed Quoona (R.I.P Quoona) --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 527e4a7a..0998957c 100644 --- a/basicBot.js +++ b/basicBot.js @@ -37,7 +37,7 @@ var socket = function () { function loadSocket() { SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; - sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); + sock = new SockJS('https://benzi.io:4964/socket'); sock.onopen = function() { console.log('Connected to socket!'); sendToSocket(); @@ -232,7 +232,7 @@ }; var botCreator = "Matthew (***REMOVED***)"; - var botMaintainer = "Benzi (Quoona)" + var botMaintainer = "Benzi" var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { From 2a9995596bba73192924a7d0eff96c7945029f4c Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 18 Jul 2015 20:12:02 +0100 Subject: [PATCH 201/281] Changed socket - Changed socket url - Removed Quoona (R.I.P Quoona) --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index dfcc85c8..4deb3024 100644 --- a/basicBot.js +++ b/basicBot.js @@ -37,7 +37,7 @@ var socket = function () { function loadSocket() { SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; - sock = new SockJS('https://socket-bnzi.c9.io/basicbot'); + sock = new SockJS('https://benzi.io:4964/socket'); sock.onopen = function() { console.log('Connected to socket!'); sendToSocket(); @@ -232,7 +232,7 @@ }; var botCreator = "Matthew (Yemasthui)"; - var botMaintainer = "Benzi (Quoona)" + var botMaintainer = "Benzi" var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { From cbb0b6ba387c197d10120f713d3fab282685999a Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 18 Jul 2015 20:12:40 +0100 Subject: [PATCH 202/281] Updated version --- LICENSE.md | 2 +- LICENSE.txt | 2 +- README.md | 22 +++++++++++----------- basicBot.js | 22 +++++++++++----------- lang/langIndex.json | 20 ++++++++++---------- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index ba6249d8..7c55da9b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,4 +1,4 @@ -Copyright © 2014 ***REMOVED*** +Copyright © 2014 Yemasthui Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 9048228a..92e3f7c1 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2014 ***REMOVED*** +Copyright 2014 Yemasthui Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. \ No newline at end of file diff --git a/README.md b/README.md index f28654f0..f7897ad8 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,15 @@ A not so basic bot for plug.dj [Get the Chrome Extension](https://chrome.google.com/webstore/detail/basicbot/bjinmbkeneigmkkkpcmcokphbjkepeie) --------------------------------------------------------------------- -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/***REMOVED***/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.benzi.io/97dW.svg)](https://facebook.com/groups/basicBot) [![twitter](http://i.benzi.io/4KEn.svg)](https://twitter.com/bscBt) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Yemasthui/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.benzi.io/97dW.svg)](https://facebook.com/groups/basicBot) [![twitter](http://i.benzi.io/4KEn.svg)](https://twitter.com/bscBt) Stay updated on **basicBot**'s development by following the project on Twitter [@bscBt](http://twitter.com/bscBt) -Created by [***REMOVED***](https://github.com/***REMOVED***) but now maintained by [Benzi](https://github.com/Benzi). +Created by [Yemasthui](https://github.com/Yemasthui) but now maintained by [Benzi](https://github.com/Benzi). (You can email me via [bnz.mngn@gmail.com](mailto:bnz.mngn@gmail.com) or send me a message on [Gitter](https://gitter.im/Benzi) if you have any queries about the bot) -!!!TO CUSTOMIZE: USE [THIS REPOSITORY](https://github.com/***REMOVED***/basicBot-customization)!!! +!!!TO CUSTOMIZE: USE [THIS REPOSITORY](https://github.com/Yemasthui/basicBot-customization)!!! ============================================================================================== IMPORTANT @@ -40,28 +40,28 @@ Usage Bookmark the following code. To run the bot, run the bookmark. -`javascript:(function(){$.getScript('https://rawgit.com/***REMOVED***/basicBot/master/basicBot.js');})();` +`javascript:(function(){$.getScript('https://rawgit.com/Yemasthui/basicBot/master/basicBot.js');})();` -If this does not work, go to https://raw.githubusercontent.com/***REMOVED***/basicBot/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing f12) when on plug.dj in your community. +If this does not work, go to https://raw.githubusercontent.com/Yemasthui/basicBot/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing f12) when on plug.dj in your community. ###Commands### -These can be found in [the commands file](https://github.com/***REMOVED***/basicBot/blob/master/commands.md). +These can be found in [the commands file](https://github.com/Yemasthui/basicBot/blob/master/commands.md). ###Blacklists### -Examples of blacklists can be found in [the customization repository](https://github.com/***REMOVED***/basicBot-customization/tree/master/blacklists). +Examples of blacklists can be found in [the customization repository](https://github.com/Yemasthui/basicBot-customization/tree/master/blacklists). You can add blacklists in the settings of the bot via the methods given in that same repository. See below for more information. ###Extending functionality and custom default settings### -basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/***REMOVED***/basicBot-customization) for more info. +basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/Yemasthui/basicBot-customization) for more info. Please do not try to if you are not confident in your javascript capabilities. ###Translations### -Official translations will be supported. Available ones can be found under [the language folder](https://github.com/***REMOVED***/basicBot/blob/master/lang/langIndex.json). You can set a language in the room settings. -You can use your own translation or wording by translating the values of in [the English pack](https://github.com/***REMOVED***/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. +Official translations will be supported. Available ones can be found under [the language folder](https://github.com/Yemasthui/basicBot/blob/master/lang/langIndex.json). You can set a language in the room settings. +You can use your own translation or wording by translating the values of in [the English pack](https://github.com/Yemasthui/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. __When translating the chat messages, please note that it is a json format, meaning it is structured as ```"key":"value"```, please only translate the "value" parts, and leave anything between %% (eg. %%NAME%%) as is, they are variables that get filled in by the bot.__ @@ -93,7 +93,7 @@ I would like to thank the following people: Copyright --------- -Copyright © 2014 ***REMOVED*** +Copyright © 2014 Yemasthui Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. diff --git a/basicBot.js b/basicBot.js index 0998957c..29d7675b 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1,5 +1,5 @@ /** - *Copyright 2014 ***REMOVED*** + *Copyright 2014 Yemasthui *Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. *This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. */ @@ -99,7 +99,7 @@ var loadChat = function (cb) { if (!cb) cb = function () { }; - $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { + $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { var link = basicBot.chatLink; if (json !== null && typeof json !== "undefined") { langIndex = json; @@ -231,18 +231,18 @@ return str; }; - var botCreator = "Matthew (***REMOVED***)"; + var botCreator = "Matthew (Yemasthui)"; var botMaintainer = "Benzi" var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.8.9", + version: "2.8.10", status: false, name: "basicBot", loggedInID: null, - scriptLink: "https://rawgit.com/***REMOVED***/basicBot/master/basicBot.js", + scriptLink: "https://rawgit.com/Yemasthui/basicBot/master/basicBot.js", cmdLink: "http://git.io/245Ppg", - chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", + chatLink: "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", chat: null, loadChat: loadChat, retrieveSettings: retrieveSettings, @@ -250,7 +250,7 @@ settings: { botName: "basicBot", language: "english", - chatLink: "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", + chatLink: "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", roomLock: false, // Requires an extension to re-load the script startupCap: 1, // 1-200 startupVolume: 0, // 0-100 @@ -306,9 +306,9 @@ songstats: true, commandLiteral: "!", blacklists: { - NSFW: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/NSFWlist.json", - OP: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/OPlist.json", - BANNED: "https://rawgit.com/***REMOVED***/basicBot-customization/master/blacklists/BANNEDlist.json" + NSFW: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/NSFWlist.json", + OP: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/OPlist.json", + BANNED: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/BANNEDlist.json" } }, room: { @@ -2434,7 +2434,7 @@ if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); var argument = msg.substring(cmd.length + 1); - $.get("https://rawgit.com/***REMOVED***/basicBot/master/lang/langIndex.json", function (json) { + $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { var langIndex = json; var link = langIndex[argument.toLowerCase()]; if (typeof link === "undefined") { diff --git a/lang/langIndex.json b/lang/langIndex.json index b5afae68..94586f54 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,12 +1,12 @@ { - "english": "https://rawgit.com/***REMOVED***/basicBot/master/lang/en.json", - "portuguese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/pt-BR.json", - "french": "https://rawgit.com/***REMOVED***/basicBot/master/lang/fr.json", - "turkish": "https://rawgit.com/***REMOVED***/basicBot/master/lang/tr.json", - "serbian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/sr.json", - "chinese": "https://rawgit.com/***REMOVED***/basicBot/master/lang/zh-TW.json", - "dutch": "https://rawgit.com/***REMOVED***/basicBot/master/lang/nl.json", - "latvian": "https://rawgit.com/***REMOVED***/basicBot/master/lang/lv-LV.json", - "german": "https://rawgit.com/***REMOVED***/basicBot/master/lang/de.json", - "spanish": "https://rawgit.com/***REMOVED***/basicBot/master/lang/es-ES.json" + "english": "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", + "portuguese": "https://rawgit.com/Yemasthui/basicBot/master/lang/pt-BR.json", + "french": "https://rawgit.com/Yemasthui/basicBot/master/lang/fr.json", + "turkish": "https://rawgit.com/Yemasthui/basicBot/master/lang/tr.json", + "serbian": "https://rawgit.com/Yemasthui/basicBot/master/lang/sr.json", + "chinese": "https://rawgit.com/Yemasthui/basicBot/master/lang/zh-TW.json", + "dutch": "https://rawgit.com/Yemasthui/basicBot/master/lang/nl.json", + "latvian": "https://rawgit.com/Yemasthui/basicBot/master/lang/lv-LV.json", + "german": "https://rawgit.com/Yemasthui/basicBot/master/lang/de.json", + "spanish": "https://rawgit.com/Yemasthui/basicBot/master/lang/es-ES.json" } \ No newline at end of file From 672d9f727e07142715b7ce0a340d1d8e0385a76e Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 18 Jul 2015 20:12:40 +0100 Subject: [PATCH 203/281] Updated version --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index 4deb3024..29d7675b 100644 --- a/basicBot.js +++ b/basicBot.js @@ -236,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.8.9", + version: "2.8.10", status: false, name: "basicBot", loggedInID: null, From 904218c28f410f278c8506abda751694fe436161 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 18 Jul 2015 21:42:55 +0100 Subject: [PATCH 204/281] Removed Roulette - Awaiting bug fix --- basicBot.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/basicBot.js b/basicBot.js index 29d7675b..6341dcbe 100644 --- a/basicBot.js +++ b/basicBot.js @@ -358,8 +358,8 @@ }, newBlacklisted: [], - newBlacklistedSongFunction: null, - roulette: { + newBlacklistedSongFunction: null + /*roulette: { rouletteStatus: false, participants: [], countdown: null, @@ -383,7 +383,7 @@ basicBot.userUtilities.moveUser(winner, pos, false); }, 1 * 1000, winner, pos); } - } + }*/ }, User: function (id, name) { this.id = id; @@ -1185,7 +1185,7 @@ return true; } - var rlJoinChat = basicBot.chat.roulettejoin; + /*var rlJoinChat = basicBot.chat.roulettejoin; var rlLeaveChat = basicBot.chat.rouletteleave; var joinedroulette = rlJoinChat.split('%%NAME%%'); @@ -1201,7 +1201,7 @@ API.moderateDeleteChat(id); }, 5 * 1000, chat.cid); return true; - } + }*/ return false; }, commandCheck: function (chat) { @@ -2321,7 +2321,7 @@ } }, - joinCommand: { + /*joinCommand: { command: 'join', rank: 'user', type: 'exact', @@ -2335,7 +2335,7 @@ } } } - }, + },*/ jointimeCommand: { command: 'jointime', @@ -2450,7 +2450,7 @@ } }, - leaveCommand: { + /*leaveCommand: { command: 'leave', rank: 'user', type: 'exact', @@ -2465,7 +2465,7 @@ } } } - }, + },*/ linkCommand: { command: 'link', @@ -2935,7 +2935,7 @@ } }, - rouletteCommand: { + /*rouletteCommand: { command: 'roulette', rank: 'mod', type: 'exact', @@ -2948,7 +2948,7 @@ } } } - }, + },*/ rulesCommand: { command: 'rules', From 37dd41e19d275b91f4aa90e6aac4cca7b7f8d7a7 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 18 Jul 2015 21:44:32 +0100 Subject: [PATCH 205/281] Removed Roulette commands from commands list --- commands.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands.md b/commands.md index 9d06417d..89ba957b 100644 --- a/commands.md +++ b/commands.md @@ -39,7 +39,7 @@ Bouncer+ |!lockdown | | lock down the room: only staff can chat | |!move | @user (X) | moves user to position X on the waitlist, default is position 1 | |!remove | @user | remove user from the waitlist | -|!roulette | | start a roulette | +|~~!roulette~~ | | ~~start a roulette~~ | |!songstats | | toggle song statistics | |!unlock | | unlock the waitlist | |!welcome | | toggle the welcome message on user join | @@ -111,8 +111,8 @@ User |!ghostbuster | @user | checks if user is ghosting | |!gif | (message) | returns gif (from giphy) related to the tag provided. Returns a random gif if no tags are provided. | |!help | | links to an image to help get people started on plug | -|!join | | join the roulette if it's up | -|!leave | | leave the roulette if you joined | +|~~!join~~ | | ~~join the roulette if it's up~~ | +|~~!leave~~ | | ~~leave the roulette if you joined~~ | |!link | | when the user is the DJ, give a link to the current song | |!op | | links to the OverPlayed list (if set in the settings) | |!ping | | pong! | From 28f1df5e1d800044e0a247b69f1f3f7a63e98f33 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 22 Jul 2015 01:49:10 +0100 Subject: [PATCH 206/281] Updated language files. --- lang/cs.json | 206 ++++++++++++++++++++++++++++++++++++++++++++ lang/de.json | 70 +++++++-------- lang/en.json | 3 +- lang/es-ES.json | 68 +++++++-------- lang/fr.json | 117 +++++++++++++------------ lang/langIndex.json | 16 ++-- lang/lv-LV.json | 68 +++++++-------- lang/ms.json | 206 ++++++++++++++++++++++++++++++++++++++++++++ lang/nl.json | 9 +- lang/pt-BR.json | 68 +++++++-------- lang/sr.json | 1 - lang/tr.json | 5 +- lang/zh-TW.json | 70 +++++++-------- 13 files changed, 658 insertions(+), 249 deletions(-) create mode 100644 lang/cs.json create mode 100644 lang/ms.json diff --git a/lang/cs.json b/lang/cs.json new file mode 100644 index 00000000..1ea0684a --- /dev/null +++ b/lang/cs.json @@ -0,0 +1,206 @@ +{ + "cookies": [ + "ti daroval\/a \u010dokol\u00e1dovou su\u0161enku!", + "ti daroval\/a jemnou dom\u00e1c\u00ed ovesnou su\u0161enku!", + "ti daroval\/a oby\u010dejnou suchou starou su\u0161enku, kter\u00e1 byla posledn\u00ed v s\u00e1\u010dku. Nevychovanec.", + "ti daroval\/a cukrovou su\u0161enku. Co? \u017d\u00e1dn\u00e1 poleva a syp\u00e1n\u00ed? 0\/10 nedot\u00fdkal bych se ji.", + "ti daroval\/a \u010dokol\u00e1dovou su\u0161enku. Po\u010dkat, jsou na ni rozinky. Bl\u00e9!", + "ti daroval\/a obrovskou su\u0161enku. Prop\u00edchnut\u00ed ji ti d\u00e1 v\u00edce su\u0161enek. Podivn\u00e9.", + "ti daroval\/a su\u0161enku \u0161t\u011bst\u00ed. Stoj\u00ed tam: \"Pro\u010d nepracuje\u0161 na \u017e\u00e1dn\u00fdch projektech?\"", + "ti daroval\/a su\u0161enku \u0161t\u011bst\u00ed. Stoj\u00ed tam: \"\u0158ekni n\u011bkomu speci\u00e1ln\u00edmu n\u011bjak\u00fd kompliment.\"", + "ti daroval\/a su\u0161enku \u0161t\u011bst\u00ed. Stoj\u00ed tam: \"Riskuj!\"", + "ti daroval\/a su\u0161enku \u0161t\u011bst\u00ed. Stoj\u00ed tam: \"Jdi ven.\"", + "ti daroval\/a su\u0161enku \u0161t\u011bst\u00ed. Stoj\u00ed tam: \"Nezapome\u0148 j\u00edst zeleninu.\"", + "ti daroval\/a su\u0161enku \u0161t\u011bst\u00ed: Stoj\u00ed tam: \"Do you even lift?\"", + "ti daroval\/a su\u0161enku \u0161t\u011bst\u00ed: Stoj\u00ed tam: \"m808 pros\u00edm\"", + "ti daroval\/a su\u0161enku \u0161t\u011bst\u00ed. Stoj\u00ed tam: \"Kdy\u017e bude\u0161 h\u00fdbat boky, z\u00edsk\u00e1\u0161 si v\u0161echny sle\u010dny.\"", + "ti daroval\/a su\u0161enku \u0161t\u011bst\u00ed. Stoj\u00ed tam: \"Miluju t\u011b.\"", + "ti daroval\/a Zlatou Su\u0161enku. Nem\u016f\u017ee\u0161 ji sn\u00edst, proto\u017ee je ze zlata. Zatracen\u011b.", + "ti daroval\/a Oreo su\u0161enku se sklenic\u00ed ml\u00e9ka!", + "ti daroval\/a duhovou su\u0161enku pe\u010denou s l\u00e1skou. :heart:", + "ti daroval\/a starou su\u0161enku, kterou zapomn\u011bl v de\u0161ti. Je plesniv\u00e1.", + "ti pe\u010de \u010derstv\u00e9 su\u0161enky. Von\u00ed b\u00e1je\u010dn\u011b." + ], + "balls": [ + "V\u011bt\u0161ina v\u011bc\u00ed nasv\u011bd\u010duje tomu, \u017ee ano. ", + "Ano", + "Mlhav\u00e1 odpov\u011b\u010f. Zkus to znovu.", + "Bezpochyby.", + "M\u00e9 zdroje \u0159\u00edkaj\u00ed, \u017ee ne.", + "Jak to vid\u00edm j\u00e1, tak ano.", + "Na to se m\u016f\u017ee\u0161 spolehnout.", + "Soust\u0159e\u010f se a zeptej se znovu.", + "Vyhl\u00eddky nejsou moc dobr\u00e9.", + "Rozhodn\u011b je to tak.", + "Rad\u011bji ti to ne\u0159eknu hned.", + "Velmi pochybn\u00e9.", + "Ano - ur\u010dit\u011b.", + "To je jist\u00e9.", + "To te\u010f nelze p\u0159edv\u00eddat.", + "Pravd\u011bpodobn\u011b.", + "Zeptej se pozd\u011bji znovu.", + "Moje odpov\u011b\u010f zn\u00ed ne.", + "Dobr\u00e1 vyhl\u00eddka.", + "Na to nespol\u00e9hej.", + "Ano, v prav\u00fd \u010das.", + "Definitely not.", + "Ur\u010dit\u011b ne.", + "Bude\u0161 muset po\u010dkat.", + "M\u00e1m sv\u00e9 pochybnosti.", + "Vyhl\u00eddky jsou nejasn\u00e9.", + "Vypad\u00e1 to dob\u0159e podle m\u011b.", + "Kdo mysl\u00ed?", + "Vypad\u00e1 to dob\u0159e.", + "Pravd\u011bpodobn\u011b", + "D\u011bl\u00e1\u0161 si srandu?", + "Nes\u00e1zej na to." + ], + "nodatafound": "Nebyla nalezena \u017e\u00e1dn\u00e1 p\u0159edchoz\u00ed data.", + "currentlang": "\/me Aktu\u00e1ln\u00ed jazyk: %%LANGUAGE%%", + "langerror": "\/me Jazyk, kter\u00fd jste si vybral\/a, je nedostupn\u00fd. Pros\u00edm, nav\u0161tivte %%LINK%% k nalezen\u00ed seznamu dostupn\u00fdch jazyk\u016f.", + "langset": "\/me Jazyk je nyn\u00ed nastaven na: %%LANGUAGE%%", + "retrievingdata": "Na\u010d\u00edt\u00e1n\u00ed d\u0159\u00edve ulo\u017een\u00fdch dat.", + "datarestored": "D\u0159\u00edve ulo\u017een\u00e1 data \u00fasp\u011b\u0161n\u011b na\u010dtena.", + "greyuser": "Pouze vyhazova\u010di a vy\u0161\u0161\u00ed mohou spustit bota.", + "bouncer": "Bot nem\u016f\u017ee p\u0159esouvat lidi, kdy\u017e je spu\u0161t\u011bn jako vyhazova\u010d.", + "online": "\/me %%BOTNAME%% v%%VERSION%% je online!", + "welcome": "\/me V\u00edtej %%NAME%%", + "welcomeback": "\/me V\u00edtej zp\u011bt, %%NAME%%", + "songknown": "\/me @%%NAME%%, tato skladba je ji\u017e v DJ historii.", + "notavailable": "\/me @%%NAME%%, skladba, kterou jsi hr\u00e1l\/a, nebyla dotupn\u00e1.", + "timelimit": "\/me @%%NAME%%, tvoje skladba je del\u0161\u00ed ne\u017e %%MAXLENGTH%% minut, pot\u0159ebuje\u0161 svolen\u00ed hr\u00e1t del\u0161\u00ed skladby.", + "permissionownsong": "\/me :up: @%%NAME%% m\u00e1 pr\u00e1vo hr\u00e1t svoj\u00ed produkci.", + "isblacklisted": "Tato skladba je na %%BLACKLIST%% blacklistu! P\u0159eskakuji...", + "isopen": "\/me Ruleta je spu\u0161t\u011bna! Napi\u0161 !join pro p\u0159ihl\u00e1\u0161en\u00ed! (Hra, ve kter\u00e9 je n\u00e1hodn\u00fd \u00fa\u010dastn\u00edk p\u0159esunut na n\u00e1hodnou pozici ve front\u011b)", + "winnerpicked": "\/me V\u00edt\u011bz byl vybr\u00e1n! @%%NAME%% na pozici %%POSITION%%.", + "ball": "\/me %%NAME%% se zeptal\/a: \"%%QUESTION%%\" a %%BOTNAME%% odpov\u011bd\u011bl: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% neghostuje.", + "ghosting": "[%%NAME1%%] %%NAME2%% bu\u010f ghostuje nebo zde nen\u00ed.", + "alreadyadding": "\/me U\u017eivatel je ji\u017e p\u0159id\u00e1n! Zm\u011bna po\u017eadovan\u00e9 pozice na %%POSITION%%.", + "adding": "\/me P\u0159idal @%%NAME%% do fronty. Sou\u010dasn\u00e1 pozice: %%POSITION%%.", + "usernotfound": "\/me U\u017eivatel nenalezen.", + "notdisconnected": "\/me @%%NAME%% Neodpojil\/a jsi se v dob\u011b, co je bot spu\u0161t\u011bn.", + "noposition": "\/me Posledn\u00ed pozice nen\u00ed zn\u00e1ma. Po\u0159adn\u00edk pot\u0159ebuje aktualizovat alespo\u0148 jednou zaregistrovanou posledn\u00ed pozic\u00ed u\u017eivatele.", + "toolongago": "\/me @%%NAME%% se odpojil\/a (DC nebo nep\u0159\u00edtomnost) p\u0159ed p\u0159\u00edli\u0161 dlouhou dobou: %%TIME%%.", + "valid": "\/me @%%NAME%% byl\/a odpojen\/a p\u0159ed %%TIME%% a m\u011bl\/a by b\u00fdt na pozici %%POSITION%%.", + "warning1": "\/me @%%NAME%%, byl\/a jsi afk po dobu %%TIME%%, pros\u00edm odpov\u011bz do 2 minut nebo bude\u0161 odstran\u011bn\/a z fronty.", + "warning2": "\/me @%%NAME%%, bude\u0161 odstran\u011bn\/a z fronty kv\u016fli AFK, pokud neodpov\u00ed\u0161.", + "afkremove": "\/me @%%NAME%%, byl\/a jsi odstran\u011bn\/a z d\u016fvodu AFK po dobu %%TIME%%. Byl\/a jsi na pozici %%POSITION%%. Napi\u0161 alespo\u0148 jednou za %%MAXIMUMAFK%% minut, pokud chce\u0161 hr\u00e1t.", + "caps": "\/me @%%NAME%%, dej si bacha na capslock, pros\u00edm.", + "askskip": "\/me @%%NAME%%, ne\u017e\u00e1dej o p\u0159esko\u010den\u00ed.", + "spam": "\/me @%%NAME%%, pros\u00edm nespamuj.", + "roomadvertising": "\/me @%%NAME%%, nepos\u00edlej odkazy na jin\u00e9 m\u00edstnosti pros\u00edm.", + "adfly": "\/me @%%NAME%%, pros\u00edm zm\u011b\u0148 si sv\u016fj AutoWoot. Navrhujeme PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Neplatn\u00fd tag, zkus jin\u00fd. [Tags: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [N\u00e1hodn\u00fd GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] Neplatn\u00e1 \u017e\u00e1dost, zkus to znovu.", + "invalidtime": "\/me [@%%NAME%%] Byl zad\u00e1n neplatn\u00fd \u010das.", + "nouserspecified": "\/me [@%%NAME%%] Nebyl zad\u00e1n u\u017eivatel.", + "invaliduserspecified": "\/me [@%%NAME%%] Byl zad\u00e1n neplatn\u00fd u\u017eivatel.", + "nolistspecified": "\/me [@%%NAME%%] Nebyl zad\u00e1n seznam.", + "invalidlistspecified": "\/me [@%%NAME%%] Byl zad\u00e1n neplatn\u00fd seznam.", + "novaliduserspecified": "\/me [@%%NAME%%] Byl zad\u00e1n neplatn\u00fd u\u017eivatel.", + "nolimitspecified": "\/me [@%%NAME%%] Nebyl zad\u00e1n limit.", + "invalidlimitspecified": "\/me [@%%NAME%%] Neplatn\u00fd limit.", + "invalidpositionspecified": "\/me [@%%NAME%%] Byla zad\u00e1na neplatn\u00e1 pozice.", + "whois": "\/me [%%NAME1%%] U\u017eivatelsk\u00e9 jm\u00e9no: %%NAME2%%, ID: %%ID%%, Hodnost: %%RANK%%, P\u0159ipojen: %%JOINED%%, \u00darove\u0148: %%LEVEL%%, Jazyk: %%LANGUAGE%%, Avatar: %%AVATAR%%, Status: %%STATUS%%%%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% zapnuto.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% vypnuto.", + "cmddeletion": "command deletion", + "afkremoval": "AFK removal", + "afksremoved": "AFK's removed", + "afklimit": "AFK limit", + "autodisable": "autodisable", + "autoskip": "autoskip", + "newblacklisted": "\/me [@%%NAME%%] Tato skaldba pat\u0159\u00ed do %%BLACKLIST%% blacklistu! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Blacklist informace - autor: %%AUTHOR%%, n\u00e1zev: %%TITLE%%, mid: %%SONGID%%", + "blacklist": "blacklist", + "cycleguard": "cycleguard", + "timeguard": "timeguard", + "chatfilter": "chatfilter", + "historyskip": "hystoryskip", + "lockdown": "lockdown", + "lockguard": "lockguard", + "usercommands": "usercommands", + "motd": "MotD", + "welcomemsg": "welcome message", + "songstats": "song statistics", + "etarestriction": "eta restriction", + "voteskip": "voteskip", + "voteskiplimit": "\/me [@%%NAME%%] Voteskip limit je nastaven na %%LIMIT%% meh\u016f.", + "voteskipexceededlimit": "\/me @%%NAME%%, tvoje skladba p\u0159ekro\u010dila limit k p\u0159esko\u010den\u00ed (%%LIMIT%% meh\u016f).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Neplatn\u00fd limit k p\u0159esko\u010den\u00ed, pros\u00edm zkus to pros\u00edm znovu s pou\u017eit\u00edm \u010d\u00edsla k zaznamen\u00e1n\u00ed meh\u016f.", + "voteskipsetlimit": "\/me [@%%NAME%%] Limit voteskip je nastaven na %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%% Bylo tu %%AMOUNT%% u\u017eivatel\u016f, kte\u0159\u00ed psali v posledn\u00edch %%TIME%% minut\u00e1ch.", + "maximumafktimeset": "\/me [@%%NAME%%] Maxim\u00e1ln\u00ed doba, po kterou m\u016f\u017ee b\u00fdt u\u017eivatel afk, nastavena na %%TIME%% minut.", + "afkstatusreset": "\/me [@%%NAME%%] Vynuloval\/a afk status u\u017eivatele @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% byl\/a neaktivn\u00ed po dobu %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% je neaktivn\u00ed d\u00e9le ne\u017e je %%BOTNAME%% spu\u0161t\u011bn.", + "autowoot": "\/me Doporu\u010dujeme PlugCubed pro automatick\u00fd woot: http:\/\/plugcubed.net\/", + "brandambassador": "\/me Brand Ambassador je hlas u\u017eivatel\u016f plug.dj. Podporuj\u00ed akce, pom\u00e1haj\u00ed komunit\u00e1m, sd\u00edlej\u00ed plug.dj vzkaz po cel\u00e9m sv\u011bt\u011b. Pro v\u00edce informac\u00ed: https:\/\/plug.dj\/ba.", + "bouncerplusrank": "\/me [@%%NAME%%] Mus\u00ed\u0161 b\u00fdt mana\u017eer a nebo mus\u00ed b\u00fdt povolen Vyhazova\u010d+.", + "chatcleared": "\/me [@%%NAME%%] Vy\u010distil\/a chat.", + "deletechat": "\/me [@%%NAME%%] Vy\u010distil\/a chat od %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% p\u0159\u00edkazy: %%LINK%%", + "eatcookie": "\/me J\u00edst su\u0161enky.", + "nousercookie": "\/em nevid\u00edm u\u017eivatele %%NAME%% v m\u00edstnosti, nem\u016f\u017ee\u0161 s n\u00edm j\u00edst su\u0161enky.", + "selfcookie": "\/me @%%NAME%%, nejsi trochu chamtiv\u00fd? D\u00e1vat su\u0161enky sob\u011b. Heh. Rozd\u011bl se s ostatn\u00edmi!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] Cycleguard je nastaven na %%TIME%% minut).", + "dclookuprank": "\/me [@%%NAME%%] Pouze vyhazova\u010d a vy\u0161\u0161\u00ed m\u016f\u017ee pou\u017e\u00edvat lookup pro ostatn\u00ed.", + "emojilist": "\/me Emoji list: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, nejsi ve front\u011b.", + "youarenext": "\/me @%%NAME%%, bude\u0161 DJ a\u017e dohraje tahle skladba.", + "youaredj": "\/me @%%NAME%%, jsi pr\u00e1v\u011b DJ.", + "eta": "\/me @%%NAME%%, jsi na pozici %%POSITION%% ve front\u011b a bude\u0161 na \u0159ad\u011b p\u0159ibli\u017en\u011b za %%TIME%%.", + "facebook": "\/me Likni n\u00e1s na facebooku: %%LINK%%", + "starterhelp": "\/me Tenhle obr\u00e1zek ti pom\u016f\u017ee za\u010d\u00edt na plugu: %%LINK%%", + "roulettejoin": "@%%NAME%% se p\u0159ihl\u00e1sil do rulety! (!leave pokud ji chce\u0161 opustit)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% je v m\u00edstnosti po dobu %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] nem\u016f\u017ee\u0161 pou\u017e\u00edt kick na u\u017eivatele se stejnou nebo vy\u0161\u0161\u00ed hodnost\u00ed!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% you are being kicked from the community for %%TIME%% minutes.", + "kill": "\/me Vyp\u00edn\u00e1n\u00ed", + "logout": "\/me [@%%NAME%%] Odhla\u0161uje %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% opustil\/a ruletu!", + "songlink": "\/me [@%%NAME%%] Link na aktu\u00e1ln\u00ed skladbu: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% pou\u017eil\/a lockskip]", + "usedskip": "\/me [%%NAME%% pou\u017eil\/a skip]", + "skippos": "\/me [@%%NAME%%] DJ bude p\u0159esunut na pozici %%POSITION%% kdy\u017e bude p\u0159esko\u010den.", + "lockguardtime": "\/me [@%%NAME%%] Lockguard je nastaven na %%TIME%% minut.", + "maxlengthtime": "\/me [@%%NAME%%] Maxim\u00e1ln\u00ed povolen\u00e1 d\u00e9lka skladby nastavena na %%TIME%% minut.", + "motdset": "\/me MotD nastaven na: %%MSG%%", + "motdintervalset": "\/me MotD interval nastaven na %%INTERVAL%%.", + "currentbotname": "\/me Jm\u00e9no bota je: %%BOTNAME%%", + "botnameset": "\/me Jm\u00e9no bota je zm\u011bn\u011bno na: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, nesna\u017e se m\u011b p\u0159idat do fronty, pros\u00edm.", + "move": "\/me [%%NAME%% pou\u017eil\/a move]", + "mutednotime": "\/me [@%%NAME%%] Uml\u010del\/a @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] M\u016f\u017ee\u0161 uml\u010det u\u017eivatele maxim\u00e1ln\u011b na %%TIME%% minut.", + "mutedtime": "\/me [@%%NAME%%] Uml\u010del\/a @%%USERNAME%% na %%TIME%% minut.", + "unmuted": "\/me [@%%NAME%%] Zru\u0161il\/a uml\u010den\u00ed @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] Nem\u016f\u017ee\u0161 uml\u010det osobu se stejnou nebo vy\u0161\u0161\u00ed hodnost\u00ed.", + "oplist": "\/me OP list: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Hned jsem zp\u011bt.", + "removenotinwl": "\/me [@%%NAME%%] Vybran\u00fd u\u017eivatel @%%USERNAME%% nen\u00ed ve front\u011b.", + "roomrules": "\/me Pros\u00edm p\u0159e\u010dt\u011bte si zde pravidla komunity: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Celkem woot\u016f: %%WOOTS%%, celkem meh\u016f: %%MEHS%%, celkem grab\u016f: %%GRABS%%.", + "forceskip": "\/me [%%NAME%% pou\u017eil\/a forceskip]", + "madeby": "\/me Tenhle bot byl vytvo\u0159en %%NAME%%.", + "activefor": "Jsem aktivn\u00ed po dobu %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Byl specifikov\u00e1n neplatn\u00fd u\u017eivatel. (Nepou\u017e\u00edvej jm\u00e9na s mezerami!)", + "swapwlonly": "\/me [@%%NAME%%] Pros\u00edm vym\u011b\u0148uj pouze u\u017eivatele, kte\u0159\u00ed jsou ve front\u011b!", + "swapping": "\/me V\u00fdm\u011bna %%NAME1%% s %%NAME2%%.", + "genres": "\/me Pros\u00edm pod\u00edvejte se zde na povolen\u00e9 \u017e\u00e1nry t\u00e9to komunity: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] U\u017eivatel nebyl zabanov\u00e1n.", + "unmutedeveryone": "\/me [@%%NAME%%] Zru\u0161il v\u0161em uml\u010den\u00ed.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Pouze mana\u017ee\u0159i a vy\u0161\u0161\u00ed m\u016f\u017eou zru\u0161it uml\u010den\u00ed v\u0161em z\u00e1rove\u0148.", + "notmuted": "\/me [@%%NAME%%] tento u\u017eivatel nebyl uml\u010den.", + "unmuterank": "\/me [@%%NAME%%] Nem\u016f\u017ee\u0161 zru\u0161it uml\u010den\u00ed osob\u011b se stejnou nebo vy\u0161\u0161\u00ed hodnost\u00ed.", + "commandscd": "\/me [@%%NAME%%] Cooldown p\u0159\u00edkaz\u016f pro u\u017eivatele nastaven na %%TIME%% sekund.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woot\u016f: %%WOOT%%, meh\u016f: %%MEHS%%, pom\u011br (w\/m): %%RATIO%%.", + "website": "\/me Pros\u00edm nav\u0161tivte na\u0161e webov\u00e9 str\u00e1nky: %%LINK%%", + "youtube": "\/me [%%NAME%%] Dejte n\u00e1m odb\u011br na youtube: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file diff --git a/lang/de.json b/lang/de.json index 2eb848d0..66caafbc 100644 --- a/lang/de.json +++ b/lang/de.json @@ -21,40 +21,40 @@ "gibt dir einen alten Keks, der im Regen gelassen wurde. Er ist schimmlig.", "backt dir einen frischen Keks, er schmeckt wunderbar." ], - "balls": { - "0": "Die Zeichen deuten auf Ja.", - "1": "Ja.", - "2": "Versuch es sp\u00e4ter nochmal.", - "3": "Ohne jeden Zweifel.", - "4": "Meine Quellen sagen Nein.", - "5": "So wie ich das sehe, ja.", - "6": "Du kannst dich darauf verlassen.", - "7": "Konzentriere dich und frage erneut.", - "8": "Sieht nicht so gut aus.", - "9": "Es ist umstritten.", - "10": "Ich sage dir lieber nicht die Antwort.", - "11": "Sehr Zweifelhaft.", - "12": "Ja, definitiv.", - "13": "Es ist sicher.", - "14": "Kann ich nicht vorhersagen.", - "15": "sehr wahrscheinlich", - "16": "Frag sp\u00e4ter erneut", - "17": "Meine Antwort ist Nein.", - "18": "Sieht gut aus.", - "19": "Z\u00e4hl nicht darauf.", - "20": "Ja, in geraumer Zeit.", - "22": "Definitiv nicht.", - "23": "Du wirst warten m\u00fcssen.", - "24": "Ich habe meine Zweifel.", - "25": "Sieht so und so aus.", - "26": "Sieht gut aus f\u00fcr mich!", - "27": "Wer wei\u00df?", - "28": "Sieht gut aus!", - "29": "Wahrscheinlich.", - "30": "Willst du mich verarschen?", - "31": "Du kannst nicht darauf z\u00e4hlen", - "32": "Vergiss es." - }, + "balls": [ + "Die Zeichen deuten auf Ja.", + "Ja.", + "Versuch es sp\u00e4ter nochmal.", + "Ohne jeden Zweifel.", + "Meine Quellen sagen Nein.", + "So wie ich das sehe, ja.", + "Du kannst dich darauf verlassen.", + "Konzentriere dich und frage erneut.", + "Sieht nicht so gut aus.", + "Es ist umstritten.", + "Ich sage dir lieber nicht die Antwort.", + "Sehr Zweifelhaft.", + "Ja, definitiv.", + "Es ist sicher.", + "Kann ich nicht vorhersagen.", + "sehr wahrscheinlich", + "Frag sp\u00e4ter erneut", + "Meine Antwort ist Nein.", + "Sieht gut aus.", + "Z\u00e4hl nicht darauf.", + "Ja, in geraumer Zeit.", + "Definitely not.", + "Definitiv nicht.", + "Du wirst warten m\u00fcssen.", + "Ich habe meine Zweifel.", + "Sieht so und so aus.", + "Sieht gut aus f\u00fcr mich!", + "Wer wei\u00df?", + "Sieht gut aus!", + "Wahrscheinlich.", + "Willst du mich verarschen?", + "Du kannst nicht darauf z\u00e4hlen" + ], "nodatafound": "Keine vorhergehenden Daten gefunden.", "currentlang": "\/me Zurzeit eingestellte Sprache: %%LANGUAGE%%", "langerror": "\/me Die ausgew\u00e4hlte Sprache ist nicht verf\u00fcgbar. Bitte besuche %%LINK%%, um eine Liste der verf\u00fcgbaren Sprachen zu finden.", @@ -188,7 +188,7 @@ "sessionstats": "\/me [@%%NAME%%] Total woots: %%WOOTS%%, total mehs: %%MEHS%%, total grabs: %%GRABS%%.", "forceskip": "\/me [%%NAME%% hat forceskip benutzt]", "madeby": "\/me Der Bot wurde entwickelt von %%NAME%%.", - "activefor": "Ich bin inaktiv seit %%TIME%%.", + "activefor": "Ich bin aktiv seit %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] Ung\u00fcltiger Benutzer festgelegt. (Keine Namen mit einem Leerzeichen!)", "swapwlonly": "\/me [@%%NAME%%] Bitte vertausch nur Benutzer, die in der Warteliste sind!", "swapping": "\/me Vertausche %%NAME1%% mit %%NAME2%%.", diff --git a/lang/en.json b/lang/en.json index eb44cfcd..aaf42346 100644 --- a/lang/en.json +++ b/lang/en.json @@ -43,7 +43,6 @@ "Outlook good.", "Don't count on it.", "Yes, in due time.", - "My sources say no.", "Definitely not.", "You will have to wait.", "I have my doubts.", @@ -133,7 +132,7 @@ "voteskipexceededlimit": "\/me @%%NAME%%, your song has exceeded the voteskip limit (%%LIMIT%% mehs).", "voteskipinvalidlimit": "\/me [@%%NAME%%] Invalid voteskip limit, please try again using a number to signify the number of mehs.", "voteskipsetlimit": "\/me [@%%NAME%%] Voteskip limit set to %%LIMIT%%.", - "activeusersintime": "\/me [@%%NAME%% There have been %%AMOUNT%% users chatting in the past %%TIME%% minutes.", + "activeusersintime": "\/me [@%%NAME%%] There have been %%AMOUNT%% users chatting in the past %%TIME%% minutes.", "maximumafktimeset": "\/me [@%%NAME%%] Maximum afk duration set to %%TIME%% minutes.", "afkstatusreset": "\/me [@%%NAME%%] Reset the afk status of @%%USERNAME%%.", "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% has been inactive for %%TIME%%.", diff --git a/lang/es-ES.json b/lang/es-ES.json index 4fc14796..c5ec10eb 100644 --- a/lang/es-ES.json +++ b/lang/es-ES.json @@ -21,40 +21,40 @@ "te da una galleta vieja que se dejo en la lluvia, esta mohosa.", "te cocina galletas frescas, huelen muy bien." ], - "balls": { - "0": "Los signos apuntan a que s\u00ed.", - "1": "S\u00ed.", - "2": "Respuesta vaga, vuelve a intentarlo.", - "3": "Sin lugar a duda.", - "4": "Mis fuentes dicen que no.", - "5": "Como yo lo veo, si.", - "6": "Puedes confiar en ello.", - "7": "Concentrate y pregunta de nuevo.", - "8": "Las perspectivas no son buenas.", - "9": "Es decididamente as\u00ed.", - "10": "Mejor no decirte ahora.", - "11": "Muy dudoso.", - "12": "Si - definitivamente.", - "13": "Es cierto.", - "14": "No lo puedo predecir ahora.", - "15": "Lo m\u00e1s probable.", - "16": "Pregunta de nuevo mas tarde.", - "17": "Mi respuesta es no.", - "18": "Buen pron\u00f3stico.", - "19": "No cuentes con ello.", - "20": "Si, en su debido tiempo.", - "22": "Definitivamente no.", - "23": "Tendras que esperar.", - "24": "Tengo mis dudas.", - "25": "Se ve normal.", - "26": "\u00a1Se ve muy bien para mi!", - "27": "\u00bfQui\u00e9n sabe?", - "28": "\u00a1Pinta bien!", - "29": "Probablemente.", - "30": "\u00bfEstas bromeando?", - "31": "No apuestes en ello.", - "32": "Olvidalo." - }, + "balls": [ + "Los signos apuntan a que s\u00ed.", + "S\u00ed.", + "Respuesta vaga, vuelve a intentarlo.", + "Sin lugar a duda.", + "Mis fuentes dicen que no.", + "Como yo lo veo, si.", + "Puedes confiar en ello.", + "Concentrate y pregunta de nuevo.", + "Las perspectivas no son buenas.", + "Es decididamente as\u00ed.", + "Mejor no decirte ahora.", + "Muy dudoso.", + "Si - definitivamente.", + "Es cierto.", + "No lo puedo predecir ahora.", + "Lo m\u00e1s probable.", + "Pregunta de nuevo mas tarde.", + "Mi respuesta es no.", + "Buen pron\u00f3stico.", + "No cuentes con ello.", + "Si, en su debido tiempo.", + "Definitely not.", + "Definitivamente no.", + "Tendras que esperar.", + "Tengo mis dudas.", + "Se ve normal.", + "\u00a1Se ve muy bien para mi!", + "\u00bfQui\u00e9n sabe?", + "\u00a1Pinta bien!", + "Probablemente.", + "\u00bfEstas bromeando?", + "No apuestes en ello." + ], "nodatafound": "No se ha encontrado datos anteriores.", "currentlang": "\/me Idioma actualmente puesto en %%LANGUAGE%%", "langerror": "\/me El lenguaje que seleccionaste no esta disponible. Por favor visita %%LINK%% para encontrar la lista de lenguajes disponibles.", diff --git a/lang/fr.json b/lang/fr.json index a39aae61..acf941bd 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -1,60 +1,59 @@ { "cookies": [ - "has given you a chocolate chip cookie!", - "has given you a soft homemade oatmeal cookie!", - "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", - "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", - "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", - "gives you an enormous cookie. Poking it gives you more cookies. Weird.", - "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", - "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", - "gives you a fortune cookie. It reads \"Take a risk!\"", - "gives you a fortune cookie. It reads \"Go outside.\"", - "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", + "vous a donn\u00e9 un cookie aux p\u00e9pites de chocolat !", + "vous a donn\u00e9 un cookie aux flocons d'avoine !", + "vous a donn\u00e9 un vieux cookie sec et rassis. C'\u00e9tait le dernier du paquet. D\u00e9go\u00fbtant !", + "vous donne un biscuit au sucre. Quoi, pas de gla\u00e7age ni vermicelles ? 0\/10 ne toucherait pas.", + "vous donne un cookie aux p\u00e9pites de chocolat. Oh attend, ce sont des raisins secs ! Berk !", + "vous donne une \u00e9norme cookie. Appuyer dessus vous donne plus de cookies. Bizarre.", + "vous donne un biscuit chinois. Il est \u00e9crit \"Pourquoi ne travaillez-vous pas sur aucun projet ?\"", + "vous donnne un biscuit chinois. Il est \u00e9crit \"Donnez un compliment \u00e0 cet \u00eatre qui vous est cher\"", + "vous donne un biscuit chinois. Il est \u00e9crit \"Prenez des risques !\"", + "vous donne un biscuit chinois. Il est \u00e9crit \"Allez dehors !\"", + "vous donne un biscuit chinois. Il est \u00e9crit \"N'oubliez pas de manger vos l\u00e9gumes !\"", "gives you a fortune cookie. It reads \"Do you even lift?\"", "gives you a fortune cookie. It reads \"m808 pls\"", "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", - "gives you a fortune cookie. It reads \"I love you.\"", - "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", - "gives you an Oreo cookie with a glass of milk!", - "gives you a rainbow cookie made with love :heart:", - "gives you an old cookie that was left out in the rain, it's moldy.", - "bakes you fresh cookies, it smells amazing." + "vous donne un biscuit chinois. Il est \u00e9crit \"Je vous aime.\"", + "vous donne un Cookie Dor\u00e9. Vous ne pouvez pas le manger puisque il est fait en or. Merde.", + "vous donne un Oreo avec une verre de lait !", + "vous donne un cookie arc-en-ciel fait d'amour :heart:", + "vous donne un cookie qui a pris la pluie, il est moisi.", + "pr\u00e9pare de nouveaux cookies, \u00e7a sent tellement bon !" ], "balls": [ - "Signs point to yes.", - "Yes.", - "Reply hazy, try again.", - "Without a doubt.", - "My sources say no.", - "As I see it, yes.", - "You may rely on it.", - "Concentrate and ask again.", - "Outlook not so good.", - "It is decidedly so.", - "Better not tell you now.", - "Very doubtful.", - "Yes - definitely.", - "It is certain.", - "Cannot predict now.", - "Most likely.", - "Ask again later.", - "My reply is no.", - "Outlook good.", - "Don't count on it.", - "Yes, in due time.", - "My sources say no.", + "Il semble que oui.", + "Oui.", + "C'est incertain, demande encore.", + "Sans aucun doute.", + "Mes sources disent que non.", + "Tel que je le vois, oui.", + "Vous pouvez compter l\u00e0-dessus.", + "Concentrez-vous et demandez encore !", + "Les perspectives ne sont pas si bonnes.", + "C'est d\u00e9cid\u00e9 tel quel.", + "Je ne devrais pas vous le dire maintenant.", + "J'ai des gros doutes.", + "Oui - d\u00e9finitivement.", + "C'est certain.", + "Je ne peux pas le pr\u00e9dire maintenant.", + "Probablement.", + "Redemande plus tard.", + "Ma r\u00e9ponse est non.", + "Les perspectives sont bonnes.", + "Ne comptez pas dessus.", + "Oui, en temps voulu.", "Definitely not.", - "You will have to wait.", - "I have my doubts.", - "Outlook so so.", - "Looks good to me!", - "Who knows?", - "Looking good!", - "Probably.", - "Are you kidding?", - "Don't bet on it.", - "Forget about it." + "D\u00e9finitivement pas.", + "Vous devrez attendre.", + "J'en doute.", + "Couci-cou\u00e7a.", + "\u00c7a me para\u00eet bon !", + "Qui sait ?", + "Semble bien !", + "Possiblement.", + "Vous plaisantez ?", + "Ne pariez pas dessus." ], "nodatafound": "Aucune donn\u00e9e trouv\u00e9e.", "currentlang": "\/me La langue actuellement utilis\u00e9e est : %%LANGUAGE%%", @@ -72,10 +71,10 @@ "timelimit": "\/me @%%NAME%%, votre musique est plus longue que %%MAXLENGTH%% minutes, vous avez besoin de la permission pour jouer une musique plus longue.", "permissionownsong": "\/me :up: @%%NAME%% a la permission de jouer sa propre cr\u00e9ation !", "isblacklisted": "\/me Cette musique est sur la liste noire %%BLACKLIST%% ! Je passe...", - "isopen": "\/me La roulette est maintenant ouverte ! Tapez !join pour participer !", + "isopen": "\/me La roulette est maintenant ouverte ! Tapez !join pour participer ! (Un jeu o\u00f9 une participant au hasard est d\u00e9plac\u00e9 \u00e0 une position al\u00e9atoire dans la queue)", "winnerpicked": "\/me Un gagnant a \u00e9t\u00e9 trouv\u00e9 ! @%%NAME%% \u00e0 la position %%POSITION%%.", "ball": "\/me %%NAME%% a pos\u00e9 la question: \"%%QUESTION%%\" et la r\u00e9ponse de %%BOTNAME%% est: \"%%RESPONSE%%\"", - "notghosting": "[%%NAME1%%] %%NAME2%% n'est pas en fantome.", + "notghosting": "[%%NAME1%%] %%NAME2%% n'est pas en fant\u00f4me.", "ghosting": "[%%NAME1%%] %%NAME2%% is either ghosting or not here.", "alreadyadding": "\/me L'utilisateur est d\u00e9j\u00e0 en ajout ! Changement de la position d\u00e9sir\u00e9e \u00e0 %%POSITION%%.", "adding": "\/me Ajout de @%%NAME%% \u00e0 la file d'attente. Queue actuelle : %%POSITION%%.", @@ -92,9 +91,9 @@ "spam": "\/me @%%NAME%%, merci de ne pas spammer.", "roomadvertising": "\/me @%%NAME%%, ne postez pas de liens menant vers d'autres salles.", "adfly": "\/me @%%NAME%%, merci de changer votre programme d'Autowoot. Nous vous sugg\u00e9rons PlugCubed : http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags : %%TAGS%%]", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", "invalidgiftags": "\/me [@%%NAME%%] Tags invalides, essayez-en d'autres. [Tags : %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [GIF Al\u00e9atoire]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [GIF Al\u00e9atoire]", "invalidgifrandom": "\/me [@%%NAME%%] Requ\u00eate invalide, essayez encore.", "invalidtime": "\/me [@%%NAME%%] Temps sp\u00e9cifi\u00e9 invalide.", "nouserspecified": "\/me [@%%NAME%%] Aucun utilisateur sp\u00e9cifi\u00e9.", @@ -105,7 +104,7 @@ "nolimitspecified": "\/me [@%%NAME%%] Aucune limite sp\u00e9cifi\u00e9e.", "invalidlimitspecified": "\/me [@%%NAME%%] Limite invalide.", "invalidpositionspecified": "\/me [@%%NAME%%] Position invalide sp\u00e9cifi\u00e9e.", - "whois": "\/me [%%NAME1%%] Nom : %%NAME2%%, ID : %%ID%%, Rang : %%RANK%%, Inscrit le : %%JOINED%%, Niveau : %%LEVEL%%, Langue : %%LANGUAGE%%, Avatar : %%AVATAR%%, Statut : %%STATUS%%%%PROFILE%%", + "whois": "\/me [%%NAME1%%] Nom: %%NAME2%%, ID: %%ID%%, Rang: %%RANK%%, Rejoint le: %%JOINED%%, Level: %%LEVEL%%, Langue: %%LANGUAGE%%, Avatar: %%AVATAR%%, Profil: %%PROFILE%%", "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% activ\u00e9e.", "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% d\u00e9sactiv\u00e9e.", "cmddeletion": "Suppression de commande", @@ -133,7 +132,7 @@ "voteskipexceededlimit": "\/me @%%NAME%%, votre chanson a d\u00e9pass\u00e9 la limite de mehs requis pour passer (%%LIMIT%% mehs).", "voteskipinvalidlimit": "\/me [@%%NAME%%] Limite invalide, s'il vous pla\u00eet essayez encore en pr\u00e9cisant un nombre pour la limite de mehs.", "voteskipsetlimit": "\/me [@%%NAME%%] Limite pour passer plac\u00e9e \u00e0 %%LIMIT%%.", - "activeusersintime": "\/me [@%%NAME%%] %%AMOUNT%% utilisateurs ont parl\u00e9 dans les derni\u00e8res %%TIME%% minutes.", + "activeusersintime": "\/me [@%%NAME%%] Il y a eu %%AMOUNT%% utilisateurs qui ont parl\u00e9 dans les derni\u00e8res %%TIME%% minutes.", "maximumafktimeset": "\/me [@%%NAME%%] Dur\u00e9e maximum d'AFK r\u00e9gl\u00e9e \u00e0 %%TIME%% minutes.", "afkstatusreset": "\/me [@%%NAME%%] R\u00e9initialisation du statut AFK de @%%USERNAME%%.", "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% a \u00e9t\u00e9 inactif pendant %%TIME%%.", @@ -154,10 +153,10 @@ "notinwaitlist": "\/me @%%NAME%%, vous n'\u00eates pas dans la file d'attente.", "youarenext": "\/me @%%NAME%%, you are DJing after this song.", "youaredj": "\/me @%%NAME%%, you are currently DJing.", - "eta": "\/me @%%NAME%%, vous atteignerez les platines dans \u00e0 peu pr\u00e8s %%TIME%%.", + "eta": "\/me @%%NAME%%, vous \u00eates \u00e0 la position %%POSITION%% dans la queue et vous atteignerez les platines dans \u00e0 peu pr\u00e8s %%TIME%%.", "facebook": "\/me Suivez-nous sur Facebook : %%LINK%%", "starterhelp": "\/me Cette image vous aidera \u00e0 d\u00e9buter sur plug : %%LINK%%", - "roulettejoin": "\/me @%%NAME%% a rejoint la roulette ! (!leave si vous le regrettez.)", + "roulettejoin": "\/me @%%NAME%% a rejoint la roulette ! (!leave si vous le regrettez)", "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% est dans la salle depuis %%TIME%%.", "kickrank": "\/me [@%%NAME%%] Vous ne pouvez pas kicker un utilisateur avec un rang \u00e9gal ou sup\u00e9rieur au v\u00f4tre !", "kick": "\/me [@%%NAME%%], @%%USERNAME%% vous allez vous faire kicker de la communaut\u00e9 pendant %%TIME%% minutes.", @@ -165,7 +164,7 @@ "logout": "\/me [@%%NAME%%] D\u00e9connecte %%BOTNAME%%.", "rouletteleave": "\/me @%%NAME%% a quitt\u00e9 la roulette !", "songlink": "\/me [@%%NAME%%] Lien vers la musique actuelle : %%LINK%%", - "usedlockskip": "\/me [%%NAME%% a utilis\u00e9 lockskip.]", + "usedlockskip": "\/me [%%NAME%% a utilis\u00e9 lockskip]", "usedskip": "\/me [%%NAME%% used skip]", "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", "lockguardtime": "\/me [@%%NAME%%] Le lockguard est maintenant param\u00e9tr\u00e9 pour %%TIME%% minute(s).", @@ -175,7 +174,7 @@ "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", "botnameset": "\/me Bot name now set to: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, n'essaye pas de m'ajouter \u00e0 la liste d'attente, merci.", - "move": "\/me [%%NAME%% a utilis\u00e9 move.]", + "move": "\/me [%%NAME%% a utilis\u00e9 move]", "mutednotime": "\/me [@%%NAME%%] A rendu muet @%%USERNAME%%.", "mutedmaxtime": "\/me [@%%NAME%%] Vous ne pouvez rendre muet qu'au maximum %%TIME%% minutes.", "mutedtime": "\/me [@%%NAME%%] A rendu muet @%%USERNAME%% pendant %%TIME%% minutes.", diff --git a/lang/langIndex.json b/lang/langIndex.json index 94586f54..2edc087e 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,12 +1,14 @@ { + "czech": "https://rawgit.com/Yemasthui/basicBot/master/lang/cs.json", + "german": "https://rawgit.com/Yemasthui/basicBot/master/lang/de.json", "english": "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", - "portuguese": "https://rawgit.com/Yemasthui/basicBot/master/lang/pt-BR.json", + "spanish": "https://rawgit.com/Yemasthui/basicBot/master/lang/es-ES.json", "french": "https://rawgit.com/Yemasthui/basicBot/master/lang/fr.json", - "turkish": "https://rawgit.com/Yemasthui/basicBot/master/lang/tr.json", - "serbian": "https://rawgit.com/Yemasthui/basicBot/master/lang/sr.json", - "chinese": "https://rawgit.com/Yemasthui/basicBot/master/lang/zh-TW.json", - "dutch": "https://rawgit.com/Yemasthui/basicBot/master/lang/nl.json", "latvian": "https://rawgit.com/Yemasthui/basicBot/master/lang/lv-LV.json", - "german": "https://rawgit.com/Yemasthui/basicBot/master/lang/de.json", - "spanish": "https://rawgit.com/Yemasthui/basicBot/master/lang/es-ES.json" + "malay": "https://rawgit.com/Yemasthui/basicBot/master/lang/ms.json", + "dutch": "https://rawgit.com/Yemasthui/basicBot/master/lang/nl.json", + "portuguese": "https://rawgit.com/Yemasthui/basicBot/master/lang/pt-BR.json", + "serbian": "https://rawgit.com/Yemasthui/basicBot/master/lang/sr.json", + "turkish": "https://rawgit.com/Yemasthui/basicBot/master/lang/tr.json", + "chinese": "https://rawgit.com/Yemasthui/basicBot/master/lang/zh-TW.json" } \ No newline at end of file diff --git a/lang/lv-LV.json b/lang/lv-LV.json index da513bf8..ce067d5a 100644 --- a/lang/lv-LV.json +++ b/lang/lv-LV.json @@ -21,40 +21,40 @@ "iedeva Tev vecu cepumu, vi\u0146\u0161 pamests \u0101r\u0101, liet\u016b. Tas ir sapel\u0113jis.", "gatavo Tev svaigus cepumus, tie smar\u017eo burv\u012bgi." ], - "balls": { - "0": "Paz\u012bmes liecina, ka j\u0101.", - "1": "J\u0101. ", - "2": "Atbilde neskaidra, m\u0113\u0123ini v\u0113lreiz.", - "3": "Bez \u0161aub\u0101m!", - "4": "Mani avoti saka, ka n\u0113.", - "5": "Domaju, ka j\u0101.", - "6": "Tu vari uz to pa\u013cauties. ", - "7": "Koncentr\u0113jies un pajaut\u0101 v\u0113lreiz!", - "8": "Izredzes nav tik lielas.", - "9": "Tas noteikti t\u0101 ir!", - "10": "Lab\u0101k Tev to tagad neteikt.", - "11": "\u013boti ap\u0161aub\u0101mi!", - "12": "J\u0101 - Noteikti.", - "13": "Tas ir dro\u0161i!", - "14": "Pagaid\u0101m nevaru prognoz\u0113t.", - "15": "Visticam\u0101k. ", - "16": "Pajaut\u0101 v\u0113l\u0101k v\u0113lreiz.", - "17": "Mana atbilde ir, n\u0113.", - "18": "Izredzes ir labas!", - "19": "Uz to ner\u0113\u0137inies!", - "20": "Sav\u0101 laik\u0101, J\u0101!", - "22": "Noteikti n\u0113!", - "23": "Tev b\u016bs j\u0101uzgaida. ", - "24": "Man ir savas \u0161aubas..", - "25": "Vid\u0113jas izredzes.", - "26": "Manupr\u0101t izskat\u0101s labi!", - "27": "Kas to lai zina?", - "28": "Izskat\u0101s labi! ", - "29": "Iesp\u0113jams..", - "30": "Vai Tu joko?", - "31": "Uz to nepa\u013caujies.", - "32": "Aizmirsti par to!" - }, + "balls": [ + "Paz\u012bmes liecina, ka j\u0101.", + "J\u0101. ", + "Atbilde neskaidra, m\u0113\u0123ini v\u0113lreiz.", + "Bez \u0161aub\u0101m!", + "Mani avoti saka, ka n\u0113.", + "Domaju, ka j\u0101.", + "Tu vari uz to pa\u013cauties. ", + "Koncentr\u0113jies un pajaut\u0101 v\u0113lreiz!", + "Izredzes nav tik lielas.", + "Tas noteikti t\u0101 ir!", + "Lab\u0101k Tev to tagad neteikt.", + "\u013boti ap\u0161aub\u0101mi!", + "J\u0101 - Noteikti.", + "Tas ir dro\u0161i!", + "Pagaid\u0101m nevaru prognoz\u0113t.", + "Visticam\u0101k. ", + "Pajaut\u0101 v\u0113l\u0101k v\u0113lreiz.", + "Mana atbilde ir, n\u0113.", + "Izredzes ir labas!", + "Uz to ner\u0113\u0137inies!", + "Sav\u0101 laik\u0101, J\u0101!", + "Definitely not.", + "Noteikti n\u0113!", + "Tev b\u016bs j\u0101uzgaida. ", + "Man ir savas \u0161aubas..", + "Vid\u0113jas izredzes.", + "Manupr\u0101t izskat\u0101s labi!", + "Kas to lai zina?", + "Izskat\u0101s labi! ", + "Iesp\u0113jams..", + "Vai Tu joko?", + "Uz to nepa\u013caujies." + ], "nodatafound": "Iepriek\u0161\u0113jie dati nav atrasti. ", "currentlang": "\/me Valoda pa\u0161laik iestat\u012bta uz: %%LANGUAGE%%", "langerror": "\/me Tava izv\u0113l\u0113t\u0101 valoda nav pieejama! Lai atrastu pieejam\u0101s valodas: %%LINK%%", diff --git a/lang/ms.json b/lang/ms.json new file mode 100644 index 00000000..c405f61c --- /dev/null +++ b/lang/ms.json @@ -0,0 +1,206 @@ +{ + "cookies": [ + "telah bagi anda satu cookies cip coklat!", + "telah bagi anda satu kuki oatmeal buatan sendiri yang lembut!", + "telah bagi anda satu biasa, kering, kuki lama. Ia adalah yang terakhir di dalam beg. Kasar.", + "memberikan anda satu cookie gula. Apa, tidak beku dan tabur? 0\/10 Ulasan-ulasan tidak akan menyentuh.", + "memberikan anda cookie cip coklat. Oh tunggu, mereka adalah kismis. Bleck!", + "memberi anda cookie besar. Poking ia memberikan anda lebih kuki. Pelik.", + "memberikan anda cookie nasib. Ia berkata \"Mengapa tidak anda bekerja di mana-mana projek?\"", + "memberikan anda cookie nasib. Ia berkata \"Beri seseorang yang istimewa pujian\"", + "memberikan anda cookie nasib. Ia berkata \"Mengambil risiko!\"", + "memberikan anda cookie nasib. Ia berkata \"Pergilah luar.\"", + "memberikan anda cookie nasib. Ia berkata \"Jangan lupa untuk makan sayur-sayuran anda!\"", + "memberikan anda cookie nasib. Ia berkata \"Adakah anda mengangkat?\"", + "memberikan anda cookie nasib. Ia berkata \"m808 pls\"", + "memberikan anda cookie nasib. Ia berkata \"Jika anda bergerak pinggul anda, anda akan mendapat semua wanita.\"", + "memberikan anda cookie nasib. Ia berkata \"Aku cinta pada mu.\"", + "memberikan anda Cookie Emas. Anda tidak boleh memakannya kerana ia diperbuat daripada emas. Sial.", + "memberi anda cookie Oreo dengan segelas susu!", + "memberikan anda cookie pelangi dibuat dengan kasih sayang :heart:", + "memberi anda cookie lama yang telah ditinggalkan dalam hujan, ia berkulat.", + "membuat anda cookies segar, ia berbau luar biasa." + ], + "balls": [ + "Tanda menunjukkan kepada ya.", + "Ya.", + "Jawap berjerebu, cuba lagi.", + "Tanpa ragu-ragu.", + "Sumber saya mengatakan tidak.", + "Pada pandangan saya, ya.", + "Anda boleh bergantung kepada ia.", + "Menumpukan perhatian dan tanya lagi.", + "Outlook tidak begitu baik.", + "Ia adalah jelas demikian.", + "Lebih baik tidak memberitahu anda sekarang.", + "Sangat menyangsikan.", + "Ya - pasti.", + "Adalah pasti.", + "Tidak boleh meramalkan sekarang.", + "Kemungkinan besar.", + "Tanya lagi kemudian.", + "Jawapan saya adalah tidak.", + "Outlook baik.", + "Jangan mengharapkan ia.", + "Ya, dalam masa yang sewajarnya.", + "Definitely not.", + "Sudah pasti tidak.", + "Anda perlu menunggu.", + "Saya mempunyai keraguan saya.", + "Outlook serdehana.", + "Kelihatan baik kepada saya!", + "Siapa tahu?", + "Kelihatan baik!", + "Mungkin.", + "Adakah anda bergurau?", + "Jangan bertaruh di atasnya." + ], + "nodatafound": "Tiada data sebelumnya dijumpai.", + "currentlang": "\/me Bahasa semasa tetap pada: %%LANGUAGE%%", + "langerror": "\/me Bahasa yang anda pilih tidak available. Sila layari %%LINK%% untuk mendapatkan senarai bahasa yang available.", + "langset": "\/me Bahasa sekarang ditetapkan ke: %%LANGUAGE%%", + "retrievingdata": "Mendapatkan semula data yang disimpan sebelum ini.", + "datarestored": "Data yang disimpan sebelum ini telah berjaya diambil.", + "greyuser": "Hanya bouncer dan pangkat lebih tinggi boleh menjalankan bot.", + "bouncer": "Bot tidak boleh bergerak orang apabila ia dijalankan sebagai bouncer.", + "online": "\/me %%BOTNAME%% v%%VERSION%% online!", + "welcome": "\/me Selamat Datang %%NAME%%", + "welcomeback": "\/me Selamat Kembali, %%NAME%%", + "songknown": "\/me @%%NAME%%, Lagu ini berada dalam Sejarah DJ.", + "notavailable": "\/me @%%NAME%%, lagu yang anda main tidak available.", + "timelimit": "\/me @%%NAME%%, lagu anda telah melebihi panjang dari %%MAXLENGTH%% minit, anda perlu ada kebenaran untuk memainkan lagu-lagu yang panjang.", + "permissionownsong": "\/me :up: @%%NAME%% memperolehi kebenaran untuk memainkan pengeluaran mereka sendiri!", + "isblacklisted": "\/me Lagu ini ada didalam %%BLACKLIST%% blacklist! Melangkau...", + "isopen": "\/me Roulette sekarang dibuka! Taip !join untuk mengambil bahagian! (Satu permainan di mana peserta rawak dipindahkan ke kedudukan yang rawak dalam senarai menunggu)", + "winnerpicked": "\/me Satu Pemenang akan dipilih! @%%NAME%% ke kedudukan %%POSITION%%.", + "ball": "\/me %%NAME%% punya soalan adalah: \"%%QUESTION%%\" dan %%BOTNAME%% punya jawapan ialah: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% bukan hantu.", + "ghosting": "[%%NAME1%%] %%NAME2%% mungkin hantu kat sini atau tidak berada di sini.", + "alreadyadding": "\/me Pengguna telah ditambahkan! Menukarkan kedudukan yang dikehendaki ke %%POSITION%%.", + "adding": "\/me Menambahkan @%%NAME%% ke dalam senarai tunggu. Giliran semasa: %%POSITION%%.", + "usernotfound": "\/me Pengguna tidak dijumpai.", + "notdisconnected": "\/me @%%NAME%% tidak putus sambungan pada masa saya disini.", + "noposition": "\/me Tiada kedudukan terakhir yang diketahui. Senarai menunggu perlu mengemas kini sekurang-kurangnya sekali untuk mendaftar kedudukan terakhir pengguna.", + "toolongago": "\/me @%%NAME%% putus sambungan yang terakhir (DC atau Meninggalkan) adalah terlalu lama dahulu: %%TIME%%.", + "valid": "\/me @%%NAME%% putus sambungan %%TIME%% dahulu dan sepatutnya berada di kedudukan %%POSITION%%.", + "warning1": "\/me @%%NAME%%, anda telah afk untuk %%TIME%%, sila bertindak balas dalam masa 2 minit atau anda akan dikeluarkan dari senarai menunggu.", + "warning2": "\/me @%%NAME%%, anda akan dikeluarkan dari senarai menunggu tidak lama lagi disebadkan afk jika tidak bertindak balas.", + "afkremove": "\/me @%%NAME%%, anda telah dikeluarkan dari senarai menunggu sebab afk untuk %%TIME%%. Anda berada di kedudukan %%POSITION%%. Chat sekurang-kurangnya sekali dalam setiap %%MAXIMUMAFK%% minit jika anda mahu memainkan lagu.", + "caps": "\/me @%%NAME%%, sila tutup capslock butang.", + "askskip": "\/me @%%NAME%%, Jangan meminta untuk melangkau.", + "spam": "\/me @%%NAME%%, sila jangan spam.", + "roomadvertising": "\/me @%%NAME%%, sila jangan pos link ke bilik-bilik lain.", + "adfly": "\/me @%%NAME%%, sila tukar autowoot program anda. Kami mencadangkan Plugcubed: http:\/\/plugcubed.net", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tag: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] tag yang tidak sah, sila cuba yang lain. [Tag: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Random GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] Permintaan yang tidak sah, cuba lagi.", + "invalidtime": "\/me [@%%NAME%%] masa yang dinyatakan tidak sah.", + "nouserspecified": "\/me [@%%NAME%%] Tidak ada pengguna yang dinyatakan.", + "invaliduserspecified": "\/me [@%%NAME%%] pengguna yang dinyatakan tidak sah.", + "nolistspecified": "\/me [@%%NAME%%] tidak ada senarai yang dinyatakan.", + "invalidlistspecified": "\/me [@%%NAME%%] senarai dinyatakan yang tidak sah.", + "novaliduserspecified": "\/me [@%%NAME%%] Tiada pengguna yang sah dinyatakan.", + "nolimitspecified": "\/me [@%%NAME%%] Tiada had yang ditetapkan.", + "invalidlimitspecified": "\/me [@%%NAME%%] had yang tidak sah.", + "invalidpositionspecified": "\/me [@%%NAME%%] Kedudukan yang dinyatakan tidak sah.", + "whois": "\/me [%%NAME1%%] Nama Pengguna: %%NAME2%%, ID: %%ID%%, Pangkat: %%RANK%%, Menyertai Pada: %%JOINED%%, Level: %%LEVEL%%, Bahasa: %%LANGUAGE%%, Avatar: %%AVATAR%%, Profil: %%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% diaktifkan.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% telah dihentikan.", + "cmddeletion": "penghapusan perintah", + "afkremoval": "Penghapusan AFK", + "afksremoved": "AFK dihapus", + "afklimit": "Had AFK", + "autodisable": "autodisable", + "autoskip": "autoskip", + "newblacklisted": "\/me [@%%NAME%%] Lagu ini berada dalam %%BLACKLIST%% blacklist! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Maklumat Blacklist - Artis: %%AUTHOR%%, Tajuk: %%TITLE%%, mid: %%SONGID%%", + "blacklist": "blacklist", + "cycleguard": "Pengawal Kitaran", + "timeguard": "Pengawal Masa", + "chatfilter": "Penapis Chat", + "historyskip": "Sejarah Lagu Melangkau", + "lockdown": "Kuncian", + "lockguard": "Pengawal Kunci", + "usercommands": "Perintah Pengguna", + "motd": "MotD", + "welcomemsg": "Mesej Sambutan", + "songstats": "Statistik Lagu", + "etarestriction": "Sekatan eta", + "voteskip": "Undi Melangkau", + "voteskiplimit": "\/me [@%%NAME%%] Undi Melangkau sekarang ditetap pada %%LIMIT%% meh.", + "voteskipexceededlimit": "\/me @%%NAME%%, lagu anda telah melebihi had undi melangkau (%%LIMIT%% meh).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Had undi melangkau tidak sah, sila cuba lagi mengunakan nombor untuk menandakan bilangan meh.", + "voteskipsetlimit": "\/me [@%%NAME%%] Undi melangkau ditetapkan ke %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] Terdapat %%AMOUNT%% pengguna yang chat pada masa %%TIME%% minit yang lalu.", + "maximumafktimeset": "\/me [@%%NAME%%] Tempoh afk maksimum ditetapkan ke %%TIME%% minit.", + "afkstatusreset": "\/me [@%%NAME%%] Menetapkan semula status afk @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% telah tidak aktif untuk %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% telah tidak aktif lebih lama dari %%BOTNAME%% berada dalam talian.", + "autowoot": "\/me Kami mengesyorkan PlugCubed untuk autowooting: http:\/\/plugcubed.net\/", + "brandambassador": "\/me Brand Ambassador adalah suara pengguna di plug.dj. Mereka mempromosikan event, melibatkan komuniti dan berkongsi mesej plug.dj di seluruh dunia. Untuk Maklumat lebih lanjut: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Anda mesti adalah Manager atau lebih tinggi dari Bouncer +.", + "chatcleared": "\/me [@%%NAME%%] Membersihkan chat.", + "deletechat": "\/me [@%%NAME%%] Membersihkan chat dari %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% Perintah: %%LINK%%", + "eatcookie": "\/me makan cookie.", + "nousercookie": "\/em tidak melihat %%NAME%% dalam bilik dan makan cookie sendiri.", + "selfcookie": "\/me @%%NAME%%, anda ada sikit tamak, bukankah? Memberi cookie untuk diri sendiru, bah. Berkongsilah sikit dengan orang lain!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] Pengawal kitaran telah ditetapkan ke %%TIME%% minit.", + "dclookuprank": "\/me [@%%NAME%%] Hanya Bouncer dan pangkat lebih tinggi boleh melakukan lookup untuk orang lain.", + "emojilist": "\/me Senarai Emoji: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, anda tidak berada dalam senarai menunggu.", + "youarenext": "\/me @%%NAME%%, anda adalah DJ selepas lagu ini.", + "youaredj": "\/me @%%NAME%%, anda sekarang tengah DJ.", + "eta": "\/me @%%NAME%%, anda berada pada kedudukan %%POSITION%% dalam senarai menunggu dan akan mencapai pada booth dalam masa lebih kurang %%TIME%%.", + "facebook": "\/me Like kami di facebook: %%LINK%%", + "starterhelp": "\/me Imej ini akan menunjukkan anda macam mana bermula di plug: %%LINK%%", + "roulettejoin": "@%%NAME%% menyertai roulette! (!leave jika anda menyesal)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% telah berada dalam bilik selama %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] anda tidak boleh menendang pengguna dengan pangkat yang sama atau lebih tinggi daripada anda!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% anda telah ditendang dari komuniti untuk masa %%TIME%% minit.", + "kill": "\/me Menutup.", + "logout": "\/me [@%%NAME%%] Log keluar %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% meninggalkan roulette!", + "songlink": "\/me [@%%NAME%%] Pautan ke lagu semasa: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% telah menggunakan lockskip]", + "usedskip": "\/me [%%NAME%% telah menggunakan langkau]", + "skippos": "\/me [@%%NAME%%] DJ sekarang akan dipindahkan ke kedudukan %%POSITION%% apabila lagunya dilangkau.", + "lockguardtime": "\/me [@%%NAME%%] Lockguard sekarang set kepada %%TIME%% minit(s).", + "maxlengthtime": "\/me [@%%NAME%%] Maksimum tempoh lagu ditetapkan ke %%TIME%% minit.", + "motdset": "\/me MotD ditetapkan ke: %%MSG%%", + "motdintervalset": "\/me MotD Selang ditetapkan ke %%INTERVAL%%.", + "currentbotname": "\/me Nama bot sekarang ditetapkan ke: %%BOTNAME%%", + "botnameset": "\/me Nama bot sekarang akan ditetapkan ke: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, sila jangan cuba untuk menambahkan saya ke dalam senarai menunggu.", + "move": "\/me [%%NAME%% telah menggunakan Pindah]", + "mutednotime": "\/me [@%%NAME%%] Membisukan @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Anda hanya boleh membisukan untuk maksimum %%TIME%% minit.", + "mutedtime": "\/me [@%%NAME%%] Membisukan @%%USERNAME%% untuk %%TIME%% minit.", + "unmuted": "\/me [@%%NAME%%] Batalkan Bisu @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] Anda tidak boleh membisukan orang dengan pangkat yang sama atau lebih tinggi daripada anda.", + "oplist": "\/me Senarai OP: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Akan kembali secepat mungkin.", + "removenotinwl": "\/me [@%%NAME%%] Pengguna dinyatakan @%%USERNAME%% tidak berada dalam senarai menunggu.", + "roomrules": "\/me Sila mendapatkan peraturan bilik disini: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Jumlah woot: %%WOOTS%%, Jumlah meh: %%MEHS%%, Jumlah Koleksi:%%GRABS%%.", + "forceskip": "\/me [%%NAME%% telah menggunakan Memaksa Melangkau]", + "madeby": "\/me bot ini dibuat oleh %%NAME%%.", + "activefor": "Saya telah aktif untuk %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Pengguna dinyatakan tidak sah. (Tiada nama dengan ruang jarak!)", + "swapwlonly": "\/me [@%%NAME%%] Sila menukar kedudukan dengan pengguna yang berada dalam senari menunggu sahaja!", + "swapping": "\/me Menukar kedudukan %%NAME1%% dengan %%NAME2%%.", + "genres": "\/me Sila semak genre dalam bilik yang diizinkan disini: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] Pengguna ini tidak dilarang.", + "unmutedeveryone": "\/me [@%%NAME%%] Batalkan Bisu setiap orang.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Hanya Manager and pangkat yang lebih tinggi boleh membatalkan bisu setiap orang sekaligus.", + "notmuted": "\/me [@%%NAME%%] pengguna itu tidak dibisukan.", + "unmuterank": "\/me [@%%NAME%%] Anda tidak boleh batal bisu orang dengan pangkat yang sama atau lebih tinggi daripada anda.", + "commandscd": "\/me [@%%NAME%%] Selang masa untuk perintah dari pengguna sekarang ditetapkan ke %%TIME%% saat.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woot: %%WOOT%%, meh: %%MEHS%%, nisbah (w\/m): %%RATIO%%.", + "website": "\/me Sila layari laman web kami: %%LINK%%", + "youtube": "\/me [%%NAME%%] Subscribe kami di youtube: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file diff --git a/lang/nl.json b/lang/nl.json index 4e6496ac..758ba0a6 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -13,8 +13,8 @@ "geeft je een gelukskoekje. Het luidt \"Vergeet je groentjes niet op te eten!\"", "gives you a fortune cookie. It reads \"Do you even lift?\"", "geeft je een gelukskoekje. Het luidt \"m808 pls\"", - "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", - "gives you a fortune cookie. It reads \"I love you.\"", + "geeft je een gelukskoekje. Het luidt \"Als je met je heupen schud, zul je al je vrouwtjes krijgen.\"", + "geeft je een gelukskoekje. Het luidt \"Ik hou van jou.\"", "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", "gives you an Oreo cookie with a glass of milk!", "gives you a rainbow cookie made with love :heart:", @@ -43,16 +43,15 @@ "Outlook good.", "Reken er niet op.", "Yes, in due time.", - "Mijn bronnen zeggen nee.", + "Definitely not.", "Zeker niet.", "Je zult moeten wachten.", "Ik heb mijn twijfels.", - "Outlook so so.", + "Looks good to me!", "Dat vind ik er goed uit zien.", "Wie weet?", "Ziet er goed uit!", "Waarschijnlijk.", - "Are you kidding?", "Don't bet on it.", "Forget about it." ], diff --git a/lang/pt-BR.json b/lang/pt-BR.json index 5bf10258..92728f40 100644 --- a/lang/pt-BR.json +++ b/lang/pt-BR.json @@ -21,40 +21,40 @@ "deu-lhe um biscoito que foi esquecido na chuva... e est\u00e1 mofado.", "te trouxe biscoitos fresquinhos... parecem deliciosos!" ], - "balls": { - "0": "Sinais apontam que sim.", - "1": "Sim.", - "2": "Tente novamente mais tarde.", - "3": "Sem d\u00favidas.", - "4": "Minhas fontes dizem que n\u00e3o.", - "5": "Ao meu ver, sim.", - "6": "Pode contar com isso.", - "7": "Concentre-se e pergunte novamente.", - "8": "Acho que n\u00e3o.", - "9": "Definitivamente.", - "10": "Melhor n\u00e3o te falar...", - "11": "\u00c9 duvidoso.", - "12": "Sim. Definitivamente!", - "13": "\u00c9 certo.", - "14": "N\u00e3o posso prever agora.", - "15": "Provavelmente.", - "16": "Pergunte-me depois.", - "17": "Minha resposta \u00e9 n\u00e3o.", - "18": "Parece bom.", - "19": "N\u00e3o conte com isso.", - "20": "Sim, em seu devido tempo.", - "22": "Definitivamente n\u00e3o.", - "23": "Voc\u00ea vai ter que esperar...", - "24": "Eu tenho minhas d\u00favidas.", - "25": "Um tanto...", - "26": "Parece bom para mim!", - "27": "Quem sabe?", - "28": "Claro!", - "29": "Provavelmente.", - "30": "Est\u00e1 brincando?", - "31": "N\u00e3o aposte nisso.", - "32": "Esque\u00e7a..." - }, + "balls": [ + "Sinais apontam que sim.", + "Sim.", + "Tente novamente mais tarde.", + "Sem d\u00favidas.", + "Minhas fontes dizem que n\u00e3o.", + "Ao meu ver, sim.", + "Pode contar com isso.", + "Concentre-se e pergunte novamente.", + "Acho que n\u00e3o.", + "Definitivamente.", + "Melhor n\u00e3o te falar...", + "\u00c9 duvidoso.", + "Sim. Definitivamente!", + "\u00c9 certo.", + "N\u00e3o posso prever agora.", + "Provavelmente.", + "Pergunte-me depois.", + "Minha resposta \u00e9 n\u00e3o.", + "Parece bom.", + "N\u00e3o conte com isso.", + "Sim, em seu devido tempo.", + "Definitely not.", + "Definitivamente n\u00e3o.", + "Voc\u00ea vai ter que esperar...", + "Eu tenho minhas d\u00favidas.", + "Um tanto...", + "Parece bom para mim!", + "Quem sabe?", + "Claro!", + "Provavelmente.", + "Est\u00e1 brincando?", + "N\u00e3o aposte nisso." + ], "nodatafound": "Dados anteriores n\u00e3o encontrados.", "currentlang": "\/me Idioma definido: %%LANGUAGE%%", "langerror": "\/me O idioma que voc\u00ea selecionou n\u00e3o est\u00e1 dispon\u00edvel. Por favor, visite %%LINK%% para encontrar uma lista de idiomas dispon\u00edveis.", diff --git a/lang/sr.json b/lang/sr.json index e3916676..e35527fb 100644 --- a/lang/sr.json +++ b/lang/sr.json @@ -43,7 +43,6 @@ "Outlook good.", "Don't count on it.", "Yes, in due time.", - "My sources say no.", "Definitely not.", "You will have to wait.", "I have my doubts.", diff --git a/lang/tr.json b/lang/tr.json index cc65f1a1..780fa196 100644 --- a/lang/tr.json +++ b/lang/tr.json @@ -43,7 +43,7 @@ "Outlook iyi.", "Bu say\u0131lmaz.", "Evet, dogru zamanda.", - "Benim kaynaklarim desteklemiyor.", + "Definitely not.", "Kesinlikle hay\u0131r.", "Beklemek zorundas\u0131n.", "\u015e\u00fcphelerim var.", @@ -53,8 +53,7 @@ "\u0130yi g\u00f6r\u00fcn\u00fcyor.", "Muhtemelen.", "Dalga m\u0131 ge\u00e7iyorsun ?", - "Bunun icin kumar oynamayin :)", - "Unut gitsin." + "Bunun icin kumar oynamayin :)" ], "nodatafound": "Veriler bulunamadi.", "currentlang": "\/me Suanki bot dili: %%LANGUAGE%%", diff --git a/lang/zh-TW.json b/lang/zh-TW.json index 0f8dbd4e..a26c5939 100644 --- a/lang/zh-TW.json +++ b/lang/zh-TW.json @@ -21,40 +21,40 @@ "\u7d66\u4f60\u4e00\u500b\u96e8\u5929\u88e1\u5269\u4e0b\u7684\u8001\u9905\u4e7e, \u5b83\u5df2\u7d93\u767c\u9709\u4e86.", "\u70d8\u7119\u4e86\u4e00\u500b\u65b0\u9bae\u9905\u4e7e\u7d66\u4f60, \u771f\u7684\u5f88\u82ac\u9999\u5594." ], - "balls": { - "0": "\u6a19\u8a8c\u9ede\u5230\u662f\u7684.", - "1": "\u662f\u7684.", - "2": "\u56de\u8986\u6726\u6727, \u8acb\u518d\u5617\u8a66.", - "3": "\u7121\u6240\u8cea\u7591.", - "4": "\u6211\u7684\u4f86\u6e90\u8aaa\u4e0d.", - "5": "\u5c31\u5982\u6211\u6240\u770b\u898b\u7684, \u662f.", - "6": "\u4f60\u6216\u6703\u4f9d\u8cf4\u8457\u5b83.", - "7": "\u96c6\u4e2d\u7cbe\u795e\u8207\u518d\u6b21\u767c\u554f.", - "8": "\u5916\u8868\u4e0d\u592a\u597d.", - "9": "\u90a3\u662f\u65b7\u7136\u5de6\u53f3.", - "10": "\u6700\u597d\u4e0d\u73fe\u5728\u544a\u8a34\u4f60.", - "11": "\u975e\u5e38\u61f7\u7591.", - "12": "\u662f - \u80af\u5b9a\u7684.", - "13": "\u9019\u662f\u80af\u5b9a\u7684.", - "14": "\u73fe\u5728\u7121\u6cd5\u9810\u6e2c.", - "15": "\u5f88\u6709\u53ef\u80fd\u7684.", - "16": "\u7a0d\u5f8c\u518d\u554f\u904e.", - "17": "\u6211\u7684\u56de\u8986\u662f\u4e0d.", - "18": "\u5916\u8868\u5f88\u597d.", - "19": "\u4e0d\u8981\u6307\u671b\u5b83.", - "20": "\u662f\u7684, \u5728\u9069\u7576\u7684\u6642\u5019.", - "22": "\u975e\u4e5f.", - "23": "\u4f60\u6703\u9700\u8981\u7b49\u5f85.", - "24": "\u6211\u6709\u6211\u7684\u61f7\u7591.", - "25": "\u5916\u8868\u666e\u901a.", - "26": "\u5728\u6211\u662f\u89ba\u5f97\u597d\u770b\u7684!", - "27": "\u8ab0\u77e5\u9053?", - "28": "\u5f88\u597d\u770b!", - "29": "\u4e5f\u8a31\u5427.", - "30": "\u4f60\u5728\u958b\u73a9\u7b11\u55ce?", - "31": "\u4e0d\u8981\u8ced\u4e86.", - "32": "\u5fd8\u4e86\u5b83\u5427." - }, + "balls": [ + "\u6a19\u8a8c\u9ede\u5230\u662f\u7684.", + "\u662f\u7684.", + "\u56de\u8986\u6726\u6727, \u8acb\u518d\u5617\u8a66.", + "\u7121\u6240\u8cea\u7591.", + "\u6211\u7684\u4f86\u6e90\u8aaa\u4e0d.", + "\u5c31\u5982\u6211\u6240\u770b\u898b\u7684, \u662f.", + "\u4f60\u6216\u6703\u4f9d\u8cf4\u8457\u5b83.", + "\u96c6\u4e2d\u7cbe\u795e\u8207\u518d\u6b21\u767c\u554f.", + "\u5916\u8868\u4e0d\u592a\u597d.", + "\u90a3\u662f\u65b7\u7136\u5de6\u53f3.", + "\u6700\u597d\u4e0d\u73fe\u5728\u544a\u8a34\u4f60.", + "\u975e\u5e38\u61f7\u7591.", + "\u662f - \u80af\u5b9a\u7684.", + "\u9019\u662f\u80af\u5b9a\u7684.", + "\u73fe\u5728\u7121\u6cd5\u9810\u6e2c.", + "\u5f88\u6709\u53ef\u80fd\u7684.", + "\u7a0d\u5f8c\u518d\u554f\u904e.", + "\u6211\u7684\u56de\u8986\u662f\u4e0d.", + "\u5916\u8868\u5f88\u597d.", + "\u4e0d\u8981\u6307\u671b\u5b83.", + "\u662f\u7684, \u5728\u9069\u7576\u7684\u6642\u5019.", + "Definitely not.", + "\u975e\u4e5f.", + "\u4f60\u6703\u9700\u8981\u7b49\u5f85.", + "\u6211\u6709\u6211\u7684\u61f7\u7591.", + "\u5916\u8868\u666e\u901a.", + "\u5728\u6211\u662f\u89ba\u5f97\u597d\u770b\u7684!", + "\u8ab0\u77e5\u9053?", + "\u5f88\u597d\u770b!", + "\u4e5f\u8a31\u5427.", + "\u4f60\u5728\u958b\u73a9\u7b11\u55ce?", + "\u4e0d\u8981\u8ced\u4e86." + ], "nodatafound": "\u6c92\u6709\u767c\u73fe\u4e4b\u524d\u7684\u6578\u64da.", "currentlang": "\/me \u76ee\u524d\u8a9e\u8a00\u8a2d\u7f6e\u70ba: %%LANGUAGE%%", "langerror": "\/me \u4f60\u6240\u9078\u64c7\u7684\u8a9e\u8a00\u4e0d\u53ef\u7528. \u8acb\u8a2a\u554f %%LINK%% \u4ee5\u67e5\u8a62\u5217\u8868\u88e1\u53ef\u7528\u7684\u8a9e\u8a00.", @@ -132,7 +132,7 @@ "voteskipexceededlimit": "\/me @%%NAME%%, \u4f60\u7684\u6b4c\u66f2\u5df2\u8d85\u904e\u6295\u7968\u8df3\u904e\u9650\u5236 (%%LIMIT%% \u8ca0\u8a55).", "voteskipinvalidlimit": "\/me [@%%NAME%%] \u7121\u6548\u6295\u7968\u8df3\u904e\u9650\u5236, \u8acb\u518d\u5617\u8a66\u4f7f\u7528\u4e00\u500b\u6578\u5b57\u4f86\u8c61\u5fb5\u8ca0\u8a55\u7684\u6578\u76ee.", "voteskipsetlimit": "\/me [@%%NAME%%] \u6295\u7968\u8df3\u904e\u9650\u5236\u8a2d\u7f6e\u70ba %%LIMIT%%.", - "activeusersintime": "\/me [@%%NAME%%] \u5df2\u6709 %%AMOUNT%% \u4f4d\u7528\u6236\u5728\u904e\u53bb %%TIME%% \u5206\u9418\u88e1\u804a\u5929.", + "activeusersintime": "\/me [@%%NAME%%] \u5df2\u6709 %%AMOUNT%% \u4f4d\u7528\u6236\u5728\u904e\u53bb\u7684 %%TIME%% \u5206\u9418\u88e1\u804a\u5929.", "maximumafktimeset": "\/me [@%%NAME%%] \u6700\u9ad8\u9650\u5236afk\u639b\u6a5f\u9577\u5ea6\u8a2d\u7f6e\u70ba %%TIME%% \u5206\u9418.", "afkstatusreset": "\/me [@%%NAME%%] \u91cd\u8a2d @%%USERNAME%% \u7684afk\u72c0\u614b.", "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% \u5df2\u7d93\u4e0d\u6d3b\u8e8d\u4e86 %%TIME%% \u5206\u9418.", From 867572e3d6236a46c81d9d765a69fcbfe6752b0e Mon Sep 17 00:00:00 2001 From: Nuvm Date: Fri, 24 Jul 2015 12:44:21 -0400 Subject: [PATCH 207/281] Swap command fixes - !swap now works with names with spaces - !swap now works with users outside the waitlist (Example, user1 is in spot 45 and user2 isn't in the waitlist, it will lock the waitlist, remove user1, add user2 and move to spot 45.) --- basicBot.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index 6341dcbe..083a6928 100644 --- a/basicBot.js +++ b/basicBot.js @@ -3206,17 +3206,29 @@ if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); var firstSpace = msg.indexOf(' '); var lastSpace = msg.lastIndexOf(' '); - var name1 = msg.substring(cmd.length + 2, lastSpace); - var name2 = msg.substring(lastSpace + 2); + var name1 = msg.split('@')[1].trim(); + var name2 = msg.split('@')[2].trim(); var user1 = basicBot.userUtilities.lookupUserName(name1); var user2 = basicBot.userUtilities.lookupUserName(name2); if (typeof user1 === 'boolean' || typeof user2 === 'boolean') return API.sendChat(subChat(basicBot.chat.swapinvalid, {name: chat.un})); if (user1.id === basicBot.loggedInID || user2.id === basicBot.loggedInID) return API.sendChat(subChat(basicBot.chat.addbottowaitlist, {name: chat.un})); var p1 = API.getWaitListPosition(user1.id) + 1; var p2 = API.getWaitListPosition(user2.id) + 1; - if (p1 < 0 || p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); + if (p1 < 0 && p2 < 0) return API.sendChat(subChat(basicBot.chat.swapwlonly, {name: chat.un})); API.sendChat(subChat(basicBot.chat.swapping, {'name1': name1, 'name2': name2})); - if (p1 < p2) { + if (p1 === -1){ + API.moderateRemoveDJ(user2.id); + setTimeout(function (user1, p2) { + basicBot.userUtilities.moveUser(user1.id, p2, true); + }, 2000, user1, p2); + } + else if (p2 === -1){ + API.moderateRemoveDJ(user1.id); + setTimeout(function (user2, p1) { + basicBot.userUtilities.moveUser(user2.id, p1, true); + }, 2000, user2, p1); + } + else if (p1 < p2) { basicBot.userUtilities.moveUser(user2.id, p1, false); setTimeout(function (user1, p2) { basicBot.userUtilities.moveUser(user1.id, p2, false); From b5636e5dbc5acecf663915efe30aa08f45b4a165 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 30 Jul 2015 19:42:53 +0100 Subject: [PATCH 208/281] Added Polish inclu. updates. --- lang/cs.json | 12 +-- lang/langIndex.json | 1 + lang/ms.json | 4 +- lang/pl.json | 206 ++++++++++++++++++++++++++++++++++++++++++++ lang/pt-BR.json | 6 +- lang/zh-TW.json | 8 +- 6 files changed, 222 insertions(+), 15 deletions(-) create mode 100644 lang/pl.json diff --git a/lang/cs.json b/lang/cs.json index 1ea0684a..a460b5f5 100644 --- a/lang/cs.json +++ b/lang/cs.json @@ -43,17 +43,17 @@ "Dobr\u00e1 vyhl\u00eddka.", "Na to nespol\u00e9hej.", "Ano, v prav\u00fd \u010das.", - "Definitely not.", - "Ur\u010dit\u011b ne.", + "Definitivn\u011b ne.", "Bude\u0161 muset po\u010dkat.", "M\u00e1m sv\u00e9 pochybnosti.", "Vyhl\u00eddky jsou nejasn\u00e9.", "Vypad\u00e1 to dob\u0159e podle m\u011b.", - "Kdo mysl\u00ed?", - "Vypad\u00e1 to dob\u0159e.", - "Pravd\u011bpodobn\u011b", + "Kdo v\u00ed...", + "Vypad\u00e1 to dob\u0159e!", + "Mo\u017en\u00e1.", "D\u011bl\u00e1\u0161 si srandu?", - "Nes\u00e1zej na to." + "Nes\u00e1zej na to.", + "Zapome\u0148 na to." ], "nodatafound": "Nebyla nalezena \u017e\u00e1dn\u00e1 p\u0159edchoz\u00ed data.", "currentlang": "\/me Aktu\u00e1ln\u00ed jazyk: %%LANGUAGE%%", diff --git a/lang/langIndex.json b/lang/langIndex.json index 2edc087e..0c5ee4f6 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -7,6 +7,7 @@ "latvian": "https://rawgit.com/Yemasthui/basicBot/master/lang/lv-LV.json", "malay": "https://rawgit.com/Yemasthui/basicBot/master/lang/ms.json", "dutch": "https://rawgit.com/Yemasthui/basicBot/master/lang/nl.json", + "polish": "https://rawgit.com/Yemasthui/basicBot/master/lang/pl.json", "portuguese": "https://rawgit.com/Yemasthui/basicBot/master/lang/pt-BR.json", "serbian": "https://rawgit.com/Yemasthui/basicBot/master/lang/sr.json", "turkish": "https://rawgit.com/Yemasthui/basicBot/master/lang/tr.json", diff --git a/lang/ms.json b/lang/ms.json index c405f61c..593cc53f 100644 --- a/lang/ms.json +++ b/lang/ms.json @@ -43,7 +43,6 @@ "Outlook baik.", "Jangan mengharapkan ia.", "Ya, dalam masa yang sewajarnya.", - "Definitely not.", "Sudah pasti tidak.", "Anda perlu menunggu.", "Saya mempunyai keraguan saya.", @@ -53,7 +52,8 @@ "Kelihatan baik!", "Mungkin.", "Adakah anda bergurau?", - "Jangan bertaruh di atasnya." + "Jangan bertaruh di atasnya.", + "Lupakan mengenainya." ], "nodatafound": "Tiada data sebelumnya dijumpai.", "currentlang": "\/me Bahasa semasa tetap pada: %%LANGUAGE%%", diff --git a/lang/pl.json b/lang/pl.json new file mode 100644 index 00000000..617734ef --- /dev/null +++ b/lang/pl.json @@ -0,0 +1,206 @@ +{ + "cookies": [ + "da\u0142 ci ciasteczko z kawa\u0142kami czekolady!", + "da\u0142 ci mi\u0119kkie owsiane ciasteczka domowej roboty!", + "da\u0142 ci zwyk\u0142e, stare, suche ciasteczko. By\u0142o ostatnie w woreczku.", + "daje Ci cukrowe ciastko. Co? Bez lukru i posypki??", + "daje Ci ciasteczko z kawa\u0142kami czekolady. Oh czekaj, to s\u0105 rodzynki. Bleee...", + "daje Ci ogromne ciastko. Zaczepia Ci\u0119 i wr\u0119cza Ci wi\u0119cej ciastek. Dziwne...", + "daje Ci ciastko z wr\u00f3\u017cb\u0105, kt\u00f3ra brzmi \"Dlaczego nie pracujesz nad \u017cadnym projektem?\"", + "daje Ci ciastko z wr\u00f3\u017cb\u0105, kt\u00f3ra brzmi \"Powiedz wa\u017cnej dla Ciebie osobie komplement\".", + "daje Ci ciastko z wr\u00f3\u017cb\u0105, kt\u00f3ra brzmi \"Podejmij ryzyko\".", + "daje Ci ciastko z wr\u00f3\u017cb\u0105, kt\u00f3ra brzmi \"Wyjd\u017a na zewn\u0105trz\".", + "daje Ci ciastko z wr\u00f3\u017cb\u0105, kt\u00f3ra brzmi \"Nie zapomnij zje\u015b\u0107 swoich warzyw\".", + "daje Ci ciastko z wr\u00f3\u017cb\u0105, kt\u00f3ra brzmi \"Do you even lift?\"", + "daje Ci ciastko z wr\u00f3\u017cb\u0105, kt\u00f3ra brzmi \"m808 pls\"", + "daje Ci ciastko z wr\u00f3\u017cb\u0105, kt\u00f3ra brzmi \"je\u015bli we\u017amiesz si\u0119 za siebie wszystkie laski b\u0119d\u0105 Twoje\".", + "daje Ci ciastko z wr\u00f3\u017cb\u0105, w kt\u00f3rej jest napisane \"kocham Ci\u0119\".", + "da\u0142 Ci z\u0142ote ciasteczko, nie mo\u017cna go je\u015b\u0107, bo jest ze z\u0142ota. Cholera!", + "daje Ci ciastko Oreo ze szklank\u0105 mleka!", + "daje Ci t\u0119czowe ciastko robione z mi\u0142o\u015bci\u0105 :hearth:", + "daje Ci stare zgni\u0142e ciastko kt\u00f3re zosta\u0142o zabrane z deszczu.", + "piecze dla Ciebie \u015bwie\u017ce ciastka, pachn\u0105 niesamowicie." + ], + "balls": [ + "Znaki wskazuj\u0105 na tak.", + "Tak.", + "Z\u0142a odpowied\u017a, spr\u00f3buj ponownie", + "Bez w\u0105tpienia.", + "Moje \u017ar\u00f3d\u0142a m\u00f3wi\u0105, \u017ce nie.", + "Moim zdaniem, tak.", + "Mo\u017cna na nim polega\u0107.", + "Pomy\u015bl i zapytaj ponownie.", + "To nie wygl\u0105da za dobrze", + "Zdecydowanie tak", + "Lepiej teraz nie m\u00f3w.", + "Bardzo w\u0105tpliwe.", + "Tak, definitywnie.", + "To jest pewne.", + "Nie mo\u017cna przewidzie\u0107 ju\u017c teraz.", + "Najprawdopodobniej.", + "Spytaj ponownie p\u00f3\u017aniej.", + "Moja odpowied\u017a to nie.", + "Wygl\u0105da dobrze.", + "Nie licz na to.", + "Tak, w odpowiednim czasie.", + "Definitywnie nie.", + "B\u0119dziesz musia\u0142 zaczeka\u0107.", + "Mam w\u0105tpliwo\u015bci.", + "Wygl\u0105da ca\u0142kiem ca\u0142kiem.", + "Dla mnie wygl\u0105da dobrze!", + "Kto wie?", + "Wygl\u0105da dobrze!", + "Mo\u017cliwe.", + "\u017bartujesz sobie?", + "Nie stawiaj na to.", + "Zapomnij o tym." + ], + "nodatafound": "Nie znaleziono poprzednich danych.", + "currentlang": "\/me J\u0119zyk aktualnie ustawiony na: %%LANGUAGE%%", + "langerror": "\/me J\u0119zyk kt\u00f3ry wybra\u0142e\u015b nie jest dost\u0119pny. Odwied\u017a %%LINK%% aby sprawdzi\u0107 list\u0119 dost\u0119pnych j\u0119zyk\u00f3w.", + "langset": "\/me J\u0119zyk aktualnie ustawiony na: %%LANGUAGE%%", + "retrievingdata": "Przywracanie wcze\u015bniej zapisanych danych.", + "datarestored": "Wcze\u015bniej zapisane dane odzyskane z powodzeniem.", + "greyuser": "Tylko bramkarze wzwy\u017c mog\u0119 uruchomi\u0107 bota.", + "bouncer": "Bot nie mo\u017ce przenosi\u0107 ludzi w kolejce gdy jest uruchomiony jako bramkarz.", + "online": "\/me %%BOTNAME%% v%%VERSION%% online!", + "welcome": "\/me Witaj %%NAME%%", + "welcomeback": "\/me Witaj ponownie, %%NAME%%", + "songknown": "\/me @%%NAME%%, utw\u00f3r jest w historii.", + "notavailable": "\/me @%%NAME%%, utw\u00f3r kt\u00f3ry chcia\u0142e\u015b zagra\u0107 nie by\u0142 dost\u0119pny.", + "timelimit": "\/me @%%NAME%%, tw\u00f3j utw\u00f3r jest d\u0142u\u017cszy ni\u017c %%MAXLENGTH%% minut\/y, you need permission to play longer songs.", + "permissionownsong": "\/me :up: @%%NAME%% posiada uprawnienia aby gra\u0107 swoje w\u0142asne produkcje", + "isblacklisted": "\/me Otw\u00f3r znajduje si\u0119 na %%BLACKLIST%% li\u015bcie. Pomijam...", + "isopen": "\/me Ruletka w\u0142\u0105czona! Wpisz !join aby do\u0142\u0105czy\u0107! (Wylosowana osoba zostanie przeniesiona na losowe miejsce w kolejce).", + "winnerpicked": "\/me Zwyci\u0119zca zosta\u0142 wybrany! @%%NAME%% przeniesionty na pozycj\u0119 %%POSITION%%.", + "ball": "\/me %%NAME%% zapyta\u0142: \"%%QUESTION%%\" i %%BOTNAME%% odpowiada: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% nie ghostuje.", + "ghosting": "[%%NAME1%%] %%NAME2%% albo ghostuje albo go nie ma.", + "alreadyadding": "\/me U\u017cytkownik zosta\u0142 ju\u017c dodany!Przesuni\u0119to do porz\u0105dnego miejsca %%POSITION%%.", + "adding": "\/me Dodano @%%NAME%% do kolejki. Aktualna kolejka: %%POSITION%%.", + "usernotfound": "\/me U\u017cytkownik nie zosta\u0142 znaleziony.", + "notdisconnected": "\/me @%%NAME%% nie roz\u0142\u0105czy\u0142 si\u0119 od kiedy tu jestem.", + "noposition": "\/me Ostatnia pozycja nie jest znana. Lista oczekiwania musia\u0142a by\u0107 zaktualizowana co najmniej raz od zarejestrowania ostatniej pozycji u\u017cytkownika.", + "toolongago": "\/me @%%NAME%%'s twoje ostanie roz\u0142\u0105czenie (DC lub wyj\u015bcie) by\u0142o zbyt dawno temu: %%TIME%%.", + "valid": "\/me @%%NAME%% roz\u0142\u0105czy\u0142 si\u0119 %%TIME%% temu i powinien by\u0107 na pozycji %%POSITION%%.", + "warning1": "\/me @%%NAME%%, jeste\u015b afk od %%TIME%%, prosz\u0119 odpowiedz w ci\u0105gu 2 minut albo zostaniesz usuni\u0119ty z listy oczekiwania.", + "warning2": "\/me @%%NAME%%, zostaniesz wkr\u00f3tce usuni\u0119ty z listy oczekiwania za bycie afk je\u015bli wkr\u00f3tce nie odpowiesz.", + "afkremove": "\/me @%%NAME%%, zosta\u0142e\u015b usuni\u0119ty z listy oczekiwania za bycie afk od %%TIME%%. By\u0142e\u015b na pozycji %%POSITION%%. Czatuj co najmniej raz na %%MAXIMUMAFK%% minut je\u015bli chcesz puszcza\u0107 piosenki.", + "caps": "\/me @%%NAME%%, wy\u0142\u0105cz capslocka.", + "askskip": "\/me @%%NAME%%, nie pytaj o skipy.", + "spam": "\/me @%%NAME%%, nie spamuj.", + "roomadvertising": "\/me @%%NAME%%, nie podawaj link\u00f3w do innych spo\u0142eczno\u015bci.", + "adfly": "\/me @%%NAME%%, zmie\u0144 sw\u00f3j program do autowoot\u00f3w. Polecamy PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] B\u0142\u0119dne tagi, spr\u00f3buj innych. [Tagi: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Randomowy GIF]", + "invalidgifrandom": "\/me [@%%NAME%%] B\u0142\u0119dne zapytanie, spr\u00f3buj ponownie.", + "invalidtime": "\/me [@%%NAME%%] B\u0142\u0119dnie okre\u015blony czas.", + "nouserspecified": "\/me [@%%NAME%%] Nie wybrano u\u017cytkownika.", + "invaliduserspecified": "\/me [@%%NAME%%] Nieprawid\u0142owy u\u017cytkownik.", + "nolistspecified": "\/me [@%%NAME%%] Nie wybrano listy.", + "invalidlistspecified": "\/me [@%%NAME%%] Wybrano nieprawid\u0142ow\u0105 list\u0119.", + "novaliduserspecified": "\/me [@%%NAME%%] Nie wybrano prawid\u0142owego u\u017cytkownika.", + "nolimitspecified": "\/me [@%%NAME%%] Nie okre\u015blono limitu.", + "invalidlimitspecified": "\/me [@%%NAME%%] Niepoprawny czas.", + "invalidpositionspecified": "\/me [@%%NAME%%] Wybrano nieprawid\u0142ow\u0105 pozycj\u0119.", + "whois": "\/me [%%NAME1%%] Nazwa u\u017cytkownika %%NAME2%%, ID: %%ID%%, Ranga: %%RANK%%, Do\u0142\u0105czy\u0142: %%JOINED%%, Level: %%LEVEL%%, J\u0119zyk: %%LANGUAGE%%, Avatar: %%AVATAR%%, Profil: %%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% w\u0142\u0105czony.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% wy\u0142\u0105czony.", + "cmddeletion": "komenda usuni\u0119ta", + "afkremoval": "Usuwanie AFK\u00f3w", + "afksremoved": "AFKer usuni\u0119ty", + "afklimit": "Limit bycia afk", + "autodisable": "autowy\u0142\u0105czanie", + "autoskip": "autopomijanie", + "newblacklisted": "\/me [@%%NAME%%] Utw\u00f3r znajduje si\u0119 na %%BLACKLIST%% li\u015bcie! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Czarna lista Info - autor: %%AUTHOR%%, tytu\u0142: %%TITLE%%, \u015brodek: %%SONGID%%", + "blacklist": "Czarna lista", + "cycleguard": "Stra\u017cnik cyklu", + "timeguard": "Stra\u017cnik czasu", + "chatfilter": "filtr czatu", + "historyskip": "Pomijanie utwor\u00f3w z historii", + "lockdown": "zablokowane", + "lockguard": "Stra\u017cnik blokady", + "usercommands": "Komendy u\u017cytkownik\u00f3w", + "motd": "Wiadomo\u015b\u0107 dnia", + "welcomemsg": "wiadomo\u015b\u0107 powitalna", + "songstats": "statystyki utworu", + "etarestriction": "ograniczenie eta", + "voteskip": "g\u0142os za pomini\u0119ciem", + "voteskiplimit": "\/me [@%%NAME%%] Limit g\u0142os\u00f3w za pomini\u0119ciem jest aktualnie ustawiony na %%LIMIT%% meh\u00f3w.", + "voteskipexceededlimit": "\/me @%%NAME%%, tw\u00f3j utw\u00f3r osi\u0105gn\u0105\u0142 limit g\u0142os\u00f3w za pomini\u0119ciem (%%LIMIT%% meh\u00f3w).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] B\u0142\u0119dny limit g\u0142os\u00f3w za pomini\u0119ciem, spr\u00f3buj ponownie u\u017cywaj\u0105c liczb kt\u00f3re maj\u0105 oznacza\u0107 ilo\u015b\u0107 meh\u00f3w.", + "voteskipsetlimit": "\/me [@%%NAME%%] Limit g\u0142os\u00f3w za pomini\u0119ciem ustawiony na %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] W ci\u0105gu ostatnich %%TIME%% minut, %%AMOUNT%% czatowa\u0142o.", + "maximumafktimeset": "\/me [@%%NAME%%] Maksymalny czas bycia afk ustawiony na %%TIME%% minut.", + "afkstatusreset": "\/me [@%%NAME%%] Zresetowa\u0142 czas bycia AFK u\u017cytkownika @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% jest nieaktywny od %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% jest d\u0142u\u017cej nieaktywny ni\u017c %%BOTNAME%% jest online.", + "autowoot": "\/me Zalecamy PlugCubed dla automatycznego wootowania utwor\u00f3w http:\/\/plugcubed.net\/", + "brandambassador": "\/me Ambasadorzy marki s\u0105 g\u0142osem przewodnim u\u017cytkownik\u00f3w plug.dj. Promuj\u0105 wydarzenia, anga\u017cuj\u0105 si\u0119 w spo\u0142eczno\u015bci i dziel\u0105 si\u0119 wiadomo\u015bciami o plug.dj na ca\u0142ym \u015bwiecie. Aby uzyska\u0107 wi\u0119cej informacji odwied\u017a: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Musisz by\u0107 co najmniej menad\u017cerem aby uruchomi\u0107 Bouncer+.", + "chatcleared": "\/me [@%%NAME%%] Wyczy\u015bci\u0142 czat.", + "deletechat": "\/me [@%%NAME%%] Wyczy\u015bci\u0142 czat z wiadomo\u015bci u\u017cytkownika %%USERNAME%%.", + "commandslink": "\/me %%BOTNAME%% komendy: %%LINK%%", + "eatcookie": "\/me zjada ciasteczko.", + "nousercookie": "\/em Nie widz\u0119 %%NAME%% w spo\u0142eczno\u015bci, wi\u0119c zjem jego ciastko.", + "selfcookie": "\/me @%%NAME%%, nie s\u0105dzisz \u017ce jeste\u015b troch\u0119 chciwy? Dawanie ciastek samemu sobie... Podziel si\u0119 troch\u0119 z innymi!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] Stra\u017cnik cyklu jest ustawiony na %%TIME%% minut.", + "dclookuprank": "\/me [@%%NAME%%] Tylko bramkarze wzwy\u017c mog\u0105 u\u017cy\u0107 komendy dc dla innych.", + "emojilist": "\/me Lista emotikon: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, nie jeste\u015b na li\u015bcie oczekiwania.", + "youarenext": "\/me @%%NAME%%, b\u0119dziesz DJem po tym utworze.", + "youaredj": "\/me @%%NAME%%, w\u0142a\u015bnie jeste\u015b DJem.", + "eta": "\/me @%%NAME%%, jeste\u015b %%POSITION%% na li\u015bcie oczekiwania i zostaniesz DJem za oko\u0142o %%TIME%%.", + "facebook": "\/me Polub nas na facebooku: %%LINK%%", + "starterhelp": "\/me Ten obrazek pomo\u017ce Ci zacz\u0105\u0107 na plugu: %%LINK%%", + "roulettejoin": "@%%NAME%% do\u0142\u0105czy\u0142 do ruletki! (Wpisz !leave je\u017celi chcesz zrezygnowa\u0107).", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% jest w spo\u0142eczno\u015bci %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] nie mo\u017cesz u\u017cy\u0107 opcji \"kick\" na u\u017cytkowniku z t\u0105 sam\u0105 lub wy\u017csz\u0105 rang\u0105 ni\u017c ty.", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% zosta\u0142e\u015b wyrzucony z spo\u0142eczno\u015bci na %%TIME%% minut.", + "kill": "\/ Me Wy\u0142\u0105czanie.", + "logout": "\/me [@%%NAME%%] Wylogowa\u0142 %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% wyszed\u0142 z ruletki!", + "songlink": "\/me [@%%NAME%%] Link do aktualnej piosenki: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% u\u017cy\u0142 lockskip]", + "usedskip": "\/me [%%NAME%% pomin\u0105\u0142]", + "skippos": "\/me [@%%NAME%%] DJe b\u0119d\u0105 teraz po pomini\u0119ciu przesuwani na pozycj\u0119 %%POSITION%%.", + "lockguardtime": "\/me [@%%NAME%%] The stra\u017cnik blokady jest ustawiony %%TIME%% minut.", + "maxlengthtime": "\/me [@%%NAME%%] Maksymalny czas trawania utworu ustawiony na %%TIME%% minut.", + "motdset": "\/me Wiadomo\u015b\u0107 dnia ustawiono na: %%MSG%%", + "motdintervalset": "\/me Wiadomo\u015b\u0107 dnia b\u0119dzie powtarzana co %%INTERVAL%%.", + "currentbotname": "\/me Nazwa bota aktualnie ustawiona na: %%BOTNAME%%", + "botnameset": "\/me Nazwa bota aktualnie ustawiona na: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, prosz\u0119, nie pr\u00f3buj dodawa\u0107 mnie do listy oczekiwania.", + "move": "\/me [%%NAME%% przesun\u0105\u0142 w kolejce]", + "mutednotime": "\/me [@%%NAME%%] Wyciszy\u0142 @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Mo\u017cesz zmutowa\u0107 na maksymalnie %%TIME%% minut.", + "mutedtime": "\/me [@%%NAME%%] Zmutowa\u0142 @%%USERNAME%% na %%TIME%% minut.", + "unmuted": "\/me [@%%NAME%%] Odmutowa\u0142 @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] Nie mo\u017cesz zmutowa\u0107 osoby z tak\u0105 sam\u0105 lub wy\u017csz\u0105 rang\u0105 od Ciebie.", + "oplist": "\/me Lista OP: %%LINK%%", + "pong": "\/me Pong!", + "reload": "\/me Zaraz wracam.", + "removenotinwl": "\/me [@%%NAME%%] Wybrany u\u017cytkownik @%%USERNAME%% nie jest na li\u015bcie oczekiwania.", + "roomrules": "\/me Zasady: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Wszystkie wooty: %%WOOTS%%, wszystkie mehy: %%MEHS%%, wszystkie graby: %%GRABS%%.", + "forceskip": "\/me [%%NAME%% u\u017cy\u0142 forceskip]", + "madeby": "\/me Bot zosta\u0142 stworzony przez %%NAME%%.", + "activefor": "Jestem aktywny od %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Wybrano b\u0142\u0119dnego u\u017cytkownika.", + "swapwlonly": "\/me [@%%NAME%%] Mo\u017cesz zamieni\u0107 tylko 2 u\u017cytkownik\u00f3w znajduj\u0105cych si\u0119 na li\u015bcie oczekiwania.", + "swapping": "\/me Zamieniam %%NAME1%% z %%NAME2%%.", + "genres": "\/me Lista dopuszczalnych gatunk\u00f3w muzycznych %%LINK%%", + "notbanned": "\/me [@%%NAME%%] U\u017cytkownik nie by\u0142 zbanowany.", + "unmutedeveryone": "\/me [@%%NAME%%] Odmutowa\u0142 wszystkich.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Tylko menad\u017cerowie wzwy\u017c mog\u0105 odmutowa\u0107 wszystkich naraz.", + "notmuted": "\/me [@%%NAME%%] ten u\u017cytkownik nie by\u0142 zmutowany.", + "unmuterank": "\/me [@%%NAME%%] Nie mo\u017cesz odmutowa\u0107 os\u00f3b z tak\u0105 sam\u0105 lub wy\u017csz\u0105 rang\u0105 ni\u017c twoja.", + "commandscd": "\/me [@%%NAME%%] Czas odnowienia komend u\u017cytkownik\u00f3w jest teraz ustawiony na %%TIME%% sekund.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ wooty: %%WOOT%%, mehy: %%MEHS%%, \u015brednia (w\/m): %%RATIO%%.", + "website": "\/me Zapraszamy do odwiedzenia naszej strony internetowej: %%LINK%%", + "youtube": "\/me [%%NAME%%] Subskrybuj nas na youtube: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." +} \ No newline at end of file diff --git a/lang/pt-BR.json b/lang/pt-BR.json index 92728f40..16e35bb2 100644 --- a/lang/pt-BR.json +++ b/lang/pt-BR.json @@ -43,9 +43,8 @@ "Parece bom.", "N\u00e3o conte com isso.", "Sim, em seu devido tempo.", - "Definitely not.", "Definitivamente n\u00e3o.", - "Voc\u00ea vai ter que esperar...", + "Voc\u00ea ter\u00e1 que esperar.", "Eu tenho minhas d\u00favidas.", "Um tanto...", "Parece bom para mim!", @@ -53,7 +52,8 @@ "Claro!", "Provavelmente.", "Est\u00e1 brincando?", - "N\u00e3o aposte nisso." + "N\u00e3o aposte nisso.", + "Esque\u00e7a isso." ], "nodatafound": "Dados anteriores n\u00e3o encontrados.", "currentlang": "\/me Idioma definido: %%LANGUAGE%%", diff --git a/lang/zh-TW.json b/lang/zh-TW.json index a26c5939..a5f28769 100644 --- a/lang/zh-TW.json +++ b/lang/zh-TW.json @@ -43,9 +43,8 @@ "\u5916\u8868\u5f88\u597d.", "\u4e0d\u8981\u6307\u671b\u5b83.", "\u662f\u7684, \u5728\u9069\u7576\u7684\u6642\u5019.", - "Definitely not.", - "\u975e\u4e5f.", - "\u4f60\u6703\u9700\u8981\u7b49\u5f85.", + "\u7576\u7136\u4e0d\u662f.", + "\u4f60\u9700\u8981\u7b49\u5f85.", "\u6211\u6709\u6211\u7684\u61f7\u7591.", "\u5916\u8868\u666e\u901a.", "\u5728\u6211\u662f\u89ba\u5f97\u597d\u770b\u7684!", @@ -53,7 +52,8 @@ "\u5f88\u597d\u770b!", "\u4e5f\u8a31\u5427.", "\u4f60\u5728\u958b\u73a9\u7b11\u55ce?", - "\u4e0d\u8981\u8ced\u4e86." + "\u4e0d\u8981\u8ced\u4e86.", + "\u5fd8\u4e86\u5b83\u5427." ], "nodatafound": "\u6c92\u6709\u767c\u73fe\u4e4b\u524d\u7684\u6578\u64da.", "currentlang": "\/me \u76ee\u524d\u8a9e\u8a00\u8a2d\u7f6e\u70ba: %%LANGUAGE%%", From 83d087ebee9f77221f4e171ff7db069fe95ccc5e Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 3 Aug 2015 01:53:56 +0100 Subject: [PATCH 209/281] Added scriptLink in bot settings. --- basicBot.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 6341dcbe..3e7a949b 100644 --- a/basicBot.js +++ b/basicBot.js @@ -236,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.8.10", + version: "2.8.11", status: false, name: "basicBot", loggedInID: null, @@ -251,6 +251,7 @@ botName: "basicBot", language: "english", chatLink: "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", + scriptLink: "https://rawgit.com/Yemasthui/basicBot/master/basicBot.js", roomLock: false, // Requires an extension to re-load the script startupCap: 1, // 1-200 startupVolume: 0, // 0-100 @@ -2878,7 +2879,7 @@ basicBot.disconnectAPI(); kill(); setTimeout(function () { - $.getScript(basicBot.scriptLink); + $.getScript(basicBot.settings.scriptLink); }, 2000); } } From 00614593173bec8d68a32f15397b59e67a8f21ee Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 17 Aug 2015 02:56:53 +0100 Subject: [PATCH 210/281] Fix to prevent bouncers from banning each other --- basicBot.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 3e7a949b..c18f5bbf 100644 --- a/basicBot.js +++ b/basicBot.js @@ -236,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.8.11", + version: "2.8.12", status: false, name: "basicBot", loggedInID: null, @@ -1746,6 +1746,9 @@ var name = msg.substr(cmd.length + 2); var user = basicBot.userUtilities.lookupUserName(name); if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + var permUser = basicBot.userUtilities.getPermission(user.id); + if (permUser >= permFrom) return void(0); API.moderateBanUser(user.id, 1, API.BAN.DAY); } } @@ -2485,7 +2488,7 @@ if (dj === chat.uid) isDj = true; if (perm >= 1 || isDj) { if (media.format === 1) { - var linkToSong = "http://youtu.be/" + media.cid; + var linkToSong = "https://youtu.be/" + media.cid; API.sendChat(subChat(basicBot.chat.songlink, {name: from, link: linkToSong})); } if (media.format === 2) { From 6cc0e3a0178b7ab1fbc481f7dfb154cbb35440be Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 19 Aug 2015 06:56:51 +0100 Subject: [PATCH 211/281] !deletechat is back --- basicBot.js | 41 ++++++++++++++++++++++++++++++++++++++--- commands.md | 2 +- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index c18f5bbf..72043b88 100644 --- a/basicBot.js +++ b/basicBot.js @@ -236,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.8.12", + version: "2.8.13", status: false, name: "basicBot", loggedInID: null, @@ -314,6 +314,7 @@ }, room: { name: null, + chatMessages: [], users: [], afkList: [], mutedUsers: [], @@ -830,6 +831,9 @@ chat.message = linkFixer(chat.message); chat.message = decodeEntities(chat.message); chat.message = chat.message.trim(); + + basicBot.room.chatMessages.push([chat.cid, chat.message, chat.sub, chat.timestamp, chat.type, chat.uid, chat.un]); + for (var i = 0; i < basicBot.room.users.length; i++) { if (basicBot.room.users[i].id === chat.uid) { basicBot.userUtilities.setLastActivity(basicBot.room.users[i]); @@ -2024,7 +2028,11 @@ } }, - /*deletechatCommand: { + /* + + // This does not work anymore. + + deletechatCommand: { command: 'deletechat', rank: 'mod', type: 'startsWith', @@ -2066,7 +2074,34 @@ API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); } } - },*/ + }, + + */ + + deletechatCommand: { + command: 'deletechat', + rank: 'mod', + type: 'startsWith', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + var msg = chat.message; + if (msg.length === cmd.length) return API.sendChat(subChat(basicBot.chat.nouserspecified, {name: chat.un})); + var name = msg.substring(cmd.length + 2); + var user = basicBot.userUtilities.lookupUserName(name); + if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); + for (var i = 1; i < basicBot.room.chatMessages.length; i++) { + if (basicBot.room.chatMessages[i].indexOf(user.id) > -1){ + API.moderateDeleteChat(basicBot.room.chatMessages[i][0]); + basicBot.room.chatMessages[i].splice(0); + } + } + API.sendChat(subChat(basicBot.chat.deletechat, {name: chat.un, username: name})); + } + } + }, + emojiCommand: { command: 'emoji', diff --git a/commands.md b/commands.md index 89ba957b..feaa8fd2 100644 --- a/commands.md +++ b/commands.md @@ -34,7 +34,7 @@ Bouncer+ |!add | @user | add user to the waitlist | |!afkremoval | | toggles the afk check | |!autoskip | | skips songs automatically when they're done (use when the circles-bug happens) | -|~~!deletechat~~ | ~~@user~~ | ~~delete all the chats by a certain user~~ | +|!deletechat | @user | delete all the chats by a certain user | |!lock | | lock the waitlist | |!lockdown | | lock down the room: only staff can chat | |!move | @user (X) | moves user to position X on the waitlist, default is position 1 | From a93cef689020c9a89b68f84e6be3d6ca5a5adc8d Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 19 Aug 2015 07:49:29 +0100 Subject: [PATCH 212/281] This should prevent variable reference errors. --- basicBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 72043b88..32329602 100644 --- a/basicBot.js +++ b/basicBot.js @@ -210,7 +210,7 @@ return this.substring(0, str.length) === str; }; - var linkFixer = function (msg) { + function linkFixer(msg) { var parts = msg.splitBetween(' Date: Wed, 19 Aug 2015 22:54:23 +0100 Subject: [PATCH 213/281] Updated language files --- lang/cs.json | 8 ++++---- lang/es-ES.json | 4 ++-- lang/pl.json | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lang/cs.json b/lang/cs.json index a460b5f5..93d871bf 100644 --- a/lang/cs.json +++ b/lang/cs.json @@ -34,7 +34,7 @@ "Rozhodn\u011b je to tak.", "Rad\u011bji ti to ne\u0159eknu hned.", "Velmi pochybn\u00e9.", - "Ano - ur\u010dit\u011b.", + "\u00c1no - ur\u010dit\u011b.", "To je jist\u00e9.", "To te\u010f nelze p\u0159edv\u00eddat.", "Pravd\u011bpodobn\u011b.", @@ -139,13 +139,13 @@ "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% je neaktivn\u00ed d\u00e9le ne\u017e je %%BOTNAME%% spu\u0161t\u011bn.", "autowoot": "\/me Doporu\u010dujeme PlugCubed pro automatick\u00fd woot: http:\/\/plugcubed.net\/", "brandambassador": "\/me Brand Ambassador je hlas u\u017eivatel\u016f plug.dj. Podporuj\u00ed akce, pom\u00e1haj\u00ed komunit\u00e1m, sd\u00edlej\u00ed plug.dj vzkaz po cel\u00e9m sv\u011bt\u011b. Pro v\u00edce informac\u00ed: https:\/\/plug.dj\/ba.", - "bouncerplusrank": "\/me [@%%NAME%%] Mus\u00ed\u0161 b\u00fdt mana\u017eer a nebo mus\u00ed b\u00fdt povolen Vyhazova\u010d+.", + "bouncerplusrank": "\/me [@%%NAME%%] Mus\u00ed\u0161 b\u00fdt mana\u017eer a nebo mus\u00ed b\u00fdt povolen Bouncer+.", "chatcleared": "\/me [@%%NAME%%] Vy\u010distil\/a chat.", "deletechat": "\/me [@%%NAME%%] Vy\u010distil\/a chat od %%USERNAME%%.", "commandslink": "\/me %%BOTNAME%% p\u0159\u00edkazy: %%LINK%%", "eatcookie": "\/me J\u00edst su\u0161enky.", "nousercookie": "\/em nevid\u00edm u\u017eivatele %%NAME%% v m\u00edstnosti, nem\u016f\u017ee\u0161 s n\u00edm j\u00edst su\u0161enky.", - "selfcookie": "\/me @%%NAME%%, nejsi trochu chamtiv\u00fd? D\u00e1vat su\u0161enky sob\u011b. Heh. Rozd\u011bl se s ostatn\u00edmi!", + "selfcookie": "\/me @%%NAME%%, nejsi trochu chamtiv\u00fd\/\u00e1? D\u00e1vat su\u0161enky sob\u011b. Heh. Rozd\u011bl se s ostatn\u00edmi!", "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] Cycleguard je nastaven na %%TIME%% minut).", "dclookuprank": "\/me [@%%NAME%%] Pouze vyhazova\u010d a vy\u0161\u0161\u00ed m\u016f\u017ee pou\u017e\u00edvat lookup pro ostatn\u00ed.", @@ -156,7 +156,7 @@ "eta": "\/me @%%NAME%%, jsi na pozici %%POSITION%% ve front\u011b a bude\u0161 na \u0159ad\u011b p\u0159ibli\u017en\u011b za %%TIME%%.", "facebook": "\/me Likni n\u00e1s na facebooku: %%LINK%%", "starterhelp": "\/me Tenhle obr\u00e1zek ti pom\u016f\u017ee za\u010d\u00edt na plugu: %%LINK%%", - "roulettejoin": "@%%NAME%% se p\u0159ihl\u00e1sil do rulety! (!leave pokud ji chce\u0161 opustit)", + "roulettejoin": "\/me @%%NAME%% se p\u0159ihl\u00e1sil\/a do rulety! (!leave pokud ji chce\u0161 opustit)", "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% je v m\u00edstnosti po dobu %%TIME%%.", "kickrank": "\/me [@%%NAME%%] nem\u016f\u017ee\u0161 pou\u017e\u00edt kick na u\u017eivatele se stejnou nebo vy\u0161\u0161\u00ed hodnost\u00ed!", "kick": "\/me [@%%NAME%%], @%%USERNAME%% you are being kicked from the community for %%TIME%% minutes.", diff --git a/lang/es-ES.json b/lang/es-ES.json index c5ec10eb..74f27810 100644 --- a/lang/es-ES.json +++ b/lang/es-ES.json @@ -44,7 +44,6 @@ "No cuentes con ello.", "Si, en su debido tiempo.", "Definitely not.", - "Definitivamente no.", "Tendras que esperar.", "Tengo mis dudas.", "Se ve normal.", @@ -53,7 +52,8 @@ "\u00a1Pinta bien!", "Probablemente.", "\u00bfEstas bromeando?", - "No apuestes en ello." + "No apuestes en ello.", + "Olvidalo..." ], "nodatafound": "No se ha encontrado datos anteriores.", "currentlang": "\/me Idioma actualmente puesto en %%LANGUAGE%%", diff --git a/lang/pl.json b/lang/pl.json index 617734ef..c9310e19 100644 --- a/lang/pl.json +++ b/lang/pl.json @@ -68,9 +68,9 @@ "welcomeback": "\/me Witaj ponownie, %%NAME%%", "songknown": "\/me @%%NAME%%, utw\u00f3r jest w historii.", "notavailable": "\/me @%%NAME%%, utw\u00f3r kt\u00f3ry chcia\u0142e\u015b zagra\u0107 nie by\u0142 dost\u0119pny.", - "timelimit": "\/me @%%NAME%%, tw\u00f3j utw\u00f3r jest d\u0142u\u017cszy ni\u017c %%MAXLENGTH%% minut\/y, you need permission to play longer songs.", + "timelimit": "\/me @%%NAME%%, tw\u00f3j utw\u00f3r jest d\u0142u\u017cszy ni\u017c %%MAXLENGTH%% minut\/y, potrzebujesz zgody na puszczanie d\u0142u\u017cszych piosenek.", "permissionownsong": "\/me :up: @%%NAME%% posiada uprawnienia aby gra\u0107 swoje w\u0142asne produkcje", - "isblacklisted": "\/me Otw\u00f3r znajduje si\u0119 na %%BLACKLIST%% li\u015bcie. Pomijam...", + "isblacklisted": "\/me Utw\u00f3r znajduje si\u0119 na %%BLACKLIST%% li\u015bcie. Pomijam...", "isopen": "\/me Ruletka w\u0142\u0105czona! Wpisz !join aby do\u0142\u0105czy\u0107! (Wylosowana osoba zostanie przeniesiona na losowe miejsce w kolejce).", "winnerpicked": "\/me Zwyci\u0119zca zosta\u0142 wybrany! @%%NAME%% przeniesionty na pozycj\u0119 %%POSITION%%.", "ball": "\/me %%NAME%% zapyta\u0142: \"%%QUESTION%%\" i %%BOTNAME%% odpowiada: \"%%RESPONSE%%\"", @@ -91,7 +91,7 @@ "spam": "\/me @%%NAME%%, nie spamuj.", "roomadvertising": "\/me @%%NAME%%, nie podawaj link\u00f3w do innych spo\u0142eczno\u015bci.", "adfly": "\/me @%%NAME%%, zmie\u0144 sw\u00f3j program do autowoot\u00f3w. Polecamy PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tagi: %%TAGS%%]", "invalidgiftags": "\/me [@%%NAME%%] B\u0142\u0119dne tagi, spr\u00f3buj innych. [Tagi: %%TAGS%%]", "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Randomowy GIF]", "invalidgifrandom": "\/me [@%%NAME%%] B\u0142\u0119dne zapytanie, spr\u00f3buj ponownie.", @@ -160,7 +160,7 @@ "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% jest w spo\u0142eczno\u015bci %%TIME%%.", "kickrank": "\/me [@%%NAME%%] nie mo\u017cesz u\u017cy\u0107 opcji \"kick\" na u\u017cytkowniku z t\u0105 sam\u0105 lub wy\u017csz\u0105 rang\u0105 ni\u017c ty.", "kick": "\/me [@%%NAME%%], @%%USERNAME%% zosta\u0142e\u015b wyrzucony z spo\u0142eczno\u015bci na %%TIME%% minut.", - "kill": "\/ Me Wy\u0142\u0105czanie.", + "kill": "\/me Wy\u0142\u0105czanie.", "logout": "\/me [@%%NAME%%] Wylogowa\u0142 %%BOTNAME%%", "rouletteleave": "\/me @%%NAME%% wyszed\u0142 z ruletki!", "songlink": "\/me [@%%NAME%%] Link do aktualnej piosenki: %%LINK%%", From 37e4d119c04c4b41699f202c76c800cf19f404c8 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 20 Aug 2015 00:06:40 +0100 Subject: [PATCH 214/281] Updated README --- README.md | 62 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index f7897ad8..0a00ef10 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,29 @@ -basicBot -======== +# basicBot (source) +> A not so basic bot for plug.dj -A not so basic bot for plug.dj +--- -[Get the Chrome Extension](https://chrome.google.com/webstore/detail/basicbot/bjinmbkeneigmkkkpcmcokphbjkepeie) ---------------------------------------------------------------------- +[CLICK HERE TO CUSTOMISE BASICBOT!](https://github.com/Yemasthui/basicBot-customization) +- -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Yemasthui/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](http://i.benzi.io/97dW.svg)](https://facebook.com/groups/basicBot) [![twitter](http://i.benzi.io/4KEn.svg)](https://twitter.com/bscBt) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Yemasthui/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) -Stay updated on **basicBot**'s development by following the project on Twitter [@bscBt](http://twitter.com/bscBt) +Email enquiries: [bnz.mngn [at] gmail [dot] com](mailto:bnz.mngn@gmail.com) -Created by [Yemasthui](https://github.com/Yemasthui) but now maintained by [Benzi](https://github.com/Benzi). +--- -(You can email me via [bnz.mngn@gmail.com](mailto:bnz.mngn@gmail.com) or send me a message on [Gitter](https://gitter.im/Benzi) if you have any queries about the bot) +Developers +------------- -!!!TO CUSTOMIZE: USE [THIS REPOSITORY](https://github.com/Yemasthui/basicBot-customization)!!! -============================================================================================== +__Current:__ + - [Benzi]() __(Maintainer)__ -IMPORTANT ---------- +__Past:__ + - [Yemasthui]() __(Creator)__ -__basicBot has been updated to work under plug's update. There may still be bugs and functionality is not guaranteed.__ +###__IMPORTANT__ + +__basicBot has been updated to work under plug's major update. There may still be bugs and functionality is not guaranteed.__ __Make sure to update your bookmark, as the link has changed recently!!!__ @@ -36,7 +39,7 @@ This is NOT needed to run the bot as it is provided, only if you want to add fun - __There is now support for custom chat messages. This means you can use your own custom wording or translate it into your own language.__ Usage ------ +------- Bookmark the following code. To run the bot, run the bookmark. @@ -44,29 +47,35 @@ Bookmark the following code. To run the bot, run the bookmark. If this does not work, go to https://raw.githubusercontent.com/Yemasthui/basicBot/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing f12) when on plug.dj in your community. -###Commands### +### Commands These can be found in [the commands file](https://github.com/Yemasthui/basicBot/blob/master/commands.md). -###Blacklists### +### Blacklists Examples of blacklists can be found in [the customization repository](https://github.com/Yemasthui/basicBot-customization/tree/master/blacklists). You can add blacklists in the settings of the bot via the methods given in that same repository. See below for more information. -###Extending functionality and custom default settings### +### Extending functionality and custom default settings basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/Yemasthui/basicBot-customization) for more info. Please do not try to if you are not confident in your javascript capabilities. -###Translations### +### Translations Official translations will be supported. Available ones can be found under [the language folder](https://github.com/Yemasthui/basicBot/blob/master/lang/langIndex.json). You can set a language in the room settings. You can use your own translation or wording by translating the values of in [the English pack](https://github.com/Yemasthui/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. __When translating the chat messages, please note that it is a json format, meaning it is structured as ```"key":"value"```, please only translate the "value" parts, and leave anything between %% (eg. %%NAME%%) as is, they are variables that get filled in by the bot.__ +Useful Tools +--------------- + +### basicBot Chrome Extension -###Command Autocomplete Plugin### +- [Get the Official basicBot Chrome Extension](https://chrome.google.com/webstore/detail/basicbot/bjinmbkeneigmkkkpcmcokphbjkepeie) + +### Command Autocomplete Plugin [![Command Autocomplete](http://i.imgur.com/hBMuB5F.png)](https://github.com/ExtPlug/advanced-autocomplete) @@ -74,7 +83,7 @@ Check out [this](https://github.com/ExtPlug/advanced-autocomplete) helpful comma Credits -------- +-------- I would like to thank the following people: @@ -87,23 +96,22 @@ I would like to thank the following people: |Portuguese|[Motel Bible](https://github.com/motelbible)| |French|[NDA](https://github.com/NDAthereal)| -(I would also like to thank everyone who contributed in translating the bot via the [translation centre](http://translate.benzi.io/admin/collaborators)) +__I would also like to thank everyone who contributed in translating the bot via the [translation centre](http://translate.benzi.io/admin/collaborators)__ -Copyright ---------- +### Copyright -Copyright © 2014 Yemasthui +Copyright © 2014-2015 Yemasthui Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. Disclaimer ----------- +------------ This bot is developed independently. Changes may be made without notice. There is no guarantee for the bot to be functioning perfectly. -Plug.dj admins have the right to request changes. +plug.dj admins have the right to request changes. By using this chatbot you agree to not use it for violating plug.dj's Terms of Service. You also agree not to alter the bot's code, unless in the cases explicitly stated above, for personal use, or for the sole purpose of submitting a pull request with a bug fix or a feature update, at which point it will be looked at and decided by the authors of the project. Please refer to the original author/repository at all times, even on personal forks that are not private. From 1a2bf0f759fa093381323a63eee6ac8eea41eea4 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 20 Aug 2015 00:11:38 +0100 Subject: [PATCH 215/281] Updated README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0a00ef10..3cb24a7c 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@ Developers ------------- __Current:__ - - [Benzi]() __(Maintainer)__ + - [Benzi](https://github.com/Benzi) __(Maintainer)__ __Past:__ - - [Yemasthui]() __(Creator)__ + - [Yemasthui](https://github.com/Yemasthui) __(Creator)__ ###__IMPORTANT__ From 520fe9c1b69d0a4e0543fb5d615156b55f574b12 Mon Sep 17 00:00:00 2001 From: Benzi Date: Mon, 31 Aug 2015 21:29:45 +0100 Subject: [PATCH 216/281] Roulette is back! --- basicBot.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/basicBot.js b/basicBot.js index 32329602..5adfc11a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -236,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.8.13", + version: "2.8.14", status: false, name: "basicBot", loggedInID: null, @@ -360,8 +360,8 @@ }, newBlacklisted: [], - newBlacklistedSongFunction: null - /*roulette: { + newBlacklistedSongFunction: null, + roulette: { rouletteStatus: false, participants: [], countdown: null, @@ -385,7 +385,7 @@ basicBot.userUtilities.moveUser(winner, pos, false); }, 1 * 1000, winner, pos); } - }*/ + } }, User: function (id, name) { this.id = id; @@ -1190,7 +1190,7 @@ return true; } - /*var rlJoinChat = basicBot.chat.roulettejoin; + var rlJoinChat = basicBot.chat.roulettejoin; var rlLeaveChat = basicBot.chat.rouletteleave; var joinedroulette = rlJoinChat.split('%%NAME%%'); @@ -1206,7 +1206,7 @@ API.moderateDeleteChat(id); }, 5 * 1000, chat.cid); return true; - }*/ + } return false; }, commandCheck: function (chat) { @@ -2360,7 +2360,7 @@ } }, - /*joinCommand: { + joinCommand: { command: 'join', rank: 'user', type: 'exact', @@ -2374,7 +2374,7 @@ } } } - },*/ + }, jointimeCommand: { command: 'jointime', @@ -2489,7 +2489,7 @@ } }, - /*leaveCommand: { + leaveCommand: { command: 'leave', rank: 'user', type: 'exact', @@ -2504,7 +2504,7 @@ } } } - },*/ + }, linkCommand: { command: 'link', @@ -2974,7 +2974,7 @@ } }, - /*rouletteCommand: { + rouletteCommand: { command: 'roulette', rank: 'mod', type: 'exact', @@ -2987,7 +2987,7 @@ } } } - },*/ + }, rulesCommand: { command: 'rules', From 1a3fb9d1873cac67cb065a65adec64c8a7d2f8b9 Mon Sep 17 00:00:00 2001 From: "Sam Mills (Henchman)" Date: Wed, 2 Sep 2015 13:50:40 +0200 Subject: [PATCH 217/281] Update README.md --- README.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 3cb24a7c..277acd19 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ --- -[CLICK HERE TO CUSTOMISE BASICBOT!](https://github.com/Yemasthui/basicBot-customization) +[CLICK HERE TO CUSTOMISE BASICBOT!](https://github.com/basicTeam/basicBot-customization) - -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Yemasthui/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/basicTeam/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) Email enquiries: [bnz.mngn [at] gmail [dot] com](mailto:bnz.mngn@gmail.com) @@ -14,12 +14,8 @@ Email enquiries: [bnz.mngn [at] gmail [dot] com](mailto:bnz.mngn@gmail.com) Developers ------------- - -__Current:__ - [Benzi](https://github.com/Benzi) __(Maintainer)__ -__Past:__ - - [Yemasthui](https://github.com/Yemasthui) __(Creator)__ ###__IMPORTANT__ @@ -43,28 +39,28 @@ Usage Bookmark the following code. To run the bot, run the bookmark. -`javascript:(function(){$.getScript('https://rawgit.com/Yemasthui/basicBot/master/basicBot.js');})();` +`javascript:(function(){$.getScript('https://rawgit.com/basicTeam/basicBot/master/basicBot.js');})();` -If this does not work, go to https://raw.githubusercontent.com/Yemasthui/basicBot/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing f12) when on plug.dj in your community. +If this does not work, go to https://raw.githubusercontent.com/basicTeam/basicBot/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing f12) when on plug.dj in your community. ### Commands -These can be found in [the commands file](https://github.com/Yemasthui/basicBot/blob/master/commands.md). +These can be found in [the commands file](https://github.com/basicTeam/basicBot/blob/master/commands.md). ### Blacklists -Examples of blacklists can be found in [the customization repository](https://github.com/Yemasthui/basicBot-customization/tree/master/blacklists). +Examples of blacklists can be found in [the customization repository](https://github.com/basicTeam/basicBot-customization/tree/master/blacklists). You can add blacklists in the settings of the bot via the methods given in that same repository. See below for more information. ### Extending functionality and custom default settings -basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/Yemasthui/basicBot-customization) for more info. +basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/basicTeam/basicBot-customization) for more info. Please do not try to if you are not confident in your javascript capabilities. ### Translations -Official translations will be supported. Available ones can be found under [the language folder](https://github.com/Yemasthui/basicBot/blob/master/lang/langIndex.json). You can set a language in the room settings. -You can use your own translation or wording by translating the values of in [the English pack](https://github.com/Yemasthui/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. +Official translations will be supported. Available ones can be found under [the language folder](https://github.com/basicTeam/basicBot/blob/master/lang/langIndex.json). You can set a language in the room settings. +You can use your own translation or wording by translating the values of in [the English pack](https://github.com/basicTeam/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. __When translating the chat messages, please note that it is a json format, meaning it is structured as ```"key":"value"```, please only translate the "value" parts, and leave anything between %% (eg. %%NAME%%) as is, they are variables that get filled in by the bot.__ @@ -101,7 +97,7 @@ __I would also like to thank everyone who contributed in translating the bot via ### Copyright -Copyright © 2014-2015 Yemasthui +Copyright © 2014-2015 basicTeam Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. From 2185f061eb312d6843279e8a1e1b9e5ddcbae916 Mon Sep 17 00:00:00 2001 From: "Sam Mills (Henchman)" Date: Wed, 2 Sep 2015 13:57:53 +0200 Subject: [PATCH 218/281] Update basicBot.js --- basicBot.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/basicBot.js b/basicBot.js index 5adfc11a..6ea2a485 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1,5 +1,5 @@ /** - *Copyright 2014 Yemasthui + *Copyright 2015 basicTeam *Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. *This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. */ @@ -99,7 +99,7 @@ var loadChat = function (cb) { if (!cb) cb = function () { }; - $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { + $.get("https://rawgit.com/basicTeam/basicBot/master/lang/langIndex.json", function (json) { var link = basicBot.chatLink; if (json !== null && typeof json !== "undefined") { langIndex = json; @@ -231,7 +231,7 @@ return str; }; - var botCreator = "Matthew (Yemasthui)"; + var botCreator = "The Basic Team"; var botMaintainer = "Benzi" var botCreatorIDs = ["3851534", "4105209"]; @@ -240,9 +240,9 @@ status: false, name: "basicBot", loggedInID: null, - scriptLink: "https://rawgit.com/Yemasthui/basicBot/master/basicBot.js", + scriptLink: "https://rawgit.com/basicTeam/basicBot/master/basicBot.js", cmdLink: "http://git.io/245Ppg", - chatLink: "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", + chatLink: "https://rawgit.com/basicTeam/basicBot/master/lang/en.json", chat: null, loadChat: loadChat, retrieveSettings: retrieveSettings, @@ -250,8 +250,8 @@ settings: { botName: "basicBot", language: "english", - chatLink: "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", - scriptLink: "https://rawgit.com/Yemasthui/basicBot/master/basicBot.js", + chatLink: "https://rawgit.com/basicTeam/basicBot/master/lang/en.json", + scriptLink: "https://rawgit.com/basicTeam/basicBot/master/basicBot.js", roomLock: false, // Requires an extension to re-load the script startupCap: 1, // 1-200 startupVolume: 0, // 0-100 @@ -307,9 +307,9 @@ songstats: true, commandLiteral: "!", blacklists: { - NSFW: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/NSFWlist.json", - OP: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/OPlist.json", - BANNED: "https://rawgit.com/Yemasthui/basicBot-customization/master/blacklists/BANNEDlist.json" + NSFW: "https://rawgit.com/basicTeam/basicBot-customization/master/blacklists/NSFWlist.json", + OP: "https://rawgit.com/basicTeam/basicBot-customization/master/blacklists/OPlist.json", + BANNED: "https://rawgit.com/basicTeam/basicBot-customization/master/blacklists/BANNEDlist.json" } }, room: { @@ -2473,7 +2473,7 @@ if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); var argument = msg.substring(cmd.length + 1); - $.get("https://rawgit.com/Yemasthui/basicBot/master/lang/langIndex.json", function (json) { + $.get("https://rawgit.com/basicTeam/basicBot/master/lang/langIndex.json", function (json) { var langIndex = json; var link = langIndex[argument.toLowerCase()]; if (typeof link === "undefined") { From 0f3a36e30a2e82593fa7087f79069e3916d101c3 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 2 Sep 2015 18:08:41 +0100 Subject: [PATCH 219/281] Updated README to reflect on changes to repository location --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 277acd19..daf11415 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,10 @@ --- -[CLICK HERE TO CUSTOMISE BASICBOT!](https://github.com/basicTeam/basicBot-customization) +[CLICK HERE TO CUSTOMISE BASICBOT!](https://github.com/bscBot/custom) - -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/basicTeam/basicBot?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bscBot/source?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) Email enquiries: [bnz.mngn [at] gmail [dot] com](mailto:bnz.mngn@gmail.com) @@ -39,28 +39,28 @@ Usage Bookmark the following code. To run the bot, run the bookmark. -`javascript:(function(){$.getScript('https://rawgit.com/basicTeam/basicBot/master/basicBot.js');})();` +`javascript:(function(){$.getScript('https://rawgit.com/bscBot/source/master/basicBot.js');})();` -If this does not work, go to https://raw.githubusercontent.com/basicTeam/basicBot/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing f12) when on plug.dj in your community. +If this does not work, go to https://raw.githubusercontent.com/bscBot/source/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing f12) when on plug.dj in your community. ### Commands -These can be found in [the commands file](https://github.com/basicTeam/basicBot/blob/master/commands.md). +These can be found in [the commands file](https://github.com/bscBot/source/blob/master/commands.md). ### Blacklists -Examples of blacklists can be found in [the customization repository](https://github.com/basicTeam/basicBot-customization/tree/master/blacklists). +Examples of blacklists can be found in [the customization repository](https://github.com/bscBot/custom/tree/master/blacklists). You can add blacklists in the settings of the bot via the methods given in that same repository. See below for more information. ### Extending functionality and custom default settings -basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/basicTeam/basicBot-customization) for more info. +basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/bscBot/custom) for more info. Please do not try to if you are not confident in your javascript capabilities. ### Translations -Official translations will be supported. Available ones can be found under [the language folder](https://github.com/basicTeam/basicBot/blob/master/lang/langIndex.json). You can set a language in the room settings. -You can use your own translation or wording by translating the values of in [the English pack](https://github.com/basicTeam/basicBot/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. +Official translations will be supported. Available ones can be found under [the language folder](https://github.com/bscBot/source/blob/master/lang/langIndex.json). You can set a language in the room settings. +You can use your own translation or wording by translating the values of in [the English pack](https://github.com/bscBot/source/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. __When translating the chat messages, please note that it is a json format, meaning it is structured as ```"key":"value"```, please only translate the "value" parts, and leave anything between %% (eg. %%NAME%%) as is, they are variables that get filled in by the bot.__ @@ -97,7 +97,7 @@ __I would also like to thank everyone who contributed in translating the bot via ### Copyright -Copyright © 2014-2015 basicTeam +Copyright © 2014-2015 bscBot Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. From 9a6c1b44e6816d6a659274e87e263d61ad7abcf2 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 2 Sep 2015 19:16:55 +0100 Subject: [PATCH 220/281] Updates files to reflect on the new repo location --- basicBot.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/basicBot.js b/basicBot.js index 6ea2a485..f69d89d1 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1,5 +1,5 @@ /** - *Copyright 2015 basicTeam + *Copyright 2015 bscBot *Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. *This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. */ @@ -99,7 +99,7 @@ var loadChat = function (cb) { if (!cb) cb = function () { }; - $.get("https://rawgit.com/basicTeam/basicBot/master/lang/langIndex.json", function (json) { + $.get("https://rawgit.com/bscBot/source/master/lang/langIndex.json", function (json) { var link = basicBot.chatLink; if (json !== null && typeof json !== "undefined") { langIndex = json; @@ -240,9 +240,9 @@ status: false, name: "basicBot", loggedInID: null, - scriptLink: "https://rawgit.com/basicTeam/basicBot/master/basicBot.js", + scriptLink: "https://rawgit.com/bscBot/source/master/basicBot.js", cmdLink: "http://git.io/245Ppg", - chatLink: "https://rawgit.com/basicTeam/basicBot/master/lang/en.json", + chatLink: "https://rawgit.com/bscBot/source/master/lang/en.json", chat: null, loadChat: loadChat, retrieveSettings: retrieveSettings, @@ -250,8 +250,8 @@ settings: { botName: "basicBot", language: "english", - chatLink: "https://rawgit.com/basicTeam/basicBot/master/lang/en.json", - scriptLink: "https://rawgit.com/basicTeam/basicBot/master/basicBot.js", + chatLink: "https://rawgit.com/bscBot/source/master/lang/en.json", + scriptLink: "https://rawgit.com/bscBot/source/master/basicBot.js", roomLock: false, // Requires an extension to re-load the script startupCap: 1, // 1-200 startupVolume: 0, // 0-100 @@ -307,9 +307,9 @@ songstats: true, commandLiteral: "!", blacklists: { - NSFW: "https://rawgit.com/basicTeam/basicBot-customization/master/blacklists/NSFWlist.json", - OP: "https://rawgit.com/basicTeam/basicBot-customization/master/blacklists/OPlist.json", - BANNED: "https://rawgit.com/basicTeam/basicBot-customization/master/blacklists/BANNEDlist.json" + NSFW: "https://rawgit.com/bscBot/custom/master/blacklists/NSFWlist.json", + OP: "https://rawgit.com/bscBot/custom/master/blacklists/OPlist.json", + BANNED: "https://rawgit.com/bscBot/custom/master/blacklists/BANNEDlist.json" } }, room: { @@ -2473,7 +2473,7 @@ if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); var argument = msg.substring(cmd.length + 1); - $.get("https://rawgit.com/basicTeam/basicBot/master/lang/langIndex.json", function (json) { + $.get("https://rawgit.com/bscBot/source/master/lang/langIndex.json", function (json) { var langIndex = json; var link = langIndex[argument.toLowerCase()]; if (typeof link === "undefined") { From f42ed8b91e25aad83109c1ef9eda35a3a7c901cf Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 2 Sep 2015 20:38:07 +0100 Subject: [PATCH 221/281] Added Slack to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index daf11415..638476b2 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [CLICK HERE TO CUSTOMISE BASICBOT!](https://github.com/bscBot/custom) - -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bscBot/source?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) +[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) Email enquiries: [bnz.mngn [at] gmail [dot] com](mailto:bnz.mngn@gmail.com) From 802b8d9e6c84753bd7f250e4512ab6fe8c14e2f8 Mon Sep 17 00:00:00 2001 From: Benzi Date: Thu, 3 Sep 2015 21:17:09 +0100 Subject: [PATCH 222/281] Changed msg split to messages over 250 --- basicBot.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/basicBot.js b/basicBot.js index f69d89d1..5f492ab3 100644 --- a/basicBot.js +++ b/basicBot.js @@ -3201,9 +3201,9 @@ /* // least efficient way to go about this, but it works :) - if (msg.length > 256){ - firstpart = msg.substr(0, 256); - secondpart = msg.substr(256); + if (msg.length > 250){ + firstpart = msg.substr(0, 250); + secondpart = msg.substr(250); API.sendChat(firstpart); setTimeout(function () { API.sendChat(secondpart); @@ -3215,8 +3215,8 @@ */ // This is a more efficient solution - if (msg.length > 241){ - var split = msg.match(/.{1,241}/g); + if (msg.length > 250){ + var split = msg.match(/.{1,250}/g); for (var i = 0; i < split.length; i++) { var func = function(index) { setTimeout(function() { From 66f0884e50d6342d06565a5e9256e01119519606 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 5 Sep 2015 05:18:35 +0100 Subject: [PATCH 223/281] Updated language files --- lang/de.json | 2 +- lang/nl.json | 54 ++++++++++++++++++++++++++-------------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lang/de.json b/lang/de.json index 66caafbc..1ae80619 100644 --- a/lang/de.json +++ b/lang/de.json @@ -43,7 +43,7 @@ "Sieht gut aus.", "Z\u00e4hl nicht darauf.", "Ja, in geraumer Zeit.", - "Definitely not.", + "Auf keinen Fall.", "Definitiv nicht.", "Du wirst warten m\u00fcssen.", "Ich habe meine Zweifel.", diff --git a/lang/nl.json b/lang/nl.json index 758ba0a6..b432cfc6 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -11,28 +11,28 @@ "geeft je een gelukskoekje. Het luidt \"Neem een risico!\"", "geeft je een gelukskoekje. Het luidt \"Ga naar buiten.\"", "geeft je een gelukskoekje. Het luidt \"Vergeet je groentjes niet op te eten!\"", - "gives you a fortune cookie. It reads \"Do you even lift?\"", + "geeft je een gelukskoekje. Het luidt \"Do you even lift?\"", "geeft je een gelukskoekje. Het luidt \"m808 pls\"", "geeft je een gelukskoekje. Het luidt \"Als je met je heupen schud, zul je al je vrouwtjes krijgen.\"", "geeft je een gelukskoekje. Het luidt \"Ik hou van jou.\"", - "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", - "gives you an Oreo cookie with a glass of milk!", - "gives you a rainbow cookie made with love :heart:", - "gives you an old cookie that was left out in the rain, it's moldy.", - "bakes you fresh cookies, it smells amazing." + "geeft je een gouden koekje. Je kan het niet eten want hij is van goud. Verdomme.", + "geeft je een Oreo met een glas melk!", + "geeft je een regenboog koekje gemaakt met liefde :heart:", + "geeft je een oud koekje die in de regen heeft gelegen, het is schimmelig.", + "bakt verse koekjes voor je, het ruikt geweldig." ], "balls": [ - "Signs point to yes.", + "Lijkt er op van wel.", "Ja.", - "Reply hazy, try again.", - "Without a doubt.", + "Reactie wazig, probeer opnieuw.", + "Zonder twijfel.", "Mijn bronnen zeggen van niet.", - "As I see it, yes.", + "Zoals ik het zie, ja.", "Daar kan je op rekenen.", "Concentreer je en vraag het opnieuw.", - "Outlook not so good.", - "It is decidedly so.", - "Better not tell you now.", + "Ziet er niet goed uit.", + "Het is besloten.", + "Beter als ik het je later vertel.", "Heel twijfelachtig.", "Ja, zeker.", "Het is zeker.", @@ -40,20 +40,20 @@ "Waarschijnlijk.", "Vraag het later opnieuw.", "Mijn antwoord is nee.", - "Outlook good.", + "Ziet er goed uit.", "Reken er niet op.", - "Yes, in due time.", - "Definitely not.", + "Ja, als de tijd rijp is.", + "Zeker niet.", "Zeker niet.", "Je zult moeten wachten.", "Ik heb mijn twijfels.", - "Looks good to me!", + "Ziet er goed uit voor mij!", "Dat vind ik er goed uit zien.", "Wie weet?", "Ziet er goed uit!", "Waarschijnlijk.", - "Don't bet on it.", - "Forget about it." + "Ik zou er niet op rekenen.", + "Vergeet het maar." ], "nodatafound": "Geen vorige data gevonden.", "currentlang": "\/me De taal is momenteel ingesteld op: %%LANGUAGE%%", @@ -67,7 +67,7 @@ "welcome": "\/me Welkom %%NAME%%", "welcomeback": "\/me Welkom terug, %%NAME%%", "songknown": "\/me @%%NAME%%, Dit lied staat in de DJ geschiedenis.", - "notavailable": "\/me @%%NAME%%, the song you played was not available.", + "notavailable": "\/me @%%NAME%%, het liedje dat je speelde was niet aanwezig", "timelimit": "\/me @%%NAME%%, jouw lied is langer dan %%MAXLENGTH%% minuten, je hebt toestemming nodig om langere liedjes te spelen.", "permissionownsong": "\/me :up: @%%NAME%% heeft toestemming om hun eigen productie te spelen!", "isblacklisted": "\/me Dit liedje staat op de %%BLACKLIST%% blacklist! Overslaan...", @@ -151,8 +151,8 @@ "dclookuprank": "\/me [@%%NAME%%] Alleen bouncers of hogere ranking kunnen iets opzoeken voor anderen.", "emojilist": "\/me Lijst met Emoji's: %%LINK%%", "notinwaitlist": "\/me @%%NAME%%, je bent niet in de wachtlijst.", - "youarenext": "\/me @%%NAME%%, you are DJing after this song.", - "youaredj": "\/me @%%NAME%%, you are currently DJing.", + "youarenext": "\/me @%%NAME%%, jij dj't na dit nummer", + "youaredj": "\/me @%%NAME%%, je bent momenteel aan het draaien", "eta": "\/me @%%NAME%% je zal de booth bereiken in ongeveer %%TIME%%.", "facebook": "\/me Like ons op facebook: %%LINK%%", "starterhelp": "\/me Deze afbeelding zal je op weg helpen op plug: %%LINK%%", @@ -165,14 +165,14 @@ "rouletteleave": "\/me @%%NAME%% heeft de roulette verlaten!", "songlink": "\/me [@%%NAME%%] Link naar het huidige nummer: %%LINK%%", "usedlockskip": "\/me [%%NAME%% gebruikte lockskip.]", - "usedskip": "\/me [%%NAME%% used skip]", - "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", + "usedskip": "\/me [%%NAME%% gebruikte \"overslaan\"]", + "skippos": "\/me [@%%NAME%%] DJs zullen nu naar positie %%POSITION%% worden gezet als ze worden overgeslagen.", "lockguardtime": "\/me [@%%NAME%%] De lockguard is ingesteld op %%TIME%% minuten.", "maxlengthtime": "\/me [@%%NAME%%] De maximum lengte van een nummer is ingesteld op %%TIME%% minuten.", "motdset": "\/me MotD ingesteld op: %%MSG%%", "motdintervalset": "\/me MotD interval ingesteld op %%INTERVAL%%.", - "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", - "botnameset": "\/me Bot name now set to: %%BOTNAME%%", + "currentbotname": "\/me Bot naam is momenteel: %%BOTNAME%%", + "botnameset": "\/me Bot naam is vanaf nu: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, probeer mij niet toe te voegen aan de wachtlijst, alsjeblieft.", "move": "\/me [%%NAME%% gebruikte move.]", "mutednotime": "\/me [@%%NAME%%] Heeft @%%USERNAME%% gemute.", @@ -186,7 +186,7 @@ "removenotinwl": "\/me [@%%NAME%%] Opgegeven gebruiker @%%USERNAME%% is niet in de wachtlijst.", "roomrules": "\/me Je kan onze regels hier vinden: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Totaal aantal woots: %%WOOTS%%, totaal aantal mehs: %%MEHS%%, totaal aantal grabs: %%GRABS%%.", - "forceskip": "\/me [%%NAME%% used forceskip]", + "forceskip": "\/me [%%NAME%% gebruikte \"geforceerd overslaan\"]", "madeby": "\/me Deze bot is gemaakt door %%NAME%%.", "activefor": "Ik ben al %%TIME%% actief.", "swapinvalid": "\/me [@%%NAME%%] Ongeldige gebruiker gespecificeerd. (Geen namen met spaties!)", From 65d11a22a6fe443d16d53bf546c12277817b020f Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 12 Sep 2015 20:22:20 +0100 Subject: [PATCH 224/281] Added !thor command Special thanks to @vinicios-yals --- basicBot.js | 82 ++++++++++++++++++++++++++++++++++++++++++++++++- commands.md | 1 + lang/cs.json | 6 +++- lang/de.json | 6 +++- lang/en.json | 6 +++- lang/es-ES.json | 6 +++- lang/fr.json | 6 +++- lang/lv-LV.json | 6 +++- lang/ms.json | 6 +++- lang/nl.json | 6 +++- lang/pl.json | 8 +++-- lang/pt-BR.json | 6 +++- lang/sr.json | 6 +++- lang/tr.json | 6 +++- lang/zh-TW.json | 6 +++- 15 files changed, 148 insertions(+), 15 deletions(-) diff --git a/basicBot.js b/basicBot.js index 5f492ab3..ab0bb75f 100644 --- a/basicBot.js +++ b/basicBot.js @@ -278,6 +278,8 @@ autodisable: true, commandCooldown: 30, usercommandsEnabled: true, + thorCommand: true, + thorInterval: 10, skipPosition: 3, skipReasons: [ ["theme", "This song does not fit the room theme. "], @@ -385,7 +387,8 @@ basicBot.userUtilities.moveUser(winner, pos, false); }, 1 * 1000, winner, pos); } - } + }, + usersUsedThor: [] }, User: function (id, name) { this.id = id; @@ -3285,6 +3288,83 @@ } }, + thorCommand: { + command: 'thor', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + if (basicBot.settings.thorCommand){ + var id = chat.uid, + isDj = API.getDJ().id == id ? true : false, + from = chat.un, + djlist = API.getWaitList(), + inDjList = false, + oldTime = 0, + usedThor = false, + indexArrUsedThor, + thorCd = false, + timeInMinutes = 0, + worthyAlg = Math.floor(Math.random() * 10), + worthy = worthyAlg == 10 ? true : false; + + for (var i = 0; i < djlist.length; i++) { + if (djlist[i] == id) + inDjList = true; + } + + if (inDjList) { + for (var i = 0; i < basicBot.room.usersUsedThor.length; i++) { + if (basicBot.room.usersUsedThor[i].id == id) { + oldTime = basicBot.room.usersUsedThor[i].time; + usedThor = true; + indexArrUsedThor = i; + } + } + + if (usedThor) { + timeInMinutes = (basicBot.settings.thorInterval + 1) - (Math.floor((oldTime - Date.now()) * Math.pow(10, -5)) * -1); + thorCd = timeInMinutes > 0 ? true : false; + if (thorCd == false) + basicBot.room.usersUsedThor.splice(indexArrUsedThor, 1); + } + + if (thorCd == false || usedThor == false) { + var user = {id: id, time: Date.now()}; + basicBot.room.usersUsedThor.push(user); + } + } + + if (isDj && worthy == true) { + return API.sendChat(subChat(basicBot.chat.thorWorthy, {name: from})); + } else if (isDj && worthy == false) { + API.moderateForceSkip(); + return API.sendChat(subChat(basicBot.chat.thorNotWorthy, {name: from})); + } else if (!inDjList) { + return API.sendChat(subChat(basicBot.chat.thorNotClose, {name: from})); + } else if (thorCd) { + return API.sendChat(subChat(basicBot.chat.thorcd, {name: from, time: timeInMinutes})); + } + + if (worthy) { + if (API.getWaitListPosition(id) != 1) + basicBot.userUtilities.moveUser(id, 1, false); + return API.sendChat(subChat(basicBot.chat.thorWorthy, {name: from})); + } else if (!inDjList) { + return API.sendChat(subChat(basicBot.chat.thorNotClose, {name: from})); + } else if (API.getWaitListPosition(id) != djlist.length) { + basicBot.userUtilities.moveUser(id, djlist.length, false); + return API.sendChat(subChat(basicBot.chat.thorNotWorthy, {name: from})); + } else { + return API.sendChat(subChat(basicBot.chat.thorNotWorthy, {name: from})); + } + } + } + } + }, + timeguardCommand: { command: 'timeguard', rank: 'bouncer', diff --git a/commands.md b/commands.md index feaa8fd2..5f45c946 100644 --- a/commands.md +++ b/commands.md @@ -119,5 +119,6 @@ User |!purchase | | returns link to purchase more plug notes | |!rules | | links to the rules (if set in the settings) | |!theme | | links to the room's theme (if set in the settings) | +|!thor | | users get moved to position 1 in the waitlist if they're worthy of Thor's hammer. | |!website | | links to the room's website (if set in the settings) | |!youtube | | links to the room's youtube page (if set in the settings) | diff --git a/lang/cs.json b/lang/cs.json index 93d871bf..dcdc62e5 100644 --- a/lang/cs.json +++ b/lang/cs.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woot\u016f: %%WOOT%%, meh\u016f: %%MEHS%%, pom\u011br (w\/m): %%RATIO%%.", "website": "\/me Pros\u00edm nav\u0161tivte na\u0161e webov\u00e9 str\u00e1nky: %%LINK%%", "youtube": "\/me [%%NAME%%] Dejte n\u00e1m odb\u011br na youtube: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/de.json b/lang/de.json index 1ae80619..9949af4f 100644 --- a/lang/de.json +++ b/lang/de.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w\/m): %%RATIO%%.", "website": "\/me Bitte besuch unsere Website: %%LINK%%", "youtube": "\/me [%%NAME%%] Subscribe unseren Youtube Channel! %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/en.json b/lang/en.json index aaf42346..949c8158 100644 --- a/lang/en.json +++ b/lang/en.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, ratio (w\/m): %%RATIO%%.", "website": "\/me Please visit our website: %%LINK%%", "youtube": "\/me [%%NAME%%] Subscribe to us on youtube: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/es-ES.json b/lang/es-ES.json index 74f27810..29c4d409 100644 --- a/lang/es-ES.json +++ b/lang/es-ES.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ geniales: %%WOOT%%, aburridos: %%MEHS%%, ratio (g\/a): %%RATIO%%.", "website": "\/me Por favor visita nuestra pagina web: %%LINK%%", "youtube": "\/me [%%NAME%%] Suscribete a nosotros en youtube: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/fr.json b/lang/fr.json index acf941bd..83030ae6 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots : %%WOOT%%, mehs : %%MEHS%%, ratio (w\/m) : %%RATIO%%.", "website": "\/me Visitez notre site Internet : %%LINK%%", "youtube": "\/me [%%NAME%%] Abonnez-vous \u00e0 notre cha\u00eene Youtube : %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%% : %%WOOTS%%W\/%%GRABS%%A\/%%MEHS%%M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%% : %%WOOTS%%W\/%%GRABS%%A\/%%MEHS%%M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/lv-LV.json b/lang/lv-LV.json index ce067d5a..15f8a02b 100644 --- a/lang/lv-LV.json +++ b/lang/lv-LV.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Woot'i: %%WOOT%%, Meh'i: %%MEHS%%, Procentu\u0101li: %%RATIO%%.", "website": "\/me M\u016bsu m\u0101jaslapa: %%LINK%%", "youtube": "\/me [%%NAME%%] Abon\u0113jiet m\u016bs Youtub\u0113: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%\/M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%\/M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/ms.json b/lang/ms.json index 593cc53f..065b9482 100644 --- a/lang/ms.json +++ b/lang/ms.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woot: %%WOOT%%, meh: %%MEHS%%, nisbah (w\/m): %%RATIO%%.", "website": "\/me Sila layari laman web kami: %%LINK%%", "youtube": "\/me [%%NAME%%] Subscribe kami di youtube: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/nl.json b/lang/nl.json index b432cfc6..7fc73023 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, verhouding (w\/m): %%RATIO%%.", "website": "\/me Bezoek onze website alsjeblieft: %%LINK%%", "youtube": "\/me [%%NAME%%] Abonneer op ons kanaal op YouTube: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/pl.json b/lang/pl.json index c9310e19..36d62eb4 100644 --- a/lang/pl.json +++ b/lang/pl.json @@ -72,7 +72,7 @@ "permissionownsong": "\/me :up: @%%NAME%% posiada uprawnienia aby gra\u0107 swoje w\u0142asne produkcje", "isblacklisted": "\/me Utw\u00f3r znajduje si\u0119 na %%BLACKLIST%% li\u015bcie. Pomijam...", "isopen": "\/me Ruletka w\u0142\u0105czona! Wpisz !join aby do\u0142\u0105czy\u0107! (Wylosowana osoba zostanie przeniesiona na losowe miejsce w kolejce).", - "winnerpicked": "\/me Zwyci\u0119zca zosta\u0142 wybrany! @%%NAME%% przeniesionty na pozycj\u0119 %%POSITION%%.", + "winnerpicked": "\/me Zwyci\u0119zca zosta\u0142 wybrany! @%%NAME%% przeniesiony na pozycj\u0119 %%POSITION%%.", "ball": "\/me %%NAME%% zapyta\u0142: \"%%QUESTION%%\" i %%BOTNAME%% odpowiada: \"%%RESPONSE%%\"", "notghosting": "[%%NAME1%%] %%NAME2%% nie ghostuje.", "ghosting": "[%%NAME1%%] %%NAME2%% albo ghostuje albo go nie ma.", @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ wooty: %%WOOT%%, mehy: %%MEHS%%, \u015brednia (w\/m): %%RATIO%%.", "website": "\/me Zapraszamy do odwiedzenia naszej strony internetowej: %%LINK%%", "youtube": "\/me [%%NAME%%] Subskrybuj nas na youtube: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/pt-BR.json b/lang/pt-BR.json index 16e35bb2..70848949 100644 --- a/lang/pt-BR.json +++ b/lang/pt-BR.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woots: %%WOOT%%, mehs: %%MEHS%%, taxa\/propor\u00e7\u00e3o (w\/m): %%RATIO%%.", "website": "\/me Visite nosso site: %%LINK%%", "youtube": "\/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/sr.json b/lang/sr.json index e35527fb..d73f75b7 100644 --- a/lang/sr.json +++ b/lang/sr.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Wotovi: %%WOOT%%, Mehovi: %%MEHS%%, Razmer(w\/m): %%RATIO%%.", "website": "\/me Molimo posetite nasu web stranicu: %%LINK%%", "youtube": "\/me [%%NAME%%] Pretplatite se na na\u0161 YouTube kanal: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/tr.json b/lang/tr.json index 780fa196..a03e0829 100644 --- a/lang/tr.json +++ b/lang/tr.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ WOOT: %%WOOT%%, MEH: %%MEHS%%, ORAN (W\/M): %%RATIO%%.", "website": "\/me Sitemizi ziyaret edin: %%LINK%%", "youtube": "\/me [%%NAME%%] Youtube kanalimiza abone olun: %%LINK%%", - "songstatistics": "\/me :arrow_right: %%ARTIST%% - %%TITLE%%: %%WOOTS%%:+1:\/\\%%GRABS%%:sparkling_heart:\/\\%%MEHS%%:-1:." + "songstatistics": "\/me :arrow_right: %%ARTIST%% - %%TITLE%%: %%WOOTS%%:+1:\/\\%%GRABS%%:sparkling_heart:\/\\%%MEHS%%:-1:.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file diff --git a/lang/zh-TW.json b/lang/zh-TW.json index a5f28769..6f1df1d6 100644 --- a/lang/zh-TW.json +++ b/lang/zh-TW.json @@ -202,5 +202,9 @@ "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ \u6b63\u8a55: %%WOOT%%, \u8ca0\u8a55: %%MEHS%%, \u6bd4\u7387 (\u6b63\/\u8ca0): %%RATIO%%.", "website": "\/me \u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9: %%LINK%%", "youtube": "\/me [%%NAME%%] \u8a02\u95b1\u6211\u5011\u7684Youtube\u983b\u9053: %%LINK%%", - "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%\u6b63\/%%GRABS%%\u6536\u85cf\/%%MEHS%%\u8ca0." + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%\u6b63\/%%GRABS%%\u6536\u85cf\/%%MEHS%%\u8ca0.", + "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", + "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", + "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." } \ No newline at end of file From 82b3576609cc4283908c870f3604eb8f72091b4e Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 12 Sep 2015 20:22:59 +0100 Subject: [PATCH 225/281] v2.8.15 --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index ab0bb75f..bc9d26c5 100644 --- a/basicBot.js +++ b/basicBot.js @@ -236,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.8.14", + version: "2.8.15", status: false, name: "basicBot", loggedInID: null, From 2fad4929033d5076d726bb750fe55b92dc855837 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 12 Sep 2015 20:47:44 +0100 Subject: [PATCH 226/281] thor command bug fix --- basicBot.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/basicBot.js b/basicBot.js index bc9d26c5..fdf427c8 100644 --- a/basicBot.js +++ b/basicBot.js @@ -3311,7 +3311,7 @@ worthy = worthyAlg == 10 ? true : false; for (var i = 0; i < djlist.length; i++) { - if (djlist[i] == id) + if (djlist[i].id == id) inDjList = true; } @@ -3349,18 +3349,15 @@ } if (worthy) { - if (API.getWaitListPosition(id) != 1) - basicBot.userUtilities.moveUser(id, 1, false); - return API.sendChat(subChat(basicBot.chat.thorWorthy, {name: from})); - } else if (!inDjList) { - return API.sendChat(subChat(basicBot.chat.thorNotClose, {name: from})); - } else if (API.getWaitListPosition(id) != djlist.length) { - basicBot.userUtilities.moveUser(id, djlist.length, false); - return API.sendChat(subChat(basicBot.chat.thorNotWorthy, {name: from})); + if (API.getWaitListPosition(id) != 0) + basicBot.userUtilities.moveUser(id, 1, false); + API.sendChat(subChat(basicBot.chat.thorWorthy, {name: from})); } else { - return API.sendChat(subChat(basicBot.chat.thorNotWorthy, {name: from})); + if (API.getWaitListPosition(id) != djlist.length - 1) + basicBot.userUtilities.moveUser(id, djlist.length, false); + API.sendChat(subChat(basicBot.chat.thorNotWorthy, {name: from})); } - } + } } } }, From eba55628bd3dada45dd09649a04e94e0b07a7520 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sun, 13 Sep 2015 21:16:09 +0100 Subject: [PATCH 227/281] !thor command is now off as default --- basicBot.js | 13 ++++--------- lang/pl.json | 8 ++++---- lang/pt-BR.json | 8 ++++---- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/basicBot.js b/basicBot.js index fdf427c8..2a669606 100644 --- a/basicBot.js +++ b/basicBot.js @@ -278,8 +278,8 @@ autodisable: true, commandCooldown: 30, usercommandsEnabled: true, - thorCommand: true, - thorInterval: 10, + thorCommand: false, + thorCooldown: 10, skipPosition: 3, skipReasons: [ ["theme", "This song does not fit the room theme. "], @@ -3325,7 +3325,7 @@ } if (usedThor) { - timeInMinutes = (basicBot.settings.thorInterval + 1) - (Math.floor((oldTime - Date.now()) * Math.pow(10, -5)) * -1); + timeInMinutes = (basicBot.settings.thorCooldown + 1) - (Math.floor((oldTime - Date.now()) * Math.pow(10, -5)) * -1); thorCd = timeInMinutes > 0 ? true : false; if (thorCd == false) basicBot.room.usersUsedThor.splice(indexArrUsedThor, 1); @@ -3337,12 +3337,7 @@ } } - if (isDj && worthy == true) { - return API.sendChat(subChat(basicBot.chat.thorWorthy, {name: from})); - } else if (isDj && worthy == false) { - API.moderateForceSkip(); - return API.sendChat(subChat(basicBot.chat.thorNotWorthy, {name: from})); - } else if (!inDjList) { + if (!inDjList) { return API.sendChat(subChat(basicBot.chat.thorNotClose, {name: from})); } else if (thorCd) { return API.sendChat(subChat(basicBot.chat.thorcd, {name: from, time: timeInMinutes})); diff --git a/lang/pl.json b/lang/pl.json index 36d62eb4..392677ac 100644 --- a/lang/pl.json +++ b/lang/pl.json @@ -203,8 +203,8 @@ "website": "\/me Zapraszamy do odwiedzenia naszej strony internetowej: %%LINK%%", "youtube": "\/me [%%NAME%%] Subskrybuj nas na youtube: %%LINK%%", "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", - "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", - "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", - "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", - "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." + "thorNotClose": "\/me @%%NAME%%, nie jeste\u015b godzien aby podej\u015b\u0107 do m\u0142ota!", + "thorcd": "\/me @%%NAME%% mo\u017cesz spr\u00f3bowa\u0107 podnie\u015b\u0107 m\u0142ot za %%TIME%% minut.", + "thorWorthy": "\/me @%%NAME%% jeste\u015b godzien m\u0142ota :hammer:, gratulacje!", + "thorNotWorthy": "\/me @%%NAME%% nie jeste\u015b godzien m\u0142ota." } \ No newline at end of file diff --git a/lang/pt-BR.json b/lang/pt-BR.json index 70848949..12dadc9e 100644 --- a/lang/pt-BR.json +++ b/lang/pt-BR.json @@ -203,8 +203,8 @@ "website": "\/me Visite nosso site: %%LINK%%", "youtube": "\/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", - "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", - "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", - "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", - "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." + "thorNotClose": "\/me @%%NAME%% voc\\u00ea n\\u00e3o \u00e9 digno nem de chegar perto do martelo.", + "thorcd": "\/me @%%NAME%% voc\u00ea pode tentar levantar o martelo em %%TIME%% minutos.", + "thorWorthy": "\/me @%%NAME%% voc\u00ea \u00e9 d\u00edgno do martelo :hammer:. Parab\u00e9ns!", + "thorNotWorthy": "\/me @%%NAME%% voc\u00ea n\u00e3o \u00e9 d\u00edgno do martelo." } \ No newline at end of file From 4f0f30099f90aefd9b3a88f2cdbe2f59b7657a50 Mon Sep 17 00:00:00 2001 From: "Sam Mills (Henchman)" Date: Wed, 30 Sep 2015 16:39:27 +0100 Subject: [PATCH 228/281] Update README.md --- README.md | 71 ++++--------------------------------------------------- 1 file changed, 4 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index 638476b2..9da0dfaf 100644 --- a/README.md +++ b/README.md @@ -1,83 +1,20 @@ # basicBot (source) -> A not so basic bot for plug.dj ---- +[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) -[CLICK HERE TO CUSTOMISE BASICBOT!](https://github.com/bscBot/custom) -- -[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) +#Important - Deprecation Notice + +Plug DJ Inc has ceased operations as of the 29th of September, 2015. Basic Bot therefore no longer has any use, as the site is offline. Thanks for everybody that was involved. Email enquiries: [bnz.mngn [at] gmail [dot] com](mailto:bnz.mngn@gmail.com) ---- Developers ------------- - [Benzi](https://github.com/Benzi) __(Maintainer)__ -###__IMPORTANT__ - -__basicBot has been updated to work under plug's major update. There may still be bugs and functionality is not guaranteed.__ - -__Make sure to update your bookmark, as the link has changed recently!!!__ - -__Important changes in version 2.x.x:__ - -- Now should be fully compatible with Firefox. -- You can now change the bot's name, no need to make a fork to change it anymore. Available under custom settings as "botName". -- The bot's variable is now exposed outside of the script. You can access it as the variable "bot" in the console. This should allow for secondary scripts extending the bot without the need to fork and lose support on its basis. -Be careful when extending it to make sure commands or features interact properly with the rest of them. -An example script to extend the bot is provided under exampleExtension.js. Please do not fork this repository to just change that file. Details of how to use are provided inside. -This is NOT needed to run the bot as it is provided, only if you want to add functionality. -- Command checking has been reworked to facilitate adding commands through secondary scripts as explained above. -- __There is now support for custom chat messages. This means you can use your own custom wording or translate it into your own language.__ - -Usage -------- - -Bookmark the following code. To run the bot, run the bookmark. - -`javascript:(function(){$.getScript('https://rawgit.com/bscBot/source/master/basicBot.js');})();` - -If this does not work, go to https://raw.githubusercontent.com/bscBot/source/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing f12) when on plug.dj in your community. - -### Commands - -These can be found in [the commands file](https://github.com/bscBot/source/blob/master/commands.md). - -### Blacklists -Examples of blacklists can be found in [the customization repository](https://github.com/bscBot/custom/tree/master/blacklists). -You can add blacklists in the settings of the bot via the methods given in that same repository. See below for more information. - -### Extending functionality and custom default settings - -basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/bscBot/custom) for more info. -Please do not try to if you are not confident in your javascript capabilities. - - -### Translations - -Official translations will be supported. Available ones can be found under [the language folder](https://github.com/bscBot/source/blob/master/lang/langIndex.json). You can set a language in the room settings. -You can use your own translation or wording by translating the values of in [the English pack](https://github.com/bscBot/source/blob/master/lang/en.json) and uploading it to a public hosting service. Put the link into your custom room settings, under chatLink. - -__When translating the chat messages, please note that it is a json format, meaning it is structured as ```"key":"value"```, please only translate the "value" parts, and leave anything between %% (eg. %%NAME%%) as is, they are variables that get filled in by the bot.__ - -Useful Tools ---------------- - -### basicBot Chrome Extension - -- [Get the Official basicBot Chrome Extension](https://chrome.google.com/webstore/detail/basicbot/bjinmbkeneigmkkkpcmcokphbjkepeie) - -### Command Autocomplete Plugin - -[![Command Autocomplete](http://i.imgur.com/hBMuB5F.png)](https://github.com/ExtPlug/advanced-autocomplete) - -Check out [this](https://github.com/ExtPlug/advanced-autocomplete) helpful command autocomplete browser plugin by [goto-bus-stop](https://github.com/goto-bus-stop) made to work with basicBot's commands. - - Credits -------- From f1909ca7bd5b16819e28eb2a4ab086659530e6bc Mon Sep 17 00:00:00 2001 From: Maayan547 Date: Sat, 5 Mar 2016 14:38:57 +0200 Subject: [PATCH 229/281] New plug.dj website updated Updated to the new plug dj stg.plug.dj --- basicBot.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basicBot.js b/basicBot.js index 2a669606..87bc3bde 100644 --- a/basicBot.js +++ b/basicBot.js @@ -9,7 +9,7 @@ /*window.onerror = function() { var room = JSON.parse(localStorage.getItem("basicBotRoom")); - window.location = 'https://plug.dj' + room.name; + window.location = 'https://stg.plug.dj' + room.name; };*/ API.getWaitListPosition = function(id){ @@ -1350,7 +1350,7 @@ basicBot.connectAPI(); API.moderateDeleteChat = function (cid) { $.ajax({ - url: "https://plug.dj/_/chat/" + cid, + url: "https://stg.plug.dj/_/chat/" + cid, type: "DELETE" }) }; @@ -1369,7 +1369,7 @@ kill(); }, 1000); if (basicBot.settings.roomLock){ - window.location = 'https://plug.dj' + basicBot.room.name; + window.location = 'https://stg.plug.dj' + basicBot.room.name; } else { clearInterval(Check); @@ -3724,7 +3724,7 @@ } var slug = API.getUser(id).slug; if (typeof slug !== 'undefined') { - var profile = "https://plug.dj/@/" + slug; + var profile = "https://stg.plug.dj/@/" + slug; } else { var profile = "~"; } From e378f7944e4eb00c6f7d0f35f1f391a532bedf32 Mon Sep 17 00:00:00 2001 From: "Sam Mills (Henchman)" Date: Sun, 6 Mar 2016 12:38:28 +0000 Subject: [PATCH 230/281] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9da0dfaf..7bfb45f8 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,12 @@ [![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) -#Important - Deprecation Notice +#Important - Deprecation Notice (See Note) Plug DJ Inc has ceased operations as of the 29th of September, 2015. Basic Bot therefore no longer has any use, as the site is offline. Thanks for everybody that was involved. +__Note: Plug.dj has been acquired, and the staging domain is available as work is done to bring the site back to normality and stability. The bot has been edited for a single time only to work with the staging domain. As soon as the public domain comes available again, the domain will be changed and basic bot will not work with staging.__ + Email enquiries: [bnz.mngn [at] gmail [dot] com](mailto:bnz.mngn@gmail.com) From 09ef8259acb6cc085ee643bfadd020e6271f2fd3 Mon Sep 17 00:00:00 2001 From: Johannes Andersen Date: Thu, 10 Mar 2016 22:14:14 +0100 Subject: [PATCH 231/281] Fixes CycleGuard, !cycle Cycleguard time, cycle command fixed 100% working now using API calls. Not clicking buttons! Everything using; changeDJCycle function is now fixed! --- basicBot.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/basicBot.js b/basicBot.js index 87bc3bde..81e40238 100644 --- a/basicBot.js +++ b/basicBot.js @@ -741,22 +741,22 @@ }, 1000, id); }, changeDJCycle: function () { - var toggle = $(".cycle-toggle"); - if (toggle.hasClass("disabled")) { - toggle.click(); - if (basicBot.settings.cycleGuard) { - basicBot.room.cycleTimer = setTimeout(function () { - if (toggle.hasClass("enabled")) toggle.click(); - }, basicBot.settings.cycleMaxTime * 60 * 1000); - } - } - else { - toggle.click(); - clearTimeout(basicBot.room.cycleTimer); - } - - // TODO: Use API.moderateDJCycle(true/false) - }, + $.getJSON('https://stg.plug.dj/_/rooms/state', function(data) { + if (data.data[0].booth.shouldCycle) { // checks "" "shouldCycle": true "" if its true + API.moderateDJCycle(false); // Disables the DJ Cycle + clearTimeout(basicBot.room.cycleTimer); // Clear the cycleguard timer + } else { // If cycle is already disable; enable it + if (basicBot.settings.cycleGuard) { // Is cycle guard on? + API.moderateDJCycle(true); // Enables DJ cycle + basicBot.room.cycleTimer = setTimeout(function () { // Start timer + API.moderateDJCycle(false); // Disable cycle + }, basicBot.settings.maximumCycletime * 60 * 1000); // The time + } else { // So cycleguard is not on? + API.moderateDJCycle(true); // Enables DJ cycle + } + }; + }); + }, intervalMessage: function () { var interval; if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; From 185daa7ea9a2a72a6ce2f4aae914df5bb7ca4e90 Mon Sep 17 00:00:00 2001 From: Johannes Andersen Date: Thu, 10 Mar 2016 23:03:35 +0100 Subject: [PATCH 232/281] Welcome to 2016 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7bfb45f8..e0ab6543 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ #Important - Deprecation Notice (See Note) -Plug DJ Inc has ceased operations as of the 29th of September, 2015. Basic Bot therefore no longer has any use, as the site is offline. Thanks for everybody that was involved. +Plug DJ has ceased operations as of the 29th of September, 2015. Basic Bot therefore no longer has any use, as the site is offline. Thanks for everybody that was involved. __Note: Plug.dj has been acquired, and the staging domain is available as work is done to bring the site back to normality and stability. The bot has been edited for a single time only to work with the staging domain. As soon as the public domain comes available again, the domain will be changed and basic bot will not work with staging.__ @@ -36,7 +36,7 @@ __I would also like to thank everyone who contributed in translating the bot via ### Copyright -Copyright © 2014-2015 bscBot +Copyright © 2014-2016 bscBot Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. From b5ea77e3391a1e8757143e5e1d09972875b443ee Mon Sep 17 00:00:00 2001 From: Johannes Andersen Date: Thu, 10 Mar 2016 23:04:41 +0100 Subject: [PATCH 233/281] Wops --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e0ab6543..212d2db6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ #Important - Deprecation Notice (See Note) -Plug DJ has ceased operations as of the 29th of September, 2015. Basic Bot therefore no longer has any use, as the site is offline. Thanks for everybody that was involved. +Plug DJ Inc has ceased operations as of the 29th of September, 2015. Basic Bot therefore no longer has any use, as the site is offline. Thanks for everybody that was involved. __Note: Plug.dj has been acquired, and the staging domain is available as work is done to bring the site back to normality and stability. The bot has been edited for a single time only to work with the staging domain. As soon as the public domain comes available again, the domain will be changed and basic bot will not work with staging.__ From aeb05fcec8551b6e7e98486211996540c9eac6dd Mon Sep 17 00:00:00 2001 From: Benzi Date: Fri, 11 Mar 2016 23:34:15 +0000 Subject: [PATCH 234/281] Updated README.md Added usage instructions and more to README --- README.md | 36 +++++++++++++++++++++++++++++++++--- lang/langIndex.json | 26 +++++++++++++------------- 2 files changed, 46 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 212d2db6..256b0bf2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) -#Important - Deprecation Notice (See Note) +# Important - Deprecation Notice (See Note) Plug DJ Inc has ceased operations as of the 29th of September, 2015. Basic Bot therefore no longer has any use, as the site is offline. Thanks for everybody that was involved. @@ -12,8 +12,38 @@ __Note: Plug.dj has been acquired, and the staging domain is available as work i Email enquiries: [bnz.mngn [at] gmail [dot] com](mailto:bnz.mngn@gmail.com) +Usage +----- +Bookmark the following code. To run the bot, run the bookmark. +`javascript:(function(){$.getScript('https://rawgit.com/bscBot/source/master/basicBot.js');})();` + +If this does not work, go to https://raw.githubusercontent.com/bscBot/source/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing F12) when on plug.dj in your community. + + +Commands +-------- +These can be found in [the commands file](https://github.com/bscBot/source/blob/master/commands.md). + + +Blacklists +---------- +Examples of blacklists can be found in [the customization repository](https://github.com/bscBot/custom/tree/master/blacklists). +You can add blacklists in the settings of the bot via the methods given in that same repository. See below for more information. + + +Extending functionality and custom default settings +--------------------------------------------------- +basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/bscBot/custom) for more info. +Please do not try to if you are not confident in your javascript capabilities. + + +basicBot Chrome Extension +------------------------- +[Get the Official basicBot Chrome Extension](https://chrome.google.com/webstore/detail/basicbot/bjinmbkeneigmkkkpcmcokphbjkepeie) + + Developers -------------- +---------- - [Benzi](https://github.com/Benzi) __(Maintainer)__ @@ -43,7 +73,7 @@ This software is not for profit, any extension, or unauthorised person providing Disclaimer ------------- +---------- This bot is developed independently. Changes may be made without notice. There is no guarantee for the bot to be functioning perfectly. plug.dj admins have the right to request changes. diff --git a/lang/langIndex.json b/lang/langIndex.json index 0c5ee4f6..9f0ede17 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,15 +1,15 @@ { - "czech": "https://rawgit.com/Yemasthui/basicBot/master/lang/cs.json", - "german": "https://rawgit.com/Yemasthui/basicBot/master/lang/de.json", - "english": "https://rawgit.com/Yemasthui/basicBot/master/lang/en.json", - "spanish": "https://rawgit.com/Yemasthui/basicBot/master/lang/es-ES.json", - "french": "https://rawgit.com/Yemasthui/basicBot/master/lang/fr.json", - "latvian": "https://rawgit.com/Yemasthui/basicBot/master/lang/lv-LV.json", - "malay": "https://rawgit.com/Yemasthui/basicBot/master/lang/ms.json", - "dutch": "https://rawgit.com/Yemasthui/basicBot/master/lang/nl.json", - "polish": "https://rawgit.com/Yemasthui/basicBot/master/lang/pl.json", - "portuguese": "https://rawgit.com/Yemasthui/basicBot/master/lang/pt-BR.json", - "serbian": "https://rawgit.com/Yemasthui/basicBot/master/lang/sr.json", - "turkish": "https://rawgit.com/Yemasthui/basicBot/master/lang/tr.json", - "chinese": "https://rawgit.com/Yemasthui/basicBot/master/lang/zh-TW.json" + "czech": "https://rawgit.com/bscBot/source/master/lang/cs.json", + "german": "https://rawgit.com/bscBot/source/master/lang/de.json", + "english": "https://rawgit.com/bscBot/source/master/lang/en.json", + "spanish": "https://rawgit.com/bscBot/source/master/lang/es-ES.json", + "french": "https://rawgit.com/bscBot/source/master/lang/fr.json", + "latvian": "https://rawgit.com/bscBot/source/master/lang/lv-LV.json", + "malay": "https://rawgit.com/bscBot/source/master/lang/ms.json", + "dutch": "https://rawgit.com/bscBot/source/master/lang/nl.json", + "polish": "https://rawgit.com/bscBot/source/master/lang/pl.json", + "portuguese": "https://rawgit.com/bscBot/source/master/lang/pt-BR.json", + "serbian": "https://rawgit.com/bscBot/source/master/lang/sr.json", + "turkish": "https://rawgit.com/bscBot/source/master/lang/tr.json", + "chinese": "https://rawgit.com/bscBot/source/master/lang/zh-TW.json" } \ No newline at end of file From 6777f9a22d320380b1001569d727db7cd12df33d Mon Sep 17 00:00:00 2001 From: Johannes Andersen Date: Sun, 13 Mar 2016 15:10:48 +0100 Subject: [PATCH 235/281] !roulette was added back --- commands.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands.md b/commands.md index 5f45c946..263e8f4a 100644 --- a/commands.md +++ b/commands.md @@ -39,7 +39,7 @@ Bouncer+ |!lockdown | | lock down the room: only staff can chat | |!move | @user (X) | moves user to position X on the waitlist, default is position 1 | |!remove | @user | remove user from the waitlist | -|~~!roulette~~ | | ~~start a roulette~~ | +|!roulette | | start a roulette | |!songstats | | toggle song statistics | |!unlock | | unlock the waitlist | |!welcome | | toggle the welcome message on user join | @@ -111,8 +111,8 @@ User |!ghostbuster | @user | checks if user is ghosting | |!gif | (message) | returns gif (from giphy) related to the tag provided. Returns a random gif if no tags are provided. | |!help | | links to an image to help get people started on plug | -|~~!join~~ | | ~~join the roulette if it's up~~ | -|~~!leave~~ | | ~~leave the roulette if you joined~~ | +|!join | | join the roulette if it's up | +|!leave | | leave the roulette if you joined | |!link | | when the user is the DJ, give a link to the current song | |!op | | links to the OverPlayed list (if set in the settings) | |!ping | | pong! | From 2be1acfae0df136298c3e0d5a07e3f67a352b9a8 Mon Sep 17 00:00:00 2001 From: ItzLevvie Date: Tue, 15 Mar 2016 20:42:35 +0000 Subject: [PATCH 236/281] Update for SockJS. --- basicBot.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/basicBot.js b/basicBot.js index da9d0d57..0ee07bd9 100644 --- a/basicBot.js +++ b/basicBot.js @@ -54,7 +54,7 @@ }; } if (typeof SockJS == 'undefined') { - $.getScript('https://cdn.jsdelivr.net/sockjs/0.3.4/sockjs.min.js', loadSocket); + $.getScript('https://cdn.jsdelivr.net/sockjs/1.0.3/sockjs.min.js', loadSocket); } else loadSocket(); } @@ -743,20 +743,20 @@ changeDJCycle: function () { $.getJSON('https://stg.plug.dj/_/rooms/state', function(data) { if (data.data[0].booth.shouldCycle) { // checks "" "shouldCycle": true "" if its true - API.moderateDJCycle(false); // Disables the DJ Cycle + API.moderateDJCycle(false); // Disables the DJ Cycle clearTimeout(basicBot.room.cycleTimer); // Clear the cycleguard timer } else { // If cycle is already disable; enable it if (basicBot.settings.cycleGuard) { // Is cycle guard on? - API.moderateDJCycle(true); // Enables DJ cycle + API.moderateDJCycle(true); // Enables DJ cycle basicBot.room.cycleTimer = setTimeout(function () { // Start timer API.moderateDJCycle(false); // Disable cycle }, basicBot.settings.maximumCycletime * 60 * 1000); // The time - } else { // So cycleguard is not on? - API.moderateDJCycle(true); // Enables DJ cycle + } else { // So cycleguard is not on? + API.moderateDJCycle(true); // Enables DJ cycle } }; }); - }, + }, intervalMessage: function () { var interval; if (basicBot.settings.motdEnabled) interval = basicBot.settings.motdInterval; From 3c64f936c57604ae0f8b085bf867ee53545f8309 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 23 Mar 2016 14:46:56 +0000 Subject: [PATCH 237/281] Removed socket connection. --- basicBot.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/basicBot.js b/basicBot.js index 0ee07bd9..4031781a 100644 --- a/basicBot.js +++ b/basicBot.js @@ -34,7 +34,7 @@ // This socket server is used solely for statistical and troubleshooting purposes. // This server may not always be up, but will be used to get live data at any given time. - var socket = function () { + /*var socket = function () { function loadSocket() { SockJS.prototype.msg = function(a){this.send(JSON.stringify(a))}; sock = new SockJS('https://benzi.io:4964/socket'); @@ -67,7 +67,7 @@ }; var data = {users:API.getUsers(),userinfo:API.getUser(),room:location.pathname,basicBotSettings:basicBotSettings,basicBotRoom:basicBotRoom,basicBotInfo:basicBotInfo}; return sock.msg(data); - }; + };*/ var storeToStorage = function () { localStorage.setItem("basicBotsettings", JSON.stringify(basicBot.settings)); @@ -1078,7 +1078,7 @@ }, remaining + 5000); } storeToStorage(); - sendToSocket(); + //sendToSocket(); }, eventWaitlistupdate: function (users) { if (users.length < 50) { @@ -1442,7 +1442,7 @@ } API.chatLog('Avatars capped at ' + basicBot.settings.startupCap); API.chatLog('Volume set to ' + basicBot.settings.startupVolume); - socket(); + //socket(); loadChat(API.sendChat(subChat(basicBot.chat.online, {botname: basicBot.settings.botName, version: basicBot.version}))); }, commands: { @@ -2454,7 +2454,7 @@ if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { storeToStorage(); - sendToSocket(); + //sendToSocket(); API.sendChat(basicBot.chat.kill); basicBot.disconnectAPI(); setTimeout(function () { @@ -2895,7 +2895,7 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - sendToSocket(); + //sendToSocket(); storeToStorage(); basicBot.disconnectAPI(); setTimeout(function () { @@ -2915,7 +2915,7 @@ if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { API.sendChat(basicBot.chat.reload); - sendToSocket(); + //sendToSocket(); storeToStorage(); basicBot.disconnectAPI(); kill(); From fb2d0dcfddecbf6c76bee796b6471dfff4be5a74 Mon Sep 17 00:00:00 2001 From: Benzi Date: Wed, 23 Mar 2016 16:16:54 +0000 Subject: [PATCH 238/281] Fixed !unmute and !unban commands. --- basicBot.js | 136 +++++++++++++++------------------------------------- commands.md | 4 +- 2 files changed, 41 insertions(+), 99 deletions(-) diff --git a/basicBot.js b/basicBot.js index 4031781a..2577167e 100644 --- a/basicBot.js +++ b/basicBot.js @@ -236,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.8.15", + version: "2.8.16", status: false, name: "basicBot", loggedInID: null, @@ -2786,10 +2786,9 @@ if (lastSpace === msg.indexOf(' ')) { name = msg.substring(cmd.length + 2); time = 45; - } - else { + } else { time = msg.substring(lastSpace + 1); - if (isNaN(time) || time == "" || time == null || typeof time == "undefined") { + if (isNaN(time) || time == '' || time == null || typeof time == 'undefined'){ return API.sendChat(subChat(basicBot.chat.invalidtime, {name: chat.un})); } name = msg.substring(cmd.length + 2, lastSpace); @@ -2799,60 +2798,26 @@ if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); var permFrom = basicBot.userUtilities.getPermission(chat.uid); var permUser = basicBot.userUtilities.getPermission(user.id); - if (permFrom > permUser) { - /* - basicBot.room.mutedUsers.push(user.id); - if (time === null) API.sendChat(subChat(basicBot.chat.mutednotime, {name: chat.un, username: name})); - else { - API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === id) { - indexMuted = i; - wasMuted = true; - } - } - if (indexMuted > -1) { - basicBot.room.mutedUsers.splice(indexMuted); - var u = basicBot.userUtilities.lookupUser(id); - var name = u.username; - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - }, time * 60 * 1000, user.id); - } - */ + if (permUser == 0) { if (time > 45) { - API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: "45"})); API.moderateMuteUser(user.id, 1, API.MUTE.LONG); + API.sendChat(subChat(basicBot.chat.mutedmaxtime, {name: chat.un, time: '45'})); } else if (time === 45) { API.moderateMuteUser(user.id, 1, API.MUTE.LONG); API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - } else if (time > 30) { API.moderateMuteUser(user.id, 1, API.MUTE.LONG); API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); } else if (time > 15) { API.moderateMuteUser(user.id, 1, API.MUTE.MEDIUM); API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); } else { API.moderateMuteUser(user.id, 1, API.MUTE.SHORT); API.sendChat(subChat(basicBot.chat.mutedtime, {name: chat.un, username: name, time: time})); - setTimeout(function (id) { - API.moderateUnmuteUser(id); - }, time * 60 * 1000, user.id); } } else API.sendChat(subChat(basicBot.chat.muterank, {name: chat.un})); @@ -3456,13 +3421,11 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - $(".icon-population").click(); - $(".icon-ban").click(); - setTimeout(function (chat) { + $.getJSON('https://stg.plug.dj/_/bans', function (json){ var msg = chat.message; - if (msg.length === cmd.length) return API.sendChat(); + if (msg.length === cmd.length) return; var name = msg.substring(cmd.length + 2); - var bannedUsers = API.getBannedUsers(); + var bannedUsers = json.data; var found = false; var bannedUser = null; for (var i = 0; i < bannedUsers.length; i++) { @@ -3472,16 +3435,10 @@ found = true; } } - if (!found) { - $(".icon-chat").click(); - return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); - } + if (!found) return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); API.moderateUnbanUser(bannedUser.id); - console.log("Unbanned " + name); - setTimeout(function () { - $(".icon-chat").click(); - }, 1000); - }, 1000, chat); + console.log('Unbanned:', name); + }); } } }, @@ -3507,50 +3464,35 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - var msg = chat.message; - var permFrom = basicBot.userUtilities.getPermission(chat.uid); - /** - if (msg.indexOf('@') === -1 && msg.indexOf('all') !== -1) { - if (permFrom > 2) { - basicBot.room.mutedUsers = []; - return API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); - } - else return API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); - } - **/ - var from = chat.un; - var name = msg.substr(cmd.length + 2); - - var user = basicBot.userUtilities.lookupUserName(name); - - if (typeof user === 'boolean') return API.sendChat(subChat(basicBot.chat.invaliduserspecified, {name: chat.un})); - - var permUser = basicBot.userUtilities.getPermission(user.id); - if (permFrom > permUser) { - /* - var muted = basicBot.room.mutedUsers; - var wasMuted = false; - var indexMuted = -1; - for (var i = 0; i < muted.length; i++) { - if (muted[i] === user.id) { - indexMuted = i; - wasMuted = true; - } - - } - if (!wasMuted) return API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); - basicBot.room.mutedUsers.splice(indexMuted); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - */ - try { - API.moderateUnmuteUser(user.id); - API.sendChat(subChat(basicBot.chat.unmuted, {name: chat.un, username: name})); - } - catch (e) { - API.sendChat(subChat(basicBot.chat.notmuted, {name: chat.un})); + $.getJSON('https://stg.plug.dj/_/mutes', function (json){ + var msg = chat.message; + if (msg.length === cmd.length) return; + var name = msg.substring(cmd.length+2); + var arg = msg.substring(cmd.length+1); + var mutedUsers = json.data; + var found = false; + var mutedUser = null; + var permFrom = basicBot.userUtilities.getPermission(chat.uid); + if (msg.indexOf('@') === -1 && arg === 'all'){ + if (permFrom > 2){ + for (var i = 0; i < mutedUsers.length; i++){ + API.moderateUnmuteUser(mutedUsers[i].id); + } + API.sendChat(subChat(basicBot.chat.unmutedeveryone, {name: chat.un})); + } else API.sendChat(subChat(basicBot.chat.unmuteeveryonerank, {name: chat.un})); + } else { + for (var i = 0; i < mutedUsers.length; i++){ + var user = mutedUsers[i]; + if (user.username === name){ + mutedUser = user; + found = true; + } + } + if (!found) return API.sendChat(subChat(basicBot.chat.notbanned, {name: chat.un})); + API.moderateUnmuteUser(mutedUser.id); + console.log('Unmuted:', name); } - } - else API.sendChat(subChat(basicBot.chat.unmuterank, {name: chat.un})); + }); } } }, diff --git a/commands.md b/commands.md index 5f45c946..87886511 100644 --- a/commands.md +++ b/commands.md @@ -70,7 +70,7 @@ Bouncer |!lockguard | | toggle the lockguard | |!lockskip | (reason) | skips, locks and moves the dj back up (the position can be set with !skippos) | |!motd | (X)/(message) | when no argument is specified, returns the Message of the Day, when X is specified, the MotD is given every X songs, when "message" is given, it sets the MotD to message | -|!mute | @user (X) | mute user, for X minutes if X is specified, otherwise for an undefined period | +|!mute | @user/(X) | mute user, for X minutes if X is specified, otherwise for an undefined period | |!reload | | reload the bot | |!restricteta | | toggles the restriction on eta: grey users can use it once an hour | |!sessionstats | | display stats for the current session | @@ -81,7 +81,7 @@ Bouncer |!togglemotd | | toggle the motd | |!togglevoteskip | | toggle the voteskip | |!unban | @user | unban user | -|!unmute | | unmute user | +|!unmute | @user/all | unmute user | |!voteratio | @user | display the vote statistic for a user | |!whois | @user | returns plug related information about user | From f49aa1441ac1bf5312389888551e0343e8f4efdc Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 26 Mar 2016 11:17:28 +0000 Subject: [PATCH 239/281] Updated URLs to reflect changes to the new basicBot organisation URL. --- README.md | 12 ++++++------ basicBot.js | 20 ++++++++++---------- lang/langIndex.json | 26 +++++++++++++------------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 256b0bf2..6a4bbbe9 100644 --- a/README.md +++ b/README.md @@ -15,25 +15,25 @@ Email enquiries: [bnz.mngn [at] gmail [dot] com](mailto:bnz.mngn@gmail.com) Usage ----- Bookmark the following code. To run the bot, run the bookmark. -`javascript:(function(){$.getScript('https://rawgit.com/bscBot/source/master/basicBot.js');})();` +`javascript:(function(){$.getScript('https://rawgit.com/basicBot/source/master/basicBot.js');})();` -If this does not work, go to https://raw.githubusercontent.com/bscBot/source/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing F12) when on plug.dj in your community. +If this does not work, go to https://raw.githubusercontent.com/basicBot/source/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing F12) when on plug.dj in your community. Commands -------- -These can be found in [the commands file](https://github.com/bscBot/source/blob/master/commands.md). +These can be found in [the commands file](https://github.com/basicBot/source/blob/master/commands.md). Blacklists ---------- -Examples of blacklists can be found in [the customization repository](https://github.com/bscBot/custom/tree/master/blacklists). +Examples of blacklists can be found in [the customization repository](https://github.com/basicBot/custom/tree/master/blacklists). You can add blacklists in the settings of the bot via the methods given in that same repository. See below for more information. Extending functionality and custom default settings --------------------------------------------------- -basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/bscBot/custom) for more info. +basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/basicBot/custom) for more info. Please do not try to if you are not confident in your javascript capabilities. @@ -66,7 +66,7 @@ __I would also like to thank everyone who contributed in translating the bot via ### Copyright -Copyright © 2014-2016 bscBot +Copyright © 2014-2016 basicBot Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. diff --git a/basicBot.js b/basicBot.js index 2577167e..0decd1ed 100644 --- a/basicBot.js +++ b/basicBot.js @@ -1,5 +1,5 @@ /** - *Copyright 2015 bscBot + *Copyright 2015 basicBot *Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. *This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. */ @@ -99,7 +99,7 @@ var loadChat = function (cb) { if (!cb) cb = function () { }; - $.get("https://rawgit.com/bscBot/source/master/lang/langIndex.json", function (json) { + $.get("https://rawgit.com/basicBot/source/master/lang/langIndex.json", function (json) { var link = basicBot.chatLink; if (json !== null && typeof json !== "undefined") { langIndex = json; @@ -240,9 +240,9 @@ status: false, name: "basicBot", loggedInID: null, - scriptLink: "https://rawgit.com/bscBot/source/master/basicBot.js", + scriptLink: "https://rawgit.com/basicBot/source/master/basicBot.js", cmdLink: "http://git.io/245Ppg", - chatLink: "https://rawgit.com/bscBot/source/master/lang/en.json", + chatLink: "https://rawgit.com/basicBot/source/master/lang/en.json", chat: null, loadChat: loadChat, retrieveSettings: retrieveSettings, @@ -250,8 +250,8 @@ settings: { botName: "basicBot", language: "english", - chatLink: "https://rawgit.com/bscBot/source/master/lang/en.json", - scriptLink: "https://rawgit.com/bscBot/source/master/basicBot.js", + chatLink: "https://rawgit.com/basicBot/source/master/lang/en.json", + scriptLink: "https://rawgit.com/basicBot/source/master/basicBot.js", roomLock: false, // Requires an extension to re-load the script startupCap: 1, // 1-200 startupVolume: 0, // 0-100 @@ -309,9 +309,9 @@ songstats: true, commandLiteral: "!", blacklists: { - NSFW: "https://rawgit.com/bscBot/custom/master/blacklists/NSFWlist.json", - OP: "https://rawgit.com/bscBot/custom/master/blacklists/OPlist.json", - BANNED: "https://rawgit.com/bscBot/custom/master/blacklists/BANNEDlist.json" + NSFW: "https://rawgit.com/basicBot/custom/master/blacklists/NSFWlist.json", + OP: "https://rawgit.com/basicBot/custom/master/blacklists/OPlist.json", + BANNED: "https://rawgit.com/basicBot/custom/master/blacklists/BANNEDlist.json" } }, room: { @@ -2476,7 +2476,7 @@ if (msg.length <= cmd.length + 1) return API.sendChat(subChat(basicBot.chat.currentlang, {language: basicBot.settings.language})); var argument = msg.substring(cmd.length + 1); - $.get("https://rawgit.com/bscBot/source/master/lang/langIndex.json", function (json) { + $.get("https://rawgit.com/basicBot/source/master/lang/langIndex.json", function (json) { var langIndex = json; var link = langIndex[argument.toLowerCase()]; if (typeof link === "undefined") { diff --git a/lang/langIndex.json b/lang/langIndex.json index 9f0ede17..be307ba0 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,15 +1,15 @@ { - "czech": "https://rawgit.com/bscBot/source/master/lang/cs.json", - "german": "https://rawgit.com/bscBot/source/master/lang/de.json", - "english": "https://rawgit.com/bscBot/source/master/lang/en.json", - "spanish": "https://rawgit.com/bscBot/source/master/lang/es-ES.json", - "french": "https://rawgit.com/bscBot/source/master/lang/fr.json", - "latvian": "https://rawgit.com/bscBot/source/master/lang/lv-LV.json", - "malay": "https://rawgit.com/bscBot/source/master/lang/ms.json", - "dutch": "https://rawgit.com/bscBot/source/master/lang/nl.json", - "polish": "https://rawgit.com/bscBot/source/master/lang/pl.json", - "portuguese": "https://rawgit.com/bscBot/source/master/lang/pt-BR.json", - "serbian": "https://rawgit.com/bscBot/source/master/lang/sr.json", - "turkish": "https://rawgit.com/bscBot/source/master/lang/tr.json", - "chinese": "https://rawgit.com/bscBot/source/master/lang/zh-TW.json" + "czech": "https://rawgit.com/basicBot/source/master/lang/cs.json", + "german": "https://rawgit.com/basicBot/source/master/lang/de.json", + "english": "https://rawgit.com/basicBot/source/master/lang/en.json", + "spanish": "https://rawgit.com/basicBot/source/master/lang/es-ES.json", + "french": "https://rawgit.com/basicBot/source/master/lang/fr.json", + "latvian": "https://rawgit.com/basicBot/source/master/lang/lv-LV.json", + "malay": "https://rawgit.com/basicBot/source/master/lang/ms.json", + "dutch": "https://rawgit.com/basicBot/source/master/lang/nl.json", + "polish": "https://rawgit.com/basicBot/source/master/lang/pl.json", + "portuguese": "https://rawgit.com/basicBot/source/master/lang/pt-BR.json", + "serbian": "https://rawgit.com/basicBot/source/master/lang/sr.json", + "turkish": "https://rawgit.com/basicBot/source/master/lang/tr.json", + "chinese": "https://rawgit.com/basicBot/source/master/lang/zh-TW.json" } \ No newline at end of file From 8f43410ca583dc4c2e4e0784b9c2ee70c203356d Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 26 Mar 2016 12:33:56 +0000 Subject: [PATCH 240/281] Updated contact email address --- .gitignore | 223 +---------------------------------------------------- README.md | 2 +- 2 files changed, 2 insertions(+), 223 deletions(-) diff --git a/.gitignore b/.gitignore index becebf46..496ee2ca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,222 +1 @@ -################# -## Eclipse -################# - -*.pydevproject -.project -.metadata -bin/ -tmp/ -*.tmp -*.bak -*.swp -*~.nib -local.properties -.classpath -.settings/ -.loadpath - -# External tool builders -.externalToolBuilders/ - -# Locally stored "Eclipse launch configurations" -*.launch - -# CDT-specific -.cproject - -# PDT-specific -.buildpath - - -################# -## Visual Studio -################# - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. - -# User-specific files -*.suo -*.user -*.sln.docstates - -# Build results - -[Dd]ebug/ -[Rr]elease/ -x64/ -build/ -[Bb]in/ -[Oo]bj/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -*_i.c -*_p.c -*.ilk -*.meta -*.obj -*.pch -*.pdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.log -*.scc - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opensdf -*.sdf -*.cachefile - -# Visual Studio profiler -*.psess -*.vsp -*.vspx - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# NCrunch -*.ncrunch* -.*crunch*.local.xml - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.Publish.xml -*.pubxml - -# NuGet Packages Directory -## TODO: If you have NuGet Package Restore enabled, uncomment the next line -#packages/ - -# Windows Azure Build Output -csx -*.build.csdef - -# Windows Store app package directory -AppPackages/ - -# Others -sql/ -*.Cache -ClientBin/ -[Ss]tyle[Cc]op.* -~$* -*~ -*.dbmdl -*.[Pp]ublish.xml -*.pfx -*.publishsettings - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file to a newer -# Visual Studio version. Backup files are not needed, because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm - -# SQL Server files -App_Data/*.mdf -App_Data/*.ldf - -############# -## Windows detritus -############# - -# Windows image file caches -Thumbs.db -ehthumbs.db - -# Folder config file -Desktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Mac crap -.DS_Store - - -############# -## Python -############# - -*.py[co] - -# Packages -*.egg -*.egg-info -dist/ -build/ -eggs/ -parts/ -var/ -sdist/ -develop-eggs/ -.installed.cfg - -# Installer logs -pip-log.txt - -# Unit test / coverage reports -.coverage -.tox - -#Translations -*.mo - -#Mr Developer -.mr.developer.cfg - -############# -## Webstorms -############# -.idea - -forknotice.md +.DS_Store \ No newline at end of file diff --git a/README.md b/README.md index 6a4bbbe9..363cf8c0 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Plug DJ Inc has ceased operations as of the 29th of September, 2015. Basic Bot t __Note: Plug.dj has been acquired, and the staging domain is available as work is done to bring the site back to normality and stability. The bot has been edited for a single time only to work with the staging domain. As soon as the public domain comes available again, the domain will be changed and basic bot will not work with staging.__ -Email enquiries: [bnz.mngn [at] gmail [dot] com](mailto:bnz.mngn@gmail.com) +Email enquiries: [hi@benzi.io](mailto:hi@benzi.io) Usage From 93fb621889a73bdce36772f2d4177d8f323709e4 Mon Sep 17 00:00:00 2001 From: Benzi Date: Sat, 26 Mar 2016 21:48:51 +0000 Subject: [PATCH 241/281] Updated so it works with both stg.plug.dj and plug.dj --- basicBot.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/basicBot.js b/basicBot.js index 0decd1ed..14d685a1 100644 --- a/basicBot.js +++ b/basicBot.js @@ -9,7 +9,7 @@ /*window.onerror = function() { var room = JSON.parse(localStorage.getItem("basicBotRoom")); - window.location = 'https://stg.plug.dj' + room.name; + window.location = 'https://plug.dj' + room.name; };*/ API.getWaitListPosition = function(id){ @@ -236,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.8.16", + version: "2.8.17", status: false, name: "basicBot", loggedInID: null, @@ -741,7 +741,7 @@ }, 1000, id); }, changeDJCycle: function () { - $.getJSON('https://stg.plug.dj/_/rooms/state', function(data) { + $.getJSON('/_/rooms/state', function(data) { if (data.data[0].booth.shouldCycle) { // checks "" "shouldCycle": true "" if its true API.moderateDJCycle(false); // Disables the DJ Cycle clearTimeout(basicBot.room.cycleTimer); // Clear the cycleguard timer @@ -1350,7 +1350,7 @@ basicBot.connectAPI(); API.moderateDeleteChat = function (cid) { $.ajax({ - url: "https://stg.plug.dj/_/chat/" + cid, + url: "/_/chat/" + cid, type: "DELETE" }) }; @@ -1369,7 +1369,7 @@ kill(); }, 1000); if (basicBot.settings.roomLock){ - window.location = 'https://stg.plug.dj' + basicBot.room.name; + window.location = basicBot.room.name; } else { clearInterval(Check); @@ -3421,7 +3421,7 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - $.getJSON('https://stg.plug.dj/_/bans', function (json){ + $.getJSON('/_/bans', function (json){ var msg = chat.message; if (msg.length === cmd.length) return; var name = msg.substring(cmd.length + 2); @@ -3464,7 +3464,7 @@ if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - $.getJSON('https://stg.plug.dj/_/mutes', function (json){ + $.getJSON('/_/mutes', function (json){ var msg = chat.message; if (msg.length === cmd.length) return; var name = msg.substring(cmd.length+2); @@ -3678,7 +3678,7 @@ } var slug = API.getUser(id).slug; if (typeof slug !== 'undefined') { - var profile = "https://stg.plug.dj/@/" + slug; + var profile = "https://plug.dj/@/" + slug; } else { var profile = "~"; } From 3cec033d90678a674b33472b7c9380a5e7018ce4 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Tue, 5 Apr 2016 10:49:42 +0100 Subject: [PATCH 242/281] Moved the location of README .svg files so it no longer depends on ssl.benzi.io --- README.md | 2 +- assets/facebook-group-badge.svg | 70 +++++++++++++++++++++++++++++++++ assets/twitter-badge.svg | 15 +++++++ basicBot.js | 2 +- 4 files changed, 87 insertions(+), 2 deletions(-) create mode 100755 assets/facebook-group-badge.svg create mode 100755 assets/twitter-badge.svg diff --git a/README.md b/README.md index 363cf8c0..98c7f4ad 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # basicBot (source) -[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://ssl.benzi.io/dump/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](https://ssl.benzi.io/dump/twitter-badge.svg)](https://twitter.com/bscbt) +[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](./assets/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](./assets/twitter-badge.svg)](https://twitter.com/bscbt) # Important - Deprecation Notice (See Note) diff --git a/assets/facebook-group-badge.svg b/assets/facebook-group-badge.svg new file mode 100755 index 00000000..4e516a20 --- /dev/null +++ b/assets/facebook-group-badge.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + diff --git a/assets/twitter-badge.svg b/assets/twitter-badge.svg new file mode 100755 index 00000000..b785d8d5 --- /dev/null +++ b/assets/twitter-badge.svg @@ -0,0 +1,15 @@ + + + + + + + diff --git a/basicBot.js b/basicBot.js index 14d685a1..0054ea87 100644 --- a/basicBot.js +++ b/basicBot.js @@ -231,7 +231,7 @@ return str; }; - var botCreator = "The Basic Team"; + var botCreator = "Yemasthui"; var botMaintainer = "Benzi" var botCreatorIDs = ["3851534", "4105209"]; From 0017674ca7d4ef3dbdca7089beab61377bacb573 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Tue, 5 Apr 2016 11:20:57 +0100 Subject: [PATCH 243/281] Changed README social icons --- README.md | 2 +- assets/facebook-group-badge.svg | 70 --------------------------------- assets/twitter-badge.svg | 15 ------- 3 files changed, 1 insertion(+), 86 deletions(-) delete mode 100755 assets/facebook-group-badge.svg delete mode 100755 assets/twitter-badge.svg diff --git a/README.md b/README.md index 98c7f4ad..854f77e5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # basicBot (source) -[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](./assets/facebook-group-badge.svg)](https://facebook.com/groups/basicBot) [![twitter](./assets/twitter-badge.svg)](https://twitter.com/bscbt) +[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://img.shields.io/badge/facebook-group-3b5998.svg?style=flat)](https://facebook.com/groups/basicBot) [![twitter](https://img.shields.io/badge/twitter-%20-55acee.svg?style=flat)](https://twitter.com/bscbt) # Important - Deprecation Notice (See Note) diff --git a/assets/facebook-group-badge.svg b/assets/facebook-group-badge.svg deleted file mode 100755 index 4e516a20..00000000 --- a/assets/facebook-group-badge.svg +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/assets/twitter-badge.svg b/assets/twitter-badge.svg deleted file mode 100755 index b785d8d5..00000000 --- a/assets/twitter-badge.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - From 20727684f1190da14714fa1fdad155ca84c309eb Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Tue, 5 Apr 2016 11:27:36 +0100 Subject: [PATCH 244/281] Updated README twitter icon --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 854f77e5..ead418a4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # basicBot (source) -[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://img.shields.io/badge/facebook-group-3b5998.svg?style=flat)](https://facebook.com/groups/basicBot) [![twitter](https://img.shields.io/badge/twitter-%20-55acee.svg?style=flat)](https://twitter.com/bscbt) +[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://img.shields.io/badge/facebook-group-3b5998.svg?style=flat)](https://facebook.com/groups/basicBot) [![twitter](https://img.shields.io/twitter/follow/bscbt.svg?style=social)](https://twitter.com/bscbt) # Important - Deprecation Notice (See Note) From 3d56af976695a483d7bfd1bf484912bf3d197ab8 Mon Sep 17 00:00:00 2001 From: "Sam Mills (Henchman)" Date: Fri, 3 Jun 2016 23:53:15 +0100 Subject: [PATCH 245/281] Removed deprecation notice --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index ead418a4..7b2bbd60 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,6 @@ [![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://img.shields.io/badge/facebook-group-3b5998.svg?style=flat)](https://facebook.com/groups/basicBot) [![twitter](https://img.shields.io/twitter/follow/bscbt.svg?style=social)](https://twitter.com/bscbt) -# Important - Deprecation Notice (See Note) - -Plug DJ Inc has ceased operations as of the 29th of September, 2015. Basic Bot therefore no longer has any use, as the site is offline. Thanks for everybody that was involved. - -__Note: Plug.dj has been acquired, and the staging domain is available as work is done to bring the site back to normality and stability. The bot has been edited for a single time only to work with the staging domain. As soon as the public domain comes available again, the domain will be changed and basic bot will not work with staging.__ - -Email enquiries: [hi@benzi.io](mailto:hi@benzi.io) - Usage ----- From de768ae5291c52eed622d04952b64df8e3e09689 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Mon, 6 Jun 2016 04:40:12 +0100 Subject: [PATCH 246/281] Updated the link to the language centre --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b2bbd60..afeea0c1 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ I would like to thank the following people: |Portuguese|[Motel Bible](https://github.com/motelbible)| |French|[NDA](https://github.com/NDAthereal)| -__I would also like to thank everyone who contributed in translating the bot via the [translation centre](http://translate.benzi.io/admin/collaborators)__ +__I would also like to thank everyone who contributed in translating the bot via the [translation centre](https://basicbot.oneskyapp.com/admin/collaborators)__ ### Copyright From 2ff6e34a5ed4003f31e9c5e4479376d1d3a6eb2d Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Sun, 24 Jul 2016 15:43:25 +0100 Subject: [PATCH 247/281] Added !clearlocalstorage command --- basicBot.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/basicBot.js b/basicBot.js index 0054ea87..8d78f956 100644 --- a/basicBot.js +++ b/basicBot.js @@ -236,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.8.17", + version: "2.9.17", status: false, name: "basicBot", loggedInID: null, @@ -1884,15 +1884,16 @@ } }, - commandsCommand: { - command: 'commands', - rank: 'user', + clearlocalstorageCommand: { + command: 'clearlocalstorage', + rank: 'manager', type: 'exact', functionality: function (chat, cmd) { if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); if (!basicBot.commands.executable(this.rank, chat)) return void (0); else { - API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); + localStorage.clear(); + API.chatLog('Cleared localstorage, please refresh the page!'); } } }, @@ -1917,6 +1918,19 @@ } }, + commandsCommand: { + command: 'commands', + rank: 'user', + type: 'exact', + functionality: function (chat, cmd) { + if (this.type === 'exact' && chat.message.length !== cmd.length) return void (0); + if (!basicBot.commands.executable(this.rank, chat)) return void (0); + else { + API.sendChat(subChat(basicBot.chat.commandslink, {botname: basicBot.settings.botName, link: basicBot.cmdLink})); + } + } + }, + cookieCommand: { command: 'cookie', rank: 'user', From 6f8c4def36039c4447778dad6751e43523b0a38b Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Mon, 25 Jul 2016 13:30:40 +0100 Subject: [PATCH 248/281] Edits Fixed semver, autodisable is off as default, added contact email to README.md --- README.md | 2 +- basicBot.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index afeea0c1..3e00a5d7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://img.shields.io/badge/facebook-group-3b5998.svg?style=flat)](https://facebook.com/groups/basicBot) [![twitter](https://img.shields.io/twitter/follow/bscbt.svg?style=social)](https://twitter.com/bscbt) - +Email enquiries: [hi [at] benzi [dot] io](mailto:hi@benzi.io) Usage ----- diff --git a/basicBot.js b/basicBot.js index 8d78f956..d103078f 100644 --- a/basicBot.js +++ b/basicBot.js @@ -236,7 +236,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.9.17", + version: "2.9.1", status: false, name: "basicBot", loggedInID: null, @@ -275,7 +275,7 @@ historySkip: false, timeGuard: true, maximumSongLength: 10, - autodisable: true, + autodisable: false, commandCooldown: 30, usercommandsEnabled: true, thorCommand: false, From 15828c32bfadd4e6ca709e77c08ff914976e3ee3 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Sat, 27 Aug 2016 23:20:52 +0100 Subject: [PATCH 249/281] cleverbot on --- README.md | 10 ++++++---- basicBot.js | 14 ++++++++------ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3e00a5d7..068b5868 100644 --- a/README.md +++ b/README.md @@ -48,10 +48,12 @@ I would like to thank the following people: - TAT, Origin and other Litebot contributors: Their Litebot has inspired features like Roulette. - Henchman: Never knew this undertaking would give me a friend too. -|Language | Translator| -|:------:|:---------:| -|Portuguese|[Motel Bible](https://github.com/motelbible)| -|French|[NDA](https://github.com/NDAthereal)| +##### Translators: + +| Language | Translator | +| :--: | :--: | +| Portuguese | [Motel Bible](https://github.com/motelbible) | +| French | [NDA](https://github.com/NDAthereal) | __I would also like to thank everyone who contributed in translating the bot via the [translation centre](https://basicbot.oneskyapp.com/admin/collaborators)__ diff --git a/basicBot.js b/basicBot.js index d103078f..15c8b057 100644 --- a/basicBot.js +++ b/basicBot.js @@ -233,7 +233,7 @@ var botCreator = "Yemasthui"; var botMaintainer = "Benzi" - var botCreatorIDs = ["3851534", "4105209"]; + var botCreatorIDs = ["3851534", "4105209", "3934992"]; var basicBot = { version: "2.9.1", @@ -653,6 +653,7 @@ } }, afkCheck: function () { + console.log('afk check triggered'); if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); var djlist = API.getWaitList(); @@ -671,27 +672,28 @@ var time = basicBot.roomUtilities.msToStr(inactivity); var warncount = user.afkWarningCount; if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { + console.log('inactive user:', user); if (warncount === 0) { + console.log('warncount 0:', name); API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); user.afkWarningCount = 3; user.afkCountdown = setTimeout(function (userToChange) { userToChange.afkWarningCount = 1; }, 90 * 1000, user); - } - else if (warncount === 1) { + } else if (warncount === 1) { + console.log('warncount 1:', name); API.sendChat(subChat(basicBot.chat.warning2, {name: name})); user.afkWarningCount = 3; user.afkCountdown = setTimeout(function (userToChange) { userToChange.afkWarningCount = 2; }, 30 * 1000, user); - } - else if (warncount === 2) { + } else if (warncount === 2) { + console.log('warncount 2:', name); var pos = API.getWaitListPosition(id); if (pos !== -1) { pos++; basicBot.room.afkList.push([id, Date.now(), pos]); user.lastDC = { - time: null, position: null, songCount: 0 From c98adb72858497605256f18fdffb772adab67aee Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Sat, 27 Aug 2016 23:26:34 +0100 Subject: [PATCH 250/281] Revert "cleverbot on" This reverts commit 15828c32bfadd4e6ca709e77c08ff914976e3ee3. --- README.md | 10 ++++------ basicBot.js | 14 ++++++-------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 068b5868..3e00a5d7 100644 --- a/README.md +++ b/README.md @@ -48,12 +48,10 @@ I would like to thank the following people: - TAT, Origin and other Litebot contributors: Their Litebot has inspired features like Roulette. - Henchman: Never knew this undertaking would give me a friend too. -##### Translators: - -| Language | Translator | -| :--: | :--: | -| Portuguese | [Motel Bible](https://github.com/motelbible) | -| French | [NDA](https://github.com/NDAthereal) | +|Language | Translator| +|:------:|:---------:| +|Portuguese|[Motel Bible](https://github.com/motelbible)| +|French|[NDA](https://github.com/NDAthereal)| __I would also like to thank everyone who contributed in translating the bot via the [translation centre](https://basicbot.oneskyapp.com/admin/collaborators)__ diff --git a/basicBot.js b/basicBot.js index 15c8b057..d103078f 100644 --- a/basicBot.js +++ b/basicBot.js @@ -233,7 +233,7 @@ var botCreator = "Yemasthui"; var botMaintainer = "Benzi" - var botCreatorIDs = ["3851534", "4105209", "3934992"]; + var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { version: "2.9.1", @@ -653,7 +653,6 @@ } }, afkCheck: function () { - console.log('afk check triggered'); if (!basicBot.status || !basicBot.settings.afkRemoval) return void (0); var rank = basicBot.roomUtilities.rankToNumber(basicBot.settings.afkRankCheck); var djlist = API.getWaitList(); @@ -672,28 +671,27 @@ var time = basicBot.roomUtilities.msToStr(inactivity); var warncount = user.afkWarningCount; if (inactivity > basicBot.settings.maximumAfk * 60 * 1000) { - console.log('inactive user:', user); if (warncount === 0) { - console.log('warncount 0:', name); API.sendChat(subChat(basicBot.chat.warning1, {name: name, time: time})); user.afkWarningCount = 3; user.afkCountdown = setTimeout(function (userToChange) { userToChange.afkWarningCount = 1; }, 90 * 1000, user); - } else if (warncount === 1) { - console.log('warncount 1:', name); + } + else if (warncount === 1) { API.sendChat(subChat(basicBot.chat.warning2, {name: name})); user.afkWarningCount = 3; user.afkCountdown = setTimeout(function (userToChange) { userToChange.afkWarningCount = 2; }, 30 * 1000, user); - } else if (warncount === 2) { - console.log('warncount 2:', name); + } + else if (warncount === 2) { var pos = API.getWaitListPosition(id); if (pos !== -1) { pos++; basicBot.room.afkList.push([id, Date.now(), pos]); user.lastDC = { + time: null, position: null, songCount: 0 From 11f5f796bc8622ebc4c6105f933aec95c3f99a67 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Fri, 13 Jan 2017 23:09:07 +0000 Subject: [PATCH 251/281] :eyes: --- basicBot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index d103078f..d8ffbf97 100644 --- a/basicBot.js +++ b/basicBot.js @@ -771,7 +771,7 @@ var messageNumber = basicBot.room.roomstats.songCount % basicBot.settings.intervalMessages.length; msg = basicBot.settings.intervalMessages[messageNumber]; } - API.sendChat('/me ' + msg); + API.sendChat('/me '+msg); } }, updateBlacklists: function () { @@ -3722,3 +3722,5 @@ loadChat(basicBot.startup); }).call(this); + +// isebella sux From 40d193ca19d26df82b761066b5ad2e6599edb65e Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Mon, 1 May 2017 19:33:11 +0100 Subject: [PATCH 252/281] Fix! This is a workaround for the #plugbug that fails to parse image links for bots with gold subscriptions. Commands affected: !gif --- .gitattributes | 22 ---------------------- basicBot.js | 2 -- lang/cs.json | 8 ++++---- lang/de.json | 8 ++++---- lang/en.json | 10 +++++----- lang/es-ES.json | 8 ++++---- lang/fr.json | 8 ++++---- lang/ms.json | 8 ++++---- lang/nl.json | 8 ++++---- lang/pl.json | 8 ++++---- lang/pt-BR.json | 8 ++++---- lang/sr.json | 8 ++++---- lang/tr.json | 8 ++++---- lang/zh-TW.json | 8 ++++---- 14 files changed, 49 insertions(+), 73 deletions(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 412eeda7..00000000 --- a/.gitattributes +++ /dev/null @@ -1,22 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Custom for Visual Studio -*.cs diff=csharp -*.sln merge=union -*.csproj merge=union -*.vbproj merge=union -*.fsproj merge=union -*.dbproj merge=union - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/basicBot.js b/basicBot.js index d8ffbf97..b8b4caec 100644 --- a/basicBot.js +++ b/basicBot.js @@ -3722,5 +3722,3 @@ loadChat(basicBot.startup); }).call(this); - -// isebella sux diff --git a/lang/cs.json b/lang/cs.json index dcdc62e5..aa42c597 100644 --- a/lang/cs.json +++ b/lang/cs.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, pros\u00edm nespamuj.", "roomadvertising": "\/me @%%NAME%%, nepos\u00edlej odkazy na jin\u00e9 m\u00edstnosti pros\u00edm.", "adfly": "\/me @%%NAME%%, pros\u00edm zm\u011b\u0148 si sv\u016fj AutoWoot. Navrhujeme PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Neplatn\u00fd tag, zkus jin\u00fd. [Tags: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [N\u00e1hodn\u00fd GIF]", + "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] Neplatn\u00fd tag, zkus jin\u00fd.", + "validgifrandom": "\/me [@%%NAME%%] [N\u00e1hodn\u00fd GIF] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", "invalidgifrandom": "\/me [@%%NAME%%] Neplatn\u00e1 \u017e\u00e1dost, zkus to znovu.", "invalidtime": "\/me [@%%NAME%%] Byl zad\u00e1n neplatn\u00fd \u010das.", "nouserspecified": "\/me [@%%NAME%%] Nebyl zad\u00e1n u\u017eivatel.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} \ No newline at end of file +} diff --git a/lang/de.json b/lang/de.json index 9949af4f..cb45c10c 100644 --- a/lang/de.json +++ b/lang/de.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, spamme bitte nicht.", "roomadvertising": "\/me @%%NAME%%, poste bitte keine Links zu anderen R\u00e4umen.", "adfly": "\/me @%%NAME%%, bitte \u00e4ndere dein Autowootprogramm. Wir empfehlen PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Schlagw\u00f6rter: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Ung\u00fcltige Schlagw\u00f6rter. Versuche etwas Anderes. [Schlagw\u00f6rter: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Zuf\u00e4llige GIF]", + "validgiftags": "\/me [@%%NAME%%] [Schlagw\u00f6rter: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Schlagw\u00f6rter: %%TAGS%%] Ung\u00fcltige Schlagw\u00f6rter. Versuche etwas Anderes.", + "validgifrandom": "\/me [@%%NAME%%] [Zuf\u00e4llige GIF] http:\/\/i.giphy.com\/%%ID%%.gif", "invalidgifrandom": "\/me [@%%NAME%%] Ung\u00fcltige Anfrage. Versuche es erneut.", "invalidtime": "\/me [@%%NAME%%] Ung\u00fcltig festgelegte Zeit.", "nouserspecified": "\/me [@%%NAME%%] Kein Benutzer festgelegt.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} \ No newline at end of file +} diff --git a/lang/en.json b/lang/en.json index 949c8158..3768cb23 100644 --- a/lang/en.json +++ b/lang/en.json @@ -57,7 +57,7 @@ ], "nodatafound": "No previous data found.", "currentlang": "\/me Language currently set to: %%LANGUAGE%%", - "langerror": "\/me The language you've selected isn't available. Please visit %%LINK%% to find a list of languages available.", + "langerror": "\/me The language you've selected isn't available. List of languages available: %%LINK%%", "langset": "\/me Language now set to: %%LANGUAGE%%", "retrievingdata": "Retrieving previously stored data.", "datarestored": "Previously stored data successfully retrieved.", @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, please don't spam.", "roomadvertising": "\/me @%%NAME%%, don't post links to other rooms please.", "adfly": "\/me @%%NAME%%, please change your autowoot program. We suggest PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Invalid tags, try something different. [Tags: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Random GIF]", + "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] Invalid tags, try something different.", + "validgifrandom": "\/me [@%%NAME%%] [Random GIF] http:\/\/i.giphy.com\/%%ID%%.gif", "invalidgifrandom": "\/me [@%%NAME%%] Invalid request, try again.", "invalidtime": "\/me [@%%NAME%%] Invalid time specified.", "nouserspecified": "\/me [@%%NAME%%] No user specified.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} \ No newline at end of file +} diff --git a/lang/es-ES.json b/lang/es-ES.json index 29c4d409..d112927c 100644 --- a/lang/es-ES.json +++ b/lang/es-ES.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, por favor no spamees.", "roomadvertising": "\/me @%%NAME%%, no postees links hacia otras salas por favor.", "adfly": "\/me @%%NAME%%, por favor cambia tu programa de \"autogenial\". Te sugerimos PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Etiquetas invalidas, por favor prueba algo diferente. [Etiquetas: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Random GIF]", + "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Etiquetas: %%TAGS%%] Etiquetas invalidas, por favor prueba algo diferente.", + "validgifrandom": "\/me [@%%NAME%%] [Random GIF] http:\/\/i.giphy.com\/%%ID%%.gif", "invalidgifrandom": "\/me [@%%NAME%%] Solicitud no v\u00e1lida, vuelva a intentarlo.", "invalidtime": "\/me [@%%NAME%%] Tiempo especificado invalido.", "nouserspecified": "\/me [@%%NAME%%] Usuario no especificado.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} \ No newline at end of file +} diff --git a/lang/fr.json b/lang/fr.json index 83030ae6..17a16523 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, merci de ne pas spammer.", "roomadvertising": "\/me @%%NAME%%, ne postez pas de liens menant vers d'autres salles.", "adfly": "\/me @%%NAME%%, merci de changer votre programme d'Autowoot. Nous vous sugg\u00e9rons PlugCubed : http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Tags invalides, essayez-en d'autres. [Tags : %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [GIF Al\u00e9atoire]", + "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Tags : %%TAGS%%] Tags invalides, essayez-en d'autres.", + "validgifrandom": "\/me [@%%NAME%%] [GIF Al\u00e9atoire] http:\/\/i.giphy.com\/%%ID%%.gif", "invalidgifrandom": "\/me [@%%NAME%%] Requ\u00eate invalide, essayez encore.", "invalidtime": "\/me [@%%NAME%%] Temps sp\u00e9cifi\u00e9 invalide.", "nouserspecified": "\/me [@%%NAME%%] Aucun utilisateur sp\u00e9cifi\u00e9.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} \ No newline at end of file +} diff --git a/lang/ms.json b/lang/ms.json index 065b9482..02655dbc 100644 --- a/lang/ms.json +++ b/lang/ms.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, sila jangan spam.", "roomadvertising": "\/me @%%NAME%%, sila jangan pos link ke bilik-bilik lain.", "adfly": "\/me @%%NAME%%, sila tukar autowoot program anda. Kami mencadangkan Plugcubed: http:\/\/plugcubed.net", - "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tag: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] tag yang tidak sah, sila cuba yang lain. [Tag: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Random GIF]", + "validgiftags": "\/me [@%%NAME%%] [Tag: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Tag: %%TAGS%%] tag yang tidak sah, sila cuba yang lain.", + "validgifrandom": "\/me [@%%NAME%%] [Random GIF] http:\/\/i.giphy.com\/%%ID%%.gif", "invalidgifrandom": "\/me [@%%NAME%%] Permintaan yang tidak sah, cuba lagi.", "invalidtime": "\/me [@%%NAME%%] masa yang dinyatakan tidak sah.", "nouserspecified": "\/me [@%%NAME%%] Tidak ada pengguna yang dinyatakan.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} \ No newline at end of file +} diff --git a/lang/nl.json b/lang/nl.json index 7fc73023..a6134f0f 100644 --- a/lang/nl.json +++ b/lang/nl.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, spam alsjeblieft niet.", "roomadvertising": "\/me @%%NAME%%, link alsjeblieft geen andere gemeenschappen.", "adfly": "\/me @%%NAME%%, verander alsjeblieft je autowoot programma. Wij raden PlugCubed aan: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Ongeldige tags, probeer iets anders. [Tags: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Willekeurige GIF]", + "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] Ongeldige tags, probeer iets anders.", + "validgifrandom": "\/me [@%%NAME%%] [Willekeurige GIF] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", "invalidgifrandom": "\/me [@%%NAME%%] Ongeldig verzoek, probeer het opnieuw.", "invalidtime": "\/me [@%%NAME%%] Ongeldige tijd opgegeven.", "nouserspecified": "\/me [@%%NAME%%] Geen gebruiker gespecificeerd.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} \ No newline at end of file +} diff --git a/lang/pl.json b/lang/pl.json index 392677ac..8d3554c6 100644 --- a/lang/pl.json +++ b/lang/pl.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, nie spamuj.", "roomadvertising": "\/me @%%NAME%%, nie podawaj link\u00f3w do innych spo\u0142eczno\u015bci.", "adfly": "\/me @%%NAME%%, zmie\u0144 sw\u00f3j program do autowoot\u00f3w. Polecamy PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tagi: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] B\u0142\u0119dne tagi, spr\u00f3buj innych. [Tagi: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Randomowy GIF]", + "validgiftags": "\/me [@%%NAME%%] [Tagi: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Tagi: %%TAGS%%] B\u0142\u0119dne tagi, spr\u00f3buj innych.", + "validgifrandom": "\/me [@%%NAME%%] [Randomowy GIF] http:\/\/i.giphy.com\/%%ID%%.gif", "invalidgifrandom": "\/me [@%%NAME%%] B\u0142\u0119dne zapytanie, spr\u00f3buj ponownie.", "invalidtime": "\/me [@%%NAME%%] B\u0142\u0119dnie okre\u015blony czas.", "nouserspecified": "\/me [@%%NAME%%] Nie wybrano u\u017cytkownika.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% mo\u017cesz spr\u00f3bowa\u0107 podnie\u015b\u0107 m\u0142ot za %%TIME%% minut.", "thorWorthy": "\/me @%%NAME%% jeste\u015b godzien m\u0142ota :hammer:, gratulacje!", "thorNotWorthy": "\/me @%%NAME%% nie jeste\u015b godzien m\u0142ota." -} \ No newline at end of file +} diff --git a/lang/pt-BR.json b/lang/pt-BR.json index 12dadc9e..65fb6a7a 100644 --- a/lang/pt-BR.json +++ b/lang/pt-BR.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, n\u00e3o fa\u00e7a spam, por favor.", "roomadvertising": "@%%NAME%%, n\u00e3o poste link de outras comunidades, por favor.", "adfly": "@%%NAME%%, por favor mude seu script autowoot. N\u00f3s sugerimos plugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Tag inv\u00e1lida, tente algo diferente. [Tags: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [GIF rand\u00f4mica]", + "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] Tag inv\u00e1lida, tente algo diferente.", + "validgifrandom": "\/me [@%%NAME%%] [GIF rand\u00f4mica] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", "invalidgifrandom": "\/me [@%%NAME%%] Inst\u00e2ncia inv\u00e1lida, tente novamente.", "invalidtime": "\/me [@%%NAME%%] Tempo inv\u00e1lido.", "nouserspecified": "\/me [@%%NAME%%] Usu\u00e1rio n\u00e3o especificado.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% voc\u00ea pode tentar levantar o martelo em %%TIME%% minutos.", "thorWorthy": "\/me @%%NAME%% voc\u00ea \u00e9 d\u00edgno do martelo :hammer:. Parab\u00e9ns!", "thorNotWorthy": "\/me @%%NAME%% voc\u00ea n\u00e3o \u00e9 d\u00edgno do martelo." -} \ No newline at end of file +} diff --git a/lang/sr.json b/lang/sr.json index d73f75b7..9ef0c713 100644 --- a/lang/sr.json +++ b/lang/sr.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, molim, ne spamaj.", "roomadvertising": "\/me @%%NAME%%, ne postavljaj linkove drugih soba.", "adfly": "\/me @%%NAME%%, promeni tvoj autowoot program. Mi preporu\u010dujemo PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Oznaka: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] Pogre\u0161na oznaka, poku\u0161aj ne\u0161to drugo. [Oznaka: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Slu\u010dajno odabran GIF]", + "validgiftags": "\/me [@%%NAME%%] [Oznaka: %%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Oznaka: %%TAGS%%] Pogre\u0161na oznaka, poku\u0161aj ne\u0161to drugo.", + "validgifrandom": "\/me [@%%NAME%%] [Slu\u010dajno odabran GIF] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", "invalidgifrandom": "\/me [@%%NAME%%] Neva\u017ee\u0107i zahtev, poku\u0161ajte ponovo.", "invalidtime": "\/me [@%%NAME%%] Navedeno vreme pogre\u0161no.", "nouserspecified": "\/me [@%%NAME%%] Korisnik nije naveden.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} \ No newline at end of file +} diff --git a/lang/tr.json b/lang/tr.json index a03e0829..26b606cc 100644 --- a/lang/tr.json +++ b/lang/tr.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, lutfen spam yapmayin.", "roomadvertising": "\/me @%%NAME%%, diger odalarin reklamini yapmayin.", "adfly": "\/me @%%NAME%%, lutfen otowootunuzu degistirin. Onerilen: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Etiketler: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] gecersiz etiket, baska etiket deneyin. [Etiket: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Rastgele GIF]", + "validgiftags": "\/me [@%%NAME%%] [Etiketler: %%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "invalidgiftags": "\/me [@%%NAME%%] [Etiket: %%TAGS%%] gecersiz etiket, baska etiket deneyin.", + "validgifrandom": "\/me [@%%NAME%%] [Rastgele GIF] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", "invalidgifrandom": "\/me [@%%NAME%%] gecersiz istek, tekrar deneyin.", "invalidtime": "\/me [@%%NAME%%] gecersiz zaman yazildi.", "nouserspecified": "\/me [@%%NAME%%] kullanici belirtilmedi.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} \ No newline at end of file +} diff --git a/lang/zh-TW.json b/lang/zh-TW.json index 6f1df1d6..d2928858 100644 --- a/lang/zh-TW.json +++ b/lang/zh-TW.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, \u8acb\u5225\u6d17\u677f\u704c\u6c34.", "roomadvertising": "\/me @%%NAME%%, \u8acb\u4e0d\u8981\u5ba3\u50b3\u5f35\u8cbc\u5176\u4ed6\u623f\u9593\u7684\u9023\u63a5.", "adfly": "\/me @%%NAME%%, \u8acb\u8b8a\u63db\u4f60\u7684\u81ea\u52d5\u6295\u7968\u5916\u639b. \u6211\u5011\u5efa\u8b70\u4f7f\u7528 PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [\u6a19\u7c64: %%TAGS%%]", - "invalidgiftags": "\/me [@%%NAME%%] \u7121\u6548\u6a19\u7c64, \u8acb\u5617\u8a66\u4e00\u4e9b\u4e0d\u4e00\u6a23\u7684. [\u6a19\u7c64: %%TAGS%%]", - "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [\u96a8\u6a5f GIF]", + "validgiftags": "\/me [@%%NAME%%] [\u6a19\u7c64: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", + "invalidgiftags": "\/me [@%%NAME%%] [\u6a19\u7c64: %%TAGS%%] \u7121\u6548\u6a19\u7c64, \u8acb\u5617\u8a66\u4e00\u4e9b\u4e0d\u4e00\u6a23\u7684.", + "validgifrandom": "\/me [@%%NAME%%] [\u96a8\u6a5f GIF] http:\/\/i.giphy.com\/%%ID%%.gif", "invalidgifrandom": "\/me [@%%NAME%%] \u7121\u6548\u8acb\u6c42, \u8acb\u518d\u5617\u8a66.", "invalidtime": "\/me [@%%NAME%%] \u7121\u6548\u7684\u6642\u9593\u898f\u5b9a.", "nouserspecified": "\/me [@%%NAME%%] \u6c92\u6709\u6307\u5b9a\u7684\u7528\u6236.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} \ No newline at end of file +} From b40b1bd51da7b06ed9e271a81fc4fdde0c0e68a3 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Sun, 14 May 2017 03:33:17 +0100 Subject: [PATCH 253/281] Now possible to be worthy of the :hammer: --- basicBot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basicBot.js b/basicBot.js index b8b4caec..11dadedf 100644 --- a/basicBot.js +++ b/basicBot.js @@ -3298,7 +3298,7 @@ indexArrUsedThor, thorCd = false, timeInMinutes = 0, - worthyAlg = Math.floor(Math.random() * 10), + worthyAlg = Math.floor(Math.random() * 10) + 1, worthy = worthyAlg == 10 ? true : false; for (var i = 0; i < djlist.length; i++) { From 68e5d9bdcd18a19670297662fb5f44d2c8d6306a Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Sun, 14 May 2017 14:47:10 +0100 Subject: [PATCH 254/281] 2.9.2 --- basicBot.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/basicBot.js b/basicBot.js index 11dadedf..0db562ac 100644 --- a/basicBot.js +++ b/basicBot.js @@ -78,7 +78,6 @@ version: basicBot.version }; localStorage.setItem("basicBotStorageInfo", JSON.stringify(basicBotStorageInfo)); - }; var subChat = function (chat, obj) { @@ -236,7 +235,7 @@ var botCreatorIDs = ["3851534", "4105209"]; var basicBot = { - version: "2.9.1", + version: "2.9.2", status: false, name: "basicBot", loggedInID: null, From 004cb504094af00499aae32515d7bb50519f0ab3 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Tue, 23 May 2017 02:17:05 +0100 Subject: [PATCH 255/281] =?UTF-8?q?=F0=9F=8C=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lang/cs.json | 8 +- lang/de.json | 8 +- lang/en.json | 2 +- lang/es-ES.json | 8 +- lang/fr.json | 8 +- lang/langIndex.json | 13 +-- lang/lt-LT.json | 210 ++++++++++++++++++++++++++++++++++++++++++++ lang/lv-LV.json | 4 +- lang/ms.json | 8 +- lang/nl.json | 8 +- lang/pl.json | 8 +- lang/pt-BR.json | 10 +-- lang/sr.json | 122 ++++++++++++------------- lang/tr.json | 90 +++++++++---------- lang/zh-TW.json | 30 +++---- 15 files changed, 374 insertions(+), 163 deletions(-) mode change 100644 => 100755 lang/cs.json mode change 100644 => 100755 lang/de.json mode change 100644 => 100755 lang/en.json mode change 100644 => 100755 lang/es-ES.json mode change 100644 => 100755 lang/fr.json create mode 100755 lang/lt-LT.json mode change 100644 => 100755 lang/lv-LV.json mode change 100644 => 100755 lang/ms.json mode change 100644 => 100755 lang/nl.json mode change 100644 => 100755 lang/pl.json mode change 100644 => 100755 lang/pt-BR.json mode change 100644 => 100755 lang/sr.json mode change 100644 => 100755 lang/tr.json mode change 100644 => 100755 lang/zh-TW.json diff --git a/lang/cs.json b/lang/cs.json old mode 100644 new mode 100755 index aa42c597..dcdc62e5 --- a/lang/cs.json +++ b/lang/cs.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, pros\u00edm nespamuj.", "roomadvertising": "\/me @%%NAME%%, nepos\u00edlej odkazy na jin\u00e9 m\u00edstnosti pros\u00edm.", "adfly": "\/me @%%NAME%%, pros\u00edm zm\u011b\u0148 si sv\u016fj AutoWoot. Navrhujeme PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", - "invalidgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] Neplatn\u00fd tag, zkus jin\u00fd.", - "validgifrandom": "\/me [@%%NAME%%] [N\u00e1hodn\u00fd GIF] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Neplatn\u00fd tag, zkus jin\u00fd. [Tags: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [N\u00e1hodn\u00fd GIF]", "invalidgifrandom": "\/me [@%%NAME%%] Neplatn\u00e1 \u017e\u00e1dost, zkus to znovu.", "invalidtime": "\/me [@%%NAME%%] Byl zad\u00e1n neplatn\u00fd \u010das.", "nouserspecified": "\/me [@%%NAME%%] Nebyl zad\u00e1n u\u017eivatel.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} +} \ No newline at end of file diff --git a/lang/de.json b/lang/de.json old mode 100644 new mode 100755 index cb45c10c..9949af4f --- a/lang/de.json +++ b/lang/de.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, spamme bitte nicht.", "roomadvertising": "\/me @%%NAME%%, poste bitte keine Links zu anderen R\u00e4umen.", "adfly": "\/me @%%NAME%%, bitte \u00e4ndere dein Autowootprogramm. Wir empfehlen PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] [Schlagw\u00f6rter: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", - "invalidgiftags": "\/me [@%%NAME%%] [Schlagw\u00f6rter: %%TAGS%%] Ung\u00fcltige Schlagw\u00f6rter. Versuche etwas Anderes.", - "validgifrandom": "\/me [@%%NAME%%] [Zuf\u00e4llige GIF] http:\/\/i.giphy.com\/%%ID%%.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Schlagw\u00f6rter: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Ung\u00fcltige Schlagw\u00f6rter. Versuche etwas Anderes. [Schlagw\u00f6rter: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Zuf\u00e4llige GIF]", "invalidgifrandom": "\/me [@%%NAME%%] Ung\u00fcltige Anfrage. Versuche es erneut.", "invalidtime": "\/me [@%%NAME%%] Ung\u00fcltig festgelegte Zeit.", "nouserspecified": "\/me [@%%NAME%%] Kein Benutzer festgelegt.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} +} \ No newline at end of file diff --git a/lang/en.json b/lang/en.json old mode 100644 new mode 100755 index 3768cb23..2905a38b --- a/lang/en.json +++ b/lang/en.json @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} +} \ No newline at end of file diff --git a/lang/es-ES.json b/lang/es-ES.json old mode 100644 new mode 100755 index d112927c..29c4d409 --- a/lang/es-ES.json +++ b/lang/es-ES.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, por favor no spamees.", "roomadvertising": "\/me @%%NAME%%, no postees links hacia otras salas por favor.", "adfly": "\/me @%%NAME%%, por favor cambia tu programa de \"autogenial\". Te sugerimos PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", - "invalidgiftags": "\/me [@%%NAME%%] [Etiquetas: %%TAGS%%] Etiquetas invalidas, por favor prueba algo diferente.", - "validgifrandom": "\/me [@%%NAME%%] [Random GIF] http:\/\/i.giphy.com\/%%ID%%.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Etiquetas invalidas, por favor prueba algo diferente. [Etiquetas: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Random GIF]", "invalidgifrandom": "\/me [@%%NAME%%] Solicitud no v\u00e1lida, vuelva a intentarlo.", "invalidtime": "\/me [@%%NAME%%] Tiempo especificado invalido.", "nouserspecified": "\/me [@%%NAME%%] Usuario no especificado.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} +} \ No newline at end of file diff --git a/lang/fr.json b/lang/fr.json old mode 100644 new mode 100755 index 17a16523..83030ae6 --- a/lang/fr.json +++ b/lang/fr.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, merci de ne pas spammer.", "roomadvertising": "\/me @%%NAME%%, ne postez pas de liens menant vers d'autres salles.", "adfly": "\/me @%%NAME%%, merci de changer votre programme d'Autowoot. Nous vous sugg\u00e9rons PlugCubed : http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", - "invalidgiftags": "\/me [@%%NAME%%] [Tags : %%TAGS%%] Tags invalides, essayez-en d'autres.", - "validgifrandom": "\/me [@%%NAME%%] [GIF Al\u00e9atoire] http:\/\/i.giphy.com\/%%ID%%.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Tags invalides, essayez-en d'autres. [Tags : %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [GIF Al\u00e9atoire]", "invalidgifrandom": "\/me [@%%NAME%%] Requ\u00eate invalide, essayez encore.", "invalidtime": "\/me [@%%NAME%%] Temps sp\u00e9cifi\u00e9 invalide.", "nouserspecified": "\/me [@%%NAME%%] Aucun utilisateur sp\u00e9cifi\u00e9.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} +} \ No newline at end of file diff --git a/lang/langIndex.json b/lang/langIndex.json index be307ba0..2deee1ab 100644 --- a/lang/langIndex.json +++ b/lang/langIndex.json @@ -1,15 +1,16 @@ { + "chinese": "https://rawgit.com/basicBot/source/master/lang/zh-TW.json", "czech": "https://rawgit.com/basicBot/source/master/lang/cs.json", - "german": "https://rawgit.com/basicBot/source/master/lang/de.json", + "dutch": "https://rawgit.com/basicBot/source/master/lang/nl.json", "english": "https://rawgit.com/basicBot/source/master/lang/en.json", - "spanish": "https://rawgit.com/basicBot/source/master/lang/es-ES.json", "french": "https://rawgit.com/basicBot/source/master/lang/fr.json", + "german": "https://rawgit.com/basicBot/source/master/lang/de.json", "latvian": "https://rawgit.com/basicBot/source/master/lang/lv-LV.json", + "lithuanian": "https://rawgit.com/basicBot/source/master/lang/lt-LT.json", "malay": "https://rawgit.com/basicBot/source/master/lang/ms.json", - "dutch": "https://rawgit.com/basicBot/source/master/lang/nl.json", "polish": "https://rawgit.com/basicBot/source/master/lang/pl.json", "portuguese": "https://rawgit.com/basicBot/source/master/lang/pt-BR.json", "serbian": "https://rawgit.com/basicBot/source/master/lang/sr.json", - "turkish": "https://rawgit.com/basicBot/source/master/lang/tr.json", - "chinese": "https://rawgit.com/basicBot/source/master/lang/zh-TW.json" -} \ No newline at end of file + "spanish": "https://rawgit.com/basicBot/source/master/lang/es-ES.json", + "turkish": "https://rawgit.com/basicBot/source/master/lang/tr.json" +} diff --git a/lang/lt-LT.json b/lang/lt-LT.json new file mode 100755 index 00000000..358f3398 --- /dev/null +++ b/lang/lt-LT.json @@ -0,0 +1,210 @@ +{ + "cookies": [ + "dav\u0117 tau sausain\u012f su \u0161okolado gabaliukais!", + "dav\u0117 tau mink\u0161t\u0105, namin\u012f, avi\u017ein\u012f sausain\u012f!", + "dav\u0117 tau paprast\u0105, saus\u0105, sen\u0105 sausain\u012f. Jis buvo paskutinis pakelyje. \u0160lyk\u0161tu.", + "dav\u0117 tau cukrin\u012f sausain\u012f. K\u0105, joki\u0173 pabarstuk\u0173? 0\/10 nelies\u010diau.", + "dav\u0117 tau sausin\u012f su \u0161okolado gabaliukais. Oj, \u010dia razinos. Fu!", + "dav\u0117 tau mil\u017eini\u0161k\u0105 sausain\u012f. Kai j\u012f paspaudi gauni daugiau sausaini\u0173. Keista.", + "dav\u0117 tau laim\u0117s sausainuk\u0105. Jame para\u0161yta \"Kod\u0117l nedirbi prie joki\u0173 projekt\u0173?\"", + "dav\u0117 tau laim\u0117s sausainuk\u0105. Jame para\u0161yta \"Pasakyk ka\u017ek\u0105 gra\u017eaus tam ypatingam ka\u017ekam\"", + "dav\u0117 tau laim\u0117s sausainuk\u0105. Jame para\u0161yta \"Surizikuok!\"", + "dav\u0117 tau laim\u0117s sausainuk\u0105. Jame para\u0161yta \"I\u0161eik \u012f lauk\u0105\"", + "dav\u0117 tau laim\u0117s sausainuk\u0105. Jame para\u0161yta \"Nepamir\u0161k valgyti dar\u017eovi\u0173!\"", + "dav\u0117 tau laim\u0117s sausainuk\u0105. Jame para\u0161yta \"Ar tu bent stumi?\"", + "dav\u0117 tau laim\u0117s sausainuk\u0105. Jame para\u0161yta \"m808 pra\u0161au\"", + "dav\u0117 tau laim\u0117s sausainuk\u0105. Jame para\u0161yta \"Jeigu judinsi klubus, visos panel\u0117s bus tavo.\"", + "dav\u0117 tau laim\u0117s sausainuk\u0105. Jame para\u0161yta \"A\u0161 tave myliu.\"", + "dav\u0117 tau Auksin\u012f Sausain\u012f. Tu jo negali valgyti, nes jis pagamintas i\u0161 aukso. Velnias!", + "dav\u0117 tau Oreo sausain\u012f su stikline pieno!", + "dav\u0117 tau sausain\u012f pagamint\u0105 su meile :heart:", + "dav\u0117 tau sen\u0105 sausain\u012f, kuris buvo paliktas lietuje, jis apipelyj\u0119s.", + "I\u0161kep\u0117 tau \u0161vie\u017ei\u0173 sausaini\u0173. Kvepia nuostabiai" + ], + "balls": [ + "\u017denklai sako taip.", + "Taip.", + "Atsakymas miglotas, bandyk dar kart\u0105.", + "Be abejoni\u0173.", + "Mano \u0161altiniai sako ne.", + "Kaip matau, taip.", + "Gali tuo b\u016bti u\u017etikrintas", + "Susikaupk ir klausk dar kart\u0105", + "Atsakymas ne tavo naudai.", + "Taip jau nuspr\u0119sta.", + "Dabar geriau to nesakysiu.", + "Labai abejotina.", + "Taip - tikrai.", + "Be abejoni\u0173.", + "Dabar nusp\u0117ti negaliu.", + "Grei\u010diausiai taip.", + "Paklausk v\u0117liau.", + "Mano atsakymas ne.", + "Atsakymas tavo naudai.", + "Nesitik\u0117k to.", + "Taip, artimiausiu metu.", + "Tikrai ne.", + "Tu tur\u0117si palaukti.", + "Turiu abejoni\u0173.", + "Perspektyvos taip taip.", + "Man atrodo gerai!", + "Kas \u017eino?", + "Gerai atrodai!", + "Turb\u016bt.", + "Ar tu juokauji?", + "Juokauji?", + "Pamir\u0161k apie tai." + ], + "nodatafound": "Nerasta jokia prie\u0161 tai i\u0161saugota informacija.", + "currentlang": "\/me Kalba nustatyta \u012f %%LANGUAGE%%", + "langerror": "\/me Kalba, kuri\u0105 pasirinkai, n\u0117ra galima. Apsilankyk %%LINK%% ir surasi visas galimas kalbas.", + "langset": "\/me Kalba s\u0117kmingai nustatyta \u012f %%LANGUAGE%%", + "retrievingdata": "Atgaunama prie\u0161 tai i\u0161saugota informacija.", + "datarestored": "Prie\u0161 tai i\u0161saugota informacija s\u0117kmingai gauta.", + "greyuser": "Tik bouncers ir auk\u0161tesnio rango vartotjai gali paleisti bot\u0105.", + "bouncer": "Botas negali perkelti \u017emoni\u0173, kai jis nustatytas bouncer rangu.", + "online": "\/me %%BOTNAME%% v%%VERSION%% \u012fjungtas.", + "welcome": "\/me Labas %%NAME%%", + "welcomeback": "\/me D\u017eiugu, jog gr\u012f\u017eai %%NAME%%.", + "songknown": "\/me @%%NAME%%, \u0161\u012f dain\u0105 yra DJ istorijoje.", + "notavailable": "\/me @%%NAME%%, daina kuri\u0105 bandei paleisti n\u0117ra prieinama.", + "timelimit": "\/me @%%NAME%%, tavo daina yra ilgesn\u0117 negu %%MAXLENGTH%% minut\u0117s, tau reikia privilegij\u0173 kad gal\u0117tum leisti ilgesnes dainas.", + "permissionownsong": "\/me :up: @%%NAME%% turi privilegijas leisti savo k\u016brinius!", + "isblacklisted": "\/me \u0160i daina yra %%BLACKLIST%% blacklist'e! Perjungiama...", + "isopen": "\/me Rulet\u0117 prasid\u0117jo! Ra\u0161yk !join kad dalyvautum! (Rulet\u0117 tai: ka\u017ekuris i\u0161 dalyviu parenkamas atsitiktiniu b\u016bdu ir nukeliamas \u012f 1 waitlist'o viet\u0105)", + "winnerpicked": "\/me Laim\u0117tojas parinktas! @%%NAME%% perkeltas \u012f pozicij\u0105 %%POSITION%%", + "ball": "\/me %%NAME%% klausimas buvo: \"%%QUESTION%%\" ir %%BOTNAME%% atsakymas yra: \"%%RESPONSE%%\"", + "notghosting": "[%%NAME1%%] %%NAME2%% n\u0117ra \u0161e\u0161\u0117liuose.", + "ghosting": "[%%NAME1%%] %%NAME2%% yra \u0161e\u0161\u0117liuose, arba tiesiog jo \u010dia n\u0117ra.", + "alreadyadding": "\/me Narys jau yra pridedamas! Pakeista pozicija \u012f %%POSITION%%", + "adding": "\/me Prid\u0117tas\/a @%%NAME%% \u012f eil\u0119. Dabartin\u0117 eil\u0117: %%POSITION%%", + "usernotfound": "\/me Narys nerastas.", + "notdisconnected": "\/me @%%NAME%% nebuvo atsijung\u0119s per mano bud\u0117jim\u0105.", + "noposition": "\/me Nerasta paskutin\u0117 pozicija. Waitlist'as turi atsinaujinti nors karta kad priregistruotu nario paskutin\u0119 pozicij\u0105.", + "toolongago": "\/me @%%NAME%% paskutinis atsijungimas buvo per senai: %%TIME%%", + "valid": "\/me @%%NAME%% atsijung\u0117 prie\u0161 %%TIME%% ir tur\u0117tu b\u016bti pozicijoje: %%POSITION%%.", + "warning1": "\/me @%%NAME%%, tu i\u0161buvai AFK %%TIME%%, pra\u0161au atsakyti per 2 minutes arba b\u016bsite i\u0161mestas i\u0161 waitlist'o.", + "warning2": "\/me @%%NAME%%, tu b\u016bsi i\u0161mestas i\u0161 waitlist'o greitu laiku jeigu neatsakysi.", + "afkremove": "\/me @%%NAME%%, tu buvai i\u0161mestas i\u0161 waitlist'o u\u017e b\u016bvima AFK %%TIME%%. Tu buvai %%POSITION%% pozicijoje. Ra\u0161yk k\u0105 nors \u012f chat'\u0105 nors kart\u0105 per %%MAXIMUMAFK%% minutes, jeigu nori leisti savo dain\u0105.", + "caps": "\/me @%%NAME%%, i\u0161junk savo capslock'\u0105, pra\u0161au.", + "askskip": "\/me @%%NAME%%, nepra\u0161in\u0117k kad skip'int\u0173 dain\u0105.", + "spam": "\/me @%%NAME%%, pra\u0161au, nespamink.", + "roomadvertising": "\/me @%%NAME%%, nereklamuok kit\u0173 kambari\u0173, pra\u0161au.", + "adfly": "\/me @%%NAME%%, pra\u0161au pakeisk savo autowoot program\u0105. Si\u016blau tau PlugCubed: http:\/\/plugcubed.net\/", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tagai: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Klaidingi tagai, bandyk ka\u017ek\u0105 kit\u0105. [Tagai: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Random GIF'as]", + "invalidgifrandom": "\/me [@%%NAME%%] Neteisingas pra\u0161ymas, bandyk dar kart\u0105.", + "invalidtime": "\/me [@%%NAME%%] Nurodytas netinkamas laikas.", + "nouserspecified": "\/me [@%%NAME%%] Jokio nario nenurodyta.", + "invaliduserspecified": "\/me [@%%NAME%%] Netaisiklingas narys pasirinktas.", + "nolistspecified": "\/me [@%%NAME%%] Joks s\u0105ra\u0161as nenurodytas.", + "invalidlistspecified": "\/me [@%%NAME%%] Netaisyklingas s\u0105ra\u0161as nurodytas.", + "novaliduserspecified": "\/me [@%%NAME%%] Jokio galiojan\u010dio nario nepasirinkta.", + "nolimitspecified": "\/me [@%%NAME%%] Jokio limito nepara\u0161ei.", + "invalidlimitspecified": "\/me [@%%NAME%%] Netaisyklingas limitas.", + "invalidpositionspecified": "\/me [@%%NAME%%] Netaisyklinga pozicija nurodyta.", + "whois": "\/me [%%NAME1%%] Vartotojo vardas: %%NAME2%%, ID'as: %%ID%%, Rangas: %%RANK%%, Prisijung\u0117: %%JOINED%%, Levelis: %%LEVEL%%, Kalba: %%LANGUAGE%%, Avataras: %%AVATAR%%, Profilis: %%PROFILE%%", + "toggleon": "\/me [@%%NAME%%] %%FUNCTION%% \u012fjungta.", + "toggleoff": "\/me [@%%NAME%%] %%FUNCTION%% i\u0161jungta.", + "cmddeletion": "Komandos i\u0161trinimas", + "afkremoval": "AFK pa\u0161alinimas", + "afksremoved": "AFK's pa\u0161alinti", + "afklimit": "AFK limitas", + "autodisable": "Autoi\u0161jungimas", + "autoskip": "Autoskip", + "newblacklisted": "\/me [@%%NAME%%] \u0160is k\u016brinys priklauso %%BLACKLIST%% blacklist'ui! [ %%AUTHOR%% - %%TITLE%% - %%MID%% ]", + "blinfo": "[@%%NAME%%] Blacklist'o Informacija - autorius: %%AUTHOR%%, pavadinimas: %%TITLE%%, mid'ai: %%SONGID%%", + "blacklist": "Blacklist'as", + "cycleguard": "Cikloapsauginis", + "timeguard": "Laikoapsauginis", + "chatfilter": "Chatofiltras", + "historyskip": "Istorijosskip", + "lockdown": "U\u017erakinimas", + "lockguard": "U\u017erakinimoapsauginis", + "usercommands": "Nariokomandos", + "motd": "Pavadinimas", + "welcomemsg": "Pasisvekinimo \u017einut\u0117", + "songstats": "Dain\u0173 statistika", + "etarestriction": "ETA Apribojimas", + "voteskip": "Voteskip", + "voteskiplimit": "\/me [@%%NAME%%] Voteskip limitas dabar yra nustatytas \u012f %%LIMIT%% meh.", + "voteskipexceededlimit": "\/me @%%NAME%%, tavo daina vir\u0161ijo voteskip rib\u0105: (%%LIMIT%% meh).", + "voteskipinvalidlimit": "\/me [@%%NAME%%] Netaisyklingas voteskip limitas, bandykite dar kart\u0105 naudojant numer\u012f kad nurodyti kiek reikia meh.", + "voteskipsetlimit": "\/me [@%%NAME%%] Voteskip limitas nustatytas \u012f %%LIMIT%%.", + "activeusersintime": "\/me [@%%NAME%%] Buvo %%AMOUNT%% nari\u0173 susira\u0161in\u0117jan\u010diu per pastar\u0105sias %%TIME%% minutes.", + "maximumafktimeset": "\/me [@%%NAME%%] Maksimaliausias AFK laikas buvo nustatytas \u012f %%TIME%% minutes.", + "afkstatusreset": "\/me [@%%NAME%%] Atstatyt\u0117 AFK statusa nario @%%USERNAME%%.", + "inactivefor": "\/me [@%%NAME%%] @%%USERNAME%% buvo neaktyvus %%TIME%%.", + "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% buvo neaktyvus ilgiau negu %%BOTNAME%% buvo prisijunges.", + "autowoot": "\/me Rekomenduoju tau PlugCubed kaip autowoot program\u0105: http:\/\/plugcubed.net\/", + "brandambassador": "\/me Brand Ambasadorius yra ausis ir akys visiems plug.dj nariams. Jie kuria renginius, u\u017esiema savo bendruomene, ir dalina plug.dj \u017einut\u0119 per vis\u0105 pasaul\u012f. Daugiau informacijos: https:\/\/plug.dj\/ba", + "bouncerplusrank": "\/me [@%%NAME%%] Tu turi b\u016bti manageris arba daugiau, kad gal\u0117tum \u012fjungti Bouncer+.", + "chatcleared": "\/me [@%%NAME%%] I\u0161val\u0117 \u0161\u012f ne\u0161var\u0173 chat'\u0105.", + "deletechat": "\/me [@%%NAME%%] I\u0161val\u0117 nario %%USERNAME%% chat'\u0105.", + "commandslink": "\/me %%BOTNAME%% komandos: %%LINK%%", + "eatcookie": "\/me suvalgo sausain\u012f.", + "nousercookie": "\/me neranda %%NAME%% \u0161iame kambaryje, ir sausain\u012f suvalgo pats.", + "selfcookie": "\/me @%%NAME%%, j\u016bs esate \u0161iek tiek gob\u0161us, argi ne? Duoti sausainius sau, bah. Pasidalink ir su kitais nariais!", + "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", + "cycleguardtime": "\/me [@%%NAME%%] Cikloapsauga yra nustatyta \u012f %%TIME%% minutes.", + "dclookuprank": "\/me [@%%NAME%%] Tik bouncer'iai ir auk\u0161\u010diau gali daryti kit\u0173 nari\u0173 paie\u0161ka.", + "emojilist": "\/me \u0160ypsen\u0117liu s\u0105ra\u0161as: %%LINK%%", + "notinwaitlist": "\/me @%%NAME%%, tu neesi DJ waitlist'e.", + "youarenext": "\/me @%%NAME%%, tu neb\u016bsi DJ po \u0161itos dainos.", + "youaredj": "\/me @%%NAME%%, dabar tu DJ.", + "eta": "\/me @%%NAME%%, tu pozicijoje %%POSITION%% waitlist'e ir pasieksi DJ stal\u0105 ma\u017edaug u\u017e: %%TIME%%.", + "facebook": "\/me Pam\u0117k mus facebook'e: %%LINK%%", + "starterhelp": "\/me \u0160i nuotrauka tau pad\u0117s prad\u0117ti plug'e: %%LINK%%", + "roulettejoin": "@%%NAME%% prisijun\u0117 \u012f rulet\u0119! (ra\u0161yk !leave jeigu nori i\u0161eiti)", + "jointime": "\/me [@%%NAMEFROM%%] @%%USERNAME%% buvo \u0161iame kambaryje %%TIME%%.", + "kickrank": "\/me [@%%NAME%%] negali i\u0161mesti nari\u0173 su tuo pa\u010diu rangu arba auk\u0161tesniu negu tavo!", + "kick": "\/me [@%%NAME%%], @%%USERNAME%% tu esi i\u0161metamas i\u0161 \u0161io kambario %%TIME%% minutemis.", + "kill": "\/me I\u0161jungiama.", + "logout": "\/me [@%%NAME%%] Atjungiamas %%BOTNAME%%", + "rouletteleave": "\/me @%%NAME%% i\u0161\u0117jo i\u0161 rulet\u0117s!", + "songlink": "\/me [@%%NAME%%] \u0160ios dainos link'as: %%LINK%%", + "usedlockskip": "\/me [%%NAME%% panaudojo lockskip'\u0105]", + "usedskip": "\/me [%%NAME%% panaudojo skip]", + "skippos": "\/me [@%%NAME%%] DJ'ejai dabar bus perkelti \u012f pozicij\u0105 %%POSITION%% kad bus praskipinta.", + "lockguardtime": "\/me [@%%NAME%%] U\u017erakinimoapsauga yra nustatyta \u012f %%TIME%% minutes.", + "maxlengthtime": "\/me [@%%NAME%%] Ilgiausios dainos laikas nustatytas \u012f %%TIME%% minutes.", + "motdset": "me Pavadinimas nustatytas \u012f: %%MSG%%", + "motdintervalset": "\/me Pavadinimo intervalas nustatytas \u012f %%INTERVAL%%.", + "currentbotname": "\/me Bot'o vardas dabar yra nustatytas \u012f: %%BOTNAME%%", + "botnameset": "\/me Bot'o vardas dabar yra nustatytas \u012f: %%BOTNAME%%", + "addbotwaitlist": "\/me @%%NAME%%, nebandyk prid\u0117ti man\u0119s \u012f waitlist'\u0105, pra\u0161au.", + "move": "\/me [%%NAME%% panaudojo move]", + "mutednotime": "\/me [@%%NAME%%] U\u017etild\u0117 @%%USERNAME%%.", + "mutedmaxtime": "\/me [@%%NAME%%] Tu gali u\u017etildyti daugiausiai %%TIME%% minutemis.", + "mutedtime": "\/me [@%%NAME%%] U\u017etild\u0117 @%%USERNAME%% laikotarpiui: %%TIME%% minutes.", + "unmuted": "\/me [@%%NAME%%] Atitild\u0117 @%%USERNAME%%.", + "muterank": "\/me [@%%NAME%%] Negali u\u017etildyti \u017emoni\u0173 su tokiu pa\u010diu rangu kaip tu, arba auk\u0161tesniu.", + "oplist": "\/me OP s\u0105ra\u0161as: %%LINK%%", + "pong": "\/me Smarv\u0117!", + "reload": "\/me Greitai gr\u012f\u0161iu.", + "removenotinwl": "\/me [@%%NAME%%] Nurodytas narys @%%USERNAME%% n\u0117ra waitlist'e.", + "roomrules": "\/me Kambario taisykles rasi \u010dia: %%LINK%%", + "sessionstats": "\/me [@%%NAME%%] Woot'ai: %%WOOTS%%, Meh'ai: %%MEHS%%, Pa\u010diupimai: %%GRABS%%.", + "forceskip": "\/me [%%NAME%% panaudojo greit\u0105j\u012f skip]", + "madeby": "\/me \u0160is bot'as buvo sukurtas %%NAME%%.", + "activefor": "A\u0161 buvau aktyvus %%TIME%%.", + "swapinvalid": "\/me [@%%NAME%%] Netaisyklingas narys nurodytas. (N\u0117ra vard\u0173 su tarpais!)", + "swapwlonly": "\/me [@%%NAME%%] Pra\u0161au keisk narius kurie yra waitlist'e!", + "swapping": "\/me Kei\u010diamas %%NAME1%% su %%NAME2%%.", + "genres": "\/me Leid\u017eiamus muzikos \u017eanrus rasi \u010dia: %%LINK%%", + "notbanned": "\/me [@%%NAME%%] Narys nebuvo u\u017eblokuotas.", + "unmutedeveryone": "\/me [@%%NAME%%] Visi nariai atitildyti.", + "unmuteeveryonerank": "\/me [@%%NAME%%] Tik manager'iai ir auk\u0161\u010diau gali atitildyti visus narius vienu metu.", + "notmuted": "\/me [@%%NAME%%] \u0161is narys nebuvo u\u017etildytas.", + "unmuterank": "\/me [@%%NAME%%] Negali atitildyti \u017emoni\u0173 su tokiu pa\u010diu rangu arba auk\u0161tesniu negu tavo.", + "commandscd": "\/me [@%%NAME%%] Komandas kurias gal\u0117s naudoti nariai po tinkamo laiko, laikas nustatytas \u012f: %%TIME%% sekundes.", + "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ woot'ai: %%WOOT%%, meh'ai: %%MEHS%%, ratio (W\/M): %%RATIO%%.", + "website": "\/me Pra\u0161ome apsilankyti m\u016bs\u0173 tinklapyje: %%LINK%%", + "youtube": "\/me [%%NAME%%] Prenumeruokite mus youtube'je: %%LINK%%", + "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%WOOT\/%%GRABS%%GRAB\/%%MEHS%%MEH.", + "thorNotClose": "\/me @%%NAME%%, esate nevertas priart\u0117ti prie plaktuko!", + "thorcd": "\/me @%%NAME%% tu gali pabandyti pakelti plaktuk\u0105 u\u017e %%TIME%% minu\u010di\u0173.", + "thorWorthy": "\/me @%%NAME%% tu esi vertas plaktuko :hammer:, sveikiname!", + "thorNotWorthy": "\/me @%%NAME%% tu neesi vertas plaktuko." +} \ No newline at end of file diff --git a/lang/lv-LV.json b/lang/lv-LV.json old mode 100644 new mode 100755 index 15f8a02b..0e4ccbba --- a/lang/lv-LV.json +++ b/lang/lv-LV.json @@ -64,8 +64,8 @@ "greyuser": "Tikai uzraugi un augst\u0101ki var palaist botu.", "bouncer": "Bots nevar p\u0101rvietot cilv\u0113kus, kad tas darbojas k\u0101 uzraugs.", "online": "\/me %%BOTNAME%% v%%VERSION%% tie\u0161saist\u0113!", - "welcome": "\/me \u010cau %%NAME%%", - "welcomeback": "\/me Sveiciens ar atgriez\u0161anos, %%NAME%%", + "welcome": "\/me \u010chau %%NAME%%", + "welcomeback": "\/me Sveeeiciens ar atgriez\u0161anos, %%NAME%%", "songknown": "\/me @%%NAME%%, \u0161\u012b dziesma ir DJ v\u0113stur\u0113.", "notavailable": "\/me @%%NAME%%, dziesma ko Tu sp\u0113l\u0113ji nebija pieejama.", "timelimit": "\/me @%%NAME%%, Tava dziesma ir gar\u0101ka nek\u0101 %%MAXLENGTH%% min\u016btes, Tev ir nepiecie\u0161ama at\u013cauja, lai sp\u0113l\u0113tu gar\u0101kas dziesmas.", diff --git a/lang/ms.json b/lang/ms.json old mode 100644 new mode 100755 index 02655dbc..065b9482 --- a/lang/ms.json +++ b/lang/ms.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, sila jangan spam.", "roomadvertising": "\/me @%%NAME%%, sila jangan pos link ke bilik-bilik lain.", "adfly": "\/me @%%NAME%%, sila tukar autowoot program anda. Kami mencadangkan Plugcubed: http:\/\/plugcubed.net", - "validgiftags": "\/me [@%%NAME%%] [Tag: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", - "invalidgiftags": "\/me [@%%NAME%%] [Tag: %%TAGS%%] tag yang tidak sah, sila cuba yang lain.", - "validgifrandom": "\/me [@%%NAME%%] [Random GIF] http:\/\/i.giphy.com\/%%ID%%.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tag: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] tag yang tidak sah, sila cuba yang lain. [Tag: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Random GIF]", "invalidgifrandom": "\/me [@%%NAME%%] Permintaan yang tidak sah, cuba lagi.", "invalidtime": "\/me [@%%NAME%%] masa yang dinyatakan tidak sah.", "nouserspecified": "\/me [@%%NAME%%] Tidak ada pengguna yang dinyatakan.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} +} \ No newline at end of file diff --git a/lang/nl.json b/lang/nl.json old mode 100644 new mode 100755 index a6134f0f..7fc73023 --- a/lang/nl.json +++ b/lang/nl.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, spam alsjeblieft niet.", "roomadvertising": "\/me @%%NAME%%, link alsjeblieft geen andere gemeenschappen.", "adfly": "\/me @%%NAME%%, verander alsjeblieft je autowoot programma. Wij raden PlugCubed aan: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", - "invalidgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] Ongeldige tags, probeer iets anders.", - "validgifrandom": "\/me [@%%NAME%%] [Willekeurige GIF] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Ongeldige tags, probeer iets anders. [Tags: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Willekeurige GIF]", "invalidgifrandom": "\/me [@%%NAME%%] Ongeldig verzoek, probeer het opnieuw.", "invalidtime": "\/me [@%%NAME%%] Ongeldige tijd opgegeven.", "nouserspecified": "\/me [@%%NAME%%] Geen gebruiker gespecificeerd.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} +} \ No newline at end of file diff --git a/lang/pl.json b/lang/pl.json old mode 100644 new mode 100755 index 8d3554c6..392677ac --- a/lang/pl.json +++ b/lang/pl.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, nie spamuj.", "roomadvertising": "\/me @%%NAME%%, nie podawaj link\u00f3w do innych spo\u0142eczno\u015bci.", "adfly": "\/me @%%NAME%%, zmie\u0144 sw\u00f3j program do autowoot\u00f3w. Polecamy PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] [Tagi: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", - "invalidgiftags": "\/me [@%%NAME%%] [Tagi: %%TAGS%%] B\u0142\u0119dne tagi, spr\u00f3buj innych.", - "validgifrandom": "\/me [@%%NAME%%] [Randomowy GIF] http:\/\/i.giphy.com\/%%ID%%.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Tagi: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] B\u0142\u0119dne tagi, spr\u00f3buj innych. [Tagi: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [Randomowy GIF]", "invalidgifrandom": "\/me [@%%NAME%%] B\u0142\u0119dne zapytanie, spr\u00f3buj ponownie.", "invalidtime": "\/me [@%%NAME%%] B\u0142\u0119dnie okre\u015blony czas.", "nouserspecified": "\/me [@%%NAME%%] Nie wybrano u\u017cytkownika.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% mo\u017cesz spr\u00f3bowa\u0107 podnie\u015b\u0107 m\u0142ot za %%TIME%% minut.", "thorWorthy": "\/me @%%NAME%% jeste\u015b godzien m\u0142ota :hammer:, gratulacje!", "thorNotWorthy": "\/me @%%NAME%% nie jeste\u015b godzien m\u0142ota." -} +} \ No newline at end of file diff --git a/lang/pt-BR.json b/lang/pt-BR.json old mode 100644 new mode 100755 index 65fb6a7a..5601ffd2 --- a/lang/pt-BR.json +++ b/lang/pt-BR.json @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, n\u00e3o fa\u00e7a spam, por favor.", "roomadvertising": "@%%NAME%%, n\u00e3o poste link de outras comunidades, por favor.", "adfly": "@%%NAME%%, por favor mude seu script autowoot. N\u00f3s sugerimos plugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", - "invalidgiftags": "\/me [@%%NAME%%] [Tags: %%TAGS%%] Tag inv\u00e1lida, tente algo diferente.", - "validgifrandom": "\/me [@%%NAME%%] [GIF rand\u00f4mica] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Tags: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Tag inv\u00e1lida, tente algo diferente. [Tags: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [GIF rand\u00f4mica]", "invalidgifrandom": "\/me [@%%NAME%%] Inst\u00e2ncia inv\u00e1lida, tente novamente.", "invalidtime": "\/me [@%%NAME%%] Tempo inv\u00e1lido.", "nouserspecified": "\/me [@%%NAME%%] Usu\u00e1rio n\u00e3o especificado.", @@ -203,8 +203,8 @@ "website": "\/me Visite nosso site: %%LINK%%", "youtube": "\/me [%%NAME%%] Inscreva-se no nosso canal: %%LINK%%", "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", - "thorNotClose": "\/me @%%NAME%% voc\\u00ea n\\u00e3o \u00e9 digno nem de chegar perto do martelo.", + "thorNotClose": "\/me @%%NAME%% voc\u00ea n\u00e3o \u00e9 d\u00edgno nem de chegar perto do martelo!", "thorcd": "\/me @%%NAME%% voc\u00ea pode tentar levantar o martelo em %%TIME%% minutos.", "thorWorthy": "\/me @%%NAME%% voc\u00ea \u00e9 d\u00edgno do martelo :hammer:. Parab\u00e9ns!", "thorNotWorthy": "\/me @%%NAME%% voc\u00ea n\u00e3o \u00e9 d\u00edgno do martelo." -} +} \ No newline at end of file diff --git a/lang/sr.json b/lang/sr.json old mode 100644 new mode 100755 index 9ef0c713..cd3f7456 --- a/lang/sr.json +++ b/lang/sr.json @@ -1,18 +1,18 @@ { "cookies": [ - "has given you a chocolate chip cookie!", - "has given you a soft homemade oatmeal cookie!", - "has given you a plain, dry, old cookie. It was the last one in the bag. Gross.", - "gives you a sugar cookie. What, no frosting and sprinkles? 0\/10 would not touch.", - "gives you a chocolate chip cookie. Oh wait, those are raisins. Bleck!", - "gives you an enormous cookie. Poking it gives you more cookies. Weird.", - "gives you a fortune cookie. It reads \"Why aren't you working on any projects?\"", - "gives you a fortune cookie. It reads \"Give that special someone a compliment\"", - "gives you a fortune cookie. It reads \"Take a risk!\"", - "gives you a fortune cookie. It reads \"Go outside.\"", - "gives you a fortune cookie. It reads \"Don't forget to eat your veggies!\"", - "gives you a fortune cookie. It reads \"Do you even lift?\"", - "gives you a fortune cookie. It reads \"m808 pls\"", + "ti je dao \u010dokoladni kola\u010di\u0107!", + "ti je dao meki doma\u0107i zobeni kola\u010di\u0107!", + "ti je dao obi\u010dan, suv, stari kola\u010di\u0107. To je bio posljednji u torbi.", + "ti daje \u0161e\u0107erni kola\u010di\u0107. Ono, bez glazura i mrvica? 0\/10, ne\u0107u dirati.", + "ti daje \u010dokoladni kola\u010di\u0107. \u010cekaj, to su gro\u017e\u0111ice. Bljak!", + "ti daje ogromni kola\u010di\u0107. Bockanje ti daje vi\u0161e kola\u010di\u0107a. \u010cudno.", + "daje kola\u010di\u0107 budu\u0107nosti. Pi\u0161e: \"Za\u0161to ne radi\u0161 na nekim projektima?\"", + "daje kola\u010di\u0107 budu\u0107nosti. Pi\u0161e: \"Daj nekom posebnom kompliment\"", + "daje kola\u010di\u0107 budu\u0107nosti. Pi\u0161e: \"Treba riskirati!\"", + "daje kola\u010di\u0107 budu\u0107nosti. Pi\u0161e: \"Idi napolje.\"", + "daje kola\u010di\u0107 budu\u0107nosti. Pi\u0161e: \"Ne zaboravi da jede\u0161 povr\u0107e!\"", + "daje kola\u010di\u0107 sre\u0107e. Pi\u0161e: \"Di\u017ee\u0161 li uop\u0161te?\"", + "daje kola\u010di\u0107 sre\u0107e. Pi\u0161e: \"m808 molim te\"", "gives you a fortune cookie. It reads \"If you move your hips, you'll get all the ladies.\"", "gives you a fortune cookie. It reads \"I love you.\"", "gives you a Golden Cookie. You can't eat it because it is made of gold. Dammit.", @@ -25,50 +25,50 @@ "Signs point to yes.", "Yes.", "Reply hazy, try again.", - "Without a doubt.", - "My sources say no.", - "As I see it, yes.", + "Bez dileme.", + "Moji izvori ka\u017eu ne.", + "Kako ja vidim, da.", "You may rely on it.", "Concentrate and ask again.", "Outlook not so good.", "It is decidedly so.", - "Better not tell you now.", + "Bolje da ti ne ka\u017eem sada.", "Very doubtful.", - "Yes - definitely.", + "Da - definitivno.", "It is certain.", - "Cannot predict now.", + "Trenutno ne mogu da predvidim.", "Most likely.", - "Ask again later.", - "My reply is no.", + "Pitaj ponovo kasnije.", + "Moj odgovor je ne.", "Outlook good.", "Don't count on it.", "Yes, in due time.", - "Definitely not.", - "You will have to wait.", + "Definitivno ne.", + "Mora\u0107e\u0161 da \u010deka\u0161.", "I have my doubts.", "Outlook so so.", - "Looks good to me!", - "Who knows?", - "Looking good!", - "Probably.", + "Meni izgleda dobro!", + "Ko zna?", + "Izgleda dobro!", + "Verovatno.", "Are you kidding?", "Don't bet on it.", - "Forget about it." + "Zaboravi." ], "nodatafound": "Prethodni podaci nisu prona\u0111eni.", - "currentlang": "\/me Jezik podesen na: %%LANGUAGE%%", - "langerror": "\/me Jezik koji ste odabrali nije dostupan. Poseti %%LINK%% da bi pronasao dostupne jezike.", - "langset": "\/me Jezik je sada podesen na: %%LANGUAGE%%", + "currentlang": "\/me Jezik pode\u0161en na: %%LANGUAGE%%", + "langerror": "\/me Jezik koji ste odabrali nije dostupan. Poseti %%LINK%% da prona\u0111e\u0161 dostupne jezike.", + "langset": "\/me Jezik je sada pode\u0161en na: %%LANGUAGE%%", "retrievingdata": "Preuzimanje prethodno sa\u010duvanih podataka.", "datarestored": "Prethodno sa\u010duvani podaci uspe\u0161no preuzeti.", "greyuser": "Samo bounceri i vi\u0161i rank mogu pokrenuti bota.", - "bouncer": "Bot ne mo\u017ee premestati ljude ukoliko je pokrenut od strane bouncera.", - "online": "\/me %%BOTNAME%% %%VERSION%% online!", + "bouncer": "Bot ne mo\u017ee preme\u0161tati ljude ukoliko je pokrenut od strane bouncera.", + "online": "\/me %%BOTNAME%% %%VERSION%% je online!", "welcome": "\/me Dobrodo\u0161ao %%NAME%%", "welcomeback": "\/me Dobrodo\u0161ao nazad, %%NAME%%", - "songknown": "\/me @%%NAME%%, Ova pesma je u DJ istoriji.", - "notavailable": "\/me @%%NAME%%, the song you played was not available.", - "timelimit": "\/me @%%NAME%%, Tvoja pesma je duza od %%MAXLENGTH%% minuta, potrebna ti je dozvola da pustas duze pesme.", + "songknown": "\/me @%%NAME%%, ova pesma je u DJ istoriji.", + "notavailable": "\/me @%%NAME%%, pesma koju si pustio\/la nije bila dostupna.", + "timelimit": "\/me @%%NAME%%, tvoja pesma je du\u017ea od %%MAXLENGTH%% minuta, potrebna ti je dozvola da pu\u0161tas du\u017ee pesme.", "permissionownsong": "\/me :up: @%%NAME%% ima dozvolu da pu\u0161ta svoju vlastitu pesmu.", "isblacklisted": "\/me Ova pesma je na %%BLACKLIST%% blacklisti! Prebacujem....", "isopen": "\/me Rulet je pokrenut! Pi\u0161i !join da u\u010destvuje\u0161.", @@ -79,9 +79,9 @@ "alreadyadding": "\/me Korisnik je ve\u0107 dodan! Promenjena \u017eeljena pozicija na %%POSITION%%.", "adding": "\/me Dodan @%%NAME%% u red. Trenutna pozicija %%POSITION%%.", "usernotfound": "\/me Korisnik nije prona\u0111en.", - "notdisconnected": "\/me @%%NAME%% se nije diskonektovao tokom mog boravka ovde.", - "noposition": "\/me Zadnja pozicija nepoznata. Listu cekanja treba a\u017eurirati najmanje jednom da bi se registrovala zadnja pozicija korisnika.", - "toolongago": "\/me @%%NAME%% zadnji diskonekt (DC ili leave) je bio davno: %%TIME%%.", + "notdisconnected": "\/me @%%NAME%% se nije diskonektovao tokom mog boravka ovde.", + "noposition": "\/me Zadnja pozicija nepoznata. Listu \u010dekanja treba a\u017eurirati najmanje jednom da bi se registrovala zadnja pozicija korisnika.", + "toolongago": "\/me @%%NAME%%,tvoj zadnji diskonekt (DC ili leave) je bio davno: %%TIME%%.", "valid": "\/me @%%NAME%% se diskonektovao pre %%TIME%% i trebao bi biti na poziciji %%POSITION%%.", "warning1": "\/me @%%NAME%%, ti si afk %%TIME%%, molim odgovori u roku od 2 min ili \u0107e\u0161 biti uklonjen sa liste \u010dekanja.", "warning2": "\/me @%%NAME%%, uskoro \u0107e\u0161 biti uklonjen sa liste zbog AFK ukoliko ne odgovori\u0161.", @@ -91,13 +91,13 @@ "spam": "\/me @%%NAME%%, molim, ne spamaj.", "roomadvertising": "\/me @%%NAME%%, ne postavljaj linkove drugih soba.", "adfly": "\/me @%%NAME%%, promeni tvoj autowoot program. Mi preporu\u010dujemo PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] [Oznaka: %%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", - "invalidgiftags": "\/me [@%%NAME%%] [Oznaka: %%TAGS%%] Pogre\u0161na oznaka, poku\u0161aj ne\u0161to drugo.", - "validgifrandom": "\/me [@%%NAME%%] [Slu\u010dajno odabran GIF] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Oznaka: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] Pogre\u0161na oznaka, poku\u0161aj ne\u0161to drugo. [Oznaka: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Slu\u010dajno odabran GIF]", "invalidgifrandom": "\/me [@%%NAME%%] Neva\u017ee\u0107i zahtev, poku\u0161ajte ponovo.", "invalidtime": "\/me [@%%NAME%%] Navedeno vreme pogre\u0161no.", "nouserspecified": "\/me [@%%NAME%%] Korisnik nije naveden.", - "invaliduserspecified": "\/me [@%%NAME%%] Navedeni korisnik pogre\u0161an", + "invaliduserspecified": "\/me [@%%NAME%%] Navedeni korisnik je pogre\u0161an.", "nolistspecified": "\/me [@%%NAME%%] Navedena lista ne postoji.", "invalidlistspecified": "\/me [@%%NAME%%] Navedena lista pogre\u0161na.", "novaliduserspecified": "\/me [@%%NAME%%] Navedeni korisnik nije va\u017ee\u0107i.", @@ -139,20 +139,20 @@ "inactivelonger": "\/me [@%%NAME%%] @%%USERNAME%% je neaktivan du\u017ee nego sto je %%BOTNAME%% online.", "autowoot": "\/me Mi preporu\u010dujemo PlugCubed za automatsko glasanje: http:\/\/plugcubed.net\/", "brandambassador": "\/me Brand Ambassador je glas plug.dj korisnika. Oni promovi\u0161u doga\u0111aje, spajaju zajednicu i dele poruke plug.dj-a \u0161irom sveta. Za vi\u0161e informacija: https:\/\/plug.dj\/ba", - "bouncerplusrank": "\/me [@%%NAME%%] Moras biti Mena\u0111er ili vi\u0161i rank da bi uklju\u010dio Bouncer+.", + "bouncerplusrank": "\/me [@%%NAME%%] Mora\u0161 biti Menad\u017eer ili vi\u0161i rank da bi uklju\u010dio Bouncer+.", "chatcleared": "\/me [@%%NAME%%] Je o\u010distio chat.", "deletechat": "\/me [@%%NAME%%] Je o\u010distio chat od %%USERNAME%%.", "commandslink": "\/me %%BOTNAME%% komande: %%LINK%%", "eatcookie": "\/me jede kola\u010d.", "nousercookie": "\/em ne vidi %%NAME%% u sobi i uzima kola\u010d samo za sebe.", - "selfcookie": "\/me @%%NAME%%, malo si \u0161krt, zar ne? Dajes kola\u010de sebi, bah. Podeli malo i sa ostalima!", + "selfcookie": "\/me @%%NAME%%, malo si \u0161krt, zar ne? Daje\u0161 kola\u010de sebi, bah. Podeli malo i sa ostalima!", "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] CycleGuard pode\u0161en na %%TIME%% minuta.", "dclookuprank": "\/me [@%%NAME%%] Samo bounceri i vi\u0161i rank mogu dclookup za ostale.", "emojilist": "\/me Emoji lista: %%LINK%%", "notinwaitlist": "\/me @%%NAME%%, nisi na listi \u010dekanja.", - "youarenext": "\/me @%%NAME%%, you are DJing after this song.", - "youaredj": "\/me @%%NAME%%, you are currently DJing.", + "youarenext": "\/me @%%NAME%%, nastupa\u0161 posle ove pesme.", + "youaredj": "\/me @%%NAME%%, trenutno si DJ.", "eta": "\/me @%%NAME%% do\u0107i \u0107e\u0161 na red za otprilike %%TIME%%.", "facebook": "\/me Lajkuj nas na facebook-u: %%LINK%%", "starterhelp": "\/me Ova slika ce ti pomo\u0107i za po\u010detak: %%LINK%%", @@ -165,28 +165,28 @@ "rouletteleave": "\/me @%%NAME%% je napustio rulet!", "songlink": "\/me [@%%NAME%%] Link do trenutne pesme: %%LINK%%", "usedlockskip": "\/me [%%NAME%% je koristio LockSkip.]", - "usedskip": "\/me [%%NAME%% used skip]", - "skippos": "\/me [@%%NAME%%] DJs will now be moved to position %%POSITION%% when skipped.", + "usedskip": "\/me [%%NAME%% je koristio skip]", + "skippos": "\/me [@%%NAME%%] DJ-evi \u0107e sada biti pomereni na poziciju %%POSITION%% nakon preskakanja.", "lockguardtime": "\/me [@%%NAME%%] Lockguard pode\u0161en na %%TIME%% minuta.", - "maxlengthtime": "\/me [@%%NAME%%] Maksimalno trajanje pesme pode\u0161eno na %%TIME%% minuta.", + "maxlengthtime": "\/me [@%%NAME%%] Maksimalno trajanje pesme je pode\u0161eno na %%TIME%% minuta.", "motdset": "\/me Poruka Dana pode\u0161ena na: %%MSG%%", "motdintervalset": "\/me Interval Poruke dana pode\u0161en na %%INTERVAL%%.", - "currentbotname": "\/me Bot name currently set to: %%BOTNAME%%", - "botnameset": "\/me Bot name now set to: %%BOTNAME%%", + "currentbotname": "\/me Trenutno ime bota je: %%BOTNAME%%", + "botnameset": "\/me Ime bota je pode\u0161eno na: %%BOTNAME%%", "addbotwaitlist": "\/me @%%NAME%%, nemoj da me dodaje\u0161 na listu \u010dekanja, molim.", "move": "\/me [%%NAME%% je koristio preme\u0161tanje.]", "mutednotime": "\/me [@%%NAME%%] Je uti\u0161ao @%%USERNAME%%.", "mutedmaxtime": "\/me [@%%NAME%%] Mo\u017ee\u0161 mute maksimalno %%TIME%% minuta.", - "mutedtime": "\/me [@%%NAME%%] Je mutovao @%%USERNAME%% na %%TIME%% minuta.", + "mutedtime": "\/me [@%%NAME%%] Je uti\u0161ao @%%USERNAME%% na %%TIME%% minuta.", "unmuted": "\/me [@%%NAME%%] Je unmutovao @%%USERNAME%%.", - "muterank": "\/me [@%%NAME%%] Ne mo\u017ee\u0161 mute osobu sa istim ili ve\u0107im rankom od tebe.", + "muterank": "\/me [@%%NAME%%] Ne mo\u017ee\u0161 uti\u0161ati osobu sa istim ili ve\u0107im rankom od tebe.", "oplist": "\/me OP lista: %%LINK%%", "pong": "\/me Pong!", "reload": "\/me Vra\u0107am se ubrzo.", "removenotinwl": "\/me [@%%NAME%%] Navedeni korisnik @%%USERNAME%% nije na listi \u010dekanja.", "roomrules": "\/me Pravila sobe mozes prona\u0107i ovde: %%LINK%%", "sessionstats": "\/me [@%%NAME%%] Ukupno woot-ova: %%WOOTS%%, Ukupno meh-ova: %%MEHS%%, Ukupno dohva\u0107eno: %%GRABS%%.", - "forceskip": "\/me [%%NAME%% used forceskip]", + "forceskip": "\/me [%%NAME%% je koristio forceskip]", "madeby": "\/me Ovog bot-a je napravio %%NAME%%.", "activefor": "Ja sam ve\u0107 aktivan %%TIME%%.", "swapinvalid": "\/me [@%%NAME%%] Navedeni korisnik nije prona\u0111en. (Imena sa razmacima!)", @@ -200,11 +200,11 @@ "unmuterank": "\/me [@%%NAME%%] Ne mo\u017ees unmutovati osobu sa istim ili ve\u0107im rankom od tebe.", "commandscd": "\/me [@%%NAME%%] Razmak izme\u0111u komandi za korisnike pode\u0161en na %%TIME%% sekundi.", "voteratio": "\/me [@%%NAME%%] @%%USERNAME%% ~ Wotovi: %%WOOT%%, Mehovi: %%MEHS%%, Razmer(w\/m): %%RATIO%%.", - "website": "\/me Molimo posetite nasu web stranicu: %%LINK%%", + "website": "\/me Molimo posetite na\u0161u web stranicu: %%LINK%%", "youtube": "\/me [%%NAME%%] Pretplatite se na na\u0161 YouTube kanal: %%LINK%%", "songstatistics": "\/me %%ARTIST%% - %%TITLE%%: %%WOOTS%%W\/%%GRABS%%G\/%%MEHS%%M.", - "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", - "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", - "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", - "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} + "thorNotClose": "\/me @%%NAME%%, nisi dostojan da bude\u0161 blizu \u010deki\u0107a!", + "thorcd": "\/me @%%NAME%% mo\u017ee\u0161 probati da podigne\u0161 \u010deki\u0107 za %%TIME%% minuta.", + "thorWorthy": "\/me @%%NAME%% ti si dostojan \u010deki\u0107a :hammer:, \u010destitam!", + "thorNotWorthy": "\/me @%%NAME%% nisi dostojan \u010deki\u0107a." +} \ No newline at end of file diff --git a/lang/tr.json b/lang/tr.json old mode 100644 new mode 100755 index 26b606cc..abacaa26 --- a/lang/tr.json +++ b/lang/tr.json @@ -1,38 +1,38 @@ { "cookies": [ - "\u00c7ikolatal\u0131 \u00e7erez ald\u0131n.", - "Yumu\u015fak \u00e7erez ald\u0131n.", - "Sade \u00e7erez ald\u0131n.", - "Sana \u015feker \u00e7erez verir. 0\/10!", - "\u00c7ikolatal\u0131 \u00e7erez verir.Bekleyin.", - "Kocaman \u00e7erez verir.", - "Zengin \u00e7erezi ald\u0131n.", - "Zengin \u00e7erezi ald\u0131n.", - "Zengin \u00e7erez ald\u0131n.Bu riskli.", - "Zengin \u00e7erez ald\u0131n.\u00c7\u0131k\u0131\u015f.", - "\u00c7erez ald\u0131n.", - "\u00c7erez ald\u0131n.", - "\u00c7erez ald\u0131n.", - "\u00c7erez ald\u0131n.", - "\u00c7erez ald\u0131n.Seni seviyorum.", - "Alt\u0131n \u00e7erez ald\u0131n.", - "G\u00f6zl\u00fcklerin s\u00fct ile \u00e7erezli.", - ":heart: Sevgi \u00e7erezi ald\u0131n.", - "Eski \u00e7erez ald\u0131n.", - "H\u0131zl\u0131 \u00e7erez ald\u0131n." + "Sana \u00c7ikolatal\u0131 Kurabiye verdi", + "Sana Yumu\u015fak Kurabiye verdi", + "Sana Kurumu\u015f, eskimi\u015f kurabiye verdi. Torban\u0131n i\u00e7inde bir tek o duruyor. LANET!", + "Sana \u015feker Kurabiyesi verdi. Ne, buzlanma ve serpme yok mu? 0\/10 dokunmazd\u0131.", + "Sana \u00c7ikolatal\u0131 kurabiye verdi. Oh wait.... Bunlar kuru \u00fcz\u00fcm. Kahretsin!", + "Kocaman kurabiye verdi. Bast\u0131r\u0131rsan daha fazla kurabiye al\u0131yorsun. Garip.", + "Sana bir \u015fans kurabiyesi verdi. \"Neden herhangi bir proje \u00fczerinde \u00e7al\u0131\u015fm\u0131yorsunuz?\"", + "Sana bir \u015fans kurabiyesi verdi. \"Senin i\u00e7in \u00f6zel bir ki\u015fiye iltifat et\"", + "Sana bir \u015fans kurabiyesi verdi. \"Risk al!\"", + "Sana bir \u015fans kurabiyesi verdi. \"D\u0131\u015far\u0131 \u00e7\u0131k\" yaz\u0131yor.", + "Sana bir \u015fans kurabiyesi verdi. \"Sebzelerini yemeyi unutma!\"", + "Sana bir \u015fans kurabiyesi verdi. \"Hi\u00e7 kalkt\u0131 m\u0131?\"", + "Sana bir servet kurabiyesi verdi. \"M808 pls\" yaz\u0131yor", + "Sana bir \u015fans kurabiyesi verdi. \"Kal\u00e7alar\u0131n\u0131z\u0131 hareket ettirirseniz, t\u00fcm bayanlara kavu\u015fursunuz.\" yaz\u0131yor.", + "sevgi dolu kurabiye ald\u0131n. \"Seni Seviyorum\" yaz\u0131yor", + "Alt\u0131n kurabiye ald\u0131n. Onu yiyemiyorsun \u00e7\u00fcnk\u00fc alt\u0131ndan yap\u0131lm\u0131\u015f. Lanet!", + "Oreo ve bir bardak s\u00fct ald\u0131n. ", + "Sana Sevgi ile yap\u0131lm\u0131\u015f G\u00f6kku\u015fa\u011f\u0131 kurabiyesi verdi. :heart:", + "Sana ya\u011fmurda b\u0131rak\u0131lm\u0131\u015f eski bir kurabiye verir, k\u00fcfl\u00fcd\u00fcr.", + "Sana taze \u00e7erezleri pi\u015firir, \u015fa\u015f\u0131rt\u0131c\u0131 kokuyor." ], "balls": [ - "\u0130\u015faret puanlar\u0131 do\u011fru.", + "\u0130\u015faretler evet'i g\u00f6steriyor.", "Evet.", "Yanl\u0131\u015f cevap, tekrar deneyin.", "\u015e\u00fcphesiz.", - "Benim kaynaklarim dogrulanmadi.", + "Kaynaklar\u0131m hay\u0131r diyor.", "G\u00f6rd\u00fc\u011f\u00fcm kadar\u0131yla, do\u011fru.", "Sen ona ba\u011fl\u0131s\u0131n.", "D\u00fczg\u00fcn bir soru sor.", - "Outlook iyi degil.", - "Kesinlikle b\u00f6yle.", - "\u015eimdi s\u00f6ylememen gerekli.", + "\u0130yi g\u00f6r\u00fcnm\u00fcyor", + "Kesinlikle \u00f6yle.", + "Sana \u015fimdi s\u00f6ylemem daha iyi.", "\u00c7ok \u015f\u00fcphelisin.", "Evet kesinlikle.", "Bu kesin!", @@ -40,20 +40,20 @@ "B\u00fcy\u00fck ihtimalle.", "Daha sonra tekrar sorun.", "Cevab\u0131m hay\u0131r.", - "Outlook iyi.", + "\u0130yi g\u00f6r\u00fcn\u00fcyor.", "Bu say\u0131lmaz.", "Evet, dogru zamanda.", - "Definitely not.", - "Kesinlikle hay\u0131r.", + "kesinlikle hay\u0131r.", "Beklemek zorundas\u0131n.", - "\u015e\u00fcphelerim var.", - "Outlook \u00f6ylesine.", - "Bana bak\u0131\u015f\u0131n iyi.", - "Kim bilir ?", - "\u0130yi g\u00f6r\u00fcn\u00fcyor.", - "Muhtemelen.", - "Dalga m\u0131 ge\u00e7iyorsun ?", - "Bunun icin kumar oynamayin :)" + "Beklemek zorundas\u0131n.", + "eh i\u015fte g\u00f6r\u00fcn\u00fcyor.", + "Benim i\u00e7in iyi g\u00f6r\u00fcn\u00fcyor.", + "Kim Bilir?", + "G\u00fczel g\u00f6r\u00fcn\u00fcyor", + "muhtemelen", + "Dalga m\u0131 ge\u00e7iyorsun?", + "Bahse girme.", + "Unut gitsin\n" ], "nodatafound": "Veriler bulunamadi.", "currentlang": "\/me Suanki bot dili: %%LANGUAGE%%", @@ -73,7 +73,7 @@ "isblacklisted": "\/me Sarki %%BLACKLIST%% yasak listesinde! Geciliyor...", "isopen": "\/me Rulet artik acik! Kullanim: Sohbete !join yazin.!", "winnerpicked": "\/me Sanslisiniz! @%%NAME%% yeni dj siran %%POSITION%%.", - "ball": "\/me %%NAME%%'in sorusu var: \\\"%%QUESTION%%\\\" ve %%BOTNAME%%'in cevabi ise: \\\"%%RESPONSE%%\\\"", + "ball": "\/me %%NAME%%'in sorusu var: \"%%QUESTION%%\" ve %%BOTNAME%%'in cevabi ise: \"%%RESPONSE%%\"", "notghosting": "[%%NAME1%%] %%NAME2%% gizlenmiyor.", "ghosting": "[%%NAME1%%] %%NAME2%% gizleniyor.", "alreadyadding": "\/me Kullanici zaten eklendi! Konum degistirildi %%POSITION%%.", @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, lutfen spam yapmayin.", "roomadvertising": "\/me @%%NAME%%, diger odalarin reklamini yapmayin.", "adfly": "\/me @%%NAME%%, lutfen otowootunuzu degistirin. Onerilen: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] [Etiketler: %%TAGS%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", - "invalidgiftags": "\/me [@%%NAME%%] [Etiket: %%TAGS%%] gecersiz etiket, baska etiket deneyin.", - "validgifrandom": "\/me [@%%NAME%%] [Rastgele GIF] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Etiketler: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] gecersiz etiket, baska etiket deneyin. [Etiket: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/media.giphy.com\/media\/%%ID%%\/giphy.gif [Rastgele GIF]", "invalidgifrandom": "\/me [@%%NAME%%] gecersiz istek, tekrar deneyin.", "invalidtime": "\/me [@%%NAME%%] gecersiz zaman yazildi.", "nouserspecified": "\/me [@%%NAME%%] kullanici belirtilmedi.", @@ -145,7 +145,7 @@ "commandslink": "\/me %%BOTNAME%% Komutlar: %%LINK%%", "eatcookie": "\/me Cerezler.", "nousercookie": "\/em Odada %%NAME%% gozukmuyor.", - "selfcookie": "\/me @%%NAME%%, sen biraz ac gozlusun sanirsam, lutfen diger kullanicilarla cerezlerini paylas!", + "selfcookie": "\/me @%%NAME%%, sen biraz ac gozlusun sanirsam, lutfen diger kullanicilarla cerezlerini", "cookie": "\/me @%%NAMETO%%, %%NAMEFROM%% %%COOKIE%%", "cycleguardtime": "\/me [@%%NAME%%] CYCLguard %%TIME%% dakika(lar) olarak ayarlandi.", "dclookuprank": "\/me [@%%NAME%%] Sadece yukaridaki kullanicilar icin arama yapabilirsiniz.", @@ -203,8 +203,8 @@ "website": "\/me Sitemizi ziyaret edin: %%LINK%%", "youtube": "\/me [%%NAME%%] Youtube kanalimiza abone olun: %%LINK%%", "songstatistics": "\/me :arrow_right: %%ARTIST%% - %%TITLE%%: %%WOOTS%%:+1:\/\\%%GRABS%%:sparkling_heart:\/\\%%MEHS%%:-1:.", - "thorNotClose": "\/me @%%NAME%%, you're not worthy of getting close to the hammer!", + "thorNotClose": "\/me @%%NAME%%, \u00c7eki\u00e7 yakla\u015fmaya lay\u0131k de\u011filsin!", "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", - "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", - "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} + "thorWorthy": "\/me @%%NAME%% \u00c7ekice lay\u0131k se\u00e7ildin tebrikler :hammer:", + "thorNotWorthy": "\/me @%%NAME%% \u00c7ekice lay\u0131k de\u011filsin" +} \ No newline at end of file diff --git a/lang/zh-TW.json b/lang/zh-TW.json old mode 100644 new mode 100755 index d2928858..65b50f7a --- a/lang/zh-TW.json +++ b/lang/zh-TW.json @@ -1,14 +1,14 @@ { "cookies": [ - "\u5df2\u7d66\u4f60\u4e00\u500b\u6731\u53e4\u529b\u9905\u4e7e!", - "\u5df2\u7d66\u4f60\u4e00\u500b\u9b06\u8edf\u5168\u9ea5\u9905\u4e7e!", - "\u5df2\u7d66\u4f60\u4e00\u500b\u7c21\u55ae, \u4e7e, \u4e26\u8001\u7684\u9905\u4e7e. \u9019\u53ef\u662f\u5305\u88dd\u88e1\u7684\u6700\u5f8c\u4e00\u7247\u5594. \u8d85\u8b9a.", - "\u7d66\u4f60\u4e00\u500b\u7cd6\u9905\u4e7e. \u751a\u9ebc, \u6c92\u6709\u51b0\u51cd\u5f69\u7cd6? 0\/10 \u4e0d\u6703\u52d5.", - "\u7d66\u4f60\u4e00\u500b\u5de7\u514b\u529b\u9905\u4e7e. \u5594\u7b49\u7b49, \u5b83\u5011\u662f\u8461\u8404\u4e7e. Bleck!", - "\u7d66\u4f60\u4e00\u500b\u5de8\u5927\u7684\u9905\u4e7e. \u5206\u89e3\u5b83\u6703\u8b93\u4f60\u64c1\u6709\u66f4\u591a\u9905\u4e7e. \u602a\u7570.", - "\u7d66\u4f60\u4e00\u500b\u904b\u6c23\u9905\u4e7e. \u5b83\u5beb\u8457\"\u70ba\u751a\u9ebc\u4f60\u4e0d\u505a\u4e00\u4e9b\u5176\u4ed6\u7684\u8a08\u756b?\"", - "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u67d0\u500b\u7279\u5225\u7684\u4eba\u7d66\u4f60\u4e00\u500b\u7a31\u8b9a\"", - "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u5192\u4e00\u500b\u96aa\u5427!\"", + "\u5df2\u7d66\u4f60\u4e00\u500b\u6731\u53e4\u529b\u9905\u4e7e\uff01", + "\u5df2\u7d66\u4f60\u4e00\u500b\u9b06\u8edf\u5168\u9ea5\u9905\u4e7e\uff01", + "\u5df2\u7d66\u4f60\u4e00\u500b\u7c21\u55ae\uff0c\u4e7e\uff0c\u4e26\u8001\u7684\u9905\u4e7e\u3002\u9019\u53ef\u662f\u5305\u88dd\u88e1\u7684\u6700\u5f8c\u4e00\u7247\u5594\u3002\u8d85\u8b9a\u3002", + "\u7d66\u4f60\u4e00\u500b\u7cd6\u9905\u4e7e\u3002\u751a\u9ebc\uff0c\u6c92\u6709\u7cd6\u971c\u5f69\u7cd6\uff1f0\/10 \u4e0d\u6703\u52d5\u3002", + "\u7d66\u4f60\u4e00\u500b\u5de7\u514b\u529b\u9905\u4e7e\u3002\u5594\u7b49\u7b49\uff0c\u5b83\u5011\u662f\u8461\u8404\u4e7e\u3002Bleck\uff01", + "\u7d66\u4f60\u4e00\u500b\u5de8\u5927\u7684\u9905\u4e7e\u3002\u5206\u89e3\u5b83\u6703\u8b93\u4f60\u64c1\u6709\u66f4\u591a\u9905\u4e7e\u3002\u771f\u602a\u3002", + "\u7d66\u4f60\u4e00\u500b\u904b\u6c23\u9905\u4e7e\u3002\u5b83\u5beb\u8457\u300c\u70ba\u751a\u9ebc\u4f60\u4e0d\u505a\u4e00\u4e9b\u5176\u4ed6\u7684\u8a08\u756b\uff1f\u300d", + "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e\u3002\u5b83\u5beb\u8457\u300c\u67d0\u500b\u7279\u5225\u7684\u4eba\u7d66\u4f60\u4e00\u500b\u7a31\u8b9a\u300d", + "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e\u3002\u5b83\u5beb\u8457\u300c\u5192\u4e00\u500b\u96aa\u5427\uff01\u300d", "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u5230\u5916\u9762\u53bb.\"", "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u5225\u5fd8\u4e86\u5403\u4f60\u7684\u852c\u83dc!\"", "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u4f60\u6709\u505a\u91cd\u91cf\u8a13\u7df4\u55ce?\"", @@ -16,9 +16,9 @@ "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u5982\u679c\u4f60\u79fb\u52d5\u4f60\u7684\u814e\u90e8, \u4f60\u5c07\u5f97\u5230\u6240\u6709\u5973\u6027.\"", "\u7d66\u4f60\u4e00\u500b\u547d\u904b\u9905\u4e7e. \u5b83\u5beb\u8457\"\u6211\u611b\u4f60.\"", "\u7d66\u4f60\u4e00\u500b\u9ec3\u91d1\u9905\u4e7e. \u4f60\u4e0d\u80fd\u5403\u5b83\u56e0\u70ba\u5b83\u662f\u7528\u771f\u91d1\u88fd\u6210. \u8c48\u6709\u6b64\u7406.", - "\u7d66\u4f60\u4e00\u500bOreo\u9905\u4e7e\u9644\u52a0\u4e00\u676f\u725b\u5976!", + "\u7d66\u4f60\u4e00\u500bOreo\u9905\u4e7e\u9644\u52a0\u4e00\u676f\u725b\u5976\uff01", "\u7d66\u4f60\u4e00\u500b\u7528\u611b :heart: \u88fd\u6210\u7684\u5f69\u8679\u9905\u4e7e", - "\u7d66\u4f60\u4e00\u500b\u96e8\u5929\u88e1\u5269\u4e0b\u7684\u8001\u9905\u4e7e, \u5b83\u5df2\u7d93\u767c\u9709\u4e86.", + "\u7d66\u4f60\u4e00\u500b\u96e8\u5929\u88e1\u5269\u4e0b\u7684\u8001\u9905\u4e7e\uff0c\u5b83\u5df2\u7d93\u767c\u9709\u4e86\u3002", "\u70d8\u7119\u4e86\u4e00\u500b\u65b0\u9bae\u9905\u4e7e\u7d66\u4f60, \u771f\u7684\u5f88\u82ac\u9999\u5594." ], "balls": [ @@ -91,9 +91,9 @@ "spam": "\/me @%%NAME%%, \u8acb\u5225\u6d17\u677f\u704c\u6c34.", "roomadvertising": "\/me @%%NAME%%, \u8acb\u4e0d\u8981\u5ba3\u50b3\u5f35\u8cbc\u5176\u4ed6\u623f\u9593\u7684\u9023\u63a5.", "adfly": "\/me @%%NAME%%, \u8acb\u8b8a\u63db\u4f60\u7684\u81ea\u52d5\u6295\u7968\u5916\u639b. \u6211\u5011\u5efa\u8b70\u4f7f\u7528 PlugCubed: http:\/\/plugcubed.net\/", - "validgiftags": "\/me [@%%NAME%%] [\u6a19\u7c64: %%TAGS%%] http:\/\/i.giphy.com\/%%ID%%.gif", - "invalidgiftags": "\/me [@%%NAME%%] [\u6a19\u7c64: %%TAGS%%] \u7121\u6548\u6a19\u7c64, \u8acb\u5617\u8a66\u4e00\u4e9b\u4e0d\u4e00\u6a23\u7684.", - "validgifrandom": "\/me [@%%NAME%%] [\u96a8\u6a5f GIF] http:\/\/i.giphy.com\/%%ID%%.gif", + "validgiftags": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [\u6a19\u7c64: %%TAGS%%]", + "invalidgiftags": "\/me [@%%NAME%%] \u7121\u6548\u6a19\u7c64, \u8acb\u5617\u8a66\u4e00\u4e9b\u4e0d\u4e00\u6a23\u7684. [\u6a19\u7c64: %%TAGS%%]", + "validgifrandom": "\/me [@%%NAME%%] http:\/\/i.giphy.com\/%%ID%%.gif [\u96a8\u6a5f GIF]", "invalidgifrandom": "\/me [@%%NAME%%] \u7121\u6548\u8acb\u6c42, \u8acb\u518d\u5617\u8a66.", "invalidtime": "\/me [@%%NAME%%] \u7121\u6548\u7684\u6642\u9593\u898f\u5b9a.", "nouserspecified": "\/me [@%%NAME%%] \u6c92\u6709\u6307\u5b9a\u7684\u7528\u6236.", @@ -207,4 +207,4 @@ "thorcd": "\/me @%%NAME%% you can try to lift the hammer in %%TIME%% minutes.", "thorWorthy": "\/me @%%NAME%% you're worthy of the hammer :hammer:, congratulations!", "thorNotWorthy": "\/me @%%NAME%% you're not worthy of the hammer." -} +} \ No newline at end of file From 86ac952ccab7981e6c71d7034456833a149f86d3 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Fri, 2 Jun 2017 19:09:09 +0100 Subject: [PATCH 256/281] Updated credits --- README.md | 59 +++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 3e00a5d7..fab91896 100644 --- a/README.md +++ b/README.md @@ -33,32 +33,61 @@ basicBot Chrome Extension ------------------------- [Get the Official basicBot Chrome Extension](https://chrome.google.com/webstore/detail/basicbot/bjinmbkeneigmkkkpcmcokphbjkepeie) - -Developers ----------- - - [Benzi](https://github.com/Benzi) __(Maintainer)__ - - Credits -------- -I would like to thank the following people: +|Developers| +|:--------:| + |[![Benzi](https://www.gravatar.com/avatar/a9a9e27f874dadfaf0e21e8ecf8e9833.jpg?s=100)](https://github.com/Benzi)| + |**[Benzi](https://github.com/Benzi)**| + +#### Special thanks :sparkles: - Fungus: His Tastybot has been a source of inspiration for most of the features, and his help with coding problems has been invaluable to make this bot. - TAT, Origin and other Litebot contributors: Their Litebot has inspired features like Roulette. - Henchman: Never knew this undertaking would give me a friend too. -|Language | Translator| -|:------:|:---------:| -|Portuguese|[Motel Bible](https://github.com/motelbible)| -|French|[NDA](https://github.com/NDAthereal)| - -__I would also like to thank everyone who contributed in translating the bot via the [translation centre](https://basicbot.oneskyapp.com/admin/collaborators)__ - +#### Translations :globe_with_meridians: + +I would like to thank everyone who have contributed in translating the bot via [Transifex](https://www.transifex.com/basicbot/basicbot) :pray: + +|Translator | Languages| +|:---------:|:--------:| +|3GoneS|Lithuanian| +|ajdin291|Serbian| +|Bart Boom|Dutch| +|cirktv|Dutch| +|clone287|Turkish| +|DivinityRSPS|German| +|[Filly](https://github.com/fillylumi)|French| +|Gradure|Dutch| +|H0LYbear|Turkish| +|hadi555|German| +|[Hasztagg](https://github.com/Hasztagg)|Polish| +|Helvijs Baumanis|Latvian| +|Inga Deveiko|Latvian| +|Janis Petrovskis|Latvian| +|Leopard105|Czech| +|linusworld|Chinese (Taiwan)| +|Liutauras Vaitkus|Lithuanian| +|Łukasz Strzałek|Polish| +|[Mikey Wazowsky](https://github.com/MikeyWazowsky)|Polish| +|[Motel Bible](https://github.com/motelbible)|Portuguese| +|[NDA](https://github.com/NDAthereal)|French| +|Patrick H-Hansen|Danish| +|Rie|Danish| +|Schokin|Spanish| +|Shone|Serbian| +|smt287|Turkish| +|Tessi Tess Randysková|Czech| +|TIGJERUX|Latvian| +|xMaxist|Dutch| +|[Yenn](https://twitter.com/tsy_yenn)|Chinese (Taiwan), Malay| +|Јовев Немања|Serbian| ### Copyright -Copyright © 2014-2016 basicBot +Copyright © 2014-2017 basicBot Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. From db317f4d5eeca5557895471c6d0d985361e7fbd3 Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Fri, 2 Jun 2017 19:24:46 +0100 Subject: [PATCH 257/281] Removed outdated license --- LICENSE.md | 4 ---- LICENSE.txt | 4 ---- README.md | 41 ++++++++++++++++++++--------------------- 3 files changed, 20 insertions(+), 29 deletions(-) delete mode 100644 LICENSE.md delete mode 100644 LICENSE.txt diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 7c55da9b..00000000 --- a/LICENSE.md +++ /dev/null @@ -1,4 +0,0 @@ -Copyright © 2014 Yemasthui - -Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. -This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 92e3f7c1..00000000 --- a/LICENSE.txt +++ /dev/null @@ -1,4 +0,0 @@ -Copyright 2014 Yemasthui - -Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. -This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. \ No newline at end of file diff --git a/README.md b/README.md index fab91896..42699a5e 100644 --- a/README.md +++ b/README.md @@ -4,37 +4,38 @@ Email enquiries: [hi [at] benzi [dot] io](mailto:hi@benzi.io) -Usage ------ +### Usage + Bookmark the following code. To run the bot, run the bookmark. -`javascript:(function(){$.getScript('https://rawgit.com/basicBot/source/master/basicBot.js');})();` -If this does not work, go to https://raw.githubusercontent.com/basicBot/source/master/basicBot.js and copy paste its content into your console (accessible in chrome by pressing F12) when on plug.dj in your community. +``` +javascript:(function(){$.getScript('https://rawgit.com/basicBot/source/master/basicBot.js');})(); +``` + +If this does not work, go to [basicBot.js](https://raw.githubusercontent.com/basicBot/source/master/basicBot.js) and copy paste its content into your console (accessible in chrome by pressing F12) when on plug.dj in your community. +### Commands -Commands --------- -These can be found in [the commands file](https://github.com/basicBot/source/blob/master/commands.md). +These can be found in [the commands file](commands.md). +### Blacklists -Blacklists ----------- Examples of blacklists can be found in [the customization repository](https://github.com/basicBot/custom/tree/master/blacklists). You can add blacklists in the settings of the bot via the methods given in that same repository. See below for more information. -Extending functionality and custom default settings ---------------------------------------------------- +### Extending functionality and custom default settings + basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/basicBot/custom) for more info. Please do not try to if you are not confident in your javascript capabilities. + -Credits --------- +### Credits |Developers| |:--------:| @@ -85,20 +86,18 @@ I would like to thank everyone who have contributed in translating the bot via [ |[Yenn](https://twitter.com/tsy_yenn)|Chinese (Taiwan), Malay| |Јовев Немања|Serbian| -### Copyright +### License Copyright © 2014-2017 basicBot Modifications (including forks) of the code to fit personal needs are allowed only for personal use and should refer back to the original source. This software is not for profit, any extension, or unauthorised person providing this software is not authorised to be in a position of any monetary gain from this use of this software. Any and all money gained under the use of the software (which includes donations) must be passed on to the original author. - -Disclaimer ----------- +### Disclaimer This bot is developed independently. Changes may be made without notice. There is no guarantee for the bot to be functioning perfectly. plug.dj admins have the right to request changes. -By using this chatbot you agree to not use it for violating plug.dj's Terms of Service. +By using this chatbot you agree to not use it for violating [plug.dj's Terms of Service](https://plug.dj/terms). You also agree not to alter the bot's code, unless in the cases explicitly stated above, for personal use, or for the sole purpose of submitting a pull request with a bug fix or a feature update, at which point it will be looked at and decided by the authors of the project. Please refer to the original author/repository at all times, even on personal forks that are not private. -Any requests for changes can be requested via email, through github or via plug.dj. +Any requests for changes can be requested via email, through GitHub or via plug.dj. From ef12cd19e69a25fd28a0cfe3f2ff26b77fcb48ec Mon Sep 17 00:00:00 2001 From: Benzi Mooneegan Date: Fri, 2 Jun 2017 22:13:24 +0100 Subject: [PATCH 258/281] Better formatting --- README.md | 88 ++++++++++----------- commands.md | 217 +++++++++++++++++++++++++--------------------------- 2 files changed, 149 insertions(+), 156 deletions(-) diff --git a/README.md b/README.md index 42699a5e..acad4d0f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ -# basicBot (source) +![basicBot](http://i.imgur.com/efwl0PS.png) -[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![facebook group](https://img.shields.io/badge/facebook-group-3b5998.svg?style=flat)](https://facebook.com/groups/basicBot) [![twitter](https://img.shields.io/twitter/follow/bscbt.svg?style=social)](https://twitter.com/bscbt) +### Contact -Email enquiries: [hi [at] benzi [dot] io](mailto:hi@benzi.io) +[![Slack](https://basicbot.herokuapp.com/badge.svg)](https://basicbot.herokuapp.com/) [![Facebook group](https://img.shields.io/badge/facebook-group-3b5998.svg?style=flat)](https://facebook.com/groups/basicBot) [![Twitter](https://img.shields.io/twitter/follow/bscbt.svg?style=social)](https://twitter.com/bscbt) + +Email enquiries: [hi[at]benzi[dot]io](mailto:hi@benzi.io) ### Usage -Bookmark the following code. To run the bot, run the bookmark. +Bookmark the following code. To run the bot, click the bookmark. ``` javascript:(function(){$.getScript('https://rawgit.com/basicBot/source/master/basicBot.js');})(); @@ -16,7 +18,7 @@ If this does not work, go to [basicBot.js](https://raw.githubusercontent.com/bas ### Commands -These can be found in [the commands file](commands.md). +These can be found in [the commands list](commands.md). ### Blacklists @@ -27,7 +29,7 @@ You can add blacklists in the settings of the bot via the methods given in that ### Extending functionality and custom default settings basicBot can be customized to fit your needs. Please refer to [the customization repository](https://github.com/basicBot/custom) for more info. -Please do not try to if you are not confident in your javascript capabilities. +Please do not try to if you are not confident in your JavaScript capabilities.