GlobalBan is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ require_once ROOTDIR . "/include/database/class.BadNameQueries.php"; require_once ROOTDIR . "/include/objects/class.BadName.php"; $lan_file = ROOTDIR . '/languages/' . $LANGUAGE . '/lan_badNames.php'; include file_exists($lan_file) ? $lan_file : ROOTDIR . "/languages/English/lan_badNames.php"; // Only full power admins can access this page if ($fullPower) { $badNameQueries = new BadNameQueries(); // The user is wanting to add a new bad name if (isset($_POST['add'])) { $filter = 0; $kick = 0; if (isset($_POST['kick'])) { $kick = 1; } if (isset($_POST['filter'])) { $filter = 1; } $badNameQueries->addBadName($_POST['badName'], $filter, $kick); } // The user is wanting to delete a badname if (isset($_POST['deleteBadName'])) { $badNameQueries->removeBadName($_POST['idToDelete']);
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ require_once ROOTDIR . "/include/database/class.BadNameQueries.php"; $id = $_GET['id']; $kick = $_GET['kick']; // Switch the current active state to the other state // off becomes on, and on becomes off if ($kick == 0) { $kick = 1; } else { $kick = 0; } $badNameQueries = new BadNameQueries(); // Must be logged in to change the status if ($fullPower) { $badNameQueries->updateBadNameKick($id, $kick); } // Send back the new active state header('Content-Type: text/xml'); header("Cache-Control: no-cache, must-revalidate"); echo "<?xml version=\"1.0\" ?>"; ?> <root> <id><?php echo $id; ?> </id>
require_once ROOTDIR . "/include/database/class.BadNameQueries.php"; require_once ROOTDIR . "/include/database/class.ServerQueries.php"; require_once ROOTDIR . "/include/database/class.ReasonQueries.php"; require_once ROOTDIR . "/include/objects/class.Length.php"; require_once ROOTDIR . "/include/objects/class.Server.php"; $lan_file = ROOTDIR . '/languages/' . $LANGUAGE . '/lan_checkuser.php'; include file_exists($lan_file) ? $lan_file : ROOTDIR . "/languages/English/lan_checkuser.php"; // Get the hash value passed from ES $hash = $_GET['hash']; if ($hash == $config->matchHash) { $steamId = $_GET['steamId']; $serverId = $_GET['sid']; $nameOfBanned = $_GET['name']; $ipOfBanned = $_GET['ip']; $banQueries = new BanQueries(); $badNameQueries = new BadNameQueries(); $kickedByName = false; // Security Fix for Issue 24 $nameOfBanned = str_ireplace(array("\"", "\r\n", "\n", "\r", ";"), "", $nameOfBanned); $messageTOserver = "#multi #lightgreen GB: #green " . $LANCHECKUSER_004 . " #lightgreen " . $nameOfBanned . " #green " . $LANCHECKUSER_005 . " #lightgreen \"" . $steamId . "\" #green !!!"; $namesToKick = $badNameQueries->getKickNames(); // Loop through the names to kick to see if the word exists in the user's name foreach ($namesToKick as $nameToKick) { if (strpos(strtolower($nameOfBanned), $nameToKick->getBadName()) !== false) { kickUser($steamId, $serverId, $LANCHECKUSER_001 . $nameToKick->getBadName() . $LANCHECKUSER_002, $messageTOserver); $kickedByName = true; break; // Break out of the loop } } $kickedByBan = false;
GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GlobalBan. If not, see <http://www.gnu.org/licenses/>. */ require_once ROOTDIR . "/include/database/class.BadNameQueries.php"; $id = $_GET['id']; $filter = $_GET['filter']; // Switch the current active state to the other state // off becomes on, and on becomes off if ($filter == 0) { $filter = 1; } else { $filter = 0; } $badNameQueries = new BadNameQueries(); // Must be logged in to change the status if ($fullPower) { $badNameQueries->updateBadNameFilter($id, $filter); } // Send back the new active state header('Content-Type: text/xml'); header("Cache-Control: no-cache, must-revalidate"); echo "<?xml version=\"1.0\"?>"; ?> <root> <id><?php echo $id; ?> </id> <update><?php