|
|
@@ -216,6 +216,10 @@ def do_command(self, connection, event):
|
|
|
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
|
|
|
+ elif not event.target == connection.get_nickname():
|
|
|
+ if not command.split()[1] in self.channels[event.target].users():
|
|
|
+ connection.privmsg(replyto, red + trigger.split()[2] + reset + " is not present.")
|
|
|
+ return
|
|
|
|
|
|
level, xp, xpspent, totalxp, karma, coin, coinspent, coingiven, ap, apspent = GameHelpers.get_info(self, event.source.nick)
|
|
|
receivingrecord = self.db.one("SELECT level, away FROM users WHERE LOWER(name)=%s AND network=%s", (command.split()[1], self.network, ))
|
|
|
@@ -241,7 +245,7 @@ def do_command(self, connection, event):
|
|
|
self.db.run("UPDATE users SET coin=coin-1, coin_spent=coin_spent+1, coin_given=coin_given+1, ap_spent=ap_spent+1 WHERE name=%s AND network=%s", (event.source.nick, self.network, ))
|
|
|
self.db.run("UPDATE users SET coin=coin+1 WHERE LOWER(name)=%s AND network=%s", (command.split()[1], self.network, ))
|
|
|
elif len(command.split()) == 3:
|
|
|
- self.db.run("UPDATE users SET coin=coin-%s, coin_spent=coint_spent+%s coin_given=coin_given+%s, ap_spent=ap_spent+%s WHERE name=%s AND network=%s", (command.split()[2], command.split()[2], command.split()[2], command.split()[2], event.source.nick, self.network, ))
|
|
|
+ self.db.run("UPDATE users SET coin=coin-%s, coin_spent=coint_spent+%s, coin_given=coin_given+%s, ap_spent=ap_spent+%s WHERE name=%s AND network=%s", (command.split()[2], command.split()[2], command.split()[2], command.split()[2], event.source.nick, self.network, ))
|
|
|
self.db.run("UPDATE users SET coin=coin+%s WHERE LOWER(name)=%s AND network=%s", (command.split()[2], command.split()[1], self.network))
|
|
|
|
|
|
elif command.split()[0] == "players":
|