Wtf, this ain't mirc scripting!
Code: Select all
if {[string match -nocase "* master *" $text]} {return}
Code: Select all
if {[string match -nocase "* master *" $text]} {return}
Code: Select all
bind pub o|o !addop pub:addop:q
proc pub:addop:q {nick uhost hand chan text} {
if {[string length $text] > 0} { set tnick [lindex $text 0] }
if {[onchan "Q" $chan]} {
if {[string match -nocase "* master *" $text]} {return}
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG Q :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan +o $tnick"
putquick "NOTICE $tnick :$text is/are your new flag(s) in Q."
} elseif {[onchan "L" $chan]} {
if {[string match -nocase "* You're not the owner or a master of *" $text]} {return}
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG L :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan +o $tnick"
putquick "NOTICE $tnick :$text is/are your new flag(s) in L"
}
}
Code: Select all
proc addop:q:reaction {nick host hand text [censored]} {
set chan $::addopchan
set from "$nick!$host"
if {[string match -nocase "Q!TheQBot@CServe.quakenet.org" $from]} {
if {[string match -nocase "You are not known or banned on this channel and can't dump the userlist!" $text]} {
putserv "PRIVMSG $chan :I have no access to Q on this channel."
unbind notc - * addop:q:reaction
return
}
if {[string match -nocase "You have to be master to change someone's flags!" $text]} {
putserv "PRIVMSG $:addopchan :I do not have the master flag for $chan"
unbind notc - * addop:q:reaction
return
}
if {[string match -nocase "You have to be owner to change a master's flags!" $text]} {
putserv "PRIVMSG $chan :I do not have the owner flag for $::addopchan"
unbind notc - * addop:q:reaction
return
}
unbind notc - * addop:q:reaction
}
}
proc addop:l:reaction {nick host hand text [censored]} {
set chan $::addopchan2
set from "$nick!$host"
if {[string match -nocase "L" $from]} {
if {[string match -nocase "Sorry, you do not have permission to view/change user flags on" $text]} {
putserv "PRIVMSG $chan :I have no access to L on this channel."
unbind notc - * addop:l:reaction
return
}
if {[string match -nocase "You're not the owner or a master of" $text]} {
putserv "PRIVMSG $chan :I do not have the master flag for $chan"
unbind notc - * addop:l:reaction
return
}
if {[string match -nocase "Only owners can change a master's flags." $text]} {
putserv "PRIVMSG $chan :I do not have the owner flag for $::addopchan"
unbind notc - * addop:l:reaction
return
}
unbind notc - * addop:l:reaction
}
}
bind pub o|o !addop pub:addop:q
proc pub:addop:q {nick uhost hand chan text} {
if {[string length $text] > 0} { set tnick [lindex $text 0] }
if {[onchan "Q" $chan]} {
set ::addopchan "$chan"
bind notc - * addop:q:reaction
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG Q :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan +o $tnick"
putquick "NOTICE $tnick :$text is/are your new flag(s) in Q."
} elseif {[onchan "L" $chan]} {
set ::addopchan2 "$chan"
bind notc - * addop:l:reaction
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG L :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan +o $tnick"
putquick "NOTICE $tnick :$text is/are your new flag(s) in L"
}
}
bind pub o|o !rop pub:rop:q
proc pub:rop:q {nick uhost hand chan text} {
if {[string length $text] > 0} { set tnick [lindex $text 0] }
if {[onchan "Q" $chan]} {
set ::addopchan "$chan"
bind notc - * addop:q:reaction
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG Q :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan -o $tnick"
putquick "NOTICE $tnick :You have been removed from Q by $nick."
} elseif {[onchan "L" $chan]} {
set ::addopchan2 "$chan"
bind notc - * addop:l:reaction
putquick "NOTICE $nick :Note: I need atleast +aom(n) flags for this command to work."
putquick "PRIVMSG L :chanlev $chan $text"
putquick "NOTICE $nick :Done."
putquick "MODE $chan -o $tnick"
putquick "NOTICE $tnick :You have been removed from L by $nick."
}
}
putlog "add Q\L flags script by MeTroiD loaded."
Code: Select all
set bla bla "varname"; putlog 0
if {(...............)} {; putlog 1
elseif {(...........)} {; putlog 2
else {(...............)} {; putlog "checking"