added more vertical whitespace to IRCChannel

This commit is contained in:
jesopo 2018-07-15 13:39:15 +01:00
parent 6500d595ae
commit 44362a1f03

View file

@ -16,6 +16,7 @@ class Channel(object):
self.modes = {} self.modes = {}
self.created_timestamp = None self.created_timestamp = None
self.log = IRCLog.Log(bot) self.log = IRCLog.Log(bot)
def set_topic(self, topic): def set_topic(self, topic):
self.topic = topic self.topic = topic
def set_topic_setter(self, nickname, username=None, hostname=None): def set_topic_setter(self, nickname, username=None, hostname=None):
@ -24,6 +25,7 @@ class Channel(object):
self.topic_setter_hostname = hostname self.topic_setter_hostname = hostname
def set_topic_time(self, unix_timestamp): def set_topic_time(self, unix_timestamp):
self.topic_time = unix_timestamp self.topic_time = unix_timestamp
def add_user(self, user): def add_user(self, user):
self.users.add(user) self.users.add(user)
def remove_user(self, user): def remove_user(self, user):
@ -36,6 +38,7 @@ class Channel(object):
del self.modes[mode] del self.modes[mode]
def has_user(self, user): def has_user(self, user):
return user in self.users return user in self.users
def add_mode(self, mode, args=None): def add_mode(self, mode, args=None):
if not mode in self.modes: if not mode in self.modes:
self.modes[mode] = set([]) self.modes[mode] = set([])
@ -62,6 +65,7 @@ class Channel(object):
del self.modes[mode] del self.modes[mode]
self.bot.events.on("mode").on("channel").call( self.bot.events.on("mode").on("channel").call(
channel=self, mode=mode, args=args, remove=True) channel=self, mode=mode, args=args, remove=True)
def set_setting(self, setting, value): def set_setting(self, setting, value):
self.bot.database.set_channel_setting(self.server.id, self.bot.database.set_channel_setting(self.server.id,
self.name, setting, value) self.name, setting, value)