Revert to r238

This commit is contained in:
Terence Simpson
2011-04-19 17:50:46 +01:00
parent 3e389ccfd8
commit 6b3e58d19d

View File

@ -35,12 +35,6 @@ def get_user(msg):
return False
return user
_stripNickChars = """!"#$%&'()*+,./:;<=>?@~"""
def stripNick(nick):
while nick and nick[-1] in _stripNickChars:
nick = nick[:-1]
return nick
## Taken from Encyclopedia ##
# Repeat filtering message queue
msgcache = {}
@ -78,7 +72,6 @@ class PackageInfo(callbacks.Plugin):
return (before, [])
def __getRelease(self, irc, release, channel, doError=True):
release = release.strip()
defaultRelease = self.registryValue("defaultRelease", channel)
if not defaultRelease:
if doError:
@ -122,9 +115,7 @@ class PackageInfo(callbacks.Plugin):
if rest:
if rest[0] == '|':
try:
target = rest:
while target[0] == '|':
target = target[:1].strip()
target = rest.split()[1]
if target.lower() == "me":
target = msg.nick
queue(irc, reply_target, "%s: %s" % (target, reply))
@ -134,12 +125,9 @@ class PackageInfo(callbacks.Plugin):
pass
elif rest[0] == '>':
try:
targets = [_ for _ in rest.split() if _] # Split and discard empty parts
target = stripNick(targets[0]) # Take the first "nick" and strip off bad chars
target = rest.split()[1]
if target.lower() == "me":
target = msg.nick # redirect
if not target: # Throw error
raise Exception, 'No target'
target = msg.nick
queue(irc, target, "<%s> wants you to know: %s" % (msg.nick, reply))
return
except Exception, e:
@ -165,9 +153,7 @@ class PackageInfo(callbacks.Plugin):
if rest:
if rest[0] == '|':
try:
target = rest:
while target[0] == '|':
target = target[:1].strip()
target = rest.split()[1]
if target.lower() == "me":
target = msg.nick
queue(irc, reply_target, "%s: %s" % (target, reply))
@ -177,12 +163,9 @@ class PackageInfo(callbacks.Plugin):
pass
elif rest[0] == '>':
try:
targets = [_ for _ in rest.split() if _] # Split and discard empty parts
target = stripNick(targets[0]) # Take the first "nick" and strip off bad chars
target = rest.split()[1]
if target.lower() == "me":
target = msg.nick # redirect
if not target: # Throw error
raise Exception, 'No target'
target = msg.nick
queue(irc, target, "<%s> wants you to know: %s" % (msg.nick, reply))
return
except Exception, e: