egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

XE.com currency convertor script v0.02b
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Mon Nov 06, 2006 6:39 pm    Post subject: XE.com currency convertor script v0.02b Reply with quote

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
View user's profile Send private message
ZEXEL
Halfop


Joined: 27 Jun 2006
Posts: 45

PostPosted: Tue Nov 07, 2006 6:41 am    Post subject: Incredible creation Reply with quote

Wooow... It's look so great and good work rosc2112! Very Happy
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 ]:.
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Nov 07, 2006 12:13 pm    Post subject: v0.01g Reply with quote

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
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Wed Nov 15, 2006 5:44 am    Post subject: Reply with quote

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
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Wed Nov 15, 2006 1:42 pm    Post subject: Reply with quote

Yeah they were sorted on country name, but thanks Smile
Back to top
View user's profile Send private message
Jan
Voice


Joined: 28 Feb 2006
Posts: 7

PostPosted: Sun Feb 25, 2007 11:38 am    Post subject: Reply with quote

xe has new layout and xeucc.0.01c.tcl doesn't work anymore
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sun Feb 25, 2007 7:11 pm    Post subject: Reply with quote

Fixed.
Back to top
View user's profile Send private message
Jan
Voice


Joined: 28 Feb 2006
Posts: 7

PostPosted: Sun Feb 25, 2007 10:33 pm    Post subject: Reply with quote

thx for swift update!
Back to top
View user's profile Send private message
ZEXEL
Halfop


Joined: 27 Jun 2006
Posts: 45

PostPosted: Mon Feb 26, 2007 11:21 am    Post subject: wow Reply with quote

thx for the update vesion! i never miss it to download... Wink
_________________
.:[ Knowledge Is The Power ]:.
Back to top
View user's profile Send private message Visit poster's website
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Mar 20, 2007 1:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Bonnie
Voice


Joined: 09 Dec 2004
Posts: 23

PostPosted: Tue Mar 20, 2007 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message
Bonnie
Voice


Joined: 09 Dec 2004
Posts: 23

PostPosted: Tue Mar 20, 2007 2:35 pm    Post subject: Reply with quote

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 Wink
Thanks for you help
Bonnie
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Mar 20, 2007 9:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
Bonnie
Voice


Joined: 09 Dec 2004
Posts: 23

PostPosted: Sat Apr 28, 2007 10:51 am    Post subject: Reply with quote

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
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Sat Apr 28, 2007 5:48 pm    Post subject: Reply with quote

Change:
Code:

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

to:

if {[regexp {>Live rates at (.*?)</span>} $html match xetime] \
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber