### Install UnrealIRCd on Windows Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html Instructions for installing UnrealIRCd on Windows, which involves running the installer and then creating configuration files. -------------------------------- ### Create and Connect IRC Client in Go Source: https://github.com/fluffle/goirc/blob/master/README.md Demonstrates how to create a simple IRC client using GoIRC. It shows two methods: using `irc.SimpleClient` for basic setup and `irc.Client` with a custom configuration for more control, including SSL and custom nickname generation. The example also includes setting up event handlers for connection and disconnection, and initiating the connection to an IRC server. ```go package main import ( "crypto/tls" "fmt" irc "github.com/fluffle/goirc/client" ) func main() { // Creating a simple IRC client is simple. c := irc.SimpleClient("nick") // Or, create a config and fiddle with it first: cfg := irc.NewConfig("nick") cfg.SSL = true cfg.SSLConfig = &tls.Config{ServerName: "irc.freenode.net"} cfg.Server = "irc.freenode.net:7000" cfg.NewNick = func(n string) string { return n + "^" } c = irc.Client(cfg) // Add handlers to do things here! // e.g. join a channel on connect. c.HandleFunc(irc.CONNECTED, func(conn *irc.Conn, line *irc.Line) { conn.Join("#channel") }) // And a signal on disconnect quit := make(chan bool) c.HandleFunc(irc.DISCONNECTED, func(conn *irc.Conn, line *irc.Line) { quit <- true }) // Tell client to connect. if err := c.Connect(); err != nil { fmt.Printf("Connection error: %s\n", err.Error()) } // With a "simple" client, set Server before calling Connect... c.Config().Server = "irc.freenode.net" // ... or, use ConnectTo instead. if err := c.ConnectTo("irc.freenode.net"); err != nil { fmt.Printf("Connection error: %s\n", err.Error()) } // Wait for disconnect <-quit } ``` -------------------------------- ### Install UnrealIRCd on Linux Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html Steps to install UnrealIRCd on a Linux system, including extracting the archive, configuring, and compiling the software. It also mentions the creation of configuration files. ```bash gunzip -d Unreal3.2.X.tar.gz tar xvf Unreal3.2.X.tar cd Unreal3.2 ./Config make ``` -------------------------------- ### IRC USER Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt An example of the USER command in IRC, used for specifying username, hostname, and realname during initial connection. The example shows the parameters for registering a user. ```IRC Protocol USER guest 0 * :Ronnie Reagan ; User registering themselves with a ``` -------------------------------- ### WHOIS Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Illustrates the WHOIS command for retrieving user information. It shows how to get general information about a nickname and how to query a specific server for user details. ```IRC Protocol WHOIS wiz ; return available user information about nick WiZ WHOIS eff.org trillian ; ask server eff.org for user information about trillian ``` -------------------------------- ### IP ban example Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html This demonstrates an IP ban using a wildcard. The ban `*!*@128.*` will prevent any user whose IP address starts with '128.' from joining the channel. ```irc *!*@128.* ``` -------------------------------- ### IRC LIST command examples Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Shows examples of the LIST command in IRC, used to display a list of all channels and their topics, or the status of specific channels if provided. ```IRC LIST ; Command to list all channels. LIST #twilight_zone,#42 ; Command to list channels #twilight_zone and #42 ``` -------------------------------- ### UnrealIRCd Link Configuration Example Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html An example of a 'link' block in UnrealIRCd configuration, specifying connection details for a remote server, including username, hostname, IP binding, port, and authentication passwords. It also includes options for autoconnect, SSL, and zip compression. ```UnrealIRCd Config link hub.mynet.com { username *; hostname 1.2.3.4; bind-ip *; port 7029; hub *; password-connect "LiNk"; password-receive "LiNk"; class servers; options { autoconnect; ssl; zip; }; }; ``` -------------------------------- ### IRC NAMES command examples Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Provides examples of the NAMES command in IRC, used to list visible users on specified channels or all visible channels and their occupants if no channel is specified. ```IRC NAMES #twilight_zone,#42 ; Command to list visible users on #twilight_zone and #42 NAMES ; Command to list all visible channels and users ``` -------------------------------- ### IRC PASS Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt An example of the PASS command used in IRC for setting a connection password. This command must precede the NICK/USER combination for client registration. ```IRC Protocol PASS secretpasswordhere ``` -------------------------------- ### Upgrade UnrealIRCd on Windows Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html Steps for upgrading UnrealIRCd on Windows, including backing up configuration files, uninstalling the old version, installing the new version, and restoring configuration files. -------------------------------- ### Spamfilter Example: Gline with Time and Reason Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html An example of adding a spamfilter that applies a gline for a specified duration with a custom reason when a specific phrase is detected in private messages. ```irc-commands /spamfilter add p gline 3h Please\_go\_to\_www.viruscan.xx/nicepage/virus=blah Come watch me on my webcam ``` -------------------------------- ### Configure Oper Block with Specific Settings Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html This example configures an 'oper' block with a specific class, multiple userhost matches, a password, and a set of oper flags including network administration and various kill/notice permissions. ```ircd-config oper bobsmith { class clients; from { userhost bob@smithco.com; userhost boblaptop@somedialupisp.com; }; password "f00"; flags { netadmin; can_gkline; can_gzline; can_zline; can_restart; can_die; global; }; swhois "Example of a whois mask"; snomask frebWqFv; }; ``` -------------------------------- ### IRC INVITE command example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Demonstrates the INVITE command in IRC, used to invite a specific user to a channel. It outlines the parameters required for the command. ```IRC INVITE The INVITE command is used to invite a user to a channel. The parameter is the nickname of the person to be invited to the target channel . There is no requirement that the channel the target user is being invited to must exist or be a valid channel. However, if the channel exists, only members of the channel are allowed to invite other users. When the channel has invite-only flag set, only channel operators may issue INVITE command. ``` -------------------------------- ### IRC TOPIC command examples Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Illustrates how to use the TOPIC command in IRC to set, clear, or retrieve the topic of a channel. It shows examples of setting a new topic, clearing the topic, and checking the current topic. ```IRC :WiZ!jto@tolsun.oulu.fi TOPIC #test :New topic ; User Wiz setting the topic. TOPIC #test :another topic ; Command to set the topic on #test to "another topic". TOPIC #test : ; Command to clear the topic on #test. TOPIC #test ; Command to check the topic for #test. ``` -------------------------------- ### IRC QUIT Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Demonstrates the QUIT command used to terminate a client session on an IRC server. It includes the command syntax and an example of a quit message. ```irc QUIT :Gone to have lunch ``` -------------------------------- ### IRC MODE Command Examples Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Provides examples of the MODE command for managing channel characteristics, such as setting moderation, invite-only status, granting operator privileges, banning users, and setting channel limits. ```irc MODE #Finnish +imI *!*@*.fi MODE #Finnish +o Kilroy MODE #Finnish +v Wiz MODE #Fins -s MODE #42 +k oulu MODE #42 -k oulu MODE #eu-opers +l 10 :WiZ!jto@tolsun.oulu.fi MODE #eu-opers -l MODE &oulu +b MODE &oulu +b *!*@* MODE &oulu +b *!*@*.edu +e *!*@*.bu.edu ``` -------------------------------- ### UnrealIRCd Channel Mode +f Example Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html This example demonstrates the usage of the UnrealIRCd channel mode +f for flood protection. It shows how to set limits for joins, messages, and nickchanges within a specific time frame, and the resulting channel modes (+i, +m, +N) applied when limits are exceeded. ```IRC Log *** ChanOp sets mode: +f [10j]:15 *** Evil1 (~fdsdsfddf@Clk-17B4D84B.blah.net) has joined #test *** Evil2 (~jcvibhcih@Clk-3472A942.xx.someispcom) has joined #test *** Evil3 (~toijhlihs@Clk-38D374A3.aol.com) has joined #test *** Evil4 (~eihjifihi@Clk-5387B42F.dfdfd.blablalba.be) has joined #test -- snip XX lines -- *** Evil21 (~jiovoihew@Clk-48D826C3.e.something.org) has joined #test -server1.test.net:#test *** Channel joinflood detected (limit is 20 per 15 seconds), putting +i *** server1.test.net sets mode: +i fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl fsdjfdshfdkjfdkjfdsgdskjgsdjgsdsdfsfdujsflkhsfdl -- snip XX lines -- -server1.test.net:#test *** Channel msg/noticeflood detected (limit is 50 per 15 seconds), putting +m *** server1.test.net sets mode: +m *** Evil1 is now known as Hmmm1 *** Evil2 is now known as Hmmm2 *** Evil3 is now known as Hmmm3 *** Evil4 is now known as Hmmm4 *** Evil5 is now known as Hmmm5 *** Evil6 is now known as Hmmm6 *** Evil7 is now known as Hmmm7 *** Evil8 is now known as Hmmm8 -server1.test.net:#test *** Channel nickflood detected (limit is 7 per 15 seconds), putting +N *** server1.test.net sets mode: +N ``` -------------------------------- ### Spamfilter Example: Gline on Channel/Private Message Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html An example of adding a spamfilter that applies a gline to users whose messages match a specific phrase in either channel or private messages. ```irc-commands /spamfilter add pc gline - - Come watch me on my webcam ``` -------------------------------- ### IRC JOIN Command Examples Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Demonstrates various ways to use the JOIN command to connect to IRC channels, including joining multiple channels, using channel keys, and leaving all channels. ```irc JOIN #foo,&bar fubar JOIN #foo,#bar fubar,foobar JOIN #foo,#bar JOIN 0 :WiZ!jto@tolsun.oulu.fi JOIN #Twilight_zone ``` -------------------------------- ### IRC INVITE Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Demonstrates the usage of the INVITE command in IRC to invite a user to a channel. It shows both the server-to-client message format and the client command format. ```IRC Protocol :Angel!wings@irc.org INVITE Wiz #Dust ; Message to WiZ when he has been invited by user Angel to channel #Dust INVITE Wiz #Twilight_Zone ; Command to invite WiZ to #Twilight_zone ``` -------------------------------- ### WHOWAS Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Provides examples for the WHOWAS command, used to query historical nickname information. It demonstrates fetching all history for a nickname, a limited number of recent entries, and history from a specific server. ```IRC Protocol WHOWAS Wiz ; return all information in the nick history about nick "WiZ"; WHOWAS Mermaid 9 ; return at most, the 9 most recent entries in the nick history for "Mermaid"; WHOWAS Trillian 1 *.edu ; return the most recent history for "Trillian" from the first server found to match "*.edu". ``` -------------------------------- ### IRC PART Command Examples Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Illustrates the usage of the PART command to leave IRC channels, with examples showing how to leave single or multiple channels and include a custom part message. ```irc PART #twilight_zone PART #oz-ops,&group5 :WiZ!jto@tolsun.oulu.fi PART #playzone :I lost ``` -------------------------------- ### Spamfilter Example: Block with Regex Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html An example of adding a spamfilter that blocks messages matching a regular expression, such as a URL pattern. ```irc-commands /spamfilter add pc block - - come to irc\..+\..+ ``` -------------------------------- ### IRC NICK Command Examples Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Examples demonstrating the NICK command in IRC, used for setting or changing a user's nickname. It shows both introducing a new nickname and a server message indicating a nickname change. ```IRC Protocol NICK Wiz ; Introducing new nick "Wiz" if session is still unregistered, or user changing his nickname to "Wiz" ``` ```IRC Protocol :WiZ!jto@tolsun.oulu.fi NICK Kilroy ; Server telling that WiZ changed his nickname to Kilroy. ``` -------------------------------- ### IRC SQUIT Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Illustrates the SQUIT command, used by operators to disconnect server links. It shows the command syntax and examples of its usage for terminating server connections. ```irc SQUIT tolsun.oulu.fi :Bad Link ? ``` ```irc :Trillian SQUIT cm22.eng.umd.edu :Server out of control ``` -------------------------------- ### WHO Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Demonstrates the usage of the WHO command in IRC to query users matching a specific pattern. It shows how to list all users matching '*.fi' and how to list operators matching 'jto*'. ```IRC Protocol WHO *.fi ; Command to list all users who match against "*.fi". WHO jto* o ; Command to list all users with a match against "jto*" if they are an operator. ``` -------------------------------- ### IRC JOIN Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Shows how to use the JOIN command to request listening to a specific channel on an IRC server. It includes syntax for joining a channel with and without a key, and a special command to leave all channels. ```irc JOIN #foobar ``` ```irc JOIN &foo fubar ``` -------------------------------- ### IRC PRIVMSG Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Provides examples of the PRIVMSG command for sending private messages between IRC users and to channels. It showcases various addressing methods, including direct nicknames, hostmasks, and server-specific targets. ```IRC Protocol :Angel!wings@irc.org PRIVMSG Wiz :Are you receiving this message ? ; Message from Angel to Wiz. PRIVMSG Angel :yes I'm receiving it ! ; Command to send a message to Angel. PRIVMSG jto@tolsun.oulu.fi :Hello ! ; Command to send a message to a user on server tolsun.oulu.fi with username of "jto". PRIVMSG kalt%millennium.stealth.net@irc.stealth.net :Are you a frog? ; Message to a user on server irc.stealth.net with username of "kalt", and connected from the host millennium.stealth.net. ``` -------------------------------- ### IRC KICK Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Illustrates the KICK command used to remove a user from an IRC channel. Examples cover basic kicks and kicks with a reason (comment), showing both client command and server-generated message formats. ```IRC Protocol KICK &Melbourne Matthew ; Command to kick Matthew from &Melbourne KICK #Finnish John :Speaking English ; Command to kick John from #Finnish using "Speaking English" as the reason (comment). :WiZ!jto@tolsun.oulu.fi KICK #Finnish John ; KICK message on channel #Finnish from WiZ to remove John from channel ``` -------------------------------- ### IRC MODE command examples Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Demonstrates the usage of the MODE command in IRC for setting channel bans and exceptions, listing exception masks, and identifying channel creators. ```IRC MODE #bu +be *!*@*.edu *!*@*.bu.edu ; Comment to prevent any user from a ; hostname matching *.edu from joining, ; except if matching *.bu.edu MODE #meditation e ; Command to list exception masks set for the channel "#meditation". MODE #meditation I ; Command to list invitations masks set for the channel "#meditation". MODE !12345ircd O ; Command to ask who the channel creator for "!12345ircd" is ``` -------------------------------- ### Configure stunnel for SSL IRC Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html This configuration example for stunnel (version 4.x) sets up a client to forward traffic to an IRC server's SSL port. It listens on a local address and port, encrypts the traffic, and connects to the specified IRC server and SSL port. ```INI client = yes [irc] accept = 127.0.0.1:6667 connect = irc.myserv.com:6697 ``` -------------------------------- ### IRC SUMMON Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Used to invite users on a host running an IRC server to join IRC. It can take a user parameter and optionally a target and channel. ```IRC SUMMON [ [ ] ] ``` -------------------------------- ### IRC PRIVMSG Command Examples Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Demonstrates the PRIVMSG command usage in IRC for sending messages to users on the same server, specific users with host information, servers matching a wildcard, and all users from a specific domain. ```irc PRIVMSG kalt%millennium.stealth.net :Do you like cheese? ; Message to a user on the local server with username of "kalt", and connected from the host millennium.stealth.net. PRIVMSG Wiz!jto@tolsun.oulu.fi :Hello ! ; Message to the user with nickname Wiz who is connected from the host tolsun.oulu.fi and has the username "jto". PRIVMSG $*.fi :Server tolsun.oulu.fi rebooting. ; Message to everyone on a server which has a name matching *.fi. PRIVMSG #*.edu :NSFNet is undergoing work, expect interruptions ; Message to all users who come from a host which has a name matching *.edu. ``` -------------------------------- ### Local Spamfilter Configuration Block Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html An example of how to define a local spamfilter within the UnrealIRCd configuration file using a 'spamfilter' block. ```unrealircd-conf spamfilter { regex "//write \$decode\(.+\|.+load -rs"; target { private; channel; }; reason "Generic $decode exploit"; action block; }; ``` -------------------------------- ### IRC MOTD Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Shows how to use the MOTD command to retrieve the 'Message Of The Day' from a specified server or the current server if no target is provided. Wildcards are supported in the target parameter. ```irc Command: MOTD Parameters: [ ] The MOTD command is used to get the "Message Of The Day" of the given server, or current server if is omitted. Wildcards are allowed in the parameter. Numeric Replies: RPL_MOTDSTART RPL_MOTD RPL_ENDOFMOTD ERR_NOMOTD ``` -------------------------------- ### IRC VERSION Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt Illustrates the VERSION command for querying the version of an IRC server. It can be used to check the local server's version or a remote server's version by specifying a target. ```irc Command: VERSION Parameters: [ ] The VERSION command is used to query the version of the server program. An optional parameter is used to query the version of the server program which a client is not directly connected to. Wildcards are allowed in the parameter. Numeric Replies: ERR_NOSUCHSERVER RPL_VERSION Examples: VERSION tolsun.oulu.fi ; Command to check the version of server "tolsun.oulu.fi". ``` -------------------------------- ### Configure SSL Session Renegotiation by Bytes Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html Sets the number of bytes after which an SSL session should be renegotiated. For example, '20m' for 20 megabytes. ```go set::ssl::renegotiate-bytes ; ``` -------------------------------- ### Regex: Character Class Assertions Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html Provides examples of common character class assertions for digits, whitespace, and word characters, including their negated forms. ```regex \b ``` ```regex \B ``` ```regex \d ``` ```regex \D ``` ```regex \s ``` ```regex \S ``` ```regex \w ``` ```regex \W ``` -------------------------------- ### Extended ban: Quiet (~q) Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html This example uses the extended ban type '~q' to quiet users. Users matching `~q:*!*@blah.blah.com` can join the channel but cannot speak unless they have voice (+v) or higher privileges. ```irc ~q:*!*@blah.blah.com ``` -------------------------------- ### IRC RESTART Command Example Source: https://github.com/fluffle/goirc/blob/master/doc/rfc2812.txt An optional administrative command used by an operator to restart the server. It must be processed by the connected server and not passed to other servers. It does not require any parameters. ```IRC RESTART ``` -------------------------------- ### UnrealIRCd Help Block Configuration Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html Allows the creation of custom help entries for the /helpop command in UnrealIRCd. The 'help' directive specifies the parameter for /helpop, and subsequent lines define the text displayed to the user. ```UnrealIRCd Config help { ; ; ...; }; ``` -------------------------------- ### Configure +f mode for join floods with auto-unset Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html This example shows how to set the +f mode to protect against join floods. It specifies that if more than 20 joins occur within 15 seconds, the channel will be set to +i (invite-only) for 10 minutes. ```irc +f [20j#i10]:15 ``` -------------------------------- ### Configure Server Options Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html Sets various server options, including email addresses for kline/gline requests, default modes on connection and oper, and host definitions for local and global operators. ```unrealircd set { kline-address my@emailaddress.com; auto-join #welcome; options { hide-ulines; }; hosts { local LocalOp.MyNet.com; global globalop.mynet.com; }; }; set { options { hide-ulines; no-stealth; }; }; ``` -------------------------------- ### Configure +f mode for nick change floods with auto-unset Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html This example demonstrates configuring the +f mode to protect against nick change floods. It sets the channel to +N (no nick changes) for 15 minutes if more than 10 nick changes occur within 15 seconds. ```irc +f [10n#N15]:15 ``` -------------------------------- ### Configure +f mode for message floods with auto-unset Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html This example demonstrates configuring the +f mode to protect against message floods. It sets the channel to +m (moderated) for 10 minutes if more than 50 messages are sent within 15 seconds. ```irc +f [50m#m10]:15 ``` -------------------------------- ### Include Configuration Files Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html The include directive allows loading external configuration files. It supports wildcards for loading multiple files and can be used to organize settings like network configurations or service aliases. ```UnrealIRCd Config include ; ``` ```UnrealIRCd Config include mynetwork.network; ``` ```UnrealIRCd Config include aliases/ircservices.conf ``` -------------------------------- ### Ban on cloaked IP with partial match Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html This example shows how to ban a user based on their cloaked IP address. Banning `*!*@*.8FC6128B.303AEBC6.IP` will ban all users whose cloaked IP ends with `.8FC6128B.303AEBC6.IP`, effectively targeting a range of IP addresses. ```irc *!*@*.8FC6128B.303AEBC6.IP ``` -------------------------------- ### Get DNS Cache Information Source: https://github.com/fluffle/goirc/blob/master/doc/unreal32docs.html The DNS command provides information about the IRC server's DNS cache. Users may need to use the '/raw DNS' command if their client has a built-in DNS command. Opers can use '/raw DNS l' to list cache entries. ```irc dns