James137137 / FactionChat

A Bukkit Plugin that allows internal chat of factions
http://dev.bukkit.org/bukkit-plugins/factionchat/
BSD 3-Clause "New" or "Revised" License
2 stars 7 forks source link

Authme compatibility #12

Closed MithrandirCraft closed 8 years ago

MithrandirCraft commented 8 years ago

Hi! Could you please take a look at this?:

https://github.com/Xephi/AuthMeReloaded/issues/259

Thanks!


Current authme version: 5.2-SNAPSHOT-b660 Faction chat version: 1.9.12-SNAPSHOT Current Minecraft-Spigot version: 1.8.8

James137137 commented 8 years ago

Thanks MithrandirCraft.

Personally I've tried in the past to removed staff chat as it has nothing to do with Factions but I had too many PMs when I removed it.

i'll see if I can quickly fix it now.

James137137 commented 8 years ago

Fixed

James137137 commented 8 years ago

ok It might not be fixed. looking at some of the Hastbin there

James137137 commented 8 years ago

ok Seems my previous changes would have fixed that error too (http://hastebin.com/imoxiwajem.avrasm)

Going to recompile the plugin using

http://dev.bukkit.org/bukkit-plugins/authme-reloaded/files/75-auth-me-5-0-beta3/

sgdc3 commented 8 years ago

@James137137 you should use this: http://ci.xephi.fr/plugin/repository/everything/fr/xephi/authme/5.2-SNAPSHOT/authme-5.2-SNAPSHOT.jar

sgdc3 commented 8 years ago

it's a maven repo, you can add it to the pom file without putting the jar into the libs folder ;)

James137137 commented 8 years ago

Thanks. :D

James137137 commented 8 years ago

I see

fr.xephi.authme.api.API.isAuthenticated(player) is now @Deprecated

What would you suggest I use?

James137137 commented 8 years ago

never mind (fr.xephi.authme.api.NewAPI.)

James137137 commented 8 years ago

ok that's all done. it "should" work find now

MithrandirCraft commented 8 years ago

Wait a sec, this isn't fixed. I can still read the moderator chat when logged out.

James137137 commented 8 years ago

:-(

James137137 commented 8 years ago

Well I have:

if ((myplayer.hasPermission("FactionChat.ModChat") || FactionChat.isDebugger(myplayer.getName())) && AuthMeAPI.isLoggedIn(player))

with fr.xephi.authme.api.NewAPI.getInstance().isAuthenticated(player); to check if logged in

The AuthMe stuff is only enabled if this.getServer().getPluginManager().getPlugin("AuthMe") != null

Could you check this?

sgdc3 commented 8 years ago

Yeah but if I remember well you check if the allowchat option is true or false, can you try to remove this check?

James137137 commented 8 years ago

ok I think I fixed it..... http://jenkins.lolnet.co.nz/job/FactionChat/lastSuccessfulBuild/artifact/target/FactionChat.jar

MithrandirCraft commented 8 years ago

Can I use this build? :3

James137137 commented 8 years ago

yes, bear in mind its a Development build

MithrandirCraft commented 8 years ago

thank you <3 I'll report back.

MithrandirCraft commented 8 years ago

Well... I can still read messages when logged out.

MithrandirCraft commented 8 years ago

Updated affected versions.

James137137 commented 8 years ago

Ok I tested it myself with only AuthMe, Factions (and massiveCore) and FactionChat.

Unregistered could see ModChat Registered yet logout could not see ModChat.

Going to fix this now

James137137 commented 8 years ago

http://jenkins.lolnet.co.nz/job/FactionChat/13/artifact/target/FactionChat.jar

Try that

MithrandirCraft commented 8 years ago

Registred yet logout? Well that's just what I tried, and I could see myself spamming moderator chat with another account while logged out with an OP account. (Maybe I could see it because I'm OP?)

In any case, I'm trying your last build, will report asap.

James137137 commented 8 years ago

make sure it is registered too (altho the new changes should prevent that too)

MithrandirCraft commented 8 years ago

screenshot_1 screenshot_2

Still can read from outside u_u

James137137 commented 8 years ago

this is my /fc mod right?

MithrandirCraft commented 8 years ago

Those results are using the last build you just gave me.

James137137 commented 8 years ago

ok with my test it is blocking correctly. I'll make another build that prints in the console some information. Could you paste it here (when it is being bypassed)?

James137137 commented 8 years ago

@MithrandirCraft

MithrandirCraft commented 8 years ago

Hey James, Xephii passed me a build with a pull request he did on FactionChat.

It works fine with it :) So as long as you apply it, the issue should be fixed.

James137137 commented 8 years ago

ok pulled Thanks @Xephi

James137137 commented 8 years ago

http://jenkins.lolnet.co.nz/job/FactionChat/16/artifact/target/FactionChat.jar

James137137 commented 8 years ago

Closed and fixed. Thanks @MithrandirCraft , @sgdc3, and @Xephi

and everyone from https://github.com/Xephi/AuthMeReloaded/issues/259

James137137 commented 8 years ago

uploaded to dev.bukkit