Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Commit

Permalink
Stupid tries
Browse files Browse the repository at this point in the history
  • Loading branch information
icy committed Apr 5, 2012
1 parent a504b3f commit a6ecb55
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions bot/bot.rb
Expand Up @@ -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}"
Expand All @@ -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)
Expand Down

0 comments on commit a6ecb55

Please sign in to comment.