Class: InterjectorPlugin
- Inherits:
-
Campfire::PollingBot::Plugin
- Object
- Campfire::PollingBot::Plugin
- InterjectorPlugin
- Defined in:
- lib/campfire/polling_bot/plugins/interjector/interjector_plugin.rb
Overview
Plugin to make Wes actively comment (and maybe super annoying)
Constant Summary
Constants inherited from Campfire::PollingBot::Plugin
Campfire::PollingBot::Plugin::HALT
Instance Attribute Summary
Attributes inherited from Campfire::PollingBot::Plugin
Instance Method Summary collapse
Methods inherited from Campfire::PollingBot::Plugin
accepts, #accepts?, accepts?, bot, bot=, directory, directory=, inherited, #initialize, load_all, load_plugin_classes, #logger, logger, priority, #priority, requires_config, requires_config?, #requires_config?, setup_database, subclasses, #to_s
Constructor Details
This class inherits a constructor from Campfire::PollingBot::Plugin
Instance Method Details
#process(message) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/campfire/polling_bot/plugins/interjector/interjector_plugin.rb', line 6 def process() person = .person case .command || .body when /jessica alba/i bot.say_random [ "Jessica Alba is my dream girl", "no question, the hottest girl ever", "yeah... er, what was I saying?", "she really is incredibly hot, you know", ] return HALT when /^(goodnight|night)(,?\s(all|every(body|one)))$/i bot.say "goodnight, #{person}" return HALT when /^(facepalm|EFACEPALM|:fp|:facepalm:|\*facepalm\*|m\()$/i bot.say_random [ # picard facepalm "https://img.skitch.com/20110224-875h7w1654tgdhgrxm9bikhkwq.jpg", # polar bear facepalm "https://img.skitch.com/20110224-bsd2ds251eit8d3t1y2mkjtfx8.jpg" ] when /^(double facepalm|EDOUBLEFACEPALM|:fpfp|:doublefacepalm:|m\( m\()$/i # picard + riker facepalm bot.say "https://img.skitch.com/20110224-ncacgpudhfr2s4te6nswenxaqt.jpg" when /^i see your problem/i # pony mechanic bot.say "https://img.skitch.com/20110224-8fmfwdmg6kkrcpijhamhqu7tm6.jpg" when /^(wfm|womm|works on my machine)$/i # works on my machine bot.say "https://img.skitch.com/20110224-jrcf6e4gc936a2mxc3mueah2in.png" when /^(stacktrace or gtfo|stacktrace or it didn't happen|stacktrace!)$/i # stacktrace or gtfo bot.say "https://img.skitch.com/20110224-pqtmiici9wp9nygqi4nw8gs6hg.png" when /^this is sparta\!*?$/i # this is sparta bot.say "https://img.skitch.com/20110225-k9xpadr2hk37pe5ed4crcqria1.png" when /^i have no idea what i'm doing$/i # I have no idea what I'm doing bot.say "https://img.skitch.com/20110304-1tcmatkhapiq6t51wqqq9igat5.jpg" when /^party[?!.]*$/i # party party party party party cat bot.say "https://img.skitch.com/20110309-qtd33sy8k5yrdaeqa9e119bwd1.jpg" when /^(bomb|system error)$/i # sorry, a system error has occurred bot.say "https://img.skitch.com/20110312-8g31a37spacdjgatr82g3g98j1.jpg" when /^stop hitting yourself$/i # and the angel said to him, Stop hitting yourself! bot.say "https://img.skitch.com/20110316-q7h49p69pjhhyy8756rha2a1jf.jpg" end end |