Class: IrcMachine::Plugin::Hello

Inherits:
Base
  • Object
show all
Defined in:
lib/irc_machine/plugin/hello.rb

Instance Attribute Summary

Attributes inherited from Base

#session

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from IrcMachine::Plugin::Base

Instance Method Details

#receive_line(line) ⇒ Object



2
3
4
5
6
# File 'lib/irc_machine/plugin/hello.rb', line 2

def receive_line(line)
  if line =~ /^:\S+ PRIVMSG (#+\S+) :hello$/
    session.msg $1, "world"
  end
end