Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Bing

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » General Discussions » Formclan Snippet
Forum Rules | Mark all | Recent Posts

Formclan Snippet
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jan 23, 2009, 11:59 pm
Go to the top of the page
Go to the bottom of the page

Rojan QDel
Fledgling
GroupMembers
Posts25
JoinedDec 30, 2006

I have snippetized a popular LotJ feature called formclan.
This snippet allows players to create a clan on their own by providing a certain amount of money/credits and a sufficient member list.
It also provides the possibility of a clan dissolving if it falls below a minimum limit of members or funds. Clans can be set with the nodissolve flag to avoid this.
This snippet also redefines all of the clan types, for more variety.
The snippet is available for download here: http://www.legendsofthejedi.com/index.php?page=snippets

The snippet was created for SWRFUSS 1.2, but should be easy enough to convert for SWFotE.
       
Post is unread #2 Jan 26, 2009, 6:28 am
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

One topic is enough.

And don't force users to sign on the MUD to DL it.
       
Post is unread #3 Jan 26, 2009, 6:35 am
Go to the top of the page
Go to the bottom of the page

Kayle
Off the Edge of the Map
GroupAdministrators
Posts1,195
JoinedMar 21, 2006

Only one now.
       
Post is unread #4 Jan 26, 2009, 5:06 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Personally I'd be curious to know just how there's any level of enforcement. Logging on requires a telnet connection. Web pages normally use cookies. The two rarely if ever meet. The advertising gimmick aside, the underling method of knowing someone browsing the page is connected to a particular character is more interesting to me than the snippet.

There may also be security concerns to be aware of. This isn't a normal set of conditions being established here.
       
Post is unread #5 Jan 26, 2009, 6:18 pm
Go to the top of the page
Go to the bottom of the page

Rojan QDel
Fledgling
GroupMembers
Posts25
JoinedDec 30, 2006

I've uploaded the snippet to mudbytes as well, pending approval (and removed the connection restrictions).

The MUD uses MySQL to insert all connected players, with IP addresses and some other bits of information (level, account name, player name), into a database. When they log off, it removes them. The PHP scripts merely log into the MySQL database and compare the IP of the person viewing the website to that saved in the database. When the MUD boots up, it clears the table to eliminate any inconsistencies involved in a crash.

In the past, we had a similar system, but involving writing all descriptors to a file and then reading from it with PHP.
       
Post is unread #6 Jan 27, 2009, 8:44 am
Go to the top of the page
Go to the bottom of the page

Rojan QDel
Fledgling
GroupMembers
Posts25
JoinedDec 30, 2006

To address the security concerns, there is no login information stored in the database, only a reference of IPs to various bits of information. And the system is as secure as the MySQL database it is based on, which is to say pretty secure. I've considered using SQLite instead for an even MORE secure (and likely less resource intensive) solution, but never got around to changing it.
       
Post is unread #7 Jan 27, 2009, 9:34 am
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

In what way is SQLite more secure than MySQL? An SQLite database is just a file with no other security than that file permission set in the filesystem. It has no password protection. SQLite was never designed with security in mind. Nor was it really designed for sharing information between two applications. It's really just a normal file with an SQL front end.
       
Post is unread #8 Jan 27, 2009, 10:57 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Perhaps he meant that it's more secure in the sense that, with permissions set correctly, you can only read it if you have OS-level permissions to do so, and are a process running on the local system. MySQL on the other hand has several layers for auth, and several ways in, some of which can be remote, and it's harder to set up the security correctly. MySQL also depends on filesystem security. In other words, MySQL has more ways in than SQLite, which makes it necessarily less secure. How much "less secure" is of course a debatable question...
       
Post is unread #9 Jan 27, 2009, 11:33 am
Go to the top of the page
Go to the bottom of the page

Caius
Magician
GroupMembers
Posts132
JoinedJan 29, 2006

If you do want to go for SQLite, you will want to use version 3, and not 2. Version 2 is significantly slower. The standard SQLite php interface is just for version 2, though. So you'll have to use an extension like PDO/Pear. But it's worth it. SQLite2 should be avoided if you're at all concerned about performance.
       
Post is unread #10 Jan 27, 2009, 12:28 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Heh. Well I have to say that is a pretty interesting way to go about detecting the connection. Just one more of many things you can do when your MUD has a DB behind it. :)
       
Post is unread #11 Jan 27, 2009, 12:49 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Arr, pet peeve triggered. :smile: The DB doesn't enable this -- it just makes things easier. You could just as easily do all of this with flat files. DBs make some things really convenient, and provide a solid API for reading and writing data -- and for that reason add huge value -- but they're not making this kind of thing possible when it wasn't before.
       
Post is unread #12 Jan 27, 2009, 6:12 pm
Go to the top of the page
Go to the bottom of the page

Rojan QDel
Fledgling
GroupMembers
Posts25
JoinedDec 30, 2006

Yeah, I meant that SQLite was more secure in the sense that MySQL is much easier to log into remotely, or attempt to log into remotely. And I totally agree that DBs make it easier, but don't make it possible. As I said, we used to use flatfiles, I switched to DBs for the convenience of writing more complex PHP scripts more easily.
       
Pages:<< prev 1 next >>