summary refs log tree commit diff stats
path: root/plugins/perl
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-11-04 23:55:36 +0100
committerBerke Viktor <bviktor@hexchat.org>2012-11-04 23:55:36 +0100
commitdb218817fdc895aa2e3e52a71aa2f4423a534423 (patch)
tree42adbac9f667aa7a1dba5386150738fac84aeafc /plugins/perl
parentad16ed3933b2904f3e4b206a67c4b67cc86622bc (diff)
Use configdir instead of *xchatdir*
Diffstat (limited to 'plugins/perl')
-rw-r--r--plugins/perl/lib/IRC.pm2
-rw-r--r--plugins/perl/lib/Xchat.pm2
-rw-r--r--plugins/perl/lib/Xchat.pod7
-rw-r--r--plugins/perl/lib/Xchat/Embed.pm2
-rw-r--r--plugins/perl/lib/Xchat/List/Network.pm2
-rw-r--r--plugins/perl/perl.c5
6 files changed, 8 insertions, 12 deletions
diff --git a/plugins/perl/lib/IRC.pm b/plugins/perl/lib/IRC.pm
index 20498e69..e642fa3d 100644
--- a/plugins/perl/lib/IRC.pm
+++ b/plugins/perl/lib/IRC.pm
@@ -127,7 +127,7 @@ sub IRC::channel_list {
 
 sub IRC::get_info {
   my $id = shift;
-  my @ids = qw(version nick channel server hexchatdir xchatdir away network host topic);
+  my @ids = qw(version nick channel server configdir xchatdir away network host topic);
   
   if( $id >= 0 && $id <= 8 && $id != 5 ) {
     my $info = Xchat::get_info($ids[$id]);
diff --git a/plugins/perl/lib/Xchat.pm b/plugins/perl/lib/Xchat.pm
index fe99f37c..1ead64c3 100644
--- a/plugins/perl/lib/Xchat.pm
+++ b/plugins/perl/lib/Xchat.pm
@@ -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(hexchatdir hexchatdirfs xchatdir xchatdirfs state_cursor),
+		qw(configdir xchatdir xchatdirfs state_cursor),
 	);
 
 	if( Xchat::set_context( $ctx ) ) {
diff --git a/plugins/perl/lib/Xchat.pod b/plugins/perl/lib/Xchat.pod
index 9f4b19b8..7b11e25c 100644
--- a/plugins/perl/lib/Xchat.pod
+++ b/plugins/perl/lib/Xchat.pod
@@ -683,18 +683,13 @@ C<$id>   -  one of the following case sensitive values
   <td></td>
 </tr>
 <tr>
-   <td>hexchatdir</td> <td>HexChat config directory encoded in UTF-8<br />
+   <td>configdir</td> <td>HexChat config directory encoded in UTF-8<br />
                      examples:<br />
                      /home/user/.config/hexchat<br />
                      C:\Users\user\Appdata\Roaming\HexChat
                      </td>
    <td></td>
 </tr>
-
-<tr>
-   <td>hexchatdirfs</td>  <td>same as hexchatdir except encoded in the locale file system encoding</td>
-   <td></td>
-</tr>
 </table>
 
 <p>This function is used to retrieve certain information about the current
diff --git a/plugins/perl/lib/Xchat/Embed.pm b/plugins/perl/lib/Xchat/Embed.pm
index d9d3e92a..6993dc6e 100644
--- a/plugins/perl/lib/Xchat/Embed.pm
+++ b/plugins/perl/lib/Xchat/Embed.pm
@@ -207,7 +207,7 @@ sub reload {
 }
 
 sub reload_all {
-	my @dirs = Xchat::get_info( "hexchatdirfs" ) || Xchat::get_info( "hexchatdir" );
+	my @dirs = Xchat::get_info( "configdir" );
 	push @dirs, File::Spec->catdir( $dirs[0], "plugins" );
 	for my $dir ( @dirs ) {
 		my $auto_load_glob = File::Spec->catfile( $dir, "*.pl" );
diff --git a/plugins/perl/lib/Xchat/List/Network.pm b/plugins/perl/lib/Xchat/List/Network.pm
index 7ce1c435..2b112e3a 100644
--- a/plugins/perl/lib/Xchat/List/Network.pm
+++ b/plugins/perl/lib/Xchat/List/Network.pm
@@ -6,7 +6,7 @@ my $last_modified;
 my @servers;
 
 sub get {
-	my $server_file = Xchat::get_info( "hexchatdirfs" ) . "/servlist_.conf";
+	my $server_file = Xchat::get_info( "configdir" ) . "/servlist_.conf";
 
 	# recreate the list only if the server list file has changed
 	if( -f $server_file && 
diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c
index ba0d0a8d..2b7c073b 100644
--- a/plugins/perl/perl.c
+++ b/plugins/perl/perl.c
@@ -144,7 +144,7 @@ perl_auto_load (void *unused)
 #endif
 
 	/* get the dir in local filesystem encoding (what opendir() expects!) */
-	xdir = hexchat_get_info (ph, "hexchatdirfs");
+	xdir = hexchat_get_info (ph, "configdir");
 
 	/* don't pollute the filesystem with script files, this only causes misuse of the folders
 	 * only use ~/.config/hexchat/addons/ and %APPDATA%\HexChat\addons */
@@ -794,7 +794,8 @@ XS (XS_Xchat_get_info)
 			
 			if (
 				!strncmp ("libdirfs", SvPV_nolen (id), 8) ||
-				!strncmp ("hexchatdirfs", SvPV_nolen (id), 10)
+				!strncmp ("xchatdirfs", SvPV_nolen (id), 10) ||
+				!strncmp ("configdir", SvPV_nolen (id), 9)
 			) {
 				XSRETURN_PV (RETVAL);
 			} else {