| View previous topic :: View next topic |
| Author |
Message |
DjBeNNeTT Voice
Joined: 18 Feb 2006 Posts: 27 Location: Telford, Shropshire, UK
|
Posted: Sun Apr 23, 2006 1:16 pm Post subject: |
|
|
OMFG! lol. I'm blind.
Works perfect. Thanks
| Code: | set sex "scripts/sex.txt"
bind pub - !sex sex:msg
proc sex:msg {nick uhost hand chan arg} {
global sex
set sexmsg [string range [randomline $sex] 0 end]
puthelp "privmsg $chan :[subst -nocommands $sexmsg]"
}
proc randomline f {
set data [split [read [set file [open $f]]][close $file] \n]
set position [rand [llength $data]]
lindex $data $position
} |
_________________ DjBeNNeTT
Kewlsounds Radio:
http://kewlsounds.com
irc://irc.quakenet.org/#kewlsounds |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun Apr 23, 2006 5:52 pm Post subject: |
|
|
Both Wordpad and Word add invisible controls at the end of each carriage return and therefore Tcl code generated with either are prone to error generation/mis-reading. Text editors that leave scripts in Unix format are error free. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
DjBeNNeTT Voice
Joined: 18 Feb 2006 Posts: 27 Location: Telford, Shropshire, UK
|
Posted: Sun Apr 23, 2006 6:32 pm Post subject: |
|
|
Weird, i've never experianced a problem with wordpad.
I know that Notepad shows the squares for the next line command thingy.. (lol). Where in wordpad it converts it so that it is a next line, but when i save it, it seems perfectly happy. _________________ DjBeNNeTT
Kewlsounds Radio:
http://kewlsounds.com
irc://irc.quakenet.org/#kewlsounds |
|
| Back to top |
|
 |
|