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.
Old posts that have not been replied to for several years.
-
i
infernal
Post
by infernal »
someone knows where i can find a script that arrange trigger for me, but also can print .txt files, like: !help==>print help.txt
-
GodOfSuicide
- Master
- Posts: 463
- Joined: Mon Jun 17, 2002 8:00 pm
- Location: Austria
Post
by GodOfSuicide »
print = post to the channel or send it to a printer ?
-
]Kami[
- Owner
- Posts: 590
- Joined: Thu Jul 24, 2003 2:59 pm
- Location: Slovenia
-
Contact:
Post
by ]Kami[ »
Well,
I think he means print = read from file (print is used in C

- similar as echo in php).If he means that, then you can try something like this:
Code: Select all
bind pub -|- "!help" pub:help
proc pub:help {nick host handle chan arg} {
set fileid [open help.txt r]
gets $fileid newvar1
gets $fileid newvar2
putquick "PRIVMSG $chan :$newvar1"
putquick "PRIVMSG $chan :$newvar2"
close $fileid
}
This script will open file help.txt for reading (r) and it will take first 2 lines from file and displayed them in channel

-
i
infernal
Post
by infernal »
lol, i need more then 20 lines, there about 30 lines in that help file
-
KrzychuG
- Master
- Posts: 306
- Joined: Sat Aug 16, 2003 2:51 pm
- Location: Torun, Poland
-
Contact:
Post
by KrzychuG »
This should help
Code: Select all
bind pub -|- "!help" pub:help
proc pub:help { nick host handle channel arg } {
set fname [open help.txt r]
while {![eof $fname]} {
set line [gets $fname]
puthelp "PRIVMSG $channel :$line"
}
close $fname
} ;# pub:help
-
i
infernal
Post
by infernal »
well, that works, only he prints it in the channel and not via a pm, how do i do that??
you can always come and look @ it:
irc://irc.uicn.net/infernalarts
-
]Kami[
- Owner
- Posts: 590
- Joined: Thu Jul 24, 2003 2:59 pm
- Location: Slovenia
-
Contact:
Post
by ]Kami[ »
Look tcl-commands.doc
Btw, this will msg user:
Code: Select all
bind pub -|- "!help" pub:help
proc pub:help { nick host handle channel arg } {
set fname [open help.txt r]
while {![eof $fname]} {
set line [gets $fname]
puthelp "PRIVMSG $nick :$line"
}
close $fname
} ;# pub:help
-
i
infernal
Post
by infernal »
works now, thank you verry much
-
]Kami[
- Owner
- Posts: 590
- Joined: Thu Jul 24, 2003 2:59 pm
- Location: Slovenia
-
Contact:
Post
by ]Kami[ »
No Problem
