My first Script.
So, this is a very easy and simple script I made,
you just !punch NickYouWantToPunch and it punches them.
Enjoy!
on *:text:!punch *:#:{
if ($2 ison $chan) {
msg $chan $me winds up
describe $chan has punched $2 for $nick !
}
}
Here is an improved alternative to your existing code:
alias -l punch {
.msg $chan $me winds up
.describe $chan has punched %2 for $nick $+ ! | unset %2
}
on *:TEXT:$(!punch*):#: {
if (!%floodprotection) {
set -z %floodprotection 3
set %2 $2 | $iif(%2 ison #,$punch,.msg $v2 No such person as $v1 on $v2 $+ !)
}
}
Flood protection is added to prevent command scrolling and abuse. A warning message is sent when a user you want to punch is not on the channel.