Actually provide user nickname in !weather error message

This commit is contained in:
jesopo 2019-04-28 14:12:35 +01:00
parent fbdd254c69
commit 33fc4ffbf7

View file

@ -23,7 +23,8 @@ class Module(ModuleManager.BaseModule):
target_user = event["server"].get_user(event["args_split"][0]) target_user = event["server"].get_user(event["args_split"][0])
location = self._user_location(target_user) location = self._user_location(target_user)
if location == None: if location == None:
raise utils.EventError("%s doesn't have a location set") raise utils.EventError("%s doesn't have a location set",
target_user.nickname)
else: else:
location = self._user_location(event["user"]) location = self._user_location(event["user"])
if location == None: if location == None: