;NICK REPLY snippet by S3S (p_ardillo@hotmail.com)
;
;This snippet fills the editbox of a channel with the nickname of the person who named you for a fast reply
;just paste it into remotes (alt + r)
;
;Here we check if someone names you in a channel
on *:text:*:#: {
;If you are named we call the nick-reply alias with $chan and $nick info to fill the editbox
if ($me isin $strip($1-)) nick-reply $chan $nick
}
;Same here but for actions ( /me's )
on *:action:*:#: {
if ($me isin $strip($1-)) nick-reply $chan $nick
}
;Nick-reply alias, here we fill the editbox
alias -l nick-reply {
;We confirm that the editbox is empty or that is filled with another nickname that named us before
;Those checkings make this alias not to change the editbox text while you are writing
if (!$editbox($1)) || (($len($editbox($1)) < 18) && ($mid($editbox($1),$calc($len($editbox($1)) -1),1) == $chr(58)) && ($right($editbox($1),1) == $chr(32))) {
;We can now fill the editbox with the specified nickname
editbox -p $1 $2 $+ $chr(58)
}
}Теперь когда кто-то напишет ваш ник, то его ник автоматически вставится в строку вводу.











