| View previous topic :: View next topic |
| Author |
Message |
rayvtirx Voice
Joined: 31 May 2010 Posts: 16 Location: bristol,england
|
Posted: Sat Jan 15, 2011 8:46 am Post subject: newb question, wildcard in command variable? |
|
|
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 |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Sat Jan 15, 2011 2:52 pm Post subject: |
|
|
Tried 'bind pubm' instead? _________________ Once the game is over, the king and the pawn go back in the same box. |
|
| Back to top |
|
 |
rayvtirx Voice
Joined: 31 May 2010 Posts: 16 Location: bristol,england
|
Posted: Sat Jan 15, 2011 3:04 pm Post subject: |
|
|
oh my goodness lol
thank you v much works a treat
i didnt think it would be that simple  |
|
| Back to top |
|
 |
|