here is the request script i was made. what i want to do is add a peice of script to this to make the bot send a message to the channel where the bot service is saying Request being handled.
Can anyone help with that
here is the script.
# This file is loaded on the request bot
setudef flag requested
bind pub -|- !request botrequest
# Replace botname/botname2/botname3 with names of bots
# You can have as many as needed.
# Put the bot name in lowercase (no caps).
set requestable(|logical|) 1
set requestable(|icute|) 1
set requestable(|exode|) 1
set requestor(null) 0
set rbots(null) 0
proc botrequest { nick address handle chan text } {
set channel [join [lindex [split $text] 0]]
set bot [join [lindex [split $text] 1]]
global requestable
if { ![info exists requestable([string tolower $bot])] } {
puthelp "NOTICE $nick :Sorry, that isn't requestable."
return
}
if { [validchan $channel] } {
puthelp "NOTICE $nick :Sorry, I already seem to be on that channel."
return
}
channel add $channel
channel set $channel +requested
global requestor
global rbots
set requestor([string tolower $channel]) $nick
set rbots([string tolower $channel]) $bot
}
bind join -|- * botjoin3
proc botjoin3 { bnick address handle channel } {
global nick
if { [string tolower $bnick] == [string tolower $nick] } {
if { [channel get $channel requested] } {
utimer 5 [list checkjoin $channel]
channel set $channel -requested
}
}
}
proc checkjoin { channel } {
global requestor
set request $requestor([string tolower $channel])
if { ![isop $request $channel] } {
channel remove $channel
puthelp "NOTICE $request :Leaving channel $channel - requestor not opped"
return
}
set list [chanlist $channel]
set length [llength [split $list]]
if { $length < 5 } {
channel remove $channel
puthelp "NOTICE $request :You must have more than 5 people in the channel to request a bot."
return
}
global rbots
botjoin $rbots([string tolower $channel]) $channel
channel remove $channel
}
proc botjoin { bot channel } {
set code "blah"; append code [string tolower $channel]; putserv "PRIVMSG $bot :join $channel [md5 $code]"
}