mIRC Home    About    Download    Register    News    Help

Print Thread
help code this #162865 23/10/06 10:24 AM
Joined: Jan 2005
Posts: 14
U
uri Offline OP
Pikka bird
OP Offline
Pikka bird
U
Joined: Jan 2005
Posts: 14
on 1:DEOP:#: {
if ($me isreg $chan) {
msg $chan kicks u for deop me :^_^ $nick $+ .
mode +o $me
timer 1 2 kick $chan $nick I don't suggest you do that again.
timer
}
}
can some 1 add the code for auto op again to this..maybe /cs op me when some 1 deop me..


and the below scripts can code wit me...i dont need times 5-1 just give waring and gets kick after 5 mins.and the kick number.only for non ops gets kicks..

on *:JOIN:#ktm: {
if ( $nick != $me ) {
msg $chan You are about to be kicked.ask ur Q ..u cant idel here..
.timer 1 1 msg $chan In 5
.timer 1 2 msg $chan 4
.timer 1 3 msg $chan 3
.timer 1 4 msg $chan 2
.timer 1 5 msg $chan 1
.timer 1 6 msg $chan Goodbye!
.timer 1 6 /mode $chan +b $nick $+ !*@*
.timer 1 6 /kick #ktm $nick KICK!
.timer 1 9 /mode $chan -b $nick $+ !*@*
set %kick.number $calc(%kick.number + 1)
.timer 1 7 msg $chan That was person number %kick.number to get kicked!
}
}}

Last edited by uri; 23/10/06 11:15 AM.
Re: help code this #162866 23/10/06 10:31 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Code:
 on *:deop:#:{
if $opnick == $me && $nick ison $chan && $nick != $me {
set %nick $nick
.cs $chan op $me
.timer 1 2 .msg $chan I don't suggest you do that again.
.ban -ku $chan %nick kicks u for deop me :^_^ %nick $+ . 
}
}
 

The line .cs $chan op $me may need to be changed depending on the exact format that chanserv on that network requires.
Code:
 on @*:JOIN:#ktm: {
msg $chan $nick $+ : You are about to be kicked.ask ur Q ..u cant idle here..
.timer 1 300 msg $chan Goodbye!
.timer 1 300 $iif($nick !isop $chan,inc %kick.number)
.timer 1 300 $iif($nick !isop $chan,.ban -ku $chan $nick)
.timer 1 300 msg $chan That was person number %kick.number to get kicked!
}
 


The original code you posted, kicked after 5 seconds, however you asked for 5 minutes,

Re: help code this #162867 24/10/06 05:09 AM
Joined: Sep 2006
Posts: 12
R
routed Offline
Pikka bird
Offline
Pikka bird
R
Joined: Sep 2006
Posts: 12
Quote:

on @*:JOIN:#ktm: {
msg $chan $nick $+ : You are about to be kicked.ask ur Q ..u cant idle here..
.timer 1 300 msg $chan Goodbye!
.timer 1 300 $iif($nick !isop $chan,inc %kick.number)
.timer 1 300 $iif($nick !isop $chan,.ban -ku $chan $nick)
.timer 1 300 msg $chan That was person number %kick.number to get kicked!
}


Better yet:

Code:
on @*:JOIN:#ktm: {
  msg $nick If you don't ask a question in # in 5 mins, you will be kicked.
  .timerkick $+ nick 1 300 kickem $nick #
}
alias kickem {
  if (($1 !isop $2) && ($me isop $2)) {
    msg $2 Goodbye, $1 $+ , you are being kicked for inactivity.
    inc %kick.number
    ban -ku600 $2 $1 You are %kick.number person to be kicked by me!
  }
}

on *:TEXT:*:#ktm: if ($timer(kick $+ $nick)) { .timerkick $+ $nick off }
on *:QUIT: if ($timer(kick $+ $nick)) { .timerkick $+ $nick off }
on *:NICK: {
  if ($timer(kick $+ $nick)) {
    .timerkick $+ $newnick 1 $timer(kick $+ $nick).secs $timer(kick $+ $nick).com
    .timerkick $+ $nick off
  }
}


I hope I addressed everything, this 'should' work, not tested though...

with the other, if they join and quit, you are still msg'ing the channel Goodbye! after 5 mins whether they are there or not...

-Rappy (routed)