plotsbot icon indicating copy to clipboard operation
plotsbot copied to clipboard

IRC nick availability issues

Open ryzokuken opened this issue 8 years ago • 7 comments

Sometimes, the specific IRC nick isn't available for use over the network (this might happen due to a connection issue where a previous instance has neither parted nor timed out of the channel and you try to reconnect). In such a scenario, the IRC library in use falls back to another numbered nick (i.e., if you plotsbot is taken, you will be named plotsbot1 instead).

Naturally, the user would mention the bot by its new (rather strange) name, but as the bot uses config.name internally, it wouldn't be able to know correctly when it is mentioned (because its looking for the wrong name entirely) and also the help message wouldn't make much sense (although each of the mentioned commands would completely work).

We would need to find a way to figure out when the required nick isn't available, which nick we fell back to, and then use THAT nick appropriately.

Preparing a first-timers-only

The various behaviors use and display the botNick variable inside the behaviors object to display the various values and also to ascertain that the message was indeed meant for the bot. Right now, we statically set the value of botNick to be the same as that of the attempted value of the bot's nick. However, if there's an issue and the bot is forced to fall back to an alternate value, there is a discrepancy between the two values - leading to this bug. In order to solve this, let's dynamically set the value of botNick to client.nick instead.

ryzokuken avatar Jun 01 '17 21:06 ryzokuken

@ryzokuken , I'll take this up.

bassdeveloper avatar Jul 11 '17 19:07 bassdeveloper

@jywarren this can be possibly fixed by using https://node-irc.readthedocs.io/en/latest/API.html#Client.nick.

Should I refactor this into an FTO, or should I solve this right now?

ryzokuken avatar Aug 07 '17 19:08 ryzokuken

an FTO would be great!

On Mon, Aug 7, 2017 at 3:39 PM, Ujjwal Sharma [email protected] wrote:

@jywarren https://github.com/jywarren this can be possibly fixed by using https://node-irc.readthedocs.io/en/latest/API.html#Client.nick.

Should I refactor this into an FTO, or should I solve this right now?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plotsbot/issues/8#issuecomment-320759947, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ5MlUXRzgxBB-X7M0KH0t77n5-Zxks5sV2gAgaJpZM4NtkVs .

jywarren avatar Aug 07 '17 22:08 jywarren

@jywarren Added a sample problem statement. Does that sound about right?

ryzokuken avatar Aug 08 '17 17:08 ryzokuken

Hi -- I think it could use both a "problem" and "solution" section -- take a look at this for some guidance!

https://publiclab.org/notes/warren/10-31-2016/create-a-welcoming-first-timers-only-issue-to-invite-new-software-contributors

Thanks!

jywarren avatar Aug 10 '17 13:08 jywarren

@gauravano Would like to help out on this.

sidntrivedi012 avatar Feb 03 '19 19:02 sidntrivedi012

Great @sidntrivedi012!

grvsachdeva avatar Feb 04 '19 14:02 grvsachdeva