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.

greet line not saving when bot dies or quits

Old posts that have not been replied to for several years.
Locked
C
CosmicD
Op
Posts: 102
Joined: Sat Dec 11, 2004 3:46 pm

greet line not saving when bot dies or quits

Post by CosmicD »

Hello,

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 :P

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 }}}}
Last edited by CosmicD on Sun Dec 12, 2004 12:10 pm, edited 1 time in total.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

post your scripts within code tags, check BBCode on how to do so
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

huh?

Post by user »

You failed to post the part of your code that takes care of saving.
Have you ever read "The Manual"?
Locked