cnaude / PurpleIRC

Minecraft Bukkit plugin that provides an IRC bridge. This repo has been archived. Please see https://github.com/cnaude/PurpleIRC-spigot for the latest and greatest PurpleIRC code for Bukkit servers (Spigot, Paper etc...)
20 stars 9 forks source link

Can you add ReportRTS #75

Closed ghost closed 10 years ago

ghost commented 10 years ago

Can you add ReportRTS to work and complete tickets with its most recent update?

https://github.com/ProjectInfinity/ReportRTS

cnaude commented 10 years ago

What does the command section in your bot yml look like for this complete action?

ghost commented 10 years ago
  complete:
    modes: o
    private: 'false'
    game_command: complete %ARGS%
    private_listen: 'true'
    ctcp: 'false'
    channel_listen: 'true'
    perm: ''
ProjectInfinity commented 10 years ago

Which version of ReportRTS are you using @austindkelly (/version ReportRTS)?

ghost commented 10 years ago

[16:25:55 INFO]: ReportRTS version 1.2.2-b187

ProjectInfinity commented 10 years ago

@cnaude can you point me to the line that executes the complete command?

cnaude commented 10 years ago

Line 39 in https://github.com/cnaude/PurpleIRC/blob/master/src/main/java/com/cnaude/purpleirc/CommandQueueWatcher.java

cnaude commented 10 years ago

When I test the complete command from the console I get the same error.

cnaude commented 10 years ago

By the way I am testing this in #PurpleIRC on Espernet if you want to see a live test. :)

ProjectInfinity commented 10 years ago

I think it's related to the commandsender being custom. It might be trying to save the new user but fails to retrieve info cause it doesn't exist as a player or console.

cnaude commented 10 years ago

I'm trying it from the Bukkit console as well and it fails. I'm going to test craftbukkit build instead of spigot and see how that goes.

ProjectInfinity commented 10 years ago

Uh. Are you using the latest development builds?

This is the first I'm hearing about it and the latest versions are in use on many servers.

cnaude commented 10 years ago

version reportrts [16:26:38 INFO]: ReportRTS version 1.2.2-b187 [16:26:38 INFO]: Author: ProjectInfinity complete 20 [16:26:46 INFO]: An error occurred. Reference: Unable to mark request #20 as complete complete 20 test [16:26:51 INFO]: An error occurred. Reference: Unable to mark request #20 as complete version [16:27:04 INFO]: This server is running CraftBukkit version git-Bukkit-1.7.9-R0.2-17-g3833911-b3106jnks (MC: 1.7.10) (Implementing API version 1.7.10-R0.1-SNAPSHOT)

ProjectInfinity commented 10 years ago

@cnaude what is your configuration and could you possibly dump SQL? It doesn't sound likely that it would cause issues, but I'd like to know for sure.

cnaude commented 10 years ago

config.yml: https://gist.github.com/cnaude/109289ae4aedced24eca rts database dump: https://gist.github.com/cnaude/3ec78224aacdad2b87c9

ProjectInfinity commented 10 years ago

As I suspected, I found one bug regarding console creating duplicates but that doesn't affect it's ability to complete a ticket in my test environment.

cnaude commented 10 years ago

I just dropped the database and allowed the plugin to recreate the tables. I'm able to complete via console but not via PurpleIRC. I'll add some additional debug code to PurpleIRC to see what's going on.

ProjectInfinity commented 10 years ago

@cnaude Like I said I am FAIRLY certain it is because you are using a custom sender as opposed to console when dispatching the command. There's no clause added in createUser() for ircCommand.getIRCCommandSender() UNLESS that is ConsoleSender.

I'm unsure how we should work around this because it was designed to first see if the username was CONSOLE, then if not it would go on and attempt to grab the UUID of the player and that's where the problems occur.

cnaude commented 10 years ago

I think I found an easy fix on my end. I tried this and it seemed to work.

@Override public String getName() { return "CONSOLE"; }

ProjectInfinity commented 10 years ago

There you go then. As long as RTS believes it is console sending it, it should treat it as such.

cnaude commented 10 years ago

Latest build has the fix. http://h.cnaude.org:8081/job/PurpleIRC/125/

ghost commented 10 years ago

Confirmed working