Page 1 of 1

Commonwealth Casino Goes Public

Posted: Sun Nov 15, 2009 10:27 am
by vasroe
I would like to announce that I am selling four shares of stock in Commonwealth Casino.

Each share costs 500 Erb and comes with a guarantee to the person that they will receive 5% of all profits generated by Commonwealth Casino. If an individual person buys all four shares, then they can receive 20% of all profits generated by Commonwealth Casino. In light of this potentially humongous dividend, stock does not come with voting privileges. There is the possibility that more stock may be sold in the future.

Please post below if you are interested in making a purchase.

Re: Commonwealth Casino Goes Public

Posted: Sun Nov 15, 2009 10:32 am
by Malliki Tosha
Put me down for two shares.

Re: Commonwealth Casino Goes Public

Posted: Sun Nov 15, 2009 2:01 pm
by vasroe
All right, Sir. Please send your payment to my personal account on the Small Commonwealth bank, "Vasroe." Are there any other interested buyers?

Re: Commonwealth Casino Goes Public

Posted: Sun Nov 15, 2009 4:28 pm
by Malliki Tosha
Done.

Re: Commonwealth Casino Goes Public

Posted: Mon Nov 16, 2009 3:16 pm
by Erik Mortis
I'll buy the remaining two in lue of loaning you the money.

Re: Commonwealth Casino Goes Public

Posted: Mon Nov 16, 2009 3:19 pm
by Erik Mortis
Money moved. I would advise making a separate account for your casino. That way we know the money isn't being used for person projects and so we can ask for an audit if need be.

Re: Commonwealth Casino Goes Public

Posted: Sun Nov 29, 2009 1:53 pm
by vasroe
A bank account entitled CommonwealthCasino has now been created for the casino company, and the monies from the stock sales have been deposited into it. In setting up this account, Commonwealth Casino is leading by example. It makes Commonwealth Casino's finances now more transparent than the finances of Shirerithian companies that still rely upon personal accounts for storing their money.

Re: Commonwealth Casino Goes Public

Posted: Sun Nov 29, 2009 6:41 pm
by vasroe
I would like to inform the shareholders that a game called EasyWin has been developed and submitted to a Small Commonwealth bank administrator for installation. After it has been debugged, it should be up and running soon.

Re: Commonwealth Casino Goes Public

Posted: Sun Nov 29, 2009 11:34 pm
by Erik Mortis
Who'd you send it to?

Re: Commonwealth Casino Goes Public

Posted: Mon Nov 30, 2009 2:04 am
by Ari Rahikkala
Me.. I'll have a look at it tomorrow, I know for a fact I won't have time to do it today...

Re: Commonwealth Casino Goes Public

Posted: Wed Dec 02, 2009 6:17 pm
by Ari Rahikkala
Well, today then...

Re: Commonwealth Casino Goes Public

Posted: Thu Dec 03, 2009 12:22 am
by Erik Mortis
I took a look at it and got it to work. Though I have issues with some parts, which I talked about in a PM.

Re: Commonwealth Casino Goes Public

Posted: Thu Dec 03, 2009 7:33 am
by Ari Rahikkala
Mind sharing those concerns with me? I'm especially curious about the removal of trim() and strip_tags() from the username input... I can kinda see why you'd do that since it doesn't really make sense to just use them in this one mod, but on the other hand it also seems usernames *should* be trimmed of leading and trailing whitespace by default for security reasons, and strip_tags has an obvious use in defending against XSS attacks...

Re: Commonwealth Casino Goes Public

Posted: Thu Dec 03, 2009 1:13 pm
by Erik Mortis
I sent you a copy of the PM I sent him.

$_SESSION should already have been cleaned up. Most info there is taken straight from the server. I don't want people messing with session info cause it could lead to breakage in other parts of the bank.

The only function he uses that can access the bank is transfer_funds() which has the mysql_real_escape_string() function in use on all data. And I think will clean up floats for me.

Re: Commonwealth Casino Goes Public

Posted: Thu Dec 03, 2009 1:18 pm
by Erik Mortis
If you think/say they are necessary in the bank as a whole. I can implement them. But I still don't want $SESSION messed with by others.

Let's take this to the thread in the Church of the Machine god.

Re: Commonwealth Casino Goes Public

Posted: Thu Dec 03, 2009 10:34 pm
by vasroe
The code for EasyWin was based on the code I wrote for Antica's Casino, and Antica's Casino runs as just another bank page on AntiBank, Antica's Bank. The use of trim() is to reduce input errors on the AntiBank. The use of strip_tags(), is, as Ari correctly surmised, for security purposes. Thankfully, this code successfully prevented an attack attempt against the AntiBank on at least one occasion.

But what Erik was more concerned with was my direct manipulation of the contents of the SESSION variable array using the aforementioned functions. The better way would be first copying the contents of that array to my own variables and only then error-proofing the dat. If the array is shared by other pages on the SC bank, then it could be problematic to go ahead and do it with the SC Bank's SESSION variable array itself. While this has not posed a problem for the AntiBank, it is good that I am aware of it now.

