Civcraft / JukeAlert

Do not open issues here; open them on the maintained fork @ DevotedMC
https://github.com/DevotedMC/JukeAlert
BSD 3-Clause "New" or "Revised" License
5 stars 15 forks source link

Make /jamute persistent #15

Closed rourke750 closed 9 years ago

jjj5311 commented 9 years ago

Do we want this to go into database, or seperate flat file?

rourke750 commented 9 years ago

Keep in mysql. On Feb 10, 2015 8:00 PM, "Jacob Jungbluth" notifications@github.com wrote:

Do we want this to go into database, or seperate flat file?

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/JukeAlert/issues/15#issuecomment-73817342.

jjj5311 commented 9 years ago

okay, i am not real familiar with jukealert but will try to look into this tomorrow am

jjj5311 commented 9 years ago

Okay i got it storing everything in the db, just having an issue with returning a set of UUID from sql?

When i run it for some reason it doesnt even seem to enter the try look for this method here

https://github.com/jjj5311/JukeAlert/blob/mute_persist/src/com/untamedears/JukeAlert/storage/JukeAlertLogger.java#L1385-1406

I know the method is being called but it doesnt seem to be doing anything.. not sure if you have any ideas why that wouldnt work?

rourke750 commented 9 years ago

what is the message fired.

On Wed, Feb 11, 2015 at 1:35 PM, Jacob Jungbluth notifications@github.com wrote:

Okay i got it storing everything in the db, just having an issue with returning a set of UUID from sql?

When i run it for some reason it doesnt even seem to enter the try look for this method here

https://github.com/jjj5311/JukeAlert/blob/mute_persist/src/com/untamedears/JukeAlert/storage/JukeAlertLogger.java#L1385-1406

I know the method is being called but it doesnt seem to be doing anything.. not sure if you have any ideas why that wouldnt work?

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/JukeAlert/issues/15#issuecomment-73936633.

jjj5311 commented 9 years ago

Literally nothing, there is no exception, not set returned, and this line to leave the method is never fired either

https://github.com/jjj5311/JukeAlert/blob/mute_persist/src/com/untamedears/JukeAlert/storage/JukeAlertLogger.java#L1404

this never went either

https://github.com/jjj5311/JukeAlert/blob/mute_persist/src/com/untamedears/JukeAlert/storage/JukeAlertLogger.java#L1391

i changed from SQLException to general exception to catch all

I had a log in the first line of the method so i knew it was firing

rourke750 commented 9 years ago

Use jd-gui and check that your code is actually there. Or just try delete and reexport it. On Feb 11, 2015 1:44 PM, "Jacob Jungbluth" notifications@github.com wrote:

Literally nothing, there is no exception, not set returned, and this line to leave the method is never fired either

https://github.com/jjj5311/JukeAlert/blob/mute_persist/src/com/untamedears/JukeAlert/storage/JukeAlertLogger.java#L1404

this never went either

https://github.com/jjj5311/JukeAlert/blob/mute_persist/src/com/untamedears/JukeAlert/storage/JukeAlertLogger.java#L1391

i changed from SQLException to general exception to catch all

I had a log in the first line of the method so i knew it was firing

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/JukeAlert/issues/15#issuecomment-73938405.

erocs commented 9 years ago

I've switched from jd-gui to https://github.com/Konloch/bytecode-viewer.

jjj5311 commented 9 years ago

It shows that it's there and when I put the log back in the beginning it shows up in console

On Wednesday, February 11, 2015, erocs notifications@github.com wrote:

I've switched from jd-gui to https://github.com/Konloch/bytecode-viewer.

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/JukeAlert/issues/15#issuecomment-73944754.

erocs commented 9 years ago

BTW you have potential SQL injection. https://github.com/jjj5311/JukeAlert/blob/mute_persist/src/com/untamedears/JukeAlert/storage/JukeAlertLogger.java#L1387

erocs commented 9 years ago

Wait, you're using parameters, sorry. I should take more time looking at things.

jjj5311 commented 9 years ago

Okay I am not too familiar with sql, what is correct wAy to do that to use

Select uuid from table where muted_groups like %likegroup(variable)%

On Wednesday, February 11, 2015, erocs notifications@github.com wrote:

BTW you have potential SQL injection. https://github.com/jjj5311/JukeAlert/blob/mute_persist/src/com/untamedears/JukeAlert/storage/JukeAlertLogger.java#L1387

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/JukeAlert/issues/15#issuecomment-73946740.

erocs commented 9 years ago

Nah sorry, I didn't look close enough, you're fine as you're using parameterized SQL.

As for why this doesn't run, I don't know either. Is there any Exception whatsoever?

jjj5311 commented 9 years ago

Nope nothing at all, with the initial logging line (not in the repo) it prints that it entered the method and that's it

On Wednesday, February 11, 2015, erocs notifications@github.com wrote:

Nah sorry, I didn't look close enough, you're fine as you're using parameterized SQL.

As for why this doesn't run, I don't know either. Is there any Exception whatsoever?

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/JukeAlert/issues/15#issuecomment-73948141.

erocs commented 9 years ago

Try running the SQL statement directly in your SQL console and see if it works as expected.

jjj5311 commented 9 years ago

I did try before and it worked cause when I had the sql wrong I got exceptions

On Wednesday, February 11, 2015, erocs notifications@github.com wrote:

Try running the SQL statement directly in your SQL console and see if it works as expected.

— Reply to this email directly or view it on GitHub https://github.com/Civcraft/JukeAlert/issues/15#issuecomment-73949412.

jjj5311 commented 9 years ago

Okay I think I got it working now... will post the updates later

jjj5311 commented 9 years ago

17