This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Request: Simple script to return current week~

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
G
Gewan
Voice
Posts: 27
Joined: Sat Dec 25, 2010 7:50 pm

Request: Simple script to return current week~

Post by Gewan »

Hiya!

I rarely know which week we're currently in. In fact, I usually either visit www.vecka.nu or execute "date +%W" (under -NIX) to get knowledge.
It sounds like an easy piece of work to write a TCL script for example:
<User> !week
<Bot> We're currently in week 43.
Now would it?
I'd be much grateful!

Cheers~
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

Try this:

Code: Select all



bind pub - "!week" get_week


proc get_week {nick uhost handle chan text} {

        putserv "privmsg $chan :We're currently in week [clock format [clock scan now] -format %V]."


  }


G
Gewan
Voice
Posts: 27
Joined: Sat Dec 25, 2010 7:50 pm

Works a charm!

Post by Gewan »

Many thanks willyw; your work is brilliant!
Post Reply