Advertisement
Guest User

Untitled

a guest
Mar 5th, 2016
672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.23 KB | None | 0 0
  1. var fs = require('fs');
  2. var config = {};
  3.  
  4. // IMPORTANT: In order to be able to launch the musiqpad server, set this to true
  5. config.setup = true;
  6.  
  7. /*
  8. Set this flag to false to disable web server hosting or true to enable web server hosting.
  9. This is useful if you want to host static files in another web server such as nginx.
  10.  
  11. If you are only hosting the socket and want musiqpad to host the frontend set this to false.
  12. */
  13. config.hostWebserver = false;
  14.  
  15. config.socketServer = {
  16. host: '', // Host name or IP that the socket server is located at. Leave blank to bind to process IP address
  17. port: '8081', // Leave blank to bind to process PORT
  18. };
  19.  
  20. config.webServer = {
  21. address: '', // Leave blank to bind to process IP address
  22. port: '8080' // Leave blank to bind to process PORT
  23. };
  24.  
  25. config.useSSL = true;
  26.  
  27. config.certificate = {
  28. // key: fs.readFileSync('../cert.key'),
  29. // cert: fs.readFileSync('../cert.crt')
  30. };
  31.  
  32.  
  33. config.room = {
  34. name: 'NCS', // This is your pad name. It is shown as a user friendly description on the lounge and tab name.
  35. slug: 'ncs', // Slugs are used to identify your pad when connecting to musiqpad! This slug must be unique and all in lowecase.
  36. greet: 'Welcome to NCS! Enjoy your stay! Our rules are use common sense and dont play songs longer then 6 minutes without permission!',
  37. //bg: null, // Background image file path. Accepts external images. If this is undefined the default background will be used.
  38. maxCon: 0,
  39. ownerEmail: 'csxkingjp@gmail.com', // This needs to be set, then the server restarted to take effect.
  40. guestCanSeeChat: true,
  41. bannedCanSeeChat: true,
  42. lastmsglimit: 6, // How many messages a user can see after joining.
  43. signupcd: 0, // How many miliseconds the user cannot do certain things after they sign up.
  44. allowemojis: true,
  45. allowrecovery: true,
  46. recaptcha: true,
  47. queue: {
  48. cycle: true,
  49. lock: false,
  50. limit: 50,
  51. },
  52. history: {
  53. limit_save: 0,
  54. limit_send: 5,
  55. },
  56. email: {
  57. confirmation: false, // Whether to force user to confirm his email address before he is able to do anything
  58. sender: 'csxking@electricgaming.ga',
  59. options: {},
  60. },
  61. description: '\
  62. <h1>Welcome to NCS!</h1>\
  63. We dont have many rules! Simply use common sense and dont play junk or songs over 6 minutes without permission!\
  64. ',
  65. };
  66.  
  67. config.apis = {
  68. YT: {
  69. key: 'AIzaSyAzzgc8nM7thAEssqkvuFFNCJzWTq2Al6E', // Required api key in order for YouTube search to work.
  70. restrictSearchToMusic: false,
  71. },
  72. SC: {
  73. key: '',
  74. },
  75. reCaptcha: {
  76. key: '6Lea-xcTAAAAAHETTSg1Doao46ZPApKFkb6MVmJy',
  77. secret: '6Lea-xcTAAAAAI7sAp3Y0q7CvA052hMoq1RY6idE',
  78. },
  79. musiqpad: {
  80. key: 'c7261f03-5c14-1120-3515-91bc15622434', // This is required in order for your socket to update the musiqpad lounge. Request an API Key here: https://musiqpad.com/lounge
  81. sendLobbyStats: true,
  82. },
  83. };
  84.  
  85. // The amount of time users stay logged in for before having to login again in days.
  86. // 0 = login every time;
  87. config.loginExpire = 7;
  88.  
  89. // Database config
  90. config.db = {
  91. dbType: 'mysql', // Values "level" for LevelDB and "mysql" for MySQL
  92. dbDir: './socketserver/db', // Only used for LevelDB. Directory to save databases. Default is ./socketserver/db
  93. mysqlUser: 'u938212858_ncs', // Only used for MySQL. Database username
  94. mysqlPassword: 'CENSOREDDDEDedDeD', // Only used for MySQL. Database password
  95. mysqlHost: 'mysql.hostinger.co.uk', // Only used for MySQL. Host address
  96. mysqlDatabase: 'u938212858_ncs', // Only used for MySQL. Database being used
  97. };
  98.  
  99. /*
  100. 'djqueue.join': Ability to join queue
  101. 'djqueue.joinlocked': Ability to join locked queue
  102. 'djqueue.leave': Ability to leave queue
  103. 'djqueue.skip.self': Ability to skip self
  104. 'djqueue.skip.other': Ability to skip others
  105. 'djqueue.lock': Ability to lock/unlock queue
  106. 'djqueue.limit': Ability to change waitlist limit
  107. 'djqueue.cycle': Ability to enable/disable queue cycle
  108. 'djqueue.move': Ability to move, swap, add and remove people in the queue
  109. 'djqueue.playLiveVideos': Ability to play live videos with undefined duration
  110. 'chat.send': Abilty to send chat messages
  111. 'chat.delete': Ability to delete others' chat messages
  112. 'chat.specialMention': Ability to use @everyone, @guest and @djs as mention
  113. 'chat.broadcast': Ability to send a highlighted broadcast message
  114. 'chat.private': Ability to send PMs
  115. 'chat.staff': Ability to send and receive special staff chat
  116. 'playlist.create': Ability to create playlists
  117. 'playlist.delete': Ability to delete playlists
  118. 'playlist.rename': Ability to rename playlists
  119. 'playlist.import': Ability to import playlists
  120. 'playlist.shuffle': Ability to shuffle playlists
  121. 'room.grantroles': Ability to change user roles (requires canGrantPerms property)
  122. 'room.banUser': Ability to ban and unban users
  123. 'room.ratelimit.bypass': Will bypass ratelimit
  124.  
  125. NOTE: Changing the PROPERTY NAME will break role assignments. Title can be changed
  126. without breaking things, but property name must stay the same.
  127. */
  128.  
  129. // Defines the order that roles will appear on the user list
  130. // PROPERTY names. NOT title. (case-sensitive)
  131. config.roleOrder = ['dev', 'owner', 'coowner', 'supervisor', 'bot', 'regular', 'default'];
  132.  
  133.  
  134. // Defines which roles are 'staff' members
  135. // PROPERTY names. NOT title. (case-sensitive)
  136. config.staffRoles = ['dev', 'owner', 'coowner', 'supervisor', 'bot'];
  137.  
  138.  
  139. /*
  140.  
  141. Role Options:
  142.  
  143. rolename:{
  144. title: '', // This is the title that gets displayed on the frontend.
  145. showtitle: true/false, // This is whether or not to display the title on the frontend.
  146. badge: '', // This can be any icon from the mdi package. A list of the icons is available here: https://materialdesignicons.com
  147. style: {}, // This can be used to set specific styles to the Username of a user with this role.
  148. permissions: [], // A list of permissions a user with this role is allowed to use.
  149. canGrantRoles: [], // A list of the roles that a user with this role can grant. I.e. an owner should be able to grant manager.
  150. mention: '' // A custom mention. I.e. 'owner' would mention this group when someone typed @owner.
  151. }
  152.  
  153. Below are a list of roles we suggest using.
  154.  
  155. */
  156.  
  157. // Defines roles and permissions
  158. config.roles = {
  159. owner: { // REQUIRED ROLE
  160. title: 'Host',
  161. showtitle: true,
  162. style: {
  163. 'color': '#F46B40'
  164. },
  165. permissions: [
  166. 'djqueue.join',
  167. 'djqueue.joinlocked',
  168. 'djqueue.leave',
  169. 'djqueue.skip.self',
  170. 'djqueue.skip.other',
  171. 'djqueue.lock',
  172. 'djqueue.cycle',
  173. 'djqueue.limit',
  174. 'djqueue.move',
  175. 'djqueue.playLiveVideos',
  176. 'chat.send',
  177. 'chat.private',
  178. 'chat.broadcast',
  179. 'chat.delete',
  180. 'chat.specialMention',
  181. 'chat.staff',
  182. 'playlist.create',
  183. 'playlist.delete',
  184. 'playlist.rename',
  185. 'playlist.import',
  186. 'playlist.shuffle',
  187. 'room.grantroles',
  188. 'room.banUser',
  189. 'room.ratelimit.bypass',
  190. ],
  191. canGrantRoles: [
  192. 'dev',
  193. 'coowner',
  194. 'supervisor',
  195. 'bot',
  196. 'regular',
  197. 'default',
  198. ],
  199. },
  200. dev: { // OPTIONAL ROLE - FOR MUSIQPAD DEVELOPERS
  201. title: 'Musiqpad Developer',
  202. showtitle: true,
  203. style: {
  204. 'color': '#A77DC2'
  205. },
  206. permissions: [
  207. 'djqueue.join',
  208. 'djqueue.joinlocked',
  209. 'djqueue.leave',
  210. 'djqueue.skip.self',
  211. 'djqueue.skip.other',
  212. 'djqueue.lock',
  213. 'djqueue.cycle',
  214. 'djqueue.limit',
  215. 'djqueue.move',
  216. 'djqueue.playLiveVideos',
  217. 'chat.send',
  218. 'chat.private',
  219. 'chat.broadcast',
  220. 'chat.delete',
  221. 'chat.specialMention',
  222. 'chat.staff',
  223. 'playlist.create',
  224. 'playlist.delete',
  225. 'playlist.rename',
  226. 'playlist.import',
  227. 'playlist.shuffle',
  228. 'room.grantroles',
  229. 'room.banUser',
  230. 'room.ratelimit.bypass',
  231. ],
  232. canGrantRoles: [
  233. 'dev',
  234. 'coowner',
  235. 'supervisor',
  236. 'bot',
  237. 'regular',
  238. 'default'
  239. ],
  240. mention: 'devs',
  241. },
  242. coowner: {
  243. title: 'Co-Host',
  244. showtitle: true,
  245. style: {
  246. 'color': '#89BE6C'
  247. },
  248. permissions: [
  249. 'djqueue.join',
  250. 'djqueue.joinlocked',
  251. 'djqueue.leave',
  252. 'djqueue.skip.self',
  253. 'djqueue.skip.other',
  254. 'djqueue.lock',
  255. 'djqueue.cycle',
  256. 'djqueue.limit',
  257. 'djqueue.move',
  258. 'djqueue.playLiveVideos',
  259. 'chat.send',
  260. 'chat.private',
  261. 'chat.delete',
  262. 'chat.specialMention',
  263. 'chat.broadcast',
  264. 'chat.staff',
  265. 'playlist.create',
  266. 'playlist.delete',
  267. 'playlist.rename',
  268. 'playlist.import',
  269. 'playlist.shuffle',
  270. 'room.grantroles',
  271. 'room.banUser',
  272. 'room.ratelimit.bypass',
  273. ],
  274. canGrantRoles: [
  275. 'supervisor',
  276. 'bot',
  277. 'regular',
  278. 'default',
  279. ],
  280. },
  281. supervisor: {
  282. title: 'Bouncer',
  283. showtitle: true,
  284. style: {
  285. 'color': '#009CDD'
  286. },
  287. permissions: [
  288. 'djqueue.join',
  289. 'djqueue.joinlocked',
  290. 'djqueue.leave',
  291. 'djqueue.skip.self',
  292. 'djqueue.skip.other',
  293. 'djqueue.lock',
  294. 'djqueue.cycle',
  295. 'djqueue.move',
  296. 'djqueue.playLiveVideos',
  297. 'chat.send',
  298. 'chat.private',
  299. 'chat.delete',
  300. 'chat.specialMention',
  301. 'chat.staff',
  302. 'playlist.create',
  303. 'playlist.delete',
  304. 'playlist.rename',
  305. 'playlist.import',
  306. 'playlist.shuffle',
  307. 'room.grantroles',
  308. 'room.banUser',
  309. 'room.ratelimit.bypass',
  310. ],
  311. canGrantRoles: [
  312. 'regular',
  313. 'default'
  314. ],
  315. },
  316. bot: {
  317. title: 'Bot',
  318. showtitle: true,
  319. badge: 'android',
  320. style: {
  321. 'color': 'red'
  322. },
  323. permissions: [
  324. 'djqueue.skip.other',
  325. 'djqueue.lock',
  326. 'djqueue.cycle',
  327. 'djqueue.move',
  328. 'chat.send',
  329. 'chat.delete',
  330. 'chat.specialMention',
  331. 'room.banUser',
  332. 'room.ratelimit.bypass',
  333. ],
  334. canGrantRoles: [],
  335. },
  336. regular: {
  337. title: 'Resident DJ',
  338. showtitle: false,
  339. style: {
  340. 'color': '#925AFF'
  341. },
  342. permissions: [
  343. 'djqueue.join',
  344. 'djqueue.joinlocked',
  345. 'djqueue.leave',
  346. 'chat.send',
  347. 'djqueue.skip.self',
  348. 'playlist.create',
  349. 'playlist.delete',
  350. 'playlist.rename',
  351. 'playlist.import'
  352. ],
  353. canGrantRoles: [],
  354. },
  355. default: { // REQUIRED ROLE
  356. title: 'Grey',
  357. showtitle: false,
  358. style: {
  359. 'color': '#757575'
  360. },
  361. permissions: [
  362. 'djqueue.join',
  363. 'djqueue.leave',
  364. 'chat.send',
  365. 'djqueue.skip.self',
  366. 'playlist.create',
  367. 'playlist.delete',
  368. 'playlist.rename',
  369. 'playlist.import'
  370. ],
  371. canGrantRoles: [],
  372. }
  373. };
  374.  
  375. module.exports = config;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement