Permalink
Browse files

Reciprocate aggression toward XOmBot.

  • Loading branch information...
wilkie committed Feb 8, 2012
1 parent 6d31090 commit 0d91006a6523b91d15d22bb3f6c5c20c81d6e5d5
Showing with 10 additions and 1 deletion.
  1. +10 −1 lib/xombot/plugins/emotion.rb
@@ -9,20 +9,29 @@ def initialize *args
end
def listen(m)
+ # Sometimes XOmBot overhears things intended for others
unless m.message.match /#{XOmBot.name}/i
if m.message.match /\bhugs\b/
m.emote "hugs #{m.user.nick}"
- return
end
+
+ return
+ end
+
+ # XOmBot does not appreciate being looked down upon
+ if m.message.match /\bfuck you\b/
+ m.reply m.message.gsub(/#{XOmBot.name}/i, m.user.nick).gsub(/fuck you/i, "fuck you too")
return
end
+ # XOmBot responds well to appreciation
if m.message.match /good|cookie|hugs|cake|nice|awesome|pets|kiss|<3/
@good = @good + 1
m.emote "drools"
return
end
+ # XOmBot responds to negative remarks
if m.message.match /bad|spank|spit|shoot|slap|\:\(/
@bad = @bad + 1
m.emote "cowers"

0 comments on commit 0d91006

Please sign in to comment.