| View previous topic :: View next topic |
| Author |
Message |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Nov 06, 2006 6:39 pm Post subject: XE.com currency convertor script v0.02b |
|
|
As promised, here is a script for xe.com's currency convertor:
http://members.dandy.net/~fbn/xeucc.tcl.txt
Enjoy
Last edited by rosc2112 on Sat Apr 28, 2007 5:56 pm; edited 1 time in total |
|
| Back to top |
|
 |
ZEXEL Halfop

Joined: 27 Jun 2006 Posts: 45
|
Posted: Tue Nov 07, 2006 6:41 am Post subject: Incredible creation |
|
|
Wooow... It's look so great and good work rosc2112!
That was an incredible creation from your hands and minds...
I love it...
Sorry for my bad english!
Thank you very much for your help and have a nice day!
 _________________ .:[ Knowledge Is The Power ]:. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Nov 07, 2006 12:13 pm Post subject: v0.01g |
|
|
Several updates to improve things a bit:
# Changes: Nov 06 2006
- Forgot to chop off the word 'search' when passing text to 'proc xecur_search'
- Fixed method of checking for valid 'tocur' and 'fromcur' symbols.
- Added 'comma' to the regexp test for valid characters in 'amount'
- More regexp tweaks to validate symbol input before passing along to geturl.
- Had to limit 'amount' input to under 14 digits/chars, otherwise XE.com makes mistakes.
/tips her hat |
|
| Back to top |
|
 |
incith Master

Joined: 23 Apr 2005 Posts: 275 Location: Canada
|
Posted: Wed Nov 15, 2006 5:44 am Post subject: |
|
|
I ran your list of currencies through GNU sort.. just seems cleaner/wiser to me and easier to find specific ones in the code.
I've included it here in the code tags, but here's a link to a txt file with it too: -link expired- (might need a unix2dos if you program in windows, and you don't use ultraedit)
Edit: Well, maybe you had them sorted by the actual Country name already.. oh well, here's an alternate sort! (also removed the horridly ugly/long code tags, use the link) _________________ ; Answer a few unanswered posts!
Last edited by incith on Thu Nov 16, 2006 6:15 pm; edited 1 time in total |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Wed Nov 15, 2006 1:42 pm Post subject: |
|
|
Yeah they were sorted on country name, but thanks  |
|
| Back to top |
|
 |
Jan Voice
Joined: 28 Feb 2006 Posts: 7
|
Posted: Sun Feb 25, 2007 11:38 am Post subject: |
|
|
| xe has new layout and xeucc.0.01c.tcl doesn't work anymore |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sun Feb 25, 2007 7:11 pm Post subject: |
|
|
| Fixed. |
|
| Back to top |
|
 |
Jan Voice
Joined: 28 Feb 2006 Posts: 7
|
Posted: Sun Feb 25, 2007 10:33 pm Post subject: |
|
|
| thx for swift update! |
|
| Back to top |
|
 |
ZEXEL Halfop

Joined: 27 Jun 2006 Posts: 45
|
Posted: Mon Feb 26, 2007 11:21 am Post subject: wow |
|
|
thx for the update vesion! i never miss it to download...  _________________ .:[ Knowledge Is The Power ]:. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Mar 20, 2007 1:33 am Post subject: |
|
|
| bonnie wrote: |
I'm having trouble sorting out the public channel. I listed 4 channels, only one works. The others are like ignoring the .xe comment. Can the script do 4 public channels?
|
It should yes, but the script uses lower case channel names, that might be the prob you're having. What do you have in its channel list? Lemme know if you still have probs and I'll do some debugging (it's been a while since I've tested it on multiple channels.) |
|
| Back to top |
|
 |
Bonnie Voice
Joined: 09 Dec 2004 Posts: 23
|
Posted: Tue Mar 20, 2007 7:47 am Post subject: |
|
|
Thank you
I thought about matching the case in the channel name.
I made sure they matched. Here is what I have in the channel list.
# Channels where we allow public use:
set xeuchans "#Freedom #DJ #Test-script #Tech-support"
# Out of the above channels, these will only respond by PRIVMSG:
set xeuquietchans "#chan2"
The only channel that works correctly is #DJ.
After reading your reply I changed all the list to lower case but #channel DJ.
Now I have all but one working. #tech-support is still not responding public.
I even added #etc back in thinking maybe the last one on the list was the problem.
This is working all but #tech-support.
# Channels where we allow public use:
set xeuchans "#freedom #DJ #test-script #tech-support #etc"
The #etc didn't seem it matter.
I hope you can understand my post.
Sorry for being a pain.
Thank you again for your script.
Bonnie |
|
| Back to top |
|
 |
Bonnie Voice
Joined: 09 Dec 2004 Posts: 23
|
Posted: Tue Mar 20, 2007 2:35 pm Post subject: |
|
|
Wow
I worked it out. I have the script public in all four channels.
It was very odd. The way the ircd showed was not the way
the script finally took them. I have to put some in upper case
some in lower. This is how it looks now. I have no idea why but it is working.
# Channels where we allow public use:
set xeuchans "#freedom #DJ #test-script #Tech-Support"
as the saying goes don't mess with success.
I'm not touching it
Thanks for you help
Bonnie |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Mar 20, 2007 9:06 pm Post subject: |
|
|
It's not hard to make scripts like that case-insensitive:
| Code: |
Added to proc xepub just before the if {([lsearch -exact $xeuchans $chan] line:
set xeuchans [string tolower $xeuchans]
set chan [string tolower $chan]
|
|
|
| Back to top |
|
 |
Bonnie Voice
Joined: 09 Dec 2004 Posts: 23
|
Posted: Sat Apr 28, 2007 10:51 am Post subject: |
|
|
Hi All
I just noticed the currency exchange script doing this.
<Weatherlady> XE.COM: 1.00 GBP equals 1.99754 USD as of 2007.04.28 14:29:56 UTC</span>
My bot is weatherlady but the bit at the end,
that I would like to know about. </span>
It just seemed to show up today.
Hope it is an easy fix.
Thanks
Bonnie |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Sat Apr 28, 2007 5:48 pm Post subject: |
|
|
Change:
| Code: |
if {[regexp {>Live rates at (.*?)</div>} $html match xetime] \
to:
if {[regexp {>Live rates at (.*?)</span>} $html match xetime] \
|
|
|
| Back to top |
|
 |
|