PDA

View Full Version : Disable /anon or /role


paaco
10-25-2008, 06:50 PM
Would it be hard to make a rule to disable /anon and /role from being used on a server? I have been trying to disable them on my server, but to be honest I'm kind of a noob at C++ and so far I can't disable it completely. The code for /anon /role, etc is pretty confusing looking to me :(

MNWatchdog
10-27-2008, 12:06 AM
Ya, I looked at that piece of code once and about tossed my dinner with how complicated it is.

I suggest you skip trying to modify that section of code and instead modify the sections that set the Anon and Rollplaying flags so they never get set. Should be TONS easier to modify that.

AndMetal
10-27-2008, 12:34 AM
I looked at that piece of code once and about tossed my dinner with how complicated it is.

Do you remember where any of the code was? I'd look at it, but I'm not really sure where it would be off the top of my head.

MNWatchdog
10-27-2008, 03:33 AM
Sorry AM, I have no idea where it was. Not even sure how I came across it.

Since Im not a a proficient C programmer by any means, I probably was just looking around at the code one day and came across it.

paaco
10-27-2008, 04:48 AM
I was told today that setting everyone status to 9 will disable anon and role. However weird that sounds I'm gonna give it a shot and let you know lol. The part of the code I was looking at and messing with is in clientlist.cpp

Adding:
<zones>
<defaultstatus>9</defaultstatus>

</zones>

To your config file, causes all new accounts to start at status 9, so I'm trying it ;p brb with results

paaco
10-27-2008, 04:55 AM
ok however weird this sounds, for whatever reason that actually somewhat works. If you are in the same zone with someone that is anon, they still show up as anonymous. But if you do a /who all it will still show anon by peoples names, but it will also show their class/level/zone.

Even though that halfway works, I don't really like it. If it's a lot of trouble to get rid of anon and roleplay all together though I'll just have to go with that :(


EDIT: I just realized whats going on. You get the same view as a GM would get. Where /who all still shows anon people zones, class, etc. Since you are bumping status up to 9, you are pretty much making that person a GM or Guide or whatever, so they bypass the /anon filter to an extent. Kind of a crappy solution to the problem.

MNWatchdog
10-27-2008, 05:56 AM
I suggest you skip trying to modify that section of code and instead modify the sections that set the Anon and Rollplaying flags so they never get set. Should be TONS easier to modify that.and I repeat.

paaco
10-27-2008, 06:11 AM
Yeah I agree, it is probably the direction I will go. But now I need sleep. If I get it working I'll post code changes here for anyone else wanting to do it.

MNWatchdog
10-28-2008, 12:23 AM
Actually, this sounds like something that should be added as a rule too.

I can see lots of servers wanting this for one reason or another, even non-PvP servers.