me: !duxas nick
bot: {nick uzhduxintas}
And now I need, when I write "!unduxas nick" bot will delete that nick from the list.

Any ideas?
Code: Select all
# what would you like the commands (addquote and quote) prefixs to be?
set quoteitpubprefix "!"
# where would you like the quoteit data to be stored?
set quoteitfile "quoteit.data"
# would you like quotes to be displayed via private notice?
#
# 0 = no, display quotes in channel instead
# 1 = yes, display quotes via private notice.
set quoteitvianotice "1"
if { ![info exists toolbox_loaded] } { source scripts/alltools.tcl }
bind pub - [string trim $quoteitpubprefix]duxai quoteit:pub:quote
bind pub G|G [string trim $quoteitpubprefix]duxas quoteit:pub:addquote
proc quoteit:pub:quote {nick uhost hand chan arg} {
global quoteitfile quoteitvianotice
set quotes ""
if { [file exists $quoteitfile] } { set file [open $quoteitfile r]
} else {
if { $quoteitvianotice == 0 } { putmsg $chan "$quoteitfile does not exist. You'll need to add quotes to the database first by typing \002!addquote <a quote>\002" }
if { $quoteitvianotice == 1 } { putnotc $nick "$quoteitfile does not exist. You'll need to add quotes to the database first by typing \002!addquote <a quote>\002" }
return 0
}
while { ![eof $file] } {
set quote [gets $file]
if { $quote != "" } {
set quotes [linsert $quotes end $quote]
}
}
close $file
set row [rand [llength $quotes]]
set quote [list $quotes]
if { $quote != "" } {
if { $quoteitvianotice == 0 } {
putmsg $chan "$quote"
}
if { $quoteitvianotice == 1 } {
putnotc $nick "$quote"
}
return 1
}
}
proc quoteit:pub:addquote {nick uhost hand chan arg} {
global quoteitfile
if { $arg == "" } {
putnotc $nick "Usage: !duxas <nick>"
return 0
}
set file [open $quoteitfile a]
puts $file "$arg"
close $file
putmsg $chan "{$arg uzhduxintas}"
return 1
}
putlog "*** Duxu tcl loaded"