Commit Graph

23714 Commits

Author SHA1 Message Date
Joimer
f9951f3471 Fix abusable loophole in redir
Redir used user.can as a way to stop lower auth from rediricting to
higher auth to other rooms.
However, if a user had auth over another user in a private room, this
user could redir the other user even if the latter had higher global auth
and/or was not in the room.
This commit fixes that, checking if a user is inside a room before being
able to use redir on they.
2013-08-06 13:15:39 +02:00
Joim
267a3ca014 Show again UU ladder
As per tier leader kokoloko's request, show both UU ladders again for the current suspect.
2013-08-06 06:49:30 +02:00
Joim
082d24e09b Gen 1: Unban partial trapping moves
With the 0 PP behaviour fixed, there is no need to keep partial trapping moves banned, since the game changing struggle lock on 0 pp sequence is no longer there.
2013-08-05 09:56:55 +02:00
Joim
588df751dd Improve seasonal team maker
Imrpove Average August's team maker taking into account player's feedback on the Seasonal.
2013-08-05 09:54:07 +02:00
The Immortal
a53c3d3e0d Abilities/items of fainted Pokemon should not activate 2013-08-04 23:23:33 +04:00
小太
243344fa5f Minor modifications 2013-08-04 14:13:34 +10:00
Guangcong Luo
5a20df1c17 Merge pull request #286 from V4Victini/patch-7
Parse devoice, demod, etc. commands correctly
2013-08-03 21:03:04 -07:00
V4Victini
575b0d1c14 Parse devoice, demod, etc. commands correctly 2013-08-04 00:00:50 -04:00
小太
c3a239c90f Whitespace 2013-08-04 13:53:27 +10:00
小太
f8405d2aec Tabs for indenting 2013-08-04 13:43:35 +10:00
小太
c214ef870c Fix class style 2013-08-04 13:42:36 +10:00
Guangcong Luo
f5647c5564 Fainted pokemon should still have singleEvents
This is relevant for having Future Sight hit from a fainted pokemon.
2013-08-03 15:04:03 -07:00
Guangcong Luo
4327fd9cd6 Fix crashes in room commands with blank IDs 2013-08-03 10:48:26 -07:00
小太
a5f1c015ea Fix editable data leak in getBracketData 2013-08-04 02:08:43 +10:00
小太
37fe86c9c1 Whitespace 2013-08-04 02:08:34 +10:00
小太
29a198bc8d Add round robin tournament generator 2013-08-04 01:56:26 +10:00
Guangcong Luo
a153f2f51e Overhaul room auth system
Now, most rooms inherit auth from global auth. In other words, if
you're a global driver but a room leader, you'll be a leader
in that room, but if you're a global driver but have no room
auth, you'll be a room driver.

The exception is private rooms with private auth: These don't
inherit, and in general are not bound by chat rules, so /warn
doesn't work in these rooms at all.
2013-08-02 23:52:02 -07:00
Guangcong Luo
64e92e98bf Fix crash in /autojoin 2013-08-02 23:09:27 -07:00
Guangcong Luo
707185303d Overhaul system for deleting chat rooms 2013-08-02 23:05:11 -07:00
Guangcong Luo
7497434755 Support /autojoin 2013-08-02 23:04:41 -07:00
Joim
8419d34cc6 Improve removeChatRoom: use splice isntead of delete
Use splice on the numerical arrays instead of delete to be sure no null is being saved as a room, since JavaScript will leave the null in the middle of the array instead of removing it, causing it to be saved on the file.
2013-08-02 13:33:12 +02:00
Joim
a31917fd0e Fix obscure bug in rooms
If someone tries to list the rooms in the exact moment it's being deleted and before chatRooms is updated, getRooms will crash. Additionally, a leftover empty room name will crash on construct when the index is still accessible but the data has been deleted, ie. it's saved as "null" if the room data is saved before the garbage collector ultimately destroys the deleted data.
2013-08-02 13:19:28 +02:00
Joim
9671687fa9 Gen 1: Fix partial trapping moves at 0 PP.
In gen 1, previous to this fix, when you used the last PP of a partial trapping move you couldn't continue the sequence and would be forced into Struggle. This fixes it.
2013-08-02 12:32:56 +02:00
Guangcong Luo
9e7e589733 Fix confusion damage message 2013-08-01 15:41:10 -07:00
Joimer
57f66b3e9d Add deletechatroom command
Add a command that deletes a chat room. It will first kick out all the users, try to delete all its data, and then write the result on the rooms json file, deleting it.
2013-08-01 21:41:39 +02:00
Joim
4efec7bb00 Re-add OU Monotype ladder
As per popular demand, OU Monotype ladder is kept as a regular OM ladder.
2013-08-01 19:13:14 +02:00
Joimer
fede78bd8c Fix obscure bug deroom commands
Sometimes a userid will be empty and it will crash the server. The first check on the function should be enough to be sure the room exists, this check further ensures that the command won't crash.
2013-08-01 15:06:27 +02:00
Joimer
3f686d7d51 Implement STABmons using a Tools hack
Due to how validateSet and scopes work, STABmons needs either this 2 line hack or to copy basically all moveset check to formats, duplicating code, for it to work.
2013-08-01 13:56:35 +02:00
Joim
cf29c4ab0c Improve balance and move choose in Average August
The balance right now allows to Kyogre's pirates to win more easily. Fix that and make sure moves are correct.
2013-08-01 13:27:45 +02:00
Joimer
baad1dff93 Add new Seasonal, Average August
The previous month's Seasonal, Jolly July, has joined the orphan branch of old-seasonals while we welcome the new Seasonal for the month of August.
2013-08-01 13:01:09 +02:00
Joim
7170ca5078 Merge pull request #283 from Joimer/omotm-august
Change OM of the Month to STABmons
2013-08-01 03:44:38 -07:00
Joimer
855e7a758b Change OM of the Month to STABmons
Move OU Monotype back to the challenge-only OM section, add STABmons as the new featured OM for August.
2013-08-01 09:55:56 +02:00
Guangcong Luo
4c40185e9e Remove Thai zalgo 2013-07-31 19:57:36 -07:00
Guangcong Luo
a26cafa526 NEXT: Fix lack of thaw message 2013-07-31 19:10:15 -07:00
Guangcong Luo
a6464942ac More reliable active battle counter 2013-07-31 19:10:15 -07:00
Joimer
051ac52d27 Refactor rank check: room only ranks do not interact with demote/promote
The function getNextGroupSymbol now takes an extra parameter to exclude room only ranks, which are defined in config.
The function will try to find the closest non room only rank with a safeguard against maliciously or badly crafted config.js to crash the server.
If no rank is found regardless of room only or not status, the first or last rank are returned accordingly.
This refactor allows getNextGroupSymbol's name to keep true to its functionality, while also providing a way to exclude crafted ranks for rooms or otherwise from the global demote/promote scheme.
2013-07-31 12:46:15 +02:00
Joim
28d09cffb0 Fix typo in previous commit
config.groups[nextGroup] was mysteriously changed to config.gorups[nextGroup].
2013-07-31 12:11:46 +02:00
Joim
959e33c2e0 Fix promote/demote command: Jump room owner rank
Now Leader demotions go straight to Moderator, and Moderator demotions go straight to Leader. The ranks are hardcoded because both the symbol and name are subject to change, so there is no safe way to get the symbols from config.

