Teh Mine

From: ANT_THOMAS 4 Aug 2011 23:20
To: Drew (X3N0PH0N) 2849 of 3934

:D Thanks!

 

The ? are because of pasting, there's some colour formatting from dynmap to make it green.

From: Drew (X3N0PH0N) 4 Aug 2011 23:26
To: ANT_THOMAS 2850 of 3934
What character's really there?
From: ANT_THOMAS 4 Aug 2011 23:30
To: Drew (X3N0PH0N) 2851 of 3934
I've got rid of them now but it was "§"
From: Drew (X3N0PH0N) 4 Aug 2011 23:32
To: ANT_THOMAS 2852 of 3934
Show me exactly how the log looks (unless you've adjusted it already to work).
From: ANT_THOMAS 4 Aug 2011 23:37
To: Drew (X3N0PH0N) 2853 of 3934
I've adjusted it to work but it looks like this for dynmap entries...

code:
2011-08-04 22:09:49 [INFO] [dynmap] §2[WEB] 86.154.231.70: §fwhie I'm stuck in work
From: Drew (X3N0PH0N) 4 Aug 2011 23:38
To: ANT_THOMAS 2854 of 3934
Aight cool (hug)
From: Peter (BOUGHTONP) 5 Aug 2011 00:44
To: ANT_THOMAS 2855 of 3934
The dynmap messages are still disappearing too quick - have you changed the delay yet?
From: af (CAER) 5 Aug 2011 01:22
To: Drew (X3N0PH0N) 2856 of 3934
I last used PHP about 90 years ago, and I barely had a clue what I was doing then.
From: Peter (BOUGHTONP) 5 Aug 2011 01:58
To: ALL2857 of 3934
What's the no clouds thing you use?
From: Drew (X3N0PH0N) 5 Aug 2011 02:16
To: Peter (BOUGHTONP) 2858 of 3934
Just a texture pack with a transparent texture for clouds. I'll attach it.
EDITED: 16 Aug 2011 05:33 by X3N0PH0N
From: Peter (BOUGHTONP) 5 Aug 2011 02:43
To: ANT_THOMAS 2859 of 3934
If you add this before the closing brace of the foreach statement, it should show when people join and leave, which is probably handy?

php code:
	else if ( strpos($this,"logged in") )
	{
		$time = "[" . substr($thing, 11, 5) . "]";
		$person = preg_match( '/(?<=\[INFO\] )\S+/' , $thing );
		$chats[] = $time.' <i>Joined:</i> <b>'.htmlspecialchars($person).'</b>';
	}
	else if ( strpos($thing,"lost connection") )
	{
		$time = "[" . substr($thing, 11, 5) . "]";
		$person = preg_match( '/(?<=\[INFO\] )\S+/' , $thing );
		$reason = substr(strrchr($thing, '.'), 1);
		$chats[] = $time.' <i>Disconnected:</i> <b>'.htmlspecialchars($person).'</b> ('.$reason.')';
	}
From: Peter (BOUGHTONP) 5 Aug 2011 02:43
To: Drew (X3N0PH0N) 2860 of 3934

The stupid download doesn't seem to want to finish. :(

 

Gets to 484 of 507 KB and just stops.

 


That was Firefox, but Chrome is doing same. "506/507 kB, 0 secs left".

 

If I copy and rename the file I can't extract the zip because it's corrupt, because it's got a stupid kilobyte missing. :@

EDITED: 5 Aug 2011 02:47 by BOUGHTONP
From: ANT_THOMAS 5 Aug 2011 07:37
To: Peter (BOUGHTONP) 2861 of 3934
Yeah but I haven't reloaded the plugin yet because it requires a server restart and there was lots of busy people on last night.
From: ANT_THOMAS 5 Aug 2011 09:10
To: ALL2862 of 3934
The dynmap time for displaying chat is up to 20 secs now.
From: ANT_THOMAS 5 Aug 2011 09:13
To: ANT_THOMAS 2863 of 3934
Or maybe it's actually 15 seconds, that is possibly a max since I've set it at 20 and 25 and it's still gone after 15.
From: af (CAER) 5 Aug 2011 11:46
To: ALL2864 of 3934

It was suggested that I construct the Forbidden City. I did some research to find out how big it is, collect some maps and photos, etc.

 

It is 750m wide and 960m long.

 

The moat is 52m wide and 6m deep.

 

The walls are 10m high, 8.6m thick at the base and 6.7m thick at the top.

 

It has OVER NINE THOUSAND rooms.

 

This is going to take a long time, and will require a lot of red wool.

 

edit:
Here's a couple of sections of map showing the kind of scale we'd be talking about, assuming 1px = 1m:
http://caerphoto.com/misc/forbidden-city-size.png

 

http://caerphoto.com/misc/forbidden-city-size.jpg

 

I suppose we can be grateful none of its buildings are particularly tall :&

EDITED: 5 Aug 2011 12:03 by CAER
From: ANT_THOMAS 5 Aug 2011 13:31
To: Peter (BOUGHTONP) 2865 of 3934
That doesn't work. It results in this....

code:
[11:34] Disconnected: 1 (endOfStream )
[11:29] Disconnected: 1 (quitting )


This a log out and login

code:
2011-08-05 11:34:23 [INFO] Assassinmaster00 lost connection: disconnect.endOfStream
2011-08-05 11:34:40 [INFO] Assassinmaster00 [/82.0.57.13:51011] logged in with entity id 6954 at ([world] 989.4319634933074, 67.0, 976.3194288406315)
 
From: Peter (BOUGHTONP) 5 Aug 2011 13:41
To: ANT_THOMAS 2866 of 3934
Grrr, stupid bloody PHP! :@


Change...
php code:
$person = preg_match( '/(?<=\[INFO\] )\S+/' , $thing );
...to...
php code:
$results = [];
preg_match( '/(?<=\[INFO\] )\S+/' , $thing , $results );
$person = $results[0];

...in both the sections.


And correct $this to $thing in the else if.
( I blame Xen's dumb variable names for that one :P )
EDITED: 5 Aug 2011 13:44 by BOUGHTONP
From: Peter (BOUGHTONP) 5 Aug 2011 13:45
To: Peter (BOUGHTONP) 2867 of 3934
Oh, it probably also needs a $results = []; before the preg_match too.
(I just updated the post, but not sure if you read it before or after that)
From: Peter (BOUGHTONP) 5 Aug 2011 13:50
To: ANT_THOMAS 2868 of 3934
Stupid language. You apparently don't need to define the $results before using it, assuming the examples are correct.

Anyway, if you haven't already done it, here's a modified version of the original code segment I posted:

php code:
	else if ( strpos($thing,"logged in") )
	{
		$time = "[" . substr($thing, 11, 5) . "]";
		preg_match( '/(?<=\[INFO\] )\S+/' , $thing , $results );
		$person = $results[0];
		$chats[] = $time.' <i>Joined:</i> <b>'.htmlspecialchars($person).'</b>';
	}
	else if ( strpos($thing,"lost connection") )
	{
		$time = "[" . substr($thing, 11, 5) . "]";
		preg_match( '/(?<=\[INFO\] )\S+/' , $thing , $results );
		$person = $results[0];
		$reason = trim(substr(strrchr($thing, '.'), 1));
		$chats[] = $time.' <i>Disconnected:</i> <b>'.htmlspecialchars($person).'</b> ('.$reason.')';
	}


I also added a trim() call around the $reason value, to remove the space that appeared.
EDITED: 5 Aug 2011 13:54 by BOUGHTONP