mIRC Homepage
Posted By: stickydank help with protection - 17/11/05 02:49 AM
ok whats going on is when my protection is on
if some1 deops some1 my script send msg 2 them saying they
deoped me of if some1 kicks some1 same thing it sends msg 2 them saying dont kick me
and on ban so any help would be greatful
Code:
 #prot on
on *:BAN:#: { 
  if (%bp.st == on) {
    if ($nick == $me) { return }
    if ($me isop $chan) && (%bp.p == d) && ($banmask iswm $address($me,5)) { mode $chan -bbb $banmask | mode $chan -qaohv $nick $nick $nick $nick | msg $nick %bp.kmsg }
    if ($me isop $chan) && (%bp.p == k) && ($banmask iswm $address($me,5)) { mode $chan -bbb $banmask | mode $chan -qaohv $nick $nick $nick $nick | mode $chan -bbb $banmask | kick $chan $nick | msg $nick %bp.kmsg } 
    if ($me isop $chan) && (%bp.p == kb) && ($banmask iswm $address($me,5)) { set %nickk $nick | mode $chan -bbb $banmask | mode $chan -qaohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,2) $address(%nickk,9) %nickk | kick $chan %nickk | msg %nickk %bp.kmsg | unset %nickk $nick } 
  }
}
on *:KICK:#: {
  if (%bp.st == on) {
    if ($nick == $me) { return } 
    if ($knick == $me) { join $chan | /sajoin $me $chan | set %nickk $nick }
    if ($me isop $chan) && (%bp.p == d) { mode $chan -qaohv %nickk %nickk %nickk %nickk | msg $chan %nickk [ What The F? Dont kick ME!! 4PûñíshëR 0script ] | msg $nick %bp.kmsg | unset %nickk $nick }
    if ($me isop $chan) && (%bp.p == k) { kick $chan %nickk | msg $chan %nickk [ What The F? Dont kick ME!! 4PûñíshëR 0script ] | msg $nick %bp.kmsg | unset %nickk $nick }
    if ($me isop $chan) && (%bp.p == kb) { mode $chan -qaohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,1) $address(%nickk,9) %nickk | kick $chan %nickk | msg $chan %nickk [ What The F? Dont kick ME!! 4PûñíshëR 5script ] | msg $nick %bp.kmsg | unset %nickk $nick }
  }
}
on *:DEOP:#: {
  if (%bp.st == on) {
    if ($nick == $me ) { return }
    if (%bp.p == d) { /msg chanserv op $chan $me | set %nickk $nick | mode $chan -qaohv %nickk %nickk %nickk %nickk | msg $chan %nickk [ What The F? Dont DeOP ME!! 4PûñíshëR 0script ] | msg $nick %bp.kmsg | unset %nickk $nick }
    if (%bp.p == k) { /msg chanserv op $chan $me | set %nickk $nick | kick $chan %nickk | msg $chan %nickk [ What The F? Dont DeOP ME!! 4PûñíshëR 0script ] | msg $nick %bp.kmsg | unset %nickk $nick }
    if (%bp.p == kb) { /msg chanserv op $chan $me | set %nickk $nick | mode $chan -qaohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,1) $address(%nickk,9) %nickk | kick $chan %nickk | msg $chan %nickk [ What The F? Dont DeOP ME!! 4PûñíshëR 5script ] | msg $nick %bp.kmsg | unset %nickk $nick }
  }
}

 
so what i need it 2 do is
only work when some deop ban kicks me
not when some does it 2 some1 else
Posted By: RusselB Re: help with protection - 17/11/05 05:34 AM
Code:
 on @*:BAN:#: { 
  if (%bp.st == on) {
    if ($nick != $me) {
      if $banmask iswm $address($me,5) {
        if (%bp.p == d) { mode $chan -qaohv $nick $nick $nick $nick | msg $nick %bp.kmsg }
        elseif (%bp.p == k) { mode $chan -qaohv $nick $nick $nick $nick | kick $chan $nick | msg $nick %bp.kmsg } 
        elseif (%bp.p == kb) { set %nickk $nick | mode $chan -qaohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,2) $address(%nickk,9) %nickk | kick $chan %nickk | msg %nickk %bp.kmsg | unset %nickk } 
        mode $chan -bbb $banmask
      }
    }
  }
}
on @*:KICK:#: {
  if (%bp.st == on) {
    if ($nick != $me) {
      if ($knick == $me) { set %nickk $nick | join $chan | /sajoin $me $chan }
      if (%bp.p == d) { mode $chan -qaohv %nickk %nickk %nickk %nickk }
    }
    elseif (%bp.p == k) { kick $chan %nickk }
    elseif (%bp.p == kb) { mode $chan -qaohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,1) $address(%nickk,9) %nickk | kick $chan %nickk }
    msg $chan %nickk [ What The F? Dont kick ME!! 4PûñíshëR 0script ]
    msg $nick %bp.kmsg
    unset %nickk
  }
}
on *:DEOP:#: {
  if (%bp.st == on) {
    if ($nick != $me ) {
      /msg chanserv op $chan $me
      set %nickk $nick
      if (%bp.p == d) {        mode $chan -qaohv %nickk %nickk %nickk %nickk      }
      elseif (%bp.p == k) {        kick $chan %nickk      }
      elseif (%bp.p == kb) {        mode $chan -qaohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,1) $address(%nickk,9) %nickk |        kick $chan %nickk      }
      msg $chan %nickk [ What The F? Dont DeOP ME!! 4PûñíshëR 0script ]
      msg $nick %bp.kmsg
      unset %nickk 
    }
  }
}
 


