mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-18 22:51:01 +01:00
Added checking for ops and actually being in the channel to getops.
This commit is contained in:
parent
f515bd3ec2
commit
61eb55fa57
@ -171,7 +171,13 @@ class Services(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
given, the current channel is assumed.
|
given, the current channel is assumed.
|
||||||
"""
|
"""
|
||||||
channel = privmsgs.getChannel(msg, args)
|
channel = privmsgs.getChannel(msg, args)
|
||||||
irc.sendMsg(ircmsgs.privmsg(self.chanserv, 'op %s' % channel))
|
try:
|
||||||
|
if irc.nick in irc.state.channels[channel].ops:
|
||||||
|
irc.error(msg, 'I\'ve already got ops in %sx' % channel)
|
||||||
|
else:
|
||||||
|
irc.sendMsg(ircmsgs.privmsg(self.chanserv, 'op %s' % channel))
|
||||||
|
except KeyError:
|
||||||
|
irc.error(msg, 'I\'m not in %s.' % channel)
|
||||||
|
|
||||||
def identify(self, irc, msg, args):
|
def identify(self, irc, msg, args):
|
||||||
"""takes no arguments
|
"""takes no arguments
|
||||||
|
Loading…
x
Reference in New Issue
Block a user