diff --git a/README.md b/README.md index 7862707..a5e27e9 100755 --- a/README.md +++ b/README.md @@ -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 diff --git a/plugins/coin.py b/plugins/coin.py index 5fdc906..d96c587 100755 --- a/plugins/coin.py +++ b/plugins/coin.py @@ -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.")