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

Add topic command and handlers #42

Open
xforever1313 opened this issue Sep 1, 2018 · 1 comment
Open

Add topic command and handlers #42

xforever1313 opened this issue Sep 1, 2018 · 1 comment

Comments

@xforever1313
Copy link
Owner

The IRC RFC mentions querying the channel's topic. We should add both a command to SET the topic, and a handler that will be fired if we get a RPL_TOPIC or RPL_NOTOPIC response from the server.

Examples of commands to set a topic:

   :[email protected] TOPIC #test :New topic ; User Wiz setting the
                                   topic.

   TOPIC #test :another topic      ; Command to set the topic on #test
                                   to "another topic".

   TOPIC #test :                   ; Command to clear the topic on
                                   #test.

   TOPIC #test                     ; Command to check the topic for
                                   #test.

We should have a function on IrcConnection called "SetTopic" that takes in the channel, and what the topic should be set to. An empty string is allowed while setting the topic.

Examples of getting a topic from IRC:

       331    RPL_NOTOPIC
              "<channel> :No topic is set"
       332    RPL_TOPIC
              "<channel> :<topic>"

         - When sending a TOPIC message to determine the
           channel topic, one of two replies is sent.  If
           the topic is set, RPL_TOPIC is sent back else
           RPL_NOTOPIC.

We should add handlers that will watch for RPL_NOTOPIC and RPL_TOPIC, and fire handlers if one of these are seen. Passed in parameter to the event should be the channel the topic was changed on, and the new topic (which can be an empty string).

@xforever1313 xforever1313 added this to To Do in 0.9.0 Sep 1, 2018
@xforever1313 xforever1313 removed this from To Do in 0.9.0 Nov 3, 2018
@xforever1313 xforever1313 added this to To do in 0.10.0 Nov 12, 2018
@xforever1313 xforever1313 removed this from To do in 0.10.0 Jan 19, 2019
@xforever1313 xforever1313 added this to To do in 0.30.0 Aug 11, 2019
@xforever1313
Copy link
Owner Author

Also a handler for when we send the TOPIC command.

@xforever1313 xforever1313 removed this from To do in 0.30.0 Nov 29, 2020
@xforever1313 xforever1313 added this to To Do in 0.31.0 Nov 29, 2020
@xforever1313 xforever1313 removed this from To Do in 0.31.0 Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant