This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

mass op script

Old posts that have not been replied to for several years.
Locked
g
guest
Halfop
Posts: 52
Joined: Mon Jan 19, 2004 4:15 pm

mass op script

Post by guest »

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! :wink:
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

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
  }
 }
}
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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
    }
  }
}
I'd go for a !up or something like this because I doubt you want to op all people accidentaly. :)
Last edited by caesar on Tue Aug 30, 2005 12:51 pm, edited 1 time in total.
Once the game is over, the king and the pawn go back in the same box.
g
guest
Halfop
Posts: 52
Joined: Mon Jan 19, 2004 4:15 pm

Post by guest »

thanx lads :)
Locked