Changeset 32858
- Timestamp:
- 04/27/09 16:30:09 (4 years ago)
- Files:
-
- 1 modified
-
lang/ruby/net-irc/trunk/examples/tig.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/net-irc/trunk/examples/tig.rb
r32732 r32858 122 122 /me in Sugamo, Tokyo, Japan 123 123 124 ### reply (re )124 ### reply (re, mention) 125 125 126 126 /me reply ID blah, blah... … … 368 368 src = @sources[rand(@sources.size)].first 369 369 ret = api("statuses/update", { :status => mesg, :source => src }) 370 ret.delete("user") 371 @me.update("status" => ret) 370 372 end 371 373 else … … 506 508 # when "leave" 507 509 # # FIXME 508 when /^ re(?:ply)?$/510 when /^(?:mention|re(?:ply)?)$/ # reply, re, mention 509 511 tid = args.first 510 512 if st = @tmap[tid] 511 513 text = mesg.split(/\s+/, 4)[3] 512 ret = api("statuses/update", { :status => text, :in_reply_to_status_id => "#{st["id"]}" }) 514 src = @sources[rand(@sources.size)].first 515 ret = api("statuses/update", { :status => text, :source => src, :in_reply_to_status_id => "#{st["id"]}" }) 513 516 if ret 514 log "Status updated (In reply to \x03#{@opts["tid"] || 10}[#{tid}]\x0f <#{api_base + st["user"]["screen_name"]}/statuses/#{st["id"]}>)" 517 msg = generate_status_message(st) 518 log "Status updated (In reply to \x03#{@opts["tid"] || 10}[#{tid}]\x0f: #{msg} <#{api_base + st["user"]["screen_name"]}/statuses/#{st["id"]}>)" 519 ret.delete("user") 520 @me.update("status" => ret) 515 521 end 516 522 end
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)