nml375 wrote:speechles,
I did not make any comments as to your flood protection, neither anyone else's. You might also like to keep in mind that the original request did not come with flood protection, neither did the initial code example by the requester have one.
That, however, does not change the case that you've attached my signature to code I've not written, and which is non-functional. At best, I consider that slander.
Which part isn't functional, and notice after your nick says minor tweaks.. why are you so offended that your participation in a script has been noted in some regard, do you wish that removed, just say so? maybe you already have in this case just say so without being sarcastic about it or just "mod edit" it out. You do have this power. I remember the incident when you attained it precisely.
nml375 wrote:On a side note, you could improve performance in your script by using the lappend command rather than resetting the variable with a concat'd value...
Lappand won't behave the same when using the foreach constructed below. I wanted a single inline list. Not a series of lists within lists. With those I would need to run a series of sets with lindexes on them to get the contents of each element. With an inline list, which concat gives back, is the only way the foreach constructed on the timer:onjoin can work. This is done to keep the code short and remove all those sets and lindexes otherwise required.
That's not even remotely close to the code you pinned my signature.. "minor tweak" does not cut it. What you wrote in your script is not my code, as such - do not attribute it to me, correct or faulty.
Your code does not work, as it makes the assumption $vStartHour is always less than $vEndHour. This is not the case in the original request.
This is the recommended way of doing it, as it yields significant performance boost with large lists (see the lappend manpage for further details).
Corrected the prior script to properly use lappend. For some reason every time I've tried to use it this way it has failed me but might be because I've always tried it using [list $elements $go $here] rather than just list the elements singularly after the lappend.
Also, corrected the code advice you gave and incorporated it into the script along with mention to you. If this is done poorly shout it out. If you'd rather not participate then I'll change the "maybe this is" back into a "this is not".. haw
For additional flexibility, I was trying to allow use of a secondary GMT offset in case a time zone was required within an IRC community that was not the same as the bot's GMT offset time.
Using nml375's hour checking statement, I think the following is now the correct logic.