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.

BotRequest error

Support & discussion of released scripts, and announcements of new releases.
Post Reply
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

BotRequest error

Post by R-WaT »

Tcl error [pub:request]: can't read "botnicks": no such variable

How can I fix that? And does it look like there is any other errors before I test it? :D

And is there anyway to make it so people don't have to put homepage when they request a bot? And can someone change the !request command to .getbot please? :D

-thanks

Code: Select all

# some settings

set botnicks "R-WaT|Eggdrop"
# Enter every bots nickanme which is free for requesting.
set waittime "604800"
# Enter time in seconds the user have to wait before he can request again. (default "604800" = 1 week)
set receiver "$owner"
# Enter handle (or use $owner if the bot-owner shout receive it) of added user which should receive the request. If note should send to an user on another bot use handle@botname. (default "$owner")
# more users can be added if you remove the "#" in front of the line below


# YOU SHOULDN'T EDIT ANYTHING BELOW THIS LINE IF YOU DON'T KNOW WHAT YOU ARE DOING !!

bind pub -|- !request pub:request

proc pub:request {nick uhost handle chan text} {
  set ipmask [lindex [split [maskhost $nick![getchanhost $nick $chan]] "@"] 1]
  set userm [lindex [split [getchanhost $nick $chan] "@"] 0]
  set userhost *!*$userm@$ipmask
  set requestbot [lindex [split $text " "] 0]
  set channel [lindex [split $text " "] 1]
  set homepage [lindex [split $text " "] 2]
  if {[matchattr $handle +R]} {
    putserv "NOTICE $nick :Request not send."
    putserv "NOTICE $nick :You already requested a bot in the last 7 days!"
    putserv "NOTICE $nick :You have to wait more than 7 days after a successful Request."
    } else {
    if {$requestbot == ""} {
      putserv "NOTICE $nick :Wrong !request-format."
      putserv "NOTICE $nick :To request use: 4!request <bot-nick> #channel http://www.home.page"
      putserv "NOTICE $nick :You also need a working homepage and 2 or more Members opped in the requested channel."
      } else {
      if {$channel == ""} {
        putserv "NOTICE $nick :Wrong !request-format."
        putserv "NOTICE $nick :To request use: 4!request <bot-nick> #channel http://www.home.page"
        putserv "NOTICE $nick :You also need a working homepage and 2 or more Members opped in the requested channel."
        } else {
        if {[string first "#" $channel] == -1} {
          putserv "NOTICE $nick :Wrong !request-format."
          putserv "NOTICE $nick :To request use: 4!request <bot-nick> #channel http://www.home.page"
          putserv "NOTICE $nick :You also need a working homepage and 2 or more Members opped in the requested channel."
          } else {
          if {[string first "http://" $homepage] == -1} {
            putserv "NOTICE $nick :Wrong !request-format."
            putserv "NOTICE $nick :To request use: 4!request <bot-nick> #channel http://www.home.page"
            putserv "NOTICE $nick :You also need a working homepage and 2 or more Members opped in the requested channel."
            } else {
            if {[string first $requestbot $botnicks] != -1} {
              if {$channel != ""} {
                if {$homepage != ""} {
                  sendnote BotRequest $receiver "$nick want's $requestbot in $channel. His HP is $homepage."
#                  sendnote BotRequest user1 "$nick want's $requestbot in $channel. His HP is $homepage."
#                  sendnote BotRequest user2 "$nick want's $requestbot in $channel. His HP is $homepage."
                  adduser $nick $userhost
                  chattr $nick +R|
                  utimer $waittime "chattr $nick -R|"
                  putserv "NOTICE $nick :Request send."
                  } else {
                  putserv "NOTICE $nick :Wrong !request-format."
                  putserv "NOTICE $nick :To request use: 4!request <bot-nick> #channel http://www.home.page"
                  putserv "NOTICE $nick :You also need a working homepage and 2 or more Members opped in the requested channel."
                }
              }
              } else {
              putserv "NOTICE $nick :You typed a wrong bot-nick. Known bot-nick's are:"
              putserv "NOTICE $nick :$botnicks"
            }
          }
        }
      }
    }
  }
}

putlog "BotRequest v1.3 by popdog loaded."
User avatar
Sir_Fz
Revered One
Posts: 3793
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

It looks like a very buggy script, botnicks is sensless - what is it? try another script.
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

Post by R-WaT »

I couldn't find another..

And I requested and no one would make :(

http://forum.egghelp.org/viewtopic.php?t=11815 is the request
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

replace occurances of '$botnicks' with '$::botnicks'. I havent looked into the code any more, but that should at least fix your given error.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

Post by R-WaT »

De Kus wrote:replace occurances of '$botnicks' with '$::botnicks'. I havent looked into the code any more, but that should at least fix your given error.
Ok, I did that.. Now I get another error: Tcl error [getbot]: can't read "botone": no such variable
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

Neither the function nor the variable name is part of the script you pasted above. Try to solve the same way.
Last edited by De Kus on Wed May 10, 2006 8:09 pm, edited 1 time in total.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

Post by R-WaT »

De Kus wrote:This function is not part of the script you pasted above. Try to solve the same way.

Think you can make the script described in this thread I made: http://forum.egghelp.org/viewtopic.php?t=11815

??


Because I have a feeling im not going to beable to get this one to work :(
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

You cannot run remote (mIRC) scripts on eggdrops, there is also no wrapper, emulator or automatic translator avaible.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

Post by R-WaT »

Well im saying if you can make a bot like that one.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

R-WaT wrote:
De Kus wrote:This function is not part of the script you pasted above. Try to solve the same way.

Think you can make the script described in this thread I made: http://forum.egghelp.org/viewtopic.php?t=11815

??


Because I have a feeling im not going to beable to get this one to work :(
demond wrote:R-WaT:

in case you haven't noticed, this is eggdrop scripting forum, not mIRC scripting forum
Learn Tcl and do it yourself OR contact the author of the script you downloaded; most authors are quite happy to take constructive suggestions onboard. :)

NB: Using the advice given (above) will also help you if you make a little effort.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Post Reply