+ "debug_dump_state" => sub {
+ my $c = shift;
+ irc_gateway_notice $c, "Dumping debug state on stdout";
+ print Dumper({ "connected" => $connected,
+ "self_id", => $self_id,
+ "%channels" => \%channels,
+ "%channels_by_name" => \%channels_by_name,
+ "users" => \%users,
+ "users_by_name" => \%users_by_name,
+ "users_by_dmid" => \%users_by_dmid
+ });
+ },
+ "debug_dump" => sub {
+ my ($c, $arg) = @_;
+ $config{debug_dump} = $arg ? 1 : 0 if defined $arg;
+ irc_gateway_notice $c, "Protocol debug is " .
+ ($config{debug_dump} ? "on" : "off");
+ },