Merge branch 'develop' of github.com:ClouDev/CloudBot into develop

This commit is contained in:
Luke Rogers 2012-10-01 21:31:55 +13:00
commit 6fe8fbaee6
2 changed files with 9 additions and 10 deletions

View file

@ -111,11 +111,11 @@ The programs `daemon` or `screen` are recomended for the launcher to run optimal
The developers of CloudBot run two CloudBots on [Espernet](http://esper.net).
They can both be found in [#CloudBot](irc://irc.esper.net/cloudbot "Connect via IRC to #CloudBot on irc.esper.net).
They can both be found in [#CloudBot](irc://irc.esper.net/cloudbot "Connect via IRC to #CloudBot on irc.esper.net").
**mau5bot** is the semi-stable bot, and runs on the latest stable development version of CloudBot. (mau5bot is running on **Ubuntu Server** *12.04* with **Python** *2.7.3*)
**neerbot** is currently running an outdated version of the develop branch. (neerbot is running on **Debian** *Wheezy/Testing* with **Python** *2.7.2*)
**neerbot** is unstable bot, and runs on the `HEAD` of the `develop` branch. (neerbot is running on **Debian** *Wheezy/Testing* with **Python** *2.7.2*)
## License

View file

@ -6,16 +6,15 @@ import random
def coin(inp, me=None):
"coin [amount] -- Flips [amount] of coins."
try:
amount = int(inp)
except ValueError:
return "Invalid input!"
if inp:
try:
amount = int(inp)
except (ValueError, TypeError):
return "Invalid input!"
else:
amount = 1
if amount == 1:
if getrandbits(1):
me("flips a coin and gets heads.")
else:
me("flips a coin and gets tails.")
me("flips a coin and gets %s." % random.choice(["heads", "tails"]))
elif amount == 0:
me("makes a coin flipping motion with its hands.")