Closed Ionaru closed 10 years ago
What version of Towny and Bukkit are you running?
I had a look at the TownyChat API. It is not possible for PurpleIRC to distinguish between player chat and towny chat. The TownyChatEvent does not cancel the regular chat event. Thus all TownyChat messages will be sent to IRC. You will want to ask the TownyChat developer to hook into PurpleIRC.
Actually it looks like it might work. Ill have a test version soon.
Please try this version https://dl.dropboxusercontent.com/u/30679730/dist/PurpleIRC.jar and let me know if it works for you. If it it does not work correctly enable debug mode and send me the log output via pastebin.
I'm using Towny 0.84.0.0 and it's respective TownyChat version (0.40) Running MCPC+ 577 Craftbukkit 1.5.2 - R1.1
The town chat still shows up in the IRC.
Town chat:
2013-12-22 23:16:38 [INFO] [TownyChat] onPlayerChat: Processing directed message for town
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] Player Ionaru has permission irc.message.gamechat
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] mcMMO is not enabled
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] No Factions
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] [game-chat] => #SaturnServer => TEST
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] Tokenizing Ionaru(O: true)
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] getWorldAlias: worldName => world
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] getWorldAlias: alias => W
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] getWorldColor: worldName => world
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] getWorldColor: color => §2
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] [P]Raw message: §r%DISPLAYNAME%§r:%GROUPSUFFIX% %MESSAGE%
2013-12-22 23:16:38 [INFO] [PurpleIRC] [DEBUG] Entering aysncIRCMessage
2013-12-22 23:16:38 [INFO] [[0;32;22mW[0;37;1m][0;37;1m[[0;36;22mTC[0;37;1m]Chief Ionaru[0;37;1m:[0;36;22m TEST[m
Staff chat:
2013-12-22 23:16:41 [INFO] [TownyChat] onPlayerChat: Processing directed message for admin
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] [0]: queueAndSend message detected
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] Player Ionaru has permission irc.message.gamechat
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] [blockingIRCMessage] About to send IRC message to #SaturnServer
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] mcMMO is not enabled
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] [blockingIRCMessage] Message sent to #SaturnServer
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] No Factions
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] [game-chat] => #SaturnServer => TEST
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] Tokenizing Ionaru(O: true)
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] getWorldAlias: worldName => world
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] getWorldAlias: alias => W
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] getWorldColor: worldName => world
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] getWorldColor: color => §2
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] [P]Raw message: §r%DISPLAYNAME%§r:%GROUPSUFFIX% %MESSAGE%
2013-12-22 23:16:41 [INFO] [PurpleIRC] [DEBUG] Entering aysncIRCMessage
2013-12-22 23:16:41 [INFO] [[0;32;22mW[0;37;1m][0;37;1m[[0;36;1mStaff[0;37;1m]Ionaru[0;37;1m:[0;36;1m[3m TEST[m
Normal chat:
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] Player Ionaru has permission irc.message.gamechat
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] mcMMO is not enabled
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] No Factions
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] [game-chat] => #SaturnServer => no
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] Tokenizing Ionaru(O: true)
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] getWorldAlias: worldName => world
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] getWorldAlias: alias => W
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] getWorldColor: worldName => world
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] getWorldColor: color => §2
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] [P]Raw message: §r%DISPLAYNAME%§r:%GROUPSUFFIX% %MESSAGE%
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] Entering aysncIRCMessage
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] [0]: queueAndSend message detected
2013-12-22 23:16:16 [INFO] [PurpleIRC] [DEBUG] [blockingIRCMessage] About to send IRC message to #SaturnServer
2013-12-22 23:16:16 [INFO] [[0;32;22mW[0;37;1m][0;37;1m[[0;31;22mOwner[0;37;1m][0;31;22m~[3mIon[0;31;1m[m[0;37;1m: [0;31;1mno[m
I just updated to 1.6.4 with MCPC+ version 1.6.4-R2.1, and it's still doing the same thing.
Can I see your startup log and bot yml file? Please use pastebin if possible. Please also make sure you are using the very latest dev version. I've spent quite a bit of time fixing the townychat support. Feel free to join us on #PurpleIRC on espernet.
One more thing. With the latest version you can remove game-chat from your bot yml messages list.
Oh sorry it sounds like you want global chat in IRC and towny chat not in IRC. With the latest version you can use game-chat for global chat. The townychat won't appear in IRC unless you use the town-chat mesage type.
Can I see the startup log? Pleas make sure you are using the very latest version which is https://dl.dropboxusercontent.com/u/30679730/dist/PurpleIRC.jar
I am running the latest version (2.1.5-Snapshot2). As you can see in the channel it doesn't recognize Towny channels in the chat. It should replace %TOWNYCHANNEL% with the correct channel, but it doesn't.
Can I see your latest config.yml as well?
Remove %TOWNYCHANNEL% from game-chat. The game-chat template is only used for non townychat messages. All townychat messages should be going through town-channel-chat template. It appears the plugin is not properly hooking into your townychat plugin. Can I see the full startup log? You also mention this is MCPC. What mods are you running? Is it Tekkit? I can setup a test server if I know exactly what you are running.
Here's the server files I use: https://dl.dropboxusercontent.com/u/43514962/Technolution%20Server%20%281.6.4%29.zip
I will upload a startup log when I get home from college. But watch out, it will make you cry. xD
Here's my bot .yml as well. http://pastebin.com/ZsRMP1RD
Startup log: http://pastebin.com/57fUwpzB
It looks like TownyChat is not loading correctly.
2014-01-06 17:00:47 [INFO] [TownyChat] Enabling TownyChat v0.4
2014-01-06 17:00:47 [SEVERE] Error occurred while enabling TownyChat v0.4 (Is it up to date?)
java.lang.IllegalArgumentException: No enum constant com.palmergames.bukkit.TownyChat.channels.channelTypes.LOCAL
at java.lang.Enum.valueOf(Enum.java:236)
at com.palmergames.bukkit.TownyChat.channels.channelTypes.valueOf(channelTypes.java:4)
at com.palmergames.bukkit.TownyChat.config.ConfigurationHandler.loadChannels(ConfigurationHandler.java:77)
at com.palmergames.bukkit.TownyChat.Chat.load(Chat.java:87)
at com.palmergames.bukkit.TownyChat.Chat.onEnable(Chat.java:64)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:467)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:383)
at org.bukkit.craftbukkit.v1_6_R3.CraftServer.loadPlugin(CraftServer.java:277)
at org.bukkit.craftbukkit.v1_6_R3.CraftServer.enablePlugins(CraftServer.java:259)
at net.minecraft.server.MinecraftServer.func_71243_i(MinecraftServer.java:525)
at net.minecraft.server.MinecraftServer.func_71222_d(MinecraftServer.java:489)
at net.minecraft.server.MinecraftServer.func_71247_a(MinecraftServer.java:432)
at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:224)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:634)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
Townychat works normally in-game though. It's also the latest version.
What happens when you type /tc ?
Also what happens when you type /pl ?
/tc switches the channel to town-chat
/pl lists all plugins, townychat is green (enabled)
Okay I have an idea... I'll have a new version for you to try soon. In the meantime can I see your townychat config files? I'm trying to replicate this on my mcpc server.
Hi! i have the same problem i think. both towny chat and purpleirc loads and it is Enabling TownyChat support. but i cant get the bot to use the - towny-chat tag or any other towny tag but the - game-chat works.
i use spigot version git-Spigot-1248 (MC: 1.7.2) townychat 0.40 purpleirc v2.1.6 for 1.7.2 Jan 11, 2014
virresss, Please enable dbug mode with "/irc debug t" and send me the output from your server.log. It should print useful information when you try to chat.
In that last pastebin what was the name of the town channel you were chatting in? What was the message?
I believe I found the issue.
For each Town channel that you want to relay to IRC you will need to add a setting for that channel in TownyChat. Edit your "plugins/Towny/settings/Channels.yml" file and "hooked: true" for each channel.
See: http://dev.bukkit.org/bukkit-plugins/purpleirc/pages/faq/
It's working! \o/ Thank you so much for all the help.
Now is there a way to hide the bot's nickname in IRC?
What do you mean hide the nick? Talking about the "/irc list" command?
I mean when a message from my server comes through, it always has RelayBot in front of the chat.
Can you show me a screenshot of what you are referring to?
That's controlled by your IRC client. There is nothing that can be done from plugin.
okey, thanks anyway ;)
I am using Towny's chat system (TownyChat) on my server and I was wondering if there is a way to hide the internal town communication from the IRC. Global, staff and town/nation chat all seem to be going through the game-chat IRC channel.
The issue: town, nation, staff and local chat all show up as public chat in the IRC client.