Removed spaces at the end of lines.

This commit is contained in:
Jeremy Fincher 2003-08-20 16:26:23 +00:00
parent 9dc1221045
commit ca646716b1
52 changed files with 5398 additions and 5379 deletions

View File

@ -39,12 +39,14 @@ Commands include:
from baseplugin import *
import re
import time
import conf
import ircdb
import ircmsgs
import privmsgs
import ircutils
import schedule
import callbacks
def configure(onStart, afterConnect, advanced):
@ -55,20 +57,21 @@ def configure(onStart, afterConnect, advanced):
onStart.append('startnickserv %s %s' % (nick, password))
class NickServ(privmsgs.CapabilityCheckingPrivmsg):
capability = 'owner'
capability = 'admin'
def __init__(self):
callbacks.Privmsg.__init__(self)
self.nickserv = ''
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]):
irc.error(msg, conf.replyRequiresPrivacy)
return
(self.nick, self.password, nickserv) = privmsgs.getArgs(args,
needed=2,
optional=1)
(self.nick, self.password, nickserv, chanserv) = \
privmsgs.getArgs(args, needed=2, optional=2)
self.nickserv = nickserv or 'NickServ'
self.chanserv = chanserv or 'ChanServ'
self.sentGhost = False
self._ghosted = re.compile('%s.*killed' % self.nick)
irc.reply(msg, conf.replySuccess)
@ -94,6 +97,19 @@ class NickServ(privmsgs.CapabilityCheckingPrivmsg):
ghost = 'GHOST %s %s' % (self.nick, self.password)
irc.queueMsg(ircmsgs.privmsg(self.nickserv, ghost))
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

View File

@ -188,3 +188,6 @@ driverModule = 'asyncoreDrivers'
###############################
###############################
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: