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 

adding to list

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
stoo
Voice


Joined: 30 Jan 2004
Posts: 14

PostPosted: Sun Apr 18, 2004 11:50 am    Post subject: adding to list Reply with quote

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:

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
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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