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 

Eggdrop De-Op

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
MattShiloh
Voice


Joined: 25 Apr 2007
Posts: 2
Location: The Inter-tubes

PostPosted: Wed Apr 25, 2007 10:59 am    Post subject: Eggdrop De-Op Reply with quote

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?
_________________
*~*~*~*~*~*
Respectfully,
Matthew


Last edited by MattShiloh on Wed Apr 25, 2007 2:00 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Wed Apr 25, 2007 11:33 am    Post subject: Reply with quote

Try:

Code:
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
Back to top
View user's profile Send private message MSN Messenger
MattShiloh
Voice


Joined: 25 Apr 2007
Posts: 2
Location: The Inter-tubes

PostPosted: Wed Apr 25, 2007 2:03 pm    Post subject: Reply with quote

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


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Apr 25, 2007 5:50 pm    Post subject: Reply with quote

Code:
bind mode - "% +o" bot:deop

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

_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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