Just an update!

- So far, I come pt. with some help from people.
and now I just missing (if not on the channel, so I want See also him, although he is not - and I am not good (for it is something with $IAL)) and I can not - but Therefore, I have you:)
but now seems to have gone well with the script:)
Thanks to Sumsar (in order to help me with the script)
Thanks to zNigel (For borrowed his adminscanner:) )
Thanks to alfnbabz (To correct the script so it works 100%)
- Code: Select all
on *:JOIN:#Futz0r.dk: {
var %hostname = $address($nick,2)
if (!$readini(userlist.ini,$chan,%hostname) && %adminscan == on) {
ban -u300 $chan %hostname
.kick $chan $nick Invite only channel ( $+ $kc $+ ) | msg $nick You have been kicked from #Futz0r.dk , if you want an invite : /msg Futz0r invite #Futz0r.dk and wait for invite approval
}
}
on *:text:!invite*:#: {
if ($readini(userlist.ini,$chan,$address($nick,2)) == ADMIN) {
if (!$2) { notice $nick Syntax: $1 on/off/status/add/del/list }
elseif ($2 == on) {
if (%adminscan == on) { notice $nick Only-invite is already enabled.
}
else { set %adminscan on | notice $nick Only-invite is now enabled.
}
}
elseif ($2 == off) {
if (%adminscan == off) { notice $nick Only-invite is already disabled.
}
else { set %adminscan off | notice $nick Only-invite is now disabled. }
}
elseif ($2 == status) {
if (%adminscan == on) { notice $nick Only-invite is currently: Enabled }
else { notice $nick Only-invite is currently: Disabled }
}
elseif ($2 == add) {
if (!$3) { notice $nick Syntax: $1 $2 <nick> }
if ($readini(userlist.ini,$chan,$address($3,2)) == INVITE) { notice $nick $3 is already an the INVITE list. }
else { writeini userlist.ini $chan $address($3,2) INVITE | notice $nick Done. Added $3 to Only-invite list. }
}
elseif ($2 == del) {
if (!$3) { notice $nick Syntax: $1 $2 <nick|hostname> }
var %adminhost = $address($3,2)
if (*!*@* iswm $3) && ($left($3,4) == *!*@) { var %adminhost = $3 }
if (!$readini(userlist.ini,$chan,%adminhost)) { notice $nick %adminhost is not in Only-invite list. }
else {
remini userlist.ini $chan %adminhost | notice $nick Done. Removed %adminhost from Only-invite list. }
}
elseif ($2 == list) {
notice $nick Only-invite admins - Entries: $iif($ini(userlist.ini,$chan,0),$v1,0)
var %i = 1
while (%i <= $ini(userlist.ini,$chan,0)) {
var %x = $ini(userlist.ini,$chan,%i)
var %lvl = $readini(userlist.ini,$chan,%i)
var %list = $addtok( $+ %x $+ $chr(44),%list,32)
inc %i
notice $nick %x
}
else { halt
}
}
}
}
alias -l kc {
if (!%kicks) { set %kicks 0 }
inc %kicks
return %kicks
}