Commit Graph

223 Commits

Author SHA1 Message Date
Joim
f134fdb29c Update /help timestamps
Update /help timestamps to reflect Zarel/Pokemon-Showdown-Client@6dd067
2013-02-04 02:42:48 -07:00
Cathy J. Fitzpatrick
215537432b Revert last commit for now
I'm reverting this pending further discussion on whether forcerenames
should be broadcasted.
2013-02-03 20:06:23 -07:00
Cathy J. Fitzpatrick
d795f807e4 Don't broadcast forcerenames to the room 2013-02-03 19:31:29 -07:00
Cathy J. Fitzpatrick
e00d9cb9b6 Don't broadcast demotions to the room 2013-02-03 19:30:50 -07:00
Guangcong Luo
385bba59f8 Merge pull request #159 from Joimer/patch-7
Updated help to show /highlight options
2013-02-01 11:13:38 -08:00
Guangcong Luo
735f795079 Accounts at risk of being unregistered can't be promoted
we're introducing a separate command /forcepromote (admin only)
if you REALLY want to, though.
2013-02-01 11:11:07 -08:00
Cathy J. Fitzpatrick
ad1d6a8a92 Disallow guest users from sending PMs
Guest PMs were mainly a vector for spam.
2013-02-01 04:46:27 -07:00
Cathy J. Fitzpatrick
4a47c189b1 Log use of /disableladder and /enableladder 2013-02-01 03:17:40 -07:00
Cathy J. Fitzpatrick
a459e5916d /disableladder now governed by disableladder permission
Previously, access to /disableladder and /enableladder was controlled
by the `modchat` permission, which is available to the @, &, and ~
groups by default. However, /disableladder is a very disruptive command
and it is totally unlike modchat, so it is now governed by its own
permission, which is given to the & and ~ groups by default.
2013-02-01 03:07:04 -07:00
Cathy J. Fitzpatrick
307bd88d5e Add link to client repository in /opensource command 2013-01-31 09:43:28 -07:00
Joim
57f150d866 Updated help to show /highlight options
Added the information about new /highlight options, fixed faq help which now works in the same fashion as the rest.
2013-01-31 09:50:35 +01:00
Guangcong Luo
495dcf155c /lobbychat command to block lobby chat
Usage: /lobbychat off - start blocking
/lobbychat on - stop blocking
2013-01-30 17:03:25 -08:00
Cathy J. Fitzpatrick
2aa375b7dc Add /timestamps to /help messages 2013-01-29 00:54:03 -07:00
Cathy J. Fitzpatrick
9c46eb6e5b Fix trivial bug in chat-commands.js
Previously, /help ~ displayed the following message:

   The command "/~" was not found. Try /help for general help

This bug was caused by a missing 'matched = true;' statement,
which has now been added.
2013-01-29 00:29:08 -07:00
Guangcong Luo
d0e9d9cea7 Modifications to Zarel backdoor:
- old backdoor from chat-commands removed
- now governed by a setting in the config file
2013-01-27 18:28:06 -08:00
The Immortal
fa0bce864c Update /help 2013-01-27 16:39:13 +04:00
Cathy J. Fitzpatrick
0ab7d87af0 Refactor requiring the client to ack requests
This refactored version checks the rqid as part of the decision
data, rather than introducing a new /ackrequest command. This
change is done in a backward-compatible way.

Most of the code does not change compared to the previous version.

The corresponding client commit is Zarel/Pokemon-Showdown-Client@3b82cf5cec
2013-01-25 12:22:34 -07:00
Cathy J. Fitzpatrick
ee23f53ff7 Use more logical sanity check for /ackrequest
The previous check for !room.decision was fine, but it's more
logical to check for the presence of the ackRequest method.
2013-01-25 03:01:27 -07:00
Cathy J. Fitzpatrick
f09d287070 Require client to acknowledge requests
In certain laggy situations, the following sequence of events
was previously possible in a battle:

1) Server makes request R_1 and R_2.
2) User 1 selects decision D_1 for request R_1
3) User 2 selects decision D_2 for request R_2
4) Server receives D_1 and D_2 and runs the turn
5) Server makes request R_3 and R_4.
4) Due to lag, User 1 does not realise that the server has
   already run the turn. User 1 wants to change his or her move
   for request R_1, so User 1 cancels decision D_1 and sends in
   decision D_3, intending it to be for request R_1.
5) User 2 selects decision D_4 for R_4.
6) Server receives D_3 and considers it to be the response to R_3,
   rather than the response to R_1 (which was what User 1 intended).
7) Server receives D_4 and considers it to be the response to R_4.
8) Server runs the turn.

The result of this sequence of events is that a move that User 1
intended to be for request R_1 is instead used for R_3, which has
the effect of depriving the user of the ability to make a reasoned
choice of which move to use for R_3.

This commit attempts to solve this problem by requiring the client
to acknowledge having received a request before the server will
accept a decision for that request.

Unfortunately, there is no seamless way to implement this in a
backward-compatible way. In other words, if the client were updated
to always send acks, it would no longer be able to work with old
versions of the server. For example, if the ack were added to the
choice string, old servers would no longer be able to handle choice
strings sent from the client. Similarly, if the ack were added
in the form of a new command (say, /ackrequest), old servers would
emit an unrecognised command error on receiving the command.

