mIRC Home    About    Download    Register    News    Help

Print Thread
Deop Protection Script #114834
18/03/05 06:46 PM
18/03/05 06:46 PM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
chess  Offline OP
Nutrimatic drinks dispenser
C

Joined: Mar 2005
Posts: 6
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 ?

Re: Deop Protection Script #114835
18/03/05 07:20 PM
18/03/05 07:20 PM
Joined: Dec 2002
Posts: 3,547
Kent, England
S
SladeKraven Offline
Hoopy frood
SladeKraven  Offline
Hoopy frood
S

Joined: Dec 2002
Posts: 3,547
Kent, England
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.

Re: Deop Protection Script #114836
18/03/05 07:31 PM
18/03/05 07:31 PM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
chess  Offline OP
Nutrimatic drinks dispenser
C

Joined: Mar 2005
Posts: 6
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 !

Re: Deop Protection Script #114837
18/03/05 07:36 PM
18/03/05 07:36 PM
Joined: Dec 2002
Posts: 3,547
Kent, England
S
SladeKraven Offline
Hoopy frood
SladeKraven  Offline
Hoopy frood
S

Joined: Dec 2002
Posts: 3,547
Kent, England
Well you can't have 2 On Deop events in the same Remote Script. The top one will cancel out the second one.

Re: Deop Protection Script #114838
18/03/05 07:51 PM
18/03/05 07:51 PM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
chess  Offline OP
Nutrimatic drinks dispenser
C

Joined: Mar 2005
Posts: 6
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

Re: Deop Protection Script #114839
18/03/05 08:22 PM
18/03/05 08:22 PM
Joined: Dec 2002
Posts: 3,547
Kent, England
S
SladeKraven Offline
Hoopy frood
SladeKraven  Offline
Hoopy frood
S

Joined: Dec 2002
Posts: 3,547
Kent, England
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?

Re: Deop Protection Script #114840
18/03/05 09:20 PM
18/03/05 09:20 PM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
chess  Offline OP
Nutrimatic drinks dispenser
C

Joined: Mar 2005
Posts: 6
yeah, Thx a lot smile

Re: Deop Protection Script #114841
18/03/05 09:50 PM
18/03/05 09:50 PM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
chess  Offline OP
Nutrimatic drinks dispenser
C

Joined: Mar 2005
Posts: 6
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 {
}
}

Re: Deop Protection Script #114842
19/03/05 12:53 AM
19/03/05 12:53 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
DaveC  Offline
Hoopy frood
D

Joined: Sep 2003
Posts: 4,230
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 :-(

Re: Deop Protection Script #114843
19/03/05 03:29 AM
19/03/05 03:29 AM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
chess  Offline OP
Nutrimatic drinks dispenser
C

Joined: Mar 2005
Posts: 6
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
}
}
}
}

Re: Deop Protection Script #114844
19/03/05 10:57 AM
19/03/05 10:57 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
DaveC  Offline
Hoopy frood
D

Joined: Sep 2003
Posts: 4,230
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.