Log in | Back to darenet.org

Topic Masking Guide

m (Updating category listing)
Line 1: Line 1:
-
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.
+
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.
-
== Wildcards ==
+
==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 wildcard is 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. ChanServ supports the following wildcard characters:
-
A multi-character wildcard is defined by the '''<code>*</code>''' character, while a single-character wildcard is defined by the '''<code>?</code>''' character.
+
* '''*''' - multi-character wildcard
 +
* '''?''' - single-character wildcard
-
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.
+
These two 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's the same concept.
-
For simplicity, and the purpose of this guide, we will only be concerned with the multi-character wildcard (*).
+
For simplicity, we will only use the multi-character wildcard (*) in this guide.
-
'''Now, let's take a look at an example.'''
+
===Example===
In Linux, to delete a file, you might execute the following command:
In Linux, to delete a file, you might execute the following command:
Line 17: Line 18:
<code>rm OldNotes.*</code>
<code>rm OldNotes.*</code>
-
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 '''<code>*</code>''' essentially means anything, OldNotes.anything.
+
The command shown above would delete all files called OldNotes that had any extension. Thus, OldNotes.png, OldNotes.txt, OldNotes.pdf, OldNotes.doc, etc. would be deleted; therefore, the wildcard '''*''' essentially means anything, OldNotes.anything.
-
== Setting Your Channel Topic ==
+
==Setting your channel topic==
-
Now that we understand what wildcards are, and what they do, let's apply them to topic masking.
+
Now that we have a firm grasp of 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:
+
Let's say we wanted to set the following topic on channel #darenet:
-
<font color="red">'''<code>Welcome to the DareNET IRC Network's Main Channel. NEWS: Check out us out on the web @ <nowiki>http://www.darenet.org</nowiki></code>'''</font>
+
<font color="navy">'''<code>Welcome to the DareNET IRC Network's Main Channel. NEWS: Like us on Facebook, http://www.facebook.com/darenet</code>'''</font>
-
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.
+
However, we would also like to prevent everything before '''NEWS:''' from being changed, but allow anything to be added after it whenever someone uses ChanServ's TOPIC command. We can easily do this by using topic masking.
-
To illustrate what we mean, here's an example:
+
To help illustrate what we mean, here's an example:
-
<pre> <SomeOp> .topic Welcome JoeCool to staff!
+
<pre><NiTeMaRe> .topic Happy Holidays!
 +
* ChanServ changes topic to Welcome to the DareNET IRC Network's Main Channel. NEWS: Happy Holidays!</pre>
-
* ChanServ changes topic to Welcome to the DareNET IRC Network's Main Channel. NEWS:  
+
Notice that our topic remained the same, except for the part after '''NEWS:''', which was replaced with what NiTeMaRe typed. This method of topic alteration is what we refer to as topic masking. Cool, right? So how did we achieve this? Well, we took advantage of the wildcard '''*''' to set our topic mask in the way that would satisfy our needs.
-
  Welcome JoeCool to staff!</pre>
