Ticket #21 (new incorrect behaviour)

Opened 22 months ago

Last modified 5 months ago

connect keeps reason with keep_reason = 0

Reported by: porridge Owned by: team
Priority: minor Component: other/unknown
Version: SVN Keywords:
Cc:

Description

With keep_reason = 0

ekg1 Does:

/disc bla
12:42 ::: Rozłączono: bla
/connect
12:42 ::: Łączę się z serwerem...
12:42 ::: Połączono
/status
12:42 ::: Aktualny stan: zajęty

While ekg2 does:

/disc bla
12:41:10 ::: (gg:1923297) Disconnected: bla
/connect
12:41:14 ::: (gg:1923297) Connecting to server
12:41:14 ::: (gg:1923297) Connected: bla
/status
12:44:42 ::: Current status: away (bla)

In other words: in ekg1 "connect" removes the description, while ekg2 keeps it.

Attachments

gg_disconnect_keep_reason.diff Download (0.7 KB) - added by wiechu 20 months ago.
Is it what you want?
gg_change_status_keep_reason.diff Download (1.8 KB) - added by pinochet 5 months ago.
You suggested that there were some mess. I created new helper function to pass through this issue.

Change History

Changed 20 months ago by wiechu

Is it what you want?

follow-up: ↓ 2   Changed 18 months ago by pinochet

Hi Unfortunetelly wiechu's patch cause that when keep_reason is set to 0 it is not possible to change description while connect, disconnect or reconnect. Please check if my patch is good.

in reply to: ↑ 1   Changed 18 months ago by porridge

Wiechu's patch fixes my issue.

Pinochet's patch does not fix my issue.

OTOH with wiechu's patch, after having done "disc zzz":

  • with keep_reason=0 -> "connect foo" sets an empty description
  • with keep_reason=1(or 2) -> "connect foo" keeps description set to "zzz"

Things like these really make me think that ekg2 should have a test suite.

  Changed 18 months ago by pinochet

OTOH with wiechu's patch, after having done "disc zzz":

* with keep_reason=0 -> "connect foo" sets an empty description
* with keep_reason=1(or 2) -> "connect foo" keeps description set to "zzz"

1. As I said this patch disable changing description while disconnect, reconnect.
2. My latest patch (attachment is updated) extend command connect to support description as a parameter. And I hope finally fix the bug.

  Changed 18 months ago by porridge

This updated patch seems to work OK. However the code duplication suggests that there should be a cleaner way to implement this fix.

Changed 5 months ago by pinochet

You suggested that there were some mess. I created new helper function to pass through this issue.

  Changed 5 months ago by pinochet

Hello I move this duplicated code to static function: helper_clarify_status_descr but I don't know is this name suitable, or is it in proper file. I even don't know is it good to create functions like this ;-) I will be grateful for review.

Note: See TracTickets for help on using tickets.