3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 22:09:26 +01:00

Plugins/Wolfram: remove unnecessary comments

This commit is contained in:
Pragmatic Software 2021-07-06 12:46:51 -07:00
parent 68e8351a28
commit 29c3c1cb68

View File

@ -14,29 +14,23 @@ use PBot::Imports;
use LWP::UserAgent::Paranoid; use LWP::UserAgent::Paranoid;
use URI::Escape qw/uri_escape_utf8/; use URI::Escape qw/uri_escape_utf8/;
# called when plugin is loaded
sub initialize { sub initialize {
my ($self, %conf) = @_; my ($self, %conf) = @_;
# add default registry entry for `appid` # add default registry entry for `wolfram.appid`
$self->{pbot}->{registry}->add_default('text', 'wolfram', 'appid', ''); $self->{pbot}->{registry}->add_default('text', 'wolfram', 'appid', '');
# make `appid` registry entry private by default # make `wolfram.appid` registry entry private by default
$self->{pbot}->{registry}->set_default('wolfram', 'appid', 'private', 1); $self->{pbot}->{registry}->set_default('wolfram', 'appid', 'private', 1);
# add `wolfram` bot command
$self->{pbot}->{commands}->register(sub { $self->cmd_wolfram(@_) }, 'wolfram', 0); $self->{pbot}->{commands}->register(sub { $self->cmd_wolfram(@_) }, 'wolfram', 0);
} }
# called when plugin is unloaded
sub unload { sub unload {
my ($self) = @_; my ($self) = @_;
# remove `wolfram` bot command
$self->{pbot}->{commands}->unregister('wolfram'); $self->{pbot}->{commands}->unregister('wolfram');
} }
# the `wolfram` bot command
sub cmd_wolfram { sub cmd_wolfram {
my ($self, $context) = @_; my ($self, $context) = @_;