Would this be usefull Epic to check if nick is actually a chan founder/admin/op/hop/ or already voiced ?
Yes, this can be useful if you need to give the user joining a channel a short time to get/set the channel mode (
~&@%+) before the "
whois" check starts.
Only in the code you provided there are several errors with identifiers
$1 and
$2, which do not allow to correctly obtain the necessary data.
In the event handler "
ON JOIN" this should be
$chan and
$nick, and in the alias these are already passed parameters, which will be designated as
$1 and
$2.
Taking into account your suggestions, I made changes to the script code:
alias -l my_channel { return #Alessandra }
alias -l check_access { if (!$nick($1,$2,!~&@%+)) { .enable #CHECKUSERS | whois $2 } }
on !*:JOIN:$($my_channel):{
if ($network == MindForge && *MindUser* !iswm $nick) {
.$+(timerACCESS,$network,$chan,$nick) -m 1 1500 check_access $unsafe($chan $nick)
}
}
#CHECKUSERS off
raw *:*:{
if ($numeric == 312 && *MindForge* iswm $1-) { .hadd -m cu-network $2 $true }
if ($numeric == 330) { .hadd -m cu-logged $2 $true }
if ($numeric == 318) {
if ($hget(cu-network,$2)) {
if ($hget(cu-logged,$2)) {
if ($2 ison $my_channel) mode $my_channel +v $2
}
else .notice $2 Please, register/identify Your nick! Thanks
.hdel -sw cu-network $2 | .hdel -sw cu-logged $2
}
.disable #CHECKUSERS
}
haltdef
}
#CHECKUSERS end
I have set the timer value to "
1500" milliseconds, you can change this to another value. Psss:
1 sec =
1000 ms.