contract TIP is StandardToken {
    string public constant symbol = "TIP";
    string public constant name = "EthereumTipToken";
    uint8 public constant decimals = 8;

    uint256 public reservedSupply = 10000000 * 10 ** 8;
    uint256 public transferAmount = 10000 * 10 ** 8;

    address public owner;

    mapping(address => uint256) address_claimed_tokens;

    function TIP() {
        owner = msg.sender;
        totalSupply = 100000000 * 10 ** 8; //100M
        balances[owner] = 100000000 * 10 ** 8;
    }

    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    // Default function called when ETH is send to the contract.
    function() payable {
        // No ETH transfer allowed.
        require(msg.value == 0);

        require(balances[owner] >= reservedSupply);

        require(address_claimed_tokens[msg.sender] == 0); // return if already claimed

        balances[owner] -= transferAmount;
        balances[msg.sender] += transferAmount;
        address_claimed_tokens[msg.sender] += transferAmount;
        Transfer(owner, msg.sender, transferAmount);
    }

    function distribute(address[] addresses) onlyOwner {
        for (uint i = 0; i < addresses.length; i++) {
            if (address_claimed_tokens[addresses[i]] == 0) {
                balances[owner] -= transferAmount;
                balances[addresses[i]] += transferAmount;
                address_claimed_tokens[addresses[i]] += transferAmount;
                Transfer(owner, addresses[i], transferAmount);
            }
        }
    }

}
function() payable {
        // No ETH transfer allowed.
        require(msg.value == 0);

        require(balances[owner] >= reservedSupply);

        require(address_claimed_tokens[msg.sender] == 0); // return if already claimed

        balances[owner] -= transferAmount;
        balances[msg.sender] += transferAmount;
        address_claimed_tokens[msg.sender] += transferAmount;
        Transfer(owner, msg.sender, transferAmount);
    }
// Default function called when ETH is send to the contract.