├── public ├── favicon.ico ├── robots.txt ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── images │ └── EVE_SSO_Login_Buttons_Large_White.png ├── .htaccess ├── js │ └── app.js ├── css │ └── bootstrap-combobox.css └── index.php ├── app ├── Listeners │ └── .gitkeep ├── Events │ └── Event.php ├── Jobs │ └── Command.php ├── Http │ ├── Requests │ │ └── Request.php │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── RedirectIfAuthenticated.php │ │ ├── VerifyCsrfToken.php │ │ ├── Authenticate.php │ │ └── MustBeAdmin.php │ ├── Controllers │ │ ├── Controller.php │ │ ├── UserController.php │ │ ├── Auth │ │ │ ├── PasswordController.php │ │ │ └── AuthController.php │ │ ├── WelcomeController.php │ │ ├── AuthController.php │ │ ├── HomeController.php │ │ └── CommandController.php │ └── Kernel.php ├── Exceptions │ ├── SlackException.php │ └── Handler.php ├── Channel.php ├── Providers │ ├── ConfigServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── EventServiceProvider.php │ ├── BusServiceProvider.php │ ├── AppServiceProvider.php │ └── RouteServiceProvider.php ├── Console │ ├── Commands │ │ ├── Inspire.php │ │ ├── RunKillbot.php │ │ ├── GetSlackChannels.php │ │ ├── SetNameTest.php │ │ ├── ReadStandings.php │ │ ├── CheckApis.php │ │ ├── RegisterSlackUsers.php │ │ ├── SetSlackInactives.php │ │ ├── RunAllChecks.php │ │ ├── ManageChannels.php │ │ ├── TrollPunkslap.php │ │ ├── UpdateUserGroups.php │ │ └── ManuallyAddUser.php │ └── Kernel.php ├── Services │ └── Registrar.php ├── Pinger.php ├── Killbot │ └── zkillMonkey.php └── Group.php ├── database ├── seeds │ ├── .gitkeep │ └── DatabaseSeeder.php ├── migrations │ ├── .gitkeep │ ├── 2015_05_21_131559_rename_channel_table.php │ ├── 2019_07_01_000000_create_pingers_table.php │ ├── 2016_07_23_184158_add_corp_column.php │ ├── 2015_05_08_221815_add_killbot_table.php │ ├── 2015_05_20_133936_add_inactive_to_users.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ ├── 2015_05_27_104039_set_group_owners_nullable.php │ ├── 2015_05_21_131911_rename_private_group_flag.php │ ├── 2015_05_05_084649_create_groups_table.php │ ├── 2015_05_05_085413_create_channels_table.php │ └── 2014_10_12_000000_create_users_table.php ├── .gitignore └── factories │ └── ModelFactory.php ├── resources ├── views │ ├── vendor │ │ └── .gitkeep │ ├── emails │ │ └── password.blade.php │ ├── admin │ │ ├── groups │ │ │ ├── create.blade.php │ │ │ └── index.blade.php │ │ └── users │ │ │ └── index.blade.php │ ├── errors │ │ └── 503.blade.php │ ├── welcome.blade.php │ ├── portal.blade.php │ ├── auth │ │ ├── password.blade.php │ │ ├── reset.blade.php │ │ ├── login.blade.php │ │ └── register.blade.php │ ├── app.blade.php │ └── home.blade.php ├── assets │ └── less │ │ ├── bootstrap │ │ ├── mixins │ │ │ ├── center-block.less │ │ │ ├── text-emphasis.less │ │ │ ├── size.less │ │ │ ├── background-variant.less │ │ │ ├── opacity.less │ │ │ ├── text-overflow.less │ │ │ ├── tab-focus.less │ │ │ ├── labels.less │ │ │ ├── resize.less │ │ │ ├── progress-bar.less │ │ │ ├── nav-divider.less │ │ │ ├── reset-filter.less │ │ │ ├── alerts.less │ │ │ ├── nav-vertical-align.less │ │ │ ├── responsive-visibility.less │ │ │ ├── pagination.less │ │ │ ├── border-radius.less │ │ │ ├── panels.less │ │ │ ├── list-group.less │ │ │ ├── hide-text.less │ │ │ ├── clearfix.less │ │ │ ├── table-row.less │ │ │ ├── image.less │ │ │ ├── buttons.less │ │ │ ├── forms.less │ │ │ ├── grid-framework.less │ │ │ └── grid.less │ │ ├── wells.less │ │ ├── breadcrumbs.less │ │ ├── responsive-embed.less │ │ ├── close.less │ │ ├── media.less │ │ ├── component-animations.less │ │ ├── thumbnails.less │ │ ├── utilities.less │ │ ├── pager.less │ │ ├── jumbotron.less │ │ ├── mixins.less │ │ ├── bootstrap.less │ │ ├── labels.less │ │ ├── badges.less │ │ ├── code.less │ │ ├── grid.less │ │ ├── alerts.less │ │ ├── progress-bars.less │ │ ├── pagination.less │ │ ├── print.less │ │ ├── scaffolding.less │ │ ├── tooltip.less │ │ ├── list-group.less │ │ ├── popovers.less │ │ └── modals.less │ │ └── app.less └── lang │ └── en │ ├── pagination.php │ └── passwords.php ├── storage ├── app │ └── .gitignore ├── logs │ └── .gitignore └── framework │ ├── cache │ └── .gitignore │ ├── views │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── bootstrap ├── cache │ └── .gitignore ├── autoload.php └── app.php ├── .gitattributes ├── phpspec.yml ├── package.json ├── .gitignore ├── tests ├── ExampleTest.php └── TestCase.php ├── .env.example ├── gulpfile.js ├── routes ├── api.php └── web.php ├── server.php ├── config ├── eve.php ├── killbot_template.php ├── standings_template.php ├── view.php ├── compile.php ├── services.php ├── instance_template.php ├── slack_template.php ├── broadcasting.php ├── pingbot_template.php ├── cache.php ├── filesystems.php ├── queue.php ├── auth.php └── database.php ├── phpunit.xml ├── LICENSE ├── composer.json └── artisan /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/Listeners/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/seeds/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /resources/views/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.less linguist-vendored 4 | -------------------------------------------------------------------------------- /app/Events/Event.php: -------------------------------------------------------------------------------- 1 | .striped(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/nav-divider.less: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | .nav-divider(@color: #e5e5e5) { 6 | height: 1px; 7 | margin: ((@line-height-computed / 2) - 1) 0; 8 | overflow: hidden; 9 | background-color: @color; 10 | } 11 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/reset-filter.less: -------------------------------------------------------------------------------- 1 | // Reset filters for IE 2 | // 3 | // When you need to remove a gradient background, do not forget to use this to reset 4 | // the IE filter for IE9 and below. 5 | 6 | .reset-filter() { 7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 8 | } 9 | -------------------------------------------------------------------------------- /tests/ExampleTest.php: -------------------------------------------------------------------------------- 1 | call('GET', '/'); 13 | 14 | $this->assertEquals(200, $response->getStatusCode()); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call('UserTableSeeder'); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes... 9 | RewriteRule ^(.*)/$ /$1 [L,R=301] 10 | 11 | # Handle Front Controller... 12 | RewriteCond %{REQUEST_FILENAME} !-d 13 | RewriteCond %{REQUEST_FILENAME} !-f 14 | RewriteRule ^ index.php [L] 15 | 16 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | belongsToMany('JamylBot\Group'); 12 | } 13 | 14 | static function findBySlackId($slack_id) 15 | { 16 | return Channel::where('slack_id', $slack_id)->first(); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/responsive-visibility.less: -------------------------------------------------------------------------------- 1 | // Responsive utilities 2 | 3 | // 4 | // More easily include all the states for responsive-utilities.less. 5 | .responsive-visibility() { 6 | display: block !important; 7 | table& { display: table; } 8 | tr& { display: table-row !important; } 9 | th&, 10 | td& { display: table-cell !important; } 11 | } 12 | 13 | .responsive-invisibility() { 14 | display: none !important; 15 | } 16 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | make('Illuminate\Contracts\Console\Kernel')->bootstrap(); 17 | 18 | return $app; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_DEBUG=true 3 | APP_KEY=SomeRandomString 4 | 5 | DB_HOST=localhost 6 | DB_DATABASE=homestead 7 | DB_USERNAME=homestead 8 | DB_PASSWORD=secret 9 | 10 | CACHE_DRIVER=file 11 | SESSION_DRIVER=file 12 | 13 | PHEAL_CACHE=database 14 | 15 | EVEONLINE_CLIENT_ID= 16 | EVEONLINE_CLIENT_SECRET= 17 | EVEONLINE_REDIRECT=http://localhost:8000/callback 18 | 19 | SLACK_API_TOKEN= 20 | SLACK_ADMIN_TOKEN= 21 | SLACK_POST_URL= 22 | 23 | SLACK_REGISTER_TOKEN= 24 | PING_TOKEN= 25 | SLACK_PORTRAIT_TOKEN= 26 | 27 | SLACK_DOMAIN=localhost 28 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var elixir = require('laravel-elixir'); 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Elixir Asset Management 6 | |-------------------------------------------------------------------------- 7 | | 8 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 9 | | for your Laravel application. By default, we are compiling the Less 10 | | file for our application, as well as publishing vendor resources. 11 | | 12 | */ 13 | 14 | elixir(function(mix) { 15 | mix.less('app.less'); 16 | }); 17 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/pagination.less: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) { 4 | > li { 5 | > a, 6 | > span { 7 | padding: @padding-vertical @padding-horizontal; 8 | font-size: @font-size; 9 | } 10 | &:first-child { 11 | > a, 12 | > span { 13 | .border-left-radius(@border-radius); 14 | } 15 | } 16 | &:last-child { 17 | > a, 18 | > span { 19 | .border-right-radius(@border-radius); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/migrations/2015_05_21_131559_rename_channel_table.php: -------------------------------------------------------------------------------- 1 | user(); 15 | })->middleware('auth:api'); 16 | -------------------------------------------------------------------------------- /resources/lang/en/pagination.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /app/Providers/ConfigServiceProvider.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | $uri = urldecode( 10 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 11 | ); 12 | 13 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 14 | // built-in PHP web server. This provides a convenient way to test a Laravel 15 | // application without having installed a "real" web server software here. 16 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) 17 | { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /database/migrations/2019_07_01_000000_create_pingers_table.php: -------------------------------------------------------------------------------- 1 | string('slack_id'); 18 | $table->string('display_name'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('pingers'); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/panels.less: -------------------------------------------------------------------------------- 1 | // Panels 2 | 3 | .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { 4 | border-color: @border; 5 | 6 | & > .panel-heading { 7 | color: @heading-text-color; 8 | background-color: @heading-bg-color; 9 | border-color: @heading-border; 10 | 11 | + .panel-collapse > .panel-body { 12 | border-top-color: @border; 13 | } 14 | .badge { 15 | color: @heading-bg-color; 16 | background-color: @heading-text-color; 17 | } 18 | } 19 | & > .panel-footer { 20 | + .panel-collapse > .panel-body { 21 | border-bottom-color: @border; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Console/Commands/Inspire.php: -------------------------------------------------------------------------------- 1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | id === (int) $userId; 24 | }); 25 | } 26 | } -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/list-group.less: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | .list-group-item-variant(@state; @background; @color) { 4 | .list-group-item-@{state} { 5 | color: @color; 6 | background-color: @background; 7 | 8 | a& { 9 | color: @color; 10 | 11 | .list-group-item-heading { 12 | color: inherit; 13 | } 14 | 15 | &:hover, 16 | &:focus { 17 | color: @color; 18 | background-color: darken(@background, 5%); 19 | } 20 | &.active, 21 | &.active:hover, 22 | &.active:focus { 23 | color: #fff; 24 | background-color: @color; 25 | border-color: @color; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/hide-text.less: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | // 3 | // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for 4 | // mixins being reused as classes with the same name, this doesn't hold up. As 5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. 6 | // 7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 8 | 9 | // Deprecated as of v3.0.1 (will be removed in v4) 10 | .hide-text() { 11 | font: ~"0/0" a; 12 | color: transparent; 13 | text-shadow: none; 14 | background-color: transparent; 15 | border: 0; 16 | } 17 | 18 | // New mixin to use as of v3.0.1 19 | .text-hide() { 20 | .hide-text(); 21 | } 22 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 15 | 'EventListener', 16 | ], 17 | ]; 18 | 19 | /** 20 | * Register any other events for your application. 21 | * 22 | * 23 | * @return void 24 | */ 25 | public function boot() 26 | { 27 | parent::boot(); 28 | 29 | // 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /database/migrations/2016_07_23_184158_add_corp_column.php: -------------------------------------------------------------------------------- 1 | string("corps")->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('groups', function(Blueprint $table) 29 | { 30 | $table->removeColumn("corps"); 31 | }); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2015_05_08_221815_add_killbot_table.php: -------------------------------------------------------------------------------- 1 | integer('id'); 18 | //$table->string('fingerprint'); 19 | $table->integer('lastkill')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('killbot'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2015_05_20_133936_add_inactive_to_users.php: -------------------------------------------------------------------------------- 1 | boolean('inactive')->default(false); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('users', function(Blueprint $table) 29 | { 30 | $table->dropColumn('inactive'); 31 | }); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /config/eve.php: -------------------------------------------------------------------------------- 1 | [32, 64, 128, 256, 512, 1024], 15 | 'avatar_url' => 'https://image.eveonline.com/Character/', 16 | 'pheal_cache' => env('PHEAL_CACHE', 'redis'), 17 | 'batch-size' => 500, 18 | 'static-cache-minutes' => 10080, 19 | 20 | 'esi-base' => 'https://esi.evetech.net', 21 | 'affiliation-route' => '/v1/characters/affiliation/', 22 | 'names-route' => '/v2/universe/names/', 23 | 24 | 25 | ]; 26 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token')->index(); 19 | $table->timestamp('created_at'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('password_resets'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /database/migrations/2015_05_27_104039_set_group_owners_nullable.php: -------------------------------------------------------------------------------- 1 | string('owners')->nullable()->change(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('groups', function(Blueprint $table) 29 | { 30 | $table->string('owners')->change(); 31 | }); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /resources/views/admin/groups/create.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Create new group
9 |
10 | {!! Form::open(['route' => 'groups.store']) !!} 11 | {!! Form::text('name') !!} 12 | {!! Form::submit('Create group') !!} 13 | {!! Form::close() !!} 14 |
15 |
16 |
17 |
18 |
19 | @endsection 20 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/responsive-embed.less: -------------------------------------------------------------------------------- 1 | // Embeds responsive 2 | // 3 | // Credit: Nicolas Gallagher and SUIT CSS. 4 | 5 | .embed-responsive { 6 | position: relative; 7 | display: block; 8 | height: 0; 9 | padding: 0; 10 | overflow: hidden; 11 | 12 | .embed-responsive-item, 13 | iframe, 14 | embed, 15 | object, 16 | video { 17 | position: absolute; 18 | top: 0; 19 | left: 0; 20 | bottom: 0; 21 | height: 100%; 22 | width: 100%; 23 | border: 0; 24 | } 25 | 26 | // Modifier class for 16:9 aspect ratio 27 | &.embed-responsive-16by9 { 28 | padding-bottom: 56.25%; 29 | } 30 | 31 | // Modifier class for 4:3 aspect ratio 32 | &.embed-responsive-4by3 { 33 | padding-bottom: 75%; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Providers/BusServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapUsing(function($command) 17 | { 18 | return Dispatcher::simpleMapping( 19 | $command, 'JamylBot\Commands', 'JamylBot\Handlers\Commands' 20 | ); 21 | }); 22 | } 23 | 24 | /** 25 | * Register any application services. 26 | * 27 | * @return void 28 | */ 29 | public function register() 30 | { 31 | // 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2015_05_21_131911_rename_private_group_flag.php: -------------------------------------------------------------------------------- 1 | renameColumn('private', 'is_group'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | * 24 | * @return void 25 | */ 26 | public function down() 27 | { 28 | Schema::table('channels', function(Blueprint $table) 29 | { 30 | $table->renameColumn('is_group', 'private'); 31 | }); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->bind( 29 | 'Illuminate\Contracts\Auth\Registrar', 30 | 'JamylBot\Services\Registrar' 31 | ); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | "Passwords must be at least six characters and match the confirmation.", 17 | "user" => "We can't find a user with that e-mail address.", 18 | "token" => "This password reset token is invalid.", 19 | "sent" => "We have e-mailed your password reset link!", 20 | "reset" => "Your password has been reset!", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 14 | static $password; 15 | return [ 16 | 'name' => $faker->name, 17 | 'email' => $faker->unique()->safeEmail, 18 | 'password' => $password ?: $password = bcrypt('secret'), 19 | 'remember_token' => str_random(10), 20 | ]; 21 | }); -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | button& { 27 | padding: 0; 28 | cursor: pointer; 29 | background: transparent; 30 | border: 0; 31 | -webkit-appearance: none; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/table-row.less: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | .table-row-variant(@state; @background) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table > thead > tr, 7 | .table > tbody > tr, 8 | .table > tfoot > tr { 9 | > td.@{state}, 10 | > th.@{state}, 11 | &.@{state} > td, 12 | &.@{state} > th { 13 | background-color: @background; 14 | } 15 | } 16 | 17 | // Hover states for `.table-hover` 18 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 19 | .table-hover > tbody > tr { 20 | > td.@{state}:hover, 21 | > th.@{state}:hover, 22 | &.@{state}:hover > td, 23 | &:hover > .@{state}, 24 | &.@{state}:hover > th { 25 | background-color: darken(@background, 5%); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | ./tests/ 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /resources/views/errors/503.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 33 | 34 | 35 |
36 |
37 |
Be right back.
38 |
39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/media.less: -------------------------------------------------------------------------------- 1 | .media { 2 | // Proper spacing between instances of .media 3 | margin-top: 15px; 4 | 5 | &:first-child { 6 | margin-top: 0; 7 | } 8 | } 9 | 10 | .media-right, 11 | .media > .pull-right { 12 | padding-left: 10px; 13 | } 14 | 15 | .media-left, 16 | .media > .pull-left { 17 | padding-right: 10px; 18 | } 19 | 20 | .media-left, 21 | .media-right, 22 | .media-body { 23 | display: table-cell; 24 | vertical-align: top; 25 | } 26 | 27 | .media-middle { 28 | vertical-align: middle; 29 | } 30 | 31 | .media-bottom { 32 | vertical-align: bottom; 33 | } 34 | 35 | // Reset margins on headings for tighter default spacing 36 | .media-heading { 37 | margin-top: 0; 38 | margin-bottom: 5px; 39 | } 40 | 41 | // Media list variation 42 | // 43 | // Undo default ul/ol styles 44 | .media-list { 45 | padding-left: 0; 46 | list-style: none; 47 | } 48 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | visibility: hidden; 21 | 22 | &.in { display: block; visibility: visible; } 23 | tr&.in { display: table-row; } 24 | tbody&.in { display: table-row-group; } 25 | } 26 | 27 | .collapsing { 28 | position: relative; 29 | height: 0; 30 | overflow: hidden; 31 | .transition-property(~"height, visibility"); 32 | .transition-duration(.35s); 33 | .transition-timing-function(ease); 34 | } 35 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 24 | } 25 | 26 | /** 27 | * Handle an incoming request. 28 | * 29 | * @param \Illuminate\Http\Request $request 30 | * @param \Closure $next 31 | * @return mixed 32 | */ 33 | public function handle($request, Closure $next) 34 | { 35 | if ($this->auth->check()) 36 | { 37 | return new RedirectResponse(url('/home')); 38 | } 39 | 40 | return $next($request); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: @thumbnail-padding; 10 | margin-bottom: @line-height-computed; 11 | line-height: @line-height-base; 12 | background-color: @thumbnail-bg; 13 | border: 1px solid @thumbnail-border; 14 | border-radius: @thumbnail-border-radius; 15 | .transition(border .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | &:extend(.img-responsive); 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // Add a hover state for linked versions only 25 | a&:hover, 26 | a&:focus, 27 | a&.active { 28 | border-color: @link-color; 29 | } 30 | 31 | // Image captions 32 | .caption { 33 | padding: @thumbnail-caption-padding; 34 | color: @thumbnail-caption-color; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /public/js/app.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | /* Group Admin Page */ 3 | 4 | /* Searchable Dropdown Box */ 5 | //$("form.add-user-form").children("select").combobox(); 6 | //$("form.add-owner-form").children("select").combobox(); 7 | $("select").combobox(); 8 | 9 | 10 | /* Deleting Users AJAX */ 11 | $("form.user-action-form").submit(function(e){ 12 | e.preventDefault(); 13 | $.ajax({ 14 | method: "post", 15 | url: $(this).attr("action"), 16 | context: $(this).closest("tr"), 17 | data: $(this).serialize(), 18 | cache: false 19 | }).done(function(data){ 20 | if(data.status == "ok") { 21 | this.fadeOut("slow",function(){ 22 | $("form.add-user-form select").append( 23 | $("") 24 | .val($(this).children(".user-id").text()) 25 | .html($(this).children(".char-name").text()) 26 | ).combobox('refresh'); 27 | $(this).remove(); 28 | }); 29 | } 30 | }); 31 | }); 32 | }); -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | openRoutes as $route) 27 | { 28 | if ($request->is($route)) 29 | { 30 | return $next($request); 31 | } 32 | } 33 | return parent::handle($request, $next); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 23 | } 24 | 25 | /** 26 | * Handle an incoming request. 27 | * 28 | * @param \Illuminate\Http\Request $request 29 | * @param \Closure $next 30 | * @return mixed 31 | */ 32 | public function handle($request, Closure $next) 33 | { 34 | if ($this->auth->guest()) 35 | { 36 | if ($request->ajax()) 37 | { 38 | return response('Unauthorized.', 401); 39 | } 40 | else 41 | { 42 | return redirect()->guest('auth/login'); 43 | } 44 | } 45 | 46 | return $next($request); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /app/Http/Controllers/UserController.php: -------------------------------------------------------------------------------- 1 | groups()->sync([]); 25 | $user->delete(); 26 | return redirect('/admin/users'); 27 | } 28 | 29 | public function getPending() 30 | { 31 | // List users who have entered an email but have not registered on slack. 32 | //$users = User::where(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/Services/Registrar.php: -------------------------------------------------------------------------------- 1 | 'required|max:255', 19 | 'email' => 'required|email|max:255|unique:users', 20 | 'password' => 'required|confirmed|min:6', 21 | ]); 22 | } 23 | 24 | /** 25 | * Create a new user instance after a valid registration. 26 | * 27 | * @param array $data 28 | * @return User 29 | */ 30 | public function create(array $data) 31 | { 32 | return User::create([ 33 | 'name' => $data['name'], 34 | 'email' => $data['email'], 35 | 'password' => bcrypt($data['password']), 36 | ]); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /config/killbot_template.php: -------------------------------------------------------------------------------- 1 | 'https://zkillboard.com/api/kills/', 15 | 'kill_link' => 'https://zkillboard.com/kill/', 16 | 'ship_renders' => 'https://image.eveonline.com/Render/', 17 | 'min_value' => 1000000000, 18 | 'min_capsule_value' => 100000000, 19 | 'capsule_type_ids' => array(670,33328), 20 | 'name' => 'DankBot', 21 | 'emoji' => ':ptb:', 22 | 23 | 'corps' => [ 24 | 'ptb' => [ 25 | 'id' => 398598576, 26 | 'channel' => 'ptb_friends', 27 | 'active' => true 28 | ], 29 | // 'wasp' => [ 30 | // 'id' => 101116365, 31 | // 'channel' => 'api_test', 32 | // 'active' => false 33 | // ], 34 | ], 35 | ]; 36 | -------------------------------------------------------------------------------- /database/migrations/2015_05_05_084649_create_groups_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('owners'); 20 | $table->timestamps(); 21 | }); 22 | 23 | Schema::create('group_user', function(Blueprint $table) 24 | { 25 | $table->increments('id'); 26 | $table->unsignedInteger('user_id'); 27 | $table->unsignedInteger('group_id'); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::drop('groups'); 39 | Schema::drop('group_user'); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .center-block { 13 | .center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | .text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | visibility: hidden !important; 48 | } 49 | 50 | 51 | // For Affix plugin 52 | // ------------------------- 53 | 54 | .affix { 55 | position: fixed; 56 | } 57 | -------------------------------------------------------------------------------- /config/standings_template.php: -------------------------------------------------------------------------------- 1 | [ 15 | 'alliances' => [ 16 | '1988009451', // CVA (example) - This is simply the ID of the alliance. 17 | ], 18 | ], 19 | 20 | 'blues' => [ 21 | 'alliances' => [ 22 | // 23 | ], 24 | 'corporations' => [ 25 | // 26 | ], 27 | ], 28 | 29 | 'light-blues' => [ 30 | 'alliances' => [ 31 | // 32 | ], 33 | 'corporations' => [ 34 | // 35 | ], 36 | ], 37 | 38 | 'reds' => [ 39 | 'alliances' => [ 40 | // 41 | ], 42 | 'corporations' => [ 43 | // 44 | ], 45 | ], 46 | 47 | ]; 48 | -------------------------------------------------------------------------------- /database/migrations/2015_05_05_085413_create_channels_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('slack_id'); 19 | $table->string('name'); 20 | $table->boolean('private'); 21 | $table->timestamps(); 22 | }); 23 | Schema::create('channel_group', function(Blueprint $table) 24 | { 25 | $table->increments('id'); 26 | $table->unsignedInteger('channel_id'); 27 | $table->unsignedInteger('group_id'); 28 | }); 29 | } 30 | 31 | /** 32 | * Reverse the migrations. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::drop('channel'); 39 | Schema::drop('channel_group'); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/views')) 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path().'/framework/views'), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | &:extend(.clearfix all); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pager-bg; 19 | border: 1px solid @pager-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pager-bg; 51 | cursor: @cursor-disabled; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/PasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 OrthoLoess 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /app/Http/Controllers/WelcomeController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 23 | } 24 | 25 | /** 26 | * Show the application welcome screen to the user. 27 | * 28 | * @return Response 29 | */ 30 | public function index() 31 | { 32 | return view('welcome'); 33 | } 34 | 35 | /** 36 | * Show the application welcome screen to the user. 37 | * 38 | * @return Response 39 | */ 40 | public function portal() 41 | { 42 | return view('portal'); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/AuthController.php: -------------------------------------------------------------------------------- 1 | middleware('guest', ['except' => 'getLogout']); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /public/css/bootstrap-combobox.css: -------------------------------------------------------------------------------- 1 | .form-search .combobox-container, 2 | .form-inline .combobox-container { 3 | display: inline-block; 4 | margin-bottom: 0; 5 | vertical-align: top; 6 | } 7 | .form-search .combobox-container .input-group-addon, 8 | .form-inline .combobox-container .input-group-addon { 9 | width: auto; 10 | } 11 | .combobox-selected .caret { 12 | display: none; 13 | } 14 | /* :not doesn't work in IE8 */ 15 | .combobox-container:not(.combobox-selected) .glyphicon-remove { 16 | display: none; 17 | } 18 | .typeahead-long { 19 | max-height: 300px; 20 | overflow-y: auto; 21 | } 22 | .control-group.error .combobox-container .add-on { 23 | color: #B94A48; 24 | border-color: #B94A48; 25 | } 26 | .control-group.error .combobox-container .caret { 27 | border-top-color: #B94A48; 28 | } 29 | .control-group.warning .combobox-container .add-on { 30 | color: #C09853; 31 | border-color: #C09853; 32 | } 33 | .control-group.warning .combobox-container .caret { 34 | border-top-color: #C09853; 35 | } 36 | .control-group.success .combobox-container .add-on { 37 | color: #468847; 38 | border-color: #468847; 39 | } 40 | .control-group.success .combobox-container .caret { 41 | border-top-color: #468847; 42 | } -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | hr { 23 | border-top-color: darken(@jumbotron-bg, 10%); 24 | } 25 | 26 | .container &, 27 | .container-fluid & { 28 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 29 | } 30 | 31 | .container { 32 | max-width: 100%; 33 | } 34 | 35 | @media screen and (min-width: @screen-sm-min) { 36 | padding: (@jumbotron-padding * 1.6) 0; 37 | 38 | .container &, 39 | .container-fluid & { 40 | padding-left: (@jumbotron-padding * 2); 41 | padding-right: (@jumbotron-padding * 2); 42 | } 43 | 44 | h1, 45 | .h1 { 46 | font-size: (@font-size-base * 4.5); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/image.less: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | .img-responsive(@display: block) { 10 | display: @display; 11 | max-width: 100%; // Part 1: Set a maximum relative to the parent 12 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching 13 | } 14 | 15 | 16 | // Retina image 17 | // 18 | // Short retina mixin for setting background-image and -size. Note that the 19 | // spelling of `min--moz-device-pixel-ratio` is intentional. 20 | .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { 21 | background-image: url("@{file-1x}"); 22 | 23 | @media 24 | only screen and (-webkit-min-device-pixel-ratio: 2), 25 | only screen and ( min--moz-device-pixel-ratio: 2), 26 | only screen and ( -o-min-device-pixel-ratio: 2/1), 27 | only screen and ( min-device-pixel-ratio: 2), 28 | only screen and ( min-resolution: 192dpi), 29 | only screen and ( min-resolution: 2dppx) { 30 | background-image: url("@{file-2x}"); 31 | background-size: @width-1x @height-1x; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | JamylBot Slack Manager 4 | 5 | 6 | 7 | 40 | 41 | 42 |
43 |
44 |
ProviBloc Slack
45 |
Login with EVE to get a slack invite.
46 |
Login with EVE SSO
47 |
48 |
49 | 50 | 51 | -------------------------------------------------------------------------------- /resources/views/portal.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | ProviBloc 4 | 5 | 6 | 7 | 40 | 41 | 42 |
43 |
44 |
ProviBloc
45 |
Nothing to see here yet.
46 |
47 |
48 | 49 | 50 | -------------------------------------------------------------------------------- /config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | 18 | realpath(__DIR__.'/../app/Providers/AppServiceProvider.php'), 19 | realpath(__DIR__.'/../app/Providers/EventServiceProvider.php'), 20 | realpath(__DIR__.'/../app/Providers/RouteServiceProvider.php'), 21 | 22 | ], 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Compiled File Providers 27 | |-------------------------------------------------------------------------- 28 | | 29 | | Here you may list service providers which define a "compiles" function 30 | | that returns additional files that should be compiled, providing an 31 | | easy way to get common files from any packages you are utilizing. 32 | | 33 | */ 34 | 35 | 'providers' => [ 36 | // 37 | ], 38 | 39 | ]; 40 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | 4 | // Utilities 5 | @import "mixins/hide-text.less"; 6 | @import "mixins/opacity.less"; 7 | @import "mixins/image.less"; 8 | @import "mixins/labels.less"; 9 | @import "mixins/reset-filter.less"; 10 | @import "mixins/resize.less"; 11 | @import "mixins/responsive-visibility.less"; 12 | @import "mixins/size.less"; 13 | @import "mixins/tab-focus.less"; 14 | @import "mixins/text-emphasis.less"; 15 | @import "mixins/text-overflow.less"; 16 | @import "mixins/vendor-prefixes.less"; 17 | 18 | // Components 19 | @import "mixins/alerts.less"; 20 | @import "mixins/buttons.less"; 21 | @import "mixins/panels.less"; 22 | @import "mixins/pagination.less"; 23 | @import "mixins/list-group.less"; 24 | @import "mixins/nav-divider.less"; 25 | @import "mixins/forms.less"; 26 | @import "mixins/progress-bar.less"; 27 | @import "mixins/table-row.less"; 28 | 29 | // Skins 30 | @import "mixins/background-variant.less"; 31 | @import "mixins/border-radius.less"; 32 | @import "mixins/gradients.less"; 33 | 34 | // Layout 35 | @import "mixins/clearfix.less"; 36 | @import "mixins/center-block.less"; 37 | @import "mixins/nav-vertical-align.less"; 38 | @import "mixins/grid-framework.less"; 39 | @import "mixins/grid.less"; 40 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/buttons.less: -------------------------------------------------------------------------------- 1 | // Button variants 2 | // 3 | // Easily pump out default styles, as well as :hover, :focus, :active, 4 | // and disabled options for all buttons 5 | 6 | .button-variant(@color; @background; @border) { 7 | color: @color; 8 | background-color: @background; 9 | border-color: @border; 10 | 11 | &:hover, 12 | &:focus, 13 | &.focus, 14 | &:active, 15 | &.active, 16 | .open > .dropdown-toggle& { 17 | color: @color; 18 | background-color: darken(@background, 10%); 19 | border-color: darken(@border, 12%); 20 | } 21 | &:active, 22 | &.active, 23 | .open > .dropdown-toggle& { 24 | background-image: none; 25 | } 26 | &.disabled, 27 | &[disabled], 28 | fieldset[disabled] & { 29 | &, 30 | &:hover, 31 | &:focus, 32 | &.focus, 33 | &:active, 34 | &.active { 35 | background-color: @background; 36 | border-color: @border; 37 | } 38 | } 39 | 40 | .badge { 41 | color: @background; 42 | background-color: @color; 43 | } 44 | } 45 | 46 | // Button sizes 47 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { 48 | padding: @padding-vertical @padding-horizontal; 49 | font-size: @font-size; 50 | line-height: @line-height; 51 | border-radius: @border-radius; 52 | } 53 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => '', 19 | 'secret' => '', 20 | ], 21 | 22 | 'mandrill' => [ 23 | 'secret' => '', 24 | ], 25 | 26 | 'ses' => [ 27 | 'key' => '', 28 | 'secret' => '', 29 | 'region' => 'us-east-1', 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => 'JamylBot\User', 34 | 'key' => '', 35 | 'secret' => '', 36 | ], 37 | 38 | 'github' => [ 39 | 'client_id' => env('GITHUB_CLIENT_ID'), 40 | 'client_secret' => env('GITHUB_CLIENT_SECRET'), 41 | 'redirect' => 'http://localhost:8000/callback', 42 | ], 43 | 44 | 'eveonline' => [ 45 | 'client_id' => env('EVEONLINE_CLIENT_ID'), 46 | 'client_secret' => env('EVEONLINE_CLIENT_SECRET'), 47 | 'redirect' => env('EVEONLINE_REDIRECT'), 48 | ], 49 | 50 | ]; 51 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "repositories": [ 8 | ], 9 | "require": { 10 | "laravel/framework": "5.3.*", 11 | "nullx27/eveonline-socialite": "0.1.*", 12 | "3rdpartyeve/phealng": "~2.0", 13 | "laracasts/flash": "~1.3", 14 | "laravelcollective/html": "~5.0", 15 | "predis/predis": "~1.0", 16 | "doctrine/dbal": "~2.5" 17 | }, 18 | "require-dev": { 19 | "phpunit/phpunit": "~4.0", 20 | "phpspec/phpspec": "~2.1", 21 | "symfony/dom-crawler": "3.1.*", 22 | "symfony/css-selector": "3.1.*" 23 | }, 24 | "autoload": { 25 | "classmap": [ 26 | "database" 27 | ], 28 | "psr-4": { 29 | "JamylBot\\": "app/" 30 | } 31 | }, 32 | "autoload-dev": { 33 | "classmap": [ 34 | "tests/TestCase.php" 35 | ] 36 | }, 37 | "scripts": { 38 | "post-install-cmd": [ 39 | "php artisan clear-compiled", 40 | "php artisan optimize" 41 | ], 42 | "post-update-cmd": [ 43 | "php artisan clear-compiled", 44 | "php artisan optimize" 45 | ], 46 | "post-create-project-cmd": [ 47 | "php -r \"copy('.env.example', '.env');\"", 48 | "php artisan key:generate" 49 | ] 50 | }, 51 | "config": { 52 | "preferred-install": "dist" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | cycleCorps(); 41 | } 42 | 43 | /** 44 | * Get the console command arguments. 45 | * 46 | * @return array 47 | */ 48 | protected function getArguments() 49 | { 50 | return [ 51 | //['example', InputArgument::REQUIRED, 'An example argument.'], 52 | ]; 53 | } 54 | 55 | /** 56 | * Get the console command options. 57 | * 58 | * @return array 59 | */ 60 | protected function getOptions() 61 | { 62 | return [ 63 | //['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 64 | ]; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | .btn-xs & { 32 | top: 0; 33 | padding: 1px 5px; 34 | } 35 | 36 | // Hover state, but only for links 37 | a& { 38 | &:hover, 39 | &:focus { 40 | color: @badge-link-hover-color; 41 | text-decoration: none; 42 | cursor: pointer; 43 | } 44 | } 45 | 46 | // Account for badges in navs 47 | .list-group-item.active > &, 48 | .nav-pills > .active > a > & { 49 | color: @badge-active-color; 50 | background-color: @badge-active-bg; 51 | } 52 | .list-group-item > & { 53 | float: right; 54 | } 55 | .list-group-item > & + & { 56 | margin-right: 5px; 57 | } 58 | .nav-pills > li > a > & { 59 | margin-left: 3px; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /app/Console/Commands/GetSlackChannels.php: -------------------------------------------------------------------------------- 1 | getNewChannels(); 41 | } 42 | 43 | /** 44 | * Get the console command arguments. 45 | * 46 | * @return array 47 | */ 48 | protected function getArguments() 49 | { 50 | return [ 51 | // ['example', InputArgument::REQUIRED, 'An example argument.'], 52 | ]; 53 | } 54 | 55 | /** 56 | * Get the console command options. 57 | * 58 | * @return array 59 | */ 60 | protected function getOptions() 61 | { 62 | return [ 63 | // ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 64 | ]; 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /app/Http/Controllers/AuthController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 18 | } 19 | 20 | /** 21 | * Display a listing of the resource. 22 | * 23 | * @return Response 24 | */ 25 | public function index() 26 | { 27 | // 28 | } 29 | 30 | public function redirectToProvider() 31 | { 32 | return Socialite::driver('eveonline')->redirect(); 33 | } 34 | 35 | public function handleProviderCallback() 36 | { 37 | $char = Socialite::driver('eveonline')->user(); 38 | 39 | try { 40 | $user = User::where('char_id', $char->id)->firstOrFail(); 41 | } catch (ModelNotFoundException $e) { 42 | $user = User::createAndFill([ 43 | 'char_id' => $char->id, 44 | 'char_name' => $char->name, 45 | 'password' => Userbot::generatePassword(16), 46 | 'next_check'=> \Carbon\Carbon::now('UTC'), 47 | ]); 48 | } 49 | Auth::login($user, true); 50 | return redirect('home'); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('char_name'); 19 | $table->string('email')->unique()->nullable(); 20 | $table->string('password', 60); 21 | $table->unsignedInteger('char_id'); 22 | $table->string('slack_id')->nullable(); 23 | $table->string('slack_name')->nullable(); 24 | $table->string('status')->nullable(); 25 | $table->integer('error')->nullable(); 26 | $table->dateTime('next_check')->nullable(); 27 | $table->string('corp_id')->nullable(); 28 | $table->string('corp_name')->nullable(); 29 | $table->string('alliance_id')->nullable(); 30 | $table->string('alliance_name')->nullable(); 31 | $table->boolean('admin')->default(false); 32 | $table->boolean('super_admin')->default(false); 33 | $table->rememberToken(); 34 | $table->timestamps(); 35 | }); 36 | } 37 | 38 | /** 39 | * Reverse the migrations. 40 | * 41 | * @return void 42 | */ 43 | public function down() 44 | { 45 | Schema::drop('users'); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/Console/Commands/SetNameTest.php: -------------------------------------------------------------------------------- 1 | setName('U04LH952N', '[CVA|CALVU]', 'Rollo'); 44 | //print($api->getAllianceTicker(1988009451)."\n"); 45 | $userbot->checkNames(); 46 | } 47 | 48 | /** 49 | * Get the console command arguments. 50 | * 51 | * @return array 52 | */ 53 | protected function getArguments() 54 | { 55 | return [ 56 | 57 | ]; 58 | } 59 | 60 | /** 61 | * Get the console command options. 62 | * 63 | * @return array 64 | */ 65 | protected function getOptions() 66 | { 67 | return [ 68 | 69 | ]; 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /app/Console/Commands/ReadStandings.php: -------------------------------------------------------------------------------- 1 | readNewStandings(); 43 | } 44 | 45 | /** 46 | * Get the console command arguments. 47 | * 48 | * @return array 49 | */ 50 | protected function getArguments() 51 | { 52 | return [ 53 | // ['example', InputArgument::REQUIRED, 'An example argument.'], 54 | ]; 55 | } 56 | 57 | /** 58 | * Get the console command options. 59 | * 60 | * @return array 61 | */ 62 | protected function getOptions() 63 | { 64 | return [ 65 | // ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 66 | ]; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /app/Console/Commands/CheckApis.php: -------------------------------------------------------------------------------- 1 | performUpdates(); 43 | } 44 | 45 | /** 46 | * Get the console command arguments. 47 | * 48 | * @return array 49 | */ 50 | protected function getArguments() 51 | { 52 | return [ 53 | //['example', InputArgument::REQUIRED, 'An example argument.'], 54 | ]; 55 | } 56 | 57 | /** 58 | * Get the console command options. 59 | * 60 | * @return array 61 | */ 62 | protected function getOptions() 63 | { 64 | return [ 65 | //['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 66 | ]; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /config/instance_template.php: -------------------------------------------------------------------------------- 1 | 'JamylBot', 16 | 17 | /* 18 | |-------------------------------------------------------------------------- 19 | | Application URL 20 | |-------------------------------------------------------------------------- 21 | | 22 | | This URL is used by the console to properly generate URLs when using 23 | | the Artisan command line tool. You should set this to the root of 24 | | your application so that it is used when running Artisan tasks. 25 | | 26 | */ 27 | 28 | 'appUrl' => 'http://slack.provibloc.net', 29 | 30 | /* 31 | |-------------------------------------------------------------------------- 32 | | Default Database Connection Name 33 | |-------------------------------------------------------------------------- 34 | | 35 | | Here you may specify which of the database connections below you wish 36 | | to use as your default connection for all database work. Of course 37 | | you may use many connections at once using the Database library. 38 | | 39 | */ 40 | 41 | 'defaultDB' => 'mysql', 42 | 43 | 44 | ]; -------------------------------------------------------------------------------- /app/Console/Commands/RegisterSlackUsers.php: -------------------------------------------------------------------------------- 1 | linkSlackMembers(); 43 | } 44 | 45 | /** 46 | * Get the console command arguments. 47 | * 48 | * @return array 49 | */ 50 | protected function getArguments() 51 | { 52 | return [ 53 | //['example', InputArgument::REQUIRED, 'An example argument.'], 54 | ]; 55 | } 56 | 57 | /** 58 | * Get the console command options. 59 | * 60 | * @return array 61 | */ 62 | protected function getOptions() 63 | { 64 | return [ 65 | //['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 66 | ]; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /app/Console/Commands/SetSlackInactives.php: -------------------------------------------------------------------------------- 1 | setSlackInactives(); 42 | } 43 | 44 | /** 45 | * Get the console command arguments. 46 | * 47 | * @return array 48 | */ 49 | protected function getArguments() 50 | { 51 | return [ 52 | // ['example', InputArgument::REQUIRED, 'An example argument.'], 53 | ]; 54 | } 55 | 56 | /** 57 | * Get the console command options. 58 | * 59 | * @return array 60 | */ 61 | protected function getOptions() 62 | { 63 | return [ 64 | // ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 65 | ]; 66 | } 67 | 68 | } 69 | -------------------------------------------------------------------------------- /app/Console/Commands/RunAllChecks.php: -------------------------------------------------------------------------------- 1 | performUpdates(); 41 | $userbot->linkSlackMembers(); 42 | $userbot->setSlackInactives(); 43 | } 44 | 45 | /** 46 | * Get the console command arguments. 47 | * 48 | * @return array 49 | */ 50 | protected function getArguments() 51 | { 52 | return [ 53 | // ['example', InputArgument::REQUIRED, 'An example argument.'], 54 | ]; 55 | } 56 | 57 | /** 58 | * Get the console command options. 59 | * 60 | * @return array 61 | */ 62 | protected function getOptions() 63 | { 64 | return [ 65 | // ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 66 | ]; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /app/Pinger.php: -------------------------------------------------------------------------------- 1 | first(); 58 | if(!$first) { 59 | return null; 60 | }else { 61 | return $first->display_name; 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire')->hourly(); 36 | $schedule->command('jamyl:allchecks')->everyFiveMinutes(); 37 | $schedule->command('jamyl:firekillbot')->everyFiveMinutes(); 38 | $schedule->command('jamyl:usergroups')->everyFiveMinutes(); 39 | $schedule->command('jamyl:manage')->everyFiveMinutes(); 40 | $schedule->command('jamyl:getchannels')->Hourly(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /resources/views/auth/password.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 |
10 | @if (session('status')) 11 |
12 | {{ session('status') }} 13 |
14 | @endif 15 | 16 | @if (count($errors) > 0) 17 |
18 | Whoops! There were some problems with your input.

19 |
    20 | @foreach ($errors->all() as $error) 21 |
  • {{ $error }}
  • 22 | @endforeach 23 |
24 |
25 | @endif 26 | 27 |
28 | 29 | 30 |
31 | 32 |
33 | 34 |
35 |
36 | 37 |
38 |
39 | 42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | @endsection 51 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 23 | \JamylBot\Http\Middleware\EncryptCookies::class, 24 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 25 | \Illuminate\Session\Middleware\StartSession::class, 26 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 27 | \JamylBot\Http\Middleware\VerifyCsrfToken::class, 28 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 29 | ], 30 | 'api' => [ 31 | 'throttle:60,1', 32 | 'bindings', 33 | ], 34 | ]; 35 | 36 | /** 37 | * The application's route middleware. 38 | * 39 | * @var array 40 | */ 41 | protected $routeMiddleware = [ 42 | 'auth' => 'JamylBot\Http\Middleware\Authenticate', 43 | 'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth', 44 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 45 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 46 | 'guest' => 'JamylBot\Http\Middleware\RedirectIfAuthenticated', 47 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 48 | 'admin' => 'JamylBot\Http\Middleware\MustBeAdmin', 49 | ]; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /config/slack_template.php: -------------------------------------------------------------------------------- 1 | 'https://provibloc.slack.com/api/', 15 | 'api-token' => env('SLACK_API_TOKEN'), 16 | 'admin-token' => env('SLACK_ADMIN_TOKEN'), 17 | 'register-token' => env('SLACK_REGISTER_TOKEN'), 18 | 19 | 'post-url' => env('SLACK_POST_URL'), 20 | 21 | 'token-expression' => '/api_token: \'([a-zA-Z0-9-]*)\'/', 22 | 23 | 'auto-join-channels' => ['C04G7GNLT', 'C050GQPC0'], 24 | 25 | 'command-tokens' => [ 26 | '/portrait' => env('SLACK_PORTRAIT_TOKEN'), 27 | '/punk' => env('SLACK_PUNK_TOKEN'), 28 | ], 29 | 30 | 'cache-time' => 5, 31 | 32 | 'jamyl-id' => 'U04JN1L0C', 33 | 34 | 'channels-to-manage' => [ 35 | 'G04FM566L', // api_test 36 | 'G04V6HSHC', // group_test 37 | 'G04G7KMFM', // p_fc_chat 38 | 'G04G7KRUD', // p_fc_pings 39 | 'G04GC8QMX', // titan_pings 40 | 'G04HPDE74', // cap_fcs 41 | 'G04QGUA5H', // p-scouts 42 | 'G04N41BB8', // profidence 43 | 'G077ZP93P', // a_gfa 44 | 'G07HYTANM', // cva_c 45 | 'G0A8VGD47', // c_caps 46 | 'G0ALFSVDZ', // no_caps 47 | 'G0D7SCFHT', // scrubs_and_shitlords 48 | 'G0J2KRB5G', // tlos 49 | 'G051AHKS2', // cva_at 50 | 'G2GT3FJAU', // p_capp 51 | ], 52 | 53 | ]; 54 | -------------------------------------------------------------------------------- /app/Console/Commands/ManageChannels.php: -------------------------------------------------------------------------------- 1 | manageChannel($channel); 44 | } 45 | } 46 | 47 | /** 48 | * Get the console command arguments. 49 | * 50 | * @return array 51 | */ 52 | protected function getArguments() 53 | { 54 | return [ 55 | // ['example', InputArgument::REQUIRED, 'An example argument.'], 56 | ]; 57 | } 58 | 59 | /** 60 | * Get the console command options. 61 | * 62 | * @return array 63 | */ 64 | protected function getOptions() 65 | { 66 | return [ 67 | // ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 68 | ]; 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | border-radius: @border-radius-base; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | font-size: 90%; 27 | color: @kbd-color; 28 | background-color: @kbd-bg; 29 | border-radius: @border-radius-small; 30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 31 | 32 | kbd { 33 | padding: 0; 34 | font-size: 100%; 35 | font-weight: bold; 36 | box-shadow: none; 37 | } 38 | } 39 | 40 | // Blocks of code 41 | pre { 42 | display: block; 43 | padding: ((@line-height-computed - 1) / 2); 44 | margin: 0 0 (@line-height-computed / 2); 45 | font-size: (@font-size-base - 1); // 14px to 13px 46 | line-height: @line-height-base; 47 | word-break: break-all; 48 | word-wrap: break-word; 49 | color: @pre-color; 50 | background-color: @pre-bg; 51 | border: 1px solid @pre-border-color; 52 | border-radius: @border-radius-base; 53 | 54 | // Account for some code outputs that place code tags in pre tags 55 | code { 56 | padding: 0; 57 | font-size: inherit; 58 | color: inherit; 59 | white-space: pre-wrap; 60 | background-color: transparent; 61 | border-radius: 0; 62 | } 63 | } 64 | 65 | // Enable scrollable blocks of code 66 | .pre-scrollable { 67 | max-height: @pre-scrollable-max-height; 68 | overflow-y: scroll; 69 | } 70 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'null'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Broadcast Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may define all of the broadcast connections that will be used 26 | | to broadcast events to other systems or over websockets. Samples of 27 | | each available type of connection are provided inside this array. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'pusher' => [ 34 | 'driver' => 'pusher', 35 | 'key' => env('PUSHER_KEY'), 36 | 'secret' => env('PUSHER_SECRET'), 37 | 'app_id' => env('PUSHER_APP_ID'), 38 | 'options' => [ 39 | // 40 | ], 41 | ], 42 | 43 | 'redis' => [ 44 | 'driver' => 'redis', 45 | 'connection' => 'default', 46 | ], 47 | 48 | 'log' => [ 49 | 'driver' => 'log', 50 | ], 51 | 52 | 'null' => [ 53 | 'driver' => 'null', 54 | ], 55 | 56 | ], 57 | 58 | ]; -------------------------------------------------------------------------------- /app/Console/Commands/TrollPunkslap.php: -------------------------------------------------------------------------------- 1 | '#p-drama', 42 | 'username' => config('pingbot.ping-bot-name'), 43 | 'icon_emoji' => config('pingbot.ping-bot-emoji'), 44 | 'text' => 'HAPPY BIRTHDAY @punkslap', 45 | 'link_names' => 1, 46 | ]; 47 | $slackMonkey->sendMessageToServer($payload); 48 | } 49 | 50 | /** 51 | * Get the console command arguments. 52 | * 53 | * @return array 54 | */ 55 | protected function getArguments() 56 | { 57 | return [ 58 | // ['example', InputArgument::REQUIRED, 'An example argument.'], 59 | ]; 60 | } 61 | 62 | /** 63 | * Get the console command options. 64 | * 65 | * @return array 66 | */ 67 | protected function getOptions() 68 | { 69 | return [ 70 | // ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 71 | ]; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /app/Http/Middleware/MustBeAdmin.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 24 | } 25 | 26 | /** 27 | * Handle an incoming request. 28 | * 29 | * @param \Illuminate\Http\Request $request 30 | * @param \Closure $next 31 | * @return mixed 32 | */ 33 | public function handle($request, Closure $next) 34 | { 35 | if ($this->auth->guest()) { 36 | if ($request->ajax()) { 37 | return response('Unauthorized.', 401); 38 | } else { 39 | return redirect('/home')->with('auth_message', 'Must be logged in.'); 40 | } 41 | } 42 | /** @var \JamylBot\User $user */ 43 | $user = $this->auth->user(); 44 | if ($user->admin) { 45 | return $next($request); 46 | } 47 | $groupId = $request->groupId ? $request->groupId : $request->group; 48 | if ($groupId) { 49 | /** @var Group $group */ 50 | $group = Group::find($groupId); 51 | if ($group->isOwner($user->id)) { 52 | return $next($request); 53 | } 54 | } 55 | 56 | if ($request->ajax()) { 57 | return response('Unauthorized.', 401); 58 | } else { 59 | return redirect('/home')->with('auth_message', 'Access Denied'); 60 | } 61 | 62 | 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | 'Illuminate\Contracts\Http\Kernel', 31 | 'JamylBot\Http\Kernel' 32 | ); 33 | 34 | $app->singleton( 35 | 'Illuminate\Contracts\Console\Kernel', 36 | 'JamylBot\Console\Kernel' 37 | ); 38 | 39 | $app->singleton( 40 | 'Illuminate\Contracts\Debug\ExceptionHandler', 41 | 'JamylBot\Exceptions\Handler' 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make('Illuminate\Contracts\Console\Kernel'); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | // Provide class for links that match alerts 22 | .alert-link { 23 | font-weight: @alert-link-font-weight; 24 | } 25 | 26 | // Improve alignment and spacing of inner content 27 | > p, 28 | > ul { 29 | margin-bottom: 0; 30 | } 31 | > p + p { 32 | margin-top: 5px; 33 | } 34 | } 35 | 36 | // Dismissible alerts 37 | // 38 | // Expand the right padding and account for the close button's positioning. 39 | 40 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. 41 | .alert-dismissible { 42 | padding-right: (@alert-padding + 20); 43 | 44 | // Adjust close link position 45 | .close { 46 | position: relative; 47 | top: -2px; 48 | right: -21px; 49 | color: inherit; 50 | } 51 | } 52 | 53 | // Alternate styles 54 | // 55 | // Generate contextual modifier classes for colorizing the alert. 56 | 57 | .alert-success { 58 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 59 | } 60 | .alert-info { 61 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 62 | } 63 | .alert-warning { 64 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 65 | } 66 | .alert-danger { 67 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 68 | } 69 | -------------------------------------------------------------------------------- /app/Killbot/zkillMonkey.php: -------------------------------------------------------------------------------- 1 | guzzle = new Client([ 31 | 'base_uri' => config('killbot.base_url'), 32 | 'headers' => ['Accept-Encoding' => 'gzip'], 33 | ]); 34 | } 35 | 36 | /** 37 | * Requests a JSON payload of kills from zKillboard 38 | * 39 | * @param fetchMod Fetch modifier to use for the zKill kill API [https://github.com/zKillboard/zKillboard/wiki/API-(Killmails)#fetch-modifiers] 40 | * @param fetchID Fetch modifer value e.g corporation ID number 41 | * @param afterID Fetch kills after this kill ID 42 | * 43 | * @returns JSON obj of kill data 44 | */ 45 | public function pullKills($fetchMod, $fetchID, $afterID = null) 46 | { 47 | $reqUrl = $fetchMod.'/'.$fetchID.'/'; 48 | $reqUrl .= $afterID ? 'afterKillID/'.$afterID.'/' : ''; 49 | $reqUrl .= 'orderDirection/desc/no-items/'; 50 | $response = $this->guzzle->get($reqUrl); 51 | if ( $response->getStatusCode() != 200 ) { 52 | \Log::warning("Zkill returned HTTP status code: ".$response->getStatusCode()." when requesting kills for ".$fetchMod." - ".$fetchID); 53 | } 54 | 55 | return json_decode($response->getBody(), true); 56 | } 57 | 58 | public function pullCorpKills($corpId, $after = null) 59 | { 60 | return $this->pullKills('corporationID',$corpId, $after); 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /app/Console/Commands/UpdateUserGroups.php: -------------------------------------------------------------------------------- 1 | getCorps())) { 45 | if ($group->hasCorp($user->corp_id)) { 46 | if(!$group->users()->find($user->id)) { 47 | $group->users()->attach($user); 48 | } 49 | } else { 50 | $group->users()->detach($user); 51 | } 52 | $group->save(); 53 | } 54 | } 55 | } 56 | } 57 | 58 | protected function getArguments() 59 | { 60 | return parent::getArguments(); // TODO: Change the autogenerated stub 61 | } 62 | 63 | /** 64 | * Get the console command options. 65 | * 66 | * @return array 67 | */ 68 | protected function getOptions() 69 | { 70 | return [ 71 | // ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 72 | ]; 73 | } 74 | 75 | } -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | /* 10 | |-------------------------------------------------------------------------- 11 | | Register The Auto Loader 12 | |-------------------------------------------------------------------------- 13 | | 14 | | Composer provides a convenient, automatically generated class loader for 15 | | our application. We just need to utilize it! We'll simply require it 16 | | into the script here so that we don't have to worry about manual 17 | | loading any of our classes later on. It feels nice to relax. 18 | | 19 | */ 20 | 21 | require __DIR__.'/../bootstrap/autoload.php'; 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Turn On The Lights 26 | |-------------------------------------------------------------------------- 27 | | 28 | | We need to illuminate PHP development, so let us turn on the lights. 29 | | This bootstraps the framework and gets it ready for use, then it 30 | | will load up this application so that we can run it and send 31 | | the responses back to the browser and delight our users. 32 | | 33 | */ 34 | 35 | $app = require_once __DIR__.'/../bootstrap/app.php'; 36 | 37 | /* 38 | |-------------------------------------------------------------------------- 39 | | Run The Application 40 | |-------------------------------------------------------------------------- 41 | | 42 | | Once we have the application, we can handle the incoming request 43 | | through the kernel, and send the associated response back to 44 | | the client's browser allowing them to enjoy the creative 45 | | and wonderful application we have prepared for them. 46 | | 47 | */ 48 | 49 | $kernel = $app->make('Illuminate\Contracts\Http\Kernel'); 50 | 51 | $response = $kernel->handle( 52 | $request = Illuminate\Http\Request::capture() 53 | ); 54 | 55 | $response->send(); 56 | 57 | $kernel->terminate($request, $response); 58 | -------------------------------------------------------------------------------- /resources/views/auth/reset.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Reset Password
9 |
10 | @if (count($errors) > 0) 11 |
12 | Whoops! There were some problems with your input.

13 |
    14 | @foreach ($errors->all() as $error) 15 |
  • {{ $error }}
  • 16 | @endforeach 17 |
18 |
19 | @endif 20 | 21 |
22 | 23 | 24 | 25 |
26 | 27 |
28 | 29 |
30 |
31 | 32 |
33 | 34 |
35 | 36 |
37 |
38 | 39 |
40 | 41 |
42 | 43 |
44 |
45 | 46 |
47 |
48 | 51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | @endsection 60 | -------------------------------------------------------------------------------- /resources/views/auth/login.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Login
9 |
10 | @if (count($errors) > 0) 11 |
12 | Whoops! There were some problems with your input.

13 |
    14 | @foreach ($errors->all() as $error) 15 |
  • {{ $error }}
  • 16 | @endforeach 17 |
18 |
19 | @endif 20 | 21 |
22 | 23 | 24 |
25 | 26 |
27 | 28 |
29 |
30 | 31 |
32 | 33 |
34 | 35 |
36 |
37 | 38 |
39 |
40 |
41 | 44 |
45 |
46 |
47 | 48 |
49 |
50 | 51 | 52 | Forgot Your Password? 53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | @endsection 62 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 33 | $this->mapWebRoutes(); 34 | // 35 | } 36 | /** 37 | * Define the "web" routes for the application. 38 | * 39 | * These routes all receive session state, CSRF protection, etc. 40 | * 41 | * @return void 42 | */ 43 | protected function mapWebRoutes() 44 | { 45 | Route::group([ 46 | 'middleware' => 'web', 47 | 'namespace' => $this->namespace, 48 | ], function ($router) { 49 | //require app_path('Http/routes.php'); 50 | require base_path('routes/web.php'); 51 | }); 52 | } 53 | /** 54 | * Define the "api" routes for the application. 55 | * 56 | * These routes are typically stateless. 57 | * 58 | * @return void 59 | */ 60 | protected function mapApiRoutes() 61 | { 62 | Route::group([ 63 | 'middleware' => 'api', 64 | 'namespace' => $this->namespace, 65 | 'prefix' => 'api', 66 | ], function ($router) { 67 | require base_path('routes/api.php'); 68 | }); 69 | } 70 | } -------------------------------------------------------------------------------- /resources/views/admin/groups/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
All Groups
9 |
10 | New 11 | @if (count($groups)) 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | @foreach ($groups as $group) 22 | 23 | 24 | 25 | 26 | 31 | 32 | @endforeach 33 |
IdNameOwnersChannels
{{ $group->id }}{{ $group->name }}{{ $group->owners }} 27 | @foreach ($group->channels as $channel) 28 |
{{ $channel->name }}
29 | @endforeach 30 |
34 | @else 35 |

No groups to display.

36 | @endif 37 |
38 |
39 |
40 |
41 |
42 | @endsection 43 | -------------------------------------------------------------------------------- /config/pingbot_template.php: -------------------------------------------------------------------------------- 1 | '', 15 | 'api-token' => env('SLACK_API_TOKEN'), 16 | 17 | 'post-url' => env('SLACK_POST_URL'), 18 | 19 | 'command-hash' => env('PING_TOKEN'), 20 | 21 | 'ping-allowed-channels' => [ 22 | 'G04G7KMFM', // p_fc_chat (Specific to a given slack team) 23 | 'G04HPDE74', // cap_fcs 24 | ], 25 | 'ping-announce-channel' => 'p_fc_chat', 26 | 27 | 'ping-bot-name' => 'Ghost of Empress Jamyl', 28 | 'ping-bot-emoji' => ':jamyl:', 29 | 30 | 'ping-bots' => [ 31 | 'fc' => [ 32 | 'destination' => 'p_fc_pings', 33 | 'title' => 'FC Group Ping', 34 | 'pre-text' => "", 35 | 'color' => 'warning', 36 | 'announce' => false 37 | ], 38 | 'test' => [ 39 | 'destination' => 'api_test', 40 | 'title' => ':bridge: Titan Ping', 41 | 'pre-text' => "A member of the FC team has sent the following message:\n", 42 | 'color' => 'good', 43 | 'announce' => false 44 | ], 45 | 'all' => [ 46 | 'destination' => '#p-fleet', 47 | 'title' => 'Ping', 48 | 'pre-text' => "", 49 | 'color' => '#439FE0', 50 | 'announce' => false 51 | ], 52 | ], 53 | 54 | 'help-text' => "The ping bot is now multi-function!\n" 55 | ."Usage: /ping [message]\n" 56 | ."Available types:\n" 57 | ."all - Sends ping to chatadel, goes to all registered users.\n" 58 | ."register - sets how your name will appear (/ping register Ortho Less) for example\n" 59 | ."fc - Sends ping to p_fc_pings.", 60 | 61 | ]; 62 | -------------------------------------------------------------------------------- /app/Console/Commands/ManuallyAddUser.php: -------------------------------------------------------------------------------- 1 | $this->argument('char_id'), 44 | 'char_name' => $api->getCharName($this->argument('char_id')), 45 | 'email' => $this->argument('email'), 46 | 'password' => Userbot::generatePassword(16), 47 | 'next_check'=> \Carbon\Carbon::now('UTC'), 48 | ]); 49 | $userbot->updateSingle($user->char_id); 50 | $userbot->linkSlackMembers(); 51 | $user->save(); 52 | $this->info('User created and API work done.'); 53 | } 54 | 55 | /** 56 | * Get the console command arguments. 57 | * 58 | * @return array 59 | */ 60 | protected function getArguments() 61 | { 62 | return [ 63 | ['char_id', InputArgument::REQUIRED, 'EVE Character ID'], 64 | ['email', InputArgument::REQUIRED, 'Email registered on slack'], 65 | ]; 66 | } 67 | 68 | /** 69 | * Get the console command options. 70 | * 71 | * @return array 72 | */ 73 | protected function getOptions() 74 | { 75 | return [ 76 | // ['example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null], 77 | ]; 78 | } 79 | 80 | } 81 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Cache Stores 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the cache "stores" for your application as 24 | | well as their drivers. You may even define multiple stores for the 25 | | same cache driver to group types of items stored in your caches. 26 | | 27 | */ 28 | 29 | 'stores' => [ 30 | 31 | 'apc' => [ 32 | 'driver' => 'apc' 33 | ], 34 | 35 | 'array' => [ 36 | 'driver' => 'array' 37 | ], 38 | 39 | 'database' => [ 40 | 'driver' => 'database', 41 | 'table' => 'cache', 42 | 'connection' => null, 43 | ], 44 | 45 | 'file' => [ 46 | 'driver' => 'file', 47 | 'path' => storage_path().'/framework/cache', 48 | ], 49 | 50 | 'memcached' => [ 51 | 'driver' => 'memcached', 52 | 'servers' => [ 53 | [ 54 | 'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100 55 | ], 56 | ], 57 | ], 58 | 59 | 'redis' => [ 60 | 'driver' => 'redis', 61 | 'connection' => 'default', 62 | ], 63 | 64 | ], 65 | 66 | /* 67 | |-------------------------------------------------------------------------- 68 | | Cache Key Prefix 69 | |-------------------------------------------------------------------------- 70 | | 71 | | When utilizing a RAM based store such as APC or Memcached, there might 72 | | be other applications utilizing the same cache. So, we'll specify a 73 | | value to get prefixed to all our keys so we can avoid collisions. 74 | | 75 | */ 76 | 77 | 'prefix' => 'laravel', 78 | 79 | ]; 80 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Default Cloud Filesystem Disk 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Many applications store files both locally and in the cloud. For this 26 | | reason, you may specify a default "cloud" driver here. This driver 27 | | will be bound as the Cloud disk implementation in the container. 28 | | 29 | */ 30 | 31 | 'cloud' => 's3', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Filesystem Disks 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here you may configure as many filesystem "disks" as you wish, and you 39 | | may even configure multiple disks of the same driver. Defaults have 40 | | been setup for each driver as an example of the required options. 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path().'/app', 49 | ], 50 | 51 | 's3' => [ 52 | 'driver' => 's3', 53 | 'key' => 'your-key', 54 | 'secret' => 'your-secret', 55 | 'region' => 'your-region', 56 | 'bucket' => 'your-bucket', 57 | ], 58 | 59 | 'rackspace' => [ 60 | 'driver' => 'rackspace', 61 | 'username' => 'your-username', 62 | 'key' => 'your-key', 63 | 'container' => 'your-container', 64 | 'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/', 65 | 'region' => 'IAD', 66 | 'url_type' => 'publicURL' 67 | ], 68 | 69 | ], 70 | 71 | ]; 72 | -------------------------------------------------------------------------------- /resources/views/auth/register.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
Register
9 |
10 | @if (count($errors) > 0) 11 |
12 | Whoops! There were some problems with your input.

13 |
    14 | @foreach ($errors->all() as $error) 15 |
  • {{ $error }}
  • 16 | @endforeach 17 |
18 |
19 | @endif 20 | 21 |
22 | 23 | 24 |
25 | 26 |
27 | 28 |
29 |
30 | 31 |
32 | 33 |
34 | 35 |
36 |
37 | 38 |
39 | 40 |
41 | 42 |
43 |
44 | 45 |
46 | 47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | @endsection 66 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/progress-bars.less: -------------------------------------------------------------------------------- 1 | // 2 | // Progress bars 3 | // -------------------------------------------------- 4 | 5 | 6 | // Bar animations 7 | // ------------------------- 8 | 9 | // WebKit 10 | @-webkit-keyframes progress-bar-stripes { 11 | from { background-position: 40px 0; } 12 | to { background-position: 0 0; } 13 | } 14 | 15 | // Spec and IE10+ 16 | @keyframes progress-bar-stripes { 17 | from { background-position: 40px 0; } 18 | to { background-position: 0 0; } 19 | } 20 | 21 | 22 | // Bar itself 23 | // ------------------------- 24 | 25 | // Outer container 26 | .progress { 27 | overflow: hidden; 28 | height: @line-height-computed; 29 | margin-bottom: @line-height-computed; 30 | background-color: @progress-bg; 31 | border-radius: @progress-border-radius; 32 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); 33 | } 34 | 35 | // Bar of progress 36 | .progress-bar { 37 | float: left; 38 | width: 0%; 39 | height: 100%; 40 | font-size: @font-size-small; 41 | line-height: @line-height-computed; 42 | color: @progress-bar-color; 43 | text-align: center; 44 | background-color: @progress-bar-bg; 45 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); 46 | .transition(width .6s ease); 47 | } 48 | 49 | // Striped bars 50 | // 51 | // `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the 52 | // `.progress-bar-striped` class, which you just add to an existing 53 | // `.progress-bar`. 54 | .progress-striped .progress-bar, 55 | .progress-bar-striped { 56 | #gradient > .striped(); 57 | background-size: 40px 40px; 58 | } 59 | 60 | // Call animation for the active one 61 | // 62 | // `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the 63 | // `.progress-bar.active` approach. 64 | .progress.active .progress-bar, 65 | .progress-bar.active { 66 | .animation(progress-bar-stripes 2s linear infinite); 67 | } 68 | 69 | 70 | // Variations 71 | // ------------------------- 72 | 73 | .progress-bar-success { 74 | .progress-bar-variant(@progress-bar-success-bg); 75 | } 76 | 77 | .progress-bar-info { 78 | .progress-bar-variant(@progress-bar-info-bg); 79 | } 80 | 81 | .progress-bar-warning { 82 | .progress-bar-variant(@progress-bar-warning-bg); 83 | } 84 | 85 | .progress-bar-danger { 86 | .progress-bar-variant(@progress-bar-danger-bg); 87 | } 88 | -------------------------------------------------------------------------------- /resources/views/admin/users/index.blade.php: -------------------------------------------------------------------------------- 1 | @extends('app') 2 | 3 | @section('content') 4 |
5 |
6 |
7 |
8 |
{{ $title }}
9 |
10 | @if (count($users)) 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | @foreach ($users as $user) 22 | 23 | 24 | 25 | 26 | 27 | 35 | 36 | @endforeach 37 |
IdChar nameEmailSlack Name 
{{ $user->id }}{{ $user->char_name }}{{ $user->email }}{{ $user->slack_name }} 28 | @unless ($user->admin) 29 | {!! Form::open(['action' => ['UserController@deleteIndex'], 'method' => 'delete']) !!} 30 | {!! Form::hidden('user_id', $user->id) !!} 31 | {!! Form::submit('Delete') !!} 32 | {!! Form::close() !!} 33 | @endunless 34 |
38 | @else 39 |

No users to display.

40 | @endif 41 |
42 |
43 |
44 |
45 |
46 | @endsection 47 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/pagination.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | .pagination { 5 | display: inline-block; 6 | padding-left: 0; 7 | margin: @line-height-computed 0; 8 | border-radius: @border-radius-base; 9 | 10 | > li { 11 | display: inline; // Remove list-style and block-level defaults 12 | > a, 13 | > span { 14 | position: relative; 15 | float: left; // Collapse white-space 16 | padding: @padding-base-vertical @padding-base-horizontal; 17 | line-height: @line-height-base; 18 | text-decoration: none; 19 | color: @pagination-color; 20 | background-color: @pagination-bg; 21 | border: 1px solid @pagination-border; 22 | margin-left: -1px; 23 | } 24 | &:first-child { 25 | > a, 26 | > span { 27 | margin-left: 0; 28 | .border-left-radius(@border-radius-base); 29 | } 30 | } 31 | &:last-child { 32 | > a, 33 | > span { 34 | .border-right-radius(@border-radius-base); 35 | } 36 | } 37 | } 38 | 39 | > li > a, 40 | > li > span { 41 | &:hover, 42 | &:focus { 43 | color: @pagination-hover-color; 44 | background-color: @pagination-hover-bg; 45 | border-color: @pagination-hover-border; 46 | } 47 | } 48 | 49 | > .active > a, 50 | > .active > span { 51 | &, 52 | &:hover, 53 | &:focus { 54 | z-index: 2; 55 | color: @pagination-active-color; 56 | background-color: @pagination-active-bg; 57 | border-color: @pagination-active-border; 58 | cursor: default; 59 | } 60 | } 61 | 62 | > .disabled { 63 | > span, 64 | > span:hover, 65 | > span:focus, 66 | > a, 67 | > a:hover, 68 | > a:focus { 69 | color: @pagination-disabled-color; 70 | background-color: @pagination-disabled-bg; 71 | border-color: @pagination-disabled-border; 72 | cursor: @cursor-disabled; 73 | } 74 | } 75 | } 76 | 77 | // Sizing 78 | // -------------------------------------------------- 79 | 80 | // Large 81 | .pagination-lg { 82 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); 83 | } 84 | 85 | // Small 86 | .pagination-sm { 87 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); 88 | } 89 | -------------------------------------------------------------------------------- /app/Group.php: -------------------------------------------------------------------------------- 1 | belongsToMany('JamylBot\User'); 12 | } 13 | 14 | public function channels() 15 | { 16 | return $this->belongsToMany('JamylBot\Channel'); 17 | } 18 | 19 | public function getOwners() 20 | { 21 | return explode(',', $this->owners); 22 | } 23 | 24 | public function setOwners($ownersArray) 25 | { 26 | $this->owners = implode(',', $ownersArray); 27 | $this->save(); 28 | } 29 | 30 | /** 31 | * @param int $newOwner 32 | */ 33 | public function addOwner($newOwner) 34 | { 35 | $owners = $this->getOwners(); 36 | $owners[] = $newOwner; 37 | $this->owners = implode(',', array_unique($owners)); 38 | $this->save(); 39 | } 40 | 41 | public function removeOwner($owner) 42 | { 43 | $owners = $this->getOwners(); 44 | $owners = array_diff($owners, [$owner]); 45 | $this->setOwners($owners); 46 | } 47 | 48 | public function isOwner($owner) 49 | { 50 | return in_array($owner, $this->getOwners()); 51 | } 52 | 53 | public function isMemberBySlack($slack_id) 54 | { 55 | foreach ($this->users as $user){ 56 | /** @var User $user */ 57 | if ($user->slack_id != null && $user->slack_id == $slack_id && $user->hasAccess()) { 58 | return true; 59 | } 60 | } 61 | return false; 62 | } 63 | 64 | public function getCorps() 65 | { 66 | return array_filter(explode(',', $this->corps)); 67 | } 68 | 69 | public function setCorps($newCorps) 70 | { 71 | $this->corps = implode(',', $newCorps); 72 | $this->save(); 73 | } 74 | 75 | public function addCorp($newCorp) 76 | { 77 | $corps = $this->getCorps(); 78 | $corps[] = $newCorp; 79 | $this->corps = implode(',', array_unique($corps)); 80 | $this->save(); 81 | } 82 | 83 | public function removeCorp($corp) 84 | { 85 | $corps = $this->getCorps(); 86 | $corps = array_diff($corps, [$corp]); 87 | $this->setCorps($corps); 88 | } 89 | 90 | public function hasCorp($corp) 91 | { 92 | return in_array($corp, $this->getCorps()); 93 | } 94 | 95 | } 96 | -------------------------------------------------------------------------------- /app/Http/Controllers/HomeController.php: -------------------------------------------------------------------------------- 1 | middleware('auth'); 33 | $this->userbot = $userbot; 34 | /*$this->middelware(function ($request, $next) { 35 | $this->user = \Auth::user(); 36 | return $next($request); 37 | });*/ 38 | //$this->user = \Auth::user(); 39 | } 40 | 41 | /** 42 | * Show the application dashboard to the user. 43 | * 44 | * @return Response 45 | */ 46 | public function index(Request $request) 47 | { 48 | $this->user = $request->user(); 49 | $groups = []; 50 | /** @var Group $group */ 51 | foreach (Group::all() as $group) { 52 | if ($group->isOwner($this->user->id)) { 53 | $groups[] = $group; 54 | } 55 | } 56 | return view('home', [ 57 | 'name' => $this->user->char_name, 58 | 'avatar' => $this->user->getAvatarUrl(), 59 | 'email' => $this->user->email, 60 | 'slackName' => $this->user->slack_name, 61 | 'status' => $this->user->status, 62 | 'corp' => $this->user->corp_name, 63 | 'alliance' => $this->user->alliance_name, 64 | 'charId' => $this->user->char_id, 65 | 'groups' => $groups, 66 | ]); 67 | } 68 | 69 | public function addEmail(Request $request) 70 | { 71 | $this->user = $request->user(); 72 | $email = $request->input('email'); 73 | $this->userbot->addEmail($this->user, $email); 74 | return redirect('home'); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Queue Connections 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may configure the connection information for each server that 27 | | is used by your application. A default configuration has been added 28 | | for each back-end shipped with Laravel. You are free to add more. 29 | | 30 | */ 31 | 32 | 'connections' => [ 33 | 34 | 'sync' => [ 35 | 'driver' => 'sync', 36 | ], 37 | 38 | 'database' => [ 39 | 'driver' => 'database', 40 | 'table' => 'jobs', 41 | 'queue' => 'default', 42 | 'retry_after' => 60, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'retry_after' => 60, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => 'your-public-key', 55 | 'secret' => 'your-secret-key', 56 | 'queue' => 'your-queue-url', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'iron' => [ 61 | 'driver' => 'iron', 62 | 'host' => 'mq-aws-us-east-1.iron.io', 63 | 'token' => 'your-token', 64 | 'project' => 'your-project-id', 65 | 'queue' => 'your-queue-name', 66 | 'encrypt' => true, 67 | ], 68 | 69 | 'redis' => [ 70 | 'driver' => 'redis', 71 | 'queue' => 'default', 72 | 'retry_after' => 60, 73 | ], 74 | 75 | ], 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Failed Queue Jobs 80 | |-------------------------------------------------------------------------- 81 | | 82 | | These options configure the behavior of failed queue job logging so you 83 | | can control which database and table are used to store the jobs that 84 | | have failed. You may change them to any database / table you wish. 85 | | 86 | */ 87 | 88 | 'failed' => [ 89 | 'database' => 'mysql', 'table' => 'failed_jobs', 90 | ], 91 | 92 | ]; 93 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/print.less: -------------------------------------------------------------------------------- 1 | /*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ 2 | 3 | // ========================================================================== 4 | // Print styles. 5 | // Inlined to avoid the additional HTTP request: h5bp.com/r 6 | // ========================================================================== 7 | 8 | @media print { 9 | *, 10 | *:before, 11 | *:after { 12 | background: transparent !important; 13 | color: #000 !important; // Black prints faster: h5bp.com/s 14 | box-shadow: none !important; 15 | text-shadow: none !important; 16 | } 17 | 18 | a, 19 | a:visited { 20 | text-decoration: underline; 21 | } 22 | 23 | a[href]:after { 24 | content: " (" attr(href) ")"; 25 | } 26 | 27 | abbr[title]:after { 28 | content: " (" attr(title) ")"; 29 | } 30 | 31 | // Don't show links that are fragment identifiers, 32 | // or use the `javascript:` pseudo protocol 33 | a[href^="#"]:after, 34 | a[href^="javascript:"]:after { 35 | content: ""; 36 | } 37 | 38 | pre, 39 | blockquote { 40 | border: 1px solid #999; 41 | page-break-inside: avoid; 42 | } 43 | 44 | thead { 45 | display: table-header-group; // h5bp.com/t 46 | } 47 | 48 | tr, 49 | img { 50 | page-break-inside: avoid; 51 | } 52 | 53 | img { 54 | max-width: 100% !important; 55 | } 56 | 57 | p, 58 | h2, 59 | h3 { 60 | orphans: 3; 61 | widows: 3; 62 | } 63 | 64 | h2, 65 | h3 { 66 | page-break-after: avoid; 67 | } 68 | 69 | // Bootstrap specific changes start 70 | // 71 | // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245 72 | // Once fixed, we can just straight up remove this. 73 | select { 74 | background: #fff !important; 75 | } 76 | 77 | // Bootstrap components 78 | .navbar { 79 | display: none; 80 | } 81 | .btn, 82 | .dropup > .btn { 83 | > .caret { 84 | border-top-color: #000 !important; 85 | } 86 | } 87 | .label { 88 | border: 1px solid #000; 89 | } 90 | 91 | .table { 92 | border-collapse: collapse !important; 93 | 94 | td, 95 | th { 96 | background-color: #fff !important; 97 | } 98 | } 99 | .table-bordered { 100 | th, 101 | td { 102 | border: 1px solid #ddd !important; 103 | } 104 | } 105 | 106 | // Bootstrap specific changes end 107 | } 108 | -------------------------------------------------------------------------------- /app/Http/Controllers/CommandController.php: -------------------------------------------------------------------------------- 1 | requestVars = $request->all(); 19 | $this->slack = $slack; 20 | } 21 | 22 | /** 23 | * Return a link to the users character portrait. 24 | * 25 | * @return Response 26 | */ 27 | public function getPortrait() 28 | { 29 | if (!$this->checkToken()) { 30 | return 'Authentication error'; 31 | } 32 | try { 33 | $user = User::findBySlack($this->requestVars['user_id']); 34 | } catch (ModelNotFoundException $e) { 35 | return 'User not found. Did you register on the management system yet? If so, try again in 5 minutes, or type /register then try again.'; 36 | } 37 | if (in_array($this->requestVars['text'], config('eve.avatar_sizes'))){ 38 | $suffix = '_'.$this->requestVars['text'].'.jpg'; 39 | } else { 40 | $suffix = '_512.jpg'; 41 | } 42 | $link = config('eve.avatar_url').$user->char_id.$suffix; 43 | $payload = [ 44 | 'channel' => '@'.$this->requestVars['user_name'], 45 | 'username' => config('pingbot.ping-bot-name'), 46 | 'icon_emoji' => config('pingbot.ping-bot-emoji'), 47 | 'text' => $link, 48 | ]; 49 | $this->slack->sendMessageToServer($payload); 50 | return "Portrait link sent to slackbot DM channel \n".$link; 51 | } 52 | 53 | protected function punkBirthday() 54 | { 55 | $payload = [ 56 | 'channel' => '#p-drama', 57 | 'username' => config('pingbot.ping-bot-name'), 58 | 'icon_emoji' => config('pingbot.ping-bot-emoji'), 59 | 'text' => 'HAPPY BIRTHDAY @punkslap', 60 | 'link_names' => 1, 61 | ]; 62 | $this->slack->sendMessageToServer($payload); 63 | return "Punk'd"; 64 | } 65 | 66 | public function chooseCommand() 67 | { 68 | if (!$this->checkToken()) { 69 | return 'Authentication error'; 70 | } 71 | switch ($this->requestVars['command']) { 72 | case '/punk': 73 | return $this->punkBirthday(); 74 | default: 75 | return 'Unknown command'; 76 | } 77 | } 78 | 79 | /** 80 | * @return bool 81 | */ 82 | protected function checkToken() 83 | { 84 | return $this->requestVars['token'] == config('slack.command-tokens.'.$this->requestVars['command']); 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /resources/views/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | JamylBot 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 23 | 24 | 61 | 62 | @yield('content') 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /resources/assets/less/bootstrap/mixins/forms.less: -------------------------------------------------------------------------------- 1 | // Form validation states 2 | // 3 | // Used in forms.less to generate the form validation CSS for warnings, errors, 4 | // and successes. 5 | 6 | .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) { 7 | // Color the label and help text 8 | .help-block, 9 | .control-label, 10 | .radio, 11 | .checkbox, 12 | .radio-inline, 13 | .checkbox-inline, 14 | &.radio label, 15 | &.checkbox label, 16 | &.radio-inline label, 17 | &.checkbox-inline label { 18 | color: @text-color; 19 | } 20 | // Set the border and box shadow on specific inputs to match 21 | .form-control { 22 | border-color: @border-color; 23 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work 24 | &:focus { 25 | border-color: darken(@border-color, 10%); 26 | @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%); 27 | .box-shadow(@shadow); 28 | } 29 | } 30 | // Set validation states also for addons 31 | .input-group-addon { 32 | color: @text-color; 33 | border-color: @border-color; 34 | background-color: @background-color; 35 | } 36 | // Optional feedback icon 37 | .form-control-feedback { 38 | color: @text-color; 39 | } 40 | } 41 | 42 | 43 | // Form control focus state 44 | // 45 | // Generate a customized focus state and for any input with the specified color, 46 | // which defaults to the `@input-border-focus` variable. 47 | // 48 | // We highly encourage you to not customize the default value, but instead use 49 | // this to tweak colors on an as-needed basis. This aesthetic change is based on 50 | // WebKit's default styles, but applicable to a wider range of browsers. Its 51 | // usability and accessibility should be taken into account with any change. 52 | // 53 | // Example usage: change the default blue border and shadow to white for better 54 | // contrast against a dark gray background. 55 | .form-control-focus(@color: @input-border-focus) { 56 | @color-rgba: rgba(red(@color), green(@color), blue(@color), .6); 57 | &:focus { 58 | border-color: @color; 59 | outline: 0; 60 | .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}"); 61 | } 62 | } 63 | 64 | // Form control sizing 65 | // 66 | // Relative text size, padding, and border-radii changes for form controls. For 67 | // horizontal sizing, wrap controls in the predefined grid classes. `