Skip to content

Commit

Permalink
v2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavius12 committed Sep 2, 2015
1 parent 035977e commit 52da824
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ServerAuth/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ServerAuth
main: ServerAuth\ServerAuth
version: "2.10"
version: "2.11"
api: [1.11.0]
load: STARTUP
author: EvolSoft
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/ChangePassword.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 10:27 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/Commands.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 10:31 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/Login.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.00) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 10:48 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/Logout.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 10:56 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/Register.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 11:03 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Commands/Unregister.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 11:09 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/EventListener.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 05:39 PM (UTC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 10/05/2015 02:17 PM (UTC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 10/05/2015 02:19 PM (UTC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 10/05/2015 02:22 PM (UTC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 10/05/2015 02:22 PM (UTC)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 12:49 AM (UTC)
Expand Down
19 changes: 17 additions & 2 deletions ServerAuth/src/ServerAuth/ServerAuth.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 31/08/2015 05:26 PM (UTC)
Expand All @@ -28,7 +28,7 @@ class ServerAuth extends PluginBase {
const PRODUCER = "EvolSoft";

/** @var string VERSION Plugin version */
const VERSION = "2.10";
const VERSION = "2.11";

/** @var string MAIN_WEBSITE Plugin producer website */
const MAIN_WEBSITE = "http://www.evolsoft.tk";
Expand Down Expand Up @@ -701,8 +701,23 @@ public function authenticatePlayer(Player $player, $password, $hash = true){
$data->set("lastlogin", $player->getLastPlayed());
$data->save();
$this->auth_users[strtolower($player->getName())] = "";
if($cfg['login']['enable-failed-logins-kick'] && isset($this->auth_attempts[strtolower($player->getName())])){
unset($this->auth_attempts[strtolower($player->getName())]);
}
return ServerAuth::SUCCESS;
}else{
if($cfg['login']['enable-failed-logins-kick']){
if(isset($this->auth_attempts[strtolower($player->getName())])){
$this->auth_attempts[strtolower($player->getName())]++;
}else{
$this->auth_attempts[strtolower($player->getName())] = 1;
}
if($this->auth_attempts[strtolower($player->getName())] >= $cfg['login']['max-login-attempts']){
$player->close("", $this->translateColors("&", ServerAuth::getAPI()->getConfigLanguage()->getAll()["login"]["too-many-attempts"]));
unset($this->auth_attempts[strtolower($player->getName())]);
return ServerAuth::TOO_MANY_ATTEMPTS;
}
}
return ServerAuth::ERR_WRONG_PASSWORD;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Tasks/MessageTask.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 30/08/2015 11:29 AM (UTC)
Expand Down
2 changes: 1 addition & 1 deletion ServerAuth/src/ServerAuth/Tasks/MySQLTask.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/*
* ServerAuth (v2.10) by EvolSoft
* ServerAuth (v2.11) by EvolSoft
* Developer: EvolSoft (Flavius12)
* Website: http://www.evolsoft.tk
* Date: 14/05/2015 05:19 PM (UTC)
Expand Down

0 comments on commit 52da824

Please sign in to comment.