mIRC Home    About    Download    Register    News    Help

Print Thread
#155547 07/08/06 07:09 PM
Joined: Dec 2005
Posts: 3
P
Self-satisified door
OP Offline
Self-satisified door
P
Joined: Dec 2005
Posts: 3
i would like to know the command i can give my room bot for fly by's in my room
when someone comes in and leaves i wanna ban the user for short time

#155548 07/08/06 07:25 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
on @*:JOIN:#: {
  var %time = 5 | [color:blue]; time (in seconds) they join/leave in to be considered a "fly-by"[/color]
  .timer 1 %time /flyby $chan $fulladdress
}
alias fly-by {
  var %time = 300 | [color:blue]; time (in seconds) to ban user for being  a "fly-by"[/color]
  var %chan = $1, %address = $2, %nick = $gettok($2,1,33)
  if (%nick !ison %chan && $me isop $chan) /ban $+(-u,%time) %chan $mask(%address,2)
}


Change the time values. That will ban a user who joins/leaves for a short period of time.


-KingTomato
#155549 07/08/06 07:25 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
This should've been in the Script & Popups section and it has been done many times before.
Code:
 on !*:join:#:{
  $+(.timer,$cid,.,$wildsite) 1 10 greet $nick $chan $address
}
alias greet {
  .hinc -m TorD $+(Join,.,$3)
  if $1 !ison $2 {
    .hinc -m TorD $+(Fly-By,.,$3)
    .mode $2 +b $3
    .msg $1 Fly-by ban now in effect for $2
    .timer 1 300 .mode $2 -b $3
  }
  else {
    describe $2 Welcomes $1 to $2 for the $ord($hget(TorD,$+(Join,.,$3))) time.
  }
}
 

This is what I use on my bot for the Truth or Dare channel that I run. Some of it is coded specifically for my purposes (ie: the hash table entries), but it should give you an idea.

LOL King Tomato..you beat me by a few seconds.

Last edited by RusselB; 07/08/06 07:27 PM.
#155550 08/08/06 06:17 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Quote:
LOL King Tomato..you beat me by a few seconds.


indeed I did. I'm just that good. grin


-KingTomato

Link Copied to Clipboard