Currently there is not a link for the Casino game page anywhere on the SC Bank (like Antica's Casino has on the AntiBank; see http://bank.nafticon.org .) Until I find out whom to pay (or pay off, lol) to get a link on the SC Bank, everyone wanting to bet in this casino game should use the following link: http://shireroth.org/bank/mods/casino/shirewin.php . EasyWin is the only casino game now, but I will not rule out adding more games in the future.

Re: Commonwealth Casino Goes Public

Posted: Thu Dec 03, 2009 11:09 pm
by Erik Mortis
Now all bank functions use trim and strip_tags on all input that goes to the database. So yes, these even taught me a thing or two. Actually.. it might happen a few times in some functions. oh well. A little redundant, but not likely to create a problem.

SESSION can proly be considered safe, as all it's data is taken straight from the server, and I prohibit people from messing with this data. (I wish I could literally prohibit it...) but if you want to make SURE it's safe, keep a local copy of the data to sanitize.

And my comment about loggin still stands. I can give you a table or you can rely on the banks transaction logging if you want.

And as for the link. I haven't decided how to handle this yet. I'll likely make a page for "Businesses". Andreas' market would go here.

Re: Commonwealth Casino Goes Public

Posted: Fri Dec 04, 2009 12:14 am
by Andreas the Wise
I was hoping for a button like "Stock Market".

And Vasroe: Pay it to the new "The Small Commonwealth" account. 500 Erb.

Re: Commonwealth Casino Goes Public

Posted: Fri Dec 04, 2009 7:12 am
by vasroe
Ok. 500 Erb is too high for a link. Maybe we could just go without one. To get the link in Antica's bank I only had to pay 60 P, which works out to be 240 Erb using the current exchange rate.

Re: Commonwealth Casino Goes Public

Posted: Fri Dec 04, 2009 1:37 pm
by Andreas the Wise
You are essentially paying for the right to be hosted on the bank, and interact with it, link included. 500 erb really isn't that much - yes, its more than a days wage, but its a sum that the majority of bank users would have little trouble paying, particularly with the prospect of the business making far more than that. It also provides the SC with some money, which may be helpful in the future.

Re: Commonwealth Casino Goes Public

Posted: Fri Dec 04, 2009 1:46 pm
by Erik Mortis
That actually does seem a little steep to me. He's already had to dish out 50 erb already.

And if I did a link like that for Everyone Andreas, it'll get rather crowded.

Re: Commonwealth Casino Goes Public

Posted: Fri Dec 04, 2009 6:34 pm
by Andreas the Wise
Remind me what he paid 50 for? And 400 erb total, then. If the SC is going to make any sort of money, it might as well make a decent amount. It might be a bit high for Vasroe; but for most people, 500 isn't too much.

Re: Commonwealth Casino Goes Public

Posted: Sat Dec 05, 2009 6:24 pm
by vasroe
I thought the 50.00 Erb I paid was supposed to cover everything. By "everything", I mean the following:
Vasroe wrote:We are prepared to do what is necessary to pay erb for a) an advertisement link on the SC bank, b) the hosting (one or two pages and a few PHP scripts at most), and c) the API hookup to the bank.
However I have stated that I am willing to pay up to 240 more Erb for a link. Why? I wanteto help Andreas out since he said he wants to make some money for the Small Commonwealth, and I do not mind helping out as long as it not so much out of the shareholders' pockets that it hampers the operations of the Casino.

Shareholders, I have just transferred 1000 Erb to my personal account. Do not be alarmed. Since Casino does not allow testing the Casino with the Casino's own account, I am having to use my own personal account to do it. 100% of the money will be returned to the Casino account later this evening.

Re: Commonwealth Casino Goes Public

Posted: Sat Dec 05, 2009 6:36 pm
by vasroe
The money used for testing purposes has now been returned.

Also, shareholders, I would like to announce that Commonwealth Casino has purchased 50% control of Antica Casino. This means we are now officially in the casino business in Antica too. The owner of the other 50%, Aryeztur and his Aryez province, cannot do anything without our consent, as we are the joint shareholders.

Re: Commonwealth Casino Goes Public

Posted: Sat Dec 05, 2009 7:07 pm
by Andreas the Wise
vasroe wrote:I thought the 50.00 Erb I paid was supposed to cover everything. By "everything", I mean the following:
Vasroe wrote:We are prepared to do what is necessary to pay erb for a) an advertisement link on the SC bank, b) the hosting (one or two pages and a few PHP scripts at most), and c) the API hookup to the bank.
However I have stated that I am willing to pay up to 240 more Erb for a link. Why? I wanteto help Andreas out since he said he wants to make some money for the Small Commonwealth, and I do not mind helping out as long as it not so much out of the shareholders' pockets that it hampers the operations of the Casino.

Shareholders, I have just transferred 1000 Erb to my personal account. Do not be alarmed. Since Casino does not allow testing the Casino with the Casino's own account, I am having to use my own personal account to do it. 100% of the money will be returned to the Casino account later this evening.
I'd rather sent the precedent of the correct price - but I'm happy to pay up to 300 erb of the fee from my personal account for you because I know you didn't start with as much money as some people. Others, though, should be able to afford 400 no sweat.

Re: Commonwealth Casino Goes Public

Posted: Sat Dec 05, 2009 7:47 pm
by vasroe
I gratefully accept your offer to pay for 300 Erb of the required fee. To whose account should I send the 100 Erb that comprises the rest of the fee?

Re: Commonwealth Casino Goes Public

Posted: Sat Dec 05, 2009 7:57 pm
by Andreas the Wise
The Small Commonwealth account.

Re: Commonwealth Casino Goes Public

Posted: Sat Dec 05, 2009 8:22 pm
by vasroe
*Sent*