Updated the Python scripting shim to expose EAT_HEXCHAT as an alias of EAT_ZOITECHAT, so scripts written for HexChat constants work without changes.

Added a Python hexchat.py compatibility module and ensured it is installed alongside zoitechat.py/xchat.py, enabling import hexchat scripts to run.

Updated the Perl API layer to support HexChat naming by aliasing HexChat:: to ZoiteChat::, adding EAT_HEXCHAT to exported constants, and adding an explicit Perl shim module HexChat.pm.

Extended Perl XS constant registration to export EAT_HEXCHAT as a compatibility alias, and wired HexChat.pm into the embedded Perl module generation list so it ships with the plugin.
This commit is contained in:
2026-02-23 19:09:09 -07:00
parent aed21ffcae
commit 3a680cf6b4
7 changed files with 10 additions and 3 deletions

View File

@@ -0,0 +1 @@
require ZoiteChat;

View File

@@ -53,14 +53,16 @@ sub ZoiteChat::Internal::print;
#keep compatibility with Xchat scripts
sub EAT_XCHAT ();
sub EAT_HEXCHAT ();
BEGIN {
*Xchat:: = *ZoiteChat::;
*HexChat:: = *ZoiteChat::;
}
our %EXPORT_TAGS = (
constants => [
qw(PRI_HIGHEST PRI_HIGH PRI_NORM PRI_LOW PRI_LOWEST), # priorities
qw(EAT_NONE EAT_ZOITECHAT EAT_XCHAT EAT_PLUGIN EAT_ALL), # callback return values
qw(EAT_NONE EAT_ZOITECHAT EAT_XCHAT EAT_HEXCHAT EAT_PLUGIN EAT_ALL), # callback return values
qw(FD_READ FD_WRITE FD_EXCEPTION FD_NOTSOCKET), # fd flags
qw(KEEP REMOVE), # timers
],