From 276c77fb979bffc34a5216cad64e51e6ead9b36f Mon Sep 17 00:00:00 2001 From: InspectorCaracal <51038201+InspectorCaracal@users.noreply.github.com> Date: Fri, 11 Oct 2024 16:28:08 -0600 Subject: [PATCH 1/3] handle account-callers in CmdMoreExit --- evennia/utils/evmore.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/evennia/utils/evmore.py b/evennia/utils/evmore.py index 57192e2e90..9e2f8e8d3a 100644 --- a/evennia/utils/evmore.py +++ b/evennia/utils/evmore.py @@ -111,9 +111,13 @@ class CmdMoreExit(Command): def func(self): """ Exit pager and re-fire the failed command. - """ more = self.caller.ndb._more + if not more and inherits_from(self.caller, evennia.DefaultObject): + more = self.caller.account.ndb._more + if not more: + self.caller.msg("Error in exiting the pager. Contact an admin.") + return more.page_quit() # re-fire the command (in new cmdset) From e9242c64a43e6128c16ebdb5457b88d1dbcf4b0e Mon Sep 17 00:00:00 2001 From: InspectorCaracal <51038201+InspectorCaracal@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:10:14 -0600 Subject: [PATCH 2/3] revert EvMore commands to directly checking for account attr --- evennia/utils/evmore.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evennia/utils/evmore.py b/evennia/utils/evmore.py index 9e2f8e8d3a..5954f672d3 100644 --- a/evennia/utils/evmore.py +++ b/evennia/utils/evmore.py @@ -79,7 +79,7 @@ class CmdMore(Command): Implement the command """ more = self.caller.ndb._more - if not more and inherits_from(self.caller, evennia.DefaultObject): + if not more and hasattr(self.caller, 'account') and self.caller.has_account: more = self.caller.account.ndb._more if not more: self.caller.msg("Error in loading the pager. Contact an admin.") @@ -113,7 +113,7 @@ class CmdMoreExit(Command): Exit pager and re-fire the failed command. """ more = self.caller.ndb._more - if not more and inherits_from(self.caller, evennia.DefaultObject): + if not more and hasattr(self.caller, 'account') and self.caller.has_account: more = self.caller.account.ndb._more if not more: self.caller.msg("Error in exiting the pager. Contact an admin.") From 31ba8d2ee03aeecd1ca34ebe6796fcdd9d1ad6f5 Mon Sep 17 00:00:00 2001 From: InspectorCaracal <51038201+InspectorCaracal@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:11:21 -0600 Subject: [PATCH 3/3] fix typo --- evennia/utils/evmore.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evennia/utils/evmore.py b/evennia/utils/evmore.py index 5954f672d3..5aebc899d9 100644 --- a/evennia/utils/evmore.py +++ b/evennia/utils/evmore.py @@ -79,7 +79,7 @@ class CmdMore(Command): Implement the command """ more = self.caller.ndb._more - if not more and hasattr(self.caller, 'account') and self.caller.has_account: + if not more and hasattr(self.caller, 'account') and self.caller.account: more = self.caller.account.ndb._more if not more: self.caller.msg("Error in loading the pager. Contact an admin.") @@ -113,7 +113,7 @@ class CmdMoreExit(Command): Exit pager and re-fire the failed command. """ more = self.caller.ndb._more - if not more and hasattr(self.caller, 'account') and self.caller.has_account: + if not more and hasattr(self.caller, 'account') and self.caller.account: more = self.caller.account.ndb._more if not more: self.caller.msg("Error in exiting the pager. Contact an admin.")