I need some help with a small function
i need to check the userlist if a nick is in there if it is then i want to invite him to #channel if he´s not i want to add him as userlevel 10 then invite him.
this is what i got so far:
on 25:TEXT:!invite*:#channel: { .invite.a $2 }
alias invite.a {
set %invitenick $1
if ($ulist(%invitenick $+ !*) != $null) { .invite %invitenick #channel }
elseif (!$ulist(%invitenick $+ !*)) { auser 10 %invitenick Guest | .invite %invitenick #channel }
unset %invitenick
}