Module: Hector::Commands::Privmsg

Included in:
Session
Defined in:
lib/hector/commands/privmsg.rb

Instance Method Summary collapse

Instance Method Details

#on_privmsgObject



4
5
6
7
8
9
10
11
12
13
# File 'lib/hector/commands/privmsg.rb', line 4

def on_privmsg
  touch_presence
  subject = find(request.args.first)

  subject.deliver(:privmsg, self, :source => source, :text => request.text)

  if !subject.channel? and subject.away?
    respond_with("301", subject.nickname, :text => subject.away_message)
  end
end