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.

ban user on

Old posts that have not been replied to for several years.
Locked
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

ban user on

Post by Ofloo »

how i do this user joins channel !news then write after they got news they part i wana ban users who come and go, so how do i ban a user that comes perfroms a command and leaves the channel sooner then 15 mins or something ??
XplaiN but think of me as stupid
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind pubm - !* command:adduser

proc command:getjoin {nick uhost hand chan arg} {
 if {[isop $nick $chan] || [isvoice $nick $chan]} {return 0}
  adduser $nick $uhost
  chattr $nick +W
  timer 20 [list deluser $nick]
}

bind part W * command:partban

proc command:partban {nick uhost hand chan arg} {
 if {[getchanjoin $nick $chan] >= [expr {[clock seconds] - 900}]} {
  putserv "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
 }
}
this will add the user to the bot's user list, and gives him the W flag, so when he parts in the interval of 15mins (900 secs) the bot will ban him.

P.S. Don't worry about the users, because the bot will delete the user after 20 minutes
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

dude thats great idea simple but works tnx
XplaiN but think of me as stupid
Locked