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