Rebrand get_info(xchatdir) but remain compatible for Perl and Python

This commit is contained in:
Berke Viktor
2012-10-30 09:59:58 +01:00
parent 66be50f335
commit 29f7a9180c
19 changed files with 48 additions and 48 deletions

View File

@@ -127,7 +127,7 @@ sub IRC::channel_list {
sub IRC::get_info {
my $id = shift;
my @ids = qw(version nick channel server xchatdir away network host topic);
my @ids = qw(version nick channel server hexchatdir xchatdir away network host topic);
if( $id >= 0 && $id <= 8 && $id != 5 ) {
my $info = Xchat::get_info($ids[$id]);

View File

@@ -471,7 +471,7 @@ sub context_info {
my @fields = (
qw(away channel charset host id inputbox libdirfs modes network),
qw(nick nickserv server topic version win_ptr win_status),
qw(xchatdir xchatdirfs state_cursor),
qw(hexchatdir hexchatdirfs xchatdir xchatdirfs state_cursor),
);
if( Xchat::set_context( $ctx ) ) {

View File

@@ -683,16 +683,16 @@ C<$id> - one of the following case sensitive values
<td></td>
</tr>
<tr>
<td>xchatdir</td> <td>xchat config directory encoded in UTF-8<br />
<td>hexchatdir</td> <td>HexChat config directory encoded in UTF-8<br />
examples:<br />
/home/user/.xchat2<br />
C:\Documents and Settings\user\Application Data\X-Chat 2
/home/user/.config/hexchat<br />
C:\Users\user\Appdata\Roaming\HexChat
</td>
<td></td>
</tr>
<tr>
<td>xchatdirfs</td> <td>same as xchatdir except encoded in the locale file system encoding</td>
<td>hexchatdirfs</td> <td>same as hexchatdir except encoded in the locale file system encoding</td>
<td></td>
</tr>
</table>

View File

@@ -207,7 +207,7 @@ sub reload {
}
sub reload_all {
my @dirs = Xchat::get_info( "xchatdirfs" ) || Xchat::get_info( "xchatdir" );
my @dirs = Xchat::get_info( "hexchatdirfs" ) || Xchat::get_info( "hexchatdir" );
push @dirs, File::Spec->catdir( $dirs[0], "plugins" );
for my $dir ( @dirs ) {
my $auto_load_glob = File::Spec->catfile( $dir, "*.pl" );

View File

@@ -6,7 +6,7 @@ my $last_modified;
my @servers;
sub get {
my $server_file = Xchat::get_info( "xchatdirfs" ) . "/servlist_.conf";
my $server_file = Xchat::get_info( "hexchatdirfs" ) . "/servlist_.conf";
# recreate the list only if the server list file has changed
if( -f $server_file &&