Browse Source

Fix compilation on Windows.

master
Graham 4 years ago
parent
commit
e2a4c64dae
7 changed files with 35 additions and 195 deletions
  1. +3
    -0
      .gitignore
  2. +5
    -2
      Properties/AssemblyInfo.cs
  3. +1
    -12
      README.md
  4. +7
    -14
      Source/Utils.cs
  5. +7
    -3
      packages.config
  6. +1
    -1
      vrobot3.csproj
  7. +11
    -163
      vrobot3.sln

+ 3
- 0
.gitignore View File

@@ -6,3 +6,6 @@ packages
*.swp
Makefile
.idea
.vs
data
app.config

+ 5
- 2
Properties/AssemblyInfo.cs View File

@@ -6,8 +6,11 @@ using System.Reflection;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("© 2016 Project Golan")]
[assembly: AssemblyCopyright("© 2016-2017 Project Golan")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: CLSCompliant(false)]
[assembly: AssemblyVersion("3.1.*")]
[assembly: AssemblyVersion("3.2.*")]

// EOF


+ 1
- 12
README.md View File

@@ -1,13 +1,2 @@
vrobot3 is a chat bot for IRC and Discord.

Modules include:
- `Mod_Admin`: Administrative commands.
- `Mod_Audio`: Commands for servers that support audio.
- `Mod_Fun`: :^)
- `Mod_Idgames`: Commands for searching the /idgames archive.
- `Mod_Links`: URI preview handling.
- `Mod_Memo`: Memo server for leaving notes at people.
- `Mod_Quote`: Doominati QDB commands.
- `Mod_Seen`: Commands for checking the last time someone was online.
- `Mod_Shittalk`: I blame Yholl
- `Mod_Utils`: Utilities that are generally useful.
Includes modules for bot administration, useful utilities like memos, and more.

+ 7
- 14
Source/Utils.cs View File

@@ -82,22 +82,15 @@ namespace ProjectGolan.Vrobot3
if(span.Seconds == 0)
return "now";

var denom = span.Days > 0 ? "day" :
span.Hours > 0 ? "hour" :
span.Minutes > 0 ? "minute" :
"second";

String denom;
int number;
switch(denom)
{
default: number = 0; break;
case "second": number = span.Seconds; break;
case "minute": number = span.Minutes; break;
case "hour": number = span.Hours; break;
case "day": number = span.Days; break;
}

return $"{number} {denom}{number != 1 ? "s" : String.Empty} ago";
if(span.Days > 0) {denom = "day"; number = span.Days;}
else if(span.Hours > 0) {denom = "hour"; number = span.Hours;}
else if(span.Minutes > 0) {denom = "minute"; number = span.Minutes;}
else {denom = "second"; number = span.Seconds;}

return $"{number} {denom}{(number != 1 ? "s" : String.Empty)} ago";
}

//


+ 7
- 3
packages.config View File

@@ -1,11 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Discord.Net" version="0.9.6" targetFramework="net45" />
<package id="Discord.Net.Audio" version="0.9.6" targetFramework="net45" />
<package id="HtmlAgilityPack" version="1.4.9.5" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.2-beta1" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net45" />
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net45" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net45" />
<package id="Nito.AsyncEx" version="3.0.1" targetFramework="net45" />
<package id="NtpDateTime" version="1.0.8" targetFramework="net45" />
<package id="RestSharp" version="105.2.3" targetFramework="net45" />
<package id="WebSocket4Net" version="0.14.1" targetFramework="net45" />
<package id="SuperSocket.ClientEngine.Core" version="0.8.0.8" targetFramework="net45" />
<package id="WebSocket4Net" version="0.14.1.0" targetFramework="net45" />
</packages>

+ 1
- 1
vrobot3.csproj View File

@@ -47,7 +47,7 @@
<HintPath>packages/HtmlAgilityPack.1.4.9.5/lib/Net45/HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>packages/Newtonsoft.Json.9.0.2-beta1/lib/net45/Newtonsoft.Json.dll</HintPath>
<HintPath>packages/Newtonsoft.Json.8.0.3/lib/net45/Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NtpDateTime">
<HintPath>packages/NtpDateTime.1.0.8/lib/NtpDateTime.dll</HintPath>


+ 11
- 163
vrobot3.sln View File

