Fixed and corrected various bugs resulting from the change to Attributes/Tags).
This commit is contained in:
parent
630d31cac4
commit
bad24513e0
9 changed files with 66 additions and 64 deletions
|
|
@ -424,16 +424,8 @@ class PlayerDB(TypedObject, AbstractUser):
|
|||
# nick replacement - we require full-word matching.
|
||||
|
||||
raw_string = utils.to_unicode(raw_string)
|
||||
|
||||
raw_list = raw_string.split(None)
|
||||
raw_list = [" ".join(raw_list[:i + 1]) for i in range(len(raw_list)) if raw_list[:i + 1]]
|
||||
# get the nick replacement data directly from the database to be
|
||||
# able to use db_category__in
|
||||
nicks = self.db_attributes.filter(db_category__in=("nick_inputline", "nick_channel"))
|
||||
for nick in nicks:
|
||||
if nick.db_key in raw_list:
|
||||
raw_string = raw_string.replace(nick.db_key, nick.db_strvalue, 1)
|
||||
break
|
||||
raw_string = self.nicks.nickreplacement(raw_string,
|
||||
categories=("inputline", "channels"), include_player=False)
|
||||
if not sessid and _MULTISESSION_MODE in (0, 1):
|
||||
# in this case, we should either have only one sessid, or the sessid
|
||||
# should not matter (since the return goes to all of them we can
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue