one checkflags script for request botservice
ir very nice ..
Checkflags if dont have +ao on channel
Channel removed by bot Reason : no Flags
...
;D
proc checkaccess {chan} { puthelp "PRIVMSG Q :chanlev $chan $::botnick" }
bind msgm Q * q:accessreturn;
proc q:accessreturn {nick uhost handle arg} {
if {[string match -nocase [lrange $arg 0 6] "You do not have sufficient access on"] && [string match -nocase [lrange $arg 8 end] "to use chanlev."]} {
putquick "PART [lindex $arg 7] :No channel flags in Q."
channel remove [lindex $arg 7]
}
if {} { // check if equal to: Flags for Botnick on #channel: flags
if {} { // check if the bot has sufficient flags
// fine the bot has the flags.
} else {
putquick "PART [lindex $arg 4] :No channel flags in Q."
channel remove [lindex $arg 4]
}
}
}
Dandy wrote:I'll give it a try and come up with some code that will inspire you.
- Code: Select all
proc checkaccess {chan} { puthelp "PRIVMSG Q :chanlev $chan $::botnick" }
bind msgm Q * q:accessreturn;
proc q:accessreturn {nick uhost handle arg} {
if {[string match -nocase [lrange $arg 0 6] "You do not have sufficient access on"] && [string match -nocase [lrange $arg 8 end] "to use chanlev."]} {
putquick "PART [lindex $arg 7] :No channel flags in Q."
channel remove [lindex $arg 7]
}
if {} { // check if equal to: Flags for Botnick on #channel: flags
if {} { // check if the bot has sufficient flags
// fine the bot has the flags.
} else {
putquick "PART [lindex $arg 4] :No channel flags in Q."
channel remove [lindex $arg 4]
}
}
}
You would add Q to your userlist and give it global +Q, but there are a few missing things in the script that you would have to solve.
fraguk wrote:Dandy wrote:I'll give it a try and come up with some code that will inspire you.
- Code: Select all
proc checkaccess {chan} { puthelp "PRIVMSG Q :chanlev $chan $::botnick" }
bind msgm Q * q:accessreturn;
proc q:accessreturn {nick uhost handle arg} {
if {[string match -nocase [lrange $arg 0 6] "You do not have sufficient access on"] && [string match -nocase [lrange $arg 8 end] "to use chanlev."]} {
putquick "PART [lindex $arg 7] :No channel flags in Q."
channel remove [lindex $arg 7]
}
if {} { // check if equal to: Flags for Botnick on #channel: flags
if {} { // check if the bot has sufficient flags
// fine the bot has the flags.
} else {
putquick "PART [lindex $arg 4] :No channel flags in Q."
channel remove [lindex $arg 4]
}
}
}
You would add Q to your userlist and give it global +Q, but there are a few missing things in the script that you would have to solve.
It would be nice if you could post the the finished script that works, maybe with a timer to check flags every 60 minutes ??
Return to TCL Scripting Request
Users browsing this forum: No registered users and 0 guests