{"action":"published","release":{"url":"https://api.github.com/repos/MinoMino/minqlbot/releases/1297575","assets_url":"https://api.github.com/repos/MinoMino/minqlbot/releases/1297575/assets","upload_url":"https://uploads.github.com/repos/MinoMino/minqlbot/releases/1297575/assets{?name}","html_url":"https://github.com/MinoMino/minqlbot/releases/tag/v0.1.2","id":1297575,"tag_name":"v0.1.2","target_commitish":"master","name":"","draft":false,"author":{"login":"MinoMino","id":519318,"avatar_url":"https://avatars.githubusercontent.com/u/519318?v=3","gravatar_id":"","url":"https://api.github.com/users/MinoMino","html_url":"https://github.com/MinoMino","followers_url":"https://api.github.com/users/MinoMino/followers","following_url":"https://api.github.com/users/MinoMino/following{/other_user}","gists_url":"https://api.github.com/users/MinoMino/gists{/gist_id}","starred_url":"https://api.github.com/users/MinoMino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MinoMino/subscriptions","organizations_url":"https://api.github.com/users/MinoMino/orgs","repos_url":"https://api.github.com/users/MinoMino/repos","events_url":"https://api.github.com/users/MinoMino/events{/privacy}","received_events_url":"https://api.github.com/users/MinoMino/received_events","type":"User","site_admin":false},"prerelease":false,"created_at":"2015-05-14T17:52:59Z","published_at":"2015-05-14T18:40:50Z","assets":[{"url":"https://api.github.com/repos/MinoMino/minqlbot/releases/assets/582134","id":582134,"name":"minqlbot-debug.zip","label":null,"uploader":{"login":"MinoMino","id":519318,"avatar_url":"https://avatars.githubusercontent.com/u/519318?v=3","gravatar_id":"","url":"https://api.github.com/users/MinoMino","html_url":"https://github.com/MinoMino","followers_url":"https://api.github.com/users/MinoMino/followers","following_url":"https://api.github.com/users/MinoMino/following{/other_user}","gists_url":"https://api.github.com/users/MinoMino/gists{/gist_id}","starred_url":"https://api.github.com/users/MinoMino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MinoMino/subscriptions","organizations_url":"https://api.github.com/users/MinoMino/orgs","repos_url":"https://api.github.com/users/MinoMino/repos","events_url":"https://api.github.com/users/MinoMino/events{/privacy}","received_events_url":"https://api.github.com/users/MinoMino/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":1051274,"download_count":0,"created_at":"2015-05-14T18:40:38Z","updated_at":"2015-05-14T18:40:42Z","browser_download_url":"https://github.com/MinoMino/minqlbot/releases/download/v0.1.2/minqlbot-debug.zip"},{"url":"https://api.github.com/repos/MinoMino/minqlbot/releases/assets/582135","id":582135,"name":"minqlbot-debug_dependencies.zip","label":null,"uploader":{"login":"MinoMino","id":519318,"avatar_url":"https://avatars.githubusercontent.com/u/519318?v=3","gravatar_id":"","url":"https://api.github.com/users/MinoMino","html_url":"https://github.com/MinoMino","followers_url":"https://api.github.com/users/MinoMino/followers","following_url":"https://api.github.com/users/MinoMino/following{/other_user}","gists_url":"https://api.github.com/users/MinoMino/gists{/gist_id}","starred_url":"https://api.github.com/users/MinoMino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MinoMino/subscriptions","organizations_url":"https://api.github.com/users/MinoMino/orgs","repos_url":"https://api.github.com/users/MinoMino/repos","events_url":"https://api.github.com/users/MinoMino/events{/privacy}","received_events_url":"https://api.github.com/users/MinoMino/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":306457,"download_count":0,"created_at":"2015-05-14T18:40:45Z","updated_at":"2015-05-14T18:40:46Z","browser_download_url":"https://github.com/MinoMino/minqlbot/releases/download/v0.1.2/minqlbot-debug_dependencies.zip"},{"url":"https://api.github.com/repos/MinoMino/minqlbot/releases/assets/582132","id":582132,"name":"minqlbot.zip","label":null,"uploader":{"login":"MinoMino","id":519318,"avatar_url":"https://avatars.githubusercontent.com/u/519318?v=3","gravatar_id":"","url":"https://api.github.com/users/MinoMino","html_url":"https://github.com/MinoMino","followers_url":"https://api.github.com/users/MinoMino/followers","following_url":"https://api.github.com/users/MinoMino/following{/other_user}","gists_url":"https://api.github.com/users/MinoMino/gists{/gist_id}","starred_url":"https://api.github.com/users/MinoMino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MinoMino/subscriptions","organizations_url":"https://api.github.com/users/MinoMino/orgs","repos_url":"https://api.github.com/users/MinoMino/repos","events_url":"https://api.github.com/users/MinoMino/events{/privacy}","received_events_url":"https://api.github.com/users/MinoMino/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":999643,"download_count":0,"created_at":"2015-05-14T18:40:30Z","updated_at":"2015-05-14T18:40:33Z","browser_download_url":"https://github.com/MinoMino/minqlbot/releases/download/v0.1.2/minqlbot.zip"},{"url":"https://api.github.com/repos/MinoMino/minqlbot/releases/assets/582133","id":582133,"name":"minqlbot_dependencies.zip","label":null,"uploader":{"login":"MinoMino","id":519318,"avatar_url":"https://avatars.githubusercontent.com/u/519318?v=3","gravatar_id":"","url":"https://api.github.com/users/MinoMino","html_url":"https://github.com/MinoMino","followers_url":"https://api.github.com/users/MinoMino/followers","following_url":"https://api.github.com/users/MinoMino/following{/other_user}","gists_url":"https://api.github.com/users/MinoMino/gists{/gist_id}","starred_url":"https://api.github.com/users/MinoMino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MinoMino/subscriptions","organizations_url":"https://api.github.com/users/MinoMino/orgs","repos_url":"https://api.github.com/users/MinoMino/repos","events_url":"https://api.github.com/users/MinoMino/events{/privacy}","received_events_url":"https://api.github.com/users/MinoMino/received_events","type":"User","site_admin":false},"content_type":"application/octet-stream","state":"uploaded","size":81740,"download_count":0,"created_at":"2015-05-14T18:40:35Z","updated_at":"2015-05-14T18:40:35Z","browser_download_url":"https://github.com/MinoMino/minqlbot/releases/download/v0.1.2/minqlbot_dependencies.zip"}],"tarball_url":"https://api.github.com/repos/MinoMino/minqlbot/tarball/v0.1.2","zipball_url":"https://api.github.com/repos/MinoMino/minqlbot/zipball/v0.1.2","body":"* Two new functions added to the `minqlbot` module.\r\n  * `get_cvar` gets a cvar's value. The cvar needs to be correct in terms of case, and the result is _always_ a string, so cast the result if you need an integer or whatnot.\r\n    * Example: `bool(int(minqlbot.get_cvar(\"cg_simpleItems\")))`\r\n  * `console_command` executes a command more or less as if it was written in the console. Two caveats, though. If you list multiple commands with `;` and use the `wait` command, it won't actually wait. This is because even though commands are executed from left to right, they're all executed independently, as if you were to type them in one line each. The second caveat is that if you do `vid_restart` (and possibly other graphics-related commands) from a thread that isn't the main thread (in other words, the code wasn't triggered by a game event, but perhaps by a command from IRC), the game will crash. A work-around is to make an alias that calls it and then call the alias. That seems to make it call it from the main thread.\r\n    * Example: `minqlbot.console_command(\"alias vid_restart_alias vid_restart; vid_restart_alias\")`\r\n\r\n* Made it display a welcome message in the console when injected again. At some point I must've commented it out for some reason and forgot to turn it back on, I guess.\r\n\r\n* Most methods in the Plugin class were made into classmethods, and the Player class has a bunch of new methods that use these classmethods for the sake of convenience. For instance, instead of having to do `self.tell(\"Hello world.\", player)` from a plugin, you can do `player.tell(\"Hello world.\")`.\r\n\r\n* `Plugin.follow(player)` and `Player.follow()` methods added that tell the server who you want to spectate. Useful if you wanted to automate spectating if you wanted to stream action on your server and whatnot.\r\n\r\n* `Plugin.scores()` and `Game.scores()` ask the server for scores (triggering the \"scores\" event when the server responds) so that you don't have to use `Plugin.send_command(\"score\")`.\r\n\r\n* Someone had issues with exceptions about the database being locked. I guess in theory, one thread could lock the database while another one accesses it. While that's very unlikely to happen with the default plugins, I guess slow I/O could make it more likely, so I added an SQLite pragma statement to wait five seconds for the database to unlock if it's locked.\r\n\r\n* The debug build was being unnecessarily verbose, so I added certain events to a list that don't show up as debug strings, such as \"console\", \"gamestate\" and so on.\r\n\r\n* Fixed a bug where in CA, and possibly other game modes, the \"round_start\" event was being triggered instead of the \"round_countdown\" for the first round of the game. \r\n\r\n* Added support for race scores. If the game mode is race, scores are passed as instances of `minqlbot.RaceScores`. As of right now, only CA and Race scores are supported. Other game modes simply won't trigger the \"scores\" event.\r\n  * Other than the obvious `player` and `ping` attributes, it has `time`, `best_time` and `best_time_timedelta`. These are the number of minutes played (the \"Time\" column on the in-game scorelist), the player's best time formatted like on the in-game scorelist, and the player's best time in the form of a `datetime.timedelta` instance."}}