Topic Masking Guide
(New page: Topic masks allow you set a specific pattern that ChanServ will force all topics to match. However, we before we go further into detail, let's talk about wildcards as you will need a firm ...)
Newer edit →
Revision as of 08:03, 5 November 2008
Topic masks allow you set a specific pattern that ChanServ will force all topics to match. However, we before we go further into detail, let's talk about wildcards as you will need a firm understanding of them to effectively use ChanServ's topic masking option.
In This Guide: |
Wildcards
A wildcard is a character that may be subsititued for any of a defined subset of all possible characters. Whether the wildcard character represents a single character or a string of characters must be specified.
A multi-character wildcard is defined by the *
character, while a single-character wildcard is defined by the ?
character.
These wildcards operate in the same fashion as they did in DOS or Unix, if you remember using them in either of these environments. Likewise, if you have ever used them in channel bans, it is essentially the same concept.
For the purposes of this guide, we will only be concerned with the multi-character wildcard (*).
In Linux, to delete a file, you might execute the command:
rm OldNotes.*
In the above example, the system would delete all files called OldNotes that had any extension. Thus OldNotes.jpg, OldNotes.doc, OldNotes.txt and so on would be deleted. Therefore, the wildcard *
essentially means anything, OldNotes.anything.
Setting Your Channel Topic
Now that we understand what wildcards are, and what they do, let's set our channel's topic. Let's say we wanted our topic to be the following:
Welcome to the DareNET IRC Network Main Channel - http://www.darenet.org/ - Join #Support for channel registration and/or staff assistance - NEWS: Updated features coming soon!
Our goal here is to have the topic always remain the same, but allow the part that comes after "NEWS:" to be changed when we issue the .topic
command.
For example, if we issued the following command:
.topic Welcome JoeOper to staff!
The topic will change to:
Welcome to the DareNET IRC Network Main Channel - http://www.darenet.org/ - Join #Support for channel registration and/or staff assistance - NEWS: Welcome JoeOper to staff!
Notice what we typed after .topic
was added after "NEWS:". This method of topic alteration is what we refer to as topic masking. So, how do we achieve this? Well, we can take advantage of the wildcard *
to set our topic mask in the way that would satisfy our needs.
To achieve the above example, we would use the .set topicmask
command to set the following topic mask:
.set topicmask Welcome to the DareNET IRC Network Main Channel - http://www.darenet.org/ - Join #Support for channel registration and/or staff assistance - NEWS: *
Locking Your Topic Mask
As the channel owner, you may notice that even though a topic mask is set for your channel, changing your topic still replaces the entire message. This is because ChanServ grants the channel owner override for changing the topic, which allows you to change it in its entirety. However, this a way around this!
As channel owner, you can tell ChanServ that you do not want to override the topic mask, that you in fact want to always use the wildcard.
To do this, we would issue the following command:
.set enftopic 501
Now, we chose to set enftopic (short for "enforce topic") to 501 because as owner of the channel, you have an access level of 500. Since we always want to use the topic mask, we set enftopic to an access level higher than ourselves, so it will always be used. This will keep the topic in tact, and only allow us to change the wildcard section of the topic mask (*).
Your topic should now be locked, and any .topic
command should put the given string (text) in the topic where your wildcard (*) was placed, as in our example used earlier in this guide.
You see your current topic mask and enftopic level by using the .set
command in your channel.
Changing Your Topic Mask
Before you can change your topic mask (by using the steps shown above), we must first change our enftopic level back to at least 500. Once we have done so, we can then safely change the topic mask. When we're through, we can then set enftopic back to 501.
Confused?
If you are still unsure on how to topic masking operates, feel free to stop by #support and ask. Our support staff will be more than happy to help to you.