Skip to content

Instantly share code, notes, and snippets.

@jzanutto
Last active August 29, 2015 14:20
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 jzanutto/b4bf74156fa3fbc311bb to your computer and use it in GitHub Desktop.
Save jzanutto/b4bf74156fa3fbc311bb to your computer and use it in GitHub Desktop.
Cinch Patch for Twitch
# patch credit to https://github.com/blutorange
class Cinch::Message
def twitch(string)
string = string.to_s.gsub('<','&lt;').gsub('>','&gt;')
bot.irc.send ":#{bot.config.user}!#{bot.config.user}@#{bot.config.user}.tmi.twitch.tv PRIVMSG #{channel} :#{string}"
end
end
# source: https://github.com/cinchrb/cinch/issues/151#issuecomment-49511297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment