Based on another script project, I tried to create this script (which does not work).
- When a user joins a channel, a file is read "banjoin\ident.txt".
- If the user's identity is found in the "ident.txt" file, the user is ONLY BANNED (no kick!) after 3 seconds. This prevents the user from re-entering if they decide to leave.
- A noticew is send to inform the user after 1 second.
- A user's identity is added by clicking on their nickname in the nick list.
menu nicklist {
BAN_IDENT
.add $chr(160) IDENT : bl_write_ident $+(*!,$ial($1,1).user,@*)
}
alias bl_write_ident {
if ($read($bl_ident,ntw,$1)) { echo -a The entry exists in blacklist:03 $1 }
else { write $bl_ident $1 | echo -a Added to blacklist:04 $1 }
}
on *:JOIN:#eMule-Italian:{
if ($read($ban_ident,ntw,$+(*!,$ial($nick,1).user,@*))) {
timerk 1 1 notice $chan $nick Se esci non potrai rientrare !
timerk 1 3 /ban # $+(*!*,$right($ial($1,1).user,6),@*)
}
}
alias -l bl_ident { return banjoin\ident.txt }
Thanks in advance