I think that should work for what you're asking for.
Posted By: Riamus2 Re: help with protection - 17/11/05 02:21 PM
Try this:

Code:
#prot on
on @*:BAN:#: { 
  if (%bp.st == on) {
    if ($nick != $me && $bnick == $me) {
      mode $chan -bbb $banmask 
      msg $nick %bp.kmsg
      if (%bp.p == d) {
        mode $chan -qaohv $nick $nick $nick $nick
      }
      elseif (%bp.p == k) {
        mode $chan -qaohv $nick $nick $nick $nick | kick $chan $nick
      } 
      elseif (%bp.p == kb) {
        mode $chan -qaohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,2) $address(%nickk,9) %nickk | kick $chan %nickk
      }
      unset %nickk $nick 
    }
  }
}
on @*:KICK:#: {
  if (%bp.st == on) {
    if ($nick != $me && $knick == $me) {
      join $chan | /sajoin $me $chan
      set %nickk $nick
      msg $chan %nickk [ What The F? Dont kick ME!! 4PûñíshëR 0script ] 
      msg $nick %bp.kmsg
      if (%bp.p == d) {
        mode $chan -qaohv %nickk %nickk %nickk %nickk
      }
      elseif (%bp.p == k) {
        kick $chan %nickk
      }
      elseif (%bp.p == kb) {
        mode $chan -qaohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,1) $address(%nickk,9) %nickk | kick $chan %nickk
      }
      unset %nickk $nick
    }
  }
}
on *:DEOP:#: {
  if (%bp.st == on) {
    if ($nick != $me && $onick == $me) {
      msg chanserv op $chan $me 
      set %nickk $nick
      msg $chan %nickk [ What The F? Dont DeOP ME!! 4PûñíshëR 0script ] 
      msg $nick %bp.kmsg 
      if (%bp.p == d) {
        mode $chan -qaohv %nickk %nickk %nickk %nickk
      }
      elseif (%bp.p == k) {
        kick $chan %nickk
      }
      elseif (%bp.p == kb) {
        mode $chan -qaohv+bbb %nickk %nickk %nickk %nickk $address(%nickk,1) $address(%nickk,9) %nickk | kick $chan %nickk
      }
      unset %nickk $nick
    }
  }
}



Btw, you could probably avoid that %nickk setting by just using $nick.
Posted By: stickydank Re: help with protection - 18/11/05 11:18 AM
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ok rus ? for you on the on deop

Code:
 on *:DEOP:#: {
  if (%bp.st == on) {
    if ($nick != $me ) {
      /msg chanserv op $chan $me
      set %nickk $nick
     if (%bp.p == d) {        mode $chan -qaohv %nickk %nickk %nickk %nickk      }
      elseif (%bp.p == k) {        kick $chan %nickk      }
  
ok ? is why so many spaces ? elseif (bp.p == d) { mode chan -qaohv
Posted By: stickydank Re: help with protection - 18/11/05 11:22 AM
so riamus
all i need 2 do is add this 2 fix my script
Code:
 
if ($nick != $me && $knick == $me) {
 if ($nick != $me && $bnick == $me) {
if ($nick != $me && $onick == $me) {
so i add that in2 code
that should stop my script from doing reaction
when some1 deop some1 else
i only want my script 2 work when some1 deop kick me unless i deop my self
Posted By: Riamus2 Re: help with protection - 18/11/05 02:03 PM
You should use the entire script I did as I made other changes that are necessary. However, yes... those lines are the main part for preventing it from trigger if someone else was deopped/kicked or when you do it to yourself.

As for all those spaces, that was most likely because what is after the spaces was on the next line, so when the carriage return was removed, they ended up with the spacing left there. It means nothing and hurts nothing. smile
Posted By: stickydank Re: help with protection - 19/11/05 05:16 AM
riamus
that code not work at all
not hole script
or if i added

if ($nick != $me && $onick == $me) {
just dont work
main server i go 2 is
ircd
if that matters
Code:
if ($nick != $me && $onick != $me) {  

now if i do it like that 1 ^^^
it works but
it still give command when some1 deops some1 else
and i only want the command 2 work when action done 2 me
© mIRC Discussion Forums