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 

deop rm help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
sdays
Halfop


Joined: 21 Oct 2006
Posts: 98

PostPosted: Thu Jul 26, 2007 5:33 pm    Post subject: deop rm help Reply with quote

Okay, when a op on bot deops a guest he removes op and kbs him, i want this to work only when a user deops bot owner or master

Code:

setudef flag deoprm

bind mode - "* -o" deop:rm

proc deop:rm {nick uhost hand chan mc deop} { 
  if {[channel get $chan deoprm] && ![matchattr $hand nmb|nmb $chan]} {
    set banmask *!*@[lindex [split [getchanhost $nick $chan] @] 1]
    catch {deluser $hand}
    save
    putlog "Removed $hand Reason: Deoped bot or a admin on $chan."
    putserv "MODE $chan -o+b $nick $banmask"
    putserv "kick $chan $nick :Cya loser."
  }
}
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Fri Jul 27, 2007 2:36 pm    Post subject: Reply with quote

Code:
setudef flag deoprm

bind mode - "* -o" deop:rm

proc deop:rm {nick uhost hand chan mc deop} {
  if {[channel get $chan deoprm] && ![matchattr $hand nmb|nmb $chan] && [matchattr [nick2hand $deop $chan] nm|nm $chan]} {
    set banmask *!*@[lindex [split [getchanhost $nick $chan] @] 1]
    catch {deluser $hand}
    save
    putlog "Removed $hand Reason: Deoped bot or a admin on $chan."
    putserv "MODE $chan -o+b $nick $banmask"
    putserv "kick $chan $nick :Cya loser."
  }
}

_________________
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 -> Scripting Help 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