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

Rename irc.ircserver -> irc.server and irc.ircname -> irc.realname

This commit is contained in:
Pragmatic Software 2019-12-31 23:28:25 -08:00
parent 3bd0085b15
commit a86a5aaed2
4 changed files with 13 additions and 13 deletions

View File

@ -125,14 +125,14 @@ sub initialize {
$self->{registry}->add_default('text', 'irc', 'debug', $conf{irc_debug} // 0); $self->{registry}->add_default('text', 'irc', 'debug', $conf{irc_debug} // 0);
$self->{registry}->add_default('text', 'irc', 'show_motd', $conf{show_motd} // 1); $self->{registry}->add_default('text', 'irc', 'show_motd', $conf{show_motd} // 1);
$self->{registry}->add_default('text', 'irc', 'max_msg_len', $conf{max_msg_len} // 425); $self->{registry}->add_default('text', 'irc', 'max_msg_len', $conf{max_msg_len} // 425);
$self->{registry}->add_default('text', 'irc', 'ircserver', $conf{ircserver} // "irc.freenode.net"); $self->{registry}->add_default('text', 'irc', 'server', $conf{server} // "irc.freenode.net");
$self->{registry}->add_default('text', 'irc', 'port', $conf{port} // 6667); $self->{registry}->add_default('text', 'irc', 'port', $conf{port} // 6667);
$self->{registry}->add_default('text', 'irc', 'SSL', $conf{SSL} // 0); $self->{registry}->add_default('text', 'irc', 'SSL', $conf{SSL} // 0);
$self->{registry}->add_default('text', 'irc', 'SSL_ca_file', $conf{SSL_ca_file} // 'none'); $self->{registry}->add_default('text', 'irc', 'SSL_ca_file', $conf{SSL_ca_file} // 'none');
$self->{registry}->add_default('text', 'irc', 'SSL_ca_path', $conf{SSL_ca_path} // 'none'); $self->{registry}->add_default('text', 'irc', 'SSL_ca_path', $conf{SSL_ca_path} // 'none');
$self->{registry}->add_default('text', 'irc', 'botnick', $conf{botnick} // ""); $self->{registry}->add_default('text', 'irc', 'botnick', $conf{botnick} // "");
$self->{registry}->add_default('text', 'irc', 'username', $conf{username} // "pbot3"); $self->{registry}->add_default('text', 'irc', 'username', $conf{username} // "pbot3");
$self->{registry}->add_default('text', 'irc', 'ircname', $conf{ircname} // "https://github.com/pragma-/pbot"); $self->{registry}->add_default('text', 'irc', 'realname', $conf{realname} // "https://github.com/pragma-/pbot");
$self->{registry}->add_default('text', 'irc', 'identify_password', $conf{identify_password} // ''); $self->{registry}->add_default('text', 'irc', 'identify_password', $conf{identify_password} // '');
$self->{registry}->add_default('text', 'irc', 'log_default_handler', 1); $self->{registry}->add_default('text', 'irc', 'log_default_handler', 1);
@ -234,14 +234,14 @@ sub connect {
# TODO: disconnect, clean-up, etc # TODO: disconnect, clean-up, etc
} }
$server = $self->{registry}->get_value('irc', 'ircserver') if not defined $server; $server = $self->{registry}->get_value('irc', 'server') if not defined $server;
$self->{logger}->log("Connecting to $server ...\n"); $self->{logger}->log("Connecting to $server ...\n");
while (not $self->{conn} = $self->{irc}->newconn( while (not $self->{conn} = $self->{irc}->newconn(
Nick => $self->{registry}->get_value('irc', 'randomize_nick') ? random_nick : $self->{registry}->get_value('irc', 'botnick'), Nick => $self->{registry}->get_value('irc', 'randomize_nick') ? random_nick : $self->{registry}->get_value('irc', 'botnick'),
Username => $self->{registry}->get_value('irc', 'username'), Username => $self->{registry}->get_value('irc', 'username'),
Ircname => $self->{registry}->get_value('irc', 'ircname'), Ircname => $self->{registry}->get_value('irc', 'realname'),
Server => $server, Server => $server,
Pacing => 1, Pacing => 1,
UTF8 => 1, UTF8 => 1,

View File

@ -264,11 +264,7 @@
"type" : "text", "type" : "text",
"value" : "" "value" : ""
}, },
"ircname" : { "server" : {
"type" : "text",
"value" : "https://github.com/pragma-/pbot"
},
"ircserver" : {
"type" : "text", "type" : "text",
"value" : "irc.freenode.net" "value" : "irc.freenode.net"
}, },
@ -284,6 +280,10 @@
"type" : "text", "type" : "text",
"value" : "6667" "value" : "6667"
}, },
"realname" : {
"type" : "text",
"value" : "https://github.com/pragma-/pbot"
},
"randomize_nick" : { "randomize_nick" : {
"type" : "text", "type" : "text",
"value" : "0" "value" : "0"

View File

@ -75,8 +75,8 @@ Registry key | Description | Default value
--- | --- | ---: --- | --- | ---:
irc.botnick | IRC nickname. This is the name people see when you talk. _Required._ | _undefined_ irc.botnick | IRC nickname. This is the name people see when you talk. _Required._ | _undefined_
irc.username | IRC username. This is the `USER` field of your hostmask. | pbot3 irc.username | IRC username. This is the `USER` field of your hostmask. | pbot3
irc.ircname | IRC gecos/realname. This is the `general information` or `real-name` field, as seen in `WHOIS`. | https://github.com/pragma-/pbot irc.realname | IRC gecos/realname. This is the `general information` or `real-name` field, as seen in `WHOIS`. | https://github.com/pragma-/pbot
irc.ircserver | IRC server address to connect. | irc.freenode.net irc.server | IRC server address to connect. | irc.freenode.net
irc.port | IRC server port. | 6667 irc.port | IRC server port. | 6667
general.trigger | Bot trigger. Can be a character class containing multiple trigger characters. Can be overridden per-channel. | [!] general.trigger | Bot trigger. Can be a character class containing multiple trigger characters. Can be overridden per-channel. | [!]

View File

@ -155,11 +155,11 @@ List of recognized registry items
* irc.botnick * irc.botnick
* irc.debug * irc.debug
* irc.identify_password * irc.identify_password
* irc.ircname * irc.server
* irc.ircserver
* irc.log_default_handler * irc.log_default_handler
* irc.max_msg_len * irc.max_msg_len
* irc.port * irc.port
* irc.realname
* irc.show_motd * irc.show_motd
* irc.SSL_ca_file * irc.SSL_ca_file
* irc.SSL_ca_path * irc.SSL_ca_path