Jump to content

Archived

This topic is now archived and is closed to further replies.

chain

!Time

Recommended Posts

  • Administrators
!Time script. Gets the time from Wunderground.com.

Syntax is !time city state | !time city country | !time airportcode | !time zipcode.

Or: @time city state | @time city country | @time airportcode | @time zipcode.

 

The !trigger will notice the user and the @trigger will message the channel if the user has halfops or higher.

 

It also has an alias /time that uses the same syntax but only echo's to the active screen.

There is also a menu on the channel screen to disable the trigger.

 

To start using just right click channel or status screen, go to !Time and click On.

 

Example Output:

14:05:35 !time cvg

14:05:36 -Gliiim- Searching for Time ..................

14:05:39 -Gliiim- Time for Cincinnati-Northern KY International Kentucky is 3:05 PM EST

14:06:01 !time london england

14:06:02 -Gliiim- Searching for Time ..................

14:06:04 -Gliiim- Time for London United Kingdom is 8:06 PM GMT

 

 

 

>;!Time by Ford_Lawnmower irc.mindforge.org #USA-Chatmenu Channel,Status {  .$iif($group(#Time) == On,$style(1)) !Time Trigger  ..$iif($group(#Time) == On,$style(2)) On: .enable #Time  ..$iif($group(#Time) == Off,$style(2)) Off: .disable #Time}#Time onOn $*:Text:/^(!|@)Time.*/Si:#: {  if (!$timer($+(Time,$network,$nick))) {    .timer $+ $+(Time,$network,$nick) 1 6 noop    var %method $iif($regml(1) == !,.notice $nick,$iif($regex($nick($chan,$nick).pnick,/(!|~|&|@|%)/),.msg $chan,.notice $nick))    TimeCheck %method $2-  }}#Time endalias Time { TimeCheck echo -a $1- }alias -l TimeCheck {  $1-2 04Searching for Time ..................  var %sockname $+(Time,$network,$2,$ticks)  sockopen %sockname www.wunderground.com 80  sockmark %sockname $1-2 $+(/cgi-bin/findweather/getForecast?query=,$fixurl($3-),&wuSelect=WEATHER)}On *:sockopen:Time*: {  if (!$sockerr) {    sockwrite -nt $sockname GET $gettok($sock($sockname).mark,3,32) HTTP/1.0    sockwrite -n $sockname Host: www.wunderground.com    sockwrite -n $sockname $crlf  }  else { echo -st Socket Error $nopath($script) | sockclose $sockname | return }}On *:sockread:Time*: {  if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return }  else {    var %Time | sockread %Time    if (There has been an error isin %Time) { $gettok($sock($sockname).mark,1-2,32) Time Not Found }    elseif ($regex(%Time,/(.*)/)) { sockmark $sockname $addtok($sock($sockname).mark,$regml(1),32) }    elseif ($regex(%time,/.*&nbsp/)) { noop }    elseif ($regex(%Time,

Link to comment
Share on other sites



×
×
  • Create New...