Browse Source

Changed Module scheme to have each module a separate project/dll.

Added build configs to move required files to interface working directory.
Created Module project Template.
tags/3.0.0
Teknikode 4 years ago
parent
commit
d3d2c54096
55 changed files with 3988 additions and 59 deletions
  1. 1
    0
      .gitignore
  2. 94
    0
      Combot.sln
  3. 18
    3
      Combot/Bot.cs
  4. 2
    12
      Combot/Combot.csproj
  5. 2
    2
      Combot/Configurations/ServerConfig.cs
  6. 64
    3
      Combot/Modules/Module.cs
  7. 34
    2
      IRCServices/IRCServices.csproj
  8. 6
    3
      Interface/Interface.csproj
  9. BIN
      Module Template.zip
  10. 2
    3
      Modules/Help/Help.cs
  11. 106
    0
      Modules/Help/Help.csproj
  12. 49
    0
      Modules/Help/Module.config
  13. 36
    0
      Modules/Help/Properties/AssemblyInfo.cs
  14. 1
    1
      Modules/Invite/Invite.cs
  15. 106
    0
      Modules/Invite/Invite.csproj
  16. 9
    0
      Modules/Invite/Module.config
  17. 36
    0
      Modules/Invite/Properties/AssemblyInfo.cs
  18. 3
    5
      Modules/Moderation/Moderation.cs
  19. 106
    0
      Modules/Moderation/Moderation.csproj
  20. 1464
    0
      Modules/Moderation/Module.config
  21. 36
    0
      Modules/Moderation/Properties/AssemblyInfo.cs
  22. 407
    0
      Modules/Owner Control/Module.config
  23. 106
    0
      Modules/Owner Control/Owner Control.csproj
  24. 2
    2
      Modules/Owner Control/Owner_Control.cs
  25. 36
    0
      Modules/Owner Control/Properties/AssemblyInfo.cs
  26. 37
    0
      Modules/Ping Me/Module.config
  27. 106
    0
      Modules/Ping Me/Ping Me.csproj
  28. 3
    3
      Modules/Ping Me/Ping_Me.cs
  29. 36
    0
      Modules/Ping Me/Properties/AssemblyInfo.cs
  30. 50
    0
      Modules/Search/Module.config
  31. 36
    0
      Modules/Search/Properties/AssemblyInfo.cs
  32. 3
    3
      Modules/Search/Search.cs
  33. 80
    0
      Modules/Search/Search.csproj
  34. 4
    0
      Modules/Search/packages.config
  35. 9
    0
      Modules/Url Parsing/Module.config
  36. 36
    0
      Modules/Url Parsing/Properties/AssemblyInfo.cs
  37. 75
    0
      Modules/Url Parsing/Url Parsing.csproj
  38. 4
    4
      Modules/Url Parsing/Url_Parsing.cs
  39. 50
    0
      Modules/Version/Module.config
  40. 36
    0
      Modules/Version/Properties/AssemblyInfo.cs
  41. 3
    4
      Modules/Version/Version.cs
  42. 106
    0
      Modules/Version/Version.csproj
  43. 101
    0
      Modules/Weather Information/Module.config
  44. 36
    0
      Modules/Weather Information/Properties/AssemblyInfo.cs
  45. 106
    0
      Modules/Weather Information/Weather Information.csproj
  46. 3
    3
      Modules/Weather Information/Weather_Information.cs
  47. 55
    0
      Modules/Wolfram Alpha/Module.config
  48. 36
    0
      Modules/Wolfram Alpha/Properties/AssemblyInfo.cs
  49. 75
    0
      Modules/Wolfram Alpha/Wolfram Alpha.csproj
  50. 5
    4
      Modules/Wolfram Alpha/Wolfram_Alpha.cs
  51. 50
    0
      Modules/YouTube/Module.config
  52. 36
    0
      Modules/YouTube/Properties/AssemblyInfo.cs
  53. 2
    2
      Modules/YouTube/YouTube.cs
  54. 79
    0
      Modules/YouTube/YouTube.csproj
  55. 4
    0
      Modules/YouTube/packages.config

+ 1
- 0
.gitignore View File

@@ -211,3 +211,4 @@ pip-log.txt

#Mr Developer
.mr.developer.cfg
Combot.Servers.config

+ 94
- 0
Combot.sln View File

