Encyclopedia: Guard against mistakes.
This commit is contained in:
@ -24,7 +24,7 @@ import supybot
|
||||
import supybot.world as world
|
||||
from importlib import reload
|
||||
|
||||
__version__ = "3.4.0"
|
||||
__version__ = "3.5.0"
|
||||
__author__ = supybot.Author("Krytarik Raido", "krytarik", "krytarik@gmail.com")
|
||||
__contributors__ = {
|
||||
supybot.Author("Dennis Kaarsemaker", "Seveas", "dennis@kaarsemaker.net"): ['Original Author'],
|
||||
|
@ -495,7 +495,8 @@ class Encyclopedia(callbacks.Plugin):
|
||||
elif re.match(r'^[^|\s]+[^|]*?\s+is(\s+|\b)\S+', text, re.I):
|
||||
edit = 'add'
|
||||
else:
|
||||
text, target, retmsg = term
|
||||
if not display:
|
||||
text, target, retmsg = term
|
||||
ret = self.factoid_lookup(text, channel, msg.nick, display)
|
||||
|
||||
if edit:
|
||||
@ -697,6 +698,8 @@ class Encyclopedia(callbacks.Plugin):
|
||||
if not match:
|
||||
return
|
||||
name = match.group('name').lower()
|
||||
if re.match(r'.*<(reply|alias|sed)>.*', name):
|
||||
return "You likely don't want this, %s" % editor
|
||||
value = match.group('value')
|
||||
if value.startswith(('also ', 'also:')):
|
||||
name += '-also'
|
||||
|
Reference in New Issue
Block a user