| View previous topic :: View next topic |
| Author |
Message |
guest Halfop
Joined: 19 Jan 2004 Posts: 52
|
Posted: Mon Aug 29, 2005 9:42 am Post subject: mass op script |
|
|
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!  |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Mon Aug 29, 2005 10:48 am Post subject: |
|
|
| Code: | 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
}
}
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
caesar Mint Rubber

Joined: 14 Oct 2001 Posts: 3741 Location: Mint Factory
|
Posted: Mon Aug 29, 2005 3:35 pm Post subject: |
|
|
| Code: |
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
}
}
}
|
I'd go for a !up or something like this because I doubt you want to op all people accidentaly.  _________________ Once the game is over, the king and the pawn go back in the same box.
Last edited by caesar on Tue Aug 30, 2005 12:51 pm; edited 1 time in total |
|
| Back to top |
|
 |
guest Halfop
Joined: 19 Jan 2004 Posts: 52
|
Posted: Tue Aug 30, 2005 1:44 am Post subject: |
|
|
thanx lads  |
|
| Back to top |
|
 |
|