-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mirror changes in channel topic from IRC to Slack. #36
Conversation
Looks good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks good, thanks!
slackbridge/bots.py
Outdated
@@ -101,6 +103,16 @@ def check_slack_rtm(self): | |||
channel = self.channels[message['channel']] | |||
return user_bot.post_to_irc('#' + channel['name'], message['text']) | |||
|
|||
def topicUpdated(self, user, channel, newTopic): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd name this something like update_topic
instead to stay in the same style with the rest of the methods. Same with newTopic
-> new_topic
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an implementation of an event handler in IRCClient that gets called whenever the topic changes or a channel is joined for the first time, so I don't think it's possible to change the name of the function. I can change the topic variable name though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that's awkward, I forgot that's how it works. Maybe put a comment saying that it gets called by twisted when the topic is updated so it's clearer?
Thanks for updating the variable name though.
Solves part of #7