mIRC Homepage
Posted By: chess Deop Protection Script - 18/03/05 06:46 PM
THIS IS WHAT HAPPENDS WHEN THEY TRYE TO DEOP FIRST TIME:

on 1:DEOP:#:{
timer 1 1 mode $chan +b $nick
timer 1 3 kick $chan $nick Next time: Qban
timer 1 3 msg q chanflags $chan -b
timer 1 3 mode $chan +o $nick
timer 1 3 msg q chanflags $chan +b
timer -b 1 5 mode $chan -b $nick
halt
}
And this when they trye to deop second time:

on 1:DEOP:#:{
timer 1 1 mode $chan +b $nick
timer 1 3 kick $chan $nick You are now Q bannet ! smile
timer 1 3 msg q chanflags $chan -b
timer 1 3 mode $chan +o $nick
timer 1 3 msg q chanflags $chan +b
timer 1 4 msg q chanlev $chan $nick +ab
timer -b 1 5 mode $chan -b $nick
halt
}
But the script dosent work, can someonw please help me ?
Posted By: SladeKraven Re: Deop Protection Script - 18/03/05 07:20 PM
And is this when they deop you? Because you're opping yourself again to kick and ban the user.

Code:
on @!*:DEOP:#: {
  ;commands to gain operator status.
  ;Never used Q so it could be msg Q op..
  ban -k $chan $nick Bleh..
  msg Q Q commands here..
}


But you get the idea. Make sure your an op before you send command through otherwise your going to get you're not a channel operator errors. Hope this helps.
Posted By: chess Re: Deop Protection Script - 18/03/05 07:31 PM
Thats was not my problem, my problem is that nothing happends when they trye to deop on number 2 ! I think I must add something more in the second deop !
Posted By: SladeKraven Re: Deop Protection Script - 18/03/05 07:36 PM
Well you can't have 2 On Deop events in the same Remote Script. The top one will cancel out the second one.
Posted By: chess Re: Deop Protection Script - 18/03/05 07:51 PM
yeah I know that, but still I need something else in the script, how can the script know how many times I have been tryed to be deoped ? Something missing... (>=1) or something
Posted By: SladeKraven Re: Deop Protection Script - 18/03/05 08:22 PM
Code:
on @!*:DEOP:#: { 
  if ($opnick == $me) {
    inc %deoptimes
    if (%deoptimes == 1) { commands when deopped once. }
    elseif (%deoptimes == 2) { commands when deopped twice. }
    elseif (%deoptimes == 3) { commands when deopped three times. }
    else { commands when it doesnt match the above three statements. }
  }
}


You mean like this?
Posted By: chess Re: Deop Protection Script - 18/03/05 09:20 PM
yeah, Thx a lot smile
Posted By: chess Re: Deop Protection Script - 18/03/05 09:50 PM
heh, but it dosent work when Im adding my script in it
----------------------------------------------------------------

