Merge branch 'develop' into plugin-options

This commit is contained in:
slawkens
2020-06-06 08:00:05 +02:00
39 changed files with 426 additions and 794 deletions

View File

@@ -55,7 +55,12 @@ class InvitesDriver implements IOTS_GuildAction
// invites player to current guild
public function addRequest(OTS_Player $player)
{
$this->db->query('INSERT INTO ' . $this->db->tableName('guild_invites') .' (' . $this->db->fieldName('player_id') . ', ' . $this->db->fieldName('guild_id') . ') VALUES ('.$this->db->quote($player->getId()).', '.$this->db->quote($this->guild->id).')');
$extra_keys = $extra_values = '';
if($this->db->hasColumn('guild_invites', 'date')) {
$extra_keys = ', `date`';
$extra_values = ', '.$this->db->quote(time());
}
$this->db->query('INSERT INTO `guild_invites` (`player_id`, `guild_id`' . $extra_keys . ') VALUES ('.$this->db->quote($player->getId()).', '.$this->db->quote($this->guild->id). $extra_values . ')');
}
// un-invites player

View File

@@ -229,7 +229,7 @@ class Validator
$name_lower = strtolower($name);
$first_words_blocked = array('admin ', 'administrator ', 'gm ', 'cm ', 'god ','tutor ');
$first_words_blocked = array('admin ', 'administrator ', 'gm ', 'cm ', 'god ','tutor ', "'", '-');
foreach($first_words_blocked as $word)
{
if($word == substr($name_lower, 0, strlen($word))) {