I've got a problem with a script that I am using. it allows the bot to greet and count the users that join a channel, but when the bot exists completely it seems to loose some settings:
the gcount setting will be off (where it was on for a certain channel) but the counting variable still remains intact, meaing that when you set it to on the bot doesn't start from zero
the greet line is vanished.
besides, all settings within this script are lost when bot quits

I hope that you can help me when I paste the pieces of code relevant to this: ?
hope you're not confused with the native language

Code: Select all
greet { if {[matchattr $handle &m $channel] || [matchattr $handle o]} {
if {![checksec $nick $uhost $handle]} { return 0 }
if {![matchattr $handle +Q]} {
putserv "NOTICE $nick :Je bent niet ingelogd."
putserv "NOTICE $nick :Log in met: /msg $botnick login <paswoord>."
return 0}
set who [lrange $var 1 end]
if {$who == ""} {
putserv "NOTICE $nick :Gebruik greet <bericht> of 'OFF' om greet uit te zette$
if {![info exists topicinfo(greet$channel)]} {
putserv "NOTICE $nick :Huidige instelling: UIT" } else {
putserv "NOTICE $nick :Huidige instelling: $topicinfo(greet$channel)" }
return 0 }
if {[string tolower $who] == "off"} {
unset topicinfo(greet$channel)
putserv "NOTICE $nick :Greet is uitgeschakeld"
return 0 }
set topicinfo(greet$channel) $who
putserv "NOTICE $nick :Greet ingesteld op: $who"
return 0 }}
Code: Select all
gcount { if {[matchattr $handle &m $channel] || [matchattr $handle o]} {
if {![checksec $nick $uhost $handle]} { return 0 }
if {![matchattr $handle +Q]} {
putserv "NOTICE $nick :Je bent niet ingelogd."
putserv "NOTICE $nick :Log in met: /msg $botnick login <paswoord>."
return 0}
if {$who == ""} {
putserv "NOTICE $nick :Gebruik: gcount <on|off>"
return 0 }
switch $who {
off { set topicinfo(gcount$channel) "0"
putserv "NOTICE $nick :Greet count uit."
return 0 }
on { set topicinfo(gcount$channel) "1"
putserv "NOTICE $nick :Greet count aan."
return 0 }}}}