Skip to content

Instantly share code, notes, and snippets.

@XMPPwocky
Last active June 1, 2016 02:38
Show Gist options
  • Save XMPPwocky/10a8151bacb47574a9b365b588e73a2c to your computer and use it in GitHub Desktop.
Save XMPPwocky/10a8151bacb47574a9b365b588e73a2c to your computer and use it in GitHub Desktop.
now i am become death, destroyer of steams
function sendMessage(target, text) {
var rgParams = {
umqid: Chat.m_umqid,
type: 'saytext',
steamid_dst: target,
text: text
};
return Chat.m_WebAPI.ExecJSONP( 'ISteamWebUserPresenceOAuth', 'Message', rgParams, true );
}
function spam(message) {
var alreadySent = {}
Chat.m_rgFriendLists.forEach(function(list) {
function vis(friend) {
if (friend != null) {
var friendID = friend.m_Friend.m_ulSteamID;
if (alreadySent[friendID] != 1) {
alreadySent[friendID] = 1;
sendMessage(friendID, message).done(
function() { vis(friend.m_next) }
).fail(console.error);
} else {
vis(friend.m_next);
}
}
}
vis(list.m_Head);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment