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.

Bookmarks script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
g
genti
Voice
Posts: 7
Joined: Wed Nov 30, 2005 5:32 pm

Bookmarks script

Post by genti »

Hi all!
I need a tcl script to append, by a trigger, an url from irc to a text file, and with another it read the text file and write the output in the client query. Does it is possible?


p.s.
sorry for my english :oops:
d
deadite66
Halfop
Posts: 74
Joined: Mon May 30, 2005 2:49 am
Location: Great Yarmouth, UK

Post by deadite66 »

use commands !url and !listurl

Code: Select all

bind pub - !url saveurl
proc saveurl {nick uhost hand chan arg} { 
if {$arg == ""} {
 puthelp "PRIVMSG $chan : Usage is !url web_page_url"
 } else {
 set fname "urlsave.txt"
 set fp [open $fname "a"]
 puts $fp $arg
 close $fp
 }
}


bind pub - !listurl listurl
proc listurl {nick uhost hand chan arg} {
set fp [open "urlsave.txt" "r"]
set data [read -nonewline $fp]
set lines [split $data "\n"]
close $fp
foreach x $lines {
	puthelp "PRIVMSG $nick :$x"
 }
}
<- tcl newb
g
genti
Voice
Posts: 7
Joined: Wed Nov 30, 2005 5:32 pm

Post by genti »

:*

thx
Post Reply