+
-
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 '''<code>*</code>''' to set our topic mask in the way that would satisfy our needs.
+
Using ChanServ's SET TOPICMASK command, we set the following topic mask:
-
Using ChanServ's SET command with the TOPICMASK option, we set the following topic mask:
+
<code>/msg ChanServ SET #darenet TOPICMASK Welcome to the DareNET IRC Network's Main Channel. NEWS: *</code>
-
'''<code>.SET TOPICMASK Welcome to the DareNET IRC Network's Main Channel. NEWS: *</code>'''
+
Notice that we used the multi-character wildcard '''*''' after ''NEWS:'', which lets ChanServ know to allow anything here.
-
Notice, we used the multi-character wildcard '''<code>*</code>''' after ''NEWS:'', which basically means allow anything here.
+
==Locking Your Topic==
-
== Locking Your Topic ==
+
As the channel owner, you may have noticed that users on the channel's userlist with an access level of at least 200 can change the channel's topic. You can change the minimum access level needed to change a channel's topic by using ChanServ's SET ENFTOPIC command.
-
As the channel owner, you may notice that a certain level (200) and up by default can set your topic.  Lets say you want only 300 and up to be able to change your topic.
+
Let's say we wanted to restrict topic changes to those with an access level of 300 or above on #darenet, we would use the following command:
-
To acheive this, issue the following command:
+
<code>/msg ChanServ SET #darenet ENFTOPIC 300</code>
-
'''<code>.SET ENFTOPIC 300</code>'''
+
Now ChanServ will only allow those with an access level of at least 300 on #darenet to change the topic. Whenever one of them uses ChanServ's TOPIC command, ChanServ will substitute the given string (text) in the topic where our wildcard was placed, as shown in our earlier example.
-
You have now set the enftopic (short for enforce topic) to 300.
+
You can view the current topic mask and enforce topic level for a channel by using ChanServ's SET command.
-
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, '''<code>.SET</code>'''
+
===Topic snarfing===
-
You may also want to set TOPICSNARF to 501 to prevent your DEFAULTTOPIC from being changed by anyone (including yourself) you can do this via the following command.
+
As the channel owner, you may have noticed that even though you set a topic mask for your channel, changing your topic still replaces the entire message. This is because ChanServ grants you override for changing the topic, allowing you to change it in its entirety. To prevent this, you must tell ChanServ that you do not want to override the topic mask.
-
'''<code>.SET TOPICSNARF 501</code>'''
+
To achieve this, you must set TOPICSNARF level to one higher than your own, such as 501. You can do this by using: <code>.SET TOPICSNARF 501</code>
-
== Confused? ==
+
==Confused?==
-
If you still aren't too sure on how topic masking works after reading this guide, that's okay! Our friendly support staff in #support will be more than happy to answer any questions you may have.
+
If you still aren't too sure on how topic masking works after reading this guide, that's okay! Our support staff in [http://webchat.darenet.org?channels=support #support] will be more than happy to answer any questions you may have.
[[Category:All]] [[Category:Documentation]]
[[Category:All]] [[Category:Documentation]]

Revision as of 13:47, 14 November 2011

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 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. ChanServ supports the following wildcard characters:

  • * - multi-character wildcard
  • ? - single-character wildcard

These two 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's the same concept.

For simplicity, we will only use the multi-character wildcard (*) in this guide.

Example

In Linux, to delete a file, you might execute the following command:

rm OldNotes.*

The command shown above would delete all files called OldNotes that had any extension. Thus, OldNotes.png, OldNotes.txt, OldNotes.pdf, OldNotes.doc, etc. would be deleted; therefore, the wildcard * essentially means anything, OldNotes.anything.

Setting your channel topic

Now that we have a firm grasp of what wildcards are, and what they do, let's apply them to topic masking.

Let's say we wanted to set the following topic on channel #darenet:

Welcome to the DareNET IRC Network's Main Channel. NEWS: Like us on Facebook, http://www.facebook.com/darenet

However, we would also like to prevent everything before NEWS: from being changed, but allow anything to be added after it whenever someone uses ChanServ's TOPIC command. We can easily do this by using topic masking.

To help illustrate what we mean, here's an example:

<NiTeMaRe> .topic Happy Holidays!
* ChanServ changes topic to Welcome to the DareNET IRC Network's Main Channel. NEWS: Happy Holidays!

Notice that our topic remained the same, except for the part after NEWS:, which was replaced with what NiTeMaRe typed. This method of topic alteration is what we refer to as topic masking. Cool, right? So how did we achieve 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 TOPICMASK command, we set the following topic mask:

/msg ChanServ SET #darenet TOPICMASK Welcome to the DareNET IRC Network's Main Channel. NEWS: *

Notice that we used the multi-character wildcard * after NEWS:, which lets ChanServ know to allow anything here.

Locking Your Topic

As the channel owner, you may have noticed that users on the channel's userlist with an access level of at least 200 can change the channel's topic. You can change the minimum access level needed to change a channel's topic by using ChanServ's SET ENFTOPIC command.

Let's say we wanted to restrict topic changes to those with an access level of 300 or above on #darenet, we would use the following command:

/msg ChanServ SET #darenet ENFTOPIC 300

Now ChanServ will only allow those with an access level of at least 300 on #darenet to change the topic. Whenever one of them uses ChanServ's TOPIC command, ChanServ will substitute the given string (text) in the topic where our wildcard was placed, as shown in our earlier example.

You can view the current topic mask and enforce topic level for a channel by using ChanServ's SET command.

Topic snarfing

As the channel owner, you may have noticed that even though you set a topic mask for your channel, changing your topic still replaces the entire message. This is because ChanServ grants you override for changing the topic, allowing you to change it in its entirety. To prevent this, you must tell ChanServ that you do not want to override the topic mask.

To achieve this, you must set TOPICSNARF level to one higher than your own, such as 501. You can do this by using: .SET TOPICSNARF 501

Confused?

If you still aren't too sure on how topic masking works after reading this guide, that's okay! Our support staff in #support will be more than happy to answer any questions you may have.