… | |
… | |
49 | |
49 | |
50 | sub part { |
50 | sub part { |
51 | my ($self) = @_; |
51 | my ($self) = @_; |
52 | $self->SUPER::part; |
52 | $self->SUPER::part; |
53 | |
53 | |
54 | delete $::config->{rooms}{$self->{channel}}; |
54 | $self->destroy; # yeaha |
55 | (remove Glib::Source delete $self->{gameupdate}) if $self->{gameupdate}; |
|
|
56 | $self->{window}->hide_all; |
|
|
57 | } |
55 | } |
58 | |
56 | |
59 | sub inject_msg_room { |
57 | sub inject_msg_room { |
60 | my ($self, $msg) = @_; |
58 | my ($self, $msg) = @_; |
61 | |
59 | |
… | |
… | |
89 | }; |
87 | }; |
90 | } |
88 | } |
91 | |
89 | |
92 | sub event_part { |
90 | sub event_part { |
93 | my ($self) = @_; |
91 | my ($self) = @_; |
|
|
92 | |
|
|
93 | delete $::config->{rooms}{$self->{channel}}; |
|
|
94 | delete $appwin::self->{roomlist}{room}{$self->{channel}}; |
|
|
95 | (remove Glib::Source delete $self->{gameupdate}) if $self->{gameupdate}; |
|
|
96 | $self->unlisten; |
|
|
97 | |
94 | $self->SUPER::event_part; |
98 | $self->SUPER::event_part; |
95 | } |
99 | } |
96 | |
100 | |
97 | sub event_update_roominfo { |
101 | sub event_update_roominfo { |
98 | my ($self) = @_; |
102 | my ($self) = @_; |
… | |
… | |
101 | . "<description>" . (util::toxml $self->{description}) . "</description>\n"); |
105 | . "<description>" . (util::toxml $self->{description}) . "</description>\n"); |
102 | } |
106 | } |
103 | |
107 | |
104 | sub destroy { |
108 | sub destroy { |
105 | my ($self) = @_; |
109 | my ($self) = @_; |
106 | $self->destroy; |
|
|
107 | |
110 | |
108 | (remove Glib::Source delete $self->{gameupdate}) if $self->{gameupdate}; |
111 | $self->event_part; |
|
|
112 | |
|
|
113 | $self->SUPER::destroy; |
109 | } |
114 | } |
110 | |
115 | |
111 | 1; |
116 | 1; |
112 | |
117 | |