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 

Bookmarks script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
genti
Voice


Joined: 30 Nov 2005
Posts: 7

PostPosted: Thu Jun 22, 2006 8:58 am    Post subject: Bookmarks script Reply with quote

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 Embarassed
Back to top
View user's profile Send private message
deadite66
Halfop


Joined: 30 May 2005
Posts: 74
Location: Great Yarmouth, UK

PostPosted: Thu Jun 22, 2006 10:47 am    Post subject: Reply with quote

use commands !url and !listurl

Code:
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
Back to top
View user's profile Send private message
genti
Voice


Joined: 30 Nov 2005
Posts: 7

PostPosted: Thu Jun 22, 2006 11:52 am    Post subject: Reply with quote

:*

thx
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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