Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
thecroshel authored Aug 12, 2024
1 parent 8500f2d commit decbb62
Show file tree
Hide file tree
Showing 36 changed files with 51,009 additions and 0 deletions.
10 changes: 10 additions & 0 deletions JoinLogger/Config.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Exiled.API.Interfaces;

namespace JoinLogger
{
public class Config : IConfig
{
public bool IsEnabled { get; set; } = true;
public bool Debug { get; set; } = false;
}
}
21 changes: 21 additions & 0 deletions JoinLogger/EventHandlers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Exiled.Events.EventArgs;
using Exiled.API.Features;
using Exiled.Events.EventArgs.Player;

namespace JoinLogger
{
public class EventHandlers
{
public void OnPlayerJoined(JoinedEventArgs ev)
{
string steam64Id = ev.Player.UserId.Replace("@steam", "");
Log.Info($"{ev.Player.Nickname} ({steam64Id}) has joined the server.");
}

public void OnPlayerLeft(LeftEventArgs ev)
{
string steam64Id = ev.Player.UserId.Replace("@steam", "");
Log.Info($"{ev.Player.Nickname} ({steam64Id}) has left the server.");
}
}
}
91 changes: 91 additions & 0 deletions JoinLogger/JoinLogger.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{674347EC-C663-4E0B-B092-725C4253D8F1}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>JoinLogger</RootNamespace>
<AssemblyName>JoinLogger</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony, Version=2.3.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.2.3.3\lib\net48\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-Publicized, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\Assembly-CSharp-Publicized.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CommandSystem.Core, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\CommandSystem.Core.dll</HintPath>
</Reference>
<Reference Include="Exiled.API, Version=9.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\Exiled.API.dll</HintPath>
</Reference>
<Reference Include="Exiled.CreditTags, Version=9.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\Exiled.CreditTags.dll</HintPath>
</Reference>
<Reference Include="Exiled.CustomModules, Version=9.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\Exiled.CustomModules.dll</HintPath>
</Reference>
<Reference Include="Exiled.Events, Version=9.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\Exiled.Events.dll</HintPath>
</Reference>
<Reference Include="Exiled.Loader, Version=9.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\Exiled.Loader.dll</HintPath>
</Reference>
<Reference Include="Exiled.Permissions, Version=9.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\Exiled.Permissions.dll</HintPath>
</Reference>
<Reference Include="NorthwoodLib, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\NorthwoodLib.dll</HintPath>
</Reference>
<Reference Include="PluginAPI, Version=13.1.3.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\PluginAPI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="YamlDotNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=ec19458f3c15af5e, processorArchitecture=MSIL">
<HintPath>..\packages\EXILED.9.0.0-alpha.19\lib\net48\YamlDotNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Config.cs" />
<Compile Include="Plugin.cs" />
<Compile Include="EventHandlers.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
33 changes: 33 additions & 0 deletions JoinLogger/Plugin.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using Exiled.API.Features;
using System;

namespace JoinLogger
{
public class Plugin : Plugin<Config>
{
public override string Name => "JoinLogger";
public override string Author => "thecroshel";
public override Version RequiredExiledVersion => new Version(8, 4, 3); // This requires the System namespace
public override string Prefix => "JoinLogger";

public EventHandlers EventHandlers;

public override void OnEnabled()
{
base.OnEnabled();

EventHandlers = new EventHandlers();
Exiled.Events.Handlers.Player.Joined += EventHandlers.OnPlayerJoined;
Exiled.Events.Handlers.Player.Left += EventHandlers.OnPlayerLeft;
}

public override void OnDisabled()
{
base.OnDisabled();

Exiled.Events.Handlers.Player.Joined -= EventHandlers.OnPlayerJoined;
Exiled.Events.Handlers.Player.Left -= EventHandlers.OnPlayerLeft;
EventHandlers = null;
}
}
}
36 changes: 36 additions & 0 deletions JoinLogger/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// Bir bütünleştirilmiş koda ilişkin Genel Bilgiler aşağıdaki öznitelikler kümesiyle
// denetlenir. Bütünleştirilmiş kod ile ilişkili bilgileri değiştirmek için
// bu öznitelik değerlerini değiştirin.
[assembly: AssemblyTitle("JoinLogger")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JoinLogger")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// ComVisible özniteliğinin false olarak ayarlanması bu bütünleştirilmiş koddaki türleri
// COM bileşenleri için görünmez yapar. Bu bütünleştirilmiş koddaki bir türe
// erişmeniz gerekirse ComVisible özniteliğini o türde true olarak ayarlayın.
[assembly: ComVisible(false)]

// Bu proje COM'un kullanımına sunulursa, aşağıdaki GUID tür kitaplığının kimliği içindir
[assembly: Guid("674347ec-c663-4e0b-b092-725c4253d8f1")]

// Bir derlemenin sürüm bilgileri aşağıdaki dört değerden oluşur:
//
// Ana Sürüm
// İkincil Sürüm
// Yapı Numarası
// Düzeltme
//
// Tüm değerleri belirtebilir veya varsayılan Derleme ve Düzeltme Numaralarını kullanmak için
// aşağıda gösterildiği gibi '*' kullanabilirsiniz:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
11 changes: 11 additions & 0 deletions JoinLogger/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="YamlDotNet" publicKeyToken="ec19458f3c15af5e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Binary file added JoinLogger/bin/Debug/0Harmony.dll
Binary file not shown.
Binary file added JoinLogger/bin/Debug/0Harmony.pdb
Binary file not shown.
Loading

0 comments on commit decbb62

Please sign in to comment.