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.

Change the Encoding so it shows "Å" [SOLVED]

Help for those learning Tcl or writing their own scripts.
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Change the Encoding so it shows "Å" [SOLVED]

Post by Fire-Fox »

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.
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

encoding problems

Using the forum Search function is such a joyous thing. :D
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

have you searched for "iso8859-1" in src/tcl.c i can't find this i my eggdrop :O
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

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!!!"
}
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.
==================================
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

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!!!
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.
==================================
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

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"
}
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.
==================================
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

awyeah wrote:Sorry my bad, the code is fixed above.

BIG thanks for all your help it works now :)

once again THANKS :)
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

a little offtopic here :P

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 ???
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

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.
==================================
User avatar
Fire-Fox
Master
Posts: 299
Joined: Sat Sep 23, 2006 9:01 pm
Location: /dev/null

Post by Fire-Fox »

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
GreatZ
Fire-Fox | Denmark

Scripts: Relay | Store Text | TvMaze
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

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)

Code: Select all

.chattr <handle> +D
Post Reply