Topic Masking Guide
m (→Locking Your Topic Mask) |
m (→Changing Your Topic Mask) |
||
Line 58: | Line 58: | ||
== Changing Your Topic Mask == | == Changing Your Topic Mask == | ||
- | + | To change your topic mask, simply use ChanServ's SET command with the TOPICMASK option, as we did earlier in this guide. However, if you locked your topic, you will first need to change your ENFTOPIC level back to at least 500. Once you have done this, you'll be able to change the topic mask. When through, you can change it back to 501. | |
== Confused? == | == Confused? == |
Revision as of 10:55, 13 February 2009
Topic masks allow you to set a specific pattern that ChanServ will force all topics to follow. However, 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 feature.
In This Guide: |
Wildcards
A wildcard is a character that may be substituted 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 wildcards in channel bans, it is essentially the same concept.
For simplicity, and the purpose of this guide, we will only be concerned with the multi-character wildcard (*).
Now, let's take a look at an example.
In Linux, to delete a file, you might execute the following command:
rm OldNotes.*
In the example above, the system would delete all files called OldNotes that had any extension. Thus OldNotes,png, 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 apply them to topic masking.
Say, for example, we wanted our channel's topic to be:
Welcome to the DareNET IRC Network's Main Channel. NEWS: Check out us out on the web @ http://www.darenet.org
We would like to prevent everything before NEWS: from being changed, but allow anything to be added after it whenever someone uses ChanServ's TOPIC command. This is where topic masking comes in.
To illustrate what we mean, here's an example:
<SomeOp> .topic Welcome JoeCool to staff! * ChanServ changes topic to Welcome to the DareNET IRC Network's Main Channel. NEWS: Welcome JoeCool to staff!
Notice that the topic remained the same, except for the part after NEWS:, which was replaced with what SomeOp typed. This method of topic alteration is what we refer to as topic masking. So, how did we acheive this? Well, we took advantage of the wildcard *
to set our topic mask in the way that would satisfy our needs.
Using ChanServ's SET command with the TOPICMASK option, we set the following topic mask:
.SET TOPICMASK Welcome to the DareNET IRC Network's Main Channel. NEWS: *
Notice, we used the multi-character wildcard *
after NEWS:, which basically means allow anything here.
Locking Your Topic Mask
As the channel owner, you may notice that even though a topic mask has been set for your channel, changing your topic still replaces the entire message. This is not a bug! ChanServ, by default, grants the channel owner override for changing the topic, which allows you to change it in its entirety. There is, however, a way around this. As channel owner, you can tell ChanServ that you do not want to override the topic mask, that, in fact, you want to AWLAYS use the wildcard.
To acheive this, issue the following command:
.SET ENFTOPIC 501
We have chosen to set ENFTOPIC (short for "enforce topic") to 501, this is 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 our own. This will keep the topic in tact, and only allow us to change the wildcard portion of the topic mask (*).
Your topic should now be locked, and using ChanServ's TOPIC command should put the given string (text) in the topic where your wildcard (*) was placed, as in our example earlier in this guide. You can view your current TOPICMASK and ENFTOPIC level by using ChanServ's SET command. For example, .SET
Changing Your Topic Mask
To change your topic mask, simply use ChanServ's SET command with the TOPICMASK option, as we did earlier in this guide. However, if you locked your topic, you will first need to change your ENFTOPIC level back to at least 500. Once you have done this, you'll be able to change the topic mask. When through, you can change it 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.