Found another script on another forum, i may use this one, seems better than bind pub - $botnick commands
http://selftcl.de/forum/viewtopic.php?t=114
oh well, Thanks!!
Code: Select all
bind pub * \$op op:op
bind pub * \$deop deop:deop
proc op:op {nick uhost handle chan text} {
global botnick
if {![matchattr $handle n|n $chan] && ![matchattr $handle m|m $chan] && ![matchattr $handle |o $chan]} {
putserv "NOTICE $nick :Error: Either You Have No Access To This Command ( +o needed )"
}
}
{
if {[matchattr $handle n|n $chan] || [matchattr $handle m|m $chan] || [matchattr $handle |o $chan]} {
set onick [lindex [split $text] 0]
if {![onchan $onick $chan]} {
putserv "NOTICE $nick :Error: $onick Is Not On $chan"
}
}
{
if {[isop $onick $chan]} {
putserv "NOTICE $nick :Error: $onick Is Already Oped On $chan"
}
}
{
if {[isbotnick $onick]} {
putserv "NOTICE $nick :Nice Try, $onick Is $::botnick, You Can't Outsmart Me!!"
}
}
{
if {onchan $onick $chan]} {
if ![isop $onick $chan]} {
if ![isbotnick $onick]} {
putquick "MODE $chan +o $onick"
putserv "NOTICE $onick :Hello $onick, You Was Oped On $chan By $nick, Please Not Protection Is On By #ShoVe So Dont Do Anything Stupid!!"
putserv "NOTICE $nick :Successful: $onick Was Oped On $chan"
}
proc deop:deop {nick uhost handle chan text} {
global botnick
if {![matchattr $handle n|n $chan] && ![matchattr $handle m|m $chan] && ![matchattr $handle |o $chan]} {
putserv "NOTICE $nick :Error: You Have No Access To This Command ( +o needed )"
}
}
{
if {[matchattr $handle n|n $chan] || [matchattr $handle m|m $chan] || [matchattr $handle |o $chan]} {
set deopnick [lindex [split $text] 0]
if {![onchan $deopnick $chan]} {
putserv "NOTICE $nick :Error: $deopnick Is Not On $chan"
} else {
if {![isop $deopnick $chan]} {
putserv "NOTICE $nick :Error: $deopnick Is Already De-oped On $chan"
}
}
{
if {[isbotnick $onick]} {
putserv "NOTICE $nick :Nice Try, $deopnick Is $::botnick, You Can't Outsmart Me!!"
}
}
{
if {onchan $deopnick $chan]} {
if [isop $deopnick $chan]} {
if ![isbotnick $deopnick]} {
putquick "MODE $chan +o $deopnick"
putserv "NOTICE $onick :Hello $deopnick, You Was Oped On $chan By $nick, Please Not Protection Is On By #ShoVe So Dont Do Anything Stupid!!"
putserv "NOTICE $nick :Successful: $deopnick Was Oped On $chan"
}
Eample:301 (rfc1459) RPL_AWAY
307 (rfc1459) RPL_WHOISREGNICK
311 (rfc1459) RPL_WHOISUSER
312 (rfc1459) RPL_WHOISSERVER
313 (rfc1459) RPL_WHOISOPERATOR
315 (rfc1459) RPL_ENDOFWHO
317 (rfc1459) RPL_WHOISIDLE
318 (rfc1459) RPL_ENDOFWHOIS
319 (rfc1459) RPL_WHOISCHANNELS
335 (rfc1459) RPL_WHOISBOT
378 (rfc1459) RPL_WHOISHOST
Code: Select all
bind raw - 315 scanc:raw
bind raw - 319 scanc:raw
Code: Select all
bind pub * \$op op:op
bind pub * \$deop deop:deop
proc op:op {nick uhost handle chan text} {
global botnick
if {![matchattr $handle n|n $chan] && ![matchattr $handle m|m $chan] && ![matchattr $handle |o $chan]} {
putserv "NOTICE $nick :Error: Either You Have No Access To This Command ( +o needed )"
}
}
{
if {[matchattr $handle n|n $chan] || [matchattr $handle m|m $chan] || [matchattr $handle |o $chan]} {
set onick [lindex [split $text] 0]
if {![onchan $onick $chan]} {
putserv "NOTICE $nick :Error: $onick Is Not On $chan"
}
}
{
if {[isop $onick $chan]} {
putserv "NOTICE $nick :Error: $onick Is Already Oped On $chan"
}
}
{
if {[isbotnick $onick]} {
putserv "NOTICE $nick :Nice Try, $onick Is $::botnick, You Can't Outsmart Me!!"
}
}
{
if {onchan $onick $chan]} {
if ![isop $onick $chan]} {
if ![isbotnick $onick]} {
putquick "MODE $chan +o $onick"
putserv "NOTICE $onick :Hello $onick, You Was Oped On $chan By $nick, Please Not Protection Is On By #ShoVe So Dont Do Anything Stupid!!"
putserv "NOTICE $nick :Successful: $onick Was Oped On $chan"
}
proc deop:deop {nick uhost handle chan text} {
global botnick
if {![matchattr $handle n|n $chan] && ![matchattr $handle m|m $chan] && ![matchattr $handle |o $chan]} {
putserv "NOTICE $nick :Error: You Have No Access To This Command ( +o needed )"
}
}
{
if {[matchattr $handle n|n $chan] || [matchattr $handle m|m $chan] || [matchattr $handle |o $chan]} {
set deopnick [lindex [split $text] 0]
if {![onchan $deopnick $chan]} {
putserv "NOTICE $nick :Error: $deopnick Is Not On $chan"
} else {
if {![isop $deopnick $chan]} {
putserv "NOTICE $nick :Error: $deopnick Is Already De-oped On $chan"
}
}
{
if {[isbotnick $onick]} {
putserv "NOTICE $nick :Nice Try, $deopnick Is $::botnick, You Can't Outsmart Me!!"
}
}
{
if {onchan $deopnick $chan]} {
if [isop $deopnick $chan]} {
if ![isbotnick $deopnick]} {
putquick "MODE $chan +o $deopnick"
putserv "NOTICE $onick :Hello $deopnick, You Was Oped On $chan By $nick, Please Not Protection Is On By #ShoVe So Dont Do Anything Stupid!!"
putserv "NOTICE $nick :Successful: $deopnick Was Oped On $chan"
}