DragonPrime - LoGD Resource Community

Coding Support => Coding Support Desk => Topic started by: TGTarheel on January 03, 2018, 12:25:52 AM



Title: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 12:25:52 AM
Is there a module...or could someone help me create a module...that puts all new players on mute until Admin approved?

I have a stalker on my site who is abusing me simply because I am transgender.

I just don't feel I should have to put up with that on a site where I pay for the bandwidth, yaknow?

What I have done in the interim, is changed my settings to require email verification for account creation.  And then I have also added email addresses to the blocker module.

Additionally, I have added IP addresses to the setting in the Brendan Blocker Module.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 02:37:35 AM
Wondering if this could help...

I found a module called newbie Mute that requires them to read the FAQ before unmuting.

here is a code snip

Code:
case "faq-posttoc":
   //comment out in order to require an admin to manually unmute player??
if (!$seen) set_module_pref("seenfaq",true);
break;
Now see my comment in there.
If I commented out the line below...would that cause them to never have the pref in their account set to that they had seen the FAQ?
Then I could MANUALLY alter the pref.  And add a note that they should send a YOM to me to be unmuted?

This is a severe situation ongoing on my site right now...looking for a way to shut this guy down.

The other thing I would like to do is...when commenting that out...have it add in a system email sent to the player informing them to YOM the Admin to be unmuted.

