Skip to content

Commit 014c177

Browse files
committed
2 parents a303078 + aa1a354 commit 014c177

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

addons/source-python/plugins/es_emulator/eventscripts/_libs/python/playerlib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ def __getitem__(self, name):
247247
e = None
248248
try:
249249
return_val = self.get(name)
250-
except KeyError as e:
250+
except KeyError as ex:
251+
e = ex
251252
return_val = None
252253
if name in _callable_attributes: # If the item is also callable we need ReturnValue to make it callable
253254
return_val = self.ReturnValue(return_val)

addons/source-python/plugins/es_emulator/eventscripts/es_C.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,9 @@ def keygroupmsg(argv):
17821782
dbgmsg(0, 'Error: \'message\' subkey was not found inside keygroup {}'.format(key_group_name))
17831783
return
17841784

1785-
create_message(edict, atoi(argv[2]), key_msg)
1785+
type = DialogType(atoi(argv[2]))
1786+
1787+
create_message(edict, type, key_msg)
17861788

17871789
@command
17881790
def keygrouprename(argv):
@@ -2506,6 +2508,8 @@ def sendkeypmsg(userid, type, key_ptr):
25062508
if not key_ptr:
25072509
dbgmsg(0, 'Error: Invalid key for sending VGUI message.')
25082510

2511+
type = DialogType(type)
2512+
25092513
create_message(edict, type, _make_keyvalues(key_ptr))
25102514

25112515
@command

addons/source-python/plugins/es_emulator/logic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def on_say(command, index, team_only):
342342

343343
# TODO: es.regsaycmd() should be handled here and not with SP's
344344
# get_say_command()
345-
if es.addons.sayFilter(userid, command.arg_string, team_only):
345+
if es.addons.sayFilter(userid, command.command_string, team_only):
346346
return CommandReturn.CONTINUE
347347

348348
return CommandReturn.BLOCK
@@ -358,7 +358,7 @@ def fire_es_player_chat(command, userid, team_only):
358358
event.set_int('userid', userid)
359359
event.set_bool('teamonly', team_only)
360360

361-
full_text = command.arg_string
361+
full_text = command.command_string
362362
if (userid > 0 and full_text[0] == '"'
363363
and full_text[-1] == '"'
364364
and full_text.count('"') <= 2):

0 commit comments

Comments
 (0)