mIRC Homepage
Posted By: Webmonkey Protection Script - 17/08/03 09:42 PM
Hey,
I'm wondering if anyone out there has a nifty protection script... Things such as protection against being deop'd, banned, kicked etc.
Suppose I go into room #X and someone deops me. I have founder's access to the room, so the script makes chanserv op me, then deop the person who deop'd me. (/msg chanserv deop #X $nick)
Then for kicks it would tell chanserv to kick and ban the guy. Things like this.
If no... then how would I be able to set my mask to variable? Some kind of a command to get my mask, set it to a variable so I can use in ban protections.
Thanks,
Webmonkey
Posted By: KingTomato Re: Protection Script - 17/08/03 11:08 PM
Here are two commented scriptas to get you started.

Code:
; Deop Protections
; --
; change red portion tot he channel of your choice, or leave
; as is for all channels
on *:DEOP:[color:Red]#[/color]: {
  ; check if it was us being deopped, and not use deopping ourself
  if (($opnick == $me) && ($nick != $me)) {
    ; send chanserv our deop notice
    /msg chanserv deop $chan $nick
    ; op ourself
    /msg chanserv op $chan $me
    ; Remvoe the ; before this line if you wish to kick them
    ; /kick $chan $nick Don't Deop Me
  }
}

; Ban protection
; --
; Again, change red portion to channel you wish to tend to, or
; leave as is for all channels
; (the @ prefix means "only when im opped")
on @*:BAN:[color:Red]#[/color]: {
  ; make it easier to view what is transpiring
  var %ban = $banmask        | ; The banned mask
  var %us = $address($me, 5) | ; Our mask
  ; check if we were banned
  if ((%ban iswm %us) || ($bnick == $me)) {
    ; unban ourself first, as well as deop them
    /mode $chan -b+o $banmask $nick
    ; remove the ; before this line to kick them (likewise for the ban)
    ; /kick $chan $nick Don't Ban Me
    ; /mode $chan +bb $nick $address($nick, 11)
  }
}
Posted By: oriongods Re: Protection Script - 17/08/03 11:40 PM
this is not bad protection but this is just as a lil addon

on *:DEOP:#: {
and when your script deops him
/kick $chan $nick Don't Deop Me
---------------------------
this addon:

/set %abuser $nick
}

NOW if you are on network that uses chanserv you know that you can bypass BAN if user has access to your chan and he gives as his defence /chanserv invite $me $chan

your defence on this is:

on *JOIN:#: {
if (%abuser ison $chan) && ($me isop $chan) { /kick %abuser $chan DO NOT REPEAT YOURSELF!
}

so every time he will get kicked if you are op, and if he will on responce for ban call invite command (every time) he will flood services and he will get killed laugh
BUT notice that on this addon you only kick, not banning, coz it will only slow your script IF it gonna check does he have ban or not OR on every kick if you give ban it will flood you too,
in most cases this is very good solution but you choose what to do laugh

Posted By: KingTomato Re: Protection Script - 17/08/03 11:41 PM
on *:DEOP:#: {
and when your script deops him
/kick $chan $nick Don't Deop Me
---------------------------
this addon:

/set %abuser $nick
}


---

And how again can you kick them when you dont have op?
Posted By: oriongods Re: Protection Script - 17/08/03 11:46 PM
i just gave example, not in order how it should be, it is logical that he must call /cs op command first, but this is not bad solution i gave ! i had it b4 in my script and it was the best on that network i have been !, offcourse i made a list of all abusers so i can control who i can remove or add...
Posted By: Webmonkey Re: Protection Script - 18/08/03 11:45 PM
Kick protection?
Posted By: pheonix Re: Protection Script - 19/08/03 12:57 AM
in additon to kt's post.
Quote:
/kick %abuser $chan

wrong way round....
should be:
kick $chan %abuser
Posted By: Watchdog Re: Protection Script - 19/08/03 04:36 AM
As LocutusOfBorg said in another similar post, none of this is protection, it is just reaction which I (Watchdog) think is needless.

My view is that if two people have kick/ban protection and one kicks the other then you are going to have the two scripts kicking, getting kicked, inviting self back into room and either being kicked again by a ban enforcer or opping and retaliating to the other kicker. It could go on for days or weeks theoretically and is just silly.

