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.

Search found 24 matches

by BCyo+8C4
Tue Aug 05, 2008 6:14 pm
Forum: Scripting Help
Topic: replace every "*" in string
Replies: 4
Views: 3551

nvm, just figured it out:

Code: Select all

regsub -all {\*|!} $mask {\\\0} mask
by BCyo+8C4
Tue Aug 05, 2008 5:59 pm
Forum: Scripting Help
Topic: replace every "*" in string
Replies: 4
Views: 3551

doesn't work :( Tcl error [delban]: wrong # args: should be "regsub ?switches? exp string subSpec varName" Entered the command exactly like you said, only changed the variable names: set maskedString [regsub -all -- {\*|!} $mask {\\\0}] also tried with just "{\*}" as expression b...
by BCyo+8C4
Tue Aug 05, 2008 12:22 pm
Forum: Scripting Help
Topic: replace every "*" in string
Replies: 4
Views: 3551

replace every "*" in string

Hi, I'm keeping the channels banlist in a text file but got a problem removing the entries from that file as I can't figure out how to escape the asterisks. sed expects every "*" and "!" to be escaped like "\*" and "\!" What's the easiest way to replace _every...
by BCyo+8C4
Mon Jul 21, 2008 3:11 pm
Forum: Scripting Help
Topic: exec awk problem with quotes
Replies: 2
Views: 3225

that doesn't work either. while there's no error in console now the file is simply not changed, it's like awk didn't run at all. example "bans-chan.txt": ); ?> example tcl: set awk [list awk -f alfa.awk -v was=");" bans-chan.txt >bans-chan-tmp.txt] eval exec $awk the awk command ...
by BCyo+8C4
Mon Jul 21, 2008 2:24 pm
Forum: Scripting Help
Topic: exec awk problem with quotes
Replies: 2
Views: 3225

exec awk problem with quotes

Hi, I need a tcl to start awk like this: awk -f alfa.awk -v was="array('$mask'" bans-$chan.txt >bans-$chan-tmp.txt But when I put it in my script (after exec) like that it complains about "extra characters after close-quote" If I escape them (\") I get: Invalid command name ...
by BCyo+8C4
Sat Nov 10, 2007 6:22 am
Forum: Scripting Help
Topic: selecting a random item from an array
Replies: 8
Views: 4251

thanks guys. I had already tried that method before but due to an error later in the script the $tnick wouldn't be picked up (strangely it was when I had set it manually, that's why I didn't figure it at first)
by BCyo+8C4
Thu Nov 08, 2007 1:49 pm
Forum: Scripting Help
Topic: selecting a random item from an array
Replies: 8
Views: 4251

seriously, I already played ages with those commands and couldn't figure it out. if you want to help me please do so, but don't make me look like someone who doesn't rtfm!
by BCyo+8C4
Thu Nov 08, 2007 1:33 pm
Forum: Scripting Help
Topic: selecting a random item from an array
Replies: 8
Views: 4251

I tried various array commands as well, like this one:

Code: Select all

set tnick [[array names $players] [rand [array size $players]]]
I spent about 1,5h trying to figure this out already, the help files don't help me with this anymore. So could you please tell me how to do it?
by BCyo+8C4
Thu Nov 08, 2007 12:34 pm
Forum: Scripting Help
Topic: selecting a random item from an array
Replies: 8
Views: 4251

selecting a random item from an array

Hi, I've got an array that's populated using set players($nick) 1 , the "1" there is increased depending on certain events later. Now my problem: I want to select a random item (= nick) from the $players array, but I can't figure out how to do it. set tnick [lindex $players [rand [llength ...
by BCyo+8C4
Wed Feb 14, 2007 5:23 am
Forum: Eggdrop Help
Topic: ops text not logged anymore
Replies: 4
Views: 3767

I have a script binding pubm - *, changed it to return 0 now, let's hope it works.
by BCyo+8C4
Tue Feb 13, 2007 8:03 pm
Forum: Eggdrop Help
Topic: ops text not logged anymore
Replies: 4
Views: 3767

ops text not logged anymore

Hi, since I updated to 1.6.18 all the ops text doesn't appear in log anymore Anything normal users say is there, but not a single line of any user with +v, +h, +o, +a or +q. some eggdrop.conf lines: set logfile-suffix ".%Y%m%d" logfile pkj #chan "/home/username/eggdrop/logs/chan.log&q...
by BCyo+8C4
Fri Feb 09, 2007 1:52 pm
Forum: Scripting Help
Topic: storing multiple variables (counters + names) in 1 file
Replies: 10
Views: 7495

thank you very much, i made it work :-) wouldn't have been able to do so without your help
by BCyo+8C4
Fri Feb 09, 2007 7:25 am
Forum: Scripting Help
Topic: storing multiple variables (counters + names) in 1 file
Replies: 10
Views: 7495

i tried you tcl array solution, but i don't really get it counterdata.tcl: array set counter {nick 123 anothernick 456} the normal tcl: bind msg n !trigger increasecounter proc increasecounter {nick uhost hand text} { source counterdata.tcl foreach counter nickn { set counter($nickn) } savearray cou...
by BCyo+8C4
Thu Feb 08, 2007 5:55 am
Forum: Scripting Help
Topic: storing multiple variables (counters + names) in 1 file
Replies: 10
Views: 7495

I used search but couldn't find anything. Could you please point me to a thread with instructions/examples?
by BCyo+8C4
Wed Feb 07, 2007 6:31 am
Forum: Scripting Help
Topic: storing multiple variables (counters + names) in 1 file
Replies: 10
Views: 7495

just had the idea of writing and deleting the lines like this, but i'd still need a way to read a) certain entries (to get the old value) and b) all values (to print stats like "nick: 123, anothernick: 456" to channel. if someone could please give me a hint on how to do that.. :) exec echo...