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.

Site Database Script

Old posts that have not been replied to for several years.
Locked
D
D4N3
Voice
Posts: 10
Joined: Tue Nov 26, 2002 2:14 am

Site Database Script

Post by D4N3 »

does anyone know of or have a script that will store a site when a pub command is used like !addsite ip port user pass or know how i could make this. also have a pub command to list all the sites.
M
MC_8
Voice
Posts: 36
Joined: Sat Apr 26, 2003 5:04 pm
Location: Dallas, Texas
Contact:

Post by MC_8 »

Bind pub to add the site

Code: Select all

set io [open datafile.dat w]
puts $io $the_text
close $io
Bind pub to view all sites saved in the datafile.dat

Code: Select all

if {![file exists datafile.dat]} {close [open datafile.dat w]}
set io [open datafile.dat r]
while {![eof $io]} {
  gets $io line
  if {[string trim $line] == ""} {continue}
  putserv "PRIVMSG $channel :$line"
}
close $io
Hope that helps, might want to find a tutorial on TCL if your really new at this.
Carl M. Gregory - MC_8
http://mc.purehype.net/whois/
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Just a note, I think that first script was supposed to use an "a" instead of a "w"
M
MC_8
Voice
Posts: 36
Joined: Sat Apr 26, 2003 5:04 pm
Location: Dallas, Texas
Contact:

Post by MC_8 »

Yea, a.
Carl M. Gregory - MC_8
http://mc.purehype.net/whois/
D
D4N3
Voice
Posts: 10
Joined: Tue Nov 26, 2002 2:14 am

...

Post by D4N3 »

thanks,
Locked