|
@@ -196,8 +196,14 @@ def do_command(self, connection, event):
|
|
|
elif len(command.split()) > 3:
|
|
elif len(command.split()) > 3:
|
|
|
connection.privmsg(replyto, "Too many arguments. For help type " + blue + self.helpchar + "givecoin" + reset + ".")
|
|
connection.privmsg(replyto, "Too many arguments. For help type " + blue + self.helpchar + "givecoin" + reset + ".")
|
|
|
return
|
|
return
|
|
|
|
|
+ elif command.split()[1] == event.source.nick.lower():
|
|
|
|
|
+ connection.privmsg(replyto, "You already have your own coin. For help type " + blue + self.helpchar + "givecoin" + reset + ".")
|
|
|
|
|
+ return
|
|
|
level, xp, xpspent, karma, coin = GameHelpers.get_info(self, event.source.nick)
|
|
level, xp, xpspent, karma, coin = GameHelpers.get_info(self, event.source.nick)
|
|
|
- if coin < 1:
|
|
|
|
|
|
|
+ if level < 0:
|
|
|
|
|
+ connection.privmsg(replyto, "You need to " + blue + self.cmdchar + "levelup " + reset + "to be able to give coin.")
|
|
|
|
|
+ return
|
|
|
|
|
+ elif coin < 1:
|
|
|
connection.privmsg(replyto, "You have no coin to give.")
|
|
connection.privmsg(replyto, "You have no coin to give.")
|
|
|
return
|
|
return
|
|
|
elif not self.db.one("SELECT id FROM users WHERE LOWER(name)=%s AND network='" + self.network + "'", (command.split()[1], )):
|
|
elif not self.db.one("SELECT id FROM users WHERE LOWER(name)=%s AND network='" + self.network + "'", (command.split()[1], )):
|