Permalink
Browse files

mocking a few more ideas: twitter, topic, taco (for the lulz)

  • Loading branch information...
1 parent 0d325c2 commit 74b3afc714191bbdbd95e9aeb4eb154e72fecd4c @jamiew committed Apr 12, 2009
Showing with 30 additions and 0 deletions.
  1. +30 −0 fatbot.rb
View
@@ -16,6 +16,13 @@
end
+# just a simple superuserish check
+# count on NickServ for security :x
+def ops?(nick)
+ ['jamiew','ttttbx','fi5e','randofo','bekathwia','Geraldine_'].include?(nick)
+end
+
+
# CONNECT
on :connect do
join "#tumblrs", "#fatlab"
@@ -37,9 +44,32 @@
# msg channel, "#{match[0]} by #{nick}"
end
+# private echo for ops
+# TODO
+
+
# give me a meme
on :channel, /^\!meme/ do
meme = open("http://meme.boxofjunk.ws/moar.txt?lines=1").read.chomp
msg channel, meme
end
+# post to a shared twitter account
+on :channel, /^\!twitter (.*)/ do
+ cred = YAML.load('twitter.yml')
+ # TODO do some stuff with twitter gem
+ msg channel, "*** posting announcement by #{nick} to http://twitter.com/fffffat ..."
+end
+
+# give you a taco. via gerry
+# TODO: we need more tacos
+on :channel, /^\!taco/ do
+ tacos = ['carnitas', 'barbacoa', 'fish', 'shrimp']
+ msg channel, "/me gives #{nick} a #{tacos[(rand*tacos.length).floor]} taco"
+end
+
+# change the topic (ops)
+on :channel, /^!topic (.*)/ do
+ msg channel, "/topic #fatlab #{match[0]}" if ops?(nick)
+end
+

0 comments on commit 74b3afc

Please sign in to comment.