mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
* Decided to ditch the "_is_" syntax. I never liked it and implementing it
may prove to be difficult here. It may find its way back in, but there's no point in having it in there now when it doesn't work right anyway.
This commit is contained in:
parent
aee5c6c18e
commit
a63ee1e304
@ -221,14 +221,14 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
||||
irc.error(msg, "Spurious type from parseFactoid.")
|
||||
|
||||
def addFactoid(self, irc, msg, match):
|
||||
r"^(?!no\s+)(.+)\s+(is|_is_)\s+(?!also)(.+)"
|
||||
r"^(?!no\s+)(.+)\s+is\s+(?!also)(.+)"
|
||||
# Must be registered!
|
||||
try:
|
||||
id = ircdb.users.getUserId(msg.prefix)
|
||||
except KeyError:
|
||||
irc.error(msg, conf.replyNotRegistered)
|
||||
return
|
||||
key, _, fact = match.groups()
|
||||
key, fact = match.groups()
|
||||
cursor = self.db.cursor()
|
||||
# Check and make sure it's not in the DB already
|
||||
cursor.execute("""SELECT * FROM factoids WHERE key = %s""", key)
|
||||
@ -309,14 +309,14 @@ class MoobotFactoids(callbacks.PrivmsgCommandAndRegexp):
|
||||
irc.reply(msg, conf.replySuccess)
|
||||
|
||||
def replaceFactoid(self, irc, msg, match):
|
||||
r"^no,?\s+(.+)\s+(is|_is_)\s+(.+)"
|
||||
r"^no,?\s+(.+)\s+is\s+(.+)"
|
||||
# Must be registered!
|
||||
try:
|
||||
id = ircdb.users.getUserId(msg.prefix)
|
||||
except KeyError:
|
||||
irc.error(msg, conf.replyNotRegistered)
|
||||
return
|
||||
key, _, new_fact = match.groups()
|
||||
key, new_fact = match.groups()
|
||||
cursor = self.db.cursor()
|
||||
# Check and make sure it's in the DB
|
||||
cursor.execute("""SELECT locked_at, fact FROM factoids
|
||||
|
Loading…
Reference in New Issue
Block a user