Chat history stuff
fixed kills not saving
This commit is contained in:
parent
308427e662
commit
07e3c61e98
@ -165,6 +165,9 @@
|
|||||||
<Content Include="webfront\images\minimap_mp_terminal.png">
|
<Content Include="webfront\images\minimap_mp_terminal.png">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
|
<Content Include="webfront\scripts\wordcloud2.js">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
<Content Include="webfront\stats.html">
|
<Content Include="webfront\stats.html">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
@ -363,7 +366,6 @@ copy /Y "$(ProjectDir)lib\Kayak.dll" "$(SolutionDir)BUILD\lib"
|
|||||||
|
|
||||||
xcopy /Y /I /E "$(ProjectDir)webfront\*" "$(SolutionDir)BUILD\Webfront"
|
xcopy /Y /I /E "$(ProjectDir)webfront\*" "$(SolutionDir)BUILD\Webfront"
|
||||||
|
|
||||||
|
|
||||||
if $(ConfigurationName) == Release-Nightly powershell.exe -file "$(SolutionDir)DEPLOY\publish_nightly.ps1" 1.4
|
if $(ConfigurationName) == Release-Nightly powershell.exe -file "$(SolutionDir)DEPLOY\publish_nightly.ps1" 1.4
|
||||||
if $(ConfigurationName) == Release-Stable powershell.exe -file "$(SolutionDir)DEPLOY\publish_stable.ps1" 1.4</PostBuildEvent>
|
if $(ConfigurationName) == Release-Stable powershell.exe -file "$(SolutionDir)DEPLOY\publish_stable.ps1" 1.4</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
@ -362,7 +362,7 @@ namespace IW4MAdmin
|
|||||||
|
|
||||||
if ((lastCount - playerCountStart).TotalMinutes >= SharedLibrary.Helpers.PlayerHistory.UpdateInterval)
|
if ((lastCount - playerCountStart).TotalMinutes >= SharedLibrary.Helpers.PlayerHistory.UpdateInterval)
|
||||||
{
|
{
|
||||||
while (PlayerHistory.Count > ((60 / SharedLibrary.Helpers.PlayerHistory.UpdateInterval) * 12 )) // 12 times a hour for 12 hours
|
while (PlayerHistory.Count > ((60 / SharedLibrary.Helpers.PlayerHistory.UpdateInterval) * 12)) // 12 times a hour for 12 hours
|
||||||
PlayerHistory.Dequeue();
|
PlayerHistory.Dequeue();
|
||||||
PlayerHistory.Enqueue(new SharedLibrary.Helpers.PlayerHistory(ClientNum));
|
PlayerHistory.Enqueue(new SharedLibrary.Helpers.PlayerHistory(ClientNum));
|
||||||
playerCountStart = DateTime.Now;
|
playerCountStart = DateTime.Now;
|
||||||
@ -593,8 +593,9 @@ namespace IW4MAdmin
|
|||||||
else // Not a command
|
else // Not a command
|
||||||
{
|
{
|
||||||
E.Data = E.Data.StripColors().CleanChars();
|
E.Data = E.Data.StripColors().CleanChars();
|
||||||
if (E.Data.Length > 50)
|
// this should not be done for all messages.
|
||||||
E.Data = E.Data.Substring(0, 50) + "...";
|
//if (E.Data.Length > 50)
|
||||||
|
// E.Data = E.Data.Substring(0, 50) + "...";
|
||||||
|
|
||||||
ChatHistory.Add(new Chat(E.Origin.Name, E.Data, DateTime.Now));
|
ChatHistory.Add(new Chat(E.Origin.Name, E.Data, DateTime.Now));
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
@ -1 +1,31 @@
|
|||||||
|
<script src="/webfront/scripts/wordcloud2.js"></script>
|
||||||
|
<div class="chat-history"></div>
|
||||||
|
<canvas id="chat-word-cloud" width="625" height="625"></canvas>
|
||||||
|
<script>
|
||||||
|
if (parseGet("clientid") == "undefined") {
|
||||||
|
$.getJSON("/_words", function (result) {
|
||||||
|
var wordList = [];
|
||||||
|
$.each(result, function (i, word) {
|
||||||
|
wordList.push([word.Word, word.Count]);
|
||||||
|
});
|
||||||
|
|
||||||
|
WordCloud(document.getElementById('chat-word-cloud'), { list: wordList, backgroundColor: "rgb(34,34,34)", minSize: "14pt", color: "rgb(0, 122, 204)", wait: 20, weightFactor: 2 });
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
$.getJSON("/_clientchat?clientid=" + parseGet("clientid"), function (result) {
|
||||||
|
result = result.sort(function (a, b) {
|
||||||
|
// Turn your strings into dates, and then subtract them
|
||||||
|
// to get a value that is either negative, positive, or zero.
|
||||||
|
return new Date(b.TimeSent) - new Date(a.TimeSent);
|
||||||
|
});
|
||||||
|
|
||||||
|
$.each(result, function (i, chat) {
|
||||||
|
var date = new Date(chat.TimeSent);
|
||||||
|
$('.chat-history').append("<div><span>" + date.toLocaleString() + " — </span><span><b>" + chat.Client.Name + "</b></span>: <span>" + chat.Message + "</span></div>");
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
@ -1,134 +1,113 @@
|
|||||||
<script>
|
<script>
|
||||||
var curFrom = 0;
|
var curFrom = 0;
|
||||||
|
|
||||||
function getNextPage()
|
function getNextPage() {
|
||||||
{
|
curFrom += 15;
|
||||||
curFrom += 15;
|
return curFrom;
|
||||||
return curFrom;
|
|
||||||
}
|
|
||||||
|
|
||||||
function getPrevPage()
|
|
||||||
{
|
|
||||||
if ((curFrom - 15) >= 0)
|
|
||||||
{
|
|
||||||
curFrom -= 15;
|
|
||||||
return (curFrom - 15);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
function formatHidden(data, authed)
|
|
||||||
{
|
|
||||||
var p = "<div class=\"hiddenWrapper\"><span>Expand</span><div class=\"hiddenElements\">";
|
|
||||||
|
|
||||||
if (authed) {
|
|
||||||
$.each(data, function (i, dat) {
|
|
||||||
p += "<span>" + dat + "</span><br/>"
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
function getPrevPage() {
|
||||||
p += "Hidden";
|
if ((curFrom - 15) >= 0) {
|
||||||
|
curFrom -= 15;
|
||||||
|
return (curFrom - 15);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
p += "</div></div>"
|
function formatHidden(data, authed) {
|
||||||
|
var p = "<div class=\"hiddenWrapper\"><span>Expand</span><div class=\"hiddenElements\">";
|
||||||
|
|
||||||
return p;
|
if (authed) {
|
||||||
}
|
$.each(data, function (i, dat) {
|
||||||
|
p += "<span>" + dat + "</span><br/>"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
function printPlayer(player, i)
|
else
|
||||||
{
|
p += "Hidden";
|
||||||
var p = "";
|
|
||||||
p +=
|
p += "</div></div>"
|
||||||
"<div class=\"playerInfo table alternate_" + i % 2 + "\"> \
|
|
||||||
|
return p;
|
||||||
|
}
|
||||||
|
|
||||||
|
function printPlayer(player, i) {
|
||||||
|
var p = "";
|
||||||
|
p +=
|
||||||
|
"<div class=\"playerInfo table alternate_" + i % 2 + "\"> \
|
||||||
<div class=\"tableCell\"><a href=\"/players?id=" + player['playerID'] + "\">" + player['playerName'] + "</a></div> \
|
<div class=\"tableCell\"><a href=\"/players?id=" + player['playerID'] + "\">" + player['playerName'] + "</a></div> \
|
||||||
<div class=\"tableCell\">" + formatHidden(player['playerAliases'], player.authed) + "</div> \
|
<div class=\"tableCell\">" + formatHidden(player['playerAliases'], player.authed) + "</div> \
|
||||||
<div class=\"tableCell\">" + formatHidden(player['playerIPs'], player.authed) + "</div> \
|
<div class=\"tableCell\">" + formatHidden(player['playerIPs'], player.authed) + "</div> \
|
||||||
<div class=\"tableCell\">" + getColorForLevel(player['playerLevel'], player['playerLevel']) + "</div> \
|
<div class=\"tableCell\">" + getColorForLevel(player['playerLevel'], player['playerLevel']) + "</div> \
|
||||||
<div class=\"tableCell\">" + player['playerConnections'] + "</div>";
|
<div class=\"tableCell\">" + player['playerConnections'] + "</div>";
|
||||||
|
|
||||||
if (player.showV2Features)
|
|
||||||
{
|
|
||||||
p +=
|
p +=
|
||||||
"<div class=\"tableCell actionButton\" style='width: 2em;'> \
|
"<div class=\"tableCell\" style='width: 2em;'><a href=\"/chat?clientid=" + player.playerID + "\"><i class=\"fa fa-comments\" aria-hidden=\"true\"></i></a></div>"
|
||||||
<a target=\"_blank\" href='http://server.nbsclan.org/screen.php?id=" + player.forumID + "&name=" + player.playerName + "'> \
|
|
||||||
<i class=\"fa fa-camera\" aria-hidden=\"true\"></i> \
|
|
||||||
</a> \
|
|
||||||
<a target=\"_blank\" href='https://v2.mcsebi.ru/memberlist.php?mode=viewprofile&u=" + player.forumID + "'> \
|
|
||||||
<i class=\"fa fa-user tableCell\" aria-hidden=\"true\"></i> \
|
|
||||||
</a> \
|
|
||||||
</div> ";
|
|
||||||
}
|
|
||||||
|
|
||||||
else
|
p +=
|
||||||
{
|
"<div class=\"tableCell alignRight\">" + checkJustNow(player['lastSeen']) + "</div> \
|
||||||
p+=
|
|
||||||
"<div class=\"tableCell\" style='width: 2em;'><i class=\"fa fa-ban\" aria-hidden=\"true\"></i></div>"
|
|
||||||
}
|
|
||||||
|
|
||||||
p +=
|
|
||||||
"<div class=\"tableCell alignRight\">" + checkJustNow(player['lastSeen']) + "</div> \
|
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
$("#playersTable").append(p);
|
$("#playersTable").append(p);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function getPlayer(ident, identValue)
|
|
||||||
{
|
|
||||||
$("#playersTable").html("");
|
|
||||||
$(".loader").fadeIn();
|
|
||||||
|
|
||||||
$.getJSON("/getplayer?" + ident + "=" + identValue, function(result) {
|
|
||||||
$.each(result, function(i, player) {
|
|
||||||
printPlayer(player, i);
|
|
||||||
});
|
|
||||||
}).done(function (data) { $(".loader").fadeOut(); });
|
|
||||||
}
|
|
||||||
|
|
||||||
$( document ).ready(function() {
|
|
||||||
if (parseGet('id') != "undefined")
|
|
||||||
getPlayer('id', parseGet('id'));
|
|
||||||
else if (parseGet('name') != "undefined")
|
|
||||||
getPlayer('name', parseGet('name'));
|
|
||||||
else {
|
|
||||||
getPlayer('recent', '1');
|
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
$('#content').on('click', 'div.hiddenWrapper span', function(){
|
function getPlayer(ident, identValue) {
|
||||||
$(this).parent().find('.hiddenElements').toggle()
|
$("#playersTable").html("");
|
||||||
});
|
$(".loader").fadeIn();
|
||||||
|
|
||||||
|
$.getJSON("/getplayer?" + ident + "=" + identValue, function (result) {
|
||||||
|
$.each(result, function (i, player) {
|
||||||
|
printPlayer(player, i);
|
||||||
|
});
|
||||||
|
}).done(function (data) { $(".loader").fadeOut(); });
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
if (parseGet('id') != "undefined")
|
||||||
|
getPlayer('id', parseGet('id'));
|
||||||
|
else if (parseGet('name') != "undefined")
|
||||||
|
getPlayer('name', parseGet('name'));
|
||||||
|
else {
|
||||||
|
getPlayer('recent', '1');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#content').on('click', 'div.hiddenWrapper span', function () {
|
||||||
|
$(this).parent().find('.hiddenElements').toggle()
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="playerSearchWrap">
|
<div class="playerSearchWrap">
|
||||||
<input type="button" class="searchButton" name="Search" value="Search"/>
|
<input type="button" class="searchButton" name="Search" value="Search" />
|
||||||
<input type="text" class="search" placeholder="Player Name..."/>
|
<input type="text" class="search" placeholder="Player Name..." />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="contentHeader table">
|
<div class="contentHeader table">
|
||||||
<div class="contentColumn tableCell">Name</div>
|
<div class="contentColumn tableCell">Name</div>
|
||||||
<div class="contentColumn tableCell">Aliases</div>
|
<div class="contentColumn tableCell">Aliases</div>
|
||||||
<div class="contentColumn tableCell">IP</div>
|
<div class="contentColumn tableCell">IP</div>
|
||||||
<div class="contentColumn tableCell">Level</div>
|
<div class="contentColumn tableCell">Level</div>
|
||||||
<div class="contentColumn tableCell">Connections</div>
|
<div class="contentColumn tableCell">Connections</div>
|
||||||
<div class="contentColumn tableCell" style="width: 1em;">V2</div>
|
<div class="contentColumn tableCell" style="width: 1em;">Chat</div>
|
||||||
<div class="contentColumn tableCell alignRight">Last Seen</div>
|
<div class="contentColumn tableCell alignRight">Last Seen</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="playersTable">
|
<div id="playersTable">
|
||||||
</div>
|
</div>
|
||||||
<hr/>
|
<hr />
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$('.searchButton').click(function() {
|
$('.searchButton').click(function () {
|
||||||
if ($('.search').val().length > 0)
|
if ($('.search').val().length > 0)
|
||||||
getPlayer('name', $('.search').val());
|
getPlayer('name', $('.search').val());
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).keypress(function(e) {
|
$(document).keypress(function (e) {
|
||||||
if(e.which == 13) {
|
if (e.which == 13) {
|
||||||
$('.searchButton').click();
|
$('.searchButton').click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
2369
Admin/webfront/scripts/wordcloud2.js
Normal file
2369
Admin/webfront/scripts/wordcloud2.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -75,8 +75,8 @@ Global
|
|||||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
||||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
||||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Stable|Any CPU.Build.0 = Release-Stable|Any CPU
|
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Stable|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||||
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
{DD5DCDA2-51DB-4B1A-922F-5705546E6115}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
@ -99,8 +99,8 @@ Global
|
|||||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
||||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
||||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Any CPU.Build.0 = Release-Stable|Any CPU
|
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||||
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
{4785AB75-66F3-4391-985D-63A5A049A0FA}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
@ -123,8 +123,8 @@ Global
|
|||||||
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
||||||
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
||||||
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|Any CPU.Build.0 = Release-Stable|Any CPU
|
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||||
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||||
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
{D51EECEB-438A-47DA-870F-7D7B41BC24D6}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
@ -147,8 +147,8 @@ Global
|
|||||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
||||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
||||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Any CPU.Build.0 = Release-Stable|Any CPU
|
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||||
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
{AF097E6B-48D5-4452-9CCF-0A81A21F341D}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
@ -164,14 +164,13 @@ Global
|
|||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Debug|x86.ActiveCfg = Debug|x86
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Debug|x86.Build.0 = Debug|x86
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Debug|x86.Build.0 = Debug|x86
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|Any CPU.Build.0 = Release-Nightly|Any CPU
|
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|Mixed Platforms.Build.0 = Release-Nightly|x86
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|Mixed Platforms.Build.0 = Release-Nightly|x86
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|x64.ActiveCfg = Release-Nightly|Any CPU
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|x64.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||||
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
{428D8EB9-ECA3-4A66-AA59-3A944378C33F}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
@ -184,13 +183,12 @@ Global
|
|||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Debug|x64.ActiveCfg = Release-Stable|Any CPU
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Debug|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Debug|x86.ActiveCfg = Debug|x86
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Debug|x86.Build.0 = Debug|x86
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Debug|x86.Build.0 = Debug|x86
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|Any CPU.Build.0 = Release-Stable|Any CPU
|
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Stable|Any CPU
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Stable|Any CPU
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|x64.ActiveCfg = Release-Stable|Any CPU
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|Any CPU
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|Any CPU
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Stable|x86.ActiveCfg = Release-Stable|Any CPU
|
{E46C85BD-A99C-484E-BCCE-0F1831C5925E}.Release-Stable|x86.ActiveCfg = Release-Stable|Any CPU
|
||||||
@ -211,8 +209,8 @@ Global
|
|||||||
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
||||||
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
||||||
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Stable|Any CPU.Build.0 = Release-Stable|Any CPU
|
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Stable|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||||
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||||
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
{C9E821BF-23AD-4CB5-B7F9-B3B99B606650}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
@ -228,14 +226,13 @@ Global
|
|||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Debug|x86.ActiveCfg = Debug|x86
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Debug|x86.Build.0 = Debug|x86
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Debug|x86.Build.0 = Debug|x86
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|Any CPU.Build.0 = Release-Nightly|Any CPU
|
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|Mixed Platforms.Build.0 = Release-Nightly|x86
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|Mixed Platforms.Build.0 = Release-Nightly|x86
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|x64.ActiveCfg = Release-Nightly|Any CPU
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|x64.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||||
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
{1479DE87-ACB5-4046-81C8-A0BA5041227D}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
@ -251,15 +248,13 @@ Global
|
|||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Debug|x86.ActiveCfg = Debug|x86
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Debug|x86.Build.0 = Debug|x86
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Debug|x86.Build.0 = Debug|x86
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|Any CPU.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|Any CPU.Build.0 = Release-Nightly|Any CPU
|
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|Mixed Platforms.ActiveCfg = Release-Nightly|x86
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|Mixed Platforms.Build.0 = Release-Nightly|x86
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|Mixed Platforms.Build.0 = Release-Nightly|x86
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x64.ActiveCfg = Release-Nightly|Any CPU
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x64.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x64.Build.0 = Release-Nightly|Any CPU
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x86.ActiveCfg = Release-Nightly|Any CPU
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Nightly|x86.Build.0 = Release-Nightly|Any CPU
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|Any CPU.ActiveCfg = Release-Stable|Any CPU
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|Any CPU.Build.0 = Release-Stable|Any CPU
|
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|Mixed Platforms.ActiveCfg = Release-Stable|x86
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|Mixed Platforms.Build.0 = Release-Stable|x86
|
||||||
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
{B8C2A759-8663-4F6F-9BA4-19595F5E12C1}.Release-Stable|x64.ActiveCfg = Release-Stable|Any CPU
|
||||||
|
@ -12,6 +12,86 @@ namespace StatsPlugin
|
|||||||
{
|
{
|
||||||
public class ChatDatabase : Database
|
public class ChatDatabase : Database
|
||||||
{
|
{
|
||||||
|
private string[] CommonWords = new string[] { "for",
|
||||||
|
"with",
|
||||||
|
"from",
|
||||||
|
"about",
|
||||||
|
"into",
|
||||||
|
"over",
|
||||||
|
"after",
|
||||||
|
"that",
|
||||||
|
"not",
|
||||||
|
"you",
|
||||||
|
"this",
|
||||||
|
"but",
|
||||||
|
"his",
|
||||||
|
"they",
|
||||||
|
"her",
|
||||||
|
"she",
|
||||||
|
"will",
|
||||||
|
"one",
|
||||||
|
"all",
|
||||||
|
"would",
|
||||||
|
"there",
|
||||||
|
"their",
|
||||||
|
"have",
|
||||||
|
"say",
|
||||||
|
"get",
|
||||||
|
"make",
|
||||||
|
"know",
|
||||||
|
"take",
|
||||||
|
"see",
|
||||||
|
"come",
|
||||||
|
"think",
|
||||||
|
"look",
|
||||||
|
"want",
|
||||||
|
"give",
|
||||||
|
"use",
|
||||||
|
"find",
|
||||||
|
"tell",
|
||||||
|
"ask",
|
||||||
|
"work",
|
||||||
|
"seem",
|
||||||
|
"feel",
|
||||||
|
"try",
|
||||||
|
"leave",
|
||||||
|
"call",
|
||||||
|
"good",
|
||||||
|
"new",
|
||||||
|
"first",
|
||||||
|
"last",
|
||||||
|
"long",
|
||||||
|
"great",
|
||||||
|
"little",
|
||||||
|
"own",
|
||||||
|
"other",
|
||||||
|
"old",
|
||||||
|
"right",
|
||||||
|
"big",
|
||||||
|
"high",
|
||||||
|
"small",
|
||||||
|
"large",
|
||||||
|
"next",
|
||||||
|
"early",
|
||||||
|
"young",
|
||||||
|
"important",
|
||||||
|
"few",
|
||||||
|
"public",
|
||||||
|
"same",
|
||||||
|
"able",
|
||||||
|
"the",
|
||||||
|
"and",
|
||||||
|
"that",
|
||||||
|
"have",
|
||||||
|
"this",
|
||||||
|
"one",
|
||||||
|
"would",
|
||||||
|
"yeah",
|
||||||
|
"yah",
|
||||||
|
"why",
|
||||||
|
"who" ,
|
||||||
|
"when"};
|
||||||
|
|
||||||
public ChatDatabase(string FN) : base(FN)
|
public ChatDatabase(string FN) : base(FN)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -65,6 +145,9 @@ namespace StatsPlugin
|
|||||||
|
|
||||||
public void AddChatHistory(int clientID, int serverID, string message)
|
public void AddChatHistory(int clientID, int serverID, string message)
|
||||||
{
|
{
|
||||||
|
if (message.Length < 3)
|
||||||
|
return;
|
||||||
|
|
||||||
var chat = new Dictionary<string, object>()
|
var chat = new Dictionary<string, object>()
|
||||||
{
|
{
|
||||||
{ "ClientID", clientID },
|
{ "ClientID", clientID },
|
||||||
@ -75,20 +158,22 @@ namespace StatsPlugin
|
|||||||
|
|
||||||
Insert("CHATHISTORY", chat);
|
Insert("CHATHISTORY", chat);
|
||||||
|
|
||||||
message.Split(' ').Where(word => word.Length >= 3).Any(word =>
|
var eachWord = message.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)
|
||||||
{
|
.Where (word => word.Length >= 3)
|
||||||
word = word.ToLower();
|
.Where(word => CommonWords.FirstOrDefault(c => c == word.ToLower()) == null)
|
||||||
Insert("WORDSTATS", new Dictionary<string, object>() { { "Word", word } }, true);
|
.ToList();
|
||||||
// shush :^)
|
|
||||||
ExecuteNonQuery($"UPDATE WORDSTATS SET Count = Count + 1 WHERE Word='{word.CleanChars()}'");
|
foreach (string _word in eachWord)
|
||||||
return true;
|
{
|
||||||
}
|
string word = _word.ToLower();
|
||||||
);
|
Insert("WORDSTATS", new Dictionary<string, object>() { { "Word", word } }, true);
|
||||||
|
UpdateIncrement("WORDSTATS", "Count", new Dictionary<string, object>() { { "Count", 1 } }, new KeyValuePair<string, object>("Word", word));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public KeyValuePair<string, int>[] GetWords()
|
public KeyValuePair<string, int>[] GetWords()
|
||||||
{
|
{
|
||||||
var result = GetDataTable("SELECT * FROM WORDSTATS ORDER BY Count desc LIMIT 100");
|
var result = GetDataTable("SELECT * FROM WORDSTATS ORDER BY Count desc LIMIT 200");
|
||||||
return result.Select().Select(w => new KeyValuePair<string, int>(w["Word"].ToString(), Convert.ToInt32(w["Count"].ToString()))).ToArray();
|
return result.Select().Select(w => new KeyValuePair<string, int>(w["Word"].ToString(), Convert.ToInt32(w["Count"].ToString()))).ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,6 @@ namespace StatsPlugin.Chat
|
|||||||
{
|
{
|
||||||
public class ChatPage : HTMLPage
|
public class ChatPage : HTMLPage
|
||||||
{
|
{
|
||||||
public ChatPage() : base(false) { }
|
|
||||||
|
|
||||||
public override string GetContent(NameValueCollection querySet, IDictionary<string, string> headers)
|
public override string GetContent(NameValueCollection querySet, IDictionary<string, string> headers)
|
||||||
{
|
{
|
||||||
StringBuilder S = new StringBuilder();
|
StringBuilder S = new StringBuilder();
|
||||||
@ -27,7 +25,7 @@ namespace StatsPlugin.Chat
|
|||||||
return S.ToString();
|
return S.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string GetName() => "Chat Stats";
|
public override string GetName() => "Word Cloud";
|
||||||
public override string GetPath() => "/chat";
|
public override string GetPath() => "/chat";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,11 +66,20 @@ namespace StatsPlugin.Chat
|
|||||||
|
|
||||||
public HttpResponse GetPage(NameValueCollection querySet, IDictionary<string, string> headers)
|
public HttpResponse GetPage(NameValueCollection querySet, IDictionary<string, string> headers)
|
||||||
{
|
{
|
||||||
|
int clientID = Convert.ToInt32(querySet["clientid"]);
|
||||||
|
var client = Stats.ManagerInstance.GetClientDatabase().GetPlayer(clientID);
|
||||||
|
|
||||||
HttpResponse resp = new HttpResponse()
|
HttpResponse resp = new HttpResponse()
|
||||||
{
|
{
|
||||||
contentType = GetContentType(),
|
contentType = GetContentType(),
|
||||||
content = Stats.ChatDB.GetChatForPlayer(Convert.ToInt32(querySet["clientid"])).ToArray(),
|
content = Stats.ChatDB.GetChatForPlayer(clientID).ToArray().Select(c => new
|
||||||
|
{
|
||||||
|
ClientID = c.ClientID,
|
||||||
|
ServerID = c.ServerID,
|
||||||
|
Message = c.Message,
|
||||||
|
TimeSent = c.TimeSent,
|
||||||
|
Client = client
|
||||||
|
}),
|
||||||
additionalHeaders = new Dictionary<string, string>()
|
additionalHeaders = new Dictionary<string, string>()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -316,7 +316,6 @@ namespace StatsPlugin
|
|||||||
//S.Logger.WriteInfo($"{E.Origin.Name} killed {E.Target.Name} with a {killEvent.Weapon} from a distance of {Vector3.Distance(killEvent.KillOrigin, killEvent.DeathOrigin)} with {killEvent.Damage} damage, at {killEvent.HitLoc}");
|
//S.Logger.WriteInfo($"{E.Origin.Name} killed {E.Target.Name} with a {killEvent.Weapon} from a distance of {Vector3.Distance(killEvent.KillOrigin, killEvent.DeathOrigin)} with {killEvent.Damage} damage, at {killEvent.HitLoc}");
|
||||||
var cs = statLists.Find(x => x.Port == S.GetPort());
|
var cs = statLists.Find(x => x.Port == S.GetPort());
|
||||||
cs.playerStats.AddKill(killEvent);
|
cs.playerStats.AddKill(killEvent);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Player Killer = E.Origin;
|
Player Killer = E.Origin;
|
||||||
|
@ -91,6 +91,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>if $(ConfigurationName) == Debug copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)BUILD\plugins\"</PostBuildEvent>
|
<PostBuildEvent>if $(ConfigurationName) == Debug (copy /Y "$(TargetDir)$(TargetName).dll" "$(SolutionDir)BUILD\plugins\")</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
@ -64,6 +64,42 @@ namespace SharedLibrary
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void UpdateIncrement(String tableName, string columnName, Dictionary<String, object> data, KeyValuePair<string, object> where)
|
||||||
|
{
|
||||||
|
string parameters = "";
|
||||||
|
foreach (string key in data.Keys)
|
||||||
|
{
|
||||||
|
parameters += $"{key}={key}+1,";
|
||||||
|
}
|
||||||
|
|
||||||
|
parameters = parameters.Substring(0, parameters.Length - 1);
|
||||||
|
var Con = GetNewConnection();
|
||||||
|
|
||||||
|
SQLiteCommand updatecmd = new SQLiteCommand()
|
||||||
|
{
|
||||||
|
Connection = Con,
|
||||||
|
CommandText = String.Format("UPDATE `{0}` SET {1} WHERE {2}=@{2}", tableName, parameters, where.Key)
|
||||||
|
};
|
||||||
|
foreach (string key in data.Keys)
|
||||||
|
{
|
||||||
|
updatecmd.Parameters.AddWithValue('@' + key, data[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
updatecmd.Parameters.AddWithValue('@' + where.Key, where.Value);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Con.Open();
|
||||||
|
updatecmd.ExecuteNonQuery();
|
||||||
|
Con.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
catch (Exception E)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"Line 96: {E.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected bool Update(String tableName, Dictionary<String, object> data, KeyValuePair<string, object> where)
|
protected bool Update(String tableName, Dictionary<String, object> data, KeyValuePair<string, object> where)
|
||||||
{
|
{
|
||||||
string parameters = "";
|
string parameters = "";
|
||||||
|
@ -143,9 +143,11 @@ copy /Y "$(TargetDir)Newtonsoft.Json.dll" "$(SolutionDir)Admin\lib"</PostBuildEv
|
|||||||
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.105.1\build\net45\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.105.1\build\net45\System.Data.SQLite.Core.targets'))" />
|
<Error Condition="!Exists('..\packages\System.Data.SQLite.Core.1.0.105.1\build\net45\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.105.1\build\net45\System.Data.SQLite.Core.targets'))" />
|
||||||
</Target>
|
</Target>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>if not exist "$(SolutionDir)BUILD" mkdir "$(SolutionDir)BUILD"
|
<PreBuildEvent>if exist "$(SolutionDir)BUILD\Plugins" rmdir /Q /S "$(SolutionDir)BUILD\Plugins"
|
||||||
|
mkdir "$(SolutionDir)BUILD\Plugins"
|
||||||
|
|
||||||
|
if not exist "$(SolutionDir)BUILD" mkdir "$(SolutionDir)BUILD"
|
||||||
if not exist "$(SolutionDir)BUILD\Lib" mkdir "$(SolutionDir)BUILD\Lib"
|
if not exist "$(SolutionDir)BUILD\Lib" mkdir "$(SolutionDir)BUILD\Lib"
|
||||||
if not exist "$(SolutionDir)BUILD\Plugins" mkdir "$(SolutionDir)BUILD\Plugins"
|
|
||||||
if not exist "$(SolutionDir)BUILD\userraw\scripts" mkdir "$(SolutionDir)BUILD\userraw\scripts"</PreBuildEvent>
|
if not exist "$(SolutionDir)BUILD\userraw\scripts" mkdir "$(SolutionDir)BUILD\userraw\scripts"</PreBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
|
Loading…
Reference in New Issue
Block a user