This is a simple Oper Checker. The Bot will check if the user has any Oper modes (o O N A a C) and will display what they have.
NOTE: Bot MUST be IRCOp
on *:text:!opercheck*:#:{
if (o !isin $usermode) { halt }
if (%CheckingOper) { halt }
if (!$2) {
.whois $nick
set %nick $nick
msg $chan Now Checking is $nick is a NA
set %chan $chan
set %CheckingOper Yes
}
if ($2) {
.whois $2
set %nick $2
msg $chan Checking $2 $+ 's oper modes.
set %nick $2
set %chan $chan
set %CheckingOper Yes
}
}
raw 379:*:{
if (N isincs $6) { msg %chan %nick is a Net Admin. }
if (C isincs $6) { msg %chan %nick is a Co-Admin. }
if (A isincs $6) { msg %chan %nick is a Server Admin. }
if (a isincs $6) { msg %chan %nick is a Services Admin. }
if (o isincs $6) { msg %chan %nick is a Local Operator. }
if (O isincs $6) { msg %chan %nick is a Global Operator. }
if (O !isincs $6) && (o !isincs $6) && (a !isincs $6) && (A !isincs $6) && (C !isincs $6) && (N !isincs $6) { msg %chan %nick Has no IRCop Powers. }
unset %chan %nick %CheckingOper
}
In /helpop there is also a /helpop umodes that list
Umodes
Here is a list of all the usermodes which are available for use.
==---------------------------oOo---------------------------==
o = Global IRC Operator
O = Local IRC Operator
a = Is a Services Administrator
A = Is a Server Administrator
N = Is a Network Administrator
C = Is a Co Administrator
And then a /helpop oflags that list
Oflags
Here you will find the flags that can be placed inside of the O:Lines
==-------------------------------oOo-----------------------------==
o (locop) Local Operator
O (globop) Global Operator
C (coadmin) Gets +C on oper up. Is Co Administrator
A (admin) Gets +A on oper up. Is Server Administrator
a (services-admin) Gets +a on oper up. Is Services Administrator
N (netadmin) Gets +N on oper up. Is Network Administrator
So that could be the issue.
Also as I am a Services Admin and Global Oper I get +ao on my network while a Local Oper gets a +O.
Oflags
Here you will find the flags that can be placed inside of the O:Lines
==-------------------------------oOo-----------------------------==
o (locop) Local Operator
O (globop) Global Operator
C (coadmin) Gets +C on oper up. Is Co Administrator
A (admin) Gets +A on oper up. Is Server Administrator
a (services-admin) Gets +a on oper up. Is Services Administrator
N (netadmin) Gets +N on oper up. Is Network Administrator
i just copied from helpop.
raw 379:*:{
if (N isincs $6) { msg %chan %nick is a Net Admin. }
if (C isincs $6) { msg %chan %nick is a Co-Admin. }
if (A isincs $6) { msg %chan %nick is a Server Admin. }
if (a isincs $6) { msg %chan %nick is a Services Admin. }
if (o isincs $6) { msg %chan %nick is a Local Operator. }
if (O isincs $6) { msg %chan %nick is a Global Operator. }
if (O !isincs $6) && (o !isincs $6) && (a !isincs $6) && (A !isincs $6) && (C !isincs $6) && (N !isincs $6) { msg %chan %nick Has no IRCop Powers. }
unset %chan %nick %CheckingOper
}
should be, imo:
raw 379:*:{
if (N isincs $6) msg %chan %nick is a Net Admin.
elseif (C isincs $6) msg %chan %nick is a Co-Admin.
elseif (A isincs $6) msg %chan %nick is a Server Admin.
elseif (a isincs $6) msg %chan %nick is a Services Admin.
elseif (o isincs $6) msg %chan %nick is a Local Operator.
elseif (O isincs $6) msg %chan %nick is a Global Operator.
else msg %chan %nick Has no IRCop Powers.
unset %chan %nick %CheckingOper
}
I would suggest changeing $6- to be $6 as the network I am on I have a N for a snomask ( can view nick changes on remote server ) and when used on myself I got the below.
[15:43] (Goofy|Around) !opercheck Goofy|Around
[15:43] <Goofy|Around> Checking Goofy|Around\'s oper modes.
[15:43] <Goofy|Around> Goofy|Around is a Net Admin.
[15:43] <Goofy|Around> Goofy|Around is a Services Admin.
[15:43] <Goofy|Around> Goofy|Around is a Local Operator.
I am not a Net Admin. I am a Services Admin/Global Oper.
Also on the Network I am on
o = Global
O = Local