mIRC Home    About    Download    Register    News    Help

Print Thread
#132919 15/10/05 07:13 PM
Joined: Oct 2005
Posts: 126
P
PhyxiuS Offline OP
Vogon poet
OP Offline
Vogon poet
P
Joined: Oct 2005
Posts: 126
Well, i need a timer ban...

So, when i say "!TBan VortiNa 10" my bot will kick&ban "VortiNa" in 10 seconds...

H
hantu
hantu
H
Hello,

Did you try reading /help ON TEXT?

And to set timed ban, you use the -u flag with /ban..

eg:
Code:
/ban -u300 #chan NICK 3


That will ban NICK with mask type 3, in #chan, for 300 seconds.

Good luck

Joined: May 2005
Posts: 449
B
Fjord artisan
Offline
Fjord artisan
B
Joined: May 2005
Posts: 449
your solution will ban "for" 10 seconds... Unless I'm misunderstanding or he stated it wrong, he wants to wait 10 seconds and then ban. I've tried to write that script today but was having some issues. I'll maybe work on it when I get more time.

S
schaefer31
schaefer31
S
Code:
on 1:text:!tban *:[color:red]#Channel[/color]:{
  if ($2 ison [color:red]#Channel[/color] && $3 isnum) {
    timer 1 $3 mode [color:red]#Channel[/color] +b $address($nick,2)
  }
  else if ($3 !isnum) {
    notice $nick Invalid format. Use !tban <nick> <wait-time>
  }
  else {
    notice $nick $2 is not on [color:red]#Channel[/color]
  }
}

H
hantu
hantu
H
Quote:
your solution will ban "for" 10 seconds...


My bad, misreading.

S
schaefer31
schaefer31
S
Forgot to add in the kick command in the last post, and the edit time has expired. Here's the code with kick added in.

Code:
on 1:text:!tban *:[color:red]#Channel[/color]:{
  if ($2 ison [color:red]#Channel[/color] && $3 isnum) {
    timer 1 $3 mode [color:red]#Channel[/color] +b $address($nick,2)
    timer 1 $3 kick [color:red]#Channel[/color] $2
  }
  else if ($3 !isnum) {
    notice $nick Invalid format. Use !tban <nick> <wait-time>
  }
  else {
    notice $nick $2 is not on [color:red]#Channel[/color]
  }
}

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
Now you only need to replace #channel with the correct name once...
Code:
on 1:text:!tban *:#Channel:{
  if ($2 !ison $chan) notice $nick $2 is not on $chan
  elseif (($3 !isnum 0-) && ($3 != $null)) notice $nick Invalid format. Use !tban <nick> [wait-time]
  else $iif($calc(0 + $3),.timer 1 $v1) ban -ku600 $chan $2 2
  }
}


Link Copied to Clipboard