menu nicklist {
$iif($hget(pmusers) == $null, PM rights)
. Create access rights database {
hmake pmusers 100
.notice $me PM access database created.
}
$iif($hget(pmusers) != $null, PM rights)
. $iif($hfind(pmusers, $$1) != $$1, Give, Remove) {
var %counter = 0
while ($$1- != $null) {
if ($hfind(pmusers, $$N) != $$N) {
%counter = %counter + 1
hadd pmusers $$N $$N
if ($$N == $null && %counter == 1) {
.notice $me $$N got now PM rights.
}
if ($$N == $null && %counter > 1) {
.notice $me Selected group got now PM rights.
}
}
else {
%counter = counter + 1
hdel -w pmusers $N
if ($N == $null && %counter == 1) {
.notice $me Removed PM rights from $$1.
}
if ($N == $null && %counter > 1) {
.notice $me Removed PM rights from selected group.
}
}
}
}
.-
. Remove access database {
hfree -w pmusers
.notice $me PM access database destroyed.
}
}