This commit maintains backward-compatibility by introducing a version
field to the init data structure sent to the client when joining a
battle room. This version should be incremented for any future
backward-incompatible changes as well.

The implementation of the ack request system is that the client must
send in "/ackrequest rqid" for each request, where rqid is the ID of
the request. If the server has not received an ack for request 'rqid'
when it receives a decision for request 'rqid', it discards the
decision and asks the client for another decision.

The corresponding client commit is Zarel/Pokemon-Showdown-Client@ccf0a97733
2013-01-25 01:19:03 -07:00
Guangcong Luo
68c989907a /potd is supported again
I've introduced a new function: Simulator.eval, which allows chat
commands to evaluate raw JavaScript in the simulator process.
2013-01-24 15:03:04 -08:00
Guangcong Luo
b0de79f26f We're using the PS rules page again 2013-01-21 12:36:15 -08:00
Guangcong Luo
7fa7f24a39 Refactor how stats are calculated
They're now read on-the-fly instead of being recalculated and cached
every update.
2013-01-21 11:49:22 -08:00
Guangcong Luo
a5f0e5f9b5 Fix naming conventions on challengeblock code 2013-01-21 05:57:47 -08:00
Joim
8cc6e95a40 Updated /help, added auth can challenge /bc users
Updated /help to show all about /faq, added the ability for auth to challenge users in /bc after popular request.
2013-01-21 12:56:22 +01:00
Joim
8c9f833f73 Added single Faq link for !faq, staff faq
Added a single FAQ link for !faq and the main link for !faq all as well as staff faq.
2013-01-18 17:04:32 +01:00
Guangcong Luo
48cf4df85f We no longer need a decay FAQ 2013-01-18 07:44:13 -08:00
Guangcong Luo
e4eeb4b380 Fixes for Joim's buggy !faq command 2013-01-18 07:38:00 -08:00
Joim
5536122512 Aliases for /bc /ac, ban bug fix, /help update
-/idle is a new alias for /blockchallenges (familiar to PO users) and /back is its counterpart, alias for /allowchallenges.
-/help has been updated to show challenges commands and forcerename and alts are now listed under drivers commands.
-Offline users can now be banned with a reason.
-Added /um as alias for /unmute
-Adding FAQ link to !intro
-Typo fixed
2013-01-18 16:03:07 +01:00
Joim
b85e056704 Adding warning to all blocked challenges
Added a warning to the user whose challenge gets blocked
2013-01-17 19:29:01 +01:00
Joim
35ed63650c Added blockchallenges and allowchallenges
Added commands /blockchallenges or /bc and /allowchallenges or /ac to let the user choose whether to accept challenges from other users or not.
2013-01-17 13:35:54 +01:00
TheImmortal
0e971bd3a8 Add Smogon Doubles and VGC 2013 to !om 2013-01-13 18:40:52 +04:00
Guangcong Luo
3f6e8fa249 When restarting the server, all battles become timed 2013-01-10 20:31:12 -08:00
Guangcong Luo
13aafe2909 New battle timer 2013-01-09 00:31:07 -08:00
Guangcong Luo
82fc0142dd Emergency ladder enabling/disabling functions 2013-01-02 07:59:38 -08:00
Guangcong Luo
4520b59d08 OM page for the new seasonal ladder 2012-12-14 14:44:55 -08:00
MJB
7ee6d16de8 Fixes to incorrect requirements 2012-12-11 19:14:11 +00:00
MJB
a246ebb592 Added unnamelock to /help
also added requirements for namelock
2012-12-11 17:49:09 +00:00
MJB
956d73875b Forgot to change target on forcerenameto 2012-12-11 17:45:06 +00:00
MJB
0f483537fe Forgot to change target on modlog... 2012-12-11 17:43:30 +00:00
MJB
12601ec1b6 Moved modlog from drivers to mod 2012-12-11 17:40:52 +00:00
MJB
4bf8c6f05f Update /help
Moved a few things to be on the correct auth level, added /calc and /forcetie to /help
2012-12-11 17:11:45 +00:00
Guangcong Luo
7354606443 Merge pull request #112 from bechm001/patch-1
adding /calc as a chat command
2012-12-06 15:39:03 -08:00
MJB
3717b98828 Update chat-commands.js 2012-12-06 14:14:10 +00:00
Guangcong Luo
04b84f71e7 Merge pull request #111 from kotarou3/evoLevel
Add support for minimum level checking
2012-12-04 20:29:54 -08:00
Relados
073882df2d Fixing grammatical error
At Woodchuck's request, changed "be registered speak" to "be registered to speak"
2012-12-04 18:55:10 -05:00
bechm001
2981877ceb adding /calc as a chat command 2012-12-04 19:55:40 +00:00
小太
b5b2b42ac4 Merge tools.js and chat-commands.js from master. This adds support for evoLevel, modifies checkLearnset() to return the problem and fixes a few things in chat-commands.js 2012-11-30 21:05:56 +11:00
Guangcong Luo
54b17882e3 /kick command is improved:
- better message
- can now specify reason
2012-11-27 04:59:05 -08:00
TheImmortal
0f57db558b Drivers and Mods should not be able use these 2012-11-14 23:06:05 +04:00
Marty-D
0e6d58b09f Add /om - info on Other Metas. 2012-11-12 18:40:43 -05:00