diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-04 10:04:57 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-04 10:04:57 +0000 |
commit | 3ac610a592b8cc877edf10b7fcc7f55162a9136a (patch) | |
tree | 63578dd96279fa77d5c5bb7f2802a7537eb6fe66 /lib/rbot/irc.rb | |
parent | a7b2718fb0ee7309fa73458b660112e046cf957e (diff) |
New IRC Framework: use #reverse_each() instead of #each() when clearing the list of users and channels on a server, otherwise only half of the items get deleted
Diffstat (limited to 'lib/rbot/irc.rb')
-rw-r--r-- | lib/rbot/irc.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb index 08ad5e69..45e14959 100644 --- a/lib/rbot/irc.rb +++ b/lib/rbot/irc.rb @@ -1456,10 +1456,10 @@ module Irc # Resets the Channel and User list
#
def reset_lists
- @users.each { |u|
+ @users.reverse_each { |u|
delete_user(u)
}
- @channels.each { |u|
+ @channels.reverse_each { |u|
delete_channel(u)
}
end
|