Skip to content

Commit

Permalink
Merge branch 'master' into production
Browse files Browse the repository at this point in the history
  • Loading branch information
TomGrobbe committed Mar 21, 2019
2 parents f3b9e72 + 75de11b commit 8516e09
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ after_build:
- cmd: if %APPVEYOR_REPO_TAG%==true (appveyor SetVariable -Name VERSION_NAME -Value %APPVEYOR_REPO_TAG_NAME%) else (appveyor SetVariable -Name VERSION_NAME -Value beta)
- cmd: 7z a vMenu-%VERSION_NAME%.zip -r ..\build\*
- cmd: appveyor PushArtifact vMenu-%VERSION_NAME%.zip
- cmd: if %APPVEYOR_REPO_TAG%==true (curl -F "content=New version :tada:! <@&540562517806809109>" -F "file=@vMenu-"%VERSION_NAME%".zip" %DISCORD_FILE_WEBHOOK%)
deploy:
- provider: GitHub
release: "[Release] vMenu $(VERSION_NAME)"
Expand All @@ -36,4 +37,4 @@ on_success:
on_failure:
- ps: Invoke-RestMethod https://raw.githubusercontent.com/TomGrobbe/appveyor-discord-webhook/master/send.ps1 -o send.ps1
- ps: ./send.ps1 failure $env:WEBHOOK_URL
- ps: rm send.ps1
- ps: rm send.ps1
Binary file modified dependencies/client/MenuAPI.dll
Binary file not shown.
Binary file added dependencies/server/libSQLite.Interop.so
Binary file not shown.
2 changes: 1 addition & 1 deletion vMenu/menus/MpPedCustomization.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand Down
29 changes: 15 additions & 14 deletions vMenuServer/BanManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -765,25 +765,26 @@ public static void InitializeDbConnection()
{
SQLiteConnection.CreateFile(bansDbFilePath + bansDbFileName);
Debug.WriteLine("[vMenu] Created bans DB.");
}

SQLiteConnection db = new SQLiteConnection($"Data Source='{bansDbFilePath}{bansDbFileName}';Version=3;");
try
SQLiteConnection db = new SQLiteConnection($"Data Source='{bansDbFilePath}{bansDbFileName}';Version=3;");
try
{
db.Open();
string sql = "CREATE TABLE IF NOT EXISTS bans (identifiers STRING, playername STRING, banreason STRING, bannedby STRING, banneduntil DATETIME);";
SQLiteCommand cmd = new SQLiteCommand(sql, db);
cmd.ExecuteNonQuery();
db.Dispose();
}
catch (Exception e)
{
Debug.WriteLine($"[vMenu] SQL ERROR: {e.Message}");
if (db != null)
{
db.Open();
string sql = "CREATE TABLE bans (identifiers STRING, playername STRING, banreason STRING, bannedby STRING, banneduntil DATETIME);";
SQLiteCommand cmd = new SQLiteCommand(sql, db);
cmd.ExecuteNonQuery();
db.Dispose();
}
catch (Exception e)
{
Debug.WriteLine($"[vMenu] SQL ERROR: {e.Message}");
if (db != null)
{
db.Dispose();
}
}
}

}
}

Expand Down
4 changes: 4 additions & 0 deletions vMenuServer/vMenuServer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
<Compile Include="UpdateChecker.cs" />
</ItemGroup>
<ItemGroup>
<None Include="..\dependencies\server\libSQLite.Interop.so">
<Link>libSQLite.Interop.so</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="config\addons.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
Expand Down

0 comments on commit 8516e09

Please sign in to comment.