mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Removed spaces at the end of lines.
This commit is contained in:
parent
9dc1221045
commit
ca646716b1
@ -39,12 +39,14 @@ Commands include:
|
|||||||
from baseplugin import *
|
from baseplugin import *
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import time
|
||||||
|
|
||||||
import conf
|
import conf
|
||||||
import ircdb
|
import ircdb
|
||||||
import ircmsgs
|
import ircmsgs
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import ircutils
|
import ircutils
|
||||||
|
import schedule
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart, afterConnect, advanced):
|
||||||
@ -55,20 +57,21 @@ def configure(onStart, afterConnect, advanced):
|
|||||||
onStart.append('startnickserv %s %s' % (nick, password))
|
onStart.append('startnickserv %s %s' % (nick, password))
|
||||||
|
|
||||||
class NickServ(privmsgs.CapabilityCheckingPrivmsg):
|
class NickServ(privmsgs.CapabilityCheckingPrivmsg):
|
||||||
capability = 'owner'
|
capability = 'admin'
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
callbacks.Privmsg.__init__(self)
|
callbacks.Privmsg.__init__(self)
|
||||||
self.nickserv = ''
|
self.nickserv = ''
|
||||||
|
|
||||||
def startnickserv(self, irc, msg, args):
|
def startnickserv(self, irc, msg, args):
|
||||||
"<bot's nick> <password> <NickServ's nick (defaults to NickServ)>"
|
"<bot's nick> <password> <NickServ's nick (defaults to NickServ)> " \
|
||||||
|
"<ChanServ's nick (defaults to ChanServ)"
|
||||||
if ircutils.isChannel(msg.args[0]):
|
if ircutils.isChannel(msg.args[0]):
|
||||||
irc.error(msg, conf.replyRequiresPrivacy)
|
irc.error(msg, conf.replyRequiresPrivacy)
|
||||||
return
|
return
|
||||||
(self.nick, self.password, nickserv) = privmsgs.getArgs(args,
|
(self.nick, self.password, nickserv, chanserv) = \
|
||||||
needed=2,
|
privmsgs.getArgs(args, needed=2, optional=2)
|
||||||
optional=1)
|
|
||||||
self.nickserv = nickserv or 'NickServ'
|
self.nickserv = nickserv or 'NickServ'
|
||||||
|
self.chanserv = chanserv or 'ChanServ'
|
||||||
self.sentGhost = False
|
self.sentGhost = False
|
||||||
self._ghosted = re.compile('%s.*killed' % self.nick)
|
self._ghosted = re.compile('%s.*killed' % self.nick)
|
||||||
irc.reply(msg, conf.replySuccess)
|
irc.reply(msg, conf.replySuccess)
|
||||||
@ -94,6 +97,19 @@ class NickServ(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
ghost = 'GHOST %s %s' % (self.nick, self.password)
|
ghost = 'GHOST %s %s' % (self.nick, self.password)
|
||||||
irc.queueMsg(ircmsgs.privmsg(self.nickserv, ghost))
|
irc.queueMsg(ircmsgs.privmsg(self.nickserv, ghost))
|
||||||
self.sentGhost = True
|
self.sentGhost = True
|
||||||
|
def flipSentGhost():
|
||||||
|
self.sentGhost = False
|
||||||
|
schedule.addEvent(flipSentGhost, time.time() + 300)
|
||||||
|
|
||||||
|
def getops(self, irc, msg, args):
|
||||||
|
"""[<channel>]
|
||||||
|
|
||||||
|
Attempts to get ops from ChanServ in <channel>. If no channel is
|
||||||
|
given, the current channel is assumed.
|
||||||
|
"""
|
||||||
|
channel = privmsgs.getChannel(msg, args)
|
||||||
|
irc.sendMsg(ircmsgs.privmsg(self.chanserv, 'op %s' % channel))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Class = NickServ
|
Class = NickServ
|
||||||
|
@ -188,3 +188,6 @@ driverModule = 'asyncoreDrivers'
|
|||||||
###############################
|
###############################
|
||||||
###############################
|
###############################
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user