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.

Timeban

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
m
mssxx
Voice
Posts: 1
Joined: Sun Nov 05, 2006 1:44 pm

Timeban

Post by mssxx »

Hello there Wink


I was wondering if someone can make a script like this:


!timeban nick

The script should:

timeban the nick!*@, kick him from channel with reason : blabla and remove it after 60 mins.


Thanks in advance.

Flags: Opers
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Code: Select all

bind PUB o|o !timeban pub:timeban

proc pub:timeban {nickname hostname handle channel arguments} {
  if {[llength [set arguments [split $arguments]]] < 1} {
    putquick "NOTICE $nickname :Usage: !timeban nickname"
  } elseif {![onchan [set nick [lindex $arguments 0]] $channel]} {
    putquick "NOTICE $nickname :I don't see $nick on $channel!"
  } else {
    # IRCd should fix the banmask itself
    putquick "MODE $channel +b $nick"
    putquick "KICK $channel $nick :blabla"

    timer 60 [list putquick "MODE $channel -b $nick"]
  }
}
Post Reply