Wouldnt it be easier to click his name and press "purge"? You could get the BTTV browser plugin to avoid having to deal with scripts.
if you still want that purge command i would make it something like
on *:TEXT:!purge*:#: {
if ($nick isop $chan) {
msg $chan /timeout $2 1
msg $chan Purging $2
}
else {
msg $chan You dont have permission to use this command $nick
}
}
Edited some things, works now.
Oh no it times out '$2' for 1 second --> $2 is equal to the second word in !purge 'someone' (so !purge sjoepele would time me out, !purge Nos would time Nos out)
if you want anyone to use it you can use
on *:TEXT:!purge*:#: { msg $chan /timeout $2 1 }
if you only want it to time out 'john' then the $2 is not necessary ofcourse -> then you can go with Nos' suggestion
[i]
msg $chan /timeout $3 1 [/i]
or
on *:TEXT:*:#:{
if ($strip($1-2) == !purge username) {
if ($3) {
msg $chan /timeout $3 1
}
elseif (!$3) {
.notice $nick use the command !purge username <purge>
}
}
}
!purge !purge username -co--aja- use the command !purge username !purge username -co--aja- use the command !purge username !purge username co-ajach /timeout co-ajach 1
Thanks for the quick feedback. My purpose for doing this is more for fun and games. Basically, I want to make a command that anyone can use to time this specific user out for one second. Its not a malicious type of thing just for kicks. That said, i'm looking at what you posted and scratching my head.
I've been messing with this type of scripting for about 2 hours but I think what you posted would let a modded person time someone out for 2 seconds and if not then return the no permission message.
I'm not sure where the person your timing outs username would go though. >.>
**Edit - Woah I didn't see the other responses since I was crafting this one. I'll read over those now >.>