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 

newb question, wildcard in command variable?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
rayvtirx
Voice


Joined: 31 May 2010
Posts: 16
Location: bristol,england

PostPosted: Sat Jan 15, 2011 8:46 am    Post subject: newb question, wildcard in command variable? Reply with quote

how would i use wildcards in the command to post this txt file?
so i could type e.g fadfsjoke and have it work
i tried adding * and it then requires me to type *joke lol
Code:
set bfile "scripts/joke.txt"

#sets the command it should go on off in a chan or so
set cmd "joke"

#this is where you set where the file should be printed out
#private = 0
#channel = 1
set bwhere 1

## don't edit below this line -----------------------------------
bind pub -|- $cmd dumpfile
proc dumpfile {nick handle host chan text } {
global bfile bwhere
set foo [open $bfile r]
while { ! [eof $foo] } {
        set line [gets $foo]
                if {!$bwhere} {
                puthelp "NOTICE $nick :$line"
                } else {
                puthelp "NOTICE $chan :$line"
                }
        }
}
is there something easy i could do to implement this?
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Sat Jan 15, 2011 2:52 pm    Post subject: Reply with quote

Tried 'bind pubm' instead?
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
rayvtirx
Voice


Joined: 31 May 2010
Posts: 16
Location: bristol,england

PostPosted: Sat Jan 15, 2011 3:04 pm    Post subject: Reply with quote

oh my Embarassed goodness lol
thank you v much works a treat
i didnt think it would be that simple Very Happy
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
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