getHaveOp needs to call getChannel if state.channel isn't set

This commit is contained in:
James Vega 2008-05-22 20:58:22 +00:00
parent 4827155c6b
commit 2f15eb2418
1 changed files with 2 additions and 0 deletions

View File

@ -249,6 +249,8 @@ def getNetworkIrc(irc, msg, args, state, errorIfNoMatch=False):
state.args.append(irc)
def getHaveOp(irc, msg, args, state, action='do that'):
if not state.channel:
getChannel(irc, msg, args, state)
if state.channel not in irc.state.channels:
state.error('I\'m not even in %s.' % state.channel, Raise=True)
if not irc.state.channels[state.channel].isOp(irc.nick):