Browse Source

Fix compilation on Windows.

Graham 2 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
6 6
 *.swp
7 7
 Makefile
8 8
 .idea
9
+.vs
10
+data
11
+app.config

+ 5
- 2
Properties/AssemblyInfo.cs View File

@@ -6,8 +6,11 @@ using System.Reflection;
6 6
 [assembly: AssemblyConfiguration("")]
7 7
 [assembly: AssemblyCompany("")]
8 8
 [assembly: AssemblyProduct("")]
9
-[assembly: AssemblyCopyright("© 2016 Project Golan")]
9
+[assembly: AssemblyCopyright("© 2016-2017 Project Golan")]
10 10
 [assembly: AssemblyTrademark("")]
11 11
 [assembly: AssemblyCulture("")]
12 12
 [assembly: CLSCompliant(false)]
13
-[assembly: AssemblyVersion("3.1.*")]
13
+[assembly: AssemblyVersion("3.2.*")]
14
+
15
+// EOF
16
+

+ 1
- 12
README.md View File

@@ -1,13 +1,2 @@
1 1
 vrobot3 is a chat bot for IRC and Discord.
2
-
3
-Modules include:
4
-- `Mod_Admin`: Administrative commands.
5
-- `Mod_Audio`: Commands for servers that support audio.
6
-- `Mod_Fun`: :^)
7
-- `Mod_Idgames`: Commands for searching the /idgames archive.
8
-- `Mod_Links`: URI preview handling.
9
-- `Mod_Memo`: Memo server for leaving notes at people.
10
-- `Mod_Quote`: Doominati QDB commands.
11
-- `Mod_Seen`: Commands for checking the last time someone was online.
12
-- `Mod_Shittalk`: I blame Yholl
13
-- `Mod_Utils`: Utilities that are generally useful.
2
+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
82 82
          if(span.Seconds == 0)
83 83
             return "now";
84 84
 
85
-         var denom = span.Days > 0 ? "day" :
86
-                     span.Hours > 0 ? "hour" :
87
-                     span.Minutes > 0 ? "minute" :
88
-                     "second";
89
-
85
+         String denom;
90 86
          int number;
91
-         switch(denom)
92
-         {
93
-         default:       number = 0;            break;
94
-         case "second": number = span.Seconds; break;
95
-         case "minute": number = span.Minutes; break;
96
-         case "hour":   number = span.Hours;   break;
97
-         case "day":    number = span.Days;    break;
98
-         }
99 87
 
100
-         return $"{number} {denom}{number != 1 ? "s" : String.Empty} ago";
88
+              if(span.Days    > 0) {denom = "day";    number = span.Days;}
89
+         else if(span.Hours   > 0) {denom = "hour";   number = span.Hours;}
90
+         else if(span.Minutes > 0) {denom = "minute"; number = span.Minutes;}
91
+         else                      {denom = "second"; number = span.Seconds;}
92
+
93
+         return $"{number} {denom}{(number != 1 ? "s" : String.Empty)} ago";
101 94
       }
102 95
 
103 96
       //

+ 7
- 3
packages.config View File

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

+ 1
- 1
vrobot3.csproj View File

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

+ 11
- 163
vrobot3.sln View File

@@ -1,174 +1,22 @@
1 1
 
2 2
 Microsoft Visual Studio Solution File, Format Version 12.00
3
-# Visual Studio 2012
3
+# Visual Studio 14
4
+VisualStudioVersion = 14.0.25420.1
5
+MinimumVisualStudioVersion = 10.0.40219.1
4 6
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "vrobot3", "vrobot3.csproj", "{83337FF3-3334-42EC-824D-532FF0C973A9}"
5 7
 EndProject
6 8
 Global
7 9
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
8
-		Debug|AnyCPU = Debug|AnyCPU
9
-		Release|AnyCPU = Release|AnyCPU
10
+		Debug|Any CPU = Debug|Any CPU
11
+		Release|Any CPU = Release|Any CPU
10 12
 	EndGlobalSection
