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.
Help for those learning Tcl or writing their own scripts.
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Mon Sep 17, 2007 7:11 pm
how can i change the Encoding so it shows "Å"
Last edited by
Fire-Fox on Thu Sep 20, 2007 10:34 am, edited 2 times in total.
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Mon Sep 17, 2007 8:05 pm
encoding problems
Using the forum
Search function is such a joyous thing.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Mon Sep 17, 2007 8:17 pm
have you searched for "iso8859-1" in src/tcl.c i can't find this i my eggdrop :O
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Mon Sep 17, 2007 8:21 pm
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Mon Sep 17, 2007 8:31 pm
can see any salution but it's me hehe im not hardcore to eggdrop....
but i have this code here:
i need the "aa" replaced with "å"
Code: Select all
########################
### SKÅL ###
######################
set chans "#aliasfm"
set schelptrigger "skaal"
bind pub - $schelptrigger pub_skaal
proc pub_skaal {nick uhost hand chan text} {
putserv "privmsg $chan $nick :4RÅBER 4SSSSSS7K3Å11Å13Å12Å4Å9Å3Å6Å7Å4Å10å8å9å14å13å5L5L5L5L5L5L - 4AliasFM!!!"
}
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Mon Sep 17, 2007 8:43 pm
You can use this then:
Code: Select all
set chans "#aliasfm"
set schelptrigger "skaal"
set mytext "afdasgfaagfsaaasgfryuitkaaaarsgtrdythgftrrqw"
bind pub - $schelptrigger pub_skaal
proc pub_skaal {nick uhost hand chan text} {
regsub -all {aa} [encoding convertfrom iso8859-1 $::mytext] "\354" mynewtext
putserv "PRIVMSG $chan :$mynewtext"
}
Not tested, but this should do it hopefully.
Edited: Fixed error
Last edited by
awyeah on Mon Sep 17, 2007 9:14 pm, edited 1 time in total.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Mon Sep 17, 2007 8:53 pm
awyeah wrote: You can use this then:
Code: Select all
set chans "#aliasfm"
set schelptrigger "skaal"
set mytext "afdasgfaagfsaaasgfryuitkaaaarsgtrdythgftrrqw"
bind pub - $schelptrigger pub_skaal
proc pub_skaal {nick uhost hand chan text} {
regsub -all {aa} [encoding convertfrom iso8859-1 $::mytext] "\354" $mynewtext
putserv "PRIVMSG $chan :$mynewtext"
}
Not tested, but this should do it hopefully.
set mytext shell i replace that with this:
RÅBER 4SSSSSS7K3Å11Å13Å12Å4Å9Å3Å6Å7Å4Å10å8å9å14å13å5L5L5L5L5L5L - 4AliasFM!!!
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Mon Sep 17, 2007 9:07 pm
This script will replace any occurences of "aa" in $mytext with "å" and assign the substituted string to $mynewtext, which will be displayed on the channel.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Mon Sep 17, 2007 9:10 pm
when i type "skål" or "skaal" in the chan
i get this i partyline
[pub_skaal]: can't read "mynewtext": no such variable
the code i have now:
Code: Select all
set chans "#aliasfm"
set schelptrigger "skål"
set mytext "4RÅBER 4SSSSSS7K3Å11Å13Å12Å4Å9Å3Å6Å7Å4Å10å8å9å14å13å5L5L5L5L5L5L - 4AliasFM!!!"
bind pub - $schelptrigger pub_skaal
proc pub_skaal {nick uhost hand chan text} {
regsub -all {aa} [encoding convertfrom iso8859-1 $::mytext] "\354" $mynewtext
putserv "PRIVMSG $chan :$mynewtext"
}
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Mon Sep 17, 2007 9:15 pm
Sorry my bad, the code is fixed above.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Mon Sep 17, 2007 9:17 pm
awyeah wrote: Sorry my bad, the code is fixed above.
BIG thanks for all your help it works now
once again THANKS
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Mon Sep 17, 2007 9:19 pm
a little offtopic here
but do you know a way to add users to the bot so that get +D yes i can add with .chattr <nick> +D but it cuts the name so it not work with a name over x chars ???
awyeah
Revered One
Posts: 1580 Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:
Post
by awyeah » Mon Sep 17, 2007 9:22 pm
I'm not sure what +D does over here. See tcl-commands.doc in the eggdrop package for the list of flags available.
As for adding users with a new flag who get the umode +D, I guess then that can be only done through a tcl script.
·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Fire-Fox
Master
Posts: 299 Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null
Post
by Fire-Fox » Mon Sep 17, 2007 9:25 pm
awyeah wrote: I'm not sure what +D does over here. See tcl-commands.doc in the eggdrop package for the list of flags available.
As for adding users with a new flag who get the umode +D, I guess then that can be only done through a tcl script.
+D is a kind of op posion in the bot so they can use specified command when
bind pub D $scsetdjtrigger pub_setdj
DragnLord
Owner
Posts: 711 Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA
Post
by DragnLord » Tue Sep 18, 2007 2:17 am
eggdrop defaults to handles of only 9 characters
you will have to edit eggdrop.h to increase that (up to 32)
if you add a user with a long nick, the bot creates the handle from the first 9 chars and drops the rest
the following works quite well with domsen's shoutcast script from domsen.org (script in archive is outdated, website has code fixes)