examples/sig.rb in net-irc-0.0.5 vs examples/sig.rb in net-irc-0.0.6

- old
+ new

@@ -60,11 +60,11 @@ channels.each do |channel| @channels[channel] = { :topic => "", :observer => nil, } unless @channels.key?(channel) - post @prefix, JOIN, m.params.first + post @prefix, JOIN, channel post nil, RPL_NAMREPLY, @prefix.nick, "=", channel, "@#{@prefix.nick}" post nil, RPL_ENDOFNAMES, @prefix.nick, channel, "End of NAMES list" end end @@ -97,12 +97,13 @@ loop do sleep 1 nsize = File.size(f) if nsize > size @log.debug "follow up log" - l = f.gets - if grep === l - post name, PRIVMSG, chan, l + while l = f.gets + if grep === l + post name, PRIVMSG, chan, l + end end end size = nsize end end