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 154 matches

by darton
Sat Aug 26, 2006 1:25 pm
Forum: Scripting Help
Topic: Textfile-Output in only one line
Replies: 2
Views: 3717

Thank you. It works.
by darton
Sat Aug 26, 2006 7:37 am
Forum: Scripting Help
Topic: Textfile-Output in only one line
Replies: 2
Views: 3717

Textfile-Output in only one line

Hello! If I want to display everything of a textfile in a channel I use this script. proc foo {nick uhost hand chan arg} { set fd [open $::foofile r] while {![eof $fd]} { putquick "PRIVMSG $chan :[gets $fd]" } close $fd } The output looks like this: (@Bot) bla (@Bot) blabla (@Bot) blablabl...
by darton
Sun Aug 20, 2006 5:16 pm
Forum: Scripting Help
Topic: Delete a file
Replies: 3
Views: 8298

And can you tell me why this isn't working? set fname "scripts/test.txt" bind pub - !reset m:reset proc m:reset {nick uhost hand chan arg} { global fname if {[file exists $fname]} { file delete $fname putquick "PRIVMSG $chan :Done." } else { putquick "PRIVMSG $chan :File doe...
by darton
Sat Aug 19, 2006 11:08 am
Forum: Scripting Help
Topic: Delete a file
Replies: 3
Views: 8298

Delete a file

Hello!
I wonder if it is possible to delete a textfile with an eggdrop. With "catch {close [open $fname w]}" you can create a file. Is there a possibility to delete it with another command?
by darton
Fri Aug 11, 2006 2:21 pm
Forum: Scripting Help
Topic: destroy script not workin
Replies: 4
Views: 5693

Your proc head is incorrect again. It must be "{nick uhost hand chan text}"
by darton
Fri Aug 11, 2006 10:57 am
Forum: Scripting Help
Topic: make lsearch case insensitive
Replies: 6
Views: 6694

Yes nml375 alread said that. It's a little bit circumstantial but it works.
by darton
Fri Aug 11, 2006 10:54 am
Forum: Scripting Help
Topic: how do i make files
Replies: 10
Views: 8936

Forgot to replace a word.
I've edited my post. Copy it again and it will work. I also improved the !add script.
by darton
Fri Aug 11, 2006 6:59 am
Forum: Scripting Help
Topic: how do i make files
Replies: 10
Views: 8936

Now it should work. I deleted some mistakes. set gamefile "scripts/game.txt" if {![file exists $gamefile]} { catch {close [open $gamefile w]} } bind pub - !add pub:add proc pub:add {nick uhost hand chan arg} { set game [lindex [split $arg] 0] set code [lindex [split $arg] 1] if {$game != &...
by darton
Thu Aug 10, 2006 2:01 pm
Forum: Scripting Help
Topic: Problem with deleting a whole line of a textfile
Replies: 9
Views: 8187

demond wrote:I've said that countless times before, but darton just won't listen.
I am not good in making proper scripts. My scripts work but aren't proper.:wink:

But the script above is proper, isn't it?
by darton
Thu Aug 10, 2006 10:27 am
Forum: Scripting Help
Topic: make lsearch case insensitive
Replies: 6
Views: 6694

make lsearch case insensitive

Hello! If I use the command "lsearch" to look for the word "test" in a textfile, there is a difference between test and Test. But I want that they are equal. Unfortunately the function -nocase is only available from TCL 8.5. As I am using a windrop, compiling is not that easy. So...
by darton
Thu Aug 10, 2006 5:52 am
Forum: Scripting Help
Topic: Problem with deleting a whole line of a textfile
Replies: 9
Views: 8187

By the way, is it possible to delete more than one line?
by darton
Wed Aug 09, 2006 6:17 pm
Forum: Scripting Help
Topic: Problem with deleting a whole line of a textfile
Replies: 9
Views: 8187

It works perfectly now. Thank you.
by darton
Wed Aug 09, 2006 5:43 pm
Forum: Scripting Help
Topic: Problem with deleting a whole line of a textfile
Replies: 9
Views: 8187

Exactly the same happens. Another suggestion?
by darton
Wed Aug 09, 2006 5:36 pm
Forum: Scripting Help
Topic: how do i make files
Replies: 10
Views: 8936

That sould do it I hope: set gamefile "scripts/game.txt" if {![file exists $gamefile]} { catch {close [open $gamefile w]} } bind pub - !add pub:add proc pub:add {nick uhost hand chan arg} { set game [lindex [split $arg] 0] set code [lindex [split $arg] 1] if {$game != "" &&am...
by darton
Wed Aug 09, 2006 5:27 pm
Forum: Scripting Help
Topic: global variables don't work
Replies: 18
Views: 13472

I have shortened the script above a little bit ;)
So its not the $nick directly who says !afk. The bot who is $nick reproduces everything from a game, so there are people in the game who type !afk. So its [lindex [split $arg] 0] who says !afk.