The command now works as intended, test:
Popsickles was promoted to Leader by Joim.
(Popsickles was demoted to Voice by Joim.)
Popsickles was promoted to Driver by Joim.
Popsickles was promoted to Moderator by Joim.
(Popsickles was demoted to Driver by Joim.)
(Popsickles was demoted to Voice by Joim.)
Popsickles was promoted to Driver by Joim.
Popsickles was promoted to Moderator by Joim.
Popsickles was promoted to Leader by Joim.
(Popsickles was demoted to Moderator by Joim.)
Popsickles was promoted to Leader by Joim.
Popsickles was promoted to Administrator by Joim.
(Popsickles was demoted to Leader by Joim.)
(Popsickles was demoted to Moderator by Joim.)
2013-07-31 12:09:44 +02:00
Guangcong Luo
97a0ccd152 Remove buggy Arceus-??? from Pokedex 2013-07-30 21:39:51 -07:00
Guangcong Luo
4d001c0242 NEXT: Flygon gets Sand Rush 2013-07-30 21:39:51 -07:00
Guangcong Luo
d1959dc888 NEXT: Fix bug in Magma Armor 2013-07-30 21:39:51 -07:00
The Immortal
e7c6bb1024 Update LC UU banlist 2013-07-30 08:01:32 -07:00
TalkTakesTime
5a2b502f90 Merge pull request #1 from Zarel/master
Update from main
2013-07-29 23:49:38 -07:00
TalkTakesTime
b2044d3420 Remove stray character
>> "/**" === "/**"
<< false
>> "/**".length
<< 4

Not sure what that character was but it's not needed
2013-07-30 12:42:54 +12:00
TalkTakesTime
87cfb6634a Improve dexsearch
Various minor style changes
2013-07-29 23:17:01 +12:00
Guangcong Luo
ba2610825d Encore shouldn't change target if move isn't changed 2013-07-29 00:30:20 -07:00
Guangcong Luo
c6afc0fe80 Merge pull request #278 from ahEe8olB3EkWRgT/patch-2
NEXT: Fix Rock Wrecker and Roar of Time
2013-07-29 00:14:59 -07:00
ahEe8olB3EkWRgT
401711aee6 NEXT: Fix Rock Wrecker and Roar of Time
This should make Rock Wrecker and Roar of Time match the readme description: "Recharge moves are similarly buffed. They have 75 base power, always crit, and they only recharge if they KO. Be careful - in return for a KO, they still give the foe a free switch-in and a turn to set up."
2013-07-28 23:12:34 -06:00
TalkTakesTime
bc91b24d1c Further style edits 2013-07-29 00:28:30 +12:00
TalkTakesTime
cd70dfa0f4 Fix /dexsearch style
Fixed indentation
Removed unneeded semicolons after braces
Replaced .indexOf with in
2013-07-29 00:25:44 +12:00