/**
  * @return User logged in user
  */
 private function userCheck()
 {
     $user = null;
     if (function_exists("terminalAuth")) {
         $user = terminalAuth();
     }
     if ($user == null) {
         throw new Exception("You're not logged in.");
     }
     return $user;
 }
 public function plugin($plugin = null, $command = null, $pluginargs = null)
 {
     $user = terminalAuth();
     if ($plugin == null || $command == null || ($pluginargs = null)) {
         throw new Exception("You're missing some arguments!");
     }
 }