Module: Hector::Commands::Away

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

Instance Method Summary collapse

Instance Method Details

#on_awayObject



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

def on_away
  away_message = request.args.first
  if away_message and !away_message.empty?
    @away_message = away_message
    respond_with("306", :text => "You have been marked as being away")
  else
    @away_message = nil
    respond_with("305", :text => "You are no longer marked as being away")
  end
end