Advertisement
Guest User

Rankso

a guest
Apr 19th, 2019
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.20 KB | None | 0 0
  1. 'use strict';
  2.  
  3. /**
  4. * The server port - the port to run Pokemon Showdown under
  5. */
  6. exports.port = 8080;
  7.  
  8. //serverIp for parsing of custom avatars, put your server's ip here
  9. exports.serverIp = '';
  10.  
  11. /**
  12. * The server address - the address at which Pokemon Showdown should be hosting
  13. * This should be kept set to 0.0.0.0 unless you know what you're doing.
  14. */
  15. exports.bindaddress = '0.0.0.0';
  16.  
  17. /**
  18. * workers - the number of networking child processes to spawn
  19. * This should be no greater than the number of threads available on your
  20. * server's CPU. If you're not sure how many you have, you can check from a
  21. * terminal by running:
  22. *
  23. * $ node -e "console.log(require('os').cpus().length)"
  24. *
  25. * Using more workers than there are available threads will cause performance
  26. * issues. Keeping a couple threads available for use for OS-related work and
  27. * other PS processes will likely give you the best performance, if your
  28. * server's CPU is capable of multithreading. If you don't know what any of
  29. * this means or you are unfamiliar with PS' networking code, leave this set
  30. * to 1.
  31. */
  32. exports.workers = 1;
  33.  
  34. /**
  35. * wsdeflate - compresses WebSocket messages
  36. * Toggles use of the Sec-WebSocket-Extension permessage-deflate extension.
  37. * This compresses messages sent and received over a WebSocket connection
  38. * using the zlib compression algorithm. As a caveat, message compression
  39. * may make messages take longer to procress.
  40. * @type {AnyObject?}
  41. */
  42. exports.wsdeflate = null;
  43.  
  44. /*
  45. // example:
  46. exports.wsdeflate = {
  47. level: 5,
  48. memLevel: 8,
  49. strategy: 0,
  50. noContextTakeover: true,
  51. requestNoContextTakeover: true,
  52. maxWindowBits: 15,
  53. requestMaxWindowBits: 15,
  54. }; */
  55.  
  56. /**
  57. * ssl - support WSS, allowing you to access through HTTPS
  58. * The client requires port 443, so if you use a different port here,
  59. * it will need to be forwarded to 443 through iptables rules or
  60. * something.
  61. */
  62. exports.ssl = null;
  63.  
  64. /*
  65. // example:
  66. const fs = require('fs');
  67. exports.ssl = {
  68. port: 443,
  69. options: {
  70. key: fs.readFileSync('./config/ssl/privkey.pem'),
  71. cert: fs.readFileSync('./config/ssl/fullchain.pem'),
  72. },
  73. };
  74. */
  75.  
  76. /*
  77. Main's SSL deploy script from Let's Encrypt looks like:
  78. cp /etc/letsencrypt/live/sim.psim.us/privkey.pem ~user/Pokemon-Showdown/config/ssl/
  79. cp /etc/letsencrypt/live/sim.psim.us/fullchain.pem ~user/Pokemon-Showdown/config/ssl/
  80. chown user:user ~user/Pokemon-Showdown/config/ssl/privkey.pem
  81. chown user:user ~user/Pokemon-Showdown/config/ssl/fullchain.pem
  82. */
  83.  
  84. /**
  85. * proxyip - proxy IPs with trusted X-Forwarded-For headers
  86. * This can be either false (meaning not to trust any proxies) or an array
  87. * of strings. Each string should be either an IP address or a subnet given
  88. * in CIDR notation. You should usually leave this as `false` unless you
  89. * know what you are doing.
  90. */
  91. exports.proxyip = false;
  92.  
  93. /**
  94. * ofe - write heapdumps if sockets.js workers run out of memory.
  95. * If you wish to enable this, you will need to install node-oom-heapdump,
  96. * as it is sometimes not installed by default:
  97. * $ npm install node-oom-heapdump
  98. */
  99. exports.ofe = false;
  100.  
  101. /**
  102. * Pokemon of the Day - put a pokemon's name here to make it Pokemon of the Day
  103. * The PotD will always be in the #2 slot (not #1 so it won't be a lead)
  104. * in every Random Battle team.
  105. */
  106. exports.potd = '';
  107.  
  108. /**
  109. * crash guard - write errors to log file instead of crashing
  110. * This is normally not recommended - if Node wants to crash, the
  111. * server needs to be restarted
  112. * However, most people want the server to stay online even if there is a
  113. * crash, so this option is provided
  114. */
  115. exports.crashguard = true;
  116.  
  117. /**
  118. * login server data - don't forget the http:// and the trailing slash
  119. * This is the URL of the user database and ladder mentioned earlier.
  120. * Don't change this setting - there aren't any other login servers right now
  121. */
  122. exports.loginserver = 'http://play.pokemonshowdown.com/';
  123. exports.loginserverkeyalgo = "RSA-SHA1";
  124. exports.loginserverpublickeyid = 4;
  125. exports.loginserverpublickey = `-----BEGIN PUBLIC KEY-----
  126. MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAzfWKQXg2k8c92aiTyN37
  127. dl76iW0aeAighgzeesdar4xZT1A9yzLpj2DgR8F8rh4R32/EVOPmX7DCf0bYWeh3
  128. QttP0HVKKKfsncJZ9DdNtKj1vWdUTklH8oeoIZKs54dwWgnEFKzb9gxqu+z+FJoQ
  129. vPnvfjCRUPA84O4kqKSuZT2qiWMFMWNQPXl87v+8Atb+br/WXvZRyiLqIFSG+ySn
  130. Nwx6V1C8CA1lYqcPcTfmQs+2b4SzUa8Qwkr9c1tZnXlWIWj8dVvdYtlo0sZZBfAm
  131. X71Rsp2vwEleSFKV69jj+IzAfNHRRw+SADe3z6xONtrJOrp+uC/qnLNuuCfuOAgL
  132. dnUVFLX2aGH0Wb7ZkriVvarRd+3otV33A8ilNPIoPb8XyFylImYEnoviIQuv+0VW
  133. RMmQlQ6RMZNr6sf9pYMDhh2UjU11++8aUxBaso8zeSXC9hhp7mAa7OTxts1t3X57
  134. 72LqtHHEzxoyLj/QDJAsIfDmUNAq0hpkiRaXb96wTh3IyfI/Lqh+XmyJuo+S5GSs
  135. RhlSYTL4lXnj/eOa23yaqxRihS2MT9EZ7jNd3WVWlWgExIS2kVyZhL48VA6rXDqr
  136. Ko0LaPAMhcfETxlFQFutoWBRcH415A/EMXJa4FqYa9oeXWABNtKkUW0zrQ194btg
  137. Y929lRybWEiKUr+4Yw2O1W0CAwEAAQ==
  138. -----END PUBLIC KEY-----
  139. `;
  140.  
  141. /**
  142. * crashguardemail - if the server has been running for more than an hour
  143. * and crashes, send an email using these settings, rather than locking down
  144. * the server. Uncomment this definition if you want to use this feature;
  145. * otherwise, all crashes will lock down the server. If you wish to enable
  146. * this setting, you will need to install nodemailer, as it is not installed
  147. * by default:
  148. * $ npm install nodemailer
  149. * @type {AnyObject?}
  150. */
  151. exports.crashguardemail = null;
  152. /* exports.crashguardemail = {
  153. options: {
  154. host: 'mail.example.com',
  155. port: 465,
  156. secure: true,
  157. auth: {
  158. user: 'example@domain.com',
  159. pass: 'password'
  160. }
  161. },
  162. from: 'crashlogger@example.com',
  163. to: 'admin@example.com',
  164. subject: 'Pokemon Showdown has crashed!'
  165. }; */
  166.  
  167. /**
  168. * basic name filter - removes characters used for impersonation
  169. * The basic name filter removes Unicode characters that can be used for impersonation,
  170. * like the upside-down exclamation mark (looks like an i), the Greek omicron (looks
  171. * like an o), etc. Disable only if you need one of the alphabets it disables, such as
  172. * Greek or Cyrillic.
  173. */
  174. exports.disablebasicnamefilter = false;
  175.  
  176. /**
  177. * report joins and leaves - shows messages like "<USERNAME> joined"
  178. * Join and leave messages are small and consolidated, so there will never
  179. * be more than one line of messages.
  180. * If this setting is set to `true`, it will override the client-side
  181. * /hidejoins configuration for users.
  182. * This feature can lag larger servers - turn this off if your server is
  183. * getting more than 80 or so users.
  184. */
  185. exports.reportjoins = true;
  186.  
  187. /**
  188. * report joins and leaves periodically - sends silent join and leave messages in batches
  189. * This setting will only be effective if `reportjoins` is set to false, and users will
  190. * only be able to see the messages if they have the /showjoins client-side setting enabled.
  191. * Set this to a positive amount of milliseconds if you want to enable this feature.
  192. */
  193. exports.reportjoinsperiod = 0;
  194.  
  195. /**
  196. * report battles - shows messages like "OU battle started" in the lobby
  197. * This feature can lag larger servers - turn this off if your server is
  198. * getting more than 160 or so users.
  199. */
  200. exports.reportbattles = true;
  201.  
  202. /**
  203. * report joins and leaves in battle - shows messages like "<USERNAME> joined" in battle
  204. * Set this to false on large tournament servers where battles get a lot of joins and leaves.
  205. * Note that the feature of turning this off is deprecated.
  206. */
  207. exports.reportbattlejoins = true;
  208.  
  209. /**
  210. * notify staff when users have a certain amount of room punishments.
  211. * Setting this to a number greater than zero will notify staff for everyone with
  212. * the required amount of room punishments.
  213. * Set this to 0 to turn the monitor off.
  214. */
  215. exports.monitorminpunishments = 3;
  216.  
  217. /**
  218. * allow punishmentmonitor to lock users with multiple roombans.
  219. * When set to `true`, this feature will automatically lock any users with three or more
  220. * active roombans, and notify the staff room.
  221. * Note that this requires punishmentmonitor to be enabled, and therefore requires the `monitorminpunishments`
  222. * option to be set to a number greater than zero. If `monitorminpunishments` is set to a value greater than 3,
  223. * the autolock will only apply to people who pass this threshold.
  224. */
  225. exports.punishmentautolock = false;
  226.  
  227. /**
  228. * restrict sending links to autoconfirmed users only.
  229. * If this is set to `true`, only autoconfirmed users can send links to either chatrooms or other users, except for staff members.
  230. * This option can be used if your server has trouble with spammers mass PMing links to users, or trolls sending malicious links.
  231. */
  232. exports.restrictLinks = false;
  233.  
  234. /**
  235. * whitelist - prevent users below a certain group from doing things
  236. * For the modchat settings, false will allow any user to participate, while a string
  237. * with a group symbol will restrict it to that group and above. The string
  238. * 'autoconfirmed' is also supported for chatmodchat and battlemodchat, to restrict
  239. * chat to autoconfirmed users.
  240. * This is usually intended to be used as a whitelist feature - set these to '+' and
  241. * voice every user you want whitelisted on the server.
  242.  
  243. /**
  244. * chat modchat - default minimum group for speaking in chatrooms; changeable with /modchat
  245. */
  246. exports.chatmodchat = false;
  247. /**
  248. * battle modchat - default minimum group for speaking in battles; changeable with /modchat
  249. */
  250. exports.battlemodchat = false;
  251. /**
  252. * pm modchat - minimum group for PMing other users, challenging other users
  253. */
  254. exports.pmmodchat = false;
  255. /**
  256. * ladder modchat - minimum group for laddering
  257. */
  258. exports.laddermodchat = false;
  259. // tell rank - minimum group for offline messageing, set to false to disable this.
  260. exports.tellrank = ' ';
  261.  
  262. /**
  263. * forced timer - force the timer on for all battles
  264. * Players will be unable to turn it off.
  265. * This setting can also be turned on with the command /forcetimer.
  266. */
  267. exports.forcetimer = false;
  268.  
  269. /**
  270. * backdoor - allows Pokemon Showdown system operators to provide technical
  271. * support for your server
  272. * This backdoor gives system operators (such as Zarel) console admin
  273. * access to your server, which allow them to provide tech support. This
  274. * can be useful in a variety of situations: if an attacker attacks your
  275. * server and you are not online, if you need help setting up your server,
  276. * etc. If you do not trust Pokemon Showdown with admin access, you should
  277. * disable this feature.
  278. */
  279. exports.backdoor = true;
  280.  
  281. /**
  282. * Wavelength backdoor - same as above, but with Wavelength system operators
  283. * enable this if you do trust the Wavelength system operators with your server
  284. * Wavelength System Operators: HoeenHero, Mystifi, Desokoro
  285. */
  286. exports.WLbackdoor = false;
  287.  
  288. /**
  289. * List of IPs and user IDs with dev console (>> and >>>) access.
  290. * The console is incredibly powerful because it allows the execution of
  291. * arbitrary commands on the local computer (as the user running the
  292. * server). If an account with the console permission were compromised,
  293. * it could possibly be used to take over the server computer. As such,
  294. * you should only specify a small range of trusted IPs and users here,
  295. * or none at all. By default, only localhost can use the dev console.
  296. * In addition to connecting from a valid IP, a user must *also* have
  297. * the `console` permission in order to use the dev console.
  298. * Setting this to an empty array ([]) will disable the dev console.
  299. */
  300. exports.consoleips = ['127.0.0.1'];
  301.  
  302. /**
  303. * Whether to watch the config file for changes. If this is enabled,
  304. * then the config.js file will be reloaded when it is changed.
  305. * This can be used to change some settings using a text editor on
  306. * the server.
  307. */
  308. exports.watchconfig = true;
  309.  
  310. /**
  311. * logchat - whether to log chat rooms.
  312. */
  313. exports.logchat = false;
  314.  
  315. /**
  316. * logchallenges - whether to log challenge battles. Useful for tournament servers.
  317. */
  318. exports.logchallenges = false;
  319.  
  320. /**
  321. * loguserstats - how often (in milliseconds) to write user stats to the
  322. * lobby log. This has no effect if `logchat` is disabled.
  323. */
  324. exports.loguserstats = 1000 * 60 * 10; // 10 minutes
  325.  
  326. /**
  327. * validatorprocesses - the number of processes to use for validating teams
  328. * simulatorprocesses - the number of processes to use for handling battles
  329. * You should leave both of these at 1 unless your server has a very large
  330. * amount of traffic (i.e. hundreds of concurrent battles).
  331. */
  332. exports.validatorprocesses = 1;
  333. exports.simulatorprocesses = 1;
  334.  
  335. /**
  336. * inactiveuserthreshold - how long a user must be inactive before being pruned
  337. * from the `users` array. The default is 1 hour.
  338. */
  339. exports.inactiveuserthreshold = 1000 * 60 * 60;
  340.  
  341. /**
  342. * autolockdown - whether or not to automatically kill the server when it is
  343. * in lockdown mode and the final battle finishes. This is potentially useful
  344. * to prevent forgetting to restart after a lockdown where battles are finished.
  345. */
  346. exports.autolockdown = true;
  347.  
  348. /**
  349. * Custom avatars.
  350. * This allows you to specify custom avatar images for users on your server.
  351. * Place custom avatar files under the /config/avatars/ directory.
  352. * Users must be specified as userids -- that is, you must make the name all
  353. * lowercase and remove non-alphanumeric characters.
  354. *
  355. * Your server *must* be registered in order for your custom avatars to be
  356. * displayed in the client.
  357. * @type {{[userid: string]: string}}
  358. */
  359. exports.customavatars = {
  360. // 'userid': 'customavatar.png'
  361. };
  362.  
  363. /**
  364. * tourroom - specify a room to receive tournament announcements (defaults to
  365. * the room 'tournaments').
  366. * tourannouncements - announcements are only allowed in these rooms
  367. * tourdefaultplayercap - a set cap of how many players can be in a tournament
  368. * ratedtours - toggles tournaments being ladder rated (true) or not (false)
  369. */
  370. exports.tourroom = '';
  371. /** @type {string[]} */
  372. exports.tourannouncements = [/* roomids */];
  373. exports.tourdefaultplayercap = 0;
  374. exports.ratedtours = false;
  375.  
  376. /**
  377. * appealurl - specify a URL containing information on how users can appeal
  378. * disciplinary actions on your section. You can also leave this blank, in
  379. * which case users won't be given any information on how to appeal.
  380. */
  381. exports.appealurl = '';
  382.  
  383. /**
  384. * repl - whether repl sockets are enabled or not
  385. * replsocketprefix - the prefix for the repl sockets to be listening on
  386. * replsocketmode - the file mode bits to use for the repl sockets
  387. */
  388. exports.repl = true;
  389. exports.replsocketprefix = './logs/repl/';
  390. exports.replsocketmode = 0o600;
  391.  
  392. /**
  393. * disablehotpatchall - disables `/hotpatch all`. Generally speaking, there's a
  394. * pretty big need for /hotpatch all - convenience. The only advantage any hotpatch
  395. * forms other than all is lower RAM use (which is only a problem for Main because
  396. * Main is huge), and to do pinpoint hotpatching (like /nohotpatch).
  397. */
  398. exports.disablehotpatchall = false;
  399.  
  400. //github repo config
  401. exports.github = {
  402. secret: "", // Your repo secret
  403. port: "", // Desired port, must be unused and above 1000
  404. rooms: [''], // Desired rooms
  405. };
  406.  
  407. /**
  408. * permissions and groups:
  409. * Each entry in `grouplist' is a seperate group. Some of the members are "special"
  410. * while the rest is just a normal permission.
  411. * The order of the groups determines their ranking.
  412. * The special members are as follows:
  413. * - symbol: Specifies the symbol of the group (as shown in front of the username)
  414. * - id: Specifies an id for the group.
  415. * - name: Specifies the human-readable name for the group.
  416. * - root: If this is true, the group can do anything.
  417. * - inherit: The group uses the group specified's permissions if it cannot
  418. * find the permission in the current group. Never make the graph
  419. * produced using this member have any cycles, or the server won't run.
  420. * - jurisdiction: The default jurisdiction for targeted permissions where one isn't
  421. * explictly specified. "Targeted permissions" are permissions
  422. * that might affect another user, such as `ban' or `promote'.
  423. * 's' is a special group where it means the user itself only
  424. * and 'u' is another special group where it means all groups
  425. * lower in rank than the current group.
  426. * - roomonly: forces the group to be a per-room moderation rank only.
  427. * - globalonly: forces the group to be a global rank only.
  428. * All the possible permissions are as follows:
  429. * - console: Developer console (>>).
  430. * - lockdown: /lockdown and /endlockdown commands.
  431. * - hotpatch: /hotpatch, /crashfixed and /savelearnsets commands.
  432. * - ignorelimits: Ignore limits such as chat message length.
  433. * - promote: Promoting and demoting. Will only work if the target user's current
  434. * group and target group are both in jurisdiction.
  435. * - room<rank>: /roompromote to <rank> (eg. roomvoice)
  436. * - makeroom: Create/delete chatrooms, and set modjoin/roomdesc/privacy
  437. * - editroom: Editing properties of rooms
  438. * - editprivacy: Set modjoin/privacy only for battles
  439. * - ban: Banning and unbanning.
  440. * - mute: Muting and unmuting.
  441. * - lock: locking (ipmute) and unlocking.
  442. * - receivemutedpms: Receive PMs from muted users.
  443. * - forcerename: /fr command.
  444. * - ip: IP checking.
  445. * - alts: Alt checking.
  446. * - modlog: view the moderator logs.
  447. * - broadcast: Broadcast informational commands.
  448. * - declare: /declare command.
  449. * - announce: /announce command.
  450. * - modchat: Set modchat.
  451. * - potd: Set PotD.
  452. * - forcewin: /forcewin command.
  453. * - battlemessage: /a command.
  454. * - tournaments: creating tournaments (/tour new, settype etc.)
  455. * - gamemoderation: /tour dq, autodq, end etc.
  456. * - gamemanagement: enable/disable games, minigames, and tournaments.
  457. * - minigame: make minigames (hangman, polls, etc.).
  458. * - game: make games.
  459. * Wavelength specific permissions
  460. * - customcolor: manage custom colors
  461. * - avatar: manage custom avatars
  462. * - badge: manage badges
  463. * - draft: manage room drafts
  464. * - economy: manage server currency
  465. * - emote: manage emoticons
  466. * - editshop: manage the server shop
  467. * - exp: manage the exp system
  468. * - faction: manage factions
  469. * - icon: manage custom icons
  470. * - lottery: manage a room's lottery
  471. * - news: manage server news
  472. * - perma: manage permalocks and permabans
  473. * - customtitle: manage custom profile titles
  474. * - psgo: manage PSGO
  475. * - pmall: send a masspm to a room or globally
  476. * - ssb: manage super staff bros free for all
  477. * - roomshop: manage room shops
  478. */
  479. exports.grouplist = [
  480. {
  481. symbol: '~',
  482. id: "admin",
  483. name: "Administrador",
  484. root: true,
  485. globalonly: true,
  486. },
  487. {
  488. symbol: '&',
  489. id: "leader",
  490. name: "Lider",
  491. inherit: '@',
  492. jurisdiction: 'u',
  493. promote: 'u',
  494. globalonly: true,
  495. forcewin: true,
  496. rangeban: true,
  497. disableladder: true,
  498. gamemanagement: true,
  499. exportinputlog: true,
  500. declare: true,
  501. gdeclare: true,
  502. makeroom: true,
  503. editroom: true,
  504. roomowner: true,
  505. roombot: true,
  506. roommod: true,
  507. roomdriver: true,
  508. modchatall: true,
  509. tourannouncements: true,
  510. potd: true,
  511. editprivacy: true,
  512. // Wavelength
  513. customcolor: true,
  514. badge: true,
  515. editshop: true,
  516. exp: true,
  517. faction: true,
  518. icon: true,
  519. customtitle: true,
  520. draft: true,
  521. masspm: true,
  522. avatar: true,
  523. economy: true,
  524. emote: true,
  525. psgo: true,
  526. ssb: true,
  527. },
  528. {
  529. symbol: '#',
  530. id: "owner",
  531. name: "Dueño de Sala",
  532. inherit: '@',
  533. jurisdiction: 'u',
  534. roombot: true,
  535. roommod: true,
  536. roomdriver: true,
  537. editroom: true,
  538. declare: true,
  539. modchatall: true,
  540. roomonly: true,
  541. gamemanagement: true,
  542. joinbattle: true,
  543. // Wavelength
  544. draft: true,
  545. masspm: true,
  546. },
  547. {
  548. symbol: '\u2606',
  549. id: "player",
  550. name: "Jugador",
  551. inherit: '+',
  552. roomvoice: true,
  553. modchat: true,
  554. roomonly: true,
  555. joinbattle: true,
  556. nooverride: true,
  557. editprivacy: true,
  558. },
  559. {
  560. symbol: '*',
  561. id: "bot",
  562. name: "Bot",
  563. inherit: '@',
  564. jurisdiction: 'u',
  565. declare: true,
  566. addhtml: true,
  567. },
  568. {
  569. symbol: '@',
  570. id: "mod",
  571. name: "Moderador",
  572. inherit: '%',
  573. jurisdiction: 'u',
  574. ban: true,
  575. modchat: true,
  576. roomvoice: true,
  577. forcerename: true,
  578. ip: true,
  579. alts: '@u',
  580. tournaments: true,
  581. game: true,
  582. // Wavelength
  583. news: true,
  584. roomshop: true,
  585. },
  586. {
  587. symbol: '%',
  588. id: "driver",
  589. name: "Conductor",
  590. inherit: '+',
  591. jurisdiction: 'u',
  592. announce: true,
  593. warn: '\u2606u',
  594. kick: true,
  595. mute: '\u2606u',
  596. lock: true,
  597. forcerename: true,
  598. timer: true,
  599. modlog: true,
  600. alts: '%u',
  601. bypassblocks: 'u%@&~',
  602. receiveauthmessages: true,
  603. gamemoderation: true,
  604. jeopardy: true,
  605. joinbattle: true,
  606. minigame: true,
  607. // Wavelength
  608. lottery: true,
  609. },
  610. {
  611. symbol: '+',
  612. id: "voice",
  613. name: "Vocero",
  614. inherit: ' ',
  615. alts: 's',
  616. broadcast: true,
  617. },
  618. {
  619. symbol: ' ',
  620. ip: 's',
  621. },
  622. {
  623. name: 'Lockeado',
  624. id: 'locked',
  625. symbol: '\u203d',
  626. punishgroup: 'LOCK',
  627. },
  628. {
  629. name: 'Muteado',
  630. id: 'muted',
  631. symbol: '!',
  632. punishgroup: 'MUTE',
  633. },
  634. ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement