alias -l c1 { return $+($chr(3),05,$1-) }
alias -l c2 { return $+($chr(3),04,$1-) }
on $*:TEXT:/[!@]defname */Si:*: {
if ($1 == !defname) || ($1 == @defname) {
if ($len($2-) > 12) { notice $nick $c2($2-) $c1(is too long to be an RSN.) | halt }
if ($2 == $null) { $c1(Specify a name.) | halt }
writeini -n Defnames.ini RSNs $address($nick,2) $2-
set %dnrsn [ $+ [ $nick ] ] true
}
}
on $*:TEXT:!rsn *:*: {
if (%dnrsn [ $+ [ $nick ] ] != true) { notice $nick $c2($2) $c1(has not set their) $c2(Runescape Name) $c1(.) | halt }
if (%privacy [ $+ [ $nick ] ] == enabled) { notice $nick $c2($2) $c1(has privacy enabled.) | halt }
if ($2 !ison $chan) { notice $nick $c1(The person must be on the channel you are currently on, -) $c2($chan) $c1(-) | halt }
if ($2 == $null) { notice $nick $c1(Specify a name.) }
notice $nick $c1(The current) $c2(Runescape Name) $c1(for) $c2($2) $c1(is) $c2($readini(Defnames.ini, RSNs, $address($2-,2)))
}
on $*:TEXT:/[!@]privacy */Si:*: {
if ($1 == !privacy) || ($1 == @privacy) {
if ($2 == on) || ($2 == enabled) {
set %privacy [ $+ [ $nick ] ] enabled
notice $nick $c1(Privacy has now been) $c2(enabled) $c1(. Players will no longer be able to use) $c2(!rsn) $c1(on you.)
}
elseif ($2 == off) || ($2 == disabled) {
unset %privacy [ $+ [ $nick ] ] enabled
notice $nick $c1(Privacy has now been) $c2(disabled) $c1(. Players will now be able to use) $c2(!rsn) $c1(on you.)
}
}
}