BestBuddy

config.js

Jan 27th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.20 KB | None | 0 0
  1. 'use strict';
  2.  
  3. // The server port - the port to run Pokemon Showdown under
  4. exports.port = 8000;
  5.  
  6. exports.serverid = 'flash';
  7.  
  8. exports.servertoken = '3C1ho4XZekY0';
  9.  
  10. // proxyip - proxy IPs with trusted X-Forwarded-For headers
  11. // This can be either false (meaning not to trust any proxies) or an array
  12. // of strings. Each string should be either an IP address or a subnet given
  13. // in CIDR notation. You should usually leave this as `false` unless you
  14. // know what you are doing.
  15. exports.proxyip = '["10.0.0.0/8"]';
  16. // Pokemon of the Day - put a pokemon's name here to make it Pokemon of the Day
  17. // The PotD will always be in the #2 slot (not #1 so it won't be a lead)
  18. // in every Random Battle team.
  19. exports.potd = '';
  20.  
  21. // crash guard - write errors to log file instead of crashing
  22. // This is normally not recommended - if Node wants to crash, the
  23. // server needs to be restarted
  24. // Unfortunately, socket.io bug 409 requires some sort of crash guard
  25. // https://github.com/LearnBoost/socket.io/issues/609
  26. exports.crashguard = true;
  27.  
  28. // login server data - don't forget the http:// and the trailing slash
  29. // This is the URL of the user database and ladder mentioned earlier.
  30. // Don't change this setting - there aren't any other login servers right now
  31. exports.loginserver = 'http://play.pokemonshowdown.com/';
  32. exports.loginserverkeyalgo = "RSA-SHA1";
  33. exports.loginserverpublickeyid = 2;
  34. exports.loginserverpublickey = "-----BEGIN RSA PUBLIC KEY-----\n" +
  35. "MIICCgKCAgEAtFldA2rTCsPgqsp1odoH9vwhf5+QGIlOJO7STyY73W2+io33cV7t\n" +
  36. "ReNuzs75YBkZ3pWoDn2be0eb2UqO8dM3xN419FdHNORQ897K9ogoeSbLNQwyA7XB\n" +
  37. "N/wpAg9NpNu00wce2zi3/+4M/2H+9vlv2/POOj1epi6cD5hjVnAuKsuoGaDcByg2\n" +
  38. "EOullPh/00TkEkcyYtaBknZpED0lt/4ekw16mjHKcbo9uFiw+tu5vv7DXOkfciW+\n" +
  39. "9ApyYbNksC/TbDIvJ2RjzR9G33CPE+8J+XbS7U1jPvdFragCenz+B3AiGcPZwT66\n" +
  40. "dvHAOYRus/w5ELswOVX/HvHUb/GRrh4blXWUDn4KpjqtlwqY4H2oa+h9tEENCk8T\n" +
  41. "BWmv3gzGBM5QcehNsyEi9+1RUAmknqJW0QOC+kifbjbo/qtlzzlSvtbr4MwghCFe\n" +
  42. "1EfezeNAtqwvICznq8ebsGETyPSqI7fSbpmVULkKbebSDw6kqDnQso3iLjSX9K9C\n" +
  43. "0rwxwalCs/YzgX9Eq4jdx6yAHd7FNGEx4iu8qM78c7GKCisygZxF8kd0B7V7a5UO\n" +
  44. "wdlWIlTxJ2dfCnnJBFEt/wDsL54q8KmGbzOTvRq5uz/tMvs6ycgLVgA9r1xmVU+1\n" +
  45. "6lMr2wdSzyG7l3X3q1XyQ/CT5IP4unFs5HKpG31skxlfXv5a7KW5AfsCAwEAAQ==\n" +
  46. "-----END RSA PUBLIC KEY-----\n";
  47.  
  48. // crashguardemail - if the server has been running for more than an hour
  49. // and crashes, send an email using these settings, rather than locking down
  50. // the server. Uncomment this definition if you want to use this feature;
  51. // otherwise, all crashes will lock down the server.
  52. /**exports.crashguardemail = {
  53. options: {
  54. host: 'mail.example.com',
  55. port: 465,
  56. secure: true,
  57. auth: {
  58. user: 'example@domain.com',
  59. pass: 'password'
  60. }
  61. },
  62. from: 'crashlogger@example.com',
  63. to: 'admin@example.com',
  64. subject: 'Pokemon Showdown has crashed!'
  65. };**/
  66.  
  67. // report joins and leaves - shows messages like "<USERNAME> joined"
  68. // Join and leave messages are small and consolidated, so there will never
  69. // be more than one line of messages.
  70. // If this setting is set to `true`, it will override the client-side
  71. // /hidejoins configuration for users.
  72. // This feature can lag larger servers - turn this off if your server is
  73. // getting more than 80 or so users.
  74. exports.reportjoins = true;
  75.  
  76. // report joins and leaves periodically - sends silent join and leave messages in batches
  77. // This setting will only be effective if `reportjoins` is set to false, and users will
  78. // only be able to see the messages if they have the /showjoins client-side setting enabled.
  79. // Set this to a positive amount of milliseconds if you want to enable this feature.
  80. exports.reportjoinsperiod = 0;
  81.  
  82. // report battles - shows messages like "OU battle started" in the lobby
  83. // This feature can lag larger servers - turn this off if your server is
  84. // getting more than 160 or so users.
  85. exports.reportbattles = true;
  86.  
  87. // report joins and leaves in battle - shows messages like "<USERNAME> joined" in battle
  88. // Set this to false on large tournament servers where battles get a lot of joins and leaves.
  89. // Note that the feature of turning this off is deprecated.
  90. exports.reportbattlejoins = true;
  91.  
  92. // whitelist - prevent users below a certain group from doing things
  93. // For the modchat settings, false will allow any user to participate, while a string
  94. // with a group symbol will restrict it to that group and above. The string
  95. // 'autoconfirmed' is also supported for chatmodchat and battlemodchat, to restrict
  96. // chat to autoconfirmed users.
  97. // This is usually intended to be used as a whitelist feature - set these to '+' and
  98. // voice every user you want whitelisted on the server.
  99.  
  100. // chat modchat - default minimum group for speaking in chatrooms; changeable with /modchat
  101. exports.chatmodchat = false;
  102. // battle modchat - default minimum group for speaking in battles; changeable with /modchat
  103. exports.battlemodchat = false;
  104. // pm modchat - minimum group for PMing other users, challenging other users, and laddering
  105. exports.pmmodchat = false;
  106.  
  107. // forced timer - force the timer on for all battles
  108. // Players will be unable to turn it off.
  109. // This setting can also be turned on with the command /forcetimer.
  110. exports.forcetimer = false;
  111.  
  112. // backdoor - allows Pokemon Showdown system operators to provide technical
  113. // support for your server
  114. // This backdoor gives system operators (such as Zarel) console admin
  115. // access to your server, which allow them to provide tech support. This
  116. // can be useful in a variety of situations: if an attacker attacks your
  117. // server and you are not online, if you need help setting up your server,
  118. // etc. If you do not trust Pokemon Showdown with admin access, you should
  119. // disable this feature.
  120. exports.backdoor = true;
  121.  
  122. // List of IPs and user IDs with dev console (>> and >>>) access.
  123. // The console is incredibly powerful because it allows the execution of
  124. // arbitrary commands on the local computer (as the user running the
  125. // server). If an account with the console permission were compromised,
  126. // it could possibly be used to take over the server computer. As such,
  127. // you should only specify a small range of trusted IPs and users here,
  128. // or none at all. By default, only localhost can use the dev console.
  129. // In addition to connecting from a valid IP, a user must *also* have
  130. // the `console` permission in order to use the dev console.
  131. // Setting this to an empty array ([]) will disable the dev console.
  132. exports.consoleips = ['127.0.0.1'];
  133.  
  134. // Whether to watch the config file for changes. If this is enabled,
  135. // then the config.js file will be reloaded when it is changed.
  136. // This can be used to change some settings using a text editor on
  137. // the server.
  138. exports.watchconfig = true;
  139.  
  140. // logchat - whether to log chat rooms.
  141. exports.logchat = false;
  142.  
  143. // logchallenges - whether to log challenge battles. Useful for tournament servers.
  144. exports.logchallenges = false;
  145.  
  146. // loguserstats - how often (in milliseconds) to write user stats to the
  147. // lobby log. This has no effect if `logchat` is disabled.
  148. exports.loguserstats = 1000 * 60 * 10; // 10 minutes
  149.  
  150. // validatorprocesses - the number of processes to use for validating teams
  151. // simulatorprocesses - the number of processes to use for handling battles
  152. // You should leave both of these at 1 unless your server has a very large
  153. // amount of traffic (i.e. hundreds of concurrent battles).
  154. exports.validatorprocesses = 1;
  155. exports.simulatorprocesses = 1;
  156.  
  157. // inactiveuserthreshold - how long a user must be inactive before being pruned
  158. // from the `users` array. The default is 1 hour.
  159. exports.inactiveuserthreshold = 1000 * 60 * 60;
  160.  
  161. // tellsexpiryage - how long an offline message remains in existence before being removed.
  162. // By default, 7 days
  163. exports.tellsexpiryage = 1000 * 60 * 60 * 24 * 7;
  164.  
  165. // tellrank - the rank that offline messaging is available to. By default, available to voices
  166. // and above. Set to ' ' to allow all users to use offline messaging and `false` to disable
  167. // offline messaging completely. Set to `'autoconfirmed'` to allow only autoconfirmed users
  168. // to send offline messages.
  169. exports.tellrank = '+';
  170.  
  171. // database use to store user's money, tickets, etc.
  172. exports.database = 'lowdb';
  173.  
  174. // mysql configuration to create the connection to the database.
  175. exports.mysql = {
  176. host: 'localhost',
  177. user: 'me',
  178. password: 'secret',
  179. database: 'my_db'
  180. };
  181.  
  182. // Custom avatars.
  183. // This allows you to specify custom avatar images for users on your server.
  184. // Place custom avatar files under the /config/avatars/ directory.
  185. // Users must be specified as userids -- that is, you must make the name all
  186. // lowercase and remove non-alphanumeric characters.
  187. //
  188. // Your server *must* be registered in order for your custom avatars to be
  189. // displayed in the client.
  190. exports.customavatars = {
  191. //'Paul71': 'http://i.imgur.com/35DGGFO.png'
  192. };
  193.  
  194. // custom avatars appear in profile by specifiying server url.
  195. exports.avatarurl = 'http://flash.psim.us/';
  196.  
  197. // Tournament announcements
  198. // When tournaments are created in rooms listed below, they will be announced in
  199. // the server's main tournament room (either the specified tourroom or by default
  200. // the room 'tournaments')
  201. exports.tourroom = '';
  202. exports.tourannouncements = [/* roomids */];
  203.  
  204. // appealurl - specify a URL containing information on how users can appeal
  205. // disciplinary actions on your section. You can also leave this blank, in
  206. // which case users won't be given any information on how to appeal.
  207. exports.appealurl = '';
  208.  
  209. // replsocketprefix - the prefix for the repl sockets to be listening on
  210. // replsocketmode - the file mode bits to use for the repl sockets
  211. exports.replsocketprefix = './logs/repl/';
  212. exports.replsocketmode = 0o600;
  213.  
  214. // permissions and groups:
  215. // Each entry in `grouplist' is a seperate group. Some of the members are "special"
  216. // while the rest is just a normal permission.
  217. // The order of the groups determines their ranking.
  218. // The special members are as follows:
  219. // - symbol: Specifies the symbol of the group (as shown in front of the username)
  220. // - id: Specifies an id for the group.
  221. // - name: Specifies the human-readable name for the group.
  222. // - root: If this is true, the group can do anything.
  223. // - inherit: The group uses the group specified's permissions if it cannot
  224. // find the permission in the current group. Never make the graph
  225. // produced using this member have any cycles, or the server won't run.
  226. // - jurisdiction: The default jurisdiction for targeted permissions where one isn't
  227. // explictly specified. "Targeted permissions" are permissions
  228. // that might affect another user, such as `ban' or `promote'.
  229. // 's' is a special group where it means the user itself only
  230. // and 'u' is another special group where it means all groups
  231. // lower in rank than the current group.
  232. // - roomonly: forces the group to be a per-room moderation rank only.
  233. // - globalonly: forces the group to be a global rank only.
  234. // All the possible permissions are as follows:
  235. // - console: Developer console (>>).
  236. // - lockdown: /lockdown and /endlockdown commands.
  237. // - hotpatch: /hotpatch, /crashfixed and /savelearnsets commands.
  238. // - ignorelimits: Ignore limits such as chat message length.
  239. // - promote: Promoting and demoting. Will only work if the target user's current
  240. // group and target group are both in jurisdiction.
  241. // - room<rank>: /roompromote to <rank> (eg. roomvoice)
  242. // - makeroom: Create/delete chatrooms, and set modjoin/roomdesc/privacy
  243. // - editroom: Set modjoin/privacy only for battles/groupchats
  244. // - ban: Banning and unbanning.
  245. // - mute: Muting and unmuting.
  246. // - lock: locking (ipmute) and unlocking.
  247. // - receivemutedpms: Receive PMs from muted users.
  248. // - forcerename: /fr command.
  249. // - redirect: /redir command.
  250. // - ip: IP checking.
  251. // - alts: Alt checking.
  252. // - modlog: view the moderator logs.
  253. // - broadcast: Broadcast informational commands.
  254. // - declare: /declare command.
  255. // - announce: /announce command.
  256. // - modchat: Set modchat.
  257. // - potd: Set PotD.
  258. // - forcewin: /forcewin command.
  259. // - battlemessage: /a command.
  260. // - tournaments: creating tournaments (/tour new, settype etc.)
  261. // - tournamentsmoderation: /tour dq, autodq, end etc.
  262. // - tournamentsmanagement: enable/disable tournaments.
  263. exports.grouplist = [
  264. {
  265. symbol: '~',
  266. id: "admin",
  267. name: "Administrator",
  268. root: true,
  269. globalonly: true
  270. },
  271. {
  272. symbol: '&',
  273. id: "leader",
  274. name: "Leader",
  275. inherit: '@',
  276. jurisdiction: '@u',
  277. promote: 'u',
  278. roomowner: true,
  279. roommod: true,
  280. roomdriver: true,
  281. forcewin: true,
  282. declare: true,
  283. modchatall: true,
  284. rangeban: true,
  285. makeroom: true,
  286. editroom: true,
  287. potd: true,
  288. disableladder: true,
  289. globalonly: true,
  290. tournamentsmanagement: true
  291. },
  292. {
  293. symbol: '#',
  294. id: "owner",
  295. name: "Room Owner",
  296. inherit: '@',
  297. jurisdiction: 'u',
  298. roommod: true,
  299. roomdriver: true,
  300. editroom: true,
  301. declare: true,
  302. modchatall: true,
  303. roomonly: true,
  304. tournamentsmanagement: true
  305. },
  306. {
  307. symbol: '\u2605',
  308. id: "player",
  309. name: "Player",
  310. inherit: '+',
  311. roomvoice: true,
  312. modchat: true,
  313. roomonly: true,
  314. editroom: true,
  315. joinbattle: true
  316. },
  317. {
  318. symbol: '@',
  319. id: "mod",
  320. name: "Moderator",
  321. inherit: '%',
  322. jurisdiction: 'u',
  323. ban: true,
  324. modchat: true,
  325. roomvoice: true,
  326. forcerename: true,
  327. ip: true,
  328. alts: '@u',
  329. tournaments: true
  330. },
  331. {
  332. symbol: '%',
  333. id: "driver",
  334. name: "Driver",
  335. inherit: '+',
  336. jurisdiction: 'u',
  337. announce: true,
  338. warn: '\u2605u',
  339. kick: true,
  340. mute: '\u2605u',
  341. lock: true,
  342. forcerename: true,
  343. timer: true,
  344. modlog: true,
  345. alts: '%u',
  346. bypassblocks: 'u%@&~',
  347. receiveauthmessages: true,
  348. tournamentsmoderation: true,
  349. jeopardy: true,
  350. joinbattle: true
  351. },
  352. {
  353. symbol: '+',
  354. id: "voice",
  355. name: "Voice",
  356. inherit: ' ',
  357. alts: 's',
  358. broadcast: true
  359. },
  360. {
  361. symbol: ' ',
  362. ip: 's'
  363. }
  364. ];
Add Comment
Please, Sign In to add comment