would it be possible to make the MOTD random by reading a random line from a .txt file?
Where abouts is the motd code part? lol
Random MOTD code
Random MOTD code
You cannot use certain BBCodes: [img].
Re: Random MOTD code
for a Message Of The Day, it is being changed surprisingly little indeed.
A = {x ∈ P(U) | x ∉ x}
Mods:
- /Su - Allows players to temporarily become a different rank
- /Snap - Like /Line but only draws straight or diagonal lines.
- pre-0.630 skip/none block
Re: Random MOTD code
it all seems complicated because of the /env womid stuff.
I basically want to add a
I know how to do this, just not sure where.
I basically want to add a
Code: Select all
if file exists... read random line from motd.txt
else, use normal behaviour
You cannot use certain BBCodes: [img].
Re: Random MOTD code
I'm guessing it's in Player.Networking around line 665, but I could be wrong.
Hold on...
Hold on...
I'm using old revisions...Commit by fragmer :: r1219 /branch-0.60x/fCraft/ (2 files in 2 dirs):
Moved Player.Networking.cs from Player/ to Networking/. Derp.
A = {x ∈ P(U) | x ∉ x}
Mods:
- /Su - Allows players to temporarily become a different rank
- /Snap - Like /Line but only draws straight or diagonal lines.
- pre-0.630 skip/none block
Re: Random MOTD code
I did the usual "search the entire project for motd"
each result looked confusing.
I'll look at it again tomorrow, and post any success I have
each result looked confusing.
I'll look at it again tomorrow, and post any success I have
You cannot use certain BBCodes: [img].
Re: Random MOTD code
Here's how MOTD works.
For the initial connection:
For the initial connection:
- If WoM extensions are enabled (ConfigKey.WoMEnableEnvExtensions), everyone is sent the WoM configuration link (&0cfg=IP:Prt/WorldName~motd"). WoM users have that replaced by the actual MOTD when they download the config from the server (produced by World.GenerateWoMConfig method).
- If WoM extensions are not enabled, everyone gets to see the MOTD (produced by Player.LoginSequence method).
- If WoM extensions are enabled AND the player is using WoM, that message is produced by World.GenerateWoMConfig, from a separate thread.
- For everyone else, that message is produced by Player.JoinWorldNow, from the player's i/o thread.
Re: Random MOTD code
Thanks for the support, not worth the hassle
You cannot use certain BBCodes: [img].