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.

Problem with tcl

Old posts that have not been replied to for several years.
Locked
t
thewizard

Problem with tcl

Post by thewizard »

Lo all, i leeched this tcl off the archive and it throws an error at me in the partyline "Tcl error [pub:request]: can't read "botnicks": no such variable"

ive got the tcl here so u can view, if anyone can help id be gratefull

thx peepls
:P

set botnicks "botnick1 botnick2 botnick3"
set waittime "604800"
again. (default "604800" = 1 week)
set receiver "$owner"
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"
}
}
}
}
}
}
}
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

after:

Code: Select all

proc pub:request {nick uhost handle chan text} {
add this line:

Code: Select all

global botnicks waittime receiver
Elen sila lúmenn' omentielvo
t
thewizard

Post by thewizard »

thx pap, that worked great!!
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

no problem :)
glad to be of assistance ;)
Elen sila lúmenn' omentielvo
Locked