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

Old posts that have not been replied to for several years.
Locked
P
ProToz

Post by ProToz »

I need help with this dont know if you are familiar with the script but here is the code:

# BotRequest by popdog <Humpert.Ben@T-Online.de>, #Q-Control @ QuakeNet
# version 1.3 for eggdrop 1.5.x & 1.6.x
# 05-Nov-2001
# If you have suggestions -> #Q-Control @ QuakeNet

# some settings

set botnicks "|Shadows| |Creapy| |Tyreal|"
# Enter every bots nickanme which is free for requesting.
set waittime "68000"
# 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} {
global botnicks
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."


i get an error in the partyline that says :
TCL error [pub:request]: can't read "receiver": no such variable


i tried to message popdog see if he could help but he never answers. can you help?
j
jedis

Post by jedis »

Change

Code: Select all

proc pub:request {nick uhost handle chan text} { 
global botnicks
to

Code: Select all

proc pub:request {nick uhost handle chan text} { 
global botnicks receiver
P
ProToz

Post by ProToz »

lol fixin and error comes an error any way it fixed the specific error but now am getting :
TCL error [pub:request]: can't read "waittime": no such variable
j
jedis

Post by jedis »

Change

Code: Select all

proc pub:request {nick uhost handle chan text} { 
global botnicks receiver
to

Code: Select all

proc pub:request {nick uhost handle chan text} { 
global botnicks receiver waittime
P
ProToz

Post by ProToz »

Thanks no more error :smile:
P
ProToz

Post by ProToz »

one more thing how do i get the note sent to me instead of the party line?
j
jedis

Post by jedis »

According to that code, it is sending $receiver the note. You have that set as $owner. If you are the owner of the bot, then the bot is displaying the note to you.

If you're not away on the bot, it will appear to show it on the partyline.
Locked