This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Join and Part = Ban

Old posts that have not been replied to for several years.
Locked
c
cYclone

Join and Part = Ban

Post by cYclone »

Can anyone write this Script for me please?
If any user Join a Channel and Part within 30seconds, the Bot set a Tempban for 30minutes.

Thanx and sorry for my bad English :-?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

bind join - "#channel *" join:part:set
proc join:part:set {nick host hand chan} {
  global join_part
  set join_part($nick) 1
  utimer 30 [list array unset join_part $nick]
}

bind part - "#channel *" join:part:ban
set comment "Parted sooner than 30 secs after joining"
proc join:part:ban {nick host hand chan arg} {
  global join_part comment
  if {[info exists join_part($nick)]} {
    newchanban $chan [maskhost $host] $::botnick $comment 30
  }
}
  
very basic script, will not work if $nick changes nick withine those 30 secs, and then part.
!!this script is untested!!
Elen sila lúmenn' omentielvo
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Rather that using timers, you can use the "getchanjoin" command on part.

There is one downside, user that are on the channel before the bot enters will ahve a time of 0.
Locked