I have a request script but i cant make it put mode +m on when someone types !request <#channe> <botnick> here is the request script. could you please show me where it should go and what the part of the script is i think it is 'pushmode $channel +m' if that is right i dont know where to put it.
setudef flag requested
bind pub -|- !request botrequest
bind pub o|o !request-rules botrequestrules
bind pub o|o !request-format botrequestformat
bind pub o|o !request-website botrequestwebsite
proc botrequestwebsite {nick host handle channel arg} {
putserv "NOTICE $nick :You can also request bots from the website, it is slightly slower but you can allways request there even if the status in the channel is offline. The website address is http://www.sdweb.co.uk."
}
proc botrequestformat {nick host handle channel arg} {
putserv "NOTICE $nick :Please type '!request <#channel> <botnick>' to request a bot."
}
proc botrequestrules {nick host handle channel arg} {
set line [split $arg @]
set line1 [lindex $line 0]
set line2 [lindex $line 1]
set line3 [lindex $line 3]
set line4 [lindex $line 4]
putserv "NOTICE $nick :Here are the rules: $line1"
putserv "NOTICE $nick :Do not request flood the bot. $line2"
putserv "NOTICE $nick :Do not try to request more than one bot. $line3"
putserv "NOTICE $nick :Do not try to request when you have a bot in your channel already. $line4"
}
# 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]]
puthelp "NOTICE $nick :Your request is being handled"
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 10 [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]"[/code]