So in this guide we will show you how to make a functional usergroup.
To start with you need to collect the names of the people you want to be in the usergroup.
For our guide we will use John, David, Steve, Bob and Joe
There are a few ways to specify how the Usergroup will lock on to the person in question. We will show 5 different ways.
So to start with lets create the usergroup brackets. Open your MXC.xml and before the line that says </config> insert this
Code: Select all
<usergroup name="friends" case="0">
</usergroup>
Code: Select all
<usergroup name="friends" case="0">
John
*David
Steve*
*Bob*
*joe*
</usergroup>
The Entries:
John - Now notice John does not have any Stars, this means the name of the person must be exactly the same as the one in the usergroup.
*David - David has a star at the front which means the name can be like this XYZDavid and it would still know it's David.
Steve* - Steves star is at the end so that means his name has to start with Steve but he can have anything after it like SteveXYZ and it will still know its Steve.
*Bob* - Bob has 2 stars which means aslong as he has Bob somewhere in his name (No mater where) it will know its him. his name could look like so: XYZBobXYZ and it would still know its him.
And finally we have joe, You may notice his J is not a capital letter. Why is that? Well in our top tag we have the following:
Code: Select all
<usergroup name="friends" case="0">
So now that you have made the usergroup and set your wild cards lets put the Usergroup to use in a Hello World script. Very simple.
Code: Select all
<usergroup name="friends" case="0">
John
*David
Steve*
*Bob*
*joe*
</usergroup>
<command type="script" usergroup="friends">
<in>hi</in>
<out>Hello World!</out>
</command>
So our users come in the room and lets see how it looks:
John: hi
BOT: Hello World!
XYZDavid: hi
BOT: Hello World!
SteveXYZ: hi
BOT: Hello World!
XYZBobXYZ: hi
BOT: Hello World!
JOE: hi
BOT: Hello World!
All working great, now lets try it with a user who is not in the usergroup:
Jason: hi
And no response, as Jason is not in the Usergroup anywhere. The bot does not reply.
And that is the basics of creating a usergroup. You may post questions in this topic.