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
}
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.
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