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.
B
BigSjedow
Post
by BigSjedow » Sun Dec 01, 2002 6:52 am
Hello,
can someone make a tcl script for me.
I'd like to have a userlist of alle the users in my chan saved to a xml file directly to a webhost of to a txt file on the bot host...
Needing this one badly...
Someone who can help. ???
Grz...
BigSjedow
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Sun Dec 01, 2002 8:47 am
Well, to save on space, you might as well parse the userfile directly.
Somthing like
Code: Select all
set fp [open file w]
puts $fp "[join [userlist] \n]"
close $fp
WOuld do this.
B
BigSjedow
Post
by BigSjedow » Sun Dec 01, 2002 9:54 am
Newbie on this.....
So can u explane it a bit more.
Grz
BigSjedow
B
BigSjedow
Post
by BigSjedow » Sun Dec 01, 2002 11:30 am
This tcl file is what i have from someone else. but it doesn't work... maybe one of u guys can tell me what is wrong ??
Code: Select all
set vb_htmlfile "/usr/home/eggdrop/userlist.txt"
set vb_chan "#chan"
# Don't Change ANYTHING below this unless you know what you're doing!
set vb_text "#000000"
bind join - "$vb_chan %" vb:make
bind part - "$vb_chan %" vb:make
proc vb:make {args} {
global vb_htmlfile vb_chan vb_text server
set vb_file [open $vb_htmlfile w]
puts $vb_file "<b>Topic</b>: $vb_chan \[[lindex [getchanmode $vb_chan] 0]\]: '[vb:convert [topic $vb_chan]]'<br>"
puts $vb_file "<b>Server</b>: [string range $server 0 [expr [string last ":" $server] - 1]]<br>\n"
set online [chanlist $vb_chan]
set users [lindex $online 1]
for {set i 2} {$i < $count} {incr i 1} {
set user [lindex $online $i]
set users "$users%20$user"
}
puts $vb_file "<b>Users</b> \[[llength [chanlist $vb_chan]]\]: $users<br>\n"
close $vb_file
return 1
}
proc vb:convert {vb_text} {
#Strip control codes.. sorta
regsub -all $vb_text "" vb_text
regsub -all $vb_text "" vb_text
regsub -all $vb_text "" vb_text
regsub -all $vb_text "" vb_text
regsub -all $vb_text "" vb_text
#Convert special chars
regsub -all & $vb_text "\\&" vb_text
regsub -all \" $vb_text "\\"" vb_text
regsub -all < $vb_text "\\<" vb_text
regsub -all > $vb_text "\\>" vb_text
regsub -all " " $vb_text " \\ " vb_text
return $vb_text
}
set vb_file [open $vb_htmlfile w]
puts $vb_file "<b>Topic</b>: $vb_chan \[\]: ''<br>"
puts $vb_file "<b>Server</b>: unknown<br>"
puts $vb_file "<b>Users</b>: unknown<br>\n"
close $vb_file
utimer 2 vb:make
putlog "IRC nick list loaded."
d
deurk
Post
by deurk » Mon Dec 02, 2002 3:20 pm
You took someone else code without even mentionning his name...
That's lame.
Plus, you ask for help without RTFM apparently...
That's not something I'm going to answer to...
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Mon Dec 02, 2002 3:44 pm
There is nothign wrong with yusing some1 elses code.
That is the good thing about Tcl and Open Source software.
When people start taking a script, changing a few lines here and there, then posting it with there own name on, then yes, that is lame.
He simply pasted code, said it doesn't work and asked if any1 could spot what was wrong. Nothign lame in that. I am sure you would do the same.
d
deurk
Post
by deurk » Tue Dec 03, 2002 4:08 am
Not sure that pasting code AS-IS without mentionning name is sooo cool but OK, sorry for that guys.
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Tue Dec 03, 2002 5:58 am
Posting to a forum, is different to releasing code.
One thing he pointed out, was the fact it didn't work. WHat is the point in usless code.
He said it was not his own work. I do beleive that most scripters will only say there name needs to be included, when it's being used in another script. In this case, he was asking questions, and in no way trying to release the code. On top, if he does release eventualy, so long as the name is included then.
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Tue Dec 03, 2002 7:04 am
agreed
Elen sila lúmenn' omentielvo
B
BigSjedow
Post
by BigSjedow » Wed Dec 04, 2002 5:25 am
the guy who made it: joey
more i do not know.
but nobody an idea what is wrong???