Created
January 28, 2010 19:54
-
-
Save sarahhodne/289076 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin(:echo) do | |
name 'Echo Plugin' | |
author 'Henrik Hodne <[email protected]>' | |
command(:echo, '*') do |from, params| | |
from.privmsg(params) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EchoPlugin < Lime::Plugin | |
name 'Echo Plugin' | |
author 'Henrik Hodne <[email protected]>' | |
command :echo, '*' | |
def echo(from, params) | |
from.privmsg(params) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EchoPlugin | |
def initialize | |
Lime.register(:command, :echo, '*', method(:echo)) | |
end | |
def echo(from, params) | |
from.privmsg(params) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment