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 

BotRequest error

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Wed May 10, 2006 6:28 pm    Post subject: BotRequest error Reply with quote

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? Very Happy

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? Very Happy

-thanks

Code:
# 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."
Back to top
View user's profile Send private message AIM Address
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed May 10, 2006 6:59 pm    Post subject: Reply with quote

It looks like a very buggy script, botnicks is sensless - what is it? try another script.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Wed May 10, 2006 7:10 pm    Post subject: Reply with quote

I couldn't find another..

And I requested and no one would make Sad

http://forum.egghelp.org/viewtopic.php?t=11815 is the request
Back to top
View user's profile Send private message AIM Address
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed May 10, 2006 7:56 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message MSN Messenger
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Wed May 10, 2006 8:01 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message AIM Address
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed May 10, 2006 8:07 pm    Post subject: Reply with quote

Neither the function nor the variable name is part of the script you pasted above. Try to solve the same way.
_________________
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...


Last edited by De Kus on Wed May 10, 2006 8:09 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Wed May 10, 2006 8:08 pm    Post subject: Reply with quote

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 Sad
Back to top
View user's profile Send private message AIM Address
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed May 10, 2006 8:10 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message MSN Messenger
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Wed May 10, 2006 9:20 pm    Post subject: Reply with quote

Well im saying if you can make a bot like that one.
Back to top
View user's profile Send private message AIM Address
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Thu May 11, 2006 7:55 pm    Post subject: Reply with quote

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 Sad

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. Smile

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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