aboutsummaryrefslogtreecommitdiff
path: root/modules/channel_op.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/channel_op.py')
-rw-r--r--modules/channel_op.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/channel_op.py b/modules/channel_op.py
index 3d92c451..92ee99e5 100644
--- a/modules/channel_op.py
+++ b/modules/channel_op.py
@@ -22,8 +22,8 @@ class Module(ModuleManager.BaseModule):
@utils.hook("timer.unban")
def _timer_unban(self, event):
server = self.bot.get_server(event["server_id"])
- if server.has_channel(event["channel_name"]):
- channel = server.get_channel(event["channel_name"])
+ if event["channel_name"] in server.channels:
+ channel = server.channels.get(event["channel_name"])
channel.send_unban(event["hostmask"])
def _kick(self, server, channel, nickname, reason):