11 13
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
12
-		{83337FF3-3334-42EC-824D-532FF0C973A9}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU
13
-		{83337FF3-3334-42EC-824D-532FF0C973A9}.Debug|AnyCPU.Build.0 = Debug|AnyCPU
14
-		{83337FF3-3334-42EC-824D-532FF0C973A9}.Release|AnyCPU.ActiveCfg = Release|AnyCPU
15
-		{83337FF3-3334-42EC-824D-532FF0C973A9}.Release|AnyCPU.Build.0 = Release|AnyCPU
14
+		{83337FF3-3334-42EC-824D-532FF0C973A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15
+		{83337FF3-3334-42EC-824D-532FF0C973A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
16
+		{83337FF3-3334-42EC-824D-532FF0C973A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
17
+		{83337FF3-3334-42EC-824D-532FF0C973A9}.Release|Any CPU.Build.0 = Release|Any CPU
16 18
 	EndGlobalSection
17
-	GlobalSection(MonoDevelopProperties) = preSolution
18
-		Policies = $0
19
-		$0.DotNetNamingPolicy = $1
20
-		$1.DirectoryNamespaceAssociation = None
21
-		$1.ResourceNamePolicy = FileFormatDefault
22
-		$0.NameConventionPolicy = $2
23
-		$2.Rules = $3
24
-		$3.NamingRule = $4
25
-		$4.Name = Namespaces
26
-		$4.AffectedEntity = Namespace
27
-		$4.VisibilityMask = VisibilityMask
28
-		$4.NamingStyle = PascalCase
29
-		$4.IncludeInstanceMembers = True
30
-		$4.IncludeStaticEntities = True
31
-		$3.NamingRule = $5
32
-		$5.Name = Types
33
-		$5.AffectedEntity = Class, Struct, Enum, Delegate
34
-		$5.VisibilityMask = VisibilityMask
35
-		$5.NamingStyle = PascalCase
36
-		$5.IncludeInstanceMembers = True
37
-		$5.IncludeStaticEntities = True
38
-		$3.NamingRule = $6
39
-		$6.Name = Interfaces
40
-		$6.RequiredPrefixes = $7
41
-		$7.String = I
42
-		$6.AffectedEntity = Interface
43
-		$6.VisibilityMask = VisibilityMask
44
-		$6.NamingStyle = PascalCase
45
-		$6.IncludeInstanceMembers = True
46
-		$6.IncludeStaticEntities = True
47
-		$3.NamingRule = $8
48
-		$8.Name = Attributes
49
-		$8.RequiredSuffixes = $9
50
-		$9.String = Attribute
51
-		$8.AffectedEntity = CustomAttributes
52
-		$8.VisibilityMask = VisibilityMask
53
-		$8.NamingStyle = PascalCase
54
-		$8.IncludeInstanceMembers = True
55
-		$8.IncludeStaticEntities = True
56
-		$3.NamingRule = $10
57
-		$10.Name = Event Arguments
58
-		$10.RequiredSuffixes = $11
59
-		$11.String = EventArgs
60
-		$10.AffectedEntity = CustomEventArgs
61
-		$10.VisibilityMask = VisibilityMask
62
-		$10.NamingStyle = PascalCase
63
-		$10.IncludeInstanceMembers = True
64
-		$10.IncludeStaticEntities = True
65
-		$3.NamingRule = $12
66
-		$12.Name = Exceptions
67
-		$12.RequiredSuffixes = $13
68
-		$13.String = Exception
69
-		$12.AffectedEntity = CustomExceptions
70
-		$12.VisibilityMask = VisibilityMask
71
-		$12.NamingStyle = PascalCase
72
-		$12.IncludeInstanceMembers = True
73
-		$12.IncludeStaticEntities = True
74
-		$3.NamingRule = $14
75
-		$14.Name = Methods
76
-		$14.AffectedEntity = Methods
77
-		$14.VisibilityMask = VisibilityMask
78
-		$14.NamingStyle = PascalCase
79
-		$14.IncludeInstanceMembers = True
80
-		$14.IncludeStaticEntities = True
81
-		$3.NamingRule = $15
82
-		$15.Name = Static Readonly Fields
83
-		$15.AffectedEntity = ReadonlyField
84
-		$15.VisibilityMask = Internal, Protected, Public
85
-		$15.NamingStyle = PascalCase
86
-		$15.IncludeInstanceMembers = False
87
-		$15.IncludeStaticEntities = True
88
-		$3.NamingRule = $16
89
-		$16.Name = Fields (Non Private)
90
-		$16.AffectedEntity = Field
91
-		$16.VisibilityMask = Internal, Protected, Public
92
-		$16.NamingStyle = PascalCase
93
-		$16.IncludeInstanceMembers = True
94
-		$16.IncludeStaticEntities = True
95
-		$3.NamingRule = $17
96
-		$17.Name = ReadOnly Fields (Non Private)
97
-		$17.AffectedEntity = ReadonlyField
98
-		$17.VisibilityMask = Internal, Protected, Public
99
-		$17.NamingStyle = PascalCase
100
-		$17.IncludeInstanceMembers = True
101
-		$17.IncludeStaticEntities = False
102
-		$3.NamingRule = $18
103
-		$18.Name = Fields (Private)
104
-		$18.AllowedPrefixes = $19
105
-		$19.String = _
106
-		$19.String = m_
107
-		$18.AffectedEntity = Field, ReadonlyField
108
-		$18.VisibilityMask = Private
109
-		$18.NamingStyle = AllLower
110
-		$18.IncludeInstanceMembers = True
111
-		$18.IncludeStaticEntities = False
112
-		$3.NamingRule = $20
113
-		$20.Name = Static Fields (Private)
114
-		$20.AffectedEntity = Field
115
-		$20.VisibilityMask = Private
116
-		$20.NamingStyle = AllLower
117
-		$20.IncludeInstanceMembers = False
118
-		$20.IncludeStaticEntities = True
119
-		$3.NamingRule = $21
120
-		$21.Name = ReadOnly Fields (Private)
121
-		$21.AllowedPrefixes = $22
122
-		$22.String = _
123
-		$22.String = m_
124
-		$21.AffectedEntity = ReadonlyField
125
-		$21.VisibilityMask = Private
126
-		$21.NamingStyle = AllLower
127
-		$21.IncludeInstanceMembers = True
128
-		$21.IncludeStaticEntities = False
129
-		$3.NamingRule = $23
130
-		$23.Name = Constant Fields
131
-		$23.AffectedEntity = ConstantField
132
-		$23.VisibilityMask = VisibilityMask
133
-		$23.NamingStyle = PascalCase
134
-		$23.IncludeInstanceMembers = True
135
-		$23.IncludeStaticEntities = True
136
-		$3.NamingRule = $24
137
-		$24.Name = Properties
138
-		$24.AffectedEntity = Property
139
-		$24.VisibilityMask = VisibilityMask
140
-		$24.NamingStyle = PascalCase
141
-		$24.IncludeInstanceMembers = True
142
-		$24.IncludeStaticEntities = True
143
-		$3.NamingRule = $25
144
-		$25.Name = Events
145
-		$25.AffectedEntity = Event
146
-		$25.VisibilityMask = VisibilityMask
147
-		$25.NamingStyle = PascalCase
148
-		$25.IncludeInstanceMembers = True
149
-		$25.IncludeStaticEntities = True
150
-		$3.NamingRule = $26
151
-		$26.Name = Enum Members
152
-		$26.AffectedEntity = EnumMember
153
-		$26.VisibilityMask = VisibilityMask
154
-		$26.NamingStyle = PascalCase
155
-		$26.IncludeInstanceMembers = True
156
-		$26.IncludeStaticEntities = True
157
-		$3.NamingRule = $27
158
-		$27.Name = Parameters
159
-		$27.AffectedEntity = Parameter
160
-		$27.VisibilityMask = VisibilityMask
161
-		$27.NamingStyle = AllLower
162
-		$27.IncludeInstanceMembers = True
163
-		$27.IncludeStaticEntities = True
164
-		$3.NamingRule = $28
165
-		$28.Name = Type Parameters
166
-		$28.RequiredPrefixes = $29
167
-		$29.String = T
168
-		$28.AffectedEntity = TypeParameter
169
-		$28.VisibilityMask = VisibilityMask
170
-		$28.NamingStyle = PascalCase
171
-		$28.IncludeInstanceMembers = True
172
-		$28.IncludeStaticEntities = True
19
+	GlobalSection(SolutionProperties) = preSolution
20
+		HideSolutionNode = FALSE
173 21
 	EndGlobalSection
174 22
 EndGlobal

Loading…
Cancel
Save