on @!*:DEOP:#: {
if ($opnick == $me) {
inc %deoptimes
if (%deoptimes == 1) {
timer 1 1 mode $chan +b $nick
timer 1 3 kick $chan $nick WARNING! Next time you will be Q banned ! (10secs ban)
timer 1 3 msg q chanflags $chan -b
timer 1 3 mode $chan +o $nick
timer 1 3 msg q chanflags $chan +b
timer -b 1 10 mode $chan -b $nick
elseif (%deoptimes == 2) {
timer 1 1 mode $chan +b $nick
timer 1 3 kick $chan $nick Your auth name is now Q banned, bye!
timer 1 3 msg q chanflags $chan -b
timer 1 3 mode $chan +o $nick
timer 1 3 msg q chanflags $chan +b
timer 1 4 msg q chanlev $chan $nick +ab
timer -b 1 5 mode $chan -b $nick
else {
}
}
Posted By: DaveC Re: Deop Protection Script - 19/03/05 12:53 AM
You were missing close brackets for each IF & ELSEIF code block
I added specific nick detection with %deoptimes [ $+ [ $nick ] ]
The -u86400 (in both events) means that it well forget he deopped you the first time after 24 hours (reset to 24 hours again if he changes nicks the sneaky dude), remove the -u86400 to make it a twice EVER and your gone.
It deletes the %deoptimes [ $+ [ $nick ] ] using UNSET %deoptimes [ $+ [ $nick ] ] at the bottom of the second ban, if you want to unban them manually but leave them ready to be second banned if they do it again, then remove that unset line.

[code]
on @!*:DEOP:#: {
if ($opnick == $me) {
inc -u86400 %deoptimes [ $+ [ $nick ] ]
if (%deoptimes [ $+ [ $nick ] ] == 1) {
timer 1 1 mode $chan +b $nick
timer 1 3 kick $chan $nick WARNING! Next time you will be Q banned ! (10secs ban)
timer 1 3 msg q chanflags $chan -b
timer 1 3 mode $chan +o $nick
timer 1 3 msg q chanflags $chan +b
timer -b 1 10 mode $chan -b $nick
}
elseif (%deoptimes [ $+ [ $nick ] ] > 1) {
timer 1 1 mode $chan +b $nick
timer 1 3 kick $chan $nick Your auth name is now Q banned, bye!
timer 1 3 msg q chanflags $chan -b
timer 1 3 mode $chan +o $nick
timer 1 3 msg q chanflags $chan +b
timer 1 4 msg q chanlev $chan $nick +ab
timer -b 1 5 mode $chan -b $nick
unset %deoptimes [ $+ [ $nick ] ]
}
else {
... your other stuff ...
}
}
}
;
on *:NICK:{
if ($var(%deoptimes [ $+ [ $nick ] ],0) {
set -u86400 %deoptimes [ $+ [ $newnick ] ] %deoptimes [ $+ [ $nick ] ]
;
unset %deoptimes [ $+ [ $nick ] ]
; ^ If the Op changes nicks Do you want to delete his old nicks counter? If not remove the above line.
;
}
}
[code]

* code untested, but looks right *

* problem I see is if a nick changes to anothing nick @bob > /nick fred > @fred > bans you #1 > changes back to bob > rejoins channel > @bob, you missed him
* worse u have 2 ops @bob & @fred, @fred is not there,@bob > /nick fred > @fred > bans you #1 > changes back to bob > rejoins channel > @bob, you missed him and @freds on his last chance and didnt do nothing :-(
Posted By: chess Re: Deop Protection Script - 19/03/05 03:29 AM
I dont need the change nick thing. I only need the script to work! and this script dosent work, nothing happends..

on @!*:DEOP:#: {
if ($opnick == $me) {
if (%deoptimes [ $+ [ $nick ] ] == 1) {
timer 1 1 mode $chan +b $nick
timer 1 3 kick $chan $nick WARNING! Next time you will be Q banned ! (10secs ban)
timer 1 3 msg q chanflags $chan -b
timer 1 3 mode $chan +o $nick
timer 1 3 msg q chanflags $chan +b
timer -b 1 10 mode $chan -b $nick
}
elseif (%deoptimes [ $+ [ $nick ] ] > 1) {
timer 1 1 mode $chan +b $nick
timer 1 3 kick $chan $nick Your auth name is now Q banned, bye!
timer 1 3 msg q chanflags $chan -b
timer 1 3 mode $chan +o $nick
timer 1 3 msg q chanflags $chan +b
timer 1 4 msg q chanlev $chan $nick +ab
timer -b 1 5 mode $chan -b $nick
}
}
}
}
Posted By: DaveC Re: Deop Protection Script - 19/03/05 10:57 AM
I draw your atttention to this statment.

The -u86400 (in both events) means that it well forget he deopped you the first time after 24 hours (reset to 24 hours again if he changes nicks the sneaky dude), remove the -u86400 to make it a twice EVER and your gone.

You have removed the whole line not the "-u86400" as instructed.
© mIRC Discussion Forums