LeChris
https://habbo.codes/
- Thread starter
- #21
I apologize for this pathetic RevCMS skin,
Updates as of today
-Complete overhaul to CMS to use events system where needed
ie
-Major bug fixes made
-Added my own version of try catch blocks, basically on the event handler for user request, if he doesn't have stats, or something that could cause an error it'll automatically fix it
-Added news commenting
-Added ability to remove news comments as staff
-Fixed session logging
-Ability to remove logged sessions, will check to see if your said user before removal
So forth
Also, effect events has on overall code cleanliness
Updates as of current
-Major progress on housekeeping
Updates as of today
-Complete overhaul to CMS to use events system where needed
ie
PHP:
# User
// Global Check
'UserRunEvents' => [
\App\Events\User\Bonus\GiveShotgun::class,
],
// Ban Check
'RunBanTest' => [
\App\Events\User\Bans\IP::class,
\App\Events\User\Bans\Account::class,
],
// Registration
'PreRegisterCheckup' => [
\App\Events\User\Registration\Accounts::class,
],
'UserWasCreated' => [
\App\Events\User\Registration\User::class,
\App\Events\User\Registration\Stats::class,
],
// Login
'SessionHasStarted' => [
\App\Events\User\Login\Log::class,
\App\Events\User\Login\CheckStats::class,
],
// Failed Login
'LoginHasFailed' => [
\App\Events\User\Login\LogError::class,
],
# Server
// Maintenance Check
'RunMaintenanceCheck' => [
\App\Events\Server\Maintenance::class,
],
-Added my own version of try catch blocks, basically on the event handler for user request, if he doesn't have stats, or something that could cause an error it'll automatically fix it
-Added news commenting
-Added ability to remove news comments as staff
-Fixed session logging
-Ability to remove logged sessions, will check to see if your said user before removal
So forth
You must be registered for see links
Also, effect events has on overall code cleanliness
PHP:
<?php
namespace App\Http\Controllers\Services\Authorization;
use Auth;
use Event;
use Session;
use Redirect;
use Validator;
use Request as R;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class Login extends Controller {
public function commit(Request $r) {
/*
Was the form filled out correctly?
*/
$validator = Validator::make($r->all(), [
'username' => 'required|alpha_dash|exists:users',
'password' => 'required',
]);
/*
Displays an error if the form wasn't filled out right
*/
if ($validator->fails()) {
Session::flash('message', 'Invalid form data');
}
/*
Attempt to login
*/
else {
if (Auth::attempt(array('username' => $r->input('username'), 'password' => $r->input('password'))))
{
Event::fire('SessionHasStarted');
}
else {
Event::fire('LoginHasFailed', $r->input('username'));
}
}
return Redirect::back();
}
}
Updates as of current
-Major progress on housekeeping
- Changed to use events and cleaner controller layout
- Added user management
- Added rank management
- Added business management
- Added weapon management
- Added news management
- Added routing limiting by rank (Limit feature access based on staff rank)
- Added session management (Members can hide sessions, but higher staff can still see in case of abusive actions)
- Added logging (Upper management can only see housekeeping actions, lower staff ranks can view chatlogs)
- Going to add Cerberus management platform to edit routing features (Minimum Rank), and what not for developers (Rank 20