Skip to content

Instantly share code, notes, and snippets.

@rubyist
Created June 14, 2013 17:48
Show Gist options
  • Save rubyist/5783855 to your computer and use it in GitHub Desktop.
Save rubyist/5783855 to your computer and use it in GitHub Desktop.
Put this in ~/Library/Application Support/Propane/unsupported/caveatPatchor.js
function sayIt(msg) {
message = this.chat.transcript.insertPendingMessage(msg);
new Campfire.OutgoingMessage(this.chat, message, msg, '').send();
this.chat.dispatch('messageSpoken', message);
}
Campfire.Speaker.Filters.push(
function(message) {
if(message.match(/^\/soundlist\s*$/)) {
var soundList = [];
for (s in this.chat.sounds) { soundList.push(String(s)); }
sayIt('Yo dawg, the current sound list is: ' + soundList.sort().join(', '));
} else {
return message;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment