Permalink
Browse files

Stupid tries

  • Loading branch information...
1 parent a504b3f commit a6ecb55817c8289e57bd7bc369261e87d89c3ace @icy icy committed Apr 5, 2012
Showing with 8 additions and 9 deletions.
  1. +8 −9 bot/bot.rb
View
@@ -29,6 +29,10 @@ def execute(m)
c.plugins.plugins = [Hello]
end
+ on :message, /([^ ]+) \[(.+)@(.+)\] entered the room/ do |m, nick, user, host|
+ m.reply "Hello, #{nick}. You come from #{host} using username = #{user}."
+ end
+
on :message, /hello[\t ,]*([^\t ]+)/i do |m, text|
if text.match("archl0n0xvn")
m.reply "Hello, #{m.user.nick}"
@@ -41,18 +45,13 @@ def execute(m)
m.reply "Hello, #{m.user.nick}"
end
- on :message, /([^ ]+) \[.*\] entered the room./ do |m, user|
- m.reply "Hello, #{user}"
- end
-
- on :message, /vcl/i do |m, text|
+ on :message, /vcl/i do |m|
m.reply "#{m.user.nick}: ba.n la.i du`ng Vcl de^? xem ph1m chon^'ng my~ a?"
end
-# on :message, /^!msg (.+?) (.+)/ do |m, who, text|
-# User(who).send text
-# end
-#
+ on :message, /^:(.+)!(.+)@(.+) JOIN #archlinuxvn/ do |m, nick, user, host|
+ m.reply "Hello, #{nick}. You come from #{host}. Are you #{user}?"
+ end
helpers do
def shorten(url)

0 comments on commit a6ecb55

Please sign in to comment.