Browse Source

Added MySQL Database support for storing data.

Added logging module.
Started Configuration module.
Started Introduction module.
tags/3.0.0
Teknikode 4 years ago
parent
commit
ac75a69e78

+ 27
- 0
Combot.sln View File

@@ -8,13 +8,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interface", "Interface\Inte
{2CE88104-14EB-436A-9E74-610212FF42F6} = {2CE88104-14EB-436A-9E74-610212FF42F6}
{D469C717-7625-40F1-966D-3C9DD00F5B9C} = {D469C717-7625-40F1-966D-3C9DD00F5B9C}
{EBAC601C-652C-466A-B4F0-94495F4C8E49} = {EBAC601C-652C-466A-B4F0-94495F4C8E49}
{289A0E25-F669-4E00-9DB9-0C5AE51E2BCC} = {289A0E25-F669-4E00-9DB9-0C5AE51E2BCC}
{72CCA645-3E1D-4355-9BDE-5C1884BCB6FC} = {72CCA645-3E1D-4355-9BDE-5C1884BCB6FC}
{1A544D51-1041-4A9A-B1ED-E738735DF52E} = {1A544D51-1041-4A9A-B1ED-E738735DF52E}
{2AD43A57-CDFF-4098-AC09-82159744C6E4} = {2AD43A57-CDFF-4098-AC09-82159744C6E4}
{42BB7F70-53A1-4FA4-80C2-9DB47A092FB0} = {42BB7F70-53A1-4FA4-80C2-9DB47A092FB0}
{18369F84-BD20-4946-B3D6-F2152148B2B4} = {18369F84-BD20-4946-B3D6-F2152148B2B4}
{60902085-CEF9-4C38-96F4-644F4574681F} = {60902085-CEF9-4C38-96F4-644F4574681F}
{6FEDA88B-70F0-4E7B-9079-C5530247F8AB} = {6FEDA88B-70F0-4E7B-9079-C5530247F8AB}
{A4D79B92-8D54-46BA-94AD-31CEA23E5688} = {A4D79B92-8D54-46BA-94AD-31CEA23E5688}
{516ECE98-0D6D-4713-AEDA-EDF47FFAA80B} = {516ECE98-0D6D-4713-AEDA-EDF47FFAA80B}
{EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E} = {EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E}
EndProjectSection
EndProject
@@ -52,6 +55,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Url Parsing", "Modules\Url
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wolfram Alpha", "Modules\Wolfram Alpha\Wolfram Alpha.csproj", "{60902085-CEF9-4C38-96F4-644F4574681F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Configuration", "Modules\Configuration\Configuration.csproj", "{516ECE98-0D6D-4713-AEDA-EDF47FFAA80B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logging", "Modules\Logging\Logging.csproj", "{289A0E25-F669-4E00-9DB9-0C5AE51E2BCC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Introductions", "Modules\Introductions\Introductions.csproj", "{6FEDA88B-70F0-4E7B-9079-C5530247F8AB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -114,6 +123,18 @@ Global
{60902085-CEF9-4C38-96F4-644F4574681F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60902085-CEF9-4C38-96F4-644F4574681F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60902085-CEF9-4C38-96F4-644F4574681F}.Release|Any CPU.Build.0 = Release|Any CPU
{516ECE98-0D6D-4713-AEDA-EDF47FFAA80B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{516ECE98-0D6D-4713-AEDA-EDF47FFAA80B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{516ECE98-0D6D-4713-AEDA-EDF47FFAA80B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{516ECE98-0D6D-4713-AEDA-EDF47FFAA80B}.Release|Any CPU.Build.0 = Release|Any CPU
{289A0E25-F669-4E00-9DB9-0C5AE51E2BCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{289A0E25-F669-4E00-9DB9-0C5AE51E2BCC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{289A0E25-F669-4E00-9DB9-0C5AE51E2BCC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{289A0E25-F669-4E00-9DB9-0C5AE51E2BCC}.Release|Any CPU.Build.0 = Release|Any CPU
{6FEDA88B-70F0-4E7B-9079-C5530247F8AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FEDA88B-70F0-4E7B-9079-C5530247F8AB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FEDA88B-70F0-4E7B-9079-C5530247F8AB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FEDA88B-70F0-4E7B-9079-C5530247F8AB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -130,5 +151,11 @@ Global
{EBAC601C-652C-466A-B4F0-94495F4C8E49} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{1A544D51-1041-4A9A-B1ED-E738735DF52E} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{60902085-CEF9-4C38-96F4-644F4574681F} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{516ECE98-0D6D-4713-AEDA-EDF47FFAA80B} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{289A0E25-F669-4E00-9DB9-0C5AE51E2BCC} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{6FEDA88B-70F0-4E7B-9079-C5530247F8AB} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
EndGlobalSection
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
EndGlobal

+ 5
- 0
Combot/Combot.csproj View File

@@ -45,6 +45,9 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="MySql.Data">
<HintPath>..\packages\MySql.Data.6.9.5\lib\net45\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -61,6 +64,8 @@
<ItemGroup>
<Compile Include="AccessType.cs" />
<Compile Include="Bot.cs" />
<Compile Include="Configurations\DatabaseConfig.cs" />
<Compile Include="Databases\Database.cs" />
<Compile Include="MessageType.cs" />
<Compile Include="Modules\Command.cs" />
<Compile Include="Configurations\ChannelConfig.cs" />

+ 5
- 0
Combot/Configurations/ChannelConfig.cs View File

@@ -12,6 +12,11 @@ namespace Combot.Configurations
public string Key { get; set; }

public ChannelConfig()
{
SetDefaults();
}

public void SetDefaults()
{
Name = string.Empty;
Key = string.Empty;

+ 25
- 0
Combot/Configurations/DatabaseConfig.cs View File

@@ -0,0 +1,25 @@
namespace Combot.Configurations
{
public class DatabaseConfig
{
public string Server { get; set; }
public int Port { get; set; }
public string Database { get; set; }
public string Username { get; set; }
public string Password { get; set; }

public DatabaseConfig()
{
SetDefaults();
}

public void SetDefaults()
{
Server = "localhost";
Port = 3306;
Database = string.Empty;
Username = string.Empty;
Password = string.Empty;
}
}
}

+ 8
- 40
Combot/Configurations/HostConfig.cs View File

@@ -1,51 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Combot.Configurations
namespace Combot.Configurations
{
public class HostConfig
{
public HostConfig()
{
Host = string.Empty;
Port = 0;
}
public string Host { get; set; }
public int Port { get; set; }

private string _Host;
public string Host
public HostConfig()
{
get
{
return _Host;
}

set
{
if (_Host != value)
{
_Host = value;
}
}
SetDefaults();
}

private int _Port;
public int Port
public void SetDefaults()
{
get
{
return _Port;
}

set
{
if (_Port != value)
{
_Port = value;
}
}
Host = string.Empty;
Port = 0;
}
}
}

+ 2
- 5
Combot/Configurations/ServerConfig.cs View File

@@ -1,10 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Threading.Tasks;
using Combot.Modules;

namespace Combot.Configurations
{
@@ -22,6 +17,7 @@ namespace Combot.Configurations
public List<string> NickBlacklist { get; set; }
public List<HostConfig> Hosts { get; set; }
public List<ChannelConfig> Channels { get; set; }
public DatabaseConfig Database { get; set; }
public string ModuleLocation { get; set; }
public bool AutoConnect { get; set; }
public bool AutoRegister { get; set; }
@@ -55,6 +51,7 @@ namespace Combot.Configurations
NickBlacklist = new List<string>();
Channels = new List<ChannelConfig>();
Hosts = new List<HostConfig>();
Database = new DatabaseConfig();
}

public void Save()

+ 98
- 0
Combot/Databases/Database.cs View File

@@ -0,0 +1,98 @@
using System;
using System.Collections.Generic;
using Combot.Configurations;
using MySql.Data.MySqlClient;

namespace Combot.Databases
{
public class Database
{
private bool Connected { get; set; }
private MySqlConnection Connection { get; set; }

public Database(DatabaseConfig config)
{
Connected = false;
Connection = null;
Connect(config);
}

public List<Dictionary<string, object>> Query(string query, params object[] args)
{
MySqlCommand cmd = PrepareQuery(query, args);
MySqlDataReader reader = cmd.ExecuteReader();
List<Dictionary<string, object>> rows = new List<Dictionary<string, object>>();
while (reader.Read())
{
Dictionary<string, object> row = new Dictionary<string, object>();
for (int i = 0; i < reader.FieldCount; i++)
{
row.Add(reader.GetName(i), reader.GetValue(i));
}
rows.Add(row);
}
reader.Close();
return rows;
}

public object ScalarQuery(string query, params object[] args)
{
MySqlCommand cmd = PrepareQuery(query, args);
return cmd.ExecuteScalar();
}

public void Execute(string query, params object[] args)
{
MySqlCommand cmd = PrepareQuery(query, args);
cmd.ExecuteNonQuery();
}

private void Connect(DatabaseConfig config)
{
if (Connection == null)
{
if (config.Server != string.Empty && config.Database != string.Empty && config.Username != string.Empty && config.Password != string.Empty)
{
string strCon = string.Format("Server={0}; database={1}; user={2}; password={3}; port={4}; charset=utf8", config.Server, config.Database, config.Username, config.Password, config.Port);
Connection = new MySqlConnection(strCon);
try
{
Connection.Open();
Connected = true;
}
catch (MySqlException ex)
{
Connected = false;
}
}
}
}

private void Disconnect()
{
if (Connection != null && Connected)
{
Connection.Close();
}
}

private MySqlCommand PrepareQuery(string query, object[] args)
{
if (Connected)
{
MySqlCommand cmd = new MySqlCommand();
cmd.Connection = Connection;
for (int i = 0; i < args.Length; i++)
{
string param = "{" + i + "}";
string paramName = "@DBVar_" + i;
query = query.Replace(param, paramName);
cmd.Parameters.AddWithValue(paramName, args[i]);
}
cmd.CommandText = query;
return cmd;
}
return null;
}
}
}

+ 1
- 2
Combot/Modules/Command.cs View File

@@ -94,7 +94,7 @@ namespace Combot.Modules
if (Arguments[i].DependentArguments.Exists(arg => Arguments.Exists(val => val.Name == arg.Name)))
{
CommandArgument.DependentArgumentInfo checkedArgument = Arguments[i].DependentArguments.Find(dep => Arguments.Exists(val => val.Name == dep.Name));
int argIndex = Arguments.FindIndex(arg => arg.Name == checkedArgument.Name);
int argIndex = validArguments.FindIndex(arg => arg.Name == checkedArgument.Name);
if (passedArgs.Count > argIndex)
{
if (checkedArgument.Values.Exists(check => check.ToLower() == passedArgs[argIndex].ToLower()))
@@ -108,7 +108,6 @@ namespace Combot.Modules
{
CommandArgument newArgument = new CommandArgument();
newArgument.Copy(Arguments[i]);
newArgument.Required = true;
validArguments.Add(newArgument);
}
}

+ 48
- 0
Combot/Modules/Module.cs View File

@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using System.Reflection;
using System.Threading;
using Combot.Configurations;
using Combot.Databases;
using Combot.IRCServices;
using Newtonsoft.Json;

@@ -226,5 +227,52 @@ namespace Combot.Modules
}
ConfigFileRWLock.ExitReadLock();
}

public void AddServer()
{
Database database = new Database(Bot.ServerConfig.Database);
string search = "SELECT * FROM `servers` WHERE " +
"`name` = {0}";
List<Dictionary<string, object>> results = database.Query(search, new object[] { Bot.ServerConfig.Name });

if (!results.Any())
{
string query = "INSERT INTO `servers` SET " +
"`name` = {0}";
database.Execute(query, new object[] { Bot.ServerConfig.Name });
}
}

public void AddChannel(string channel)
{
Database database = new Database(Bot.ServerConfig.Database);
string search = "SELECT * FROM `channels` WHERE " +
"`name` = {0}";
List<Dictionary<string, object>> results = database.Query(search, new object[] { channel });

if (!results.Any())
{
string query = "INSERT INTO `channels` SET " +
"`server_id` = (SELECT `id` FROM `servers` WHERE `name` = {0}), " +
"`name` = {1}";
database.Execute(query, new object[] { Bot.ServerConfig.Name, channel });
}
}

public void AddNick(string nickname)
{
Database database = new Database(Bot.ServerConfig.Database);
string search = "SELECT * FROM `nicks` WHERE " +
"`nickname` = {0}";
List<Dictionary<string, object>> results = database.Query(search, new object[] { nickname });

if (!results.Any())
{
string insert = "INSERT INTO `nicks` SET " +
"`server_id` = (SELECT `id` FROM `servers` WHERE `name` = {0}), " +
"`nickname` = {1}";
database.Execute(insert, new object[] { Bot.ServerConfig.Name, nickname });
}
}
}
}

+ 6
- 1
Combot/app.config View File

@@ -8,4 +8,9 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data></configuration>

+ 1
- 0
Combot/packages.config View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MySql.Data" version="6.9.5" targetFramework="net451" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net451" />
</packages>

+ 0
- 3
IRCServices/Channel.cs View File

@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Combot.IRCServices
{

+ 29
- 6
IRCServices/SendCommand.cs View File

@@ -8,7 +8,6 @@ using System.Threading;

namespace Combot.IRCServices
{
// TODO Make long message splits based on words
public partial class IRC
{
/// <summary>
@@ -29,8 +28,20 @@ namespace Combot.IRCServices
LastMessageSend = DateTime.Now;
if (message.Length > MaxMessageLength)
{
string subMessage = message.Substring(0, MaxMessageLength);
string nextMessage = message.Remove(0, MaxMessageLength);
List<string> splitMessage = message.Split(new char[] {' '}, StringSplitOptions.RemoveEmptyEntries).ToList();
string subMessage = string.Empty;
string nextMessage = string.Empty;
for (int i = 0; i < splitMessage.Count; i++)
{
int wordLength = splitMessage[i].Length + 1;
int totalLength = subMessage.Length;
if (totalLength + wordLength > MaxMessageLength)
{
nextMessage = string.Join(" ", splitMessage.GetRange(i, splitMessage.Count - i));
break;
}
subMessage = string.Join(" ", subMessage, splitMessage[i]);
}
SendTCPMessage(string.Format("PRIVMSG {0} :{1}", recipient, subMessage));
SendPrivateMessage(recipient, nextMessage);
}
@@ -69,9 +80,21 @@ namespace Combot.IRCServices
LastMessageSend = DateTime.Now;
if (message.Length > MaxMessageLength)
{
string subMessage = message.Substring(0, MaxMessageLength);
string nextMessage = message.Remove(0, MaxMessageLength);
SendTCPMessage(string.Format("NOTICE {0} :{1}", recipient, message));
List<string> splitMessage = message.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries).ToList();
string subMessage = string.Empty;
string nextMessage = string.Empty;
for (int i = 0; i < splitMessage.Count; i++)
{
int wordLength = splitMessage[i].Length + 1;
int totalLength = subMessage.Length;
if (totalLength + wordLength > MaxMessageLength)
{
nextMessage = string.Join(" ", splitMessage.GetRange(i, splitMessage.Count - i));
break;
}
subMessage = string.Join(" ", subMessage, splitMessage[i]);
}
SendTCPMessage(string.Format("NOTICE {0} :{1}", recipient, subMessage));
SendNotice(recipient, nextMessage);
}
else

+ 15
- 0
Modules/Configuration/Configuration.cs View File

@@ -0,0 +1,15 @@
namespace Combot.Modules.Plugins
{
public class Configuration : Module
{
public override void Initialize()
{
Bot.CommandReceivedEvent += HandleCommandEvent;
}

public override void ParseCommand(CommandMessage command)
{
Command foundCommand = Commands.Find(c => c.Triggers.Contains(command.Command));
}
}
}

+ 74
- 0
Modules/Configuration/Configuration.csproj View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>{516ECE98-0D6D-4713-AEDA-EDF47FFAA80B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Configuration</RootNamespace>
<AssemblyName>Configuration</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\Modules\Configuration\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\Modules\Configuration\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<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.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Configuration.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Combot\Combot.csproj">
<Project>{23e4c371-16e4-4fac-8b11-44288399bb55}</Project>
<Name>Combot</Name>
</ProjectReference>
<ProjectReference Include="..\..\IRCServices\IRCServices.csproj">
<Project>{65fcbf1c-8c9e-4688-becc-185d9030899f}</Project>
<Name>IRCServices</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Module.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>mkdir "$(SolutionDir)Bin\Interface\$(ConfigurationName)\Modules\$(TargetName)"
copy /Y "$(TargetPath)" "$(SolutionDir)Bin\Interface\$(ConfigurationName)\Modules\$(TargetName)"
copy /Y "$(TargetDir)Module.config" "$(SolutionDir)Bin\Interface\$(ConfigurationName)\Modules\$(TargetName)"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

+ 156
- 0
Modules/Configuration/Module.config View File

@@ -0,0 +1,156 @@
{
"Name": "Configuration",
"ClassName": "Configuration",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Commands": [
{
"Name": "Config",
"Description": "Allows you access to the configuration",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"config"
],
"Arguments": [
{
"Name": "Type",
"Description": "The type of config you want to interact with.",
"AllowedValues": [
"Command",
"Module",
"Server"
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "Command",
"Description": "The command you want to interact with.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Type",
"Values": [
"Command"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "Module",
"Description": "The module you want to interact with.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Type",
"Values": [
"Module"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "Action",
"Description": "The action you want to perform on the config.",
"AllowedValues": [
"View",
"Edit"
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "Name",
"Description": "The name of the variable you want to interact with.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Action",
"Values": [
"View"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": false
},
{
"Name": "Name",
"Description": "The name of the variable you want to interact with.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Action",
"Values": [
"Edit"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "Value",
"Description": "The new value for the defined variable.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Action",
"Values": [
"Edit"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": true
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
}
],
"Options": []
}

+ 36
- 0
Modules/Configuration/Properties/AssemblyInfo.cs View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Configuration Module")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Teknik")]
[assembly: AssemblyProduct("Combot")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5c350b8e-5820-4034-9d67-49d2ddbfcc6f")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

+ 1
- 1
Modules/Help/Help.cs View File

@@ -44,7 +44,7 @@ namespace Combot.Modules.Plugins
}
});
}
Bot.IRC.SendNotice(recipient, string.Format("\u0002{0}\u000F", string.Join(", ", commandList)));
Bot.IRC.SendNotice(recipient, string.Format("\u0002{0}\u000F", string.Join("\u000F, \u0002", commandList)));
Bot.IRC.SendNotice(recipient, "\u200B");
Bot.IRC.SendNotice(recipient, string.Format("For more information on a specific command, including viewing the triggers, type \u0002{0}help \u001Fcommand\u000F.", Bot.ServerConfig.CommandPrefix));
}

+ 91
- 0
Modules/Introductions/Introductions.cs View File

@@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Combot.Databases;
using Combot.IRCServices.Messaging;

namespace Combot.Modules.Plugins
{
public class Introductions : Module
{
public override void Initialize()
{
Bot.CommandReceivedEvent += HandleCommandEvent;
Bot.IRC.Message.JoinChannelEvent += HandleJoinEvent;
}

public override void ParseCommand(CommandMessage command)
{
Command foundCommand = Commands.Find(c => c.Triggers.Contains(command.Command));
switch (foundCommand.Name)
{
case "Introduction":
string method = command.Arguments["Method"];
switch (method.ToLower())
{
case "add":
AddIntroduction(command);
break;
case "edit":
break;
case "delete":
break;
case "view":
break;
}
break;
}
}

private void HandleJoinEvent(object sender, JoinChannelInfo info)
{
}

private void AddIntroduction(CommandMessage command)
{
string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
Database database = new Database(Bot.ServerConfig.Database);

// Check to see if they have reached the max number of introductions
string search = "SELECT `introductions`.`id` FROM `introductions` INNER JOIN `nicks` " +
"ON `introductions`.`nick_id` = `nicks`.`id` " +
"INNER JOIN `channels` " +
"ON `introductions`.`channel_id` = `channels`.`id` " +
"INNER JOIN `servers` " +
"ON `nicks`.`server_id` = `servers`.`id` " +
"WHERE `servers`.`name` = {0} AND `channels`.`name` = {1} AND `nicks`.`nickname` = {2}";
List<Dictionary<string, object>> results = database.Query(search, new object[] { Bot.ServerConfig.Name, channel, command.Nick.Nickname });

if (results.Count < Convert.ToInt32(GetOptionValue("Max Introductions")))
{

AddChannel(channel);
AddNick(command.Nick.Nickname);
string query = "INSERT INTO `introductions` SET " +
"`server_id` = (SELECT `id` FROM `servers` WHERE `name` = {0}), " +
"`channel_id` = (SELECT `channels`.`id` FROM `channels` INNER JOIN `servers` ON `servers`.`id` = `channels`.`server_id` WHERE `servers`.`name` = {1} && `channels`.`name` = {2}), " +
"`nick_id` = (SELECT `nicks`.`id` FROM `nicks` INNER JOIN `servers` ON `servers`.`id` = `nicks`.`server_id` WHERE `servers`.`name` = {3} && `nickname` = {4}), " +
"`message` = {5}, " +
"`date_added` = {6}";
database.Execute(query, new object[] {Bot.ServerConfig.Name, Bot.ServerConfig.Name, channel, Bot.ServerConfig.Name, command.Nick.Nickname, command.Arguments["Message"], command.TimeStamp});
}
else
{
string maxMessage = "You already have the maximum number of introductions for this channel. Delete one before trying to add another.";
switch (command.MessageType)
{
case MessageType.Channel:
Bot.IRC.SendPrivateMessage(command.Location, maxMessage);
break;
case MessageType.Query:
Bot.IRC.SendPrivateMessage(command.Nick.Nickname, maxMessage);
break;
case MessageType.Notice:
Bot.IRC.SendNotice(command.Nick.Nickname, maxMessage);
break;
}
}
}
}
}

+ 74
- 0
Modules/Introductions/Introductions.csproj View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>{6FEDA88B-70F0-4E7B-9079-C5530247F8AB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Introductions</RootNamespace>
<AssemblyName>Introductions</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\Modules\Introductions\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\Modules\Introductions\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<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.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Introductions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Combot\Combot.csproj">
<Project>{23e4c371-16e4-4fac-8b11-44288399bb55}</Project>
<Name>Combot</Name>
</ProjectReference>
<ProjectReference Include="..\..\IRCServices\IRCServices.csproj">
<Project>{65fcbf1c-8c9e-4688-becc-185d9030899f}</Project>
<Name>IRCServices</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Module.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>mkdir "$(SolutionDir)Bin\Interface\$(ConfigurationName)\Modules\$(TargetName)"
copy /Y "$(TargetPath)" "$(SolutionDir)Bin\Interface\$(ConfigurationName)\Modules\$(TargetName)"
copy /Y "$(TargetDir)Module.config" "$(SolutionDir)Bin\Interface\$(ConfigurationName)\Modules\$(TargetName)"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

+ 124
- 0
Modules/Introductions/Module.config View File

@@ -0,0 +1,124 @@
{
"Name": "Introductions",
"ClassName": "Introductions",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Commands": [
{
"Name": "Introduction",
"Description": "Modify your introductions or view them.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"intro"
],
"Arguments": [
{
"Name": "Channel",
"Description": "The channel you want to modify the intro on.",
"AllowedValues": [],
"DependentArguments": [],
"MessageTypes": [
1,
2
],
"Required": true
},
{
"Name": "Method",
"Description": "What you want to do with the introduction.",
"AllowedValues": [
"Add",
"Edit",
"Delete",
"View"
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "ID",
"Description": "The ID of the introduction you want to edit or delete.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Method",
"Values": [
"Edit",
"Delete"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "ID",
"Description": "The ID of the introduction you want to view.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Method",
"Values": [
"View"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": false
},
{
"Name": "Message",
"Description": "The message you want to set as your introduction.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Method",
"Values": [
"Add",
"Edit"
]
}
],
"MessageTypes": [
0,
1,
2
],
"Required": true
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
}
],
"Options": [
{
"Name": "Max Introductions",
"Description": "The maximum number of introductions allowed for a nick on a given channel.",
"Value": 5
}
]
}

+ 36
- 0
Modules/Introductions/Properties/AssemblyInfo.cs View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Introductions Module")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Teknik")]
[assembly: AssemblyProduct("Combot")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5c350b8e-5820-4034-9d67-49d2ddbfcc6f")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

+ 107
- 0
Modules/Logging/Logging.cs View File

@@ -0,0 +1,107 @@
using System.Collections.Generic;
using System.Linq;
using Combot.Databases;
using Combot.IRCServices.Messaging;

namespace Combot.Modules.Plugins
{
public class Logging : Module
{
public override void Initialize()
{
//Bot.CommandReceivedEvent += HandleCommandEvent;
Bot.IRC.ConnectEvent += AddServer;
Bot.IRC.Message.ChannelMessageReceivedEvent += LogChannelMessage;
Bot.IRC.Message.PrivateMessageReceivedEvent += LogPrivateMessage;
Bot.IRC.Message.JoinChannelEvent += LogChannelJoin;
Bot.IRC.Message.PartChannelEvent += LogChannelPart;
Bot.IRC.Message.KickEvent += LogChannelKick;
Bot.IRC.Message.QuitEvent += LogQuit;
}

public override void ParseCommand(CommandMessage command)
{
Command foundCommand = Commands.Find(c => c.Triggers.Contains(command.Command));
}

private void LogChannelMessage(object sender, ChannelMessage message)
{
AddNick(message.Sender.Nickname);
Database database = new Database(Bot.ServerConfig.Database);
string query = "INSERT INTO `channelmessages` SET " +
"`server_id` = (SELECT `id` FROM `servers` WHERE `name` = {0}), " +
"`channel_id` = (SELECT `channels`.`id` FROM `channels` INNER JOIN `servers` ON `servers`.`id` = `channels`.`server_id` WHERE `servers`.`name` = {1} && `channels`.`name` = {2}), " +
"`nick_id` = (SELECT `nicks`.`id` FROM `nicks` INNER JOIN `servers` ON `servers`.`id` = `nicks`.`server_id` WHERE `servers`.`name` = {3} && `nickname` = {4}), " +
"`message` = {5}, " +
"`date_added` = {6}";
database.Execute(query, new object[] {Bot.ServerConfig.Name, Bot.ServerConfig.Name, message.Channel, Bot.ServerConfig.Name, message.Sender.Nickname, message.Message, message.TimeStamp});
}

private void LogPrivateMessage(object sender, PrivateMessage message)
{
AddNick(message.Sender.Nickname);
Database database = new Database(Bot.ServerConfig.Database);
string query = "INSERT INTO `privatemessages` SET " +
"`server_id` = (SELECT `id` FROM `servers` WHERE `name` = {0}), " +
"`nick_id` = (SELECT `nicks`.`id` FROM `nicks` INNER JOIN `servers` ON `servers`.`id` = `nicks`.`server_id` WHERE `servers`.`name` = {1} && `nickname` = {2}), " +
"`message` = {3}, " +
"`date_added` = {4}";
database.Execute(query, new object[] {Bot.ServerConfig.Name, Bot.ServerConfig.Name, message.Sender.Nickname, message.Message, message.TimeStamp});
}

private void LogChannelJoin(object sender, JoinChannelInfo info)
{
if (info.Nick.Nickname == Bot.IRC.Nickname)
{
AddChannel(info.Channel);
}
AddNick(info.Nick.Nickname);
Database database = new Database(Bot.ServerConfig.Database);
string query = "INSERT INTO `channeljoins` SET " +
"`server_id` = (SELECT `id` FROM `servers` WHERE `name` = {0}), " +
"`channel_id` = (SELECT `channels`.`id` FROM `channels` INNER JOIN `servers` ON `servers`.`id` = `channels`.`server_id` WHERE `servers`.`name` = {1} && `channels`.`name` = {2}), " +
"`nick_id` = (SELECT `nicks`.`id` FROM `nicks` INNER JOIN `servers` ON `servers`.`id` = `nicks`.`server_id` WHERE `servers`.`name` = {3} && `nickname` = {4}), " +
"`date_added` = {5}";
database.Execute(query, new object[] {Bot.ServerConfig.Name, Bot.ServerConfig.Name, info.Channel, Bot.ServerConfig.Name, info.Nick.Nickname, info.TimeStamp});
}

private void LogChannelPart(object sender, PartChannelInfo info)
{
AddNick(info.Nick.Nickname);
Database database = new Database(Bot.ServerConfig.Database);
string query = "INSERT INTO `channelparts` SET " +
"`server_id` = (SELECT `id` FROM `servers` WHERE `name` = {0}), " +
"`channel_id` = (SELECT `channels`.`id` FROM `channels` INNER JOIN `servers` ON `servers`.`id` = `channels`.`server_id` WHERE `servers`.`name` = {1} && `channels`.`name` = {2}), " +
"`nick_id` = (SELECT `nicks`.`id` FROM `nicks` INNER JOIN `servers` ON `servers`.`id` = `nicks`.`server_id` WHERE `servers`.`name` = {3} && `nickname` = {4}), " +
"`date_added` = {5}";
database.Execute(query, new object[] {Bot.ServerConfig.Name, Bot.ServerConfig.Name, info.Channel, Bot.ServerConfig.Name, info.Nick.Nickname, info.TimeStamp});
}

private void LogChannelKick(object sender, KickInfo info)
{
AddNick(info.Nick.Nickname);
AddNick(info.KickedNick.Nickname);
Database database = new Database(Bot.ServerConfig.Database);
string query = "INSERT INTO `channelkickss` SET " +
"`server_id` = (SELECT `id` FROM `servers` WHERE `name` = {0}), " +
"`channel_id` = (SELECT `channels`.`id` FROM `channels` INNER JOIN `servers` ON `servers`.`id` = `channels`.`server_id` WHERE `servers`.`name` = {1} && `channels`.`name` = {2}), " +
"`nick_id` = (SELECT `nicks`.`id` FROM `nicks` INNER JOIN `servers` ON `servers`.`id` = `nicks`.`server_id` WHERE `servers`.`name` = {3} && `nickname` = {4}), " +
"`kicked_nick_id` = (SELECT `nicks`.`id` FROM `nicks` INNER JOIN `servers` ON `servers`.`id` = `nicks`.`server_id` WHERE `servers`.`name` = {5} && `nickname` = {6}), " +
"`reason` = {7}, " +
"`date_added` = {8}";
database.Execute(query, new object[] {Bot.ServerConfig.Name, Bot.ServerConfig.Name, info.Channel, Bot.ServerConfig.Name, info.Nick.Nickname, Bot.ServerConfig.Name, info.KickedNick.Nickname, info.Reason, info.TimeStamp});
}

private void LogQuit(object sender, QuitInfo info)
{
AddNick(info.Nick.Nickname);
Database database = new Database(Bot.ServerConfig.Database);
string query = "INSERT INTO `quits` SET " +
"`server_id` = (SELECT `id` FROM `servers` WHERE `name` = {0}), " +
"`nick_id` = (SELECT `nicks`.`id` FROM `nicks` INNER JOIN `servers` ON `servers`.`id` = `nicks`.`server_id` WHERE `servers`.`name` = {1} && `nickname` = {2}), " +
"`message` = {3}, " +
"`date_added` = {4}";
database.Execute(query, new object[] {Bot.ServerConfig.Name, Bot.ServerConfig.Name, info.Nick.Nickname, info.Message, info.TimeStamp});
}
}
}

+ 74
- 0
Modules/Logging/Logging.csproj View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>{289A0E25-F669-4E00-9DB9-0C5AE51E2BCC}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Logging</RootNamespace>
<AssemblyName>Logging</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\Modules\Logging\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\Modules\Logging\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<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.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Logging.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Combot\Combot.csproj">
<Project>{23e4c371-16e4-4fac-8b11-44288399bb55}</Project>
<Name>Combot</Name>
</ProjectReference>
<ProjectReference Include="..\..\IRCServices\IRCServices.csproj">
<Project>{65fcbf1c-8c9e-4688-becc-185d9030899f}</Project>
<Name>IRCServices</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Module.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>mkdir "$(SolutionDir)Bin\Interface\$(ConfigurationName)\Modules\$(TargetName)"
copy /Y "$(TargetPath)" "$(SolutionDir)Bin\Interface\$(ConfigurationName)\Modules\$(TargetName)"
copy /Y "$(TargetDir)Module.config" "$(SolutionDir)Bin\Interface\$(ConfigurationName)\Modules\$(TargetName)"</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

+ 9
- 0
Modules/Logging/Module.config View File

@@ -0,0 +1,9 @@
{
"Name": "Logging",
"ClassName": "Logging",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Commands": [],
"Options": []
}

+ 36
- 0
Modules/Logging/Properties/AssemblyInfo.cs View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Logging Module")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Teknik")]
[assembly: AssemblyProduct("Combot")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5c350b8e-5820-4034-9d67-49d2ddbfcc6f")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Loading…
Cancel
Save