IRC Commands: Difference between revisions
From PurpleIRC Wiki
Cnaudeadmin (talk | contribs) |
Cnaudeadmin (talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
commands: | commands: | ||
list: | list: | ||
modes: '*' <font color="#0000FF"><= User must have matching IRC mode to run this command. The * indicates any mode.</font> | [[IRC_Modes|modes]]: '*' <font color="#0000FF"><= User must have matching IRC mode to run this command. The * indicates any mode.</font> | ||
private: false <font color="#0000FF"><= The bot will respond to commands in private if this is true.</font> | private: false <font color="#0000FF"><= The bot will respond to commands in private if this is true.</font> | ||
ctcp: false <font color="#0000FF"><= The bot will respond with a CTCP message if this is true.</font> | ctcp: false <font color="#0000FF"><= The bot will respond with a CTCP message if this is true.</font> | ||
Line 25: | Line 25: | ||
commands: | commands: | ||
lag: | lag: | ||
modes: '*' | [[IRC_Modes|modes]]: '*' | ||
private: false | private: false | ||
ctcp: false | ctcp: false | ||
Line 32: | Line 32: | ||
channel_listen: true | channel_listen: true | ||
gamemode: | gamemode: | ||
modes: 'o' <font color="#0000FF"><= Example command that requires IRC user to have channel ops.</font> | [[IRC_Modes|modes]]: 'o' <font color="#0000FF"><= Example command that requires IRC user to have channel ops.</font> | ||
private: false | private: false | ||
ctcp: false | ctcp: false | ||
Line 38: | Line 38: | ||
private_listen: true | private_listen: true | ||
channel_listen: true | channel_listen: true | ||
user_masks: | |||
- user!user@example.com <font color="#0000FF"><= Use IRC style host masks for additional security.</font> | |||
== Samples == | == Samples == | ||
See the sample bot files that are created on start up for more example commands. The file will also list all built-in commands. | See the sample bot files that are created on start up for more example commands. The file will also list all built-in commands. |
Latest revision as of 16:29, 27 September 2015
There are a number of built-in commands available to the IRC bot. In addition, an almost unlimited number of custom commands are possible. Commands are all configured in the commands
section of the bot yml file.
Command Prefix
The default command prefix is configured per bot. The option command-prefix
sets the prefix. The default value is a dot.
command-prefix: '.'
Built-in Commands
Built-in commands are denoted by an @
. This is not to be confused the command prefix. Example command.
commands:
list:
modes: '*' <= User must have matching IRC mode to run this command. The * indicates any mode.
private: false <= The bot will respond to commands in private if this is true.
ctcp: false <= The bot will respond with a CTCP message if this is true.
game_command: '@list' <= The command that should be executed. In this example @list is PurpleIRC built-in command for listing online players.
private_listen: true <= If this is true then the bot will respond to commands sent via private message.
channel_listen: true <= If this is true then the bot will respond to commands sent publicly in its channel.
sender: 'CONSOLE' <= The name of the sender that executes the command. Replace with %NICK%
to use the IRC user's nickname instead of CONSOLE.
Custom Commands
Custom commands are passed to the game via the console.
commands: lag: modes: '*' private: false ctcp: false game_command: lag <= Non built-in commands are written exactly as they are typed in the console. private_listen: true channel_listen: true gamemode: modes: 'o' <= Example command that requires IRC user to have channel ops. private: false ctcp: false game_command: gamemode %ARGS% <= Example command that accepts arguments. private_listen: true channel_listen: true user_masks: - user!user@example.com <= Use IRC style host masks for additional security.
Samples
See the sample bot files that are created on start up for more example commands. The file will also list all built-in commands.