LinkRelay: remove extra spaces/lines

This commit is contained in:
GLolol 2014-06-17 15:37:21 -07:00
parent d9b5e99518
commit e77d9e72df

View File

@ -72,7 +72,6 @@ class LinkRelay(callbacks.Plugin):
self.hasTargetIRC = False self.hasTargetIRC = False
self.hasSourceIRCChannels = False self.hasSourceIRCChannels = False
def __init__(self, irc): def __init__(self, irc):
self.__parent = super(LinkRelay, self) self.__parent = super(LinkRelay, self)
self.__parent.__init__(irc) self.__parent.__init__(irc)
@ -119,8 +118,6 @@ class LinkRelay(callbacks.Plugin):
continue continue
self.nickSubstitutions[substitute[0]] = substitute[1] self.nickSubstitutions[substitute[0]] = substitute[1]
def simpleHash(self, s): def simpleHash(self, s):
colors = ["\x0305", "\x0304", "\x0303", "\x0309", "\x0302", "\x0312", colors = ["\x0305", "\x0304", "\x0303", "\x0309", "\x0302", "\x0312",
"\x0306", "\x0313", "\x0310", "\x0311", "\x0307"] "\x0306", "\x0313", "\x0310", "\x0311", "\x0307"]
@ -130,7 +127,6 @@ class LinkRelay(callbacks.Plugin):
num = num % 11 num = num % 11
return colors[num] return colors[num]
def getPrivmsgData(self, channel, nick, text, colored): def getPrivmsgData(self, channel, nick, text, colored):
color = self.simpleHash(nick) color = self.simpleHash(nick)
if nick in self.nickSubstitutions: if nick in self.nickSubstitutions:
@ -155,7 +151,6 @@ class LinkRelay(callbacks.Plugin):
{'nick': nick, 'text': text}) {'nick': nick, 'text': text})
return s return s
@internationalizeDocstring @internationalizeDocstring
def list(self, irc, msg, args): def list(self, irc, msg, args):
"""takes no arguments """takes no arguments
@ -211,7 +206,6 @@ class LinkRelay(callbacks.Plugin):
s = '(via PM) %s' % s s = '(via PM) %s' % s
self.sendToOthers(irc, channel, s, args, isPrivmsg=True) self.sendToOthers(irc, channel, s, args, isPrivmsg=True)
def outFilter(self, irc, msg): def outFilter(self, irc, msg):
if msg.command == 'PRIVMSG': if msg.command == 'PRIVMSG':
if not msg.relayedMsg: if not msg.relayedMsg:
@ -221,7 +215,6 @@ class LinkRelay(callbacks.Plugin):
self.sendToOthers(irc, msg.args[0], s, args, isPrivmsg=True) self.sendToOthers(irc, msg.args[0], s, args, isPrivmsg=True)
return msg return msg
def doPing(self, irc, msg): def doPing(self, irc, msg):
self.addIRC(irc) self.addIRC(irc)
@ -373,7 +366,6 @@ class LinkRelay(callbacks.Plugin):
relay.messageRegex.search(new_s): relay.messageRegex.search(new_s):
send(new_s) send(new_s)
def addIRC(self, irc): def addIRC(self, irc):
match = False match = False
for relay in self.relays: for relay in self.relays:
@ -384,7 +376,6 @@ class LinkRelay(callbacks.Plugin):
relay.targetIRC = irc relay.targetIRC = irc
relay.hasTargetIRC = True relay.hasTargetIRC = True
@internationalizeDocstring @internationalizeDocstring
def nicks(self, irc, msg, args, channel): def nicks(self, irc, msg, args, channel):
"""[<channel>] """[<channel>]
@ -453,8 +444,7 @@ class LinkRelay(callbacks.Plugin):
irc.noReply() irc.noReply()
nicks = wrap(nicks, ['Channel']) nicks = wrap(nicks, ['Channel'])
# The following functions handle configuration
# The fellowing functions handle configuration
def _writeToConfig(self, from_, to, regexp, add): def _writeToConfig(self, from_, to, regexp, add):
from_, to = from_.split('@'), to.split('@') from_, to = from_.split('@'), to.split('@')
args = from_ args = from_
@ -654,7 +644,6 @@ class LinkRelay(callbacks.Plugin):
self.setRegistryValue('substitutes', value=substitutes) self.setRegistryValue('substitutes', value=substitutes)
@internationalizeDocstring @internationalizeDocstring
def substitute(self, irc, msg, args, regexp, to): def substitute(self, irc, msg, args, regexp, to):
"""<regexp> <replacement> """<regexp> <replacement>
@ -691,8 +680,6 @@ class LinkRelay(callbacks.Plugin):
nosubstitute = wrap(nosubstitute, [('checkCapability', 'admin'), nosubstitute = wrap(nosubstitute, [('checkCapability', 'admin'),
'something']) 'something'])
Class = LinkRelay Class = LinkRelay
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: