IRC Commands: Difference between revisions

From PurpleIRC Wiki
(Created page with "There are a number of built-in commands available to the IRC bot. In addition, an almost unlimited number of custom commands are possible. == Command Prefix == The default...")
 
No edit summary
Line 8: Line 8:


== Built-in Commands ==
== Built-in Commands ==
Built-in commands are denoted by an <code>@</code>. 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 publicaly in its channel.
        sender: 'CONSOLE'      <= The name of the sender that executes the command. Replace with <code>%NICK%</code> 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. Use <code>%ARGS%</code> to pass arguments to the command.
== 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.
        private_listen: true
        channel_listen: true

Revision as of 20:48, 8 June 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.

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 publicaly 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. Use %ARGS% to pass arguments to the command.

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.

       private_listen: true
       channel_listen: true