Skip to content

Commit

Permalink
Return unban_profanities and result as a bool and not str
Browse files Browse the repository at this point in the history
  • Loading branch information
cemathey committed May 28, 2024
1 parent edd4090 commit cf0c5ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rcon/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,8 @@ def ban_profanities(self, profanities: str) -> bool:
profanities = convert_tabs_to_spaces(profanities)
return self._str_request(f"BanProfanity {profanities}") == SUCCESS

def unban_profanities(self, profanities: str) -> str:
return self._str_request(f"UnbanProfanity {profanities}")
def unban_profanities(self, profanities: str) -> bool:
return self._str_request(f"UnbanProfanity {profanities}") == SUCCESS

def get_name(self) -> str:
return self._str_request("get name", can_fail=False)
Expand Down
2 changes: 1 addition & 1 deletion rcon/rcon.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ def set_profanities(self, profanities: list[str]) -> list[str]:

return profanities

def unban_profanities(self, profanities: list[str]) -> str:
def unban_profanities(self, profanities: list[str]) -> bool:
if not isinstance(profanities, list):
profanities = [profanities]
with invalidates(self.get_profanities):
Expand Down

0 comments on commit cf0c5ad

Please sign in to comment.