Purge list v1.0

By dezzertv on Dec 12, 2011

Used the subops script jethro made then edited it so it kicks then unbans someone each time they talk
all thanks goes to jethro
http://www.hawkee.com/profile/39642/


so basicly it adds a user to automatic kick / unbans

!pl username adds them to it

!delpl username deletes them from the list

!plist shows the list of users in the purge list

on *:text:!pl *:#: {
  if ($nick isop #)  {
    set %purges $addtok(%purges,$2,44)
    msg # $2 has been added to automatic purging. 
  }
}
on *:text:!delpl *:#: {
  if ($nick isop #) {
    set %purges  $remtok(%purges,$2,1,44)
    describe # $2 has been removed from Purge list.
  }
}
on *:text:!plist:#: {
  msg # Purged Users: $replace(%purges,$chr(44),$+($chr(44),$chr(32)))
} 

on *:text:*:#:{ if ($istok(%purges,$nick,44)) || { kick # $nick | /mode # -b $nick } 
  :END
} 

Comments

Sign in to comment.
Spoof   -  Dec 17, 2011

on :text:!delpl :#: {
if (($nick isop #) {
You have double brackets on the second line.
In the first command you had it right with a single if ($nick isop #) {
Also you can shorten your commands down more example:
on *:Text:!dn:#: {
for the delete nick command... just an idea.
all in all you seem to be getting the hang of it and I look forward to more post. Keep up the good work.

 Respond  
Jethro   -  Dec 13, 2011

Good job. But what's with the || and :END? They're completely purposeless. Also, you need to put a check for the !plist trigger event:

on *:text:!plist:#: {
if (%purges) { ...

This way, you don't get an "empty" result if the variable is not set.

And Last but not least, It's a wise choice to ban offenders' hosts, not their nicknames. e.g.

ban -k # $nick 2
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.