Orio's Protections for mIRCBy: Orionis
Last Modified: Mar 18 6:20am (r15)

Passive kick, ban, and deop protection. Made to work on UtoNet only. Now editted to be shorter, less redundant, and more reliable.
Changed the ban checking to alway use the bancheck alias. This removed redundant code. In additcion, it causes a 250 ms delay between when a ban is set and when the script checks for and removes a ban so if you are deop'd and banned at the same time, the server gets a bit of time to reop you before the script tries to remove the ban.
Only setup required is changing the YourPasswordHere in the first line to your nick's password.
Changed the ban checking to alway use the bancheck alias. This removed redundant code. In additcion, it causes a 250 ms delay between when a ban is set and when the script checks for and removes a ban so if you are deop'd and banned at the same time, the server gets a bit of time to reop you before the script tries to remove the ban.
Only setup required is changing the YourPasswordHere in the first line to your nick's password.

alias id { nickserv identify YourPasswordHere }
alias bancheck {
if ( $chan($1).ibl == $true ) {
var %c = 1
while ( %c <= $ibl( $1,0 ) ) {
var %w = $ibl($1,%c)
if ( %w iswm ~r: $+ $fullname ) {
mode $1 -b %w
}
if ( ~c: isin %w ) {
if ( $right( %w,-3 ) ischan ) {
mode $1 -b %w
}
}
if ( %w iswm $address( $me,5 ) ) {
mode $1 -b %w
}
inc %c
}
else { halt }
}
}
on *:INVITE:#: {
if ( $fulladdress == ChanServ!services@services.utonet.org ) {
join $chan
}
}
on *:KICK:*: {
if ($knick == $me) {
cs invite $chan
}
}
on *:JOIN:#: {
if ( $nick == $me ) {
mode $chan +b
.timer $+ $chan -m 1 250 /bancheck $chan
}
}
on *:RAWMODE:#: {
if ( *-*o* iswm $1 ) && ( $me isin $2- ) {
chanserv op $chan $me
}
if ( *-*q* iswm $1 ) && ( $me isin $2- ) {
id
}
if ( *-*a* iswm $1 ) && ( $me isin $2- ) {
chanserv protect $chan $me
}
if (*-*h* iswm $1) && ( $me isin $2- ) {
chanserv halfop $chan $me
}
if (*-*v* iswm $1) && ( $me isin $2- ) {
chanserv voice $chan $me
}
if (*+*b* iswm $1) {
.timer $+ $chan -m 1 250 /bancheck $chan
}
} |

Comments| Elly May 01 8:45pm | Yuck. if (*+*h* iswm $1) <---- use that use $address($me,5) instead of $ial because the IAL is notoriously buggy... You can use $gettok($2-,%b,32) instead, and instead of hardcoding in "13" (Why 13?) You can just use $numtok($1-,32) or $0... |
![]() | |
| Elly May 07 8:52pm | Here, I tried to rewrite it a bit, and came up with: on *:RAWMODE:#: { if ($+(*-*o*,$me,*) iswm $1-) { chanserv op $chan $me } if ($+(*-*a*,$me,*) iswm $1-) { chanserv protect $chan $me } if ($+(*-*h*,$me,*) iswm $1-) { chanserv halfop $chan $me } if (*+*b* iswm $1) { var %c = 1 while (%c <= $numtok($2-,32)) { var %q = $gettok($2-,%c,32) if (%q iswm ~r: $+ $fullname) { mode $chan -b %q } if (~c:* iswm %q) && ($me ison $gettok(%q,2,58)) { mode $chan -b %q } if (%q iswm $address($me,5)) { mode $chan -b %q } inc %c } } } |
![]() | |
| Orionis May 11 12:56am | Heh... I think it's pretty much like that now cept I used a different method for ~c: and have it WAY expanded out. |
![]() | |
| Real_Wolf May 15 7:32pm | hmm, i just had an idea about protection scripts to stop all the spamming from chanserv when chanserv says you don't have that access, maybe stick in variables like %access.channel 50 or %access.channel AOP so that you don't try and do things that you can't actually do. |
![]() | |
| QQ Jun 18 4:53am | Uhm.. wont it match -o+o BadGuy GoodGuy as an attempt to deop GoodGuy though? ;) |
![]() | |
| Elly Jun 22 1:00pm | RW: The problem with that is that it's hard to keep the two in sync. If you want your script to work anywhere, it has to work with any services set. How does this work on EfNet (No Services), QuakeNet (Q), or other servers that use W&X/NickOP/etc.? Furthermore, it's really tough to interface with services properly. You basically have to check the access list on a timer, because ChanServ doesn't tell you when someone adds access. It's a serious pain in the ass. |
![]() | |
| Master Healexarn Jul 18 3:20pm | Well, Elly, seeing as how this is the UtoNet website, I don't think it's unreasonable for the scripts displayed here to not work on other servers. Anyway, this script is okay as long as you don't mind the access denied messages that so often accompany mediocre ban scripts. Also, this script will trigger at inappropriate times. Furthermore, it has a share of unnecessary code. Plus, it doesn't work with quiet (~q:) bans. All of that is among other things. Master Healexarn's Evaluation: This script isn't great or particularly well written, and it might spark unwanted situations, but its crude methods provide simple means of protection. Feel free to use this script. |
![]() | |
| Orionis Aug 10 9:31am | MH, one question. If you have the ability to remove quiet bans, is it not true the ban didn't really affect you anyhow? |
![]() | |
| FoF Sep 04 9:51pm | Orio is right. A script attempting to remove them( ~q and now ~n bans) is just wasted code. If you can remove them then they didnt affect you in the first place. |
![]() | |
