Fundraising contract

Hi guys,
I'm trying to understand Eth. and I wrote this contract:
contract Fundraising {

    mapping(address => bool) is_already;
    address[] public people;

    function Fundraising() {
        is_already[msg.sender] = true;
        add(msg.sender);
    }

    function add(address addr) {
        if (!is_already[msg.sender])
            return;
        is_already[addr] = true;
        people.length = people.length + 1;
        people[people.length-1] = addr;
    }

    function claim() {
        /* splits the donated money to all people */
        if (!is_already[msg.sender])
            return;
        var money = address(this).balance;
        if (money < 100)
            return;
        uint each = money / people.length;
        for(uint i = 0; i < people.length; i++) {
            people[i].send(each);
        }
    }
}
I have a few questions here:
1) does it work, i.e., will it split the money on the contract's address every time
one of people in 'people' calls claim()?
2) if yes, then who pays the gas for the each transaction in the loop at the end?
is it the contract that pays or msg.sender?
4) will the transactions made in the loop show up on etherchain.org?

Cheers,
me

Comments

Sign In or Register to comment.