It seems to me like this ought to be able to be done.  Am I on the right track here?


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 03:13:05 AM
One other thought....is there a way to detect Proxy IP's and deny account creation to Proxy IP's?


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 03:30:58 AM
Concerning your first two posts, you can use the updated Muting (http://dragonprime.net/index.php?topic=12406.0) and First YoM (http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=1174) modules.

Tweak the Muting mod to automatically perm-mute players upon account creation. Use the First YoM module to send an automatic message to the player, again upon account creation (already implemented), telling them to message you about an unmute.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 03:47:22 AM
Concerning your first two posts, you can use the updated Muting (http://dragonprime.net/index.php?topic=12406.0) and First YoM (http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=1174) modules.

Tweak the Muting mod to automatically perm-mute players upon account creation. Use the First YoM module to send an automatic message to the player, again upon account creation (already implemented), telling them to message you about an unmute.

Thanks very much Aeolus!
It has been a nightmare tonight, I had a person create seven phony accounts and spout all manner of hateful crud about transgender people, and me specifically.

Now, normally, I have a pretty thick skin...you can't be an out trans for twenty years and NOT have a thick skin.

But, seeing as i am paying for the bandwidth, i am not about to allow someone to abuse me or transgender people...or, for that matter any other minority group on my badwidth.

Appreciate the assistance very much.

I also found and have implemented the Proxy Blocker Module.

UPDATE:  The Proxy Blocker caused my site to not work, I had to take it off.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 04:10:48 AM
Concerning your first two posts, you can use the updated Muting (http://dragonprime.net/index.php?topic=12406.0) and First YoM (http://dragonprime.net/index.php?module=Downloads;sa=dlview;id=1174) modules.

Tweak the Muting mod to automatically perm-mute players upon account creation. Use the First YoM module to send an automatic message to the player, again upon account creation (already implemented), telling them to message you about an unmute.

OK, please tell me how to tweak the muting module, because i just tried it on a test account and it isn't working.

I am sorry, but I am very very upset here, this is a serious situation, and I just need a fast fix here...before this guy creates fifty accounts...please help!

I am sincerely begging here.


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 05:07:38 AM
OK, please tell me how to tweak the muting module, because i just tried it on a test account and it isn't working.

I am sorry, but I am very very upset here, this is a serious situation, and I just need a fast fix here...before this guy creates fifty accounts...please help!

I am sincerely begging here.

Of course it didn't work, it's not tweaked yet. You need to hook into the character creation hook, and set the pref to perm-muted straight away.

I understand your issues, but begging won't do anything. If anything, this will punish valid players for the actions of one - who's to say they won't message you asking for an unmute first as they pretend to be someone new, then continue on their path?


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 05:23:08 AM
OK, please tell me how to tweak the muting module, because i just tried it on a test account and it isn't working.

I am sorry, but I am very very upset here, this is a serious situation, and I just need a fast fix here...before this guy creates fifty accounts...please help!

I am sincerely begging here.

Of course it didn't work, it's not tweaked yet. You need to hook into the character creation hook, and set the pref to perm-muted straight away.

I understand your issues, but begging won't do anything. If anything, this will punish valid players for the actions of one - who's to say they won't message you asking for an unmute first as they pretend to be someone new, then continue on their path?

Ok so where is this character creation hook?  because I do not see one.
I also do not see a pref that could be set.

And it would not mater if they did that, because I would be on and right there and thus able to immediately deal with them.

Sorry, but this module is more complicated than what I normally work with...I am not terribly adept with this.

Could you tell me why my original suggestion here would not accomplish what I am trying to do...because at least that I pretty much understand.  This module, I am afraid I can't follow.

Is there some reason why...modifying the Newbie Mute module as follows

Code:
case "faq-posttoc":

if (!$seen) set_module_pref("seenfaq",true);
break;

to this

Code:
case "faq-posttoc":
    //comment out in order to require an admin to manually unmute player??
//if (!$seen) set_module_pref("seenfaq",true);
///here do a system YOM to email the player to request an unmute

//thus, they are not unnmuted, even after reading the FAQ, and Admin has to manually unmute them.
break;

Some reason why this idea does not work?

Because I think I sorta better understand this less-complicated module.

Truthfully, I just want it active long enough to make the guy just give the heck up and get a life.


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 05:41:07 AM
Ok so where is this character creation hook?  because I do not see one.
I also do not see a pref that could be set.

You need to add it. That's what I meant. Look up other modules that hook into character creation - like the First YoM!

And really? I do a CTRL+F in the Muting mod, and come up with 14 separate set_module_pref's... that would indicate a pref that can be set.

Could you tell me why my original suggestion here would not accomplish what I am trying to do...because at least that I pretty much understand.  This module, I am afraid I can't follow.

Because Newbie Mute was made over a decade ago, and is severely out of date.

Is there some reason why...modifying the Newbie Mute module as follows

Some reason why this idea does not work?

Because I think I sorta better understand this less-complicated module.

Because there are already modules that do what you want. One messages the player as soon as they create an account. This is misleading - they believe they'll be unmuted if they read the FAQ, but they won't, and they have to send a message themselves, whereas they can just reply to the automated message.

Truthfully, I just want it active long enough to make the guy just give the heck up and get a life.

Just ignore him. I've had my deal of trolls, they give up soon enough. Acknowledging him is exactly what he wants.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 05:51:54 AM
Is this what I want for the character creation hook?

   module_addhook("process-create");
   return true;

As to prefs, I see two prefs in the muting module...

         "mail" => "End of mail mute,text|0000-00-00 00:00:00",
         "comm" => "End of commentary mute,text|0000-00-00 00:00:00",

Now it seems to me I want the "comm" pref, yes??

What I do not understand now...is what to set that module pref to in a case "process-create"

I think I am sorta understanding what to do but really need a nudge in the right direction here, because this is more complicated stuff than I am used to.


Looking further in, I see a $comm_muted_b ==2 means they are perma muted  $comm_muted_b ==1 is temp mute for x number of days and $comm_muted_b == 0 meaning not muted.

But those are not prefs, they are variables.

How would I get to a point where they are perma muted...and then, in the Grotto, I can flip a switch and make them un-muted?

That is where I fall down...and fail to understand how I get there.


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 06:14:39 AM
Yes, you're on the right track! Great job!

Yes, $comm_muted_b equals 2 means they are perm-muted, and when is $comm_muted set to 2? When the pref is set to "9999-99-99 99:99:99". Hence, the sequence of 9's is the value of the pref for a perm-mute.

And yes, you can either unmute from the Grotto or a player's bio.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 09:47:28 AM
Yes, you're on the right track! Great job!

Yes, $comm_muted_b equals 2 means they are perm-muted, and when is $comm_muted set to 2? When the pref is set to "9999-99-99 99:99:99". Hence, the sequence of 9's is the value of the pref for a perm-mute.

And yes, you can either unmute from the Grotto or a player's bio.

But that is where I fall down.

Do I jut unmute them from the player bio and it works??

Because you can't do it thru a pref in the muting module itself.


so does this work, adding to your muting module


Code:
module_addhook("process-create");


and then

Code:
case "process-create":
$comm_muted_b == 2;
break;

Does that do it??

If I have read you right this should.
And if so, thanks for your help...i just seem to need getting talked thru this stuff a bit.

UPDATE:  I added this stuff into the module.  Re-installed the module.  It did not work.  i also tried changing $comm_muted_b == 2; to $comm_muted_b = 2;
It still did not work.


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 06:37:34 PM
Do I jut unmute them from the player bio and it works??

Because you can't do it thru a pref in the muting module itself.

Set, you can unmute them from their bio. You can do it through a pref - if it's through a pref, setting it to "0000-00-00 00:00:00" unmutes the player.


UPDATE:  I added this stuff into the module.  Re-installed the module.  It did not work.  i also tried changing $comm_muted_b == 2; to $comm_muted_b = 2;
It still did not work.

The hook is right! But if you think about it, all you're doing here is setting a variable that won't do anything. You need to actually set the pref in the muting module. So, in the process-create hook, you need to add set_module_pref("PREF NAME?", "VALUE?", "USER?", "MODULE?"), filling out those values.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 07:30:09 PM
Do I jut unmute them from the player bio and it works??

Because you can't do it thru a pref in the muting module itself.

Set, you can unmute them from their bio. You can do it through a pref - if it's through a pref, setting it to "0000-00-00 00:00:00" unmutes the player.


UPDATE:  I added this stuff into the module.  Re-installed the module.  It did not work.  i also tried changing $comm_muted_b == 2; to $comm_muted_b = 2;
It still did not work.

The hook is right! But if you think about it, all you're doing here is setting a variable that won't do anything. You need to actually set the pref in the muting module. So, in the process-create hook, you need to add set_module_pref("PREF NAME?", "VALUE?", "USER?", "MODULE?"), filling out those values.

OK...let's see if I can puzzle that out...
As much as I find it frustrating to not get a straight answer I think I know what you are doing here...

UPDATE:

Damn, this did not work either...

$comm_muted_b = (get_module_pref("comm",FALSE,$id) != "0000-00-00 00:00:00")? ((get_module_pref("comm",FALSE,$id) == "9999-99-99 99:99:99")? 2 : 1) : 0;
         $idret = "&id=".$id."&ret=".$ret."";

I do NOT know what to do here and it is getting REAL frustrating creating and deleting new characters to test this...please just help me...

I do NOT understand how to do this...should the first FLASE be changed to TRUE??

Noooope...that did not work either!!

i am totally flummoxed here...i just can't follow what is being done here....

Oh crap...i am stupid...i am GETTING...not SETTING....the damn pref, OMG..

Nuts, this did not do it...
set_module_pref("comm","9999-99-99 99:99:99",FALSE,$id);

Maybe THAT is where I need TRUE...
or where I need all zeroes...


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 07:45:39 PM
OK...let's see if I can puzzle that out...
As much as I find it frustrating to not get a straight answer I think I know what you are doing here...

I'm glad you do, and I really hope you're seeing the benefit of it. Learning how to do something is and will be far more beneficial to you than just copy-pasting the solution without knowing how it actually works.

Let us know how you go. You're definitely getting there.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 08:01:14 PM
OK...let's see if I can puzzle that out...
As much as I find it frustrating to not get a straight answer I think I know what you are doing here...

I'm glad you do, and I really hope you're seeing the benefit of it. Learning how to do something is and will be far more beneficial to you than just copy-pasting the solution without knowing how it actually works.

Let us know how you go. You're definitely getting there.

I can't get the rest of the way there...PLEASE help me...

This is what I tried now...and it JUST is not happening...
Code:
modulehook("commmute",array("userid"=>$id, "staffid"=>$session['user']['acctid'], "when"=>date("Y-m-d H:i:s")));
set_module_pref("comm","9999-99-99 99:99:99",FALSE,$id);   

$comm_muted_b = (get_module_pref("comm",FALSE,$id) != "0000-00-00 00:00:00")? ((get_module_pref("comm",FALSE,$id) == "9999-99-99 99:99:99")? 2 : 1) : 0;
$idret = "&id=".$id."&ret=".$ret."";



Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 08:05:44 PM
I can't get the rest of the way there...PLEASE help me...

This is what I tried now...and it JUST is not happening...
Code:
modulehook("commmute",array("userid"=>$id, "staffid"=>$session['user']['acctid'], "when"=>date("Y-m-d H:i:s")));
set_module_pref("comm","9999-99-99 99:99:99",FALSE,$id);   

$comm_muted_b = (get_module_pref("comm",FALSE,$id) != "0000-00-00 00:00:00")? ((get_module_pref("comm",FALSE,$id) == "9999-99-99 99:99:99")? 2 : 1) : 0;
$idret = "&id=".$id."&ret=".$ret."";



Okay. Were you putting that in the hook? All you need is the set_module_pref line (the second line). You used:
Code:
set_module_pref("comm","9999-99-99 99:99:99",FALSE,$id);
  • The "comm" is right.
  • The "9999-99-99 99:99:99" is right.
  • The third parameter is for the module - which module as we using? "muting".
  • The fourth parameter is for the user, and $id isn't set - looking at the First YoM module, we need to use $args['acctid'] instead.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 08:13:54 PM
I am going out of my mind crazy here and creating and deleting test accounts is making me batchit.

Now this is what you told me...

set_module_pref("PREF NAME?", "VALUE?", "USER?", "MODULE?"), filling out those values.


Now, my pref name is "comm" I see that.
My value is "9999-99-99 99:99:99"

(it does NOT seem to be setting the comm pref to 99999999999999 when I make my test accounts.)
This may be where my problem lies.


My user...this could be where I am having a problem...but I do not see how ELSE to call the user ID...right??
Should I maybe just do a variable that captures $session['user']['id'] and plug that in?

Now I should not need to name the module...since it is in the SAME MODULE.

So it SEEMS...to the way my brain is working...


set_module_pref("PREF NAME?", "VALUE?", "USER?"), filling out those values. - SHOULD WORK.


thus...
$id = $session['user']['acctid'];
set_module_pref("comm?", "9999-99-99 99:99:99", FALSE, $id),

OUGHT to work?

if not, i am completely flummoxed to hell and back.




Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 08:20:45 PM
I told you what to use in my last post.

"muting" for the third parameter (doesn't matter if it's the same module, it works either way), $args['acctid'] for the fourth.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 08:22:00 PM
I told you what to use in my last post.

"muting" for the third parameter (doesn't matter if it's the same module, it works either way), $args['acctid'] for the fourth.

so FALSE should not be there??

Code:
case "process-create":
$id = $args['acctid'];
set_module_pref("comm?", "9999-99-99 99:99:99", "muting", $id);
        break;

Let me try this...arrrrgh, I hate this stuff!!


NOOOOOOOOOOOOOOOPE!!!

that did not work EITHER!!

it still did not set the damn pref...and it still did not mute the new player.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 08:28:51 PM
where in the name of HELL does that FALSE come in...or shold it??

I STILL do not get the damn thing changing the pref on the character and I do NOT understand why...

THIS did not work...
Code:
case "process-create":
set_module_pref("comm?", "9999-99-99 99:99:99", "muting", $args['acctid']);
        break;

oh, crap.  There is a stupid extra question mark in the pref name....in my code there...damn it.


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 08:31:22 PM
oh, crap.  There is a stupid extra question mark in the pref name....in my code there...damn it.

Yep, there you go. Should work straight away now.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 08:32:29 PM
EUREKA!!!


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 08:34:26 PM
thanks, Aeolus!

This stuff is enough to drive one crazy!!

One little misplaced question mark or comma or whatever...arrrgh.

Got it now.  And I also installed The Cell...to isolate players who cause trouble after the fact.

Not much else to do.

people will be idiots...and that is life...but I'd like to have tools to deal with it as best I can.

There is one thing...minor...

I get my mute message twice.
Once initially, and once when Live Commentary turns off.

No huge problem.


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 08:35:52 PM
thanks, Aeolus!

This stuff is enough to drive one crazy!!

One little misplaced question mark or comma or whatever...arrrgh.

Got it now.  And I also installed The Cell...to isolate players who cause trouble after the fact.

Not much else to do.

people will be idiots...and that is life...but I'd like to have tools to deal with it as best I can.

(https://i.imgur.com/HTisMpC.jpg)


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 08:38:51 PM
There is one thing...minor...

I get my mute message twice.
Once initially, and once when Live Commentary turns off.

Not sure it matters a lot, but would be nice if that did not happen.


OK...one other problem...
When I go to un-mute them...it unmutes, but then I get this

SELECT * FROM news WHERE accountid= ORDER BY newsdate DESC,newsid ASC LIMIT 100
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY newsdate DESC,newsid ASC LIMIT 100' at line 1
Call Stack:
1: db_query("SELECT * FROM news WHERE ...") called from /home/savmor/public_html/bio.php on line 105


thnn if I back up
and go to the user editor then the user grotto then back to mundane, it is okay.

Can I get rid of that call stack?


For the moment, I just commented out line 104 in bio.php and it worked....but i am not sure that is the fix I really want.

by the way,
this is line 105
Code:
$result = db_query("SELECT * FROM " . db_prefix("news") . " WHERE accountid={$target['acctid']} ORDER BY newsdate DESC,newsid ASC LIMIT 100");

Is this one of these situations where the PHP is forcing a change or something?  It would seem as though this is the case, because the call stack is giving me a syntax issue.
Just not sure what the correct syntax would be.

I think my server is now running PHP 5.7 - let me check.


I never had the problem until this module...so i do not know.

Like I said, commenting out line 105 took care of the problem in the short term...but I can't see that as a permanent fix.

OMG, here I go being a dumbass again...

MySQL server version for the right syntax to use near 'ORDER BY newsdate DESC,newsid ASC LIMIT 100'

Does not matter what version of PHP...but what version of MySQL...

 Server type: MySQL
Server version: 5.6.38


I THINK...looking thru my manual...I canbnot actually use ORDER BY...with one key being DESC and one being ASC...not sure if I am reading that right

Seems it does not want to sort when one key is DESCENDING order and the other is ASCENDING order.

So...If i change one...does it solve the problem, do you all think??

Nope.  Did not work.

For now I have 105 commented out, but that is not a permanent fix and i am afraid I do not understand well enough what is in the manual to know the correct syntax for this command and Google is no help either.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 09:58:19 PM
 You can sort on multiple columns, and you can sort different columns in different directions. For example, to sort by type of animal in ascending order, then by birth date within animal type in descending order (youngest animals first), use the following query:

mysql> SELECT name, species, birth FROM pet
    -> ORDER BY species, birth DESC;


But I tried just taking out the ASC and it did not work...

Wait...it can't be this easy...could it??

change db_query to mysql>


Code:
$result = mysql>("SELECT * FROM " . db_prefix("news") . " WHERE accountid={$target['acctid']} -> ORDER BY newsdate DESC,newsid LIMIT 100");

Could it be that?? arrrgh

Not quite getting me there...somehow it does not pick up the account ID when I return to the bio.  The function works right to mute and unmute...arrgh, I just don't like what happens when I Return to Bio and I get a nnothing account come up.


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 10:18:41 PM
It's not a PHP error. Look at the query:
SELECT * FROM news WHERE accountid= ORDER BY newsdate DESC,newsid ASC LIMIT 100

Specifically the "WHERE accountid=" part. Where accountid equals what? It's blank, that's what the error is, there needs to be something after the equals sign. The callstack is saying that the error is near "ORDER BY", not that the error is "ORDER BY".

Easiest fix to this is as following (note the single quotes after accountid):
Code:
$result = db_query("SELECT * FROM " . db_prefix("news") . " WHERE accountid='{$target['acctid']}' ORDER BY newsdate DESC,newsid ASC LIMIT 100");


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 10:29:12 PM
It's not a PHP error. Look at the query:
SELECT * FROM news WHERE accountid= ORDER BY newsdate DESC,newsid ASC LIMIT 100

Specifically the "WHERE accountid=" part. Where accountid equals what? It's blank, that's what the error is, there needs to be something after the equals sign. The callstack is saying that the error is near "ORDER BY", not that the error is "ORDER BY".

Easiest fix to this is as following (note the single quotes after accountid):
Code:
$result = db_query("SELECT * FROM " . db_prefix("news") . " WHERE accountid='{$target['acctid']}' ORDER BY newsdate DESC,newsid ASC LIMIT 100");

Ah, you added single quote before and after the curlies...

I just copied your code in and I still ahve the same problem, it is NOT pulling the account ID

it DOES...however, throw a ton of news items up.  But no account ID.

I swear I don't understand.

And why can't we just plain use something I know like $session['user']['acctid']
because THAT would pull back MY account number.

And we need to pull back the player's.

So how to do it??


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 10:48:32 PM
here is what I find...

Line 104, previous to this...is this:

output("`n`^Recent accomplishments (and defeats) of %s`^",$target['name']);

yet, this is what I get:

Recent accomplishments (and defeats) of

and the name is BLANK.

So it is not even pulling the account ID even before it hits this problem.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 10:51:08 PM
Code:
$char = httpget('char');
$sql = "SELECT login, name, level, sex, title, specialty, hashorse, acctid, resurrections, bio, dragonkills, race, clanname, clanshort, clanrank, ".db_prefix("accounts").".clanid, laston, loggedin FROM " . db_prefix("accounts") . " LEFT JOIN " . db_prefix("clans") . " ON " . db_prefix("accounts") . ".clanid = " . db_prefix("clans") . ".clanid WHERE login='$char'";
$result = db_query($sql);
$target = db_fetch_assoc($result);
$target['login'] = rawurlencode($target['login']);
$id = $target['acctid'];
$target['return_link']=$return;

page_header("Character Biography: %s", full_sanitize($target['name']));

This is where the account ID is defined.

Now, when I originally go into a player's bio....it pulls the account id.  As it should.

But when I RETURN to bio...from your module...this is where it is NOT pulling the account ID.

from your module
Code:
addnav("Return to Bio","bio.php?char=$id&ret=$ret");

Seems like it should be pulling the ID there.  But it isn't.

When I hover over the link...without pressing it...the char id is there.

but when I press the link...it is like the value goes away.  It does not carry back to bio.php


Now...from bio.php
Code:
$ret = httpget('ret');
if ($ret==""){
$return = "/list.php";
}else{
$return = cmd_sanitize($ret);
}

Is this the point it returns to?

If it is...the next thing it should be hitting is where it established the value of the char id.  So that can't be right.


Somehow or another...when your module returns to Bio....it is NOT retaining the character ID.

Like I said, when I hover, without clicking...the char ID is there in the return link that shows up.

But c;ick it...and I get a null account back...so, somewhere...it is not retaining that account ID.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 11:04:43 PM
here is the copied and pasted URL....i am directed back to

ht tp://www.kalisiin.com/bio.php?char=598&ret=%2Flist.php&c=740-065629


notice how char=598 is there??

even after I click the link...it DOES show up that way in my URL bar.

But the value is not being fed into bio...somehow...and this is where I am completely lost.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 11:07:54 PM
The only thing I can think of....

Is I am playing both the test player...char=598  - AND my Admin

And I can't be signed into both accounts at the same time, on the same computer.

So I am going to sign in as that on ONE comp...and my admin on the other...see what THAT does.UPDATE:  Nope, that did not change the outcome.

Maybe should just have a link directing it back tot he darn warrior list instead of the bio??


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 03, 2018, 11:14:04 PM
You've posted too many walls of text, I've become confused. Please repeat your issue in a comprehensible fashion.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 03, 2018, 11:19:39 PM
You've posted too many walls of text, I've become confused. Please repeat your issue in a comprehensible fashion.

OK, I think I solved the problem, but not in the way you would have wanted, perhaps.
Code:
if ($redirect) {
redirect("runmodule.php?module=muting&op=bio&id=$id&ret=$ret");
} else {
addnav("Return");
addnav("Return to Warrior List","list.php");
//addnav("Return to Bio","bio.php?char=$id&ret=$ret");
addnav("Return to Muting","runmodule.php?module=muting&op=bio&id=$id&ret=$ret");
}

Notice where I commented out your return nav to the Bio - and added a nav above it to go back to the Warrior List?

For some reason, in your module, when you use the "Return to Bio" link...it is NOT retaining the account ID.

The URL, when you hover over the link...shows the account ID.  When you click it...in the URL bar...the account ID is still there, char=598 in my case.

BUT...

I get a bio on a null character.  So the character ID is still not feeding into the bio.php when you return there from your module.

I have provided a workaround, as you see...but this is not working as you had maybe intended.



Title: Re: Require Admin Approval For Unmute??
Post by: DarknessFalls on January 04, 2018, 08:26:25 AM
I know this may be a bit off topic, but for future references...

If a player is creating issues, and begins to create multiple characters, I would recommend temporarily turning off Character Creation until the problem is resolved. That way, you aren't stressing while attempting to find a way to fix the issue at hand.


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 04, 2018, 11:00:19 PM
I know this may be a bit off topic, but for future references...

If a player is creating issues, and begins to create multiple characters, I would recommend temporarily turning off Character Creation until the problem is resolved. That way, you aren't stressing while attempting to find a way to fix the issue at hand.
How do I do that?  I have never had to.
Never had anything like this happen before in eleven years running a site, LOL


Title: Re: Require Admin Approval For Unmute??
Post by: Aeolus on January 05, 2018, 08:03:57 AM
How do I do that?  I have never had to.
Never had anything like this happen before in eleven years running a site, LOL

Game Settings from the Grotto.

How do you not know how to code after over a decade?


Title: Re: Require Admin Approval For Unmute??
Post by: DarknessFalls on January 06, 2018, 11:19:36 AM
One of the things you should do now, is to start searching around in your realm. You've got open access to see everything you can do. This is extremely advisable, if there are things you aren't familiar with. Exploring is always a good way to figure things out. That's how Aeolus learned. That's how I learned. That's how many of us here learned. Exploring. Finding things out. If you do back-ups continuously, you're able to restore back-ups if you somehow break something. It is okay to make mistakes. It is okay to ask questions. However, I'd suggest trying to figure out how to do it first before asking. That way if someone asks, "Did you try and figure it out on your own?", you can tell them that you did.

Now. Back to the topic at hand. There are always going to be trolls or players that are just blatantly mean, and they need to be dealt with. You can always mute the players, ban the players, cell the players, turn off chat temporarily until the situation is resolved, turn off Character Creation, etc. There are many avenues to make sure that you can keep your realm as safe as possible. All you have to do is explore.

To answer how to turn off Character Creation...

Grotto > Game Settings > GameSetup > Allow creation of new characters? > Yes/No


Title: Re: Require Admin Approval For Unmute??
Post by: TGTarheel on January 13, 2018, 11:28:32 PM
Thanks.
I did not know to do this because I never had to in over a decade!

But at this point I have several safeguards in place and the problem seems to have resolved.

Namely, I made it so that people have to verify email addresses...only one account per email.
They have to Petition Admin to be unmuted.

I have the Cell and the ability to mute/ban players.

Additionally, I can add the IP addresses and email addresses to my Brendan Blocker.

So there are, I have found...many things I can do.  In either case, the problem seems solved for now.

© 2018 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines