Originally Posted By: Sais
var %time = $gmt + %offset


Just thinking about this... It's a pain to manually enter all of the offsets in seconds. It would be much easier to use -5 or whatever.

Why not change this line to:
Code:
var %time = $calc(%offset * 3600 + $gmt)


Then he only has to enter the difference in hours instead of the difference in seconds.

Another option might be to have the timezone table have the offset be the itemname and the cities the data.

-5 = New York, Boston, Detroit, whatever else
-4 = Chicago, Green Bay, whatever else

That sort of thing. It would really make that much difference, but would reduce the number of hash table items. Not that it really matters as far as speed. Just thinking of how it might be done. This way, you could optionally output a list of cities for the timezone without looping.


For the OP, here is a simple way to prevent flooding. Insert this as the very first line after your on TEXT line.
Code:
  if (%time.flood) { return }
  else set -u10 %time.flood On


That will make it so the script will only run once every 10 seconds (-u10). If you want to change it to something else, just change the 10. Basically, anything 3 or higher will prevent you from being flooded off a network. But you may want higher if someone is just flooding the channel with it.


Invision Support
#Invision on irc.irchighway.net