Hey i'd like my eggdrop to give ops to all unoped users
with a command like "up all" and it gives @ to all and only
botmasters could use it, could u plz write down a snippet.
thnx in advance!
Code: Select all
bind pub - up up:all
proc up:all {nick uhost hand chan arg} {
if {[string equal -nocase all [lindex [split $arg] 0]] && [matchattr $hand m]} {
foreach n [chanlist $chan] {
pushmode $chan +o $n
}
}
}
Code: Select all
bind pub m|m !up up:all
proc up:all {nick uhost hand chan txt} {
if {![botisop $chan]} {
putserv "PRIVMSG $chan :I'm not oped, I can't continue!"
return
}
if {[string equal -nocase "all" [lindex [split $txt] 0]]} {
foreach n [chanlist $chan] {
if {[isbotnick $nick] || [isop $nick $chan]} {
continue
}
pushmode $chan +o $n
}
flushmode $chan
} else {
if {[isop $nick $chan]} {
putserv "PRIVMSG $chan :You are already UP!"
} else {
pushmode $chan +o $nick
}
}
}