First note:
If you want a script to do something only when you're opped, you can use @ in the event. It will only trigger if you are an op.
Example:
on @*:text:*:#: { }
Second:
on *:text:*:#: {
if ($mid($me,2,$calc($len($me)-2))) isin $1-) {
.echo -a $timestamps User $nick has mentioned you in $chan saying $1-
}
}
NOTE: This is for only if you use a symbol on both sides of your nick and you want to be notified when your nick is used with or without those symbols.
It will work when someone types:
|raZOR|
-raZOR-
_raZOR_
raZOR
|raZOR
raZOR|
etc.
I added "saying $1-" because you usually want to know what someone said if they used your nick.