Class: Atig::Command::UserInfo
Instance Attribute Summary
Attributes inherited from Command
#api, #db, #gateway, #opts
Instance Method Summary
collapse
Methods inherited from Command
#find_by_tid
Constructor Details
#initialize(*args) ⇒ UserInfo
Returns a new instance of UserInfo.
8
|
# File 'lib/atig/command/user_info.rb', line 8
def initialize(*args); super end
|
Instance Method Details
#action(target, mesg, command, args) ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/atig/command/user_info.rb', line 11
def action(target, mesg, command,args)
if args.empty?
yield "/me #{command} <ID>"
return
end
nick,*_ = args
Info.user(db, api, nick)do|user|
entry = TwitterStruct.make('user' => user,
'status' => { 'text' =>
Net::IRC.ctcp_encode(user.description) })
gateway[target].message entry, Net::IRC::Constants::NOTICE
end
end
|
#command_name ⇒ Object
9
|
# File 'lib/atig/command/user_info.rb', line 9
def command_name; %w(bio userinfo) end
|