Tuesday, December 9, 2014

On the Replay Vulnerability

As you may have already read about, someone found a way to make World of Tanks run arbitrary code when reading from a replay. I glanced through the proof of concept replay that was posted, and I believe I have the basic understanding of how it works. To this end, Clan Tools itself (or rather its' replay parser) is not vulnerable on several levels.

This doesn't lessen the threat of Clan Tools being used as a delivery method for malicious replays. I, however, do not have a solution on how to solve this problem. This isn't something I think the average anti-virus is going to catch due to the replay format, and the way in which the exploit is delivered; perhaps at execution time.

As such, at this time, all I can say is replays are very powerful and dangerous things, both within the context of what they can do on Clan Tools (granting codes), and now on your own computer should you run one. As such, if you do not trust a person, do not allow them to upload replays for your clan.

As an aside, if someone does upload a malicious replay, please let me know so I can remove the replay (and permanently ban them).

Wednesday, December 3, 2014

Changelog for 2014-12-04

Changes

  • Added Fame Points From to Fame page to show the distance, in fame points, each player is from 3k (for the NA server).
  • Added 3k ranking history graph (data recording started 14-11-30).

Fixes

  • https://www.clantools.us now correctly redirects to https://clantools.us
  • Fixed issue trying to load Payout list page while a calculation was pending in certain cases.

Thursday, November 27, 2014

Changelog for 14-11-27

Team Battle Stats

WG recently added support for Team Battle stats to their API, as such I have added support for it to Clan Tools' Player and Clan lookup pages. To stay consistent with what WG reports, Team Battle stats are not included in the "all" stats.

Fixes

  • Fixed Clan Lookup navigation option in dropdown not correctly redirecting after server selection.

Friday, November 21, 2014

Changelog for 14-11-21

Activity Report Improvements

Chart Data Grouping

Previously, with larger date ranges, the charts would become quite a mess, with the attendance by week day chart being completely unreadable, but the others suffered as well. To address this issue, data is now grouped by various values to provide much less cluttered, and hopefully more useful, chart readouts. Comparative example:


Historic Activity

In an effort to make it easier to quickly get an idea of a player's long-term attendance directly from the activity report's page, a historic activity 'tooltip' has been added for each current clan member.


Away Entries Details

Details on the away entries for players who have one, or more, away entries which intersect with the activity report span have also been added.

Links

Other Changes

  • Redesigned overview section.
  • Increased maximum days span to 365.
  • Improved performance when generating report.
  • New clan battles are now checked for every 10 minutes, as opposed to every 5 minutes.

Wednesday, November 19, 2014

Changelog for 2014-11-19

Changes

  • Change payout Quick View and Pay View sorting to match WG's sorting on the clan page.
  • Added clan role separators to Quick View and Pay View player lists to (hopefully) aid in finding users.

Note

If anyone happens to know the logic behind WG's user sorting within the same clan rank on the site, please let me know because the current method for determining the sorting order is sub-optimal to say the least.

Sorting by the user's unique account ID is close and seems to result in long chains of matching sorted players, yet some are still out of order. For example, on HAVOK's page (http://na.wargaming.net/clans/1000001755/), Flakker2 (1000028741) has players with higher IDs both above and below him.

Friday, November 14, 2014

Changelog for 14-11-14

Fixes

  • Fixed treasury value not being loaded correctly when a valid API token was available.

Thursday, November 13, 2014

Changelog for 2014-11-13

Pay View

The quick view was designed with the goal of making it easy to perform payouts by grouping and sorting in a logical way. However, it was far from prefect. In an attempt to improve this, I've added what I'm calling "Pay View", which is designed to be a distraction free, one pay group at a time, view of the information provided by the quick view.

Replay Reward Rules

Previously replay reward rules were an all or nothing sort of thing, as while in some cases the rewarded players could be filtered either via the replay reward rule's filters, or the linked code type's payout limiters, ultimately there was a large gap in granular control.

In an effort to fix this I've added the ability to select the individuals who get rewarded by a replay reward rule per-a-replay, from the subset of players who meet the restrictions for the replay reward rule.

See note 1 for more information.

Improved Per a Payout Settings

Previously replay reward rules (both clan battle and match), in addition to group bonuses, were set globally and could not be adjusted per a payout. This has been fixed. These are treated just like code type payouts in terms of loading from a template.

Deferred Calculation

Previously whenever a payout was (re)calculated, the server effectively put you on hold while it performed the calculations, then redirected you once the calculations were finished. This approach is problematic because calculations (or rather saving the results of the calculations) takes a significant amount of time, which has only grown as additions to the payout calculation system has been made, and as such it isn't being used anymore.

Now, instead, when you trigger a recalculation it's added to a queue in which to be processed. If you're updating an existing payout there is a notable difference,

Clan Battle Roles Deprecated

Clan Battle Roles (CBR) were designed to be a way of tracking players who played key roles in battles, for both statistical purposes and to allow more refinement of clan battle reward rules. CBRs however suffer from the fact that setting them is an inconvenience, and the options for automating their assignment is very limited.

As such, I consider CBRs to be effectively worthless in their current state (where they have never been used), and lacking a way to improve CBRs current status in any significant way, the only option I see is to consider them a failed experiment, and thus deprecate them.

Considering no one uses them, I don't think this part is particularly necessary, but by deprecated I mean that at present they will continue to work, however at any time they may be removed, so it's highly recommended that clans continue to not use CBRs.

Payout Editor Tabs

I've been trying for some time to find a good way of displaying the, at times, huge amount of fields on some of the editing pages, primarily the Code Type and Payout pages. The expander approach was better than nothing, but I never found it to be "good".

To this end I'm trying tabs. I tried tabs out first with the Clan Lookup page, and honestly found them to be great. With expanders you end up with a lot of wasted vertical space taken up with margins, and a lot of scrolling about. With tabs, every navigation header can fit in the same space as one expander's header. Furthermore there's this central point of navigation which allows quickly going through all of the tabbed sections.

None the less, I'm always open to feedback both good and bad so feel free to comment either way. Lacking any negative feedback, I'll be looking to move the Code Type editing page to the same tabbed approach.

Strongholds

Renamed "Stronghold" replay type to "Stronghold Skirmish", with "Stronghold" now being for the actual attack/def battles (note this is just a name change, it has no effect only any settings).

Other Changes

  • Clan Battle Reward Rules' province type filter now works differently for encounters; previously it only checked the type of the "primary province", which was defined as the province your clan was attacking. Now it checks both province types and matches on either.
  • Implemented long term fix for the issue relating to an internal server error when uploading some replays.
  • Added link to complete payout from Payout List
  • Added "Support Clan Tools" to the bottom of the news feed.
  • Redesigned front-page for users who aren't logged in or aren't a member of a participating clan.
  • Removed "attendance" from Payouts path and breadcrumb.
  • Added ability to change non-calculation related settings for completed payouts.
  • Updated clan links to go to the new Wargaming.net clans site.

Please note, all payout changes are not retroactive; the display of all existing payouts remains unchanged.

Additionally all existing payouts are now read only. For completed payouts, this makes no difference. However, for payouts that weren't yet completed, they can no longer be edited or completed. This is necessary due to the significant changes made to the existing payout code.

Notes:
1. More on replay reward rules list.

The tab will be hidden if there are no replay reward rules with at least one qualifying players. Likewise, replay reward rules without any matching players won't be displayed either, as the list of replay reward rules is ultimately a list of players who qualify for one or more replay reward rules, not a list of replay reward rules.

If you change a payout reward rule in the Payout editor, unless it's just changing the code type being paid out, it will clear out any existing "unchecked" entries (it actually clears them all). Also, the underlying code works off of unique ID's, not the actual rules, thus deleting then perfectly recreating a payout reward rule will not transfer the settings.

Wednesday, November 12, 2014

Update Notice: Payout Calculation Version Increment

Barring any unexpected delays, tomorrow around this time (14-11-13 12:00 EST) I'll be updating Clan Tools. One of side effects of this is that the payout system calculation version has been incremented, and thus at that time any existing payouts that aren't yet completed will effectively become "read only", with the only options being to view or delete the Payout.

Completed payouts will continue to be viewable as expected.

As always, I'll post a update post and tweet a link to it when the update is deployed, so that's where to watch if you're waiting for the update to do a payout; my apologies if you are.

Tuesday, November 4, 2014

Changelog 14-11-04

Battle Loading Changes

The gap in combatant loading for clan wars battles should be almost gone as WG's API now seems to work as expected for landing/riot tournament information, allowing the loading of battle opponents for those battles. I believe the only gap now is for the defending clan when two or more clans chip the same province, though there may be some related gaps.

Map Storage Changes

The way Clan Tools stores all (battle) map information, including battle listings, replays, replay reward rules, etc... has been changed as the old format had issues. Existing entries have been converted to the new format, and thus this change should be completely seamless. If anything seems to have not converted correctly, do let me know; all of the old map data is still being stored for the time being so any issues should be fixable.

Other Changes

  • Match Reward Rules no longer require a match type be selected (thus, match reward rules can now match on any match type).
  • Member's list on Clan Lookup page now sorts the same as the World of Tanks page.

Fixes

  • Replays with observers can now be uploaded.
  • Battle list should now use regional timezone to determine which battles occurred on a given day (on the NA server, a battle at midnight Eastern Time is still considered to be for the previous day, as the NA server's regional timezone is Pacific Time; this is to ideally insure that days are the logical).
  • Improved JS Error reporting reliability.
  • Issue that would cause JS errors occurring before the DOM was loaded from being recorded.
  • Removed unused "Has Replay" selector on Search Match Replays page.
  • Match reward rules ignoring selected match type.

Up Next

I've been looking at the payout system to see about adding more granular control of who gets paid for what. For example, replay reward rules are very much all or nothing; there's no easy way to single out a single player. At present only code entries, to a degree, have this degree of control (via revoking entered codes). Additionally, replay reward rules and group bonuses, unlike code type payouts, aren't customizable on the per a payout basis, which isn't acceptable.

Wednesday, October 29, 2014

Changelog for 2014-10-29 (2)

Fixes

Fixed issue when viewing user tanks page for a user with no internal tank data on record.

Changelog for 2014-10-29

Fixes

  • Fixed loading element filling screen on clan application viewing page.
  • Fixed invalid HTML code in clan tank list.
  • Reduced minification of JS to improve debugging.

Other Notes

  • Added code to enable detection of "inactive" clans (determined by a lack of codes entered or replays uploaded), allowing such clans to have automated actions (loading battles, generating daily codes, etc...) frozen to save resources.
  • Removed underlying code for loading stats and removed all player stats from database.
  • Removed files which are no longer needed.

Monday, October 27, 2014

Changelog for 2014-10-27

API Tokens

Due to coding error all existing API Tokens are no longer considered valid by WG's API. As such, you'll need to create a new API Token (https://clantools.us/account/settings/tokens) to replace any existing token. Sorry for the trouble.

Clan Lookup

Similar to the player lookup, there's now also a clan lookup. It still has room for improvement, however there's enough there already that I feel it's worth releasing. Accessable via the Tools dropdown, or just click here. For an effective summery, see the image below (click for larger version).

The Clan's Tank page has also been replaced by the combination of the tanks and performance tabs, though the tank list also includes a more detailed view of available tanks.

Known Available won't be very useful without having your members add an API Token on Clan Tools (https://clantools.us/account/settings/tokens) as it only shows confirmed in garage tanks (which requires an API token from that user to get their in garage status) and which are unlocked. Possibly Available is effectively the same as what was shown as available before as it shows unlocked tanks that are known to be "in garage", or that there is no in garage data for. Available Maximum shows what is effectively the same as "count" on the clan lookup page, and is effectively just a simple count of every member for which that tank was reported by the WG API.

Everything isn't objectively better though, as everything (except in garage and tank locking) is retrieved from the WG API each time. Previously the Clan Tools server loaded this data once a day and served the statistical information that way. This was extremely costly. For the 1,764 users with stats being tracked, there are 786,868 database entries for stats alone. Though the bigger issue was the time it took to load this data, which was around 30 minutes (for 8 clans). This simply wasn't scalable, nor an effective use of the limited resources available to Clan Tools. As such, while I understand the longer waiting times are less than ideal, they are a necessity.

In Garage Data

In Garage data now correctly reflects if the data isn't available (due to the lack of an API token for the user).

Player's Tanks Page

The player's tank page now sources its data from the Wargaming API, rather than pulling stats from Clan Tools. The In Garage and Tank Locking data is still provided by Clan Tools, so no information has been lost.

Clan Home Dropdown Nav Changes

I've added a link to matches and removed the link to payouts on the clan home nav dropdown. My personal view is that the nav dropdown should have links to pages which are likely to be used at least one a day; payouts is more a once a week sort of thing. On the other hand, matches (if used) is something which is likely to see daily use.

Other Changes

  • Added Average Tier to player lookup.
  • Missing WN8 expected values are now calculated using the formula listed here: http://forum.wotlabs.net/index.php?/topic/9786-wn8-expected-values-update/?p=299540 Note that this relies on the tank entry being reported by the WG API, so there still may be missing tank WN8's at times.
  • Updated Player Lookup footer to reflect WN8 expected tank values table source.
  • Player lookup lists now have smarting sorting behavior (stats default to descending order when first sorted).
  • Removed not Once Per a Day restriction on code types granted via replays.
  • Updated Create Token page to take into account changes to how WG deal with tokens.

Fixes

  • Player lookup tank list having no default sorting.
  • Codes automatically created by creating a new match now use the correct date based on the for date.
  • Adding a replay to an existing match failing due to a missing link in information propagation.
  • Issues caused by tanks missing from clan tools, but not the WG API.
  • API Tokens not being sent when mass refreshing clan member data.
  • Error when attempting to filter by in garage.

Note: Some might have noticed that this post seems a day or two late; for various reasons this didn't end up getting posted until today.

Sunday, October 19, 2014

Changelog for 14-10-19

Player Stats Fixes

A few days ago parts of the player lookup broke for players who had the new "Fury" premium tank due to a few reasons, changes have been made to prevent such issues in the future:

  • When calculating WN8, tanks which are missing from the WN8 expected stats table are simply ignored (the people who maintain the WN8 tank data need to update the list to actually "fix" the issue, which I suspect they may not do for some time due to the lack of data). Missing WN8 values are displayed as '-'.
  • When displaying tank information, missing tanks are not shown.
  • WN8 tables are automatically updated from http://www.wnefficiency.net/wnexpected/ nightly.
  • Client Side (Javascript) tank data is automatically updated nightly.

Other Changes

  • Tier is now displayed in roman numerals.

Thursday, October 9, 2014

Changelog for 14-10-09 (2)

Changes

  • Added refresh button to player lookup.
  • Added "Days Ago" to activity report to view results for X days ago, rather than having to manually set a span.
  • Player Lookup now remembers sorting order.

Fixes

  • Tank List deleting itself after one search on player lookup.
  • Activity Report "Last Battle" column not sorting correctly.
  • Activity Report defaulting to 15 days instead of 14.
  • Attendable Days and Spans reporting oddly in some cases.
  • Activity Report now defaults to the range ended on yesterday, to account for the possibility that attendance for the current day may not yet be complete.

Changelog for 14-10-09

Player Lookup

Another key feature using Clan Tools to accept clan applications was the (primarily) statistical information it provided about the applicant in one place. I wanted to expand that featureset to all of the clans using Clan Tools, and anyone else idealy. However, the system I was using simply wasn't capable of performing "on the fly" lookups. So I started from scratch, and the result is by far better than the original system it was trying to mimic, while also being much less resource intensive to the server.

Rather than ramble off the features, here's a screenshot:

(The white strip thing is my attempt at indicating I cut out some rows to shorten the image, if that isn't clear)

Accessable via the Tools menu (Tools > Player Lookup), or you can just click here.

Other Changes

  • Redesigned clan application viewer to integrate with the player lookup feature better, in addition to handling long responses to questions better.
  • Encounter battles now correctly report both maps, rather than pretending to actually know which map it will be. Once a replay is uploaded, the map the battle actually took place on will be the only one shown. This change is not retroactive (already loaded battles that don't have replays will still just show one map).
  • Added a third info state to the battle start time info, "st" for start at, which is displayed after the "op" (open at) time as passed, but before the battle start time.

Fixes

  • The replay results page using the full tank names because the short tank names hadn't been loaded.

Sunday, October 5, 2014

Changelog for 14-10-05 (2)

Changes

  • Reworded percent reserve option for payouts to be easier to read.
  • Added new percent reserve option which doesn't adjust for the previous reserve being in the given treasury option. See this for more details.
  • The reserve amount is now shown in the reference payout list.
  • Advanced reserve calculation section is no longer hidden in an advanced option submenu.

Fixes

  • Set a default for the day multiply empty mode.

Changelog for 14-10-05

New Application Options

For some time now Clan Tools has supported players applying to participating clans through Clan Tools; however, not everyone may want to use Clan Tools for dealing with clan applications. Still, clans that did had the option to have various (at this point minor and likely completely ineffective) bits of advertising, which wasn't fair to the clans who didn't want to use Clan Tools for this.

In an effort to fix this, two new clan application modes have been added: Displaying a message (with support for formatting via markdown) and redirecting to another site (which is really just a short cut for a message with a link). Of the two choices, I would highly recommend taking the additional time to write a short message, even if you still want to redirect to another website because result is much better, as shown below.

vs.

Minor User Settings Change

I've moved editing a user's groups to a different page labeled "Edit Account Groups", it should show up directly under the edit account settings link.

Other Changes

  • Changed clanwars URLs to servers, though the old URL will still work, all links will be to the new URLs.

Wednesday, October 1, 2014

Changelog for 10/1/2014

Changes

  • Switched to tank's short names for the replay details.
  • Added ability to search match replays (accessible from matches page).
  • Replay details player list should now disregard case when sorting.

Fixes

  • Issue preventing viewing battle replay stats.
  • Error when entering a date in the future in the match date selector.

Tuesday, September 30, 2014

Changelog for 9/30/2014

Day based Payout Multipliers

Multipliers for gold and shares based on the number of days a person has in the payout period has been added.

Effectively, this is just a shorthand way to accomplish scaling pay based on days as opposed to using the minimum and maximum options for the individual code type payouts, which could get quite complicated. On the other hand, this approach is more limited as it is global to the payout and cannot be limited to individual code types.

This can be found under the "Day Settings" section.

Replay Player Details

While the system has been loading most of the player's details (the noticeable omissions were damage past 300 meters and damage blocked by armor), most of this hasn't been viewable. This has been fixed; clicking anywhere that isn't a link on the replay's player list will show detailed information about that player.

Other Changes

  • Made some Breadcrumbs "smarter" by linking back to Battles or Matches from the replay view to the date the replay was for.
  • Removed the banner about the inability to load tank in garage data accurately, replaced with a more friendly link explaining the problem and potential solutions.
  • Changed some sections in the Code Type creation/editor pages to expanders, instead of sections with just advanced or hidden content which saves space. This will likely be expanded to other pages that need it (if there are any, I haven't checked).
  • Improved date range filtering for searching Payouts to act in a logically.
  • Fixed Payout Stats Gold Cost by Type taking into account negative values when determining result.
  • Added Gold Savings by Type chart to display information about what is "saving" the most gold by giving negative gold.
  • Changed replay paths to fit with other paths better.

Fixes

  • Inability to set default payout automatically loading code type payouts from it via the clan editing page.
  • Payout Details view sort defaulting to case insensitive sorting by name.
  • New port map missing a friendly name.

Saturday, September 27, 2014

Tutorial for the Matches System

With the Clan Wars tournament coming up, I had figured a tutorial covering the matches system would be useful.

This ended up taking a bit longer than I would have liked to finish and I'm not sure I like the format.

Specifically, I'm worried that I'm cutting out too much which is making it harder to follow what I'm doing, yet at the same time, it seems like past the introductory videos showing going to the Clan Home, then clicking the link to whatever page I'm going to, and then clicking New on that page is just making the video unnecessarily long. Feedback regarding this, or anything else, is always appreciated.

Also, if you haven't already, you may find it useful to watch the getting started video series, especially part 1:

Thursday, September 25, 2014

Changelog for 9/25/2014

Improved Payout Templates

I noticed there was a gap in the capabilities of the payout system; there wasn't really "good" support for having several different payout templates that could be chosen at will, and there was absolutely no support for multiple Code Type Payout setups being saved. To help remedy this situation two new features have been added.

Firstly, in addition to the existing option of setting a default template payout, any payout can now be used as a one-time template for a new payout via the "Actions > Use as template" link next to each payout on the Payouts page.

Second, code type payouts can now optionally be loaded from the template being used. This option can be set for the default template in addition to being selectable when using any payout as a one-time template.

Other Changes

  • Various improvements to the Clan Wars Map Provinces viewer.
  • Collapse clan-related settings on user's settings page if they aren't in a clan.
  • Added info bar for new payouts indicating which template is being used, if any.

Fixes

  • An issue which would cause user's clan settings not to be created under certain conditions, thus causing payout calculation to fail.
  • Payout templates not setting "Ignore Match Reward Rules" setting.
  • Trying to sort by role on the Attendance home causing an internal server error.

Tuesday, September 23, 2014

Changelog for 9/23/2014

Support for New Roles

The new roles have been added to Clan Tools and work just like existing roles. To enable this the corresponding groups for the new roles have also been created and automatically linked. The existing groups have also been renamed to correctly match with the new names, though feel free to change them back if you don't like the new names.

The new group's default permissions are as follows, though these can be changed via the groups page:

  • Personnel Officer: Similar to the executive officer without most attendance and payout related permissions, or permissions that generally allow indirect code creation.
  • Junior Officer: Same as private to match WG's approach.
  • Reservist: Same as recruit as recruit already has no permissions by default.

Also, if you had a group with the same name as one of the new roles, that group has been renamed to prevent conflicts.

Moved Payout Bonus Codes

Like Replay Reward Rules, the Payout Bonus Codes (now Group Bonuses) selector was somewhat poorly placed and as such made it hard to get a full understanding of what the Code Type Payouts for a Code Type would be giving out. So now the groups which a code type's code type payouts apply to as a bonus is set via the Code Type's editing page.

With this change I believe all assignment of Code Type Payouts is done via each Code Type's edit page which should hopefully help keeping track of all of these things easier.

Monday, September 22, 2014

Changelog for 9/22/2014

Matches "Add Replays" link Removed

The difference between adding replays and New isn't very clear--adding a replay to an existing match uses the existing code, if any, rather than creating a new one--and whatever benefit there is to have the Add Replays link is outweighed in my opinion by the confusion it introduces.

This functionality still exists, as it does already, via the "Add Replay" link under the actions dropdown next to matches. Additionally, I've added an "Add Replay to Match" link under the actions menu to hopefully clarify that the functionality is there, as on the battles action menu the add replay only allows adding replays from that battle.

Codes

The underlying way in which the system managed the keys for codes was deeply flawed and had major scalability issues. As such, I've changed over to a much more logical approach.

On the surface there should be no noticeable differences aside from now the prefix is considered to be a part of the key, and will no longer change when a code type's prefix is changed. I doubt this will be an issue though. In theory there should also be a performance increase when entering codes as the previous method for finding what key a code when with was incredibly convoluted.

Clan Specific User Settings

Previously, the user related settings clan administrators could edit were, sans the groups, not actually clan specific. If a user moved from one clan within clan tools to another, the settings set by the previous clan, including no pay and debit would remain. This is obviously far from ideal.

To fix this, I've moved where those settings are stored around and now each user has some settings stored that are specific to their current clan. As a bonus, the system still remembers these settings when a member leaves then comes back.

Group Permission Changes

For existing clans the permission to edit a clan member's inactivity has been split from the ability to edit a member's no pay and debit settings as those are two vastly different things from my point of view. You'll need to grant the ability to manage a user's inactivity records to whichever groups you wish to have that permission.

For new clans the default permissions for several roles has been changed. Perhaps most notably is that DC's are no longer given any Group related permissions anymore and field commanders are allowed to upload replays to matches.

Additionally, as most know I'm sure, WG is going to introduce new clan roles. I've created some code for automatically adding groups and links for these new roles into Clan Tools in a logical way. I hope to perform this migration action before it's an issue, which I believe will be possible due to the RU server generally being updated first (I need to know the internal names WG gave the new permissions). Also, I've assumed that WG is going to only being changing the names that are displayed for the existing roles; if they also change the internal reference names I'll have a deal more work to do.

As for the new roles, the default permissions on Clan Tools will be:

Personnel Officer: Similar to the executive officer without most attendance and payout related permissions, or permissions that generally allow indirect code creation. So, an executive officer can view codes, however they cannot create new ones nor enter codes beyond their valid for time.

Though it is worth noting that they have the ability to upload replays and perform match related actions, including creating a match--thus depending upon how the match types are set up, by default, a personnel officer could still create codes arbitrarly.

Junior Officer: Same as soldier to match WG's approach.

Reservist: Same as recruit as recruit already has no permissions assigned by default. It is worth noting a few permissions are implied to clan members, such as the ability to view clan articles and announcements.

Templates

The template system is now on the site, though existing clans can't really use it (I took the "easy" route and avoided a lot of potential problems by simply preventing its use if a clan already has one or more code types).

Framework Update

I've also updated the framework Clan Tools uses, this, like the changes to codes, shouldn't be noticeable on the surface, it was however beneficial due to the security fixes. Unfortunately, due to differences between the framework versions I had to make various changes throughout the code to make everything work again. Everything is working as expected the best I can tell, but none the less this is a significant change so there may be some issues I didn't find.

Other Changes

  • Added a warning message to the Group's page. I'm a bit torn as I don't want to scare clan leadership from using the power of the Groups system, but on the other hand the Groups system is perhaps the most powerful, and thus dangerous, system that's accessible via the site so it seems that there should be some sort of warning--I don't want it to be said I didn't give a warning.
  • Removed MyWotStats link from clan applications as apparently that site closed down.
  • Added a help page (link) though I think I'll wait till there's a few more videos to show on there before I publicize it more.
  • Stopped loading user's account stats when doing a quick refresh a clan's members (they aren't even visible anywhere on the site, which is a different issue, but none the less).
  • Auto-generation code updated to use regional time zones. This doesn't really matter at present as all of the clans are currently in the NA region, but it is a step towards making everything work as expected if clans from other servers end up using Clan Tools.

Fixes

  • "Newest Tweet by" changed from ClanTools.us to Clan Tools to reflect that I changed the twitter account's name.
  • Empty [] showing up next to players in Replays who were clanless.
  • Payout calculator not reporting credit owed when the treasury doesn't have enough gold to cover static gold payments.
  • No longer show "non participating" clans.
  • Numerous pages with a search not resetting current page when searching, thus causing confusing results as no results are shown due to the page being too far advanced for the more limited search terms.
  • Fixed an issue in the Match auto-create code that prevented it from working.
  • Fame being updated despite regions being marked as disabled.

My current focus is now to get a few more tutorial videos created and support for other servers fully working.

Thursday, September 18, 2014

Changelog for 9/18/2014

Replay Reward Rules Management Moved

The Match Reward Rules and Clan Battle Reward Rules--collectively Replay Reward Rules now--weren't managed from the most logical of places. Match Reward Rules were managed by editing the match types they were linked to and Clan Battle Reward Rules were just under the Battles section of the Edit Clan page. To (hopefully) correct this, both are now managed from the editing page of the code type the rules are tied to. This results in it being much easier to get an overview of what the Code Type's Payout(s) will apply to.

It's worth noting that this change has shifted under what permissions the Replay Reward Rules are manageable under from their respective pages to the Code Type edit page. I however do not view this as a problem because the permissions which restricted their editing were just as illogical as the pages from which they were edited.

More Reserve Options

One requested feature for the payout system to support reserve growth. So, for example, one could set the reserve growth to some percent (say 10%), and the system will select what it believes is the most recent previous payout (though its choice can be overridden, if desired) and then it will perform the following maths to determine the gold value of the reserve for the current payout: Given Gain Percent of (Treasury - Previous Reserve) + Previous Reserve

The previous setting of the reserve value being just a gold amount to subtract is still present (and the default), as well as a plain percent of the current treasury, and growth in terms of a flat gold rate, rather than a percent value.

These options can be accessed under the first advanced settings section of the Payout creation/editing page.

Other Changes

  • Moved "Generate Unsubmittable Codes" and "Is Deprecated" to an advanced settings group in the Match Type creation/editing pages.
  • Added a warning to the Clan Role Settings section as, in most cases, editing those settings is both unnecessary and potentially dangerous as changing them allows for the granting of permissions.
  • Added a "Notes" field to the Battle's editing page. In the future I hope to create a more robust commenting system; for the moment though, this will hopefully be acceptable. Battles with notes will have a paperclip icon displayed next to the "Actions" dropdown, with the notes being displayed as a tooltip upon hovering. As in aside, adding a notes field to the replay's detail view is (significantly) more difficult and as such will have to wait for the time being.
  • Added better error message for rare "race conditions".
  • Improved display of listings of Payouts from three dates to a readable string.
  • Added a link to clan's World of Tanks page on the Payout Record page.

Fixes

  • Selecting all replay types via "Select All" causing the match type to fail to save.
  • Frozen clan wars map being shown as "freezed" instead of "Frozen".
  • Incorrect legend entry on code type's creation/editing page.
  • Payout Template not setting Payout Category ID

As to the future, I plan on recording part two of the getting started video today, so I expect the initial setup pages to be live in the next few days.

Tuesday, September 16, 2014

Improving the Setup Process

On of the major weaknesses of Clan Tools has always been the setup process. This has only increased as more features were added as it means there's even more being presented to a new user all at once. One promising suggestion was to have templates to provide a starting point from which to build on. Work on this is almost complete. However, I don't think a template system alone is the solution. The old adage about giving someone a fish vs. teaching them how to fish comes to mind; the template gives them a fish--which has its uses in the short term--however, what I really want is to teach the user how to fish.

With this goal, I've decided to attempt to make tutorial in video form. The below is the draft for the first video.

I would appreciate any feedback or suggestions you might have, be it with regards to the video or the general setup process itself.

Friday, September 12, 2014

Changelog for 9/12/2014

Minor Changes

  • Reordered Navigation items on the Clan Home page to have more logical groupings.
  • Removed the ability to disallow players with tags from submitting applications. See note 1 below for more information.
  • Delayed updating of player's data on login. See note 2 below for more information.

Fixes

  • Logs permissions policy incorrectly reporting a user having permissions in some cases.
  • Theoretical vulnerabilities in a few policies under certain conditions.
  • Logs page missing breadcrumb.
  • "Apply to clan" link still appearing if you're already a member of the clan.
  • Clan player refreshing failing if it tried to process an account that WG's API claimed didn't exist.
  • Sight inefficiencies related to users who aren't logged in.
  • Fixed requesting non-existing files of content types other than html or js causing a 500 response instead of a correct 404 response.
  • Fame pages displaying incorrect URL's after searching.
  • Clan Wars provinces page search not working.
Notes
  1. In order to effectively disallow players with clan tags from applying, the system has to actually contact the WG API and see if they are in a clan. This isn't always reliable or quick, and all the while the user is sitting at a white loading screen. Now, there are ways to make this more seamless, but such methods take time to implement and I honestly believe there are more pressing things for me to focus on. As such, I've disabled the feature.
  2. Similar to the problem noted in note 1, updating the player's WoT account data on login caused unnecessary delays and could possibly even fail preventing logging in all together. Now, the downside to this approach is that for time after logging in, all of the WoT account data won't be available to the system. This isn't really a big problem though as the only data that will matter in most cases is the clan data, and that will already be loaded in most cases automatically for participating clans.

Monday, September 8, 2014

Changelog for 9/8/2014

As a note: From now on I'm going to be posting changelogs here from now, rather than on the main site.

Personal URL Changes

Previously there were several pages which only the account owner could access, however they still pulled the user information from the URL and relied on security policies to limit access correctly. Now they simply use whoever the current user is; this change both increases security and is more logical.

For example what used to be https://clantools.us/users/account-id/settings is now https://clantools.us/account/settings

Email Field Removal

For the time being I've removed the ability to enter an email address. I'm working towards getting traditional email validation (as in the site sends you an email with a confirmation key) instead what it was before, a text field that wasn't used for anything. However, that has been placed on the back burner while I work on more pressing tasks. None the less, there's no need for the field to be there for the time being.

Clan Wars Server Landing Page

Previously there was no way to actually select to view a server's clan wars maps or the fame rankings. The system used assumptions to determine which page to send the user to after picking a server. It still does this if the information is present, though now if it's not it directs to a section page rather than just defaulting to the maps page.

Going forward, my primary focus is going to be making the initial setup process easier and improving some latency issues caused by waiting for the WG API to reply.