Skip to content
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

/topic (no args) could return the current topic for the current channel. #37

Open
EntityReborn opened this issue Jan 12, 2014 · 1 comment

Comments

@EntityReborn
Copy link

From what I'm aware of, /topic expects arguments. Triggering /topic without arguments might trigger the topic to be shown instead of set.

A possible fix might be changing the lines 131 and 132 of /js/irc/commands.js to the following:

cmd_TOPIC: [true, 1, 0, function(args) {
    this.send("TOPIC " + this.getActiveWindow().name + (args?" :" + args[0]:""));
@mrflea
Copy link
Contributor

mrflea commented Feb 21, 2014

It turns out that this is a bit hairier than expected. Passing through the TOPIC command raw causes it to be swallowed by the existing RPL_TOPIC handler with nothing printed to the channel. We don't stash the text of the content anywhere locally, either (except the HTML element the text is stored in), so we can't just return something already received.

I'll take another look at some point in the future. I'll probably end up changing the RPL_TOPIC handler to not swallow the topic message each time, but doing so without printing the topic to the channel window on join will be slightly annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants