* 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:
Daniel DiPaolo 2003-10-16 05:39:15 +00:00
parent aee5c6c18e
commit a63ee1e304
1 changed files with 4 additions and 4 deletions

View File

@ -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