Exemplo n.º 1
0
def beer(connection, channel, nick, cmd, args):
    global beers
    if beers == 0:
        return plugins.me(connection, channel, "has no beer left :(")

    if not args or not args.strip():
        plugins.me(connection, channel, "passes 1 of %d bottles of cold beer around to %s" % (beers, nick))
    else:
        recv = args.split()[0].strip()
        plugins.me(connection, channel, "and %s pass 1 of %d bottles of cold beer around to %s" % (nick, beers, recv))
    beers -= 1