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.

XE.com currency convertor script v0.02b

Support & discussion of released scripts, and announcements of new releases.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

XE.com currency convertor script v0.02b

Post by rosc2112 »

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.
User avatar
ZEXEL
Halfop
Posts: 45
Joined: Tue Jun 27, 2006 10:47 pm
Contact:

Incredible creation

Post by ZEXEL »

Wooow... It's look so great and good work rosc2112! :D
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!
:wink: :wink: :wink: :wink: :wink:
.:[ Knowledge Is The Power ]:.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

v0.01g

Post by rosc2112 »

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
User avatar
incith
Master
Posts: 275
Joined: Sat Apr 23, 2005 2:16 am
Location: Canada

Post by incith »

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)
Last edited by incith on Thu Nov 16, 2006 6:15 pm, edited 1 time in total.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Yeah they were sorted on country name, but thanks :)
J
Jan
Voice
Posts: 7
Joined: Tue Feb 28, 2006 2:57 pm

Post by Jan »

xe has new layout and xeucc.0.01c.tcl doesn't work anymore
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Fixed.
J
Jan
Voice
Posts: 7
Joined: Tue Feb 28, 2006 2:57 pm

Post by Jan »

thx for swift update!
User avatar
ZEXEL
Halfop
Posts: 45
Joined: Tue Jun 27, 2006 10:47 pm
Contact:

wow

Post by ZEXEL »

thx for the update vesion! i never miss it to download... :wink:
.:[ Knowledge Is The Power ]:.
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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.)
B
Bonnie
Voice
Posts: 23
Joined: Thu Dec 09, 2004 11:20 am

Post by Bonnie »

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
B
Bonnie
Voice
Posts: 23
Joined: Thu Dec 09, 2004 11:20 am

Post by Bonnie »

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
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

It's not hard to make scripts like that case-insensitive:

Code: Select all

Added to proc xepub just before the if {([lsearch -exact $xeuchans $chan] line:

        set xeuchans [string tolower $xeuchans]
        set chan [string tolower $chan]
B
Bonnie
Voice
Posts: 23
Joined: Thu Dec 09, 2004 11:20 am

Post by Bonnie »

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
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Change:

Code: Select all

if {[regexp {>Live rates at (.*?)</div>} $html match xetime] \

to:

if {[regexp {>Live rates at (.*?)</span>} $html match xetime] \
Post Reply