FAQ

From PurpleIRC
Jump to: navigation, search

What IRC network should I use?

Espernet is bot friendly. See http://esper.net/bots.php for details.

How do I use TLS?

Several IRC networks use the STARTTLS command for switching to TLS. PurpleIRC will auto detect this and switch to TLS if tls is set to true. Typically the port is a non-SSL port like 6667.

port: 6667
ssl: false
tls: true

How do I add custom commands?

See the commands section of the sample bot yml file. In the example below a user on IRC can run the gamemode command and pass it parameters. You can add virtually any command that would work from the console.

     gamemode:
       modes: 'o'
       private: false
       ctcp: false
       game_command: 'gamemode %ARGS%'
       private_listen: true
       channel_listen: true
       perm: 
       sender: CONSOLE
       game_command_usage: 

How do I set the IRC command prefix?

See the "command-prefix:" in the bot yml file

How do I join my bot to multiple channels?

In your bot file just add an extra channel like this.

channels:
 '#channel1':
   autojoin: true
   modes: 
   password: 
   ...
 '#channel2':
   autojoin: true
   modes: 
   password: 
   ...

How do I delete my bot?

Stop the server and then remove the bot yml file.

How do I put dots in my channel name?

Use %2E instead of a dot. This will be decoded automatically.

channels:
 '#channel%2Etest:
   autojoin: true
   modes: 
   password: 
   ...

How do I prevent non-public faction chat messages from appearing in IRC?

Remove the game-chat from enabled-messages list. Enable faction-public-chat for general chat.

How do I prevent non-public hero chat messages from appearing in IRC?

Remove game-chat from your enabled-messages for that bot. Then only enable hero-CHANNELNAME-chat where CHANNELNAME is the name of the hero channel you want to see messages from.

How do I prevent mcMMO admin chat from appearing in IRC?

To disable mcMMO admin chat from appearing in IRC remove mcmmo-admin-chat and game-chat from the enabled-messages section and then do "/irc reloadbotconfigs"

How do I register my bot with the NICKSERV?

Use the sendraw command.

irc sendraw NickServ REGISTER [Password] [Email Address]
irc sendraw NickServ VERIFY REGISTER [Bot Nick] 

If the IRC server does not recognize NickServ commands try the PRIVMSG command.

irc sendraw PRIVMSG NickServ :REGISTER [Password] [Email Address]
irc sendraw PRIVMSG NickServ :VERIFY REGISTER [Bot Nick] 

Why won't my bot load?

There is a likely YAML syntax error. Test your yml file on a YAML validator.

Why won't TownyChat messages relay to IRC?

You must set hooked: true for each channel in your plugins/Towny/settings/Channels.yml file. Example:

channels:
   general:
       commands: [g]
       type: GLOBAL
       channeltag: '&r[&4g&r]'
       messagecolour: '&f'
       permission: 'towny.chat.general'
       craftIRCTag: 'admin'
       hooked:  true
       range: '-1'

Why won't PurpleIRC display Korean characters?

You must set "charset: UTF-8" in your "bot.yml" file. Example:

charset: UTF-8

Why does my config.yml and/or bot yml lose changes after restart?

The plugin saves configurations in memory and then dumps them back to disk after stop. Any time you make changes to config.yml use "/irc reloadconfig". If you make changes to the bot use "/irc reloadbotconfigs".

/irc reloadbotconfigs
/irc reloadconfig

How do I send a message to the IRC channel on join?

Use the raw-message option.

raw-message: 'PRIVMSG #channel :Hi there!'
raw-message-on-join: true

Will this plugin allow cross server chatting?

Yes.

Is there an API?

To send a message to any channel or user:

 PurpleIRC pIrc = (PurpleIRC)Bukkit.getPluginManager().getPlugin("PurpleIRC");
 for (PurpleBot ircBot : pIrc.ircBots.values()) {
   ircBot.asyncIRCMessage("#channel", "some message");
 }

There are two events that fire when users send IRC messages. See the source code for available methods.

  • IRCMessageEvent
  • IRCCommandEvent

How do I enable the custom tab feature?

The custom tab feature requires the ProtocolLib plugin. Install that plugin, set custom-tab-list: true in your config.yml file, and then restart your server. Lastly give your players the irc.tablist permission node.

Can the Forge mod be installed as a client mod?

Yes.

How do I integrate PurpleBungeeIRC and BungeeTabListPlus?

See the BungeeTabListPlus Integration for an example configuration.

How do I integrate with DiscordSRV?

Example channel configuration for DiscordSRV integration. For discord-minecraft-chat message type replace minecraft with your Discord channel name.

channels:
 '#minecraft':
   enabled-messages:
   - discord-minecraft-chat
   - irc-discord-chat
   discord-channel: minecraft