mIRC Home    About    Download    Register    News    Help

Print Thread
#114834 18/03/05 06:46 PM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
OP Offline
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 ?

#114835 18/03/05 07:20 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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.

#114836 18/03/05 07:31 PM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
OP Offline
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 !

#114837 18/03/05 07:36 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Well you can't have 2 On Deop events in the same Remote Script. The top one will cancel out the second one.

#114838 18/03/05 07:51 PM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
OP Offline
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

#114839 18/03/05 08:22 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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?

#114840 18/03/05 09:20 PM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
C
Joined: Mar 2005
Posts: 6
yeah, Thx a lot smile

#114841 18/03/05 09:50 PM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
OP Offline
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 {
}
}

#114842 19/03/05 12:53 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
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 :-(

#114843 19/03/05 03:29 AM
Joined: Mar 2005
Posts: 6
C
chess Offline OP
Nutrimatic drinks dispenser
OP Offline
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
}
}
}
}

#114844 19/03/05 10:57 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
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.


Link Copied to Clipboard