From 602c99a6ff2a5d6f374317d2c996f4d3eec1b37d Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Fri, 26 Feb 2016 22:39:28 +0100 Subject: [PATCH] Detect op status on joining empty channel --- src/wolfgame.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wolfgame.py b/src/wolfgame.py index 4d1309e..ac878ee 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -3381,9 +3381,14 @@ def on_join(cli, raw_nick, chan, acc="*", rname=""): var.PLAYERS[nick] = var.DCED_PLAYERS.pop(nick) if nick == botconfig.NICK: var.OPPED = False + cli.send("NAMES " + chan) if nick == "ChanServ" and not var.OPPED: cli.msg("ChanServ", "op " + chan) +@hook("namreply") +def on_names(cli, _, __, *names): + if "@" + botconfig.NICK in names: + var.OPPED = True @cmd("goat", playing=True, phases=("day",)) def goat(cli, nick, chan, rest):