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.

adding to list

Old posts that have not been replied to for several years.
Locked
s
stoo
Voice
Posts: 14
Joined: Fri Jan 30, 2004 1:10 pm

adding to list

Post by stoo »

what i want to do is allow anyone in the channel to do the following

!merc <info>

anything that is in the info part, i need saved and added to a database.

every minuite i need the database to be displayed to the channel.

after 5 mins i want the fist line to be removed and the second line to become the first line and so on...

this is what i have so far, but its not working...

Code: Select all

bind pub -|- !merc merc:merc

set channel "#stoobar"

set time 15

set merclist ""
set merctext  "$merclist"
set used 1


if {[string compare [string index $time 0] "!"] == 0} { set timer [string range $time 1 end] } { set timer [expr $time * 1] }
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }

proc merc:merc {nick host handle chan text} { 
global used merclist merctext

incr used
set list [split $text] 
set info1 [lindex $list 0] 
set info2 [lindex $list 1] 
set info3 [lindex $list 2]
set info3 [lindex $list 3]
set info4 [lindex $list 4]
set info5 [lindex $list 5]
set info6 [lindex $list 6]
set info7 [lindex $list 7]
set info8 [lindex $list 8]
set info9 [lindex $list 9]
set info10 [lindex $list 10]
set mercinfo($used) "$info1 $info2 $info3 $info4 $info5 $info6 $info7 $info8 $info9 $info10"
set mercinfo($nick) $used
append $merclist mercinfo($used)
putquick "NOTICE $nick : You have been added $used"
putquick "NOTICE $nick : $mercinfo($used)"
return 1}


proc go {} {
global channel time merctext timer merclist
foreach chan $channel {
foreach line $merclist { putserv "PRIVMSG $chan :$line" }
}
if {[lsearch -glob [utimers] "* go *"] == -1} { utimer $timer go }
}
any help would be greatly appreciated
Locked