!away, !back: advertise pingif

This commit is contained in:
Janik Kleinhoff 2015-04-13 21:45:41 +00:00
parent 01a49b9aeb
commit 6b99dafd1e

View File

@ -774,6 +774,8 @@ def is_user_notice(nick):
def away(cli, nick, chan, rest): def away(cli, nick, chan, rest):
"""Use this to activate your away status (so you aren't pinged).""" """Use this to activate your away status (so you aren't pinged)."""
nick, _, _, cloak = parse_nick(nick) nick, _, _, cloak = parse_nick(nick)
prefix = botconfig.CMD_CHAR
pm(cli, nick, "\u0002Please note that the {0}away/{0}back system will be deprecated in favor of {0}pingif.\u0002 See \u0002{0}help pingif\u0002 for details.".format(prefix))
if var.OPT_IN_PING: if var.OPT_IN_PING:
if not rest: # don't want to trigger on unrelated messages if not rest: # don't want to trigger on unrelated messages
cli.notice(nick, "Please use {0}in and {0}out to opt in or out of the ping list.".format(botconfig.CMD_CHAR)) cli.notice(nick, "Please use {0}in and {0}out to opt in or out of the ping list.".format(botconfig.CMD_CHAR))
@ -783,7 +785,6 @@ def away(cli, nick, chan, rest):
acc = var.USERS[nick]["account"] acc = var.USERS[nick]["account"]
else: else:
acc = None acc = None
prefix = botconfig.CMD_CHAR
if not acc or acc == "*": if not acc or acc == "*":
acc = None acc = None
if acc: # Do it all by accounts if logged in if acc: # Do it all by accounts if logged in
@ -815,6 +816,8 @@ def away(cli, nick, chan, rest):
def back_from_away(cli, nick, chan, rest): def back_from_away(cli, nick, chan, rest):
"""Unsets your away status.""" """Unsets your away status."""
nick, _, _, cloak = parse_nick(nick) nick, _, _, cloak = parse_nick(nick)
prefix = botconfig.CMD_CHAR
pm(cli, nick, "\u0002Please note that the {0}away/{0}back system will be deprecated in favor of {0}pingif.\u0002 See \u0002{0}help pingif\u0002 for details.".format(prefix))
if var.OPT_IN_PING: if var.OPT_IN_PING:
if not rest: if not rest:
cli.notice(nick, "Please use {0}in and {0}out to opt in or out of the ping list.".format(botconfig.CMD_CHAR)) cli.notice(nick, "Please use {0}in and {0}out to opt in or out of the ping list.".format(botconfig.CMD_CHAR))