@@ -1,174 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vrobot3", "vrobot3.csproj", "{83337FF3-3334-42EC-824D-532FF0C973A9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|AnyCPU = Debug|AnyCPU
Release|AnyCPU = Release|AnyCPU
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{83337FF3-3334-42EC-824D-532FF0C973A9}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU
{83337FF3-3334-42EC-824D-532FF0C973A9}.Debug|AnyCPU.Build.0 = Debug|AnyCPU
{83337FF3-3334-42EC-824D-532FF0C973A9}.Release|AnyCPU.ActiveCfg = Release|AnyCPU
{83337FF3-3334-42EC-824D-532FF0C973A9}.Release|AnyCPU.Build.0 = Release|AnyCPU
{83337FF3-3334-42EC-824D-532FF0C973A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83337FF3-3334-42EC-824D-532FF0C973A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83337FF3-3334-42EC-824D-532FF0C973A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83337FF3-3334-42EC-824D-532FF0C973A9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.DotNetNamingPolicy = $1
$1.DirectoryNamespaceAssociation = None
$1.ResourceNamePolicy = FileFormatDefault
$0.NameConventionPolicy = $2
$2.Rules = $3
$3.NamingRule = $4
$4.Name = Namespaces
$4.AffectedEntity = Namespace
$4.VisibilityMask = VisibilityMask
$4.NamingStyle = PascalCase
$4.IncludeInstanceMembers = True
$4.IncludeStaticEntities = True
$3.NamingRule = $5
$5.Name = Types
$5.AffectedEntity = Class, Struct, Enum, Delegate
$5.VisibilityMask = VisibilityMask
$5.NamingStyle = PascalCase
$5.IncludeInstanceMembers = True
$5.IncludeStaticEntities = True
$3.NamingRule = $6
$6.Name = Interfaces
$6.RequiredPrefixes = $7
$7.String = I
$6.AffectedEntity = Interface
$6.VisibilityMask = VisibilityMask
$6.NamingStyle = PascalCase
$6.IncludeInstanceMembers = True
$6.IncludeStaticEntities = True
$3.NamingRule = $8
$8.Name = Attributes
$8.RequiredSuffixes = $9
$9.String = Attribute
$8.AffectedEntity = CustomAttributes
$8.VisibilityMask = VisibilityMask
$8.NamingStyle = PascalCase
$8.IncludeInstanceMembers = True
$8.IncludeStaticEntities = True
$3.NamingRule = $10
$10.Name = Event Arguments
$10.RequiredSuffixes = $11
$11.String = EventArgs
$10.AffectedEntity = CustomEventArgs
$10.VisibilityMask = VisibilityMask
$10.NamingStyle = PascalCase
$10.IncludeInstanceMembers = True
$10.IncludeStaticEntities = True
$3.NamingRule = $12
$12.Name = Exceptions
$12.RequiredSuffixes = $13
$13.String = Exception
$12.AffectedEntity = CustomExceptions
$12.VisibilityMask = VisibilityMask
$12.NamingStyle = PascalCase
$12.IncludeInstanceMembers = True
$12.IncludeStaticEntities = True
$3.NamingRule = $14
$14.Name = Methods
$14.AffectedEntity = Methods
$14.VisibilityMask = VisibilityMask
$14.NamingStyle = PascalCase
$14.IncludeInstanceMembers = True
$14.IncludeStaticEntities = True
$3.NamingRule = $15
$15.Name = Static Readonly Fields
$15.AffectedEntity = ReadonlyField
$15.VisibilityMask = Internal, Protected, Public
$15.NamingStyle = PascalCase
$15.IncludeInstanceMembers = False
$15.IncludeStaticEntities = True
$3.NamingRule = $16
$16.Name = Fields (Non Private)
$16.AffectedEntity = Field
$16.VisibilityMask = Internal, Protected, Public
$16.NamingStyle = PascalCase
$16.IncludeInstanceMembers = True
$16.IncludeStaticEntities = True
$3.NamingRule = $17
$17.Name = ReadOnly Fields (Non Private)
$17.AffectedEntity = ReadonlyField
$17.VisibilityMask = Internal, Protected, Public
$17.NamingStyle = PascalCase
$17.IncludeInstanceMembers = True
$17.IncludeStaticEntities = False
$3.NamingRule = $18
$18.Name = Fields (Private)
$18.AllowedPrefixes = $19
$19.String = _
$19.String = m_
$18.AffectedEntity = Field, ReadonlyField
$18.VisibilityMask = Private
$18.NamingStyle = AllLower
$18.IncludeInstanceMembers = True
$18.IncludeStaticEntities = False
$3.NamingRule = $20
$20.Name = Static Fields (Private)
$20.AffectedEntity = Field
$20.VisibilityMask = Private
$20.NamingStyle = AllLower
$20.IncludeInstanceMembers = False
$20.IncludeStaticEntities = True
$3.NamingRule = $21
$21.Name = ReadOnly Fields (Private)
$21.AllowedPrefixes = $22
$22.String = _
$22.String = m_
$21.AffectedEntity = ReadonlyField
$21.VisibilityMask = Private
$21.NamingStyle = AllLower
$21.IncludeInstanceMembers = True
$21.IncludeStaticEntities = False
$3.NamingRule = $23
$23.Name = Constant Fields
$23.AffectedEntity = ConstantField
$23.VisibilityMask = VisibilityMask
$23.NamingStyle = PascalCase
$23.IncludeInstanceMembers = True
$23.IncludeStaticEntities = True
$3.NamingRule = $24
$24.Name = Properties
$24.AffectedEntity = Property
$24.VisibilityMask = VisibilityMask
$24.NamingStyle = PascalCase
$24.IncludeInstanceMembers = True
$24.IncludeStaticEntities = True
$3.NamingRule = $25
$25.Name = Events
$25.AffectedEntity = Event
$25.VisibilityMask = VisibilityMask
$25.NamingStyle = PascalCase
$25.IncludeInstanceMembers = True
$25.IncludeStaticEntities = True
$3.NamingRule = $26
$26.Name = Enum Members
$26.AffectedEntity = EnumMember
$26.VisibilityMask = VisibilityMask
$26.NamingStyle = PascalCase
$26.IncludeInstanceMembers = True
$26.IncludeStaticEntities = True
$3.NamingRule = $27
$27.Name = Parameters
$27.AffectedEntity = Parameter
$27.VisibilityMask = VisibilityMask
$27.NamingStyle = AllLower
$27.IncludeInstanceMembers = True
$27.IncludeStaticEntities = True
$3.NamingRule = $28
$28.Name = Type Parameters
$28.RequiredPrefixes = $29
$29.String = T
$28.AffectedEntity = TypeParameter
$28.VisibilityMask = VisibilityMask
$28.NamingStyle = PascalCase
$28.IncludeInstanceMembers = True
$28.IncludeStaticEntities = True
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Loading…
Cancel
Save