Sugar is a drug / That fattens my head and butt / Candy is my meth
1
   
Award
Favorite
Favorited
Unfavorite
Download
"run_friends_check = (account,
friends = Object.keys(account.user.myFriends).filter((friend) => account.user.myFriends[friend] == 3 || account.user.myFriends[friend] == 6)
, removed = config.friends_log[account.user.steamID].last_friends.diff(friends)
, added = friends.diff(config.friends_log[account.user.steamID].last_friends)) =>
(friends.length) && (
(!config.friends_log[account.user.steamID].hasOwnProperty('friends_diff')) ?
config.friends_log[account.user.steamID].friends_diff = []
: null,
lines = (action, players, callback) =>
(!players.length) ?
callback();
: account.user.getPersonas(players, (personas, date = new Date()) =>
Object.keys(personas).forEach((persona) =>
config.friends_log[account.user.steamID].friends_diff.push(
[ date.getFullYear() + "-" + pad(date.getMonth()+1) + "/" + pad(date.getDate()) +
"-" + pad(date.getHours()) + ":" + pad(date.getMinutes()),
action, friends.length, persona, personas[persona].player_name.replace(
/([\uE000-\uF8FF]|\uD83C[\uDF00-\uDFFF]|\uD83D[\uDC00-\uDDFF])/g, '') ]));
callback());
lines(false, removed, () =>
lines(true, added, () =>
(added.length || removed.length) &&
config.friends_log[account.user.steamID].last_friends = friends)));"