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.

Custom flag checking

Old posts that have not been replied to for several years.
Locked
W
Weirdo
Master
Posts: 265
Joined: Sat Apr 27, 2002 8:00 pm
Location: Manchester, England

Custom flag checking

Post by Weirdo »

Code: Select all

	if {[matchattr $nuke(hand) P $chan] == 1 && [matchattr $hand omn $chan] == 0 } {
		puthelp "notice $nick :ACCESS IS DENIED - User has +Penis access level and is protected"
		putlog "nuke v5.2 failed"
		return 0 } {
		putlog "nuke v5.2 st1" }
	if {[matchattr $nuke(hand) flCyaomn $chan] == 1 && ![matchattr $hand omn $chan] == 1 } { 
		puthelp "notice $nick :I'm sorry, $nuke(nick) is more sexually attractive than you and i just cannot kick them!"
		return 0 }
Essentially, i want P to be immune from kicking from everyone but "omn" level ops. At the moment, everyone can kick them. Which isnt right. i think its my logic is wrong. can anyone help?
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

Code: Select all

bind pub - .k pub:k
proc pub:k { n uh h c a } {
  set t [nick2hand [lindex [split $a] 0]]
  if {[matchattr $t P|P $c] && ![matchattr $h omn|omn $c]} {
    ;# no kick
    return
  } elseif {[matchattr $t P|P $c] && [matchattr $h omn|omn $c]} {
    ;# kick
    return
  }

  return
}
this works for me
photon?
Locked