FlexHub Forum

Feature showroom - Textcommands

Offline FlipFlop™

  • FlexHub Developer
  • *****
  • 505
Feature showroom - Textcommands
« on: August 15, 2010, 11:44:32 »
Another useful feature in FlexHub is the use of textcommands. With textcommands you can add/modify all kinds of hubspecific commands like !motd !rules and !welcome etc.

Here's how it can be done:

    !addcmd <name> [-p<profilelevel>] [-o<options>] [-h"<helptext>"] "<text>"

      <profilelevel>   A number in the range from -1 (User) to 10 (Hubowner)
      <options>      A number created by adding the values of the following options:

         1   Display text in PM instead of mainchat
         2   Show text to all
         4   Show text when user logged in (welcome messages/rightclicks)
         8   Don't allow the command to be activated in mainchat (useful in combination with 4)
         16   Do not create an item in !help for this command (forced when 8 is used)
         32   Do not create a rightclick item for this command (forced when 8 is used)
         64   Text should be send in raw format instead of mainchat/pm (useful to send custom rightclicks)
         128   Only send to ADC user(s)
         256   Only send to NMDC user(s)

      <helptext>   Helptext to show in !help and display in rightclick usercommands


Examples:


!addcmd welcome -p-1 -o44 "Welcome to FlexHub svn: %[svn] - Supporting ADC and NMDC protocol. Made by FlipFlop and Daywalker"

   Settings for textcommand: welcome
   ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
   Profilelevel: -1

   Options: 44
      * Shows text when user logged in
      * Doesn't allow the command to be activated in mainchat
      * Doesn't create a rightclick item for this command

   Text: Welcome to FlexHub svn: %[svn] - Supporting ADC and NMDC protocol. Made by FlipFlop and Daywalker

!addcmd rules -p-1 -o1 "FlexHub rules"

   Settings for textcommand: rules
   ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
   Profilelevel: -1

   Options: 1
      * Displays text in PM instead of mainchat

   Text: FlexHub rules



There are a number of %[] fields that can be used, for dynamic display of data in the text. A list of those will follow later.
« Last Edit: August 15, 2010, 11:46:56 by FlipFlop™ »
Check the new FlexHubList!           Add awesome statistics like this for your hub!

This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.