mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-20 04:23:26 +02:00
Merge branch 'develop' into plugin-options
This commit is contained in:
@@ -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
|
||||
|
@@ -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))) {
|
||||
|
Reference in New Issue
Block a user