Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (22 sloc) 0.713 kB
class Flower::Console
def self.say(message, mention = nil)
return message
end
def self.paste(message, mention = nil)
return message.join("\n")
end
def self.command message
if match = Flower.bot_message(message)
match = match[1].split(" ")
command = match.shift
Flower::COMMANDS[command].respond(command, match.join(" "), {id: 0, nick: "flower"}, Flower::Console) if Flower::COMMANDS.has_key?(command)
end
end
def self.listen message
results = []
Flower::LISTENERS.each do |regexp, command|
results << command.listen(message, {id: 0, nick: "flower"}, Flower::Console) if message.match(regexp)
end
results.reject{|r| r.is_a? Hash }
end
end
Jump to Line
Something went wrong with that request. Please try again.