Oper Checker

By LucSatise on Mar 04, 2008

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

}

Comments

Sign in to comment.
Scakk   -  Mar 05, 2008

After checking with someone on my network I found out a bit about the part in my previous post.

Having oline flag \'o\' will give you umode \'O\'.
Having oline flag \'O\' or above will give you umode \'o\'.

 Respond  
Scakk   -  Mar 05, 2008

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.

 Respond  
LucSatise   -  Mar 05, 2008

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.

 Respond  
Romulus777   -  Mar 04, 2008

oh no, Scakk and I are from the same network, and it is indeed Unreal, You just haven\'t seen how heavily modified it is. We have modes that most clients wouldn\'t know how to handle, and trust me, I know. I\'ve tried quite a few clients that didn\'t understand how to handle them.

 Respond  
Lindrian   -  Mar 04, 2008
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
}
 Respond  
Scakk   -  Mar 04, 2008

We use Unreal 3.2.7

Oper flags are as below for here.

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

 Respond  
LucSatise   -  Mar 04, 2008

edited.
The net ur on must be dif from unreal Scakk which is why ur loc/glob is dif.

 Respond  
Scakk   -  Mar 04, 2008

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

 Respond  
Lindrian   -  Mar 04, 2008

Use:

$istok(text,token,C)

Returns $true if token exists, otherwise returns $false.

Note: $istokcs() is the case-sensitive version.

for the last part of ur script.
also, unset can be one line.
Unset %var1 %var2 etc.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.