A number of things:
- You're missing all your closing braces (although hopefully that's just a copying issue).
- You're using isin where you should be using ison. isin is for checking the presence of text within a larger peice of text, ison checks that a nickname is on a channel.
- You're using a closing brace in the second if condition instead of a closing parenthesis.
on *:text:*:#:{
if ($2) {
if ($nick ison $chan) {
if ($1 == !smack) me smacks $2 across the head
}
}
}
And although this isn't technically a bug in the code, you're checking that the person who said the text is on the channel. Although that's valid (in case the channel has mode -n), I suspect you want to check that the person being 'smacked' is on the channel, in which case you should replace
$nick with
$2.