egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

mass op script

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
guest
Halfop


Joined: 19 Jan 2004
Posts: 52

PostPosted: Mon Aug 29, 2005 9:42 am    Post subject: mass op script Reply with quote

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
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Aug 29, 2005 10:48 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Mon Aug 29, 2005 3:35 pm    Post subject: Reply with quote

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. Smile
_________________
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
View user's profile Send private message
guest
Halfop


Joined: 19 Jan 2004
Posts: 52

PostPosted: Tue Aug 30, 2005 1:44 am    Post subject: Reply with quote

thanx lads Smile
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber