helpmebot.org.uk
Jump to: navigation, search
(Updated general description.)
 
Line 1: Line 1:
Stores custom responses for specified triggers.
+
; Available variables
Use of this command requires superuser or higher privileges.
 
  
== Syntax ==
+
You may use the following variables in your message:
'''!learn''' [@action] <trigger> <response>
 
 
 
=== [@action] ===
 
This optional parameter tells HelpMeBot that it should prepend the comment with "/me" so that it appears to do the action.
 
 
 
=== <trigger>===
 
The trigger is the word that you will use to call the action later prepended with "!"
 
 
 
=== Variables for <response> ===
 
You may use the following variables in your <response>:
 
 
* Numbered variables such as '''{0}''', '''{1}''', and '''{2}''' may be used to reflect the input passed to Helpmebot with the command.
 
* Numbered variables such as '''{0}''', '''{1}''', and '''{2}''' may be used to reflect the input passed to Helpmebot with the command.
 
* Numbered variables can also be used like '''{1*}''' to display everything from parameter {1} to the end of the input. <small>Don't forget that numbered variables start at 0 so {1} is the second word.</small>
 
* Numbered variables can also be used like '''{1*}''' to display everything from parameter {1} to the end of the input. <small>Don't forget that numbered variables start at 0 so {1} is the second word.</small>
* '''{accessLevel}''' is the Helpmebot access level of the user calling the command.
 
 
* '''{channel}''' is the full name of the current channel.
 
* '''{channel}''' is the full name of the current channel.
 
* ''{nickname}'''''<big>!</big>'''''{username}'''''<big>@</big>'''''{hostname}'' are three variables that represent the host mask of the user calling the command.
 
* ''{nickname}'''''<big>!</big>'''''{username}'''''<big>@</big>'''''{hostname}'' are three variables that represent the host mask of the user calling the command.
 
** '''{nickname}''' is the user's nick in the channel
 
** '''{nickname}''' is the user's nick in the channel
** '''{username}''' is also known as "ident" on other IRC servers "May represent the [[Command:Decode|hexadecimal representation]] of an IP address"
+
** '''{username}''' is also known as "ident" on other IRC servers.
** '''{hostname}''' this will be the user's cloak if they have one, otherwise it will be the host ISP's name and maybe IPv4 address they are connected from.<!--
+
** '''{hostname}''' this will be the user's cloak if they have one, otherwise it will be the host ISP's name and maybe IPv4 address they are connected from.
* '''{network}''' always returns 3 (at least it should) but is undocumented.-->
 

Latest revision as of 23:47, 7 October 2019

Available variables

You may use the following variables in your message:

  • Numbered variables such as {0}, {1}, and {2} may be used to reflect the input passed to Helpmebot with the command.
  • Numbered variables can also be used like {1*} to display everything from parameter {1} to the end of the input. Don't forget that numbered variables start at 0 so {1} is the second word.
  • {channel} is the full name of the current channel.
  • {nickname}!{username}@{hostname} are three variables that represent the host mask of the user calling the command.
    • {nickname} is the user's nick in the channel
    • {username} is also known as "ident" on other IRC servers.
    • {hostname} this will be the user's cloak if they have one, otherwise it will be the host ISP's name and maybe IPv4 address they are connected from.