Skip to content

Instantly share code, notes, and snippets.

@paraboul
Created June 19, 2012 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paraboul/2953920 to your computer and use it in GitHub Desktop.
Save paraboul/2953920 to your computer and use it in GitHub Desktop.
function sendToMany(users, cmd, data) {
var chan = Ape.mkChan("*" + +new Date());
for (var i = 0; i < users.length; i++) {
users[i].join(chan);
}
chan.pipe.sendRaw(cmd, data);
Ape.delChan(chan);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment