A note on compile time options | E: line | fakehosts/F: and S: lines | extra channelmodes | extra operator usermodes | servmode | Gline notes | check | trace
IRCU+Lain 1.2.0 Basic Documentation: <README> <INSTALL> <README.Lain> <README.commandline>
IRCU+Lain 1.2.0 Example files: <ircd.conf> <ircd.motd> <remote.motd>
A note on compile time options
Categories: source files, compile time
Since version 1.2.0, the functionality and availability of many commands can be altered in the source files before compilation. Many commands can be limited as operator only and the functionality can be altered in some cases. Please see the INSTALL file included with the ircu+Lain package for more details.
E: line
Categories: ircd.conf
The E: line in ircd.conf enables and disables Lain specific functions and commands.
+- Opers can set umode +k (Channel
Service)
|+- Opers can set umode +X (Extended oper)
||+- ..to join invite only channels
|||+- ..to join keyed channels
||||+- ..to join channels if banned
|||||+- ..to join full channels
||||||+- ..to kill +k clients
|||||||+- ..to deop +k clients
||||||||+- ..to kick +k clients
|||||||||+- Use fakehosts (F-lines) [This is not wallopped]
||||||||||+- Opers can message +n channels externally
|||||||||||+- Opers can speak on moderated channels [This is not
wallopped]
||||||||||||+- Opers can use servmode command
|||||||||||||+- Opers can change their host dynamically (Oper S: lines)
||||||||||||||+- Users can change their host dynamically (User S: lines)
|||||||||||||||+- Opers will not exceed their SendQ [This is not
wallopped]
||||||||||||||||+- Opers have smaller penalty when flooding [This is
not wallopped]
|||||||||||||||||+- Opers can netride [This is not wallopped]
E:000000000000000000
Acceptable values for all options are:
0 = off
1 = on
2 = using the function will be wallopped (not applicable for some functions, see
above)
3 = using the function will be sent as a local server notice (also, not
applicable for some functions)
NOTE! Make sure that all servers on the network share the exactly same
settings for the E: line. A smart idea is to make network wide policies on these
settings, using a Lain-NSCP is one simple way of doing this. The following example E: line is used on B2IRC:
E:131111111131313111
This setting allows all Lain specific commands to be used and will send local server notices when certain important commands are used.
Notes
You can check on the status of E: lines with /stats e (this command is oper
only by default). /stats e can be targeted to remote servers and it
accepts wildcards. Without parameters, /stats e will return the settings for the local servers,
whereas /stats e server.name will return settings for the requested server. In the following example, we'll be using a wildcard to get results for
rvn.fi.b2irc.net:
/stats e dev*
[dev.fi.b2irc.net] Patch configuration for
dev.fi.b2irc.net:
[dev.fi.b2irc.net] (E:131131311131313111) D:262143 0 21586 [*=Usage is
wallopped]:
[dev.fi.b2irc.net] Opers can set umode +k (Channel Service) [ 1] - YES
[dev.fi.b2irc.net] Opers can set umode +X (Extended oper) [ 2] - *YES
[dev.fi.b2irc.net] ..to join invite only channels [ 3] - YES
[dev.fi.b2irc.net] ..to join keyed channels [ 4] - YES
[dev.fi.b2irc.net] ..to join channels if banned [ 5] - *YES
[dev.fi.b2irc.net] ..to join full channels [ 6] - YES
[dev.fi.b2irc.net] ..to kick +k clients [ 9] - YES
[dev.fi.b2irc.net] ..to deop +k clients [ 8] - YES
[dev.fi.b2irc.net] ..to kill +k clients [ 7] - *YES
[dev.fi.b2irc.net] Opers can message +n channels externally [11] - *YES
[dev.fi.b2irc.net] Opers can speak on moderated channels [12] - YES
[dev.fi.b2irc.net] Opers can use servmode command [13] - *YES
[dev.fi.b2irc.net] Opers can change their host dynamically [14] - YES
[dev.fi.b2irc.net] Allow users to SETHOST passworded S:lines [15] - *YES
[dev.fi.b2irc.net] Enable fakehosts (F: lines) [10] - YES
[dev.fi.b2irc.net] Opers will not exceed their SendQ [16] - YES
[dev.fi.b2irc.net] Opers have smaller penalty when flooding [17] - YES
[dev.fi.b2irc.net] Opers can netride [18] - YES
[dev.fi.b2irc.net] e End of /STATS report
Similar results to /stats e can also be retrieved with /patchinfo. It has the same command format as /stats e, ie. /patchinfo returns information for the local server and /patchinfo server.name for a remote server.
Fakehosts and F: / S: lines
Categories: ircd.conf, operator commands, user commands
Lain allows users to change the visible hostname on IRC. Emphasis on FAKE - these options will only make your host look different on IRC. Be sure on who should have access to these privileges, a clear network wide policy is a smart idea. Faking hostnames owned by other individuals and companies is also questionable at best, often illegal as well so use some sense. The best use for fakehosts is protection - for example operators and important use bots can set a non-resolving fakehost to protect them from people who tend to use DoS attacks for cheap fun.
F: lines vs S: lines
F: lines are static, they're written in ircd.conf and activated
automatically on connect. They can be set for anyone with a static host or ip,
and a static ident. They will not allow you to change your ident reply and they
cannot be used for dynamic hosts/ip's. F: lines are useful for important bots.
S: lines on the other hand are not automatic. They are as well written to
ircd.conf but are activated manually, with the SETHOST command. There are two
types of S: lines, operator and user S: lines. Operator S: lines allow the
operator to choose an ident at will and do not require a password, but require
the user to be opered. User S: lines only affect the hostname, not the ident,
and require a password for activation.
Enabling and using F: lines
Get your favorite editor and open up ircd.conf. Be sure to enable the usage
of F: lines on the E: line first. F: lines are written in the conf file in the
following format:
F:real_ident:real.host.or.ip:fake.host
The first part is the real ident, ie. the ident you're connecting to IRC with. The second part is the real host or ip, also whatever you see with /whois when you connect to irc. The last part is the fake host that will be shown on IRC. A live example follows.
JohnDoe kyuu@phibrizzo.kyuu.gw0.net * : John Doe
Now, we will want to make a fakehost for John Doe, that will change hist host to john.doe. We will be adding the following like to the ircd.conf:
F:kyuu:phibrizzo.kyuu.gw0.net:john.doe
Remember to rehash the ircd.conf with /rehash or kill -HUP <ircd_pid>. Now, when John reconnects, his whois line will show:
JohnDoe kyuu@john.doe * : John Doe
NOTE! If you don't have an identd running on the connecting computer, you can still use F: lines. Just remember to add the ~ character to the F: line as well.
Enabling and using user S: lines
Again, start with your favorite editor. Enable dynamic user fakehosts on the
E: line, you may also want usage to be wallopped or sent as snotices. The format
for user S: lines follows:
S:fake.host:password
The first part is the fake host that should be available. The second part is the password needed to activate it. Again, we'll be using a live example.
JaneDoe kyuu-chan@phibrizzo.kyuu.gw0.net * : Jane Doe
Jane will want to set a fakehost of helper.gameserviceprovider.com. The password will be 'banana'. The following line will be added to ircd.conf:
S:helper.gameserviceprovider.com:banana
At this point, rehash the ircd.conf with /rehash or kill -HUP <ircd_pid>. Jane doesn't have to reconnect, but now she can type the following command on IRC:
/sethost helper.gameserviceprovider.com
banana
SETHOST: Your new host is - [kyuu-chan@helper.gameserviceprovider.com]
Now, her whois line will show the new hostname.
JaneDoe kyuu-chan@helper.gameserviceprovider.com * : Jane Doe
The fake host will only be active until she reconnects, after which she will have to use the /sethost command again.
Enabling and using oper S: lines
Open ircd.conf with your never tiring editor. Enable dynamic oper fakehosts
on the E: line and again, it's a smart idea to have the usage wallopped or
snoticed. The format for oper S: lines follows:
S:fake.host
This has only one part - the fake hostname.
Vekotin vekotin@shuichi.kyuu.gw0.net * : 1337 guide writer
Vekotin hub.fi.b2irc.net :B2IRC HUB, Tampere FI
Vekotin :is an IRC Operator
Evil Vekotin wants to have a cooler ident+hostname combo, specifically very@cute.boy. The following entry will be added to ircd.conf:
S:cute.boy
Then once again, /rehash or kill -HUP <ircd_pid> to reload the configuration. No need to reconnect, now Vekotin can enable the command on IRC. Like seen in the previous whois clip, he has opered before trying to use this command, as oper fakehosts will only work for operators:
/sethost very cute.boy
SETHOST: Your new host is - [very@cute.boy]
Now, /whois will be showing the much scarier fakehost
Vekotin very@cute.boy * : 1337 guide writer
Like the user S: line enabled fakehost, this fake host will only be active during the current irc session. After reconnection, it will have to be enabled again after opering.
Notes and additional info
The /stats command will show information for F: and S: lines available, with
/stats S and /stats F. In versions 1.1.2 and earlier, normal users can view
information on local user S: lines, with /stats S, all other information is
restricted to operators only. Since version 1.2, all /stats S and /stats F
commands are by default operator only, but can be enabled for all users to view
during compile time. Operators can view information on F: and both oper
and user S: lines. Opers can also check these stats for remote servers. See
notes for the E: line above for more information.
Extra chanmodes
Categories: user commands
Since Lain 1.2.0, the channel modes +c and +C have been added. These modes are available for all channel operators like any other channel modes
+c - disables the use of color codes on the channel. Depending on the compile
time options you've chosen, they will either be cleanly stripped and all text
will be showed without color codes, or any lines with color codes will simply
not be shown
+C - disables the use of channel wide CTCP commands on the channel
Set with the /mode command like any other channel mode, such as /mode #mychannel +c
Notes
These commands are quite useful for large channels, especially help and support
channels.
Depending on compile time settings, +c can either just simply drop out any color codes or filter them. Filtering takes a bit more CPU time - not much, but larger networks may want to consider this
Also note that the color codes from quit messages will ALWAYS be stripped out, no matter what channel options are set.
Extra operator usermodes
Categories: oper commands
The E: line in ircd.conf enables and disables Lain specific functions and commands, including usermodes available only for operators: +k, +X and +n. +n is always available, usage of +k and +X must first be enabled on the E: line. In the descriptions below, we're assuming that you've allowed operators to use +k and all +X functions.
+k - Network service
This dangerous usermode allows an operator to act like a network service. An
operator with this mode cannot be kicked, deoped or killed except by a client
with the usermode +X. Using +k will also hide your channel list completely from
/whois replies.
+X - Extended operator
An operator with +X can walk through channel modes (invite, key, ban, limit)
and can kick, kill and deop network services (+k clients).
NOTE! Needless to say, +X and especially +k are VERY DANGEROUS user modes. Remember, when not doing operator duties, an operator is just a normal user than can be kicked and banned from channels if the channel operators so desire. Good and useful places for temporarily using +kX modes are handling channel takeovers or similar situations. Lazy operators also tend to use +kX to join all channels when first logging in to IRC, which isn't that harmful either. However, and I emphasize, use these modes WITH CAUTION, WITH GOOD JUDGEMENT AND ALWAYS ONLY TEMPORARILY.
+n - Hide user details
Because using +k is such a dangerous habit, this "softer" usermode was
developed to simply allow operators to hide their channel list completely from /whois
replies.
Notes
+k and +n are mutually exclusive - ie. can't be used simultaneously
Servmode
Categories: oper commands
The /servmode command operates exactly like /mode command format wise and allows operators to set channel modes via server. The most common use is perhaps granting channel operator status:
/servmode #cutechannel +o Kyuu
*** ServerMode/#cutechannel [+o Kyuu] by hub.fi.b2irc.net
Notes and additional info
Like in many other Lain specific additional commands and even some ircu
generic ones, some clients don't correctly interpret these commands. If you get
errors such as Unknown command: servmode, you will need to use the format
/quote servmode instead of just /servmode. You can also add an alias servmode
for /quote servmode to avoid this problem.
Gline notes
Categories: network operations, oper commands
In Lain, there are many different types of Glines. Depending on your operator services, in addition to standard ident+hostmask glines, you may see nick glines, channel glines and realname glines. In ircu+Lain 1.2.0, some statistics commands were added for checking gline information. /stats g will list normal glines and /stats b will list channel glines. The result format includes the hostmask for the gline, the ending time in unix standard time and the gline reason.
/stats g
G *!*@200.165.84.165 1114071363 Continuous spamming
g End of /STATS report
/stats b
G #*skinhead* 1332692906 nazism is not allowed
G #paki 1176744833 Racism
G #[=SS=] 1176744796 nazism
b End of /STATS report
Check
Categories: oper commands
It could be argued that /check is perhaps the most used operator command. Properly used, it will save operators a great deal of time and trouble, so don't leave home without it.
There are four operation modes in /check: server, channel, client, hostmask
/check server
Provides server specific generic, connection and user statistics. If you're
having trouble getting the demographics to show up, remember to check that you
have the demogrph_countries.txt file in your lib directory(the same directory
where ircd.conf resides). This file comes with the ircu+Lain sources.
/check rvn.fi.b2irc.net
:--------------------------------------------------------------------
:Information for server 'rvn.fi.b2irc.net'
:--------------------------------------------------------------------
: Connected at:: Sat Aug 24 07:00:53 2002
: Server name:: rvn.fi.b2irc.net
: Routing:: hub.fi.b2irc.net
: `-rvn.fi.b2irc.net (1s)
: Hops:: 1
: Numeric:: AH --> 7
:
:Demographics (code/country/users) (%)
:--------------------------------------------------------------------
:.de (Germany) 0001 (6.25%)
:.dk (Denmark) 0001 (6.25%)
:.fi (Finland) 0008 (50.00%)
:.fr (France) 0001 (6.25%)
:.se (Sweden) 0001 (6.25%)
:.com (Internic Commercial) 0001 (6.25%)
:.net (Internic Network) 0001 (6.25%)
:unknown (inc.
IP addresses) 0002 (12.50%)
:--------------------------------------------------------------------
:Load:: 16 users on this server, 16.00% of total (100) online
/check channel
Perhaps the most used flavor of /check, this command returns information
about the status of a channel. This includes channel basic information,
modes(including channel key, if set) and user information. The user information
includes the nickname, hostmask and realname. Also, all clones (multiple users
from a single host) are marked with an asterisk(*).
/check #opers
:--------------------------------------------------------------------
:Information for channel '#opers'
:--------------------------------------------------------------------
: Creation time:: Wed Jun 20 23:32:54 2001
: Topic:: B2IRC Operators, how may we help you? | http://www.b2irc.net
| http://staff.b2irc.net | http://mrtg.b2irc.net
: Set by:: Li
:Channel mode(s):: +nt
:
:Users (@ = op, + = voice, * = clone)
: Trollo_ (~trollo@trollo.unix.dk) (Kim Jacobsen)
:
@Jede (jede@kahvi) (Jesse)
: acrolyte (acrolyte@acrolyte.org) (Jussi Jokinen)
: @Kyuu (vekotin@kurapica.b2.st) (Kyuu Eturautti)
: @Raziel (raziel@dev2.fi.b2irc.net) (Jere Kataja)
: @Sivis (sivis@dita.sivis.org) (Tero Nybacka)
: * @ozzy_ (ozzy@youzen.projectb2.net) (Oliver Keenan)
: * +|-|V (cheesy@youzen.projectb2.net) (Basically I'm the worst nightmare
you ever had)
:
@Kyuu-Chan (vekotin@lafiel.b2.st) (Kyuu Eturautti)
: @Li (bot@shaoran.li) (http://shaoran.li/)
:
:Total users:: 10 (7 ops, 1 voiced, 2 clones)
:
:Bans on channel::
:[1] - test!ban@thingie
: Set by Kyuu, on Sun Aug 25 14:52:40 2002
/check client
This /check command returns information for a client(user) on IRC. This
information includes everything you see with /whois, as well as the numeric,
real user/hostmask(when using /sethost or F: lines), user modes, complete
channel list(including +s channels) and connection statistics.
/check Bishounen
:--------------------------------------------------------------------
:Information for user 'Bishounen'
:--------------------------------------------------------------------
: Signed on:: Sun Aug 25 14:38:30 2002
: Nick:: Bishounen (AKAyY)
: User/Hostmask:: very@cute.boy (212.246.228.181)
: Real user@host:: vekotin@phibrizzo.kyuu.gw0.net
: Location:: <unknown>
: Real Name:: Kyuu Eturautti
: Status:: IRC Operator
: Connected to:: hub.fi.b2irc.net
: Umode(s):: +oiwgs
: Channel(s):: @#cuteboys
:
:Local connection statistics::
: Ports:: 3930 -> 6667 (client -> server)
: Data sent:: 0.557 Kb (32 protocol messages)
: Data received:: 21.176 Kb (313 protocol messages)
: sendQ size:: 0 bytes (max. 1024 bytes)
: receiveQ size:: 332 bytes (max. 160000 bytes)
/check hostmask
This command allows you to find clients(users) matching a specific hostmask.
This command allows use of the full irc hostmask(nick!ident@host) for searching.
When the full hostmask format is not used, /check will assume you're looking for
a certain host. Please note that the hostnames listed in the result are the
hosts currently in use on IRC, be it a fakehost or a real one. The list output
can be modified with the parameter -c(-channels), which adds a list of channels
each client is on. Below are a few
examples:
/check kyuu*!* [or, /check
Kyuu*!*@* - searching for nicknames starting with kyuu]
:Information for host 'Kyuu*!*@*'
:--------------------------------------------------------------------
:No. Nick User Host
:--------------------------------------------------------------------
: 1 Kyuu vekotin kurapica.b2.st
: 2 Kyuu-Chan vekotin lafiel.b2.st
:--------------------------------------------------------------------
:Matching records found:: 2 (2.00% of total (100) online)
/check
Cloud* [or, /check *!*@cloud* - searching for hostmasks starting
with cloud]
:Information for host '*!*@cloud*'
:--------------------------------------------------------------------
:No. Nick User Host
:--------------------------------------------------------------------
: 1 ^Neria sade cloud.nu
: 2 Sade sade cloud.nu
: 3 Cloud cloud cloud.nu
:--------------------------------------------------------------------
:Matching records found:: 3 (3.00% of total (100) online)
/check bot@*
[or, /check *!bot@* - searching for idents matching bot]
:Information for host '*!bot@*'
:--------------------------------------------------------------------
:No. Nick User Host
:--------------------------------------------------------------------
: 1 Yahiko bot lafiel.b2.st
: 2 Li bot shaoran.li
:--------------------------------------------------------------------
:Matching records found:: 2 (2.00% of total (100) online)
/check *.li
[or, /check *!*@*.li - checking for hostmasks ending in .li]
:Information for host '*!*@*.li'
:--------------------------------------------------------------------
:No. Nick User Host
:--------------------------------------------------------------------
: 1 Li bot shaoran.li
:--------------------------------------------------------------------
:Matching records found:: 1 (0.98% of total (102) online)
/check *kyuu.gw0.net -c [or, /check *!*@*.kyuu.gw0.net - checking for hostmasks ending in .kyuu.gw0.net,
channel listing enabled]
:Information for host '*!*@*kyuu.gw0.net'
:--------------------------------------------------------------------
:No. Nick User Host
:--------------------------------------------------------------------
: 1 KalaX vekotin phibrizzo.kyuu.gw0.net
: on channels: @#testchannel3 @#testchannel2 @#testchannel1
:
:--------------------------------------------------------------------
:Matching records found:: 1 (0.81% of total (124) online)
Notes and additional info
Like in many other Lain specific additional commands and even some ircu
generic ones, some clients don't correctly interpret these commands. If you get
errors such as Unknown command: check, you will need to use the format
/quote check instead of just /check. You can also add an alias check
for /quote check to avoid this problem.
Trace
Categories: oper commands
The standard ircu command, trace, has been modified for ircu+Lain version 1.2.0. Trace allows an operator to check the status of used connections, including connection classes (Y:/I: lines). When targeted towards a server, trace accepts the parameter -f, which enables output of normal clients as well(normal output includes only opered clients).
There are two operation modes in /trace: server, client
/trace server
Provides statistics for used connections on a server. By default, the trace
output includes all server connections and all opered clients. By adding the
parameterer -f, /trace will output information on all clients. By default,
/trace is performed on the local server, but can be directed towards another
server as well. The remote server name accepts wildcards. Examples follow:
/trace dev.fi.b2irc.net
:Serv 90 12S 121C hub.fi.b2irc.net AUAAC!sivis@dita.sivis.org 5 182795
:Oper 10 Sivis[sivis@212.246.228.209] 0
:Class 1 3
:Class 10 1
:Class 90 1
/trace -f dev.fi.b2irc.net
:Serv 90 12S 121C hub.fi.b2irc.net AUAAC!sivis@dita.sivis.org 8 182808
:Oper 10 Sivis[sivis@212.246.228.209] 0
:User 1 Flux[flux@194.100.129.72] 22
:User 1 Dita[dita@212.246.228.209] 93
:Class 1 3
:Class 10 1
:Class 90 1
/trace client
This /trace function traces the connection from your current server to a
specific client.
/trace raziel
:Link u2.10.10+lain(1.2) raziel hub.fi.b2irc.net
:Link u2.10.10+lain(1.1.2) raziel tampere.fi.b2irc.net(from hub.fi.b2irc.net)
:Oper 10 Raziel[tampere.fi.b2irc.net] 56(from tampere.fi.b2irc.net)
Notes and additional info
The /trace client function does accept a second parameter, which is either a
remote server name or a second client(in which case, it is interpreted as the
local server of the second client). The second parameter sets a destination
server name, on which the first client is traced locally. As this second
parameter is generated automatically, you're much better off just using /trace
client with a single parameter.
Either you've gotten this far by reading or you've just jumped to the end, hoping to find the meaning of life here. It's... umm... eat bananas and use ircu+Lain. If you have any ideas in mind which could be used to make this document more useful, contact kyuu@b2irc.net.
Project B2 © 2002