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"
}
Please help!!
Thanks in advance