Created
June 14, 2013 17:48
-
-
Save rubyist/5783855 to your computer and use it in GitHub Desktop.
Put this in ~/Library/Application Support/Propane/unsupported/caveatPatchor.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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