FAQ: Difference between revisions
Cnaudeadmin (talk | contribs) No edit summary |
Cnaudeadmin (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
'''A:''' Espernet is bot friendly. See http://esper.net/bots.php for details. | '''A:''' Espernet is bot friendly. See http://esper.net/bots.php for details. | ||
'''Q:''' How do I use TLS? | |||
'''A:''' 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. | '''A:''' 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 | port: 6667 | ||
Line 8: | Line 8: | ||
tls: true | tls: true | ||
'''Q:''' How do I add custom commands? | |||
'''A:''' 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: | gamemode: | ||
modes: 'o' | modes: 'o' | ||
Line 18: | Line 18: | ||
channel_listen: true | channel_listen: true | ||
'''Q:''' How do I set the IRC command prefix? | |||
'''A:''' See the "command-prefix:" in the bot yml file | |||
'''Q:''' How do I join my bot to multiple channels? | |||
'''A:''' In your bot file just add an extra channel like this. | |||
channels: | channels: | ||
'#channel1': | '#channel1': | ||
Line 35: | Line 35: | ||
... | ... | ||
'''Q:''' How do I delete my bot? | |||
'''A:''' Stop the server and then remove the bot yml file. | |||
'''Q:''' How do I put dots in my channel name? | |||
'''A:''' Use %2E instead of a dot. This will be decoded automatically. | |||
channels: | channels: | ||
'#channel%2Etest: | '#channel%2Etest: | ||
Line 48: | Line 48: | ||
... | ... | ||
'''Q:''' How do I prevent non-public faction chat messages from appearing in IRC? | |||
'''A:''' Remove the game-chat from enabled-messages list. Enable faction-public-chat for general chat. | |||
'''Q:''' How do I prevent non-public hero chat messages from appearing in IRC? | |||
'''A:''' 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. | |||
'''Q:''' How do I prevent mcMMO admin chat from appearing in IRC? | |||
'''A:''' 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" | |||
'''Q:''' How do I register my bot with the NICKSERV? | |||
'''A:''' Use the sendraw command. | |||
irc sendraw NickServ REGISTER [Password] [Email Address] | irc sendraw NickServ REGISTER [Password] [Email Address] | ||
irc sendraw NickServ VERIFY REGISTER [Bot Nick] | irc sendraw NickServ VERIFY REGISTER [Bot Nick] | ||
Line 68: | Line 68: | ||
'''Q:''' Why won't my bot load? | |||
'''A:''' There is a likely YAML syntax error. Test your yml file on a [[http://yamllint.com/|YAML validator]]. | |||
'''Q:''' Why won't TownyChat messages relay to IRC? | '''Q:''' Why won't TownyChat messages relay to IRC? | ||
'''A:''' You must set "hooked: true" for each channel in your "plugins/Towny/settings/Channels.yml" file. Example: | '''A:''' You must set "hooked: true" for each channel in your "plugins/Towny/settings/Channels.yml" file. Example: | ||
Line 86: | Line 86: | ||
'''Q:''' Why won't PurpleIRC display Korean characters? | '''Q:''' Why won't PurpleIRC display Korean characters? | ||
'''A:''' You must set "charset: UTF-8" in your "bot.yml" file. Example: | '''A:''' You must set "charset: UTF-8" in your "bot.yml" file. Example: | ||
charset: UTF-8 | charset: UTF-8 | ||
Q Why does my config.yml and/or bot yml lose changes after restart? | Q Why does my config.yml and/or bot yml lose changes after restart? | ||
'''A:''' 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". | '''A:''' 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". |
Revision as of 18:25, 2 August 2015
Q: What IRC network should I use? A: Espernet is bot friendly. See http://esper.net/bots.php for details.
Q: How do I use TLS? A: 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
Q: How do I add custom commands? A: 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
Q: How do I set the IRC command prefix? A: See the "command-prefix:" in the bot yml file
Q: How do I join my bot to multiple channels? A: In your bot file just add an extra channel like this.
channels: '#channel1': autojoin: true modes: password: ... '#channel2': autojoin: true modes: password: ...
Q: How do I delete my bot?
A: Stop the server and then remove the bot yml file.
Q: How do I put dots in my channel name? A: Use %2E instead of a dot. This will be decoded automatically.
channels: '#channel%2Etest: autojoin: true modes: password: ...
Q: How do I prevent non-public faction chat messages from appearing in IRC?
A: Remove the game-chat from enabled-messages list. Enable faction-public-chat for general chat.
Q: How do I prevent non-public hero chat messages from appearing in IRC? A: 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.
Q: How do I prevent mcMMO admin chat from appearing in IRC? A: 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"
Q: How do I register my bot with the NICKSERV? A: 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]
Q: Why won't my bot load? A: There is a likely YAML syntax error. Test your yml file on a [validator].
Q: Why won't TownyChat messages relay to IRC? A: 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'
Q: Why won't PurpleIRC display Korean characters? A: You must set "charset: UTF-8" in your "bot.yml" file. Example:
charset: UTF-8
Q Why does my config.yml and/or bot yml lose changes after restart?
A: 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
Q How do I send a message to the IRC channel on join?
A: Use the raw-message option.
raw-message: 'PRIVMSG #channel :Hi there!' raw-message-on-join: true
Q Will this plugin allow cross server chatting? A: Yes.
Q: Is there an API? A: I have not created any API's yet. However, the IRC messaging methods are public. You should be able to send a message to any channel or user like this.
PurpleIRC pIrc = (PurpleIRC)Bukkit.getPluginManager().getPlugin("PurpleIRC"); for (PurpleBot ircBot : pIrc.ircBots.values()) { ircBot.asyncIRCMessage("#channel", "some message"); }