bind pub - !track track:find
proc track:find {nick uhost hand chan arg} {
set formdata [::http::formatQuery origTrackNum $arg]
set url "http://trkcnfrm1.smi.usps.com/PTSInternetWeb/InterLabelInquiry.do?"
set tok [http::geturl $url$formdata]; set data [http::data $tok]; http::cleanup $tok
if {![regexp -- {Label/Receipt Number: <span class="mainTextbold">(.*?)</span><br>} $data -> number]} { putmsg $chan "Nothing found"; return }
if {![regexp -- {Status: <span class="mainTextbold">(.*?)</span><br><br>} $data -> status]} { putmsg $chan "No status" }
if {![regexp -- {<span class="mainTextbold">.*?</span><br><br>\n(.*?)<br><br>} $data -> message]} { putmsg $chan "No message available" }
set message [string trim $message]
putmsg $chan "\002Label/Receipt Number:\002 $number"
putmsg $chan "\002Status:\002 $status"
putmsg $chan "$message"
}
Tested and worked
[07:26:35] <@Mookie> !track CJ274252758US
[07:26:37] <Mookie-He> Label/Receipt Number: CJ27 4252 758U S
[07:26:39] <Mookie-He> Status: International Dispatch
[07:26:41] <Mookie-He> Your item left the United States from LOS ANGELES at 6:14 AM on December 15, 2007. No further information is available for this item.
Last edited by Maiki on Fri Feb 01, 2008 2:30 pm, edited 1 time in total.
Maiki wrote:Instead of whining like little pussies. Just make it..
Unfortunately, it seems there's alot of confusion as to what really qualifies for this part of the forum. It has been declared as a "catch all" area earlier, to spare the other parts of the forum script requests and other posts that don't "fit" anywhere else. It's unfortunate, that people can't refrain from posting non-contributing responses here, rather than just ignore and move along to the next thread.
Of course, one cannot, and should not, expect to have their request crafted instantly, and should be prepared that their request remains unanswered.
In the end, I personally am getting quite fed up with all the "do it yourself" cut'n'paste replies from a number of members in here. That'll only bring these kinds of post to all other areas of the forum...
My name is elis catherine.
i'm totally newbie here, and very interest to learn about tcl.
as a newbie and like get a new toys, i'm always feel fun if my bot can do so much. unhappily i'm not expert in tcl, that's why I make req for you all. sure i'm always try and learn until one day i could make it by my self.
For YOU all that feel EXPERT just keep your ATTITUDE, especially your WORDS!
I have this on my inbox :
Modify it or I will send it to the Junk Yard.
Your tone is unacceptable!
---
what's this ? threat ?
just do it.. send it to junk yard or every where u want ?
I just say what I feel ? nothing more !
be wise if u r a moderator, dare to accept critism from the other member
not use your power as moderator to threat me !
I haven't been very active the last few months but I've been regularly visiting the forum trying to at least do my job as a moderator. I liked Maiki's reply "just make it," if you don't want to fulfill the request please do not post anything (next time, refrain from using offensive language Maiki). Of course, Alchera you already know that you've been addressed in this topic, particularly by nml375. You're my friend but I totally agree with nml375 and your reply to this topic was not an answer to the initial request and instead it changed the flow of the subject to a whole new off-topic subject.
This issue has been addressed before, please keep your posts about the topic. If you do not wish to answer or fulfill a particular request or even have feelings of disgust to a particular post simply refrain from posting anything at all. This is to EVERYBODY with no exclusion. Thank you.
The script request forum is for people that don't want to/know how to make the script themselves. Responding with links to manuals/howtos is off-topic IMO.
The script request forum is for people that don't want to/know how to make the script themselves. Responding with links to manuals/howtos is off-topic IMO.