Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adds support for the /me message event.

  • Loading branch information...
commit fcc9df37e3939a29d38b321dd8477c756fb6a382 1 parent 9115a7f
@Overv authored
Showing with 11 additions and 3 deletions.
  1. +1 −0  README.md
  2. +10 −3 SteamAPISession.cs
View
1  README.md
@@ -74,6 +74,7 @@ public enum UpdateType
{
UserUpdate,
Message,
+ Emote,
TypingNotification
}
```
View
13 SteamAPISession.cs
@@ -69,6 +69,7 @@ public enum UpdateType
{
UserUpdate,
Message,
+ Emote,
TypingNotification
}
@@ -536,6 +537,13 @@ public bool SendMessage( User user, String message )
return false;
}
}
+
+ public bool SendMessage( String steamid, String message )
+ {
+ User user = new User();
+ user.steamid = steamid;
+ return SendMessage( user, message );
+ }
/// <summary>
/// Check for updates and new messages.
@@ -565,9 +573,9 @@ public List<Update> Poll()
update.origin = (String)info["steamid_from"];
String type = (String)info["type"];
- if ( type.Equals( "saytext" ) || type.Equals( "my_saytext" ) )
+ if ( type.Equals( "saytext" ) || type.Equals( "my_saytext" ) || type.Equals( "emote" ) )
{
- update.type = UpdateType.Message;
+ update.type = type.Equals( "emote" ) ? UpdateType.Emote : UpdateType.Message;
update.message = (String)info["text"];
update.localMessage = type.Equals( "my_saytext" );
}
@@ -584,7 +592,6 @@ public List<Update> Poll()
}
else
{
- Console.WriteLine( "Unknown type: " + type );
continue;
}
Please sign in to comment.
Something went wrong with that request. Please try again.