| View previous topic :: View next topic |
| Author |
Message |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Wed May 10, 2006 6:28 pm Post subject: BotRequest error |
|
|
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?
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?
-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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Wed May 10, 2006 6:59 pm Post subject: |
|
|
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 |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Wed May 10, 2006 7:56 pm Post subject: |
|
|
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 |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Wed May 10, 2006 8:01 pm Post subject: |
|
|
| 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 |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Wed May 10, 2006 8:07 pm Post subject: |
|
|
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 |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Wed May 10, 2006 8:08 pm Post subject: |
|
|
| 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  |
|
| Back to top |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Wed May 10, 2006 8:10 pm Post subject: |
|
|
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 |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Wed May 10, 2006 9:20 pm Post subject: |
|
|
| Well im saying if you can make a bot like that one. |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu May 11, 2006 7:55 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
|