Skip to content

Commit

Permalink
Allow Spaces in Name for Offline Banning
Browse files Browse the repository at this point in the history
- Allows spaces in the name when using the !banid <steam64> <name> command
  • Loading branch information
data-bomb committed Aug 17, 2024
1 parent 3c9274d commit 3706bb1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Si_BasicBanlist/Si_BasicBans.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You should have received a copy of the GNU General Public License
using System.Collections.Generic;
using System.Linq;

[assembly: MelonInfo(typeof(BasicBanlist), "Basic Banlist", "1.5.0", "databomb", "https://github.com/data-bomb/Silica")]
[assembly: MelonInfo(typeof(BasicBanlist), "Basic Banlist", "1.5.1", "databomb", "https://github.com/data-bomb/Silica")]
[assembly: MelonGame("Bohemia Interactive", "Silica")]
[assembly: MelonOptionalDependencies("Admin Mod")]

Expand Down Expand Up @@ -199,7 +199,8 @@ public static void Command_OfflineBan(Player? callerPlayer, String args)

// validate argument contents
string targetID = args.Split(' ')[1];
string targetName = args.Split(' ', 2)[2];
int spaceCharacter = args.IndexOf(' ', commandName.Length+1);
string targetName = args.Substring(spaceCharacter);
bool isNumber = ulong.TryParse(targetID, out ulong steamid);
if (!isNumber)
{
Expand Down

0 comments on commit 3706bb1

Please sign in to comment.