Changeset 6217
- Timestamp:
- 02/05/08 13:50:35 (5 years ago)
- Location:
- lang/ruby/net-irc/trunk/examples
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/net-irc/trunk/examples/lig.rb
r6188 r6217 121 121 def on_privmsg(m) 122 122 target, message = *m.params 123 @lingr.say(@channels[target.downcase][:ticket], message) 123 if @channels.key?(target.downcase) 124 @lingr.say(@channels[target.downcase][:ticket], message) 125 else 126 post nil, ERR_NOSUCHNICK, @user_info["prefix"].nick, target, "No such nick/channel" 127 end 124 128 rescue Lingr::Client::APIError => e 125 129 log "Error: #{e.code}: #{e.message}" … … 145 149 server_info = "Lingr: type:#{info["client_type"]} source:#{info["source"]}" 146 150 channels = [info["client_type"] == "human" ? "@#{chan}" : chan] 147 me = make_ids(@user_info)151 me = @user_info["nick"] 148 152 149 153 post nil, RPL_WHOISUSER, me.nick, prefix.nick, prefix.user, prefix.host, "*", real_name -
lang/ruby/net-irc/trunk/examples/lingr.rb
r6136 r6217 271 271 end 272 272 rescue Exception 273 warn "exception on HTTP GET: #{$!}" , 2273 warn "exception on HTTP GET: #{$!}" 274 274 nil 275 275 end … … 281 281 parse_result Net::HTTP.post_form(URI.parse(url), params) 282 282 rescue Exception 283 warn "exception on HTTP POST: #{$!}" , 2283 warn "exception on HTTP POST: #{$!}" 284 284 nil 285 285 end … … 312 312 end 313 313 rescue Exception 314 warn "exception on multipart POST: #{$!}" , 2314 warn "exception on multipart POST: #{$!}" 315 315 nil 316 316 end
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)