mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 23:31:13 -05:00
Sql syntax fix and onelog fix
This commit is contained in:
@ -292,6 +292,7 @@ namespace SharedLibrary
|
||||
//Returns a list of players matching name parameter, null if no players found matching
|
||||
public List<Player> findPlayers(String name)
|
||||
{
|
||||
name = name.Replace("'", "''");
|
||||
String Query = String.Format("SELECT * FROM CLIENTS WHERE Name LIKE '%{0}%' LIMIT 32", name);
|
||||
DataTable Result = GetDataTable(Query);
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
#define REPZ_BUILD
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
@ -45,8 +46,11 @@ namespace SharedLibrary
|
||||
public static Player.Permission matchPermission(String str)
|
||||
{
|
||||
String lookingFor = str.ToLower();
|
||||
|
||||
#if REPZ_BUILD
|
||||
for (Player.Permission Perm = Player.Permission.User; Perm <= Player.Permission.Owner; Perm++)
|
||||
#else
|
||||
for (Player.Permission Perm = Player.Permission.User; Perm < Player.Permission.Owner; Perm++)
|
||||
#endif
|
||||
{
|
||||
if (lookingFor.Contains(Perm.ToString().ToLower()))
|
||||
return Perm;
|
||||
@ -58,7 +62,7 @@ namespace SharedLibrary
|
||||
public static String removeNastyChars(String str)
|
||||
{
|
||||
if (str != null)
|
||||
return str.Replace("`", "").Replace("\\", "").Replace("\"", "").Replace(""", "''").Replace("&", "&").Replace("\"", "''");
|
||||
return str.Replace("`", "").Replace("\\", "").Replace("\"", "").Replace(""", "").Replace("&", "&").Replace("\"", "''").Replace("'", "");
|
||||
else
|
||||
return String.Empty;
|
||||
}
|
||||
|
Reference in New Issue
Block a user