diff options
| author | 2017-12-26 11:50:18 +0000 | |
|---|---|---|
| committer | 2017-12-26 11:50:18 +0000 | |
| commit | 14ffa6716df69ccccb60c97710b6a31d07a07df4 (patch) | |
| tree | 0df1e2218e98b5b70a33f38bc4318736ec94aaa3 /Utils.py | |
| parent | Added a "replay" system to EventManager hooks, to replay missed .calls (diff) | |
| signature | ||
Added highlight spam detection/prevention logic to channel_op
Diffstat (limited to 'Utils.py')
| -rw-r--r-- | Utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -183,6 +183,10 @@ def bool_or_none(s): return True elif s in IS_FALSE: return False +def int_or_none(s): + stripped_s = s.lstrip("0") + if stripped_s.isdigit(): + return int(stripped_s) def get_closest_setting(event, setting, default=None): server = event["server"] |
