Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reciprocate aggression toward XOmBot.

  • Loading branch information...
commit 0d91006a6523b91d15d22bb3f6c5c20c81d6e5d5 1 parent 6d31090
@wilkie wilkie authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 lib/xombot/plugins/emotion.rb
View
11 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"
Please sign in to comment.
Something went wrong with that request. Please try again.