Let me repeat that there is NO SUCH THING as ban protection. The one single exception is server-side functions like /sajoin.
Posted By: pheonix Re: Protection Script - 19/08/03 11:20 AM
Quote:
Let me repeat that there is NO SUCH THING as ban protection.

there is for irc opers wink
Posted By: _D3m0n_ Re: Protection Script - 19/08/03 08:05 PM
no there isnt ..... another oper can ban another oper at anytime ..... hell a global oper can set a gline on the netadmins ip and guess what ....... the netadmin is waving bye bye ..... there is no such thing as protection from a ban
Posted By: pheonix Re: Protection Script - 19/08/03 09:40 PM
im talking about if a normal user bans an irc oper(if the server allows that) they can get back in anyway....
Posted By: Webmonkey Re: Protection Script - 19/08/03 11:07 PM
And I'm talking about swift action to something. A person with founder's access can switfly stop such a procession like this from happening. This script will be used by a person who has founder's access to the channel he is using. Forget my ask of kick protection, I've created one alone.
There is a sem-ban protection, e (eban), but can easily be taken away from you.
Posted By: Watchdog Re: Protection Script - 19/08/03 11:13 PM
Server-side functions are not scripts though and referring to d3m0n's comment, in many cases he's right though the issue of whether an oper can be nailed or not is specific to a given IRCd. Some IRCds protect opers from just about everything while others offer no protection over and above what any user gets while others still offer some sort of half-way measures.

Getting back to your comment, given that opers make up about 0.0001% of total IRC users it would be pointless to use server-side protection as a worthwhile statistic in a thread such as this.
Posted By: rabit Re: Protection Script - 26/12/06 08:54 AM
Originally Posted By: KingTomato
Here are two commented scriptas to get you started.

Code:
; Deop Protections
; --
; change red portion tot he channel of your choice, or leave
; as is for all channels
on *:DEOP:[color:Red]#[/color]: {
  ; check if it was us being deopped, and not use deopping ourself
  if (($opnick == $me) && ($nick != $me)) {
    ; send chanserv our deop notice
    /msg chanserv deop $chan $nick
    ; op ourself
    /msg chanserv op $chan $me
    ; Remvoe the ; before this line if you wish to kick them
    ; /kick $chan $nick Don't Deop Me
  }
}

; Ban protection
; --
; Again, change red portion to channel you wish to tend to, or
; leave as is for all channels
; (the @ prefix means "only when im opped")
on @*:BAN:[color:Red]#[/color]: {
  ; make it easier to view what is transpiring
  var %ban = $banmask        | ; The banned mask
  var %us = $address($me, 5) | ; Our mask
  ; check if we were banned
  if ((%ban iswm %us) || ($bnick == $me)) {
    ; unban ourself first, as well as deop them
    /mode $chan -b+o $banmask $nick
    ; remove the ; before this line to kick them (likewise for the ban)
    ; /kick $chan $nick Don't Ban Me
    ; /mode $chan +bb $nick $address($nick, 11)
  }
}


whr to put all this? and it is correct??
Posted By: rabit Re: Protection Script - 26/12/06 08:55 AM
Originally Posted By: oriongods
this is not bad protection but this is just as a lil addon

on *:DEOP:#: {
and when your script deops him
/kick $chan $nick Don't Deop Me
---------------------------
this addon:

/set %abuser $nick
}

NOW if you are on network that uses chanserv you know that you can bypass BAN if user has access to your chan and he gives as his defence /chanserv invite $me $chan

your defence on this is:

on *JOIN:#: {
if (%abuser ison $chan) && ($me isop $chan) { /kick %abuser $chan DO NOT REPEAT YOURSELF!
}

so every time he will get kicked if you are op, and if he will on responce for ban call invite command (every time) he will flood services and he will get killed laugh
BUT notice that on this addon you only kick, not banning, coz it will only slow your script IF it gonna check does he have ban or not OR on every kick if you give ban it will flood you too,
in most cases this is very good solution but you choose what to do laugh



whr do i put all the script on?? theres so many tabs.. i dunno whr.. any1 help me plz?
Posted By: iMuller Re: Protection Script - 27/12/06 12:17 AM
Hey KingTomato, you misstyped deop action on ban protecion:

Code:
    ; unban ourself first, as well as deop them
    /mode $chan -b+o $banmask $nick


To make things right, replace plus signal to minus one, or just make it desapear XD
© mIRC Discussion Forums