Refactor calls to reply() to explicitly use 'private' keyword argument
This commit is contained in:
parent
8c4956469e
commit
7d6fab1f01
@ -810,11 +810,11 @@ def altpinger(cli, nick, chan, rest):
|
|||||||
host = var.USERS[nick]["host"]
|
host = var.USERS[nick]["host"]
|
||||||
acc = var.USERS[nick]["account"]
|
acc = var.USERS[nick]["account"]
|
||||||
else:
|
else:
|
||||||
reply(cli, nick, chan, "You need to be in {0} to use that command.".format(botconfig.CHANNEL), True)
|
reply(cli, nick, chan, "You need to be in {0} to use that command.".format(botconfig.CHANNEL), private=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (not acc or acc == "*") and var.ACCOUNTS_ONLY:
|
if (not acc or acc == "*") and var.ACCOUNTS_ONLY:
|
||||||
reply(cli, nick, chan, "You are not logged in to NickServ.", True)
|
reply(cli, nick, chan, "You are not logged in to NickServ.", private=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
msg = []
|
msg = []
|
||||||
@ -853,7 +853,7 @@ def altpinger(cli, nick, chan, rest):
|
|||||||
else:
|
else:
|
||||||
msg.append("Invalid parameter. Please enter a non-negative integer or a valid preference.")
|
msg.append("Invalid parameter. Please enter a non-negative integer or a valid preference.")
|
||||||
|
|
||||||
reply(cli, nick, chan, "\n".join(msg), True)
|
reply(cli, nick, chan, "\n".join(msg), private=True)
|
||||||
|
|
||||||
def is_user_altpinged(nick):
|
def is_user_altpinged(nick):
|
||||||
if nick in var.USERS.keys():
|
if nick in var.USERS.keys():
|
||||||
@ -1083,11 +1083,11 @@ def deadchat_pref(cli, nick, chan, rest):
|
|||||||
host = var.USERS[nick]["host"]
|
host = var.USERS[nick]["host"]
|
||||||
acc = var.USERS[nick]["account"]
|
acc = var.USERS[nick]["account"]
|
||||||
else:
|
else:
|
||||||
reply(cli, nick, chan, "You need to be in {0} to use that command.".format(botconfig.CHANNEL), True)
|
reply(cli, nick, chan, "You need to be in {0} to use that command.".format(botconfig.CHANNEL), private=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (not acc or acc == "*") and var.ACCOUNTS_ONLY:
|
if (not acc or acc == "*") and var.ACCOUNTS_ONLY:
|
||||||
reply(cli, nick, chan, "You are not logged in to NickServ.", True)
|
reply(cli, nick, chan, "You are not logged in to NickServ.", private=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
if acc and acc != "*":
|
if acc and acc != "*":
|
||||||
@ -1107,7 +1107,7 @@ def deadchat_pref(cli, nick, chan, rest):
|
|||||||
variable.add(value)
|
variable.add(value)
|
||||||
var.add_deadchat_pref(value, value == acc)
|
var.add_deadchat_pref(value, value == acc)
|
||||||
|
|
||||||
reply(cli, nick, chan, msg, True)
|
reply(cli, nick, chan, msg, private=True)
|
||||||
|
|
||||||
@cmd("join", "j", pm=True)
|
@cmd("join", "j", pm=True)
|
||||||
def join(cli, nick, chan, rest):
|
def join(cli, nick, chan, rest):
|
||||||
@ -1349,7 +1349,7 @@ def fleave(cli, nick, chan, rest):
|
|||||||
dcll = [x.lower() for x in dcl]
|
dcll = [x.lower() for x in dcl]
|
||||||
if a.lower() in pll:
|
if a.lower() in pll:
|
||||||
if chan != botconfig.CHANNEL:
|
if chan != botconfig.CHANNEL:
|
||||||
reply(cli, nick, chan, "Forcing a live player to leave must be done in channel", True)
|
reply(cli, nick, chan, "Forcing a live player to leave must be done in channel", private=True)
|
||||||
return
|
return
|
||||||
a = pl[pll.index(a.lower())]
|
a = pl[pll.index(a.lower())]
|
||||||
|
|
||||||
@ -1379,7 +1379,7 @@ def fleave(cli, nick, chan, rest):
|
|||||||
|
|
||||||
leave_deadchat(cli, a, force=nick)
|
leave_deadchat(cli, a, force=nick)
|
||||||
if nick.lower() not in dcll:
|
if nick.lower() not in dcll:
|
||||||
reply(cli, nick, chan, "You have forced {0} to leave the deadchat".format(a), True)
|
reply(cli, nick, chan, "You have forced {0} to leave the deadchat".format(a), private=True)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
cli.msg(chan, nick+": That person is not playing.")
|
cli.msg(chan, nick+": That person is not playing.")
|
||||||
@ -8977,7 +8977,7 @@ def player_stats(cli, nick, chan, rest):
|
|||||||
|
|
||||||
# List the player's total games for all roles if no role is given
|
# List the player's total games for all roles if no role is given
|
||||||
if len(params) < 2:
|
if len(params) < 2:
|
||||||
reply(cli, nick, chan, var.get_player_totals(acc), True)
|
reply(cli, nick, chan, var.get_player_totals(acc), private=True)
|
||||||
else:
|
else:
|
||||||
role = " ".join(params[1:])
|
role = " ".join(params[1:])
|
||||||
if role not in var.ROLE_GUIDE.keys():
|
if role not in var.ROLE_GUIDE.keys():
|
||||||
@ -9035,7 +9035,7 @@ def show_modes(cli, nick, chan, rest):
|
|||||||
msg = "Available game modes: \u0002"
|
msg = "Available game modes: \u0002"
|
||||||
modes = "\u0002, \u0002".join(sorted(var.GAME_MODES.keys() - {"roles"}))
|
modes = "\u0002, \u0002".join(sorted(var.GAME_MODES.keys() - {"roles"}))
|
||||||
|
|
||||||
reply(cli, nick, chan, msg + modes + "\u0002", True)
|
reply(cli, nick, chan, msg + modes + "\u0002", private=True)
|
||||||
|
|
||||||
def game_help(args=""):
|
def game_help(args=""):
|
||||||
return "Votes to make a specific game mode more likely. Available game mode setters: " +\
|
return "Votes to make a specific game mode more likely. Available game mode setters: " +\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user