/stop command
[scpubgit/Clifton.git] / lib / App / Clifton / Tower / IRC.pm
index 5dffc0e..982d94f 100644 (file)
@@ -47,6 +47,13 @@ sub start_chain {
   });
 }
 
+sub stop_chain {
+  my ($self, $chain) = @_;
+  $self->irc_client->send_message('PART', undef, $chain->irc_channel);
+  delete $self->chains->{$chain->irc_channel};
+  $self->remove_child($chain);
+}
+
 sub send_irc_message {
   my ($self, $args) = @_;
   $self->irc_client->send_message('PRIVMSG', undef, @{$args}{qw(to text)});