Operclass block

The operclass block is used to define ircop permissions. It is referred to from oper::operclass in the Oper block.

The operclass block allows you to define permissions in a very fine-grained manner. If you just want to use the defaults, then see standard oper classses at the end of this article.

Syntax & Examples
operclass name { parent xyz; /* OPTIONAL: can be used to inherit permissions from another operclass block */ privileges { .....privileges to grant to this oper class...... }; };

Each operclass has a name. You define the privileges in operclass::privileges. Optionally you can use operclass::parent to have this operclass inherit all permissions from another operclass.

How privileges work
By default the oper using an operclass does not have special powers (this is not entirely true, actually). You must grant each privilege via operclass::privileges.

For example to grant the right to /KILL users: operclass name { privileges { kill; This would be the same as: operclass name { privileges { kill { allow; };

Many privileges allow you to define even more options, which go in a sub-block, like: operclass name { privileges { kill { allow { local yes; }; /* only allow KILL on local users, not remote */ }; You can also have multiple allow blocks. The following would permit SPAMFILTER, but only in a limited matter: operclass name { privileges { spamfilter { /* May delete ANY spamfilter */ allow { what del; };                       /* May add spamfilter with action 'block' */ allow { action block; };                       /* (all the rest is denied) */ };

Permissions available
The following permissions are available

add
These contain access right which allow an IRCOp to add data to certain files

add::description
Allows IRCOp to use /SDESC to change the server description. The server description is shown in /LINKS and... yeah where else? ;)

add::motd
Allows IRCOp to use /ADDMOTD to add a line to the MOTD.

add::motd
Allows IRCOp to use /ADDMOTD to add a line to the MOTD.

add::omotd
Allows IRCOp to use /ADDOMOTD to add a line to the OPERMOTD.

chat::admin
Permits the use of /ADMINCHAT(?).. wait.. were are about to remove that ;)

chat::wallops
Permits the use of /WALLOPS to post messages to wallops users (umode +w)

gline
Allows /GLINE

kline
Allows /KLINE

zline
Allows /ZLINE and /GZLINE

You can use .... to differentiate.

samode
Allows /SAMODE

sajoin
Allows /SAJOIN

sapart
Allows /SAPART

shun
Allows /SHUN

spamfilter
Allows /SPAMFILTER

trace
Permits /TRACE

tsctl
Permits /TSCTL

Standard oper classes
UnrealIRCd ships with a number of operclass blocks, these are in the file operclass.default.conf. You can use these directly from your Oper block. Or just have a look to see more examples of operclass usage.

If you want to edit an operclass from operclass.default.conf then you must copy the block(s) to your own configuration file and give the operclass block(s) a different name. You should not edit operclass.default.conf directly as it will be overwritten upon each upgrade! (hence the name operclass.default.conf)

Alternatively, instead of editing you could also use 'inheritance'. This can be useful if you only want to add a few rights, or remove a few rights. You do this by creating a new operclass and use operclass::parent to inherit from one of the operclass'es that closely matches what you want. Then you define new privileges which you want to grant in addition to the ones from operclass::parent, or similarly you remove existing permissions. TODO: document by example.