Fixed an OOC bug, made OOC detection stricter while doing that.
This commit is contained in:
parent
876e06f217
commit
eee0e3bd91
5 changed files with 15 additions and 11 deletions
|
@ -32,10 +32,12 @@ Features
|
|||
* Redo quirk processing (use pieces from Textsub if needed)
|
||||
* LET PEOPLE TURN OFF HONKING - people already rename the soundfile and such to do this manually
|
||||
* Make CTRL+PGUP/PGDN switch memo/pester tabs
|
||||
* Redo OOC detection/make it less inconsistent (require matching braces)
|
||||
* Set up a simple function to display a traceback instead of silently moving on!
|
||||
|
||||
* SOONER OR LATER: Redo internal chum storage, centralize data into widely accessible manager objects, etc.
|
||||
* Also: Overhaul settings storage. Bring it more in line with the system Textsub used (if feeling masochistic), but simpler.
|
||||
* Overhaul debugging
|
||||
* Make a console to display debug info without requiring us to run from console
|
||||
|
||||
Bugs
|
||||
----
|
||||
|
@ -52,6 +54,9 @@ Bugs
|
|||
|
||||
* Mentions occasionally don't work (e.g. in /me)
|
||||
* Character times aren't 'forgotten' on Part
|
||||
* +c is not properly recognized on join, nor does it stop someone from reenabling their quirk (let ops and above ignore it)
|
||||
* Chumlist handles groups pretty badly (no using the same name as a handle, for example? Needs an errormessage at least)
|
||||
* PESTERCHUM: messages are sent to things like NickServ
|
||||
|
||||
Windows Bugs
|
||||
------------
|
||||
|
|
2
convo.py
2
convo.py
|
@ -11,7 +11,7 @@ from mood import Mood
|
|||
from dataobjs import PesterProfile, PesterHistory
|
||||
from generic import PesterIcon
|
||||
from parsetools import convertTags, lexMessage, splitMessage, mecmd, colorBegin, colorEnd, \
|
||||
img2smiley, smiledict, oocre
|
||||
img2smiley, smiledict
|
||||
import parsetools
|
||||
|
||||
import pnc.lexercon as lexercon
|
||||
|
|
2
memos.py
2
memos.py
|
@ -9,7 +9,7 @@ from dataobjs import PesterProfile, PesterHistory
|
|||
from generic import PesterIcon, RightClickList, mysteryTime
|
||||
from convo import PesterConvo, PesterInput, PesterText, PesterTabWindow
|
||||
from parsetools import convertTags, addTimeInitial, timeProtocol, \
|
||||
lexMessage, colorBegin, colorEnd, mecmd, smiledict, oocre
|
||||
lexMessage, colorBegin, colorEnd, mecmd, smiledict
|
||||
import parsetools
|
||||
from logviewer import PesterLogViewer
|
||||
|
||||
|
|
3
menus.py
3
menus.py
|
@ -7,8 +7,6 @@ from dataobjs import pesterQuirk, PesterProfile
|
|||
from memos import TimeSlider, TimeInput
|
||||
from version import _pcVersion
|
||||
|
||||
import parsetools
|
||||
|
||||
_datadir = ostools.getDataDir()
|
||||
|
||||
class PesterQuirkItem(QtGui.QTreeWidgetItem):
|
||||
|
@ -213,6 +211,7 @@ class PesterQuirkList(QtGui.QTreeWidget):
|
|||
from copy import copy
|
||||
from convo import PesterInput, PesterText
|
||||
from parsetools import convertTags, lexMessage, splitMessage, mecmd, colorBegin, colorEnd, img2smiley, smiledict
|
||||
import parsetools
|
||||
from dataobjs import pesterQuirks, PesterHistory
|
||||
class QuirkTesterWindow(QtGui.QDialog):
|
||||
def __init__(self, parent):
|
||||
|
|
|
@ -26,7 +26,7 @@ _memore = re.compile(r"(\s|^)(#[A-Za-z0-9_]+)")
|
|||
_handlere = re.compile(r"(\s|^)(@[A-Za-z0-9_]+)")
|
||||
_imgre = re.compile(r"""(?i)<img src=['"](\S+)['"]\s*/>""")
|
||||
_mecmdre = re.compile(r"^(/me|PESTERCHUM:ME)(\S*)")
|
||||
oocre = re.compile(r"[\[(][\[(].*[\])][\])]")
|
||||
_oocre = re.compile(r"([\[(])\1.*([\])])\2")
|
||||
_format_begin = re.compile(r'(?i)<([ibu])>')
|
||||
_format_end = re.compile(r'(?i)</([ibu])>')
|
||||
_honk = re.compile(r"(?i)\bhonk\b")
|
||||
|
@ -463,9 +463,9 @@ def kxsplitMsg(lexed, fmt="pchum", maxlen=None, debug=False):
|
|||
# ...
|
||||
# ON SECOND THOUGHT: The lexer balances for us, so let's just use
|
||||
# that for now. I can split up the function for this later.
|
||||
working = ''.join(kxpclexer.list_convert(working))
|
||||
working = u''.join(kxpclexer.list_convert(working))
|
||||
working = kxpclexer.lex(working)
|
||||
working = ''.join(kxpclexer.list_convert(working))
|
||||
working = u''.join(kxpclexer.list_convert(working))
|
||||
# TODO: Is that lazy? Yes. This is a modification made to test if
|
||||
# it'll work, *not* if it'll be efficient.
|
||||
|
||||
|
@ -518,7 +518,7 @@ def kxsplitMsg(lexed, fmt="pchum", maxlen=None, debug=False):
|
|||
else:
|
||||
# Once we're finally out of things to add, we're, well...out.
|
||||
# So add working to the result one last time.
|
||||
working = ''.join(kxpclexer.list_convert(working))
|
||||
working = u''.join(kxpclexer.list_convert(working))
|
||||
output.append(working)
|
||||
|
||||
# We're...done?
|
||||
|
@ -631,7 +631,7 @@ def kxhandleInput(ctx, text=None, flavor=None):
|
|||
if flavor != "menus":
|
||||
# Check if the line is OOC. Note that Pesterchum *is* kind enough to strip
|
||||
# trailing spaces for us, even in the older versions.
|
||||
oocDetected = oocre.match(text.strip())
|
||||
oocDetected = _oocre.match(text.strip())
|
||||
is_ooc = ctx.ooc or oocDetected
|
||||
if ctx.ooc and not oocDetected:
|
||||
# If we're supposed to be OOC, apply it artificially.
|
||||
|
@ -752,7 +752,7 @@ def kxhandleInput(ctx, text=None, flavor=None):
|
|||
serverMsg = copy(lm)
|
||||
|
||||
# Memo-specific processing.
|
||||
if flavor == "memos" and not (is_action or is_ooc):
|
||||
if flavor == "memos" and not is_action:
|
||||
# Quirks were already applied, so get the prefix/postfix stuff
|
||||
# ready.
|
||||
# We fetched the information outside of the loop, so just
|
||||
|
|
Loading…
Reference in a new issue