/** * admin-simple.sp * Reads the admins.cfg file. Do not compile this directly. * This file is part of SourceMod, Copyright (C) 2004-2007 AlliedModders LLC * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program 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 this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Version: $Id$ */ public ReadSimpleUsers() { BuildPath(Path_SM, g_Filename, sizeof(g_Filename), "configs/admins_simple.ini"); new Handle:file = OpenFile(g_Filename, "rt"); if (file == INVALID_HANDLE) { ParseError("Could not open file!"); return; } while (!IsEndOfFile(file)) { decl String:line[255]; if (!ReadFileLine(file, line, sizeof(line))) { break; } /* Trim comments */ new len = strlen(line); new bool:ignoring = false; for (new i=0; i