@@ -4,6 +4,19 @@ Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interface", "Interface\Interface.csproj", "{AE4AFD7A-CAA4-46A0-9E00-2B3D53F8D0AB}"
ProjectSection(ProjectDependencies) = postProject
{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}
{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}
{A4D79B92-8D54-46BA-94AD-31CEA23E5688} = {A4D79B92-8D54-46BA-94AD-31CEA23E5688}
{EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E} = {EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Combot", "Combot\Combot.csproj", "{23E4C371-16E4-4FAC-8B11-44288399BB55}"
EndProject
@@ -15,6 +28,30 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
readme.md = readme.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{D157677E-4D33-4156-B55E-E21C4B5A3024}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Owner Control", "Modules\Owner Control\Owner Control.csproj", "{D469C717-7625-40F1-966D-3C9DD00F5B9C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ping Me", "Modules\Ping Me\Ping Me.csproj", "{18369F84-BD20-4946-B3D6-F2152148B2B4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Invite", "Modules\Invite\Invite.csproj", "{72CCA645-3E1D-4355-9BDE-5C1884BCB6FC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Version", "Modules\Version\Version.csproj", "{2CE88104-14EB-436A-9E74-610212FF42F6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Help", "Modules\Help\Help.csproj", "{42BB7F70-53A1-4FA4-80C2-9DB47A092FB0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Moderation", "Modules\Moderation\Moderation.csproj", "{2AD43A57-CDFF-4098-AC09-82159744C6E4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Weather Information", "Modules\Weather Information\Weather Information.csproj", "{A4D79B92-8D54-46BA-94AD-31CEA23E5688}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Search", "Modules\Search\Search.csproj", "{EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YouTube", "Modules\YouTube\YouTube.csproj", "{EBAC601C-652C-466A-B4F0-94495F4C8E49}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Url Parsing", "Modules\Url Parsing\Url Parsing.csproj", "{1A544D51-1041-4A9A-B1ED-E738735DF52E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wolfram Alpha", "Modules\Wolfram Alpha\Wolfram Alpha.csproj", "{60902085-CEF9-4C38-96F4-644F4574681F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -33,8 +70,65 @@ Global
{65FCBF1C-8C9E-4688-BECC-185D9030899F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65FCBF1C-8C9E-4688-BECC-185D9030899F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{65FCBF1C-8C9E-4688-BECC-185D9030899F}.Release|Any CPU.Build.0 = Release|Any CPU
{D469C717-7625-40F1-966D-3C9DD00F5B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D469C717-7625-40F1-966D-3C9DD00F5B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D469C717-7625-40F1-966D-3C9DD00F5B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D469C717-7625-40F1-966D-3C9DD00F5B9C}.Release|Any CPU.Build.0 = Release|Any CPU
{18369F84-BD20-4946-B3D6-F2152148B2B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{18369F84-BD20-4946-B3D6-F2152148B2B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{18369F84-BD20-4946-B3D6-F2152148B2B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{18369F84-BD20-4946-B3D6-F2152148B2B4}.Release|Any CPU.Build.0 = Release|Any CPU
{72CCA645-3E1D-4355-9BDE-5C1884BCB6FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{72CCA645-3E1D-4355-9BDE-5C1884BCB6FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{72CCA645-3E1D-4355-9BDE-5C1884BCB6FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{72CCA645-3E1D-4355-9BDE-5C1884BCB6FC}.Release|Any CPU.Build.0 = Release|Any CPU
{2CE88104-14EB-436A-9E74-610212FF42F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2CE88104-14EB-436A-9E74-610212FF42F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2CE88104-14EB-436A-9E74-610212FF42F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2CE88104-14EB-436A-9E74-610212FF42F6}.Release|Any CPU.Build.0 = Release|Any CPU
{42BB7F70-53A1-4FA4-80C2-9DB47A092FB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42BB7F70-53A1-4FA4-80C2-9DB47A092FB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42BB7F70-53A1-4FA4-80C2-9DB47A092FB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42BB7F70-53A1-4FA4-80C2-9DB47A092FB0}.Release|Any CPU.Build.0 = Release|Any CPU
{2AD43A57-CDFF-4098-AC09-82159744C6E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2AD43A57-CDFF-4098-AC09-82159744C6E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2AD43A57-CDFF-4098-AC09-82159744C6E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2AD43A57-CDFF-4098-AC09-82159744C6E4}.Release|Any CPU.Build.0 = Release|Any CPU
{A4D79B92-8D54-46BA-94AD-31CEA23E5688}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4D79B92-8D54-46BA-94AD-31CEA23E5688}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4D79B92-8D54-46BA-94AD-31CEA23E5688}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4D79B92-8D54-46BA-94AD-31CEA23E5688}.Release|Any CPU.Build.0 = Release|Any CPU
{EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E}.Release|Any CPU.Build.0 = Release|Any CPU
{EBAC601C-652C-466A-B4F0-94495F4C8E49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EBAC601C-652C-466A-B4F0-94495F4C8E49}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBAC601C-652C-466A-B4F0-94495F4C8E49}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EBAC601C-652C-466A-B4F0-94495F4C8E49}.Release|Any CPU.Build.0 = Release|Any CPU
{1A544D51-1041-4A9A-B1ED-E738735DF52E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A544D51-1041-4A9A-B1ED-E738735DF52E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A544D51-1041-4A9A-B1ED-E738735DF52E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A544D51-1041-4A9A-B1ED-E738735DF52E}.Release|Any CPU.Build.0 = Release|Any CPU
{60902085-CEF9-4C38-96F4-644F4574681F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{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
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D469C717-7625-40F1-966D-3C9DD00F5B9C} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{18369F84-BD20-4946-B3D6-F2152148B2B4} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{72CCA645-3E1D-4355-9BDE-5C1884BCB6FC} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{2CE88104-14EB-436A-9E74-610212FF42F6} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{42BB7F70-53A1-4FA4-80C2-9DB47A092FB0} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{2AD43A57-CDFF-4098-AC09-82159744C6E4} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{A4D79B92-8D54-46BA-94AD-31CEA23E5688} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E} = {D157677E-4D33-4156-B55E-E21C4B5A3024}
{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}
EndGlobalSection
EndGlobal

+ 18
- 3
Combot/Bot.cs View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;
@@ -109,11 +110,25 @@ namespace Combot

public void LoadModules()
{
foreach (Module module in ServerConfig.Modules)
// Get all config files from Module directory
string[] moduleLocations = Directory.GetDirectories(ServerConfig.ModuleLocation);
foreach (string location in moduleLocations)
{
if (module.Enabled && !Modules.Exists(mod => mod.ClassName == module.ClassName))
LoadModule(location);
}
}

public void LoadModule(string location)
{
Module newModule = new Module();
newModule.ConfigPath = location;
newModule.LoadConfig();

if (newModule.Enabled && !Modules.Exists(mod => mod.ClassName == newModule.ClassName))
{
if (File.Exists(string.Format(@"{0}\{1}.dll", location, newModule.Name)))
{
Module loadedModule = module.CreateInstance(this);
Module loadedModule = newModule.CreateInstance(this);
if (loadedModule.Loaded)
{
Modules.Add(loadedModule);

+ 2
- 12
Combot/Combot.csproj View File

@@ -31,7 +31,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\Bin\Combot\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -39,7 +39,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\Bin\Combot\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -70,17 +70,7 @@
<Compile Include="Configurations\ServerConfig.cs" />
<Compile Include="Modules\CommandArgument.cs" />
<Compile Include="Modules\CommandMessage.cs" />
<Compile Include="Modules\ModuleClasses\Owner.cs" />
<Compile Include="Modules\ModuleClasses\Help.cs" />
<Compile Include="Modules\ModuleClasses\Invite.cs" />
<Compile Include="Modules\ModuleClasses\Moderation.cs" />
<Compile Include="Modules\ModuleClasses\PingMe.cs" />
<Compile Include="Modules\ModuleClasses\Search.cs" />
<Compile Include="Modules\ModuleClasses\UrlParsing.cs" />
<Compile Include="Modules\ModuleClasses\Version.cs" />
<Compile Include="Modules\ModuleClasses\Weather.cs" />
<Compile Include="Modules\ModuleClasses\WolframAlpha.cs" />
<Compile Include="Modules\ModuleClasses\YouTube.cs" />
<Compile Include="Modules\Option.cs" />
<Compile Include="Types.cs" />
<Compile Include="Methods.cs" />

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

@@ -22,7 +22,7 @@ namespace Combot.Configurations
public List<string> NickBlacklist { get; set; }
public List<HostConfig> Hosts { get; set; }
public List<ChannelConfig> Channels { get; set; }
public List<Module> Modules { get; set; }
public string ModuleLocation { get; set; }
public bool AutoConnect { get; set; }
public bool AutoRegister { get; set; }
public string CommandPrefix { get; set; }
@@ -49,11 +49,11 @@ namespace Combot.Configurations
JoinDelay = 0;
MaxMessageLength = 400;
MessageSendDelay = 0;
ModuleLocation = string.Empty;
Owners = new List<string>();
ChannelBlacklist = new List<string>();
NickBlacklist = new List<string>();
Channels = new List<ChannelConfig>();
Modules = new List<Module>();
Hosts = new List<HostConfig>();
}


+ 64
- 3
Combot/Modules/Module.cs View File

@@ -1,10 +1,14 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using System.Threading;
using Combot.Configurations;
using Combot.IRCServices;
using Newtonsoft.Json;

namespace Combot.Modules
{
@@ -24,11 +28,27 @@ namespace Combot.Modules
return false;
}

public string ConfigPath { get; set; }
public bool ShouldSerializeConfigPath()
{
return false;
}

protected Bot Bot;

private ReaderWriterLockSlim ConfigRWLock;
private ReaderWriterLockSlim ConfigFileRWLock;
private JsonSerializerSettings JsonSettings;

public Module()
{
SetDefaults();
ConfigRWLock = new ReaderWriterLockSlim();
ConfigFileRWLock = new ReaderWriterLockSlim();
JsonSettings = new JsonSerializerSettings();
JsonSettings.Converters.Add(new IPAddressConverter());
JsonSettings.Converters.Add(new IPEndPointConverter());
JsonSettings.Formatting = Formatting.Indented;
}

public void HandleCommandEvent(CommandMessage command)
@@ -91,6 +111,7 @@ namespace Combot.Modules
Enabled = false;
ChannelBlacklist = new List<string>();
NickBlacklist = new List<string>();
ConfigPath = Directory.GetCurrentDirectory();
Loaded = false;
Commands = new List<Command>();
Options = new List<Option>();
@@ -133,9 +154,9 @@ namespace Combot.Modules
if (!Loaded)
{
//create the class base on string
//note : include the namespace and class name (namespace=Bot.Modules, class name=<class_name>)
Assembly a = Assembly.Load("Combot");
Type t = a.GetType("Combot.Modules.ModuleClasses." + ClassName);
//note : include the namespace and class name (namespace=Combot.Modules, class name=<class_name>)
Assembly a = Assembly.LoadFrom(Path.Combine(ConfigPath, string.Format("{0}.dll", Name)));
Type t = a.GetType("Combot.Modules.Plugins." + ClassName);

//check to see if the class is instantiated or not
if (t != null)
@@ -165,5 +186,45 @@ namespace Combot.Modules
}
return foundValue;
}

public void SaveConfig()
{
ConfigFileRWLock.EnterWriteLock();

// Serialize Config
ConfigRWLock.EnterReadLock();
string configContents = JsonConvert.SerializeObject(this, JsonSettings);
ConfigRWLock.ExitReadLock();

// Save config to file
string path = Path.Combine(ConfigPath, "Module.config");
using (StreamWriter streamWriter = new StreamWriter(path, false))
{
streamWriter.Write(configContents);
}

ConfigFileRWLock.ExitWriteLock();
}

public void LoadConfig()
{
ConfigFileRWLock.EnterReadLock();
string path = Path.Combine(ConfigPath, "Module.config");
if (File.Exists(path))
{
string configContents;
using (StreamReader streamReader = new StreamReader(path, Encoding.UTF8))
{
configContents = streamReader.ReadToEnd();
}

// Load the deserialized file into the config
ConfigRWLock.EnterWriteLock();
Module newModule = JsonConvert.DeserializeObject<Module>(configContents, JsonSettings);
Copy(newModule);
ConfigRWLock.ExitWriteLock();
}
ConfigFileRWLock.ExitReadLock();
}
}
}

+ 34
- 2
IRCServices/IRCServices.csproj View File

@@ -11,12 +11,27 @@
<AssemblyName>IRCServices</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\Bin\IRCServices\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -24,7 +39,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\Bin\IRCServices\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -53,6 +68,23 @@
<Compile Include="TCP\TCPTypes.cs" />
<Compile Include="Types.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.1 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.

+ 6
- 3
Interface/Interface.csproj View File

@@ -14,6 +14,7 @@
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@@ -26,7 +27,6 @@
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
@@ -35,7 +35,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\Bin\Interface\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -44,7 +44,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\Bin\Interface\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -142,6 +142,9 @@
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy "$(SolutionDir)Combot.Servers.Config" "$(TargetDir)"</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">

BIN
Module Template.zip View File


Combot/Modules/ModuleClasses/Help.cs → Modules/Help/Help.cs View File

@@ -1,8 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;

namespace Combot.Modules.ModuleClasses
namespace Combot.Modules.Plugins
{
public class Help : Module
{
@@ -139,4 +138,4 @@ namespace Combot.Modules.ModuleClasses
}
}
}
}
}

+ 106
- 0
Modules/Help/Help.csproj View File

@@ -0,0 +1,106 @@
<?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>{42BB7F70-53A1-4FA4-80C2-9DB47A092FB0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Help</RootNamespace>
<AssemblyName>Help</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\Modules\Help\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\Help\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="Help.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>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.1 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</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>

+ 49
- 0
Modules/Help/Module.config View File

@@ -0,0 +1,49 @@
{
"Name": "Help",
"ClassName": "Help",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Commands": [
{
"Name": "Help",
"Description": "Displays help information for the bot.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"help"
],
"Arguments": [
{
"Name": "Command",
"Description": "The command you want specific help on.",
"AllowedValues": [],
"MessageTypes": [
0,
1,
2
],
"Required": false
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
0,
1,
2,
3,
4,
5,
6
],
"ShowHelp": true,
"SpamCheck": true
}
],
"Options": []
}

+ 36
- 0
Modules/Help/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("Help 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")]

Combot/Modules/ModuleClasses/Invite.cs → Modules/Invite/Invite.cs View File

@@ -1,6 +1,6 @@
using Combot.IRCServices.Messaging;

namespace Combot.Modules.ModuleClasses
namespace Combot.Modules.Plugins
{
public class Invite : Module
{

+ 106
- 0
Modules/Invite/Invite.csproj View File

@@ -0,0 +1,106 @@
<?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>{72CCA645-3E1D-4355-9BDE-5C1884BCB6FC}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Invite</RootNamespace>
<AssemblyName>Invite</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\Modules\Invite\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\Invite\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="Invite.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>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.1 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</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/Invite/Module.config View File

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

+ 36
- 0
Modules/Invite/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("Invite 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")]

Combot/Modules/ModuleClasses/Moderation.cs → Modules/Moderation/Moderation.cs View File

@@ -1,12 +1,10 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Combot.IRCServices;
using Combot.IRCServices.Messaging;
using Timer = System.Timers.Timer;

namespace Combot.Modules.ModuleClasses
namespace Combot.Modules.Plugins
{
public class Moderation : Module
{
@@ -274,7 +272,7 @@ namespace Combot.Modules.ModuleClasses

private void InviteNick(Command curCommand, CommandMessage command)
{
string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
string channel = command.Arguments.ContainsKey("Channel") ? command.Arguments["Channel"] : command.Location;
if (Bot.CheckChannelAccess(channel, command.Nick.Nickname, curCommand.AllowedAccess))
{
Bot.IRC.SendInvite(channel, command.Arguments["Nickname"]);
@@ -455,4 +453,4 @@ namespace Combot.Modules.ModuleClasses
}
}
}
}
}

+ 106
- 0
Modules/Moderation/Moderation.csproj View File

@@ -0,0 +1,106 @@
<?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>{2AD43A57-CDFF-4098-AC09-82159744C6E4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Moderation</RootNamespace>
<AssemblyName>Moderation</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\Modules\Moderation\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\Moderation\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="Moderation.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>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.1 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</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>

+ 1464
- 0
Modules/Moderation/Module.config
File diff suppressed because it is too large
View File


+ 36
- 0
Modules/Moderation/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("Moderation 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")]

+ 407
- 0
Modules/Owner Control/Module.config View File

@@ -0,0 +1,407 @@
{
"Name": "Owner Control",
"ClassName": "Owner_Control",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Commands": [
{
"Name": "Change Nick",
"Description": "Changes the bot's nickname.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"nick"
],
"Arguments": [
{
"Name": "Nickname",
"Description": "The nickname you want the bot to change to.",
"AllowedValues": [],
"MessageTypes": [
0,
1,
2
],
"Required": true
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
},
{
"Name": "Identify",
"Description": "Identifies with NickServ using the password saved in the configuration.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"id",
"identify"
],
"Arguments": [],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
},
{
"Name": "Join Channel",
"Description": "Joins the specified channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"join"
],
"Arguments": [
{
"Name": "Channel",
"Description": "The channel you want the bot to join.",
"AllowedValues": [],
"MessageTypes": [
0,
1,
2
],
"Required": true
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
},
{
"Name": "Part Channel",
"Description": "Parts the specified channel, or the current one if one isn't specified.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"part"
],
"Arguments": [
{
"Name": "Channel",
"Description": "The channel you want the bot to leave.",
"AllowedValues": [],
"MessageTypes": [
0
],
"Required": false
},
{
"Name": "Channel",
"Description": "The channel you want the bot to leave.",
"AllowedValues": [],
"MessageTypes": [
1,
2
],
"Required": true
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
},
{
"Name": "Speak",
"Description": "Sends a private message to the specified target.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"say",
"speak"
],
"Arguments": [
{
"Name": "Target",
"Description": "The channel or nickname you want to private message.",
"AllowedValues": [],
"MessageTypes": [
1,
2
],
"Required": true
},
{
"Name": "Message",
"Description": "The message you want relayed.",
"AllowedValues": [],
"MessageTypes": [
0,
1,
2
],
"Required": true
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
},
{
"Name": "Action",
"Description": "Sends a CTCP action command with message to a specified channel.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"action"
],
"Arguments": [
{
"Name": "Channel",
"Description": "The channel you want to display the action on.",
"AllowedValues": [],
"MessageTypes": [
1,
2
],
"Required": true
},
{
"Name": "Message",
"Description": "The action message to be displayed.",
"AllowedValues": [],
"MessageTypes": [
0,
1,
2
],
"Required": true
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
},
{
"Name": "Quit",
"Description": "Quits the specified type.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"quit"
],
"Arguments": [
{
"Name": "Type",
"Description": "The thing you want to quit.",
"AllowedValues": [
"Server",
"Client"
],
"MessageTypes": [
0,
1,
2
],
"Required": true
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
},
{
"Name": "Cycle",
"Description": "Cycles the specified type.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"cycle"
],
"Arguments": [
{
"Name": "Type",
"Description": "The thing you want to cycle.",
"AllowedValues": [
"Channel",
"Server",
"Client"
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "Channel",
"Description": "The channel you want to cycle.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Type",
"Values": [
"Channel"
]
}
],
"MessageTypes": [
0
],
"Required": false
},
{
"Name": "Channel",
"Description": "The channel you want to cycle.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Type",
"Values": [
"Channel"
]
}
],
"MessageTypes": [
1,
2
],
"Required": false
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
},
{
"Name": "List",
"Description": "Sends a list of the specified type.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"list"
],
"Arguments": [
{
"Name": "Type",
"Description": "The thing you want to list.",
"AllowedValues": [
"Nicks",
"Channels",
"Servers",
"Modules"
],
"MessageTypes": [
0,
1,
2
],
"Required": true
},
{
"Name": "Channel",
"Description": "The channel you want to view the nicks from.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Type",
"Values": [
"Nicks"
]
}
],
"MessageTypes": [
0
],
"Required": false
},
{
"Name": "Channel",
"Description": "The channel you want to view the nicks from.",
"AllowedValues": [],
"DependentArguments": [
{
"Name": "Type",
"Values": [
"Nicks"
]
}
],
"MessageTypes": [
1,
2
],
"Required": true
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
6
],
"ShowHelp": true,
"SpamCheck": true
}
],
"Options": []
}

+ 106
- 0
Modules/Owner Control/Owner Control.csproj View File

@@ -0,0 +1,106 @@
<?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>{D469C717-7625-40F1-966D-3C9DD00F5B9C}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Owner_Control</RootNamespace>
<AssemblyName>Owner Control</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\Modules\Owner Control\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\Owner Control\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="Owner_Control.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>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.1 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</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>

Combot/Modules/ModuleClasses/Owner.cs → Modules/Owner Control/Owner_Control.cs View File

@@ -3,9 +3,9 @@ using System.Diagnostics;
using System.Linq;
using System.Reflection;

namespace Combot.Modules.ModuleClasses
namespace Combot.Modules.Plugins
{
public class Owner : Module
public class Owner_Control : Module
{
public override void Initialize()
{

+ 36
- 0
Modules/Owner Control/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("Owner_Control 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")]

+ 37
- 0
Modules/Ping Me/Module.config View File

@@ -0,0 +1,37 @@
{
"Name": "Ping Me",
"ClassName": "Ping_Me",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Commands": [
{
"Name": "Ping Me",
"Description": "Checks the time it takes for a PING to be returned from a nick.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"pingme"
],
"Arguments": [],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
0,
1,
2,
3,
4,
5,
6
],
"ShowHelp": true,
"SpamCheck": true
}
],
"Options": []
}

+ 106
- 0
Modules/Ping Me/Ping Me.csproj View File

@@ -0,0 +1,106 @@
<?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>{18369F84-BD20-4946-B3D6-F2152148B2B4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Ping_Me</RootNamespace>
<AssemblyName>Ping Me</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\Modules\Ping Me\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\Ping Me\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="Ping_Me.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>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.1">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.1 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</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>

Combot/Modules/ModuleClasses/PingMe.cs → Modules/Ping Me/Ping_Me.cs View File

@@ -5,13 +5,13 @@ using System.Threading;
using Combot.IRCServices;
using Combot.IRCServices.Messaging;

namespace Combot.Modules.ModuleClasses
namespace Combot.Modules.Plugins
{
public class PingMe : Module
public class Ping_Me : Module
{
private List<PingItem> pingList;
private ReaderWriterLockSlim listLock;
public override void Initialize()
{
listLock = new ReaderWriterLockSlim();

+ 36
- 0
Modules/Ping Me/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("Ping_Me 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")]

+ 50
- 0
Modules/Search/Module.config View File

@@ -0,0 +1,50 @@
{
"Name": "Search",
"ClassName": "Search",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Commands": [
{
"Name": "Google",
"Description": "Searches Google for your query and returns the first result.",
"Enabled": true,
"ChannelBlacklist": [],
"NickBlacklist": [],
"Triggers": [
"g",
"google"
],
"Arguments": [
{
"Name": "Query",
"Description": "The query you want to search for.",
"AllowedValues": [],
"MessageTypes": [
0,
1,
2
],
"Required": true
}
],
"AllowedMessageTypes": [
0,
1,
2
],
"AllowedAccess": [
0,
1,
2,
3,
4,
5,
6
],
"ShowHelp": true,
"SpamCheck": true
}
],
"Options": []
}

+ 36
- 0
Modules/Search/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("Search 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")]

Combot/Modules/ModuleClasses/Search.cs → Modules/Search/Search.cs View File

@@ -6,7 +6,7 @@ using System.Web;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

namespace Combot.Modules.ModuleClasses
namespace Combot.Modules.Plugins
{
public class Search : Module
{
@@ -37,7 +37,7 @@ namespace Combot.Modules.ModuleClasses
web.Encoding = Encoding.UTF8;
string page = web.DownloadString(searchUrl);

JObject parsed = (JObject) JsonConvert.DeserializeObject(page);
JObject parsed = (JObject)JsonConvert.DeserializeObject(page);
int responseCode = parsed.Value<int>("responseStatus");
if (responseCode < 300 && responseCode >= 200)
{
@@ -127,4 +127,4 @@ namespace Combot.Modules.ModuleClasses
return new string(array, 0, arrayIndex);
}
}
}
}

+ 80
- 0
Modules/Search/Search.csproj View File

@@ -0,0 +1,80 @@
<?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>{EFAC8BA8-AF57-4D9C-9F00-1758FCC2F22E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Search</RootNamespace>
<AssemblyName>Search</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\Search\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\Search\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<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>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<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="Search.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>
<None Include="packages.config" />
</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>

+ 4
- 0
Modules/Search/packages.config View File

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

+ 9
- 0
Modules/Url Parsing/Module.config View File

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

+ 36
- 0
Modules/Url Parsing/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("Url_Parsing 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")]

+ 75
- 0
Modules/Url Parsing/Url Parsing.csproj View File

@@ -0,0 +1,75 @@
<?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>{1A544D51-1041-4A9A-B1ED-E738735DF52E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Url_Parsing</RootNamespace>
<AssemblyName>Url Parsing</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\Url Parsing\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\Url Parsing\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />