as the title says, thanks also goes to LucSatise for help coding it :}
======================================
= Contact info!! =
= Server: irc.lightsys.net:6667 =
= Channel: #chat =
= Nick: BigSteve/BigSteveaFK =
= Email: BigStevedw@hotmail.co.uk =
======================================
#whoisnotice on
on *:SNOTICE:*whois on you*: {
if (!%x) { set -u10 %x on
echo -a [ALERT] $2 ( $address($2,2) ) did a whois on you on server [ $server ] at [ $time(.:h:nn:sstt:.) , $date ] .
inc %now
NOTICE $2 Hi there $2 $+ . I am an Oper on this server with Level of $operlevel $+ . Can I help you with anything?
}
}
alias operlevel {
if (N isincs $usermode) { return Network Admin }
elseif (a isincs $usermode) { return Services Admin }
elseif (A isincs $usermode) { return Server Admin }
elseif (C isincs $usermode) { return CoAdmin }
elseif (o isincs $usermode) { return Global Operator }
elseif (O isincs $usermode) { return Local Operator }
}
#whoisnotice end
Menu channel,status {
Whois Watchis
.Whois Count: echo -a 9********11,1I 15,1have been whois'd 8,1[ %now ] 15,1times12,1.9*********
.Enable Whois Noticer: /enable #whoisnotice
.Disable Whois Noticer: /disable #whoisnotice
}
Actually if should have been $me instead:
on *:SNOTICE:*whois on you*: {
if ($nick(#,$me,Wq&o)) && (!%x) {
set -u10 %x on
;the rest of code here
I myself don't use unrealircd or regular type of ircd networks, so if any discrepancy applies to my code, please correct me.
The above code shall work. Basically that if condition checks if the client running the code is with +W set, or the user is an owner, admin, and op.
He could do it without the alias like this:
on *:SNOTICE:*whois on you*: {
if (!%x) { set -u10 %x on
var %o $replacecs($usermode,N,Network Admin,a,Services Admin,A,Server Admin,C,CoAdmin,o,Global Operator,O,Local Operator)
echo -a [ALERT] $2 ( $address($2,2) ) did a whois on you on server [ $server ] at [ $time(.:h:nn:sstt:.) , $date ] .
inc %now
NOTICE $2 Hi there $2 $+ . I am an Oper on this server with Level of %o $+ . Can I help you with anything?
}
}
Oh I see. I personally don't frequent UnrealIRCD related servers, so I don't know much about their protocols. Reviewing the code, I believe he can use $replacecs for the operlevel alias:
alias operlevel {
return $replacecs($usermode,N,Network Admin,a,Services Admin,A,Server Admin,C,CoAdmin,o,Global Operator,O,Local Operator)
}