-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
!play <appid> - plays the specified appid !play clear - stops playing game
- Loading branch information
Showing
14 changed files
with
539 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using SteamChatBot.Triggers.TriggerOptions; | ||
using SteamKit2; | ||
using SteamKit2.Internal; | ||
using SteamKit2.GC; | ||
|
||
namespace SteamChatBot.Triggers | ||
{ | ||
class PlayGameTrigger : BaseTrigger | ||
{ | ||
public PlayGameTrigger(TriggerType type, string name, ChatCommand cc) : base(type, name, cc) | ||
{ } | ||
|
||
public override bool respondToFriendMessage(SteamID userID, string message) | ||
{ | ||
return Respond(userID, message); | ||
} | ||
|
||
public override bool respondToChatMessage(SteamID roomID, SteamID chatterId, string message) | ||
{ | ||
return Respond(roomID, message); | ||
} | ||
|
||
private bool Respond(SteamID toID, string message) | ||
{ | ||
string[] query = StripCommand(message, Options.ChatCommand.Command); | ||
if(query != null) | ||
{ | ||
var gamesPlayed = new ClientMsgProtobuf<CMsgClientGamesPlayed>(EMsg.ClientGamesPlayed); | ||
if(query[1] == "clear") | ||
{ | ||
gamesPlayed.Body.games_played.Clear(); | ||
Bot.steamClient.Send(gamesPlayed); | ||
return true; | ||
} | ||
else | ||
{ | ||
gamesPlayed.Body.games_played.Add(new CMsgClientGamesPlayed.GamePlayed | ||
{ | ||
game_id = new GameID(Convert.ToUInt64(query[1])) | ||
}); | ||
Bot.steamClient.Send(gamesPlayed); | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
SteamChatBot/publish/Application Files/SteamChatBot_1_0_0_1/SteamChatBot.application
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<asmv1:assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns="urn:schemas-microsoft-com:asm.v2" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xrml="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1" xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2"> | ||
<assemblyIdentity name="SteamChatBot.application" version="1.0.0.1" publicKeyToken="ab95c37b8af1adeb" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /> | ||
<description asmv2:publisher="Steam-Chat-Bot" co.v1:suiteName="SteamChatBot" asmv2:product="Steam Chat Bot" asmv2:supportUrl="https://github.com/Steam-Chat-Bot/SteamChatBot/issues" co.v1:errorReportUrl="https://github.com/Steam-Chat-Bot/SteamChatBot/issues" xmlns="urn:schemas-microsoft-com:asm.v1" /> | ||
<deployment install="true" minimumRequiredVersion="1.0.0.0" co.v1:createDesktopShortcut="true"> | ||
<subscription> | ||
<update> | ||
<beforeApplicationStartup /> | ||
</update> | ||
</subscription> | ||
<deploymentProvider codebase="https://raw.githubusercontent.com/Steam-Chat-Bot/SteamChatBot/master/SteamChatBot/publish/SteamChatBot.application" /> | ||
</deployment> | ||
<compatibleFrameworks xmlns="urn:schemas-microsoft-com:clickonce.v2"> | ||
<framework targetVersion="4.5.2" profile="Full" supportedRuntime="4.0.30319" /> | ||
</compatibleFrameworks> | ||
<dependency> | ||
<dependentAssembly dependencyType="install" codebase="Application Files\SteamChatBot_1_0_0_1\SteamChatBot.exe.manifest" size="15571"> | ||
<assemblyIdentity name="SteamChatBot.exe" version="1.0.0.1" publicKeyToken="ab95c37b8af1adeb" language="neutral" processorArchitecture="msil" type="win32" /> | ||
<hash> | ||
<dsig:Transforms> | ||
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> | ||
</dsig:Transforms> | ||
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> | ||
<dsig:DigestValue>SH0e1jDZ+DUCNUoeQMrn4giT4/IekE07re/2A/zB/6o=</dsig:DigestValue> | ||
</hash> | ||
</dependentAssembly> | ||
</dependency> | ||
<publisherIdentity name="CN=KYLESMITHPC\Kyle" issuerKeyHash="c6bdd68a1a8f3553514f58bc99fd0035a0a7e4ba" /><Signature Id="StrongNameSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>xDaOkaOtjJHI+ds/3r7iqBAKKSjAzowUe9rj/51Unvc=</DigestValue></Reference></SignedInfo><SignatureValue>TqYQLy0BLvXdpMG0j2d6YWgBFQR4VN186daMz0qDuRxWSgFJqpEyrtdx0joBoq/3j6XTE1WdsMjtsioXhQSv0qpp7fynWg6sYjL7g/kYql9XDpQxWor99CHLM52YzPe6fCIXePptT90gAFSvQ7uSZM/KDAF+h7AkeefqMfGo34o=</SignatureValue><KeyInfo Id="StrongNameKeyInfo"><KeyValue><RSAKeyValue><Modulus>n3h8NWfILVV6yDGYcHX7TFk95gIwbDkM1Z628n2Tot1vdwStGvCayoiimOvpHDQIBYkCMg1Cb81M4bV18Hnxc19DAXXcSBefA2msm9RmHYzt4JBXdSBEdhssMLBVtwAcBTp2qmZFoMDvT0Pv/H8oiGjoP9A0lGuZ/0/BtpJKqxU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><msrel:RelData xmlns:msrel="http://schemas.microsoft.com/windows/rel/2005/reldata"><r:license xmlns:r="urn:mpeg:mpeg21:2003:01-REL-R-NS" xmlns:as="http://schemas.microsoft.com/windows/pki/2005/Authenticode"><r:grant><as:ManifestInformation Hash="f79e549dffe3da7b148ccec028290a10a8e2bede3fdbf9c8918cada3918e36c4" Description="" Url=""><as:assemblyIdentity name="SteamChatBot.application" version="1.0.0.1" publicKeyToken="ab95c37b8af1adeb" language="neutral" processorArchitecture="msil" xmlns="urn:schemas-microsoft-com:asm.v1" /></as:ManifestInformation><as:SignedBy /><as:AuthenticodePublisher><as:X509SubjectName>CN=KYLESMITHPC\Kyle</as:X509SubjectName></as:AuthenticodePublisher></r:grant><r:issuer><Signature Id="AuthenticodeSignature" xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /><Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /><DigestValue>poGZ8XnJL5DNQYE6x71CCwSiDTb9m7LIwZ4U3ghLfwI=</DigestValue></Reference></SignedInfo><SignatureValue>lPhdnf2KPdHSSl2JhIJaBmEAG0lft1I/7eQKU2Ct0dnt8LfcgbWUg+AeyU8PfmsyiCsloWqj6sEa9y2hDbGVyxjcIkiO4DFBf7WWiQzcj7/xcSpXU4Y0BI8u1UZsQR779mO7Cf63qvIinqmF0YNzDEoTrEkC9ymGpstPWZyBVPs=</SignatureValue><KeyInfo><KeyValue><RSAKeyValue><Modulus>n3h8NWfILVV6yDGYcHX7TFk95gIwbDkM1Z628n2Tot1vdwStGvCayoiimOvpHDQIBYkCMg1Cb81M4bV18Hnxc19DAXXcSBefA2msm9RmHYzt4JBXdSBEdhssMLBVtwAcBTp2qmZFoMDvT0Pv/H8oiGjoP9A0lGuZ/0/BtpJKqxU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue></KeyValue><X509Data><X509Certificate>MIIB2TCCAUKgAwIBAgIQJD+VKLooEJpDO+lr+zHmRTANBgkqhkiG9w0BAQsFADArMSkwJwYDVQQDHiAASwBZAEwARQBTAE0ASQBUAEgAUABDAFwASwB5AGwAZTAeFw0xNjA0MTgwMzA5MzhaFw0xNzA0MTgwOTA5MzhaMCsxKTAnBgNVBAMeIABLAFkATABFAFMATQBJAFQASABQAEMAXABLAHkAbABlMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCfeHw1Z8gtVXrIMZhwdftMWT3mAjBsOQzVnrbyfZOi3W93BK0a8JrKiKKY6+kcNAgFiQIyDUJvzUzhtXXwefFzX0MBddxIF58Daayb1GYdjO3gkFd1IER2GywwsFW3ABwFOnaqZkWgwO9PQ+/8fyiIaOg/0DSUa5n/T8G2kkqrFQIDAQABMA0GCSqGSIb3DQEBCwUAA4GBADTcczcy7owor76KonhSX0IxBY7gB+dKmor/J7OIxvP69DajbzOIKNIwKQ7/JRXBbNHpF/hzUdugbYZQ3Py1cUTWLPAb/eBgIwn4fNYIedN/2kfpxtE8cMv/TzPqtYVmh24hLNvC8/Tnl3QUxprrODwNLNBssv1rlwrCIq7/h0VH</X509Certificate></X509Data></KeyInfo></Signature></r:issuer></r:license></msrel:RelData></KeyInfo></Signature></asmv1:assembly> |
18 changes: 18 additions & 0 deletions
18
SteamChatBot/publish/Application Files/SteamChatBot_1_0_0_1/SteamChatBot.exe.config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> | ||
</startup> | ||
<runtime> | ||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | ||
<dependentAssembly> | ||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" /> | ||
</dependentAssembly> | ||
<dependentAssembly> | ||
<assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> | ||
<bindingRedirect oldVersion="0.0.0.0-4.2.29.0" newVersion="4.2.29.0" /> | ||
</dependentAssembly> | ||
</assemblyBinding> | ||
</runtime> | ||
</configuration> |
Oops, something went wrong.