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.

Eggdrop De-Op

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
M
MattShiloh
Voice
Posts: 2
Joined: Wed Apr 25, 2007 10:50 am
Location: The Inter-tubes
Contact:

Eggdrop De-Op

Post by MattShiloh »

The company I work for runs an internal IRC Server that we use for a "unofficial" communications method when our SIP Server decides to take a nap, and so that the Linux kids can talk to the others. On this server our admin runs an eggdrop that logs channels upon request of the channel founders.

What we have found is that sometimes these channels are abandoned and the channel will drop from reg on the server, but the eggdrop will still join these channels as the channel was on the autojoin. However when the channel isn't registered, our eggdrop automatically gets ops... and we don't want that. So my question is:

Does anyone know of a way in which to make eggdrop automatically remove ops from itself when it gets them, or is given them by someone (ie a channel op) or by chanserv?
Last edited by MattShiloh on Wed Apr 25, 2007 2:00 pm, edited 1 time in total.
*~*~*~*~*~*
Respectfully,
Matthew
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Try:

Code: Select all

bind mode -|- "% *+o*" check:op

proc check:op {nick host hand chan mode victim} {
    global botnick
    if {$mode == +o && [string equal -nocase $botnick $victim]} {
        putquick "MODE $chan -o $botnick" -next
    }
}

# when the bot joins a channel and no one is op, and the bot becomes op, we  need to reverse this

bind join -|- {*} check:join

proc check:join {nick host hand chan} {
    global botnick
    if {![string equal -nocase $botnick $nick]} { return }
    if {[botisop $chan]} {
        putquick "MODE $chan -o $botnick" -next
    }
}
Not tested!
r0t3n @ #r0t3n @ Quakenet
M
MattShiloh
Voice
Posts: 2
Joined: Wed Apr 25, 2007 10:50 am
Location: The Inter-tubes
Contact:

Post by MattShiloh »

Our admin/guru tried the code with no success. Thank you for the idea though, it was much better than what I had.

Anyone else have anything?
*~*~*~*~*~*
Respectfully,
Matthew
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 mode - "% +o" bot:deop

proc bot:deop {nick uhost hand chan mc targ} {
 if {[isbotnick $targ]} {
  pushmode $chan -o $::botnick
 }
}
Post Reply