|
|
@ -247,9 +247,16 @@ def pinger(cli, nick, chan, rest): |
|
|
|
if not var.PINGING: return |
|
|
|
if not var.PINGING: return |
|
|
|
if user in (botconfig.NICK, nick): return # Don't ping self. |
|
|
|
if user in (botconfig.NICK, nick): return # Don't ping self. |
|
|
|
|
|
|
|
|
|
|
|
if (var.PINGING and 'G' not in status and |
|
|
|
if (all((not var.OPT_IN_PING, |
|
|
|
'+' not in status and cloak not in var.AWAY): |
|
|
|
'G' not in status, # not /away |
|
|
|
|
|
|
|
'+' not in status, # not already joined (voiced) |
|
|
|
|
|
|
|
cloak not in var.AWAY)) or |
|
|
|
|
|
|
|
all((var.OPT_IN_PING, '+' not in status, |
|
|
|
|
|
|
|
cloak in var.PING_IN))): |
|
|
|
|
|
|
|
|
|
|
|
TO_PING.append(user) |
|
|
|
TO_PING.append(user) |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
print(var.OPT_IN_PING, var.PINGING, status, cloak) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -271,9 +278,29 @@ def pinger(cli, nick, chan, rest): |
|
|
|
cli.who(botconfig.CHANNEL) |
|
|
|
cli.who(botconfig.CHANNEL) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@cmd("away", raw_nick=True) |
|
|
|
@cmd("simple", raw_nick = True) |
|
|
|
@pmcmd("away", raw_nick=True) |
|
|
|
@pmcmd("simple", raw_nick = True) |
|
|
|
def away(cli, nick, *rest): |
|
|
|
def mark_simple_notify(cli, nick, *rest): |
|
|
|
|
|
|
|
"""If you want the bot to NOTICE you for every interaction""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nick, _, __, cloak = parse_nick(nick) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if cloak in var.SIMPLE_NOTIFY: |
|
|
|
|
|
|
|
var.SIMPLE_NOTIFY.remove(cloak) |
|
|
|
|
|
|
|
var.remove_simple_rolemsg(cloak) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cli.notice(nick, "You now no longer receive simple role instructions.") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var.SIMPLE_NOTIFY.append(cloak) |
|
|
|
|
|
|
|
var.add_simple_rolemsg(cloak) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cli.notice(nick, "You now receive simple role instructions.") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not var.OPT_IN_PING: |
|
|
|
|
|
|
|
@cmd("away", raw_nick=True) |
|
|
|
|
|
|
|
@pmcmd("away", raw_nick=True) |
|
|
|
|
|
|
|
def away(cli, nick, *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).""" |
|
|
|
cloak = parse_nick(nick)[3] |
|
|
|
cloak = parse_nick(nick)[3] |
|
|
|
nick = parse_nick(nick)[0] |
|
|
|
nick = parse_nick(nick)[0] |
|
|
@ -288,9 +315,9 @@ def away(cli, nick, *rest): |
|
|
|
|
|
|
|
|
|
|
|
cli.notice(nick, "You are now marked as away.") |
|
|
|
cli.notice(nick, "You are now marked as away.") |
|
|
|
|
|
|
|
|
|
|
|
@cmd("back", raw_nick=True) |
|
|
|
@cmd("back", raw_nick=True) |
|
|
|
@pmcmd("back", raw_nick=True) |
|
|
|
@pmcmd("back", raw_nick=True) |
|
|
|
def back_from_away(cli, nick, *rest): |
|
|
|
def back_from_away(cli, nick, *rest): |
|
|
|
"""Unmarks away status""" |
|
|
|
"""Unmarks away status""" |
|
|
|
cloak = parse_nick(nick)[3] |
|
|
|
cloak = parse_nick(nick)[3] |
|
|
|
nick = parse_nick(nick)[0] |
|
|
|
nick = parse_nick(nick)[0] |
|
|
@ -302,24 +329,34 @@ def back_from_away(cli, nick, *rest): |
|
|
|
|
|
|
|
|
|
|
|
cli.notice(nick, "You are no longer marked as away.") |
|
|
|
cli.notice(nick, "You are no longer marked as away.") |
|
|
|
|
|
|
|
|
|
|
|
@cmd("simple", raw_nick = True) |
|
|
|
|
|
|
|
@pmcmd("simple", raw_nick = True) |
|
|
|
|
|
|
|
def mark_simple_notify(cli, nick, *rest): |
|
|
|
|
|
|
|
"""If you want the bot to NOTICE you for every interaction""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nick, _, __, cloak = parse_nick(nick) |
|
|
|
else: # if OPT_IN_PING setting is on |
|
|
|
|
|
|
|
@cmd("in", raw_nick=True) |
|
|
|
|
|
|
|
@pmcmd("in", raw_nick=True) |
|
|
|
|
|
|
|
def get_in(cli, nick, *rest): |
|
|
|
|
|
|
|
"""Get yourself in the ping list""" |
|
|
|
|
|
|
|
nick, _, _, cloak = parse_nick(nick) |
|
|
|
|
|
|
|
if cloak in var.PING_IN: |
|
|
|
|
|
|
|
cli.notice(nick, "You are already on the list") |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
var.PING_IN.append(cloak) |
|
|
|
|
|
|
|
var.add_ping(cloak) |
|
|
|
|
|
|
|
|
|
|
|
if cloak in var.SIMPLE_NOTIFY: |
|
|
|
cli.notice(nick, "You are now on the list.") |
|
|
|
var.SIMPLE_NOTIFY.remove(cloak) |
|
|
|
|
|
|
|
var.remove_simple_rolemsg(cloak) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cli.notice(nick, "You now no longer receive simple role instructions.") |
|
|
|
@cmd("out", raw_nick=True) |
|
|
|
return |
|
|
|
@pmcmd("out", raw_nick=True) |
|
|
|
|
|
|
|
def get_out(cli, nick, *rest): |
|
|
|
|
|
|
|
"""Removes yourself from the ping list""" |
|
|
|
|
|
|
|
nick, _, _, cloak = parse_nick(nick) |
|
|
|
|
|
|
|
if cloak in var.PING_IN: |
|
|
|
|
|
|
|
var.PING_IN.remove(cloak) |
|
|
|
|
|
|
|
var.remove_ping(cloak) |
|
|
|
|
|
|
|
|
|
|
|
var.SIMPLE_NOTIFY.append(cloak) |
|
|
|
cli.notice(nick, "You are no longer in the list.") |
|
|
|
var.add_simple_rolemsg(cloak) |
|
|
|
return |
|
|
|
|
|
|
|
cli.notice(nick, "You are not in the list.") |
|
|
|
|
|
|
|
|
|
|
|
cli.notice(nick, "You now receive simple role instructions.") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@cmd("fping", admin_only=True) |
|
|
|
@cmd("fping", admin_only=True) |
|
|
|
def fpinger(cli, nick, chan, rest): |
|
|
|
def fpinger(cli, nick, chan, rest): |
|
|
|