mIRC Home    About    Download    Register    News    Help

Topic Options
#42576 - 17/08/03 10:42 PM Protection Script
Webmonkey Offline
Pikka bird

Registered: 02/06/03
Posts: 12
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

Top
#42577 - 18/08/03 12:08 AM Re: Protection Script
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
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)
  }
}
_________________________
-KingTomato

Top
#42578 - 18/08/03 12:40 AM Re: Protection Script
oriongods Offline
Vogon poet

Registered: 31/07/03
Posts: 132
Loc: your home
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


Top
#42579 - 18/08/03 12:41 AM Re: Protection Script
KingTomato Offline
Planetary brain

Registered: 04/01/03
Posts: 3012
Loc: New Hampshire, USA
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?
_________________________
-KingTomato

Top
#42580 - 18/08/03 12:46 AM Re: Protection Script
oriongods Offline
Vogon poet

Registered: 31/07/03
Posts: 132
Loc: your home
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...

Top
#42581 - 19/08/03 12:45 AM Re: Protection Script
Webmonkey Offline
Pikka bird

Registered: 02/06/03
Posts: 12
Kick protection?

Top
#42582 - 19/08/03 01:57 AM Re: Protection Script
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
in additon to kt's post.
Quote:
/kick %abuser $chan

wrong way round....
should be:
kick $chan %abuser
_________________________
new username: tidy_trax

Top
#42583 - 19/08/03 05:36 AM Re: Protection Script
Watchdog Offline
Hoopy frood

Registered: 09/12/02
Posts: 2984
Loc: Hill End, NSW, Australia
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.
_________________________
Induced IRC
irc.induced.net

Top
#42584 - 19/08/03 12:20 PM Re: Protection Script
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
Quote:
Let me repeat that there is NO SUCH THING as ban protection.

there is for irc opers wink
_________________________
new username: tidy_trax

Top
#42585 - 19/08/03 09:05 PM Re: Protection Script
_D3m0n_ Offline
Hoopy frood

Registered: 11/12/02
Posts: 1527
Loc: Florida,USA
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
_________________________
D3m0nnet.com

Top
#42586 - 19/08/03 10:40 PM Re: Protection Script
pheonix Offline
Hoopy frood

Registered: 06/05/03
Posts: 2265
im talking about if a normal user bans an irc oper(if the server allows that) they can get back in anyway....
_________________________
new username: tidy_trax

Top
#42587 - 20/08/03 12:07 AM Re: Protection Script
Webmonkey Offline
Pikka bird

Registered: 02/06/03
Posts: 12
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.

Top
#42588 - 20/08/03 12:13 AM Re: Protection Script
Watchdog Offline
Hoopy frood

Registered: 09/12/02
Posts: 2984
Loc: Hill End, NSW, Australia
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.
_________________________
Induced IRC
irc.induced.net

Top
#167548 - 26/12/06 08:54 AM Re: Protection Script [Re: KingTomato]
rabit Offline
Bowl of petunias

Registered: 26/12/06
Posts: 2
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??

Top
#167549 - 26/12/06 08:55 AM Re: Protection Script [Re: oriongods]
rabit Offline
Bowl of petunias

Registered: 26/12/06
Posts: 2
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?

Top
#167582 - 27/12/06 12:17 AM Re: Protection Script [Re: rabit]
iMuller Offline
Self-satisified door

Registered: 27/12/06
Posts: 3
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

Top