new name after fork

This commit is contained in:
2026-01-05 23:12:38 -07:00
parent ca43595430
commit 4683ef705b
316 changed files with 5422 additions and 6141 deletions

View File

@@ -20,5 +20,5 @@ jobs:
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v3
with:
bundle: hexchat.flatpak
bundle: zoitechat.flatpak
manifest-path: flatpak/io.github.Hexchat.json

View File

@@ -31,19 +31,19 @@ jobs:
Invoke-WebRequest http://files.jrsoftware.org/is/5/innosetup-5.5.9-unicode.exe -OutFile deps\innosetup-unicode.exe
& deps\innosetup-unicode.exe /VERYSILENT | Out-Null
Invoke-WebRequest https://github.com/hexchat/gvsbuild/releases/download/hexchat-2.16.2/idpsetup-1.5.1.exe -OutFile deps\idpsetup.exe
Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/idpsetup-1.5.1.exe -OutFile deps\idpsetup.exe
& deps\idpsetup.exe /VERYSILENT
Invoke-WebRequest https://github.com/hexchat/gvsbuild/releases/download/hexchat-2.16.2/gtk-${{ matrix.platform }}-2018-08-29-openssl1.1.7z -OutFile deps\gtk-${{ matrix.arch }}.7z
Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/gtk-${{ matrix.platform }}-2018-08-29-openssl1.1.7z -OutFile deps\gtk-${{ matrix.arch }}.7z
& 7z.exe x deps\gtk-${{ matrix.arch }}.7z -oC:\gtk-build\gtk
Invoke-WebRequest https://github.com/hexchat/gvsbuild/releases/download/hexchat-2.16.2/gendef-20111031.7z -OutFile deps\gendef.7z
Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/gendef-20111031.7z -OutFile deps\gendef.7z
& 7z.exe x deps\gendef.7z -oC:\gtk-build
Invoke-WebRequest https://github.com/hexchat/gvsbuild/releases/download/hexchat-2.16.2/WinSparkle-20151011.7z -OutFile deps\WinSparkle.7z
Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/WinSparkle-20151011.7z -OutFile deps\WinSparkle.7z
& 7z.exe x deps\WinSparkle.7z -oC:\gtk-build\WinSparkle
Invoke-WebRequest https://github.com/hexchat/gvsbuild/releases/download/hexchat-2.16.2/perl-5.20.0-${{ matrix.arch }}.7z -OutFile deps\perl-${{ matrix.arch }}.7z
Invoke-WebRequest https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/perl-5.20.0-${{ matrix.arch }}.7z -OutFile deps\perl-${{ matrix.arch }}.7z
& 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }}
New-Item -Path "c:\gtk-build" -Name "python-3.8" -ItemType "Directory"
@@ -55,21 +55,21 @@ jobs:
- name: Build
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"
msbuild win32\hexchat.sln /m /verbosity:minimal /p:Configuration=Release /p:Platform=${{ matrix.platform }}
msbuild win32\zoitechat.sln /m /verbosity:minimal /p:Configuration=Release /p:Platform=${{ matrix.platform }}
shell: cmd
- name: Preparing Artifacts
run: |
move ..\hexchat-build\${{ matrix.platform }}\HexChat*.exe .\
move ..\hexchat-build .\
move ..\zoitechat-build\${{ matrix.platform }}\ZoiteChat*.exe .\
move ..\zoitechat-build .\
shell: cmd
- uses: actions/upload-artifact@v2
with:
name: Installer ${{ matrix.arch }}
path: HexChat*.exe
path: ZoiteChat*.exe
- uses: actions/upload-artifact@v2
with:
name: Build Files ${{ matrix.arch }}
path: hexchat-build
path: zoitechat-build

6
.gitignore vendored
View File

@@ -13,7 +13,7 @@ win32/ext/perl/perl-x86-cache
win32/ext/perl/perl-x86-SetupFiles
win32/ext/perl/perl-x64-cache
win32/ext/perl/perl-x64-SetupFiles
win32/installer/hexchat.iss
win32/installer/zoitechat.iss
resource.h
*.opensdf
*.sdf
@@ -21,8 +21,8 @@ resource.h
*.user
*.exe
# OSX
osx/HexChat.app
osx/.HexChat.app
osx/ZoiteChat.app
osx/.ZoiteChat.app
*.zip
*.dmg
*.VC.db

View File

@@ -1,5 +1,5 @@
Berke Viktor <github.bviktor@outlook.com> <berkeviktor@aol.com>
Berke Viktor <github.bviktor@outlook.com> <bviktor@hexchat.org>
Berke Viktor <github.bviktor@outlook.com> <bviktor@zoitechat.org>
Berke Viktor <github.bviktor@outlook.com> <bviktor@outlook.com>
Berke Viktor <github.bviktor@outlook.com> berkeviktor@aol.com
Patrick Griffis <tingping@tingping.se> TingPing <tingping@fedoraproject.org>

View File

@@ -1,8 +1,8 @@
[main]
host = https://www.transifex.com
[hexchat.main]
[zoitechat.main]
file_filter = po/<lang>.po
source_file = po/hexchat.pot
source_file = po/zoitechat.pot
source_lang = en
type = PO

View File

@@ -4,7 +4,7 @@ Go to the [Transifex client documentation](http://help.transifex.com/features/cl
<pre>
tx init
tx set --auto-local -r hexchat.main "po\<lang>.po" --source-lang en --source-file po\hexchat.pot --execute
tx set --auto-local -r zoitechat.main "po\<lang>.po" --source-lang en --source-file po\zoitechat.pot --execute
</pre>
Append `type = PO` to _.tx\config_.
@@ -18,10 +18,10 @@ tx push --source --translation
## Updating online translations with the template
Regenerate the source file ( _hexchat.pot_ ) on a Unix machine:
Regenerate the source file ( _zoitechat.pot_ ) on a Unix machine:
<pre>
rm po/hexchat.pot && ./autogen.sh && ./configure --enable-nls && cd src/common && make textevents.h && cd../.. && make
rm po/zoitechat.pot && ./autogen.sh && ./configure --enable-nls && cd src/common && make textevents.h && cd../.. && make
</pre>
Push the updated source file to Transifex (this automatically updates all translation files):

View File

@@ -28,7 +28,7 @@ DOXYFILE_ENCODING = UTF-8
# identify the project. Note that if you do not use Doxywizard you need
# to put quotes around the project name if it contains spaces.
PROJECT_NAME = "HexChat"
PROJECT_NAME = "ZoiteChat"
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
@@ -47,7 +47,7 @@ PROJECT_BRIEF =
# exceed 55 pixels and the maximum width should not exceed 200 pixels.
# Doxygen will copy the logo to the output directory.
PROJECT_LOGO = "src/pixmaps/hexchat.png"
PROJECT_LOGO = "src/pixmaps/zoitechat.png"
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

View File

@@ -1,610 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
sodipodi:docname="hexchat4.svg"
version="1.0"
inkscape:version="0.48.3.1 r9886"
sodipodi:version="0.32"
id="svg2"
height="64"
width="64"
inkscape:export-filename="D:\Downloads\hexchat3.png"
inkscape:export-xdpi="22.5"
inkscape:export-ydpi="22.5">
<defs
id="defs4">
<linearGradient
id="linearGradient2289">
<stop
style="stop-color:#ff2600;stop-opacity:1;"
offset="0"
id="stop2291" />
<stop
style="stop-color:#ffd600;stop-opacity:1;"
offset="1"
id="stop2293" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient1335"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
x1="16.88862"
y1="77.796608"
x2="72.348671"
y2="20.59322" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient1337"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
x1="16.88862"
y1="77.796608"
x2="16.88862"
y2="19.001091" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient1317"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
x1="16.88862"
y1="77.796608"
x2="72.348671"
y2="20.59322" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient1319"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
x1="16.88862"
y1="77.796608"
x2="16.88862"
y2="19.001091" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient1320"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
x1="16.88862"
y1="77.796608"
x2="72.348671"
y2="20.59322" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient1322"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
x1="16.88862"
y1="77.796608"
x2="16.88862"
y2="19.001091" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient2997"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.735969,0,0,0.735801,-160.10656,-7.1914058)"
x1="130.2673"
y1="78.743134"
x2="129.2081"
y2="25.771122" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient3011"
x1="34.62241"
y1="53.508884"
x2="34.466503"
y2="5.4893961"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient3030"
gradientUnits="userSpaceOnUse"
x1="34.62241"
y1="53.508884"
x2="34.466503"
y2="5.4893961" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient3070"
gradientUnits="userSpaceOnUse"
x1="34.62241"
y1="53.508884"
x2="34.466503"
y2="5.4893961"
gradientTransform="matrix(0.99894925,0,0,0.97549134,-3.1829063,4.465557)" />
<filter
id="filter3281"
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow">
<feFlood
id="feFlood3283"
flood-opacity="0.33"
flood-color="rgb(0,0,0)"
result="flood" />
<feComposite
id="feComposite3285"
in2="SourceGraphic"
in="flood"
operator="in"
result="composite1" />
<feGaussianBlur
id="feGaussianBlur3287"
in="composite"
stdDeviation="2"
result="blur" />
<feOffset
id="feOffset3289"
dx="4"
dy="1"
result="offset" />
<feComposite
id="feComposite3291"
in2="offset"
in="SourceGraphic"
operator="over"
result="composite2" />
</filter>
<filter
id="filter3293"
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow">
<feFlood
id="feFlood3295"
flood-opacity="0.33"
flood-color="rgb(0,0,0)"
result="flood" />
<feComposite
id="feComposite3297"
in2="SourceGraphic"
in="flood"
operator="in"
result="composite1" />
<feGaussianBlur
id="feGaussianBlur3299"
in="composite"
stdDeviation="2"
result="blur" />
<feOffset
id="feOffset3301"
dx="4"
dy="1"
result="offset" />
<feComposite
id="feComposite3303"
in2="offset"
in="SourceGraphic"
operator="over"
result="composite2" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient4089"
x1="99.348503"
y1="59.934135"
x2="100.40916"
y2="10.613438"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient4093"
gradientUnits="userSpaceOnUse"
x1="99.348503"
y1="59.934135"
x2="100.40916"
y2="10.613438" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient4096"
gradientUnits="userSpaceOnUse"
x1="99.348503"
y1="59.934135"
x2="100.40916"
y2="10.613438" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289"
id="linearGradient4098"
gradientUnits="userSpaceOnUse"
x1="99.348503"
y1="59.934135"
x2="100.40916"
y2="10.613438"
gradientTransform="translate(-70.003571,-2.298097)" />
<filter
id="filter4111"
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow">
<feFlood
id="feFlood4113"
flood-opacity="0.33"
flood-color="rgb(0,0,0)"
result="flood" />
<feComposite
id="feComposite4115"
in2="SourceGraphic"
in="flood"
operator="in"
result="composite1" />
<feGaussianBlur
id="feGaussianBlur4117"
in="composite"
stdDeviation="2"
result="blur" />
<feOffset
id="feOffset4119"
dx="4"
dy="1"
result="offset" />
<feComposite
id="feComposite4121"
in2="offset"
in="SourceGraphic"
operator="over"
result="composite2" />
</filter>
<filter
id="filter4123"
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow">
<feFlood
id="feFlood4125"
flood-opacity="0.33"
flood-color="rgb(0,0,0)"
result="flood" />
<feComposite
id="feComposite4127"
in2="SourceGraphic"
in="flood"
operator="in"
result="composite1" />
<feGaussianBlur
id="feGaussianBlur4129"
in="composite"
stdDeviation="2"
result="blur" />
<feOffset
id="feOffset4131"
dx="4"
dy="1"
result="offset" />
<feComposite
id="feComposite4133"
in2="offset"
in="SourceGraphic"
operator="over"
result="composite2" />
</filter>
<linearGradient
y2="19.001091"
x2="16.88862"
y1="77.796608"
x1="16.88862"
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
gradientUnits="userSpaceOnUse"
id="linearGradient1330"
xlink:href="#linearGradient2289-4"
inkscape:collect="always" />
<linearGradient
y2="20.59322"
x2="72.348671"
y1="77.796608"
x1="16.88862"
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
gradientUnits="userSpaceOnUse"
id="linearGradient1328"
xlink:href="#linearGradient2289-4"
inkscape:collect="always" />
<linearGradient
y2="19.001091"
x2="16.88862"
y1="77.796608"
x1="16.88862"
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
gradientUnits="userSpaceOnUse"
id="linearGradient1322-5"
xlink:href="#linearGradient2289-4"
inkscape:collect="always" />
<linearGradient
y2="20.59322"
x2="72.348671"
y1="77.796608"
x1="16.88862"
gradientTransform="matrix(0.735969,0,0,0.735801,-2.172329,-1.111016)"
gradientUnits="userSpaceOnUse"
id="linearGradient1320-4"
xlink:href="#linearGradient2289-4"
inkscape:collect="always" />
<linearGradient
y2="19.001091"
x2="16.88862"
y1="77.796608"
x1="16.88862"
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
gradientUnits="userSpaceOnUse"
id="linearGradient1319-2"
xlink:href="#linearGradient2289-4"
inkscape:collect="always" />
<linearGradient
y2="20.59322"
x2="72.348671"
y1="77.796608"
x1="16.88862"
gradientTransform="matrix(0.735969,0,0,0.735801,-2.052758,-16.66733)"
gradientUnits="userSpaceOnUse"
id="linearGradient1317-8"
xlink:href="#linearGradient2289-4"
inkscape:collect="always" />
<linearGradient
y2="19.001091"
x2="16.88862"
y1="77.796608"
x1="16.88862"
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
gradientUnits="userSpaceOnUse"
id="linearGradient1337-8"
xlink:href="#linearGradient2289-4"
inkscape:collect="always" />
<linearGradient
y2="20.59322"
x2="72.348671"
y1="77.796608"
x1="16.88862"
gradientTransform="matrix(0.545166,0,0,0.544959,0.186963,35.29511)"
gradientUnits="userSpaceOnUse"
id="linearGradient1335-4"
xlink:href="#linearGradient2289-4"
inkscape:collect="always" />
<linearGradient
id="linearGradient2289-4">
<stop
id="stop2291-0"
offset="0"
style="stop-color:#ff2600;stop-opacity:1;" />
<stop
id="stop2293-9"
offset="1"
style="stop-color:#ffd600;stop-opacity:1;" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289-4"
id="linearGradient3133"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.51445624,0,0,0.53856587,8.0977348,6.9450134)"
x1="46.881573"
y1="91.824585"
x2="48.19709"
y2="-1.4575793" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289-4"
id="linearGradient3136"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.51445624,0,0,0.53856587,-120.3871,-29.360443)"
x1="16.88862"
y1="77.796608"
x2="72.348671"
y2="20.59322" />
<filter
id="filter3138"
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow">
<feFlood
id="feFlood3140"
flood-opacity="0.33"
flood-color="rgb(0,0,0)"
result="flood" />
<feComposite
id="feComposite3142"
in2="SourceGraphic"
in="flood"
operator="in"
result="composite1" />
<feGaussianBlur
id="feGaussianBlur3144"
in="composite"
stdDeviation="2"
result="blur" />
<feOffset
id="feOffset3146"
dx="4"
dy="1"
result="offset" />
<feComposite
id="feComposite3148"
in2="offset"
in="SourceGraphic"
operator="over"
result="composite2" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2289-4"
id="linearGradient3055"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.94969205,0,0,0.89326813,2.4216955,2.7025635)"
x1="31.372862"
y1="60.111893"
x2="30.769272"
y2="4.0104952" />
<filter
id="filter3057"
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow">
<feFlood
id="feFlood3059"
flood-opacity="0.33"
flood-color="rgb(0,0,0)"
result="flood" />
<feComposite
id="feComposite3061"
in2="SourceGraphic"
in="flood"
operator="in"
result="composite1" />
<feGaussianBlur
id="feGaussianBlur3063"
in="composite"
stdDeviation="2"
result="blur" />
<feOffset
id="feOffset3065"
dx="4"
dy="1"
result="offset" />
<feComposite
id="feComposite3067"
in2="offset"
in="SourceGraphic"
operator="over"
result="composite2" />
</filter>
<filter
id="filter3069"
style="color-interpolation-filters:sRGB;"
inkscape:label="Drop Shadow">
<feFlood
id="feFlood3071"
flood-opacity="0.33"
flood-color="rgb(0,0,0)"
result="flood" />
<feComposite
id="feComposite3073"
in2="SourceGraphic"
in="flood"
operator="in"
result="composite1" />
<feGaussianBlur
id="feGaussianBlur3075"
in="composite"
stdDeviation="2"
result="blur" />
<feOffset
id="feOffset3077"
dx="4"
dy="1"
result="offset" />
<feComposite
id="feComposite3079"
in2="offset"
in="SourceGraphic"
operator="over"
result="composite2" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="8.0000001"
inkscape:cx="38.519547"
inkscape:cy="37.177925"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1270"
inkscape:window-height="972"
inkscape:window-x="619"
inkscape:window-y="10"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-maximized="0">
<inkscape:grid
type="xygrid"
id="grid3001" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Guglielmi David</dc:title>
</cc:Agent>
</dc:creator>
<cc:license
rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
<dc:rights>
<cc:Agent>
<dc:title>Peter Zelezny</dc:title>
</cc:Agent>
</dc:rights>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
<cc:permits
rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits
rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:requires
rdf:resource="http://web.resource.org/cc/Notice" />
<cc:permits
rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
<cc:requires
rdf:resource="http://web.resource.org/cc/ShareAlike" />
<cc:requires
rdf:resource="http://web.resource.org/cc/SourceCode" />
</cc:License>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<path
inkscape:connector-curvature="0"
id="path4107"
d="m 32.154792,4.6214684 c -6.271873,0.05843 -14.928,0.744277 -16.110377,1.388109 C 13.679661,7.297237 0.77557733,29.32852 0.80334443,31.859522 c 0.02777,2.531005 13.46215957,24.293967 15.85468157,25.537309 2.392519,1.243342 29.481,1.287521 31.845753,-1.41e-4 C 50.868531,56.109028 63.897618,33.765246 63.869851,31.234242 63.842081,28.703238 50.157689,6.540262 47.765167,5.2969214 46.568907,4.6752504 38.426665,4.5630384 32.154792,4.6214684 z m 0.30429,8.4025596 c 4.90437,-0.047 9.661849,0.425368 10.597281,0.92538 1.870861,1.000021 10.667726,15.499216 10.689439,17.534904 C 53.767512,33.52 44.703434,48.643484 42.854286,49.67915 41.005138,50.714818 23.631044,50.742687 21.760184,49.742667 19.889321,48.742646 10.449106,33.795226 10.427392,31.759537 10.405682,29.72385 19.860508,15.185189 21.709656,14.14952 c 0.924575,-0.517833 5.845056,-1.078498 10.749426,-1.125492 z"
style="fill:#000000;fill-opacity:1;filter:url(#filter3057)"
sodipodi:nodetypes="ssssssssssssssss" />
<path
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccccc"
id="path2297"
d="m 12.848737,18.660684 6.998916,-7.560243 12.488019,13.136676 12.867701,-13.261676 7.451909,7.435243 -13.544847,13.503584 13.341856,13.152864 -6.670928,6.94334 L 32.335672,39.351071 19.323785,52.010472 12.426724,45.086347 25.565591,32.039268 z"
style="fill:url(#linearGradient3133);fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.31593215;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;filter:url(#filter3069)"
inkscape:transform-center-x="2.25"
inkscape:transform-center-y="2.25" />
<path
style="fill:url(#linearGradient3055);fill-opacity:1"
d="M 31.793607,5.7202825 C 24.936514,5.7854875 18.319304,6.2021256 17.026601,6.9206116 14.441196,8.3575834 2.2463386,29.063913 2.2766972,31.888398 2.3070579,34.712884 14.945039,54.814527 17.560803,56.20204 20.176566,57.589553 45.00941,57.359866 47.594814,55.922894 50.180219,54.485922 62.625078,34.154591 62.594719,31.330106 62.564358,28.505621 49.613876,7.8135634 46.998112,6.4260506 45.690231,5.732294 38.650699,5.6550774 31.793607,5.7202825 z m 0.18436,5.9275485 c 5.36199,-0.05245 10.575046,0.320704 11.597761,0.878694 2.045429,1.115978 11.686445,16.671419 11.710184,18.943154 0.02374,2.271736 -9.523004,18.3578 -11.544693,19.513557 -2.02169,1.155758 -20.789608,0.763657 -22.835036,-0.352353 C 18.86075,49.514938 8.8958589,34.166602 8.8721197,31.894866 8.8483797,29.62313 19.328834,13.7806 21.350523,12.624842 c 1.010846,-0.577879 5.26545,-0.924567 10.627444,-0.977011 z"
id="path3305"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ssssssssssssssss" />
<path
style="fill:none"
d="M 15.390198,55.682743 C 10.447144,47.360612 3.6450957,35.733851 3.6919881,35.686959 c 0.031272,-0.03127 0.5023581,0.289334 1.0468575,0.712459 0.5444994,0.423125 1.0414462,0.769317 1.1043264,0.769317 0.06288,0 2.6329414,4.276521 5.711247,9.50338 l 5.59692,9.503379 2.159128,0.007 2.159126,0.007 -0.34365,-0.584653 C 20.936937,55.28323 18.053514,50.518786 14.718339,45.017137 11.383164,39.515488 8.6543842,34.929294 8.6543842,34.825595 c 0,-0.103699 0.2455542,-0.59277 0.545676,-1.086823 0.3001218,-0.494053 0.545676,-0.941721 0.545676,-0.994816 0,-0.05309 -0.2788317,-0.09654 -0.619626,-0.09654 -0.8505388,0 -1.0953557,-0.488405 -1.0953557,-2.185211 0,-1.90734 -0.048411,-1.868066 2.3051195,-1.870072 l 1.982335,-0.0017 1.052375,-1.721616 c 0.578806,-0.94689 1.052375,-1.785869 1.052375,-1.8644 0,-0.07853 -0.829918,-0.162484 -1.844262,-0.186561 l -1.844263,-0.04378 4.480955,-7.327649 4.480953,-7.32765 12.466741,-0.0399 12.466738,-0.0399 0.517892,0.854518 0.517892,0.854518 2.335995,0.04287 2.335994,0.04287 2.742626,4.521316 c 1.508447,2.486723 4.136212,6.819001 5.839482,9.627283 1.703268,2.808283 3.157599,5.105969 3.231846,5.105969 0.256907,0 0.13186,-0.393635 -0.411085,-1.294044 -0.299901,-0.497351 -0.545275,-0.935841 -0.545275,-0.974422 0,-0.03858 0.310833,-0.07015 0.69074,-0.07015 0.575204,0 0.699074,-0.05324 0.740561,-0.318272 0.03599,-0.229934 0.273254,0.06215 0.854835,1.052375 0.702767,1.196557 0.780303,1.410253 0.610448,1.682462 -0.107012,0.171499 -0.377881,0.627528 -0.601929,1.013399 l -0.407361,0.701583 0.533953,0.857491 c 0.293674,0.47162 0.535536,0.950306 0.537472,1.063747 0.0019,0.113441 -3.098537,5.322698 -6.889942,11.576127 l -6.893462,11.36987 -16.876654,0 -16.876655,0 -1.226996,-2.065773 z"
id="path3077"
inkscape:connector-curvature="0" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
height="64"
width="64">
<metadata>
<rdf:RDF>
<cc:Work>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>Guglielmi David</dc:title>
</cc:Agent>
</dc:creator>
<cc:license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
<dc:rights>
<cc:Agent>
<dc:title>Peter Zelezny</dc:title>
</cc:Agent>
</dc:rights>
<dc:contributor>
<cc:Agent>
<dc:title>Samuel Messner</dc:title>
</cc:Agent>
</dc:contributor>
</cc:Work>
<cc:License rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
<cc:requires rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
<cc:requires rdf:resource="http://web.resource.org/cc/SourceCode" />
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<defs>
<linearGradient id="hexchatGradient" x1="0" y1="1" x2="0" y2="0">
<stop id="hgRedStop" offset="0" style="stop-color: #FF2600; stop-opacity: 1;" />
<stop id="hgYellowStop" offset="1" style="stop-color: #FFD600; stop-opacity: 1;" />
</linearGradient>
<filter inkscape:collect="always" id="dropshadow">
<feGaussianBlur inkscape:collect="always" stdDeviation="1.9736701" id="dropshadowGaussian" />
</filter>
</defs>
<path
style="fill: #000000; fill-opacity: 1;"
d="m 31.62506,4.4248023 c -7.285288,0.0713 -14.595323,0.526836 -15.96875,1.3125 C 12.909458,7.3086297 -0.0321942,29.523731 6.0185229e-5,32.612303 0.0323162,35.700876 13.470952,57.688808 16.25006,59.206053 c 2.779105,1.517245 29.159399,1.258827 31.90625,-0.3125 2.746852,-1.571328 15.688504,-23.786428 15.65625,-26.875 C 63.7803,28.929981 50.372918,6.9107967 47.59381,5.3935523 46.204258,4.6349293 38.910347,4.3535003 31.62506,4.4248023 z m -0.1875,9.2500007 c 3.386631,-0.03246 6.676687,0.05409 8.75,0.28125 l -8.71875,9.71875 -9.0625,-9.5 c 2.055746,-0.283043 5.521157,-0.466366 9.03125,-0.5 z m 17.34375,9.84375 c 2.298293,3.744897 4.302354,7.392556 4.3125,8.34375 0.01126,1.055883 -2.358157,5.507241 -4.875,9.6875 l -9.03125,-8.03125 z m -34.46875,0.25 8.75,9.75 -8.1875,7.875 c -2.482342,-3.992634 -4.707927,-8.110307 -4.71875,-9.125 -0.01021,-0.95736 1.927117,-4.687748 4.15625,-8.5 z m 17.15625,16.90625 9.8125,9.21875 c -4.111037,0.67314 -16.108253,0.781873 -19.46875,0.125 z"
id="outline"
sodipodi:nodetypes="ssssssssscccscsccccccsccccc" />
<path
style="fill: url(#hexchatGradient); fill-opacity: 1;"
d="m 31.25006,6.4873027 c -6.857093,0.06521 -13.707297,0.469014 -15,1.1875 -2.585405,1.4369712 -14.780358,21.7692653 -14.75,24.5937503 0.03036,2.824486 12.665486,22.924987 15.28125,24.3125 2.615763,1.387513 27.445846,1.186972 30.03125,-0.25 2.585405,-1.436972 14.780359,-21.769265 14.75,-24.59375 C 61.5322,28.912818 48.897074,8.7810649 46.28131,7.3935527 44.973429,6.6997957 38.107152,6.4220967 31.25006,6.4873027 z m 0.0625,5.0625003 c 5.36199,-0.05245 10.696035,0.19201 11.71875,0.75 0.06132,0.03346 0.143803,0.127745 0.21875,0.1875 l -11.28125,12.59375 -0.5,0.53125 -0.46875,-0.53125 -11.75,-12.3125 c 0.10903,-0.09884 0.228263,-0.201843 0.3125,-0.25 1.010846,-0.577879 6.38801,-0.916306 11.75,-0.96875 z m 18.0625,9.46875 c 2.883844,4.661341 5.612556,9.652893 5.625,10.84375 0.01348,1.290331 -3.064699,7.087557 -6.09375,12.09375 l -11.09375,-9.90625 -0.53125,-0.46875 0.5,-0.46875 11.59375,-12.09375 z m -35.78125,0.03125 10.84375,12.0625 0.4375,0.46875 -0.46875,0.4375 -10.28125,9.90625 c -3.04689,-4.86606 -6.049362,-10.36778 -6.0625,-11.625 -0.01271,-1.216102 2.689239,-6.451996 5.53125,-11.25 z m 17.875,17.78125 0.4375,0.4375 12.34375,11.59375 c -0.318014,0.365376 -0.587006,0.638955 -0.78125,0.75 -2.02169,1.155758 -21.423322,1.397228 -23.46875,0.28125 -0.228202,-0.124506 -0.601742,-0.47821 -1,-0.9375 l 12,-11.6875 0.46875,-0.4375 z"
id="coloredX" />
</svg>

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,58 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xlink="http://www.w3.org/1999/xlink"
height="64"
width="64">
<metadata>
<rdf:RDF>
<cc:Work>
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>Guglielmi David</dc:title>
</cc:Agent>
</dc:creator>
<cc:license rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
<dc:rights>
<cc:Agent>
<dc:title>Peter Zelezny</dc:title>
</cc:Agent>
</dc:rights>
<dc:contributor>
<cc:Agent>
<dc:title>Samuel Messner</dc:title>
</cc:Agent>
</dc:contributor>
</cc:Work>
<cc:License rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
<cc:requires rdf:resource="http://web.resource.org/cc/Notice" />
<cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
<cc:requires rdf:resource="http://web.resource.org/cc/SourceCode" />
<cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" />
<cc:permits rdf:resource="http://web.resource.org/cc/Distribution" />
<cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<defs>
<linearGradient id="hexchatGradient" x1="0" y1="0" x2="0" y2="1">
<stop id="hgYellowStop" offset="0" style="stop-color: #FFD600" />
<stop id="hgRedStop" offset="1" style="stop-color: #FF2600" />
</linearGradient>
</defs>
<use xlink:href="#outline" style="opacity:0.15" transform="translate(0,2)" id="shadow" />
<path
style="fill:#000000; fill-opacity: 1;"
d="M 31.71875,4.1088109 C 24.433462,4.1801109 17.123427,4.6356469 15.75,5.4213109 13.003148,6.9926379 0.06149557,29.207739 0.09374996,32.296311 0.12600597,35.384884 13.564642,57.372816 16.34375,58.890061 19.122855,60.407306 45.503149,60.148888 48.25,58.577561 50.996852,57.006233 63.938504,34.791133 63.90625,31.702561 63.87399,28.613989 50.466608,6.5948049 47.6875,5.0775609 46.297948,4.3189379 39.004037,4.0375089 31.71875,4.1088109 Z m -0.1875,9.2500001 c 3.386631,-0.03246 6.676687,0.05409 8.75,0.28125 l -8.71875,9.71875 -9.0625,-9.5 c 2.055746,-0.283043 5.521157,-0.466366 9.03125,-0.5 z m 17.34375,9.84375 c 2.298293,3.744897 4.302354,7.392556 4.3125,8.34375 0.01126,1.055883 -2.358157,5.507241 -4.875,9.6875 l -9.03125,-8.03125 z m -34.46875,0.25 8.75,9.75 -8.1875,7.875 c -2.482342,-3.992634 -4.707927,-8.110307 -4.71875,-9.125 -0.01021,-0.95736 1.927117,-4.687748 4.15625,-8.5 z m 17.15625,16.90625 9.8125,9.21875 c -4.111037,0.67314 -16.108253,0.781873 -19.46875,0.125 z"
id="outline" />
<path
style="fill:url(#hexchatGradient); fill-opacity: 1;"
d="m 31.34375,6.1713109 c -6.857093,0.06521 -13.707297,0.469014 -15,1.1875 C 13.758345,8.7957819 1.5633917,29.128076 1.5937497,31.952561 c 0.03036,2.824486 12.6654863,22.924987 15.2812503,24.3125 2.615763,1.387513 27.445846,1.186972 30.03125,-0.25 2.585405,-1.436972 14.780359,-21.769265 14.75,-24.59375 C 61.62589,28.596826 48.990764,8.4650729 46.375,7.0775609 45.067119,6.3838039 38.200842,6.1061049 31.34375,6.1713109 Z m 0.0625,5.0625001 c 5.36199,-0.05245 10.696035,0.19201 11.71875,0.75 0.06132,0.03346 0.143803,0.127745 0.21875,0.1875 l -11.28125,12.59375 -0.5,0.53125 -0.46875,-0.53125 -11.75,-12.3125 c 0.10903,-0.09884 0.228263,-0.201843 0.3125,-0.25 1.010846,-0.577879 6.38801,-0.916306 11.75,-0.96875 z m 18.0625,9.46875 c 2.883844,4.661341 5.612556,9.652893 5.625,10.84375 0.01348,1.290331 -3.064699,7.087557 -6.09375,12.09375 l -11.09375,-9.90625 -0.53125,-0.46875 0.5,-0.46875 11.59375,-12.09375 z m -35.78125,0.03125 10.84375,12.0625 0.4375,0.46875 -0.46875,0.4375 -10.28125,9.90625 c -3.04689,-4.86606 -6.0493623,-10.36778 -6.0625003,-11.625 -0.01271,-1.216102 2.6892393,-6.451996 5.5312503,-11.25 z m 17.875,17.78125 0.4375,0.4375 12.34375,11.59375 c -0.318014,0.365376 -0.587006,0.638955 -0.78125,0.75 -2.02169,1.155758 -21.423322,1.397228 -23.46875,0.28125 -0.228202,-0.124506 -0.601742,-0.47821 -1,-0.9375 l 12,-11.6875 0.46875,-0.4375 z"
id="coloredX" />
</svg>

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -1,11 +1,11 @@
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
install_data(
'hexchat.png',
'zoitechat.png',
rename: 'io.github.Hexchat.png',
install_dir: join_paths(icondir, '48x48/apps')
)
install_data(
'hexchat.svg',
'zoitechat.svg',
rename: 'io.github.Hexchat.svg',
install_dir: join_paths(icondir, 'scalable/apps')
)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 248 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 248 KiB

BIN
data/icons/zoitechat.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
data/icons/zoitechat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

4
data/icons/zoitechat.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 248 KiB

View File

@@ -2,8 +2,8 @@ man_conf = configuration_data()
man_conf.set('VERSION', meson.project_version())
configure_file(
input: 'hexchat.1.in',
output: 'hexchat.1',
input: 'zoitechat.1.in',
output: 'zoitechat.1',
configuration: man_conf,
install: true,
install_dir: join_paths(get_option('mandir'), 'man1')

View File

@@ -1,10 +1,10 @@
.TH HEXCHAT "1" "April 2013" "HexChat @VERSION@" "User Commands"
.TH HEXCHAT "1" "April 2013" "ZoiteChat @VERSION@" "User Commands"
.SH NAME
HexChat \- IRC Client
ZoiteChat \- IRC Client
.SH DESCRIPTION
.SS "Usage:"
.IP
hexchat [OPTION...] URL
zoitechat [OPTION...] URL
.SS "Help Options:"
.TP
\fB\-h\fR, \fB\-\-help\fR
@@ -39,7 +39,7 @@ Open an irc://server:port/channel?key URL
Execute command:
.TP
\fB\-e\fR, \fB\-\-existing\fR
Open URL or execute command in an existing HexChat
Open URL or execute command in an existing ZoiteChat
.TP
\fB\-\-minimize\fR=\fIlevel\fR
Begin minimized. Level 0=Normal 1=Iconified 2=Tray

View File

@@ -4,7 +4,7 @@
<extends>io.github.Hexchat</extends>
<name>@NAME@ Plugin</name>
<summary>@SUMMARY@</summary>
<url type="homepage">https://hexchat.github.io/</url>
<url type="homepage">https://zoitechat.github.io/</url>
<project_license>@LICENSE@</project_license>
<metadata_license>CC0-1.0</metadata_license>
<update_contact>tingping_AT_fedoraproject.org</update_contact>

View File

@@ -1,8 +1,8 @@
[Desktop Entry]
Name=HexChat Theme Manager
Comment=A simple theme manager for HexChat
Name=ZoiteChat Theme Manager
Comment=A simple theme manager for ZoiteChat
Exec=thememan %f
Icon=hexchat
Icon=zoitechat
Terminal=false
Type=Application
MimeType=application/x-hct;

View File

@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/x-hct">
<comment>HexChat theme archives</comment>
<icon name="hexchat" />
<comment>ZoiteChat theme archives</comment>
<icon name="zoitechat" />
<glob pattern="*.hct" weight="100" />
</mime-type>
</mime-info>

View File

@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>io.github.Hexchat</id>
<name>HexChat</name>
<name>ZoiteChat</name>
<launchable type="desktop-id">io.github.Hexchat.desktop</launchable>
<developer_name>HexChat</developer_name>
<developer_name>ZoiteChat</developer_name>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
<translation type="gettext">hexchat</translation>
<translation type="gettext">zoitechat</translation>
<summary>IRC Client</summary>
<description>
<p>HexChat is an easy to use yet extensible IRC Client. It allows you to securely join multiple networks and talk to users privately or in channels using a customizable interface. You can even transfer files.</p>
<p>HexChat supports features such as: DCC, SASL, proxies, spellcheck, alerts, logging, custom themes, and Python/Perl scripts.</p>
<p>ZoiteChat is an easy to use yet extensible IRC Client. It allows you to securely join multiple networks and talk to users privately or in channels using a customizable interface. You can even transfer files.</p>
<p>ZoiteChat supports features such as: DCC, SASL, proxies, spellcheck, alerts, logging, custom themes, and Python/Perl scripts.</p>
</description>
<url type="homepage">http://hexchat.github.io</url>
<url type="bugtracker">https://github.com/hexchat/hexchat</url>
<url type="homepage">http://zoitechat.github.io</url>
<url type="bugtracker">https://github.com/zoitechat/zoitechat</url>
<url type="donation">https://goo.gl/jESZvU</url>
<url type="help">https://hexchat.readthedocs.io/en/latest/</url>
<url type="help">https://zoitechat.readthedocs.io/en/latest/</url>
<screenshots>
<screenshot type="default">
<image>http://i.imgur.com/tLMguQz.png</image>
@@ -24,7 +24,7 @@
</screenshots>
<provides>
<!-- Renamed from this -->
<id>hexchat.desktop</id>
<id>zoitechat.desktop</id>
</provides>
<releases>
<release date="2024-02-07" version="2.16.2">

View File

@@ -1,5 +1,5 @@
[Desktop Entry]
Name=HexChat
Name=ZoiteChat
GenericName=IRC Client
Comment=Chat with other people online
Keywords=IM;Chat;
@@ -16,4 +16,4 @@ Actions=SafeMode;
[Desktop Action SafeMode]
Name=Open Safe Mode
Exec=hexchat --no-auto --no-plugins
Exec=zoitechat --no-auto --no-plugins

View File

@@ -4,7 +4,7 @@ desktop_utils = find_program('desktop-file-validate', required: false)
if get_option('gtk-frontend')
if get_option('install-appdata')
hexchat_appdata = i18n.merge_file(
zoitechat_appdata = i18n.merge_file(
input: 'io.github.Hexchat.appdata.xml.in',
output: 'io.github.Hexchat.appdata.xml',
po_dir: '../../po',
@@ -15,16 +15,16 @@ if get_option('gtk-frontend')
appstream_util = find_program('appstream-util', required: false)
if appstream_util.found()
test('Validate io.github.Hexchat.appdata.xml', appstream_util,
args: ['validate-relax', hexchat_appdata]
args: ['validate-relax', zoitechat_appdata]
)
endif
endif
desktop_conf = configuration_data()
if dbus_glib_dep.found()
desktop_conf.set('exec_command', 'hexchat --existing %U')
desktop_conf.set('exec_command', 'zoitechat --existing %U')
else
desktop_conf.set('exec_command', 'hexchat %U')
desktop_conf.set('exec_command', 'zoitechat %U')
endif
desktop_file = configure_file(
@@ -33,7 +33,7 @@ if get_option('gtk-frontend')
configuration: desktop_conf
)
hexchat_desktop = i18n.merge_file(
zoitechat_desktop = i18n.merge_file(
input: desktop_file,
output: 'io.github.Hexchat.desktop',
po_dir: '../../po',
@@ -44,7 +44,7 @@ if get_option('gtk-frontend')
if desktop_utils.found()
test('Validate io.github.Hexchat.desktop', desktop_utils,
args: [hexchat_desktop]
args: [zoitechat_desktop]
)
endif
endif

View File

@@ -1,9 +0,0 @@
prefix=@prefix@
exec_prefix=${prefix}
includedir=@includedir@
hexchatlibdir=@hexchatlibdir@
Name: HexChat plugins
Description: Header and path for HexChat plugins
Version: @VERSION@
Cflags: -I${includedir}

View File

@@ -2,12 +2,12 @@ pkg_conf = configuration_data()
prefix = get_option('prefix')
pkg_conf.set('prefix', prefix)
pkg_conf.set('VERSION', meson.project_version())
pkg_conf.set('hexchatlibdir', join_paths('${prefix}', plugindir))
pkg_conf.set('zoitechatlibdir', join_paths('${prefix}', plugindir))
pkg_conf.set('includedir', join_paths('${prefix}', get_option('includedir')))
configure_file(
input: 'hexchat-plugin.pc.in',
output: 'hexchat-plugin.pc',
input: 'zoitechat-plugin.pc.in',
output: 'zoitechat-plugin.pc',
configuration: pkg_conf,
install: true,
install_dir: join_paths(get_option('libdir'), 'pkgconfig'),

View File

@@ -0,0 +1,9 @@
prefix=@prefix@
exec_prefix=${prefix}
includedir=@includedir@
zoitechatlibdir=@zoitechatlibdir@
Name: ZoiteChat plugins
Description: Header and path for ZoiteChat plugins
Version: @VERSION@
Cflags: -I${includedir}

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/icons">
<file alias="hexchat.png" preprocess="to-pixdata">icons/hexchat.png</file>
<file alias="zoitechat.png" preprocess="to-pixdata">icons/zoitechat.png</file>
<file alias="book.png" preprocess="to-pixdata">icons/book.png</file>
<file alias="ulist_voice.png" preprocess="to-pixdata">icons/ulist_voice.png</file>
@@ -11,7 +11,7 @@
<file alias="ulist_founder.png" preprocess="to-pixdata">icons/ulist_founder.png</file>
<file alias="ulist_netop.png" preprocess="to-pixdata">icons/ulist_netop.png</file>
<file alias="tray_normal.png" preprocess="to-pixdata">icons/hexchat.png</file>
<file alias="tray_normal.png" preprocess="to-pixdata">icons/zoitechat.png</file>
<file alias="tray_fileoffer.png" preprocess="to-pixdata">icons/tray_fileoffer.png</file>
<file alias="tray_highlight.png" preprocess="to-pixdata">icons/tray_highlight.png</file>
<file alias="tray_message.png" preprocess="to-pixdata">icons/tray_message.png</file>

View File

@@ -15,7 +15,7 @@ index 3ad3c558..6addf962 100644
lib_dir = plugin_get_libdir ();
sub_dir = g_build_filename (get_xdir (), "addons", NULL);
+ for_files ("/app/extensions/lib/hexchat/plugins", "*.so", plugin_auto_load_cb);
+ for_files ("/app/extensions/lib/zoitechat/plugins", "*.so", plugin_auto_load_cb);
+
#ifdef WIN32
/* a long list of bundled plugins that should be loaded automatically,

View File

@@ -4,7 +4,7 @@
"runtime": "org.gnome.Platform",
"runtime-version": "40",
"sdk": "org.gnome.Sdk",
"command": "hexchat",
"command": "zoitechat",
"finish-args": [
"--share=ipc",
"--socket=x11",
@@ -21,7 +21,7 @@
"version": "20.08",
"directory": "extensions",
"add-ld-path": "lib",
"merge-dirs": "lib/hexchat/plugins",
"merge-dirs": "lib/zoitechat/plugins",
"subdirectories": true,
"no-autodownload": true,
"autodelete": true
@@ -46,7 +46,7 @@
]
},
{
"name": "hexchat",
"name": "zoitechat",
"buildsystem": "meson",
"config-opts": [
"--buildtype=release",

View File

@@ -1,4 +1,4 @@
project('hexchat', 'c',
project('zoitechat', 'c',
version: '2.16.2',
meson_version: '>= 0.47.0',
default_options: [
@@ -31,10 +31,10 @@ endif
config_h = configuration_data()
config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
config_h.set_quoted('PACKAGE_NAME', meson.project_name())
config_h.set_quoted('GETTEXT_PACKAGE', 'hexchat')
config_h.set_quoted('GETTEXT_PACKAGE', 'zoitechat')
config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'),
get_option('datadir'), 'locale'))
config_h.set_quoted('G_LOG_DOMAIN', 'hexchat')
config_h.set_quoted('G_LOG_DOMAIN', 'zoitechat')
config_h.set10('ENABLE_NLS', true)
# Optional features
@@ -55,7 +55,7 @@ config_h.set('HAVE_MEMRCHR', cc.has_function('memrchr'))
config_h.set('HAVE_STRINGS_H', cc.has_header('strings.h'))
config_h.set_quoted('HEXCHATLIBDIR',
join_paths(get_option('prefix'), get_option('libdir'), 'hexchat/plugins')
join_paths(get_option('prefix'), get_option('libdir'), 'zoitechat/plugins')
)
if libssl_dep.found()

View File

@@ -5,13 +5,13 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>HexChat</string>
<string>ZoiteChat</string>
<key>CFBundleGetInfoString</key>
<string>@VERSION@</string>
<key>CFBundleIconFile</key>
<string>hexchat.icns</string>
<string>zoitechat.icns</string>
<key>CFBundleIdentifier</key>
<string>org.hexchat</string>
<string>org.zoitechat</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>

View File

@@ -4,7 +4,7 @@
# Christian Kellner <christian.kellner@lanedo.com>
# Carlos Garnacho <carlos.garnacho@lanedo.com>
#
# Modified by HexChat
# Modified by ZoiteChat
#
gtk-color-scheme =

View File

@@ -38,7 +38,7 @@ export PANGO_SYSCONFDIR="$bundle_etc"
export OPENSSL_CONF="/System/Library/OpenSSL/openssl.cnf"
export HEXCHAT_LIBDIR="$bundle_lib/hexchat/plugins"
export HEXCHAT_LIBDIR="$bundle_lib/zoitechat/plugins"
APP=name
I18NDIR="$bundle_data/locale"

View File

@@ -1,11 +1,11 @@
#!/bin/sh
rm -rf HexChat.app
rm -rf ZoiteChat.app
rm -f *.app.zip
python $HOME/.local/bin/gtk-mac-bundler hexchat.bundle
python $HOME/.local/bin/gtk-mac-bundler zoitechat.bundle
echo "Compressing bundle"
#hdiutil create -format UDBZ -srcdir HexChat.app -quiet HexChat-2.9.6.1-$(git rev-parse --short master).dmg
zip -9rXq ./HexChat-$(git describe --tags).app.zip ./HexChat.app
#hdiutil create -format UDBZ -srcdir ZoiteChat.app -quiet ZoiteChat-2.9.6.1-$(git rev-parse --short master).dmg
zip -9rXq ./ZoiteChat-$(git describe --tags).app.zip ./ZoiteChat.app

View File

@@ -14,11 +14,11 @@
<plist>${project}/Info.plist</plist>
<main-binary>
${prefix}/bin/hexchat
${prefix}/bin/zoitechat
</main-binary>
<binary>
${prefix}/lib/hexchat/plugins/*.so
${prefix}/lib/zoitechat/plugins/*.so
</binary>
<binary>
@@ -53,7 +53,7 @@
<translations name="gtk20">
${prefix}/share/locale
</translations>
<translations name="hexchat">
<translations name="zoitechat">
${prefix}/share/locale
</translations>
@@ -62,7 +62,7 @@
</data>
<data dest="${bundle}/Contents/Resources">
${project}/hexchat.icns
${project}/zoitechat.icns
</data>
</app-bundle>

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (c) 2010-2012 Berke Viktor.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -24,9 +24,9 @@
#include <gio/gio.h>
#include "hexchat-plugin.h"
#include "zoitechat-plugin.h"
static hexchat_plugin *ph; /* plugin handle */
static zoitechat_plugin *ph; /* plugin handle */
static char name[] = "Checksum";
static char desc[] = "Calculate checksum for DCC file transfers";
static char version[] = "4.0";
@@ -43,7 +43,7 @@ static void
print_sha256_result (ChecksumCallbackInfo *info, const char *checksum, const char *filename, GError *error)
{
// So then we get the next best available channel, since we always want to print at least somewhere, it's fine
hexchat_context *ctx = hexchat_find_context(ph, info->servername, info->channel);
zoitechat_context *ctx = zoitechat_find_context(ph, info->servername, info->channel);
if (!ctx) {
// before we print a private message to the wrong channel, we exit early
if (info->send_message) {
@@ -51,21 +51,21 @@ print_sha256_result (ChecksumCallbackInfo *info, const char *checksum, const cha
}
// if the context isn't found the first time, we search in the server
ctx = hexchat_find_context(ph, info->servername, NULL);
ctx = zoitechat_find_context(ph, info->servername, NULL);
if (!ctx) {
// The second time we exit early, since printing in another server isn't desireable
return;
}
}
hexchat_set_context(ph, ctx);
zoitechat_set_context(ph, ctx);
if (error) {
hexchat_printf (ph, "Failed to create checksum for %s: %s\n", filename, error->message);
zoitechat_printf (ph, "Failed to create checksum for %s: %s\n", filename, error->message);
} else if (info->send_message) {
hexchat_commandf (ph, "quote PRIVMSG %s :SHA-256 checksum for %s (remote): %s", hexchat_get_info (ph, "channel"), filename, checksum);
zoitechat_commandf (ph, "quote PRIVMSG %s :SHA-256 checksum for %s (remote): %s", zoitechat_get_info (ph, "channel"), filename, checksum);
} else {
hexchat_printf (ph, "SHA-256 checksum for %s (local): %s\n", filename, checksum);
zoitechat_printf (ph, "SHA-256 checksum for %s (local): %s\n", filename, checksum);
}
}
@@ -126,21 +126,21 @@ dccrecv_cb (char *word[], void *userdata)
const char *dcc_completed_dir;
char *filename;
if (hexchat_get_prefs (ph, "dcc_completed_dir", &dcc_completed_dir, NULL) == 1 && dcc_completed_dir[0] != '\0')
if (zoitechat_get_prefs (ph, "dcc_completed_dir", &dcc_completed_dir, NULL) == 1 && dcc_completed_dir[0] != '\0')
filename = g_build_filename (dcc_completed_dir, word[1], NULL);
else
filename = g_strdup (word[2]);
filename_fs = g_filename_from_utf8 (filename, -1, NULL, NULL, NULL);
if (!filename_fs) {
hexchat_printf (ph, "Checksum: Invalid filename (%s)\n", filename);
zoitechat_printf (ph, "Checksum: Invalid filename (%s)\n", filename);
g_free (filename);
return HEXCHAT_EAT_NONE;
}
ChecksumCallbackInfo *callback_data = g_new (ChecksumCallbackInfo, 1);
callback_data->servername = g_strdup(hexchat_get_info(ph, "server"));
callback_data->channel = g_strdup(hexchat_get_info(ph, "channel"));
callback_data->servername = g_strdup(zoitechat_get_info(ph, "server"));
callback_data->channel = g_strdup(zoitechat_get_info(ph, "channel"));
callback_data->send_message = FALSE;
@@ -164,8 +164,8 @@ dccoffer_cb (char *word[], void *userdata)
char *filename;
ChecksumCallbackInfo *callback_data = g_new (ChecksumCallbackInfo, 1);
callback_data->servername = g_strdup(hexchat_get_info(ph, "server"));
callback_data->channel = g_strdup(hexchat_get_info(ph, "channel"));
callback_data->servername = g_strdup(zoitechat_get_info(ph, "server"));
callback_data->channel = g_strdup(zoitechat_get_info(ph, "channel"));
callback_data->send_message = TRUE;
filename = g_strdup (word[3]);
@@ -181,7 +181,7 @@ dccoffer_cb (char *word[], void *userdata)
}
int
hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
@@ -189,16 +189,16 @@ hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **p
*plugin_desc = desc;
*plugin_version = version;
hexchat_hook_print (ph, "DCC RECV Complete", HEXCHAT_PRI_NORM, dccrecv_cb, NULL);
hexchat_hook_print (ph, "DCC Offer", HEXCHAT_PRI_NORM, dccoffer_cb, NULL);
zoitechat_hook_print (ph, "DCC RECV Complete", HEXCHAT_PRI_NORM, dccrecv_cb, NULL);
zoitechat_hook_print (ph, "DCC Offer", HEXCHAT_PRI_NORM, dccoffer_cb, NULL);
hexchat_printf (ph, "%s plugin loaded\n", name);
zoitechat_printf (ph, "%s plugin loaded\n", name);
return 1;
}
int
hexchat_plugin_deinit (void)
zoitechat_plugin_deinit (void)
{
hexchat_printf (ph, "%s plugin unloaded\n", name);
zoitechat_printf (ph, "%s plugin unloaded\n", name);
return 1;
}

View File

@@ -1,3 +1,3 @@
EXPORTS
hexchat_plugin_init
hexchat_plugin_deinit
zoitechat_plugin_init
zoitechat_plugin_deinit

View File

@@ -22,15 +22,15 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
<Import Project="..\..\win32\zoitechat.props" />
<PropertyGroup>
<TargetName>hcchecksum</TargetName>
<OutDir>$(HexChatRel)plugins\</OutDir>
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CHECKSUM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<ModuleDefinitionFile>checksum.def</ModuleDefinitionFile>
@@ -41,7 +41,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;CHECKSUM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<ModuleDefinitionFile>checksum.def</ModuleDefinitionFile>

View File

@@ -1,5 +1,5 @@
shared_module('checksum', 'checksum.c',
dependencies: [libgio_dep, hexchat_plugin_dep],
dependencies: [libgio_dep, zoitechat_plugin_dep],
install: true,
install_dir: plugindir,
name_prefix: '',

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (c) 2011-2012 Berke Viktor.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -23,11 +23,11 @@
#include <windows.h>
#include <time.h>
#include "hexchat-plugin.h"
#include "zoitechat-plugin.h"
static hexchat_plugin *ph; /* plugin handle */
static zoitechat_plugin *ph; /* plugin handle */
static char name[] = "Exec";
static char desc[] = "Execute commands inside HexChat";
static char desc[] = "Execute commands inside ZoiteChat";
static char version[] = "1.2";
static int
@@ -100,12 +100,12 @@ run_command (char *word[], char *word_eol[], void *userdata)
token = strtok_s (buffer, "\n", &context);
while (token != NULL)
{
hexchat_commandf (ph, "SAY %s", token);
zoitechat_commandf (ph, "SAY %s", token);
token = strtok_s (NULL, "\n", &context);
}
}
else
hexchat_printf (ph, "%s", buffer);
zoitechat_printf (ph, "%s", buffer);
}
}
else
@@ -118,11 +118,11 @@ run_command (char *word[], char *word_eol[], void *userdata)
/* display a newline to separate things */
if (!announce)
hexchat_printf (ph, "\n");
zoitechat_printf (ph, "\n");
if (timeElapsed >= 10)
{
hexchat_printf (ph, "Command took too much time to run, execution aborted.\n");
zoitechat_printf (ph, "Command took too much time to run, execution aborted.\n");
}
CloseHandle (readPipe);
@@ -131,14 +131,14 @@ run_command (char *word[], char *word_eol[], void *userdata)
}
else
{
hexchat_command (ph, "help exec");
zoitechat_command (ph, "help exec");
}
return HEXCHAT_EAT_HEXCHAT;
}
int
hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
@@ -146,15 +146,15 @@ hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **p
*plugin_desc = desc;
*plugin_version = version;
hexchat_hook_command (ph, "EXEC", HEXCHAT_PRI_NORM, run_command, "Usage: /EXEC [-O] - execute commands inside HexChat", 0);
hexchat_printf (ph, "%s plugin loaded\n", name);
zoitechat_hook_command (ph, "EXEC", HEXCHAT_PRI_NORM, run_command, "Usage: /EXEC [-O] - execute commands inside ZoiteChat", 0);
zoitechat_printf (ph, "%s plugin loaded\n", name);
return 1; /* return 1 for success */
}
int
hexchat_plugin_deinit (void)
zoitechat_plugin_deinit (void)
{
hexchat_printf (ph, "%s plugin unloaded\n", name);
zoitechat_printf (ph, "%s plugin unloaded\n", name);
return 1;
}

View File

@@ -1,3 +1,3 @@
EXPORTS
hexchat_plugin_init
hexchat_plugin_deinit
zoitechat_plugin_init
zoitechat_plugin_deinit

View File

@@ -22,10 +22,10 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
<Import Project="..\..\win32\zoitechat.props" />
<PropertyGroup>
<TargetName>hcexec</TargetName>
<OutDir>$(HexChatRel)plugins\</OutDir>
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>

View File

@@ -1,5 +1,5 @@
shared_module('exec', 'exec.c',
dependencies: hexchat_plugin_dep,
dependencies: zoitechat_plugin_dep,
install: true,
install_dir: plugindir,
vs_module_defs: 'exec.def',

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -1,4 +1,4 @@
EXPORTS
hexchat_plugin_init
hexchat_plugin_deinit
hexchat_plugin_get_info
zoitechat_plugin_init
zoitechat_plugin_deinit
zoitechat_plugin_get_info

View File

@@ -22,15 +22,15 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
<Import Project="..\..\win32\zoitechat.props" />
<PropertyGroup>
<TargetName>hcfishlim</TargetName>
<OutDir>$(HexChatRel)plugins\</OutDir>
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;HAVE_DH_SET0_PQG;HAVE_DH_GET0_KEY;HAVE_DH_SET0_KEY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<ModuleDefinitionFile>fishlim.def</ModuleDefinitionFile>
@@ -41,7 +41,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;HAVE_DH_SET0_PQG;HAVE_DH_GET0_KEY;HAVE_DH_SET0_KEY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<ModuleDefinitionFile>fishlim.def</ModuleDefinitionFile>
@@ -58,7 +58,7 @@
<ClInclude Include="utils.h" />
<ClInclude Include="irc.h" />
<ClInclude Include="keystore.h" />
<ClInclude Include="plugin_hexchat.h" />
<ClInclude Include="plugin_zoitechat.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dh1080.c" />
@@ -66,7 +66,7 @@
<ClCompile Include="utils.c" />
<ClCompile Include="irc.c" />
<ClCompile Include="keystore.c" />
<ClCompile Include="plugin_hexchat.c" />
<ClCompile Include="plugin_zoitechat.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -38,7 +38,7 @@
<ClInclude Include="keystore.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="plugin_hexchat.h">
<ClInclude Include="plugin_zoitechat.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
@@ -58,7 +58,7 @@
<ClCompile Include="keystore.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="plugin_hexchat.c">
<ClCompile Include="plugin_zoitechat.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>

View File

@@ -30,14 +30,14 @@
#include "irc.h"
#include "fish.h"
#include "keystore.h"
#include "plugin_hexchat.h"
#include "plugin_zoitechat.h"
static char *keystore_password = NULL;
/**
* Opens the key store file: ~/.config/hexchat/addon_fishlim.conf
* Opens the key store file: ~/.config/zoitechat/addon_fishlim.conf
*/
static GKeyFile *getConfigFile(void) {
gchar *filename = get_config_filename();

View File

@@ -11,11 +11,11 @@ fishlim_sources = [
'utils.c',
'irc.c',
'keystore.c',
'plugin_hexchat.c'
'plugin_zoitechat.c'
]
shared_module('fishlim', fishlim_sources,
dependencies: [libgio_dep, hexchat_plugin_dep, libssl_dep],
dependencies: [libgio_dep, zoitechat_plugin_dep, libssl_dep],
install: true,
install_dir: plugindir,
name_prefix: '',

View File

@@ -29,7 +29,7 @@
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include "hexchat-plugin.h"
#include "zoitechat-plugin.h"
#include "fish.h"
#include "dh1080.h"
@@ -50,7 +50,7 @@ static const char usage_notice[] = "Usage: NOTICE+ <nick or #channel> <notice>";
static const char usage_msg[] = "Usage: MSG+ <nick or #channel> <message>";
static hexchat_plugin *ph;
static zoitechat_plugin *ph;
static GHashTable *pending_exchanges;
@@ -58,7 +58,7 @@ static GHashTable *pending_exchanges;
* Compare two nicks using the current plugin
*/
int irc_nick_cmp(const char *a, const char *b) {
return hexchat_nickcmp (ph, a, b);
return zoitechat_nickcmp (ph, a, b);
}
/**
@@ -67,7 +67,7 @@ int irc_nick_cmp(const char *a, const char *b) {
gchar *get_config_filename(void) {
char *filename_fs, *filename_utf8;
filename_utf8 = g_build_filename(hexchat_get_info(ph, "configdir"), "addon_fishlim.conf", NULL);
filename_utf8 = g_build_filename(zoitechat_get_info(ph, "configdir"), "addon_fishlim.conf", NULL);
filename_fs = g_filename_from_utf8 (filename_utf8, -1, NULL, NULL, NULL);
g_free (filename_utf8);
@@ -75,34 +75,34 @@ gchar *get_config_filename(void) {
}
static inline gboolean irc_is_query (const char *name) {
const char *chantypes = hexchat_list_str (ph, NULL, "chantypes");
const char *chantypes = zoitechat_list_str (ph, NULL, "chantypes");
return strchr (chantypes, name[0]) == NULL;
}
static hexchat_context *find_context_on_network (const char *name) {
hexchat_list *channels;
hexchat_context *ret = NULL;
static zoitechat_context *find_context_on_network (const char *name) {
zoitechat_list *channels;
zoitechat_context *ret = NULL;
int id;
if (hexchat_get_prefs(ph, "id", NULL, &id) != 2)
if (zoitechat_get_prefs(ph, "id", NULL, &id) != 2)
return NULL;
channels = hexchat_list_get(ph, "channels");
channels = zoitechat_list_get(ph, "channels");
if (!channels)
return NULL;
while (hexchat_list_next(ph, channels)) {
int chan_id = hexchat_list_int(ph, channels, "id");
const char *chan_name = hexchat_list_str(ph, channels, "channel");
while (zoitechat_list_next(ph, channels)) {
int chan_id = zoitechat_list_int(ph, channels, "id");
const char *chan_name = zoitechat_list_str(ph, channels, "channel");
if (chan_id == id && chan_name && irc_nick_cmp (chan_name, name) == 0) {
ret = (hexchat_context*)hexchat_list_str(ph, channels, "context");
ret = (zoitechat_context*)zoitechat_list_str(ph, channels, "context");
break;
}
};
hexchat_list_free(ph, channels);
zoitechat_list_free(ph, channels);
return ret;
}
@@ -113,23 +113,23 @@ static hexchat_context *find_context_on_network (const char *name) {
char *get_my_info(const char *field, gboolean find_in_other_context) {
char *result = NULL;
const char *own_nick;
hexchat_list *list;
hexchat_context *ctx_current, *ctx_channel;
zoitechat_list *list;
zoitechat_context *ctx_current, *ctx_channel;
/* Display message */
own_nick = hexchat_get_info(ph, "nick");
own_nick = zoitechat_get_info(ph, "nick");
if (!own_nick)
return NULL;
/* Get field for own nick if any */
list = hexchat_list_get(ph, "users");
list = zoitechat_list_get(ph, "users");
if (list) {
while (hexchat_list_next(ph, list)) {
if (irc_nick_cmp(own_nick, hexchat_list_str(ph, list, "nick")) == 0)
result = g_strdup(hexchat_list_str(ph, list, field));
while (zoitechat_list_next(ph, list)) {
if (irc_nick_cmp(own_nick, zoitechat_list_str(ph, list, "nick")) == 0)
result = g_strdup(zoitechat_list_str(ph, list, field));
}
hexchat_list_free(ph, list);
zoitechat_list_free(ph, list);
}
if (result) {
@@ -141,21 +141,21 @@ char *get_my_info(const char *field, gboolean find_in_other_context) {
return NULL;
}
list = hexchat_list_get(ph, "channels");
list = zoitechat_list_get(ph, "channels");
if (list) {
ctx_current = hexchat_get_context(ph);
while (hexchat_list_next(ph, list)) {
ctx_channel = (hexchat_context *) hexchat_list_str(ph, list, "context");
ctx_current = zoitechat_get_context(ph);
while (zoitechat_list_next(ph, list)) {
ctx_channel = (zoitechat_context *) zoitechat_list_str(ph, list, "context");
hexchat_set_context(ph, ctx_channel);
zoitechat_set_context(ph, ctx_channel);
result = get_my_info(field, FALSE);
hexchat_set_context(ph, ctx_current);
zoitechat_set_context(ph, ctx_current);
if (result) {
break;
}
}
hexchat_list_free(ph, list);
zoitechat_list_free(ph, list);
}
return result;
@@ -187,7 +187,7 @@ int get_prefix_length(void) {
int prefix_len = 0;
/* ':! ' + 'nick' + 'ident@host', e.g. ':user!~name@mynet.com ' */
prefix_len = 3 + strlen(hexchat_get_info(ph, "nick"));
prefix_len = 3 + strlen(zoitechat_get_info(ph, "nick"));
own_host = get_my_own_host();
if (own_host) {
prefix_len += strlen(own_host);
@@ -278,11 +278,11 @@ char *decrypt_raw_message(const char *message, const char *key) {
}
/*static int handle_debug(char *word[], char *word_eol[], void *userdata) {
hexchat_printf(ph, "debug incoming: ");
zoitechat_printf(ph, "debug incoming: ");
for (size_t i = 1; word[i] != NULL && word[i][0] != '\0'; i++) {
hexchat_printf(ph, ">%s< ", word[i]);
zoitechat_printf(ph, ">%s< ", word[i]);
}
hexchat_printf(ph, "\n");
zoitechat_printf(ph, "\n");
return HEXCHAT_EAT_NONE;
}*/
@@ -296,7 +296,7 @@ static int handle_outgoing(char *word[], char *word_eol[], void *userdata) {
GString *command;
GSList *encrypted_list, *encrypted_item;
const char *channel = hexchat_get_info(ph, "channel");
const char *channel = zoitechat_get_info(ph, "channel");
/* Check if we can encrypt */
if (!fish_nick_has_key(channel)) return HEXCHAT_EAT_NONE;
@@ -317,14 +317,14 @@ static int handle_outgoing(char *word[], char *word_eol[], void *userdata) {
message = g_strconcat("[", fish_modes[mode], "] ", word_eol[1], NULL);
/* Display message */
hexchat_emit_print(ph, "Your Message", hexchat_get_info(ph, "nick"), message, prefix, NULL);
zoitechat_emit_print(ph, "Your Message", zoitechat_get_info(ph, "nick"), message, prefix, NULL);
g_free(message);
/* Send encrypted messages */
encrypted_item = encrypted_list;
while (encrypted_item)
{
hexchat_commandf(ph, "%s%s", command->str, (char *)encrypted_item->data);
zoitechat_commandf(ph, "%s%s", command->str, (char *)encrypted_item->data);
encrypted_item = encrypted_item->next;
}
@@ -339,7 +339,7 @@ static int handle_outgoing(char *word[], char *word_eol[], void *userdata) {
/**
* Called when a channel message or private message is received.
*/
static int handle_incoming(char *word[], char *word_eol[], hexchat_event_attrs *attrs, void *userdata) {
static int handle_incoming(char *word[], char *word_eol[], zoitechat_event_attrs *attrs, void *userdata) {
const char *prefix;
const char *command;
const char *recipient;
@@ -392,7 +392,7 @@ static int handle_incoming(char *word[], char *word_eol[], hexchat_event_attrs *
/* Fake server message
* RECV command will throw this function again, if message have multiple
* encrypted data, we will decrypt all */
hexchat_command(ph, message->str);
zoitechat_command(ph, message->str);
g_string_free (message, TRUE);
return HEXCHAT_EAT_HEXCHAT;
@@ -401,7 +401,7 @@ static int handle_incoming(char *word[], char *word_eol[], hexchat_event_attrs *
static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
const char *dh_message = word[4];
const char *dh_pubkey = word[5];
hexchat_context *query_ctx;
zoitechat_context *query_ctx;
const char *prefix;
char *sender, *secret_key, *priv_key = NULL;
enum fish_mode mode = FISH_ECB_MODE;
@@ -415,7 +415,7 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
sender = irc_prefix_get_nick(prefix);
query_ctx = find_context_on_network(sender);
if (query_ctx)
g_assert(hexchat_set_context(ph, query_ctx) == 1);
g_assert(zoitechat_set_context(ph, query_ctx) == 1);
dh_message++; /* : prefix */
@@ -425,12 +425,12 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
if (!strcmp(dh_message, "DH1080_INIT")) {
char *pub_key;
hexchat_printf(ph, "Received public key from %s (%s), sending mine...", sender, fish_modes[mode]);
zoitechat_printf(ph, "Received public key from %s (%s), sending mine...", sender, fish_modes[mode]);
if (dh1080_generate_key(&priv_key, &pub_key)) {
hexchat_commandf(ph, "quote NOTICE %s :DH1080_FINISH %s%s", sender, pub_key, (mode == FISH_CBC_MODE) ? " CBC" : "");
zoitechat_commandf(ph, "quote NOTICE %s :DH1080_FINISH %s%s", sender, pub_key, (mode == FISH_CBC_MODE) ? " CBC" : "");
g_free(pub_key);
} else {
hexchat_print(ph, "Failed to generate keys");
zoitechat_print(ph, "Failed to generate keys");
goto cleanup;
}
} else if (!strcmp (dh_message, "DH1080_FINISH")) {
@@ -441,7 +441,7 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
g_free(sender_lower);
if (!priv_key) {
hexchat_printf(ph, "Received a key exchange response for unknown user: %s", sender);
zoitechat_printf(ph, "Received a key exchange response for unknown user: %s", sender);
goto cleanup;
}
} else {
@@ -452,10 +452,10 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
if (dh1080_compute_key(priv_key, dh_pubkey, &secret_key)) {
keystore_store_key(sender, secret_key, mode);
hexchat_printf(ph, "Stored new key for %s (%s)", sender, fish_modes[mode]);
zoitechat_printf(ph, "Stored new key for %s (%s)", sender, fish_modes[mode]);
g_free(secret_key);
} else {
hexchat_print(ph, "Failed to create secret key!");
zoitechat_print(ph, "Failed to create secret key!");
}
cleanup:
@@ -474,13 +474,13 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) {
/* Check syntax */
if (*word[2] == '\0') {
hexchat_printf(ph, "%s\n", usage_setkey);
zoitechat_printf(ph, "%s\n", usage_setkey);
return HEXCHAT_EAT_HEXCHAT;
}
if (*word[3] == '\0') {
/* /setkey password */
nick = hexchat_get_info(ph, "channel");
nick = zoitechat_get_info(ph, "channel");
key = word_eol[2];
} else {
/* /setkey #channel password */
@@ -498,9 +498,9 @@ static int handle_setkey(char *word[], char *word_eol[], void *userdata) {
/* Set password */
if (keystore_store_key(nick, key, mode)) {
hexchat_printf(ph, "Stored key for %s (%s)\n", nick, fish_modes[mode]);
zoitechat_printf(ph, "Stored key for %s (%s)\n", nick, fish_modes[mode]);
} else {
hexchat_printf(ph, "\00305Failed to store key in addon_fishlim.conf\n");
zoitechat_printf(ph, "\00305Failed to store key in addon_fishlim.conf\n");
}
return HEXCHAT_EAT_HEXCHAT;
@@ -517,21 +517,21 @@ static int handle_delkey(char *word[], char *word_eol[], void *userdata) {
if (*word[2] != '\0') {
nick = g_strstrip(g_strdup(word_eol[2]));
} else { /* Delete key from current context */
nick = g_strdup(hexchat_get_info(ph, "channel"));
ctx_type = hexchat_list_int(ph, NULL, "type");
nick = g_strdup(zoitechat_get_info(ph, "channel"));
ctx_type = zoitechat_list_int(ph, NULL, "type");
/* Only allow channel or dialog */
if (ctx_type < 2 || ctx_type > 3) {
hexchat_printf(ph, "%s\n", usage_delkey);
zoitechat_printf(ph, "%s\n", usage_delkey);
return HEXCHAT_EAT_HEXCHAT;
}
}
/* Delete the given nick from the key store */
if (keystore_delete_nick(nick)) {
hexchat_printf(ph, "Deleted key for %s\n", nick);
zoitechat_printf(ph, "Deleted key for %s\n", nick);
} else {
hexchat_printf(ph, "\00305Failed to delete key in addon_fishlim.conf!\n");
zoitechat_printf(ph, "\00305Failed to delete key in addon_fishlim.conf!\n");
}
g_free(nick);
@@ -540,36 +540,36 @@ static int handle_delkey(char *word[], char *word_eol[], void *userdata) {
static int handle_keyx(char *word[], char *word_eol[], void *userdata) {
const char *target = word[2];
hexchat_context *query_ctx = NULL;
zoitechat_context *query_ctx = NULL;
char *pub_key, *priv_key;
int ctx_type;
if (*target)
query_ctx = find_context_on_network(target);
else {
target = hexchat_get_info(ph, "channel");
query_ctx = hexchat_get_context (ph);
target = zoitechat_get_info(ph, "channel");
query_ctx = zoitechat_get_context (ph);
}
if (query_ctx) {
g_assert(hexchat_set_context(ph, query_ctx) == 1);
ctx_type = hexchat_list_int(ph, NULL, "type");
g_assert(zoitechat_set_context(ph, query_ctx) == 1);
ctx_type = zoitechat_list_int(ph, NULL, "type");
}
if ((query_ctx && ctx_type != 3) || (!query_ctx && !irc_is_query(target))) {
hexchat_print(ph, "You can only exchange keys with individuals");
zoitechat_print(ph, "You can only exchange keys with individuals");
return HEXCHAT_EAT_ALL;
}
if (dh1080_generate_key(&priv_key, &pub_key)) {
g_hash_table_replace (pending_exchanges, g_ascii_strdown(target, -1), priv_key);
hexchat_commandf(ph, "quote NOTICE %s :DH1080_INIT %s CBC", target, pub_key);
hexchat_printf(ph, "Sent public key to %s (CBC), waiting for reply...", target);
zoitechat_commandf(ph, "quote NOTICE %s :DH1080_INIT %s CBC", target, pub_key);
zoitechat_printf(ph, "Sent public key to %s (CBC), waiting for reply...", target);
g_free(pub_key);
} else {
hexchat_print(ph, "Failed to generate keys");
zoitechat_print(ph, "Failed to generate keys");
}
return HEXCHAT_EAT_ALL;
@@ -586,20 +586,20 @@ static int handle_crypt_topic(char *word[], char *word_eol[], void *userdata) {
GSList *encrypted_list;
if (!*topic) {
hexchat_print(ph, usage_topic);
zoitechat_print(ph, usage_topic);
return HEXCHAT_EAT_ALL;
}
if (hexchat_list_int(ph, NULL, "type") != 2) {
hexchat_printf(ph, "Please change to the channel window where you want to set the topic!");
if (zoitechat_list_int(ph, NULL, "type") != 2) {
zoitechat_printf(ph, "Please change to the channel window where you want to set the topic!");
return HEXCHAT_EAT_ALL;
}
target = hexchat_get_info(ph, "channel");
target = zoitechat_get_info(ph, "channel");
/* Check if we can encrypt */
if (!fish_nick_has_key(target)) {
hexchat_printf(ph, "/topic+ error, no key found for %s", target);
zoitechat_printf(ph, "/topic+ error, no key found for %s", target);
return HEXCHAT_EAT_ALL;
}
@@ -609,11 +609,11 @@ static int handle_crypt_topic(char *word[], char *word_eol[], void *userdata) {
encrypted_list = fish_encrypt_for_nick(target, topic, &mode, get_prefix_length() + command->len);
if (!encrypted_list) {
g_string_free(command, TRUE);
hexchat_printf(ph, "/topic+ error, can't encrypt %s", target);
zoitechat_printf(ph, "/topic+ error, can't encrypt %s", target);
return HEXCHAT_EAT_ALL;
}
hexchat_commandf(ph, "%s%s", command->str, (char *) encrypted_list->data);
zoitechat_commandf(ph, "%s%s", command->str, (char *) encrypted_list->data);
g_string_free(command, TRUE);
g_slist_free_full(encrypted_list, g_free);
@@ -633,13 +633,13 @@ static int handle_crypt_notice(char *word[], char *word_eol[], void *userdata) {
GSList *encrypted_list, *encrypted_item;
if (!*target || !*notice) {
hexchat_print(ph, usage_notice);
zoitechat_print(ph, usage_notice);
return HEXCHAT_EAT_ALL;
}
/* Check if we can encrypt */
if (!fish_nick_has_key(target)) {
hexchat_printf(ph, "/notice+ error, no key found for %s.", target);
zoitechat_printf(ph, "/notice+ error, no key found for %s.", target);
return HEXCHAT_EAT_ALL;
}
@@ -649,17 +649,17 @@ static int handle_crypt_notice(char *word[], char *word_eol[], void *userdata) {
encrypted_list = fish_encrypt_for_nick(target, notice, &mode, get_prefix_length() + command->len);
if (!encrypted_list) {
g_string_free(command, TRUE);
hexchat_printf(ph, "/notice+ error, can't encrypt %s", target);
zoitechat_printf(ph, "/notice+ error, can't encrypt %s", target);
return HEXCHAT_EAT_ALL;
}
notice_flag = g_strconcat("[", fish_modes[mode], "] ", notice, NULL);
hexchat_emit_print(ph, "Notice Send", target, notice_flag);
zoitechat_emit_print(ph, "Notice Send", target, notice_flag);
/* Send encrypted messages */
encrypted_item = encrypted_list;
while (encrypted_item) {
hexchat_commandf(ph, "%s%s", command->str, (char *) encrypted_item->data);
zoitechat_commandf(ph, "%s%s", command->str, (char *) encrypted_item->data);
encrypted_item = encrypted_item->next;
}
@@ -679,19 +679,19 @@ static int handle_crypt_msg(char *word[], char *word_eol[], void *userdata) {
const char *message = word_eol[3];
char *message_flag;
char *prefix;
hexchat_context *query_ctx;
zoitechat_context *query_ctx;
enum fish_mode mode;
GString *command;
GSList *encrypted_list, *encrypted_item;
if (!*target || !*message) {
hexchat_print(ph, usage_msg);
zoitechat_print(ph, usage_msg);
return HEXCHAT_EAT_ALL;
}
/* Check if we can encrypt */
if (!fish_nick_has_key(target)) {
hexchat_printf(ph, "/msg+ error, no key found for %s", target);
zoitechat_printf(ph, "/msg+ error, no key found for %s", target);
return HEXCHAT_EAT_ALL;
}
@@ -701,14 +701,14 @@ static int handle_crypt_msg(char *word[], char *word_eol[], void *userdata) {
encrypted_list = fish_encrypt_for_nick(target, message, &mode, get_prefix_length() + command->len);
if (!encrypted_list) {
g_string_free(command, TRUE);
hexchat_printf(ph, "/msg+ error, can't encrypt %s", target);
zoitechat_printf(ph, "/msg+ error, can't encrypt %s", target);
return HEXCHAT_EAT_ALL;
}
/* Send encrypted messages */
encrypted_item = encrypted_list;
while (encrypted_item) {
hexchat_commandf(ph, "%s%s", command->str, (char *) encrypted_item->data);
zoitechat_commandf(ph, "%s%s", command->str, (char *) encrypted_item->data);
encrypted_item = encrypted_item->next;
}
@@ -718,24 +718,24 @@ static int handle_crypt_msg(char *word[], char *word_eol[], void *userdata) {
query_ctx = find_context_on_network(target);
if (query_ctx) {
g_assert(hexchat_set_context(ph, query_ctx) == 1);
g_assert(zoitechat_set_context(ph, query_ctx) == 1);
prefix = get_my_own_prefix();
/* Add encrypted flag */
message_flag = g_strconcat("[", fish_modes[mode], "] ", message, NULL);
hexchat_emit_print(ph, "Your Message", hexchat_get_info(ph, "nick"), message_flag, prefix, NULL);
zoitechat_emit_print(ph, "Your Message", zoitechat_get_info(ph, "nick"), message_flag, prefix, NULL);
g_free(prefix);
g_free(message_flag);
} else {
hexchat_emit_print(ph, "Message Send", target, message);
zoitechat_emit_print(ph, "Message Send", target, message);
}
return HEXCHAT_EAT_ALL;
}
static int handle_crypt_me(char *word[], char *word_eol[], void *userdata) {
const char *channel = hexchat_get_info(ph, "channel");
const char *channel = zoitechat_get_info(ph, "channel");
enum fish_mode mode;
GString *command;
GSList *encrypted_list, *encrypted_item;
@@ -752,16 +752,16 @@ static int handle_crypt_me(char *word[], char *word_eol[], void *userdata) {
encrypted_list = fish_encrypt_for_nick(channel, word_eol[2], &mode, get_prefix_length() + command->len + 2);
if (!encrypted_list) {
g_string_free(command, TRUE);
hexchat_printf(ph, "/me error, can't encrypt %s", channel);
zoitechat_printf(ph, "/me error, can't encrypt %s", channel);
return HEXCHAT_EAT_ALL;
}
hexchat_emit_print(ph, "Your Action", hexchat_get_info(ph, "nick"), word_eol[2], NULL);
zoitechat_emit_print(ph, "Your Action", zoitechat_get_info(ph, "nick"), word_eol[2], NULL);
/* Send encrypted messages */
encrypted_item = encrypted_list;
while (encrypted_item) {
hexchat_commandf(ph, "%s%s \001", command->str, (char *) encrypted_item->data);
zoitechat_commandf(ph, "%s%s \001", command->str, (char *) encrypted_item->data);
encrypted_item = encrypted_item->next;
}
@@ -775,7 +775,7 @@ static int handle_crypt_me(char *word[], char *word_eol[], void *userdata) {
/**
* Returns the plugin name version information.
*/
void hexchat_plugin_get_info(const char **name, const char **desc,
void zoitechat_plugin_get_info(const char **name, const char **desc,
const char **version, void **reserved) {
*name = plugin_name;
*desc = plugin_desc;
@@ -785,35 +785,35 @@ void hexchat_plugin_get_info(const char **name, const char **desc,
/**
* Plugin entry point.
*/
int hexchat_plugin_init(hexchat_plugin *plugin_handle,
int zoitechat_plugin_init(zoitechat_plugin *plugin_handle,
const char **name,
const char **desc,
const char **version,
char *arg) {
ph = plugin_handle;
/* Send our info to HexChat */
/* Send our info to ZoiteChat */
*name = plugin_name;
*desc = plugin_desc;
*version = plugin_version;
/* Register commands */
hexchat_hook_command(ph, "SETKEY", HEXCHAT_PRI_NORM, handle_setkey, usage_setkey, NULL);
hexchat_hook_command(ph, "DELKEY", HEXCHAT_PRI_NORM, handle_delkey, usage_delkey, NULL);
hexchat_hook_command(ph, "KEYX", HEXCHAT_PRI_NORM, handle_keyx, usage_keyx, NULL);
hexchat_hook_command(ph, "TOPIC+", HEXCHAT_PRI_NORM, handle_crypt_topic, usage_topic, NULL);
hexchat_hook_command(ph, "NOTICE+", HEXCHAT_PRI_NORM, handle_crypt_notice, usage_notice, NULL);
hexchat_hook_command(ph, "MSG+", HEXCHAT_PRI_NORM, handle_crypt_msg, usage_msg, NULL);
hexchat_hook_command(ph, "ME", HEXCHAT_PRI_NORM, handle_crypt_me, NULL, NULL);
zoitechat_hook_command(ph, "SETKEY", HEXCHAT_PRI_NORM, handle_setkey, usage_setkey, NULL);
zoitechat_hook_command(ph, "DELKEY", HEXCHAT_PRI_NORM, handle_delkey, usage_delkey, NULL);
zoitechat_hook_command(ph, "KEYX", HEXCHAT_PRI_NORM, handle_keyx, usage_keyx, NULL);
zoitechat_hook_command(ph, "TOPIC+", HEXCHAT_PRI_NORM, handle_crypt_topic, usage_topic, NULL);
zoitechat_hook_command(ph, "NOTICE+", HEXCHAT_PRI_NORM, handle_crypt_notice, usage_notice, NULL);
zoitechat_hook_command(ph, "MSG+", HEXCHAT_PRI_NORM, handle_crypt_msg, usage_msg, NULL);
zoitechat_hook_command(ph, "ME", HEXCHAT_PRI_NORM, handle_crypt_me, NULL, NULL);
/* Add handlers */
hexchat_hook_command(ph, "", HEXCHAT_PRI_NORM, handle_outgoing, NULL, NULL);
hexchat_hook_server(ph, "NOTICE", HEXCHAT_PRI_HIGHEST, handle_keyx_notice, NULL);
hexchat_hook_server_attrs(ph, "NOTICE", HEXCHAT_PRI_NORM, handle_incoming, NULL);
hexchat_hook_server_attrs(ph, "PRIVMSG", HEXCHAT_PRI_NORM, handle_incoming, NULL);
/* hexchat_hook_server(ph, "RAW LINE", HEXCHAT_PRI_NORM, handle_debug, NULL); */
hexchat_hook_server_attrs(ph, "TOPIC", HEXCHAT_PRI_NORM, handle_incoming, NULL);
hexchat_hook_server_attrs(ph, "332", HEXCHAT_PRI_NORM, handle_incoming, NULL);
zoitechat_hook_command(ph, "", HEXCHAT_PRI_NORM, handle_outgoing, NULL, NULL);
zoitechat_hook_server(ph, "NOTICE", HEXCHAT_PRI_HIGHEST, handle_keyx_notice, NULL);
zoitechat_hook_server_attrs(ph, "NOTICE", HEXCHAT_PRI_NORM, handle_incoming, NULL);
zoitechat_hook_server_attrs(ph, "PRIVMSG", HEXCHAT_PRI_NORM, handle_incoming, NULL);
/* zoitechat_hook_server(ph, "RAW LINE", HEXCHAT_PRI_NORM, handle_debug, NULL); */
zoitechat_hook_server_attrs(ph, "TOPIC", HEXCHAT_PRI_NORM, handle_incoming, NULL);
zoitechat_hook_server_attrs(ph, "332", HEXCHAT_PRI_NORM, handle_incoming, NULL);
if (!fish_init())
return 0;
@@ -823,17 +823,17 @@ int hexchat_plugin_init(hexchat_plugin *plugin_handle,
pending_exchanges = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
hexchat_printf(ph, "%s plugin loaded\n", plugin_name);
zoitechat_printf(ph, "%s plugin loaded\n", plugin_name);
/* Return success */
return 1;
}
int hexchat_plugin_deinit(void) {
int zoitechat_plugin_deinit(void) {
g_clear_pointer(&pending_exchanges, g_hash_table_destroy);
dh1080_deinit();
fish_deinit();
hexchat_printf(ph, "%s plugin unloaded\n", plugin_name);
zoitechat_printf(ph, "%s plugin unloaded\n", plugin_name);
return 1;
}

View File

@@ -6,7 +6,7 @@ fishlim_test_sources = [
]
fishlim_tests = executable('fishlim_tests', fishlim_test_sources,
dependencies: [libgio_dep, libssl_dep, hexchat_plugin_dep],
dependencies: [libgio_dep, libssl_dep, zoitechat_plugin_dep],
include_directories: include_directories('..'),
)

File diff suppressed because it is too large Load Diff

View File

@@ -22,15 +22,15 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
<Import Project="..\..\win32\zoitechat.props" />
<PropertyGroup>
<TargetName>$(LuaOutput)</TargetName>
<OutDir>$(HexChatRel)plugins\</OutDir>
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Glib);$(LuaInclude);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(Glib);$(LuaInclude);..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>"$(LuaLib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
@@ -40,7 +40,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Glib);$(LuaInclude);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(Glib);$(LuaInclude);..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>"$(LuaLib).lib";$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>

View File

@@ -5,7 +5,7 @@ else
endif
shared_module('lua', 'lua.c',
dependencies: [libgio_dep, hexchat_plugin_dep, lua_dep],
dependencies: [libgio_dep, zoitechat_plugin_dep, lua_dep],
install: true,
install_dir: plugindir,
name_prefix: '',

View File

@@ -1,4 +1,4 @@
plugindir = join_paths(get_option('libdir'), 'hexchat/plugins')
plugindir = join_paths(get_option('libdir'), 'zoitechat/plugins')
if host_machine.system() == 'windows'
if get_option('with-exec')

View File

@@ -25,13 +25,13 @@ sub toc {
}
for my $files (
[ "hexchat.pm.h", # output file
"lib/HexChat.pm", # input files
[ "zoitechat.pm.h", # output file
"lib/ZoiteChat.pm", # input files
"lib/Xchat.pm",
"lib/HexChat/Embed.pm",
"lib/HexChat/List/Network.pm",
"lib/HexChat/List/Network/Entry.pm",
"lib/HexChat/List/Network/AutoJoin.pm",
"lib/ZoiteChat/Embed.pm",
"lib/ZoiteChat/List/Network.pm",
"lib/ZoiteChat/List/Network/Entry.pm",
"lib/ZoiteChat/List/Network/AutoJoin.pm",
],
[ "irc.pm.h", # output file
"lib/IRC.pm" # input file

View File

@@ -1 +1 @@
require HexChat;
require ZoiteChat;

View File

@@ -8,8 +8,8 @@ $SIG{__WARN__} = sub {
print STDERR $message;
} else {
if( defined &HexChat::Internal::print ) {
HexChat::print( $message );
if( defined &ZoiteChat::Internal::print ) {
ZoiteChat::print( $message );
} else {
warn $message;
}
@@ -24,7 +24,7 @@ use Symbol();
use Time::HiRes ();
use Carp ();
package HexChat;
package ZoiteChat;
use base qw(Exporter);
use strict;
use warnings;
@@ -48,13 +48,13 @@ sub FD_EXCEPTION ();
sub FD_NOTSOCKET ();
sub get_context;
sub HexChat::Internal::context_info;
sub HexChat::Internal::print;
sub ZoiteChat::Internal::context_info;
sub ZoiteChat::Internal::print;
#keep compatibility with Xchat scripts
sub EAT_XCHAT ();
BEGIN {
*Xchat:: = *HexChat::;
*Xchat:: = *ZoiteChat::;
}
our %EXPORT_TAGS = (
@@ -81,20 +81,20 @@ our @EXPORT = @{$EXPORT_TAGS{constants}};
our @EXPORT_OK = @{$EXPORT_TAGS{all}};
sub register {
my ($package, $calling_package) = HexChat::Embed::find_pkg();
my $pkg_info = HexChat::Embed::pkg_info( $package );
my ($package, $calling_package) = ZoiteChat::Embed::find_pkg();
my $pkg_info = ZoiteChat::Embed::pkg_info( $package );
my $filename = $pkg_info->{filename};
my ($name, $version, $description, $callback) = @_;
if( defined $pkg_info->{gui_entry} ) {
HexChat::print( "HexChat::register called more than once in "
ZoiteChat::print( "ZoiteChat::register called more than once in "
. $pkg_info->{filename} );
return ();
}
$description = "" unless defined $description;
if( $callback ) {
$callback = HexChat::Embed::fix_callback(
$callback = ZoiteChat::Embed::fix_callback(
$package, $calling_package, $callback
);
}
@@ -106,7 +106,7 @@ sub register {
$version = "NaN";
}
$pkg_info->{gui_entry} =
HexChat::Internal::register( $name, $version, $description, $filename );
ZoiteChat::Internal::register( $name, $version, $description, $filename );
# keep with old behavior
return ();
}
@@ -136,21 +136,21 @@ sub hook_server {
my $message = shift;
my $callback = shift;
my $options = shift;
my ($package, $calling_package) = HexChat::Embed::find_pkg();
my ($package, $calling_package) = ZoiteChat::Embed::find_pkg();
$callback = HexChat::Embed::fix_callback(
$callback = ZoiteChat::Embed::fix_callback(
$package, $calling_package, $callback
);
my ($priority, $data) = ( HexChat::PRI_NORM, undef );
my ($priority, $data) = ( ZoiteChat::PRI_NORM, undef );
_process_hook_options(
$options,
[qw(priority data)],
[\($priority, $data)],
);
my $pkg_info = HexChat::Embed::pkg_info( $package );
my $hook = HexChat::Internal::hook_server(
my $pkg_info = ZoiteChat::Embed::pkg_info( $package );
my $hook = ZoiteChat::Internal::hook_server(
$message, $priority, $callback, $data, $package
);
push @{$pkg_info->{hooks}}, $hook if defined $hook;
@@ -162,21 +162,21 @@ sub hook_command {
my $command = shift;
my $callback = shift;
my $options = shift;
my ($package, $calling_package) = HexChat::Embed::find_pkg();
my ($package, $calling_package) = ZoiteChat::Embed::find_pkg();
$callback = HexChat::Embed::fix_callback(
$callback = ZoiteChat::Embed::fix_callback(
$package, $calling_package, $callback
);
my ($priority, $help_text, $data) = ( HexChat::PRI_NORM, undef, undef );
my ($priority, $help_text, $data) = ( ZoiteChat::PRI_NORM, undef, undef );
_process_hook_options(
$options,
[qw(priority help_text data)],
[\($priority, $help_text, $data)],
);
my $pkg_info = HexChat::Embed::pkg_info( $package );
my $hook = HexChat::Internal::hook_command(
my $pkg_info = ZoiteChat::Embed::pkg_info( $package );
my $hook = ZoiteChat::Internal::hook_command(
$command, $priority, $callback, $help_text, $data, $package
);
push @{$pkg_info->{hooks}}, $hook if defined $hook;
@@ -188,13 +188,13 @@ sub hook_print {
my $event = shift;
my $callback = shift;
my $options = shift;
my ($package, $calling_package) = HexChat::Embed::find_pkg();
my ($package, $calling_package) = ZoiteChat::Embed::find_pkg();
$callback = HexChat::Embed::fix_callback(
$callback = ZoiteChat::Embed::fix_callback(
$package, $calling_package, $callback
);
my ($priority, $run_after, $filter, $data) = ( HexChat::PRI_NORM, 0, 0, undef );
my ($priority, $run_after, $filter, $data) = ( ZoiteChat::PRI_NORM, 0, 0, undef );
_process_hook_options(
$options,
[qw(priority run_after_event filter data)],
@@ -202,7 +202,7 @@ sub hook_print {
);
if( $run_after and $filter ) {
Carp::carp( "HexChat::hook_print's run_after_event and filter options are mutually exclusive, you can only use of them at a time per hook" );
Carp::carp( "ZoiteChat::hook_print's run_after_event and filter options are mutually exclusive, you can only use of them at a time per hook" );
return;
}
@@ -254,8 +254,8 @@ sub hook_print {
}
my $pkg_info = HexChat::Embed::pkg_info( $package );
my $hook = HexChat::Internal::hook_print(
my $pkg_info = ZoiteChat::Embed::pkg_info( $package );
my $hook = ZoiteChat::Internal::hook_print(
$event, $priority, $callback, $data, $package
);
push @{$pkg_info->{hooks}}, $hook if defined $hook;
@@ -265,9 +265,9 @@ sub hook_print {
sub hook_timer {
return undef unless @_ >= 2;
my ($timeout, $callback, $data) = @_;
my ($package, $calling_package) = HexChat::Embed::find_pkg();
my ($package, $calling_package) = ZoiteChat::Embed::find_pkg();
$callback = HexChat::Embed::fix_callback(
$callback = ZoiteChat::Embed::fix_callback(
$package, $calling_package, $callback
);
@@ -278,8 +278,8 @@ sub hook_timer {
$data = $data->{data};
}
my $pkg_info = HexChat::Embed::pkg_info( $package );
my $hook = HexChat::Internal::hook_timer( $timeout, $callback, $data, $package );
my $pkg_info = ZoiteChat::Embed::pkg_info( $package );
my $hook = ZoiteChat::Internal::hook_timer( $timeout, $callback, $data, $package );
push @{$pkg_info->{hooks}}, $hook if defined $hook;
return $hook;
}
@@ -292,12 +292,12 @@ sub hook_fd {
my $fileno = fileno $fd;
return undef unless defined $fileno; # no underlying fd for this handle
my ($package, $calling_package) = HexChat::Embed::find_pkg();
$callback = HexChat::Embed::fix_callback(
my ($package, $calling_package) = ZoiteChat::Embed::find_pkg();
$callback = ZoiteChat::Embed::fix_callback(
$package, $calling_package, $callback
);
my ($flags, $data) = (HexChat::FD_READ, undef);
my ($flags, $data) = (ZoiteChat::FD_READ, undef);
_process_hook_options(
$options,
[qw(flags data)],
@@ -311,8 +311,8 @@ sub hook_fd {
);
};
my $pkg_info = HexChat::Embed::pkg_info( $package );
my $hook = HexChat::Internal::hook_fd(
my $pkg_info = ZoiteChat::Embed::pkg_info( $package );
my $hook = ZoiteChat::Internal::hook_fd(
$fileno, $cb, $flags, {
DATA => $data, FD => $fd, CB => $callback, FLAGS => $flags,
},
@@ -326,13 +326,13 @@ sub unhook {
my $hook = shift @_;
my $package = shift @_;
($package) = caller unless $package;
my $pkg_info = HexChat::Embed::pkg_info( $package );
my $pkg_info = ZoiteChat::Embed::pkg_info( $package );
if( defined( $hook )
&& $hook =~ /^\d+$/
&& grep { $_ == $hook } @{$pkg_info->{hooks}} ) {
$pkg_info->{hooks} = [grep { $_ != $hook } @{$pkg_info->{hooks}}];
return HexChat::Internal::unhook( $hook );
return ZoiteChat::Internal::unhook( $hook );
}
return ();
}
@@ -362,16 +362,16 @@ sub _do_for_each {
}
my $num_done = 0;
my $old_ctx = HexChat::get_context();
my $old_ctx = ZoiteChat::get_context();
for my $server ( @$servers ) {
for my $channel ( @$channels ) {
if( HexChat::set_context( $channel, $server ) ) {
if( ZoiteChat::set_context( $channel, $server ) ) {
$cb->();
$num_done++
}
}
}
HexChat::set_context( $old_ctx );
ZoiteChat::set_context( $old_ctx );
return $num_done;
}
@@ -387,24 +387,24 @@ sub print {
}
return _do_for_each(
sub { HexChat::Internal::print( $text ); },
sub { ZoiteChat::Internal::print( $text ); },
@_
);
}
sub printf {
my $format = shift;
HexChat::print( sprintf( $format, @_ ) );
ZoiteChat::print( sprintf( $format, @_ ) );
}
# make HexChat::prnt() and HexChat::prntf() as aliases for HexChat::print() and
# HexChat::printf(), mainly useful when these functions are exported
# make ZoiteChat::prnt() and ZoiteChat::prntf() as aliases for ZoiteChat::print() and
# ZoiteChat::printf(), mainly useful when these functions are exported
sub prnt {
goto &HexChat::print;
goto &ZoiteChat::print;
}
sub prntf {
goto &HexChat::printf;
goto &ZoiteChat::printf;
}
sub command {
@@ -419,37 +419,37 @@ sub command {
}
return _do_for_each(
sub { HexChat::Internal::command( $_ ) foreach @commands },
sub { ZoiteChat::Internal::command( $_ ) foreach @commands },
@_
);
}
sub commandf {
my $format = shift;
HexChat::command( sprintf( $format, @_ ) );
ZoiteChat::command( sprintf( $format, @_ ) );
}
sub plugin_pref_set {
my $setting = shift // return 0;
my $value = shift // return 0;
return HexChat::Internal::plugin_pref_set($setting, $value);
return ZoiteChat::Internal::plugin_pref_set($setting, $value);
}
sub plugin_pref_get {
my $setting = shift // return 0;
return HexChat::Internal::plugin_pref_get($setting);
return ZoiteChat::Internal::plugin_pref_get($setting);
}
sub plugin_pref_delete {
my $setting = shift // return 0;
return HexChat::Internal::plugin_pref_delete($setting);
return ZoiteChat::Internal::plugin_pref_delete($setting);
}
sub plugin_pref_list {
my %list = HexChat::Internal::plugin_pref_list();
my %list = ZoiteChat::Internal::plugin_pref_list();
return \%list;
}
@@ -458,17 +458,17 @@ sub set_context {
my $context;
if( @_ == 2 ) {
my ($channel, $server) = @_;
$context = HexChat::find_context( $channel, $server );
$context = ZoiteChat::find_context( $channel, $server );
} elsif( @_ == 1 ) {
if( defined $_[0] && $_[0] =~ /^\d+$/ ) {
$context = $_[0];
} else {
$context = HexChat::find_context( $_[0] );
$context = ZoiteChat::find_context( $_[0] );
}
} elsif( @_ == 0 ) {
$context = HexChat::find_context();
$context = ZoiteChat::find_context();
}
return $context ? HexChat::Internal::set_context( $context ) : 0;
return $context ? ZoiteChat::Internal::set_context( $context ) : 0;
}
sub get_info {
@@ -477,19 +477,19 @@ sub get_info {
if( defined( $id ) ) {
if( grep { $id eq $_ } qw(state_cursor id) ) {
$info = HexChat::get_prefs( $id );
$info = ZoiteChat::get_prefs( $id );
} else {
$info = HexChat::Internal::get_info( $id );
$info = ZoiteChat::Internal::get_info( $id );
}
}
return $info;
}
sub user_info {
my $nick = HexChat::strip_code(shift @_ || HexChat::get_info( "nick" ));
my $nick = ZoiteChat::strip_code(shift @_ || ZoiteChat::get_info( "nick" ));
my $user;
for (HexChat::get_list( "users" ) ) {
if ( HexChat::nickcmp( $_->{nick}, $nick ) == 0 ) {
for (ZoiteChat::get_list( "users" ) ) {
if ( ZoiteChat::nickcmp( $_->{nick}, $nick ) == 0 ) {
$user = $_;
last;
}
@@ -498,24 +498,24 @@ sub user_info {
}
sub context_info {
my $ctx = shift @_ || HexChat::get_context;
my $old_ctx = HexChat::get_context;
my $ctx = shift @_ || ZoiteChat::get_context;
my $old_ctx = ZoiteChat::get_context;
my @fields = (
qw(away channel charset host id inputbox libdirfs modes network),
qw(nick nickserv server topic version win_ptr win_status),
qw(configdir xchatdir xchatdirfs state_cursor),
);
if( HexChat::set_context( $ctx ) ) {
if( ZoiteChat::set_context( $ctx ) ) {
my %info;
for my $field ( @fields ) {
$info{$field} = HexChat::get_info( $field );
$info{$field} = ZoiteChat::get_info( $field );
}
my $ctx_info = HexChat::Internal::context_info;
my $ctx_info = ZoiteChat::Internal::context_info;
@info{keys %$ctx_info} = values %$ctx_info;
HexChat::set_context( $old_ctx );
ZoiteChat::set_context( $old_ctx );
return \%info;
} else {
return undef;
@@ -527,9 +527,9 @@ sub get_list {
Carp::carp( "'$_[0]' does not appear to be a valid list name" );
}
if( $_[0] eq 'networks' ) {
return HexChat::List::Network->get();
return ZoiteChat::List::Network->get();
} else {
return HexChat::Internal::get_list( $_[0] );
return ZoiteChat::Internal::get_list( $_[0] );
}
}

View File

@@ -1,4 +1,4 @@
package HexChat::Embed;
package ZoiteChat::Embed;
use strict;
use warnings;
use Data::Dumper;
@@ -9,7 +9,7 @@ use Data::Dumper;
# filename
# The full path to the script.
# gui_entry
# This is hexchat_plugin pointer that is used to remove the script from
# This is zoitechat_plugin pointer that is used to remove the script from
# Plugins and Scripts window when a script is unloaded. This has also
# been converted with the PTR2IV() macro.
# hooks
@@ -43,11 +43,11 @@ sub load {
if( exists $scripts{$package} ) {
my $pkg_info = pkg_info( $package );
my $filename = File::Basename::basename( $pkg_info->{filename} );
HexChat::printf(
ZoiteChat::printf(
qq{'%s' already loaded from '%s'.\n},
$filename, $pkg_info->{filename}
);
HexChat::print(
ZoiteChat::print(
'If this is a different script then it rename and try '.
'loading it again.'
);
@@ -61,7 +61,7 @@ sub load {
$source =~ s/^__END__.*//ms;
# this must come before the eval or the filename will not be found in
# HexChat::register
# ZoiteChat::register
$scripts{$package}{filename} = $file;
$scripts{$package}{loaded_at} = Time::HiRes::time();
@@ -94,7 +94,7 @@ sub load {
$error_message .= " $conflict_package already defined in " .
pkg_info($owner_package{ $conflict_package })->{filename}."\n";
}
HexChat::print( $error_message );
ZoiteChat::print( $error_message );
return 2;
}
@@ -115,7 +115,7 @@ sub load {
unless( exists $scripts{$package}{gui_entry} ) {
$scripts{$package}{gui_entry} =
HexChat::Internal::register(
ZoiteChat::Internal::register(
"", "unknown", "", $file
);
}
@@ -123,13 +123,13 @@ sub load {
if( $@ ) {
# something went wrong
$@ =~ s/\(eval \d+\)/$file/g;
HexChat::print( "Error loading '$file':\n$@\n" );
ZoiteChat::print( "Error loading '$file':\n$@\n" );
# make sure the script list doesn't contain false information
unload( $scripts{$package}{filename} );
return 1;
}
} else {
HexChat::print( "Error opening '$file': $!\n" );
ZoiteChat::print( "Error opening '$file': $!\n" );
return 2;
}
@@ -163,7 +163,7 @@ sub unload {
if( exists $pkg_info->{hooks} ) {
for my $hook ( @{$pkg_info->{hooks}} ) {
HexChat::unhook( $hook, $package );
ZoiteChat::unhook( $hook, $package );
}
}
@@ -177,10 +177,10 @@ sub unload {
}
Symbol::delete_package( $package );
delete $scripts{$package};
return HexChat::EAT_ALL;
return ZoiteChat::EAT_ALL;
} else {
HexChat::print( qq{"$file" is not loaded.\n} );
return HexChat::EAT_NONE;
ZoiteChat::print( qq{"$file" is not loaded.\n} );
return ZoiteChat::EAT_NONE;
}
}
@@ -189,7 +189,7 @@ sub unload_all {
unload( $scripts{$package}->{filename} );
}
return HexChat::EAT_ALL;
return ZoiteChat::EAT_ALL;
}
sub reload {
@@ -204,11 +204,11 @@ sub reload {
}
load( $fullpath );
return HexChat::EAT_ALL;
return ZoiteChat::EAT_ALL;
}
sub reload_all {
my @dirs = HexChat::get_info( "configdir" );
my @dirs = ZoiteChat::get_info( "configdir" );
push @dirs, File::Spec->catdir( $dirs[0], "plugins" );
for my $dir ( @dirs ) {
my $auto_load_glob = File::Spec->catfile( $dir, "*.pl" );
@@ -232,22 +232,22 @@ sub evaluate {
my ($code) = @_;
my @results = eval $code;
HexChat::print $@ if $@; #print warnings
ZoiteChat::print $@ if $@; #print warnings
local $Data::Dumper::Sortkeys = 1;
local $Data::Dumper::Terse = 1;
if (@results > 1) {
HexChat::print Dumper \@results;
ZoiteChat::print Dumper \@results;
}
elsif (ref $results[0] || !$results[0]) {
HexChat::print Dumper $results[0];
ZoiteChat::print Dumper $results[0];
}
else {
HexChat::print $results[0];
ZoiteChat::print $results[0];
}
return HexChat::EAT_HEXCHAT;
return ZoiteChat::EAT_HEXCHAT;
};
sub expand_homedir {
@@ -267,7 +267,7 @@ sub file2pkg {
my $string = File::Basename::basename( shift @_ );
$string =~ s/\.pl$//i;
$string =~ s|([^A-Za-z0-9/])|'_'.unpack("H*",$1)|eg;
return "HexChat::Script::" . $string;
return "ZoiteChat::Script::" . $string;
}
sub pkg_info {
@@ -279,7 +279,7 @@ sub find_external_pkg {
my $level = 1;
while( my @frame = caller( $level ) ) {
return @frame if $frame[0] !~ /(?:^IRC$|^HexChat)/;
return @frame if $frame[0] !~ /(?:^IRC$|^ZoiteChat)/;
$level++;
}
return;
@@ -289,7 +289,7 @@ sub find_pkg {
my $level = 1;
while( my ($package, $file, $line) = caller( $level ) ) {
return $package if $package =~ /^HexChat::Script::/;
return $package if $package =~ /^ZoiteChat::Script::/;
$level++;
}

View File

@@ -1,4 +1,4 @@
package HexChat::List::Network;
package ZoiteChat::List::Network;
use strict;
use warnings;
use Storable qw(dclone);
@@ -6,7 +6,7 @@ my $last_modified;
my @servers;
sub get {
my $server_file = HexChat::get_info( "configdir" ) . "/servlist.conf";
my $server_file = ZoiteChat::get_info( "configdir" ) . "/servlist.conf";
# recreate the list only if the server list file has changed
if( -f $server_file &&
@@ -19,7 +19,7 @@ sub get {
while( my $record = <$fh> ) {
chomp $record;
next if $record =~ /^v=/; # skip the version line
push @servers, HexChat::List::Network::Entry::parse( $record );
push @servers, ZoiteChat::List::Network::Entry::parse( $record );
}
} else {
warn "Unable to open '$server_file': $!";

View File

@@ -1,4 +1,4 @@
package HexChat::List::Network::AutoJoin;
package ZoiteChat::List::Network::AutoJoin;
use strict;
use warnings;

View File

@@ -1,4 +1,4 @@
package HexChat::List::Network::Entry;
package ZoiteChat::List::Network::Entry;
use strict;
use warnings;
@@ -26,7 +26,7 @@ sub parse {
# the order of the channels need to be maintained
# list of { channel => .., key => ... }
autojoins => HexChat::List::Network::AutoJoin->new( '' ),
autojoins => ZoiteChat::List::Network::AutoJoin->new( '' ),
connect_commands => [],
flags => {},
selected => undef,
@@ -39,7 +39,7 @@ sub parse {
my @fields = split /\n/, $data;
chomp @fields;
$entry->{ autojoins } = HexChat::List::Network::AutoJoin->new();
$entry->{ autojoins } = ZoiteChat::List::Network::AutoJoin->new();
for my $field ( @fields ) {
SWITCH: for ( $field ) {

View File

@@ -1,15 +1,15 @@
generate_perl_header = find_program('generate_header.py')
hexchat_perl_module = custom_target('hexchat-perl-header',
zoitechat_perl_module = custom_target('zoitechat-perl-header',
input: [
'lib/HexChat.pm',
'lib/ZoiteChat.pm',
'lib/Xchat.pm',
'lib/HexChat/Embed.pm',
'lib/HexChat/List/Network.pm',
'lib/HexChat/List/Network/Entry.pm',
'lib/HexChat/List/Network/AutoJoin.pm',
'lib/ZoiteChat/Embed.pm',
'lib/ZoiteChat/List/Network.pm',
'lib/ZoiteChat/List/Network/Entry.pm',
'lib/ZoiteChat/List/Network/AutoJoin.pm',
],
output: 'hexchat.pm.h',
output: 'zoitechat.pm.h',
command: [generate_perl_header, '@OUTPUT@', '@INPUT@']
)
@@ -82,8 +82,8 @@ perl_dep = declare_dependency(
)
shared_module('perl',
sources: ['perl.c', hexchat_perl_module, irc_perl_module],
dependencies: [libgio_dep, hexchat_plugin_dep, perl_dep],
sources: ['perl.c', zoitechat_perl_module, irc_perl_module],
dependencies: [libgio_dep, zoitechat_plugin_dep, perl_dep],
install: true,
install_dir: plugindir,
install_rpath: perl_rpath,

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
EXPORTS
hexchat_plugin_init
hexchat_plugin_deinit
hexchat_plugin_get_info
zoitechat_plugin_init
zoitechat_plugin_deinit
zoitechat_plugin_get_info

View File

@@ -22,15 +22,15 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
<Import Project="..\..\win32\zoitechat.props" />
<PropertyGroup>
<TargetName>hcperl</TargetName>
<OutDir>$(HexChatRel)plugins\</OutDir>
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PERL520_EXPORTS;HAS_BOOL;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir);..\..\src\common;$(HexChatLib);$(PerlPath)\lib\CORE;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(IntDir);..\..\src\common;$(ZoiteChatLib);$(PerlPath)\lib\CORE;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(IntDir);$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
@@ -44,13 +44,13 @@ move $(PerlLib).def "$(IntDir)"
lib /nologo /machine:x86 "/def:$(IntDir)$(PerlLib).def" "/out:$(IntDir)\$(PerlLib).lib"
"$(PerlPath)\bin\perl.exe" generate_header
move irc.pm.h "$(IntDir)"
move hexchat.pm.h "$(IntDir)"</Command>
move zoitechat.pm.h "$(IntDir)"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PERL520_EXPORTS;HAS_BOOL;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(IntDir);..\..\src\common;$(HexChatLib);$(PerlPath)\lib\CORE;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(IntDir);..\..\src\common;$(ZoiteChatLib);$(PerlPath)\lib\CORE;$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(IntDir);$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
@@ -64,7 +64,7 @@ move $(PerlLib).def "$(IntDir)"
lib /nologo /machine:x64 "/def:$(IntDir)$(PerlLib).def" "/out:$(IntDir)\$(PerlLib).lib"
"$(PerlPath)\bin\perl.exe" generate_header
move irc.pm.h "$(IntDir)"
move hexchat.pm.h "$(IntDir)"</Command>
move zoitechat.pm.h "$(IntDir)"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>

View File

@@ -2,7 +2,7 @@ import inspect
import sys
from contextlib import contextmanager
from _hexchat_embedded import ffi, lib
from _zoitechat_embedded import ffi, lib
__all__ = [
'EAT_ALL', 'EAT_HEXCHAT', 'EAT_NONE', 'EAT_PLUGIN', 'EAT_XCHAT',
@@ -15,7 +15,7 @@ __all__ = [
'set_pluginpref', 'strip', 'unhook',
]
__doc__ = 'HexChat Scripting Interface'
__doc__ = 'ZoiteChat Scripting Interface'
__version__ = (2, 0)
__license__ = 'GPL-2.0+'
@@ -57,7 +57,7 @@ else:
# ------------ API ------------
def prnt(string):
lib.hexchat_print(lib.ph, string.encode())
lib.zoitechat_print(lib.ph, string.encode())
def emit_print(event_name, *args, **kwargs):
@@ -69,33 +69,33 @@ def emit_print(event_name, *args, **kwargs):
cargs.append(cstring)
if time == 0:
return lib.hexchat_emit_print(lib.ph, event_name.encode(), *cargs)
return lib.zoitechat_emit_print(lib.ph, event_name.encode(), *cargs)
attrs = lib.hexchat_event_attrs_create(lib.ph)
attrs = lib.zoitechat_event_attrs_create(lib.ph)
attrs.server_time_utc = time
ret = lib.hexchat_emit_print_attrs(lib.ph, attrs, event_name.encode(), *cargs)
lib.hexchat_event_attrs_free(lib.ph, attrs)
ret = lib.zoitechat_emit_print_attrs(lib.ph, attrs, event_name.encode(), *cargs)
lib.zoitechat_event_attrs_free(lib.ph, attrs)
return ret
# TODO: this shadows itself. command should be changed to cmd
def command(command):
lib.hexchat_command(lib.ph, command.encode())
lib.zoitechat_command(lib.ph, command.encode())
def nickcmp(string1, string2):
return lib.hexchat_nickcmp(lib.ph, string1.encode(), string2.encode())
return lib.zoitechat_nickcmp(lib.ph, string1.encode(), string2.encode())
def strip(text, length=-1, flags=3):
stripped = lib.hexchat_strip(lib.ph, text.encode(), length, flags)
stripped = lib.zoitechat_strip(lib.ph, text.encode(), length, flags)
ret = __decode(ffi.string(stripped))
lib.hexchat_free(lib.ph, stripped)
lib.zoitechat_free(lib.ph, stripped)
return ret
def get_info(name):
ret = lib.hexchat_get_info(lib.ph, name.encode())
ret = lib.zoitechat_get_info(lib.ph, name.encode())
if ret == ffi.NULL:
return None
if name in ('gtkwin_ptr', 'win_ptr'):
@@ -109,7 +109,7 @@ def get_info(name):
def get_prefs(name):
string_out = ffi.new('char**')
int_out = ffi.new('int*')
_type = lib.hexchat_get_prefs(lib.ph, name.encode(), string_out, int_out)
_type = lib.zoitechat_get_prefs(lib.ph, name.encode(), string_out, int_out)
if _type == 0:
return None
@@ -136,7 +136,7 @@ __FIELD_CACHE = {}
def __get_fields(name):
return __FIELD_CACHE.setdefault(name, __cstrarray_to_list(lib.hexchat_list_fields(lib.ph, name)))
return __FIELD_CACHE.setdefault(name, __cstrarray_to_list(lib.zoitechat_list_fields(lib.ph, name)))
__FIELD_PROPERTY_CACHE = {}
@@ -177,7 +177,7 @@ def get_list(name):
if name not in __get_fields(b'lists'):
raise KeyError('list not available')
list_ = lib.hexchat_list_get(lib.ph, name)
list_ = lib.zoitechat_list_get(lib.ph, name)
if list_ == ffi.NULL:
return None
@@ -185,7 +185,7 @@ def get_list(name):
fields = __get_fields(name)
def string_getter(field):
string = lib.hexchat_list_str(lib.ph, list_, field)
string = lib.zoitechat_list_str(lib.ph, list_, field)
if string != ffi.NULL:
return __decode(ffi.string(string))
@@ -193,20 +193,20 @@ def get_list(name):
def ptr_getter(field):
if field == b'context':
ptr = lib.hexchat_list_str(lib.ph, list_, field)
ctx = ffi.cast('hexchat_context*', ptr)
ptr = lib.zoitechat_list_str(lib.ph, list_, field)
ctx = ffi.cast('zoitechat_context*', ptr)
return Context(ctx)
return None
getters = {
ord('s'): string_getter,
ord('i'): lambda field: lib.hexchat_list_int(lib.ph, list_, field),
ord('t'): lambda field: lib.hexchat_list_time(lib.ph, list_, field),
ord('i'): lambda field: lib.zoitechat_list_int(lib.ph, list_, field),
ord('t'): lambda field: lib.zoitechat_list_time(lib.ph, list_, field),
ord('p'): ptr_getter,
}
while lib.hexchat_list_next(lib.ph, list_) == 1:
while lib.zoitechat_list_next(lib.ph, list_) == 1:
item = ListItem(orig_name)
for _field in fields:
getter = getters.get(get_getter(_field))
@@ -216,7 +216,7 @@ def get_list(name):
ret.append(item)
lib.hexchat_list_free(lib.ph, list_)
lib.zoitechat_list_free(lib.ph, list_)
return ret
@@ -224,50 +224,50 @@ def get_list(name):
def hook_command(command, callback, userdata=None, priority=PRI_NORM, help=None):
plugin = __get_current_plugin()
hook = plugin.add_hook(callback, userdata)
handle = lib.hexchat_hook_command(lib.ph, command.encode(), priority, lib._on_command_hook,
handle = lib.zoitechat_hook_command(lib.ph, command.encode(), priority, lib._on_command_hook,
help.encode() if help is not None else ffi.NULL, hook.handle)
hook.hexchat_hook = handle
hook.zoitechat_hook = handle
return id(hook)
def hook_print(name, callback, userdata=None, priority=PRI_NORM):
plugin = __get_current_plugin()
hook = plugin.add_hook(callback, userdata)
handle = lib.hexchat_hook_print(lib.ph, name.encode(), priority, lib._on_print_hook, hook.handle)
hook.hexchat_hook = handle
handle = lib.zoitechat_hook_print(lib.ph, name.encode(), priority, lib._on_print_hook, hook.handle)
hook.zoitechat_hook = handle
return id(hook)
def hook_print_attrs(name, callback, userdata=None, priority=PRI_NORM):
plugin = __get_current_plugin()
hook = plugin.add_hook(callback, userdata)
handle = lib.hexchat_hook_print_attrs(lib.ph, name.encode(), priority, lib._on_print_attrs_hook, hook.handle)
hook.hexchat_hook = handle
handle = lib.zoitechat_hook_print_attrs(lib.ph, name.encode(), priority, lib._on_print_attrs_hook, hook.handle)
hook.zoitechat_hook = handle
return id(hook)
def hook_server(name, callback, userdata=None, priority=PRI_NORM):
plugin = __get_current_plugin()
hook = plugin.add_hook(callback, userdata)
handle = lib.hexchat_hook_server(lib.ph, name.encode(), priority, lib._on_server_hook, hook.handle)
hook.hexchat_hook = handle
handle = lib.zoitechat_hook_server(lib.ph, name.encode(), priority, lib._on_server_hook, hook.handle)
hook.zoitechat_hook = handle
return id(hook)
def hook_server_attrs(name, callback, userdata=None, priority=PRI_NORM):
plugin = __get_current_plugin()
hook = plugin.add_hook(callback, userdata)
handle = lib.hexchat_hook_server_attrs(lib.ph, name.encode(), priority, lib._on_server_attrs_hook, hook.handle)
hook.hexchat_hook = handle
handle = lib.zoitechat_hook_server_attrs(lib.ph, name.encode(), priority, lib._on_server_attrs_hook, hook.handle)
hook.zoitechat_hook = handle
return id(hook)
def hook_timer(timeout, callback, userdata=None):
plugin = __get_current_plugin()
hook = plugin.add_hook(callback, userdata)
handle = lib.hexchat_hook_timer(lib.ph, timeout, lib._on_timer_hook, hook.handle)
hook.hexchat_hook = handle
handle = lib.zoitechat_hook_timer(lib.ph, timeout, lib._on_timer_hook, hook.handle)
hook.zoitechat_hook = handle
return id(hook)
@@ -284,10 +284,10 @@ def unhook(handle):
def set_pluginpref(name, value):
if isinstance(value, str):
return bool(lib.hexchat_pluginpref_set_str(lib.ph, name.encode(), value.encode()))
return bool(lib.zoitechat_pluginpref_set_str(lib.ph, name.encode(), value.encode()))
if isinstance(value, int):
return bool(lib.hexchat_pluginpref_set_int(lib.ph, name.encode(), value))
return bool(lib.zoitechat_pluginpref_set_int(lib.ph, name.encode(), value))
# XXX: This should probably raise but this keeps API
return False
@@ -296,7 +296,7 @@ def set_pluginpref(name, value):
def get_pluginpref(name):
name = name.encode()
string_out = ffi.new('char[512]')
if lib.hexchat_pluginpref_get_str(lib.ph, name, string_out) != 1:
if lib.zoitechat_pluginpref_get_str(lib.ph, name, string_out) != 1:
return None
string = ffi.string(string_out)
@@ -305,7 +305,7 @@ def get_pluginpref(name):
if len(string) > 12: # Can't be a number
return __decode(string)
number = lib.hexchat_pluginpref_get_int(lib.ph, name)
number = lib.zoitechat_pluginpref_get_int(lib.ph, name)
if number == -1 and string != b'-1':
return __decode(string)
@@ -313,12 +313,12 @@ def get_pluginpref(name):
def del_pluginpref(name):
return bool(lib.hexchat_pluginpref_delete(lib.ph, name.encode()))
return bool(lib.zoitechat_pluginpref_delete(lib.ph, name.encode()))
def list_pluginpref():
prefs_str = ffi.new('char[4096]')
if lib.hexchat_pluginpref_list(lib.ph, prefs_str) == 1:
if lib.zoitechat_pluginpref_list(lib.ph, prefs_str) == 1:
return __decode(ffi.string(prefs_str)).split(',')
return []
@@ -336,18 +336,18 @@ class Context:
@contextmanager
def __change_context(self):
old_ctx = lib.hexchat_get_context(lib.ph)
old_ctx = lib.zoitechat_get_context(lib.ph)
if not self.set():
# XXX: Behavior change, previously used wrong context
lib.hexchat_print(lib.ph, b'Context object refers to closed context, ignoring call')
lib.zoitechat_print(lib.ph, b'Context object refers to closed context, ignoring call')
return
yield
lib.hexchat_set_context(lib.ph, old_ctx)
lib.zoitechat_set_context(lib.ph, old_ctx)
def set(self):
# XXX: API addition, C plugin silently ignored failure
return bool(lib.hexchat_set_context(lib.ph, self._ctx))
return bool(lib.zoitechat_set_context(lib.ph, self._ctx))
def prnt(self, string):
with self.__change_context():
@@ -372,14 +372,14 @@ class Context:
def get_context():
ctx = lib.hexchat_get_context(lib.ph)
ctx = lib.zoitechat_get_context(lib.ph)
return Context(ctx)
def find_context(server=None, channel=None):
server = server.encode() if server is not None else ffi.NULL
channel = channel.encode() if channel is not None else ffi.NULL
ctx = lib.hexchat_find_context(lib.ph, server, channel)
ctx = lib.zoitechat_find_context(lib.ph, server, channel)
if ctx == ffi.NULL:
return None

View File

@@ -5,11 +5,11 @@ import cffi
builder = cffi.FFI()
# hexchat-plugin.h
# zoitechat-plugin.h
with open(sys.argv[1]) as f:
output = []
eat_until_endif = 0
# This is very specific to hexchat-plugin.h, it is not a cpp
# This is very specific to zoitechat-plugin.h, it is not a cpp
for line in f:
if line.startswith('#define'):
continue
@@ -21,7 +21,7 @@ with open(sys.argv[1]) as f:
eat_until_endif += 1
elif line.startswith('#endif'):
eat_until_endif -= 1
elif eat_until_endif and '_hexchat_context' not in line:
elif eat_until_endif and '_zoitechat_context' not in line:
continue
else:
output.append(line)
@@ -36,30 +36,30 @@ extern "Python" int _on_say_command(char **, char **, void *);
extern "Python" int _on_command_hook(char **, char **, void *);
extern "Python" int _on_print_hook(char **, void *);
extern "Python" int _on_print_attrs_hook(char **, hexchat_event_attrs *, void *);
extern "Python" int _on_print_attrs_hook(char **, zoitechat_event_attrs *, void *);
extern "Python" int _on_server_hook(char **, char **, void *);
extern "Python" int _on_server_attrs_hook(char **, char **, hexchat_event_attrs *, void *);
extern "Python" int _on_server_attrs_hook(char **, char **, zoitechat_event_attrs *, void *);
extern "Python" int _on_timer_hook(void *);
extern "Python" int _on_plugin_init(char **, char **, char **, char *, char *);
extern "Python" int _on_plugin_deinit(void);
static hexchat_plugin *ph;
static zoitechat_plugin *ph;
''')
builder.set_source('_hexchat_embedded', '''
builder.set_source('_zoitechat_embedded', '''
/* Python's header defines these.. */
#undef HAVE_MEMRCHR
#undef HAVE_STRINGS_H
#include "config.h"
#include "hexchat-plugin.h"
#include "zoitechat-plugin.h"
static hexchat_plugin *ph;
static zoitechat_plugin *ph;
CFFI_DLLEXPORT int _on_plugin_init(char **, char **, char **, char *, char *);
CFFI_DLLEXPORT int _on_plugin_deinit(void);
int hexchat_plugin_init(hexchat_plugin *plugin_handle,
int zoitechat_plugin_init(zoitechat_plugin *plugin_handle,
char **name_out, char **description_out,
char **version_out, char *arg)
{
@@ -73,7 +73,7 @@ int hexchat_plugin_init(hexchat_plugin *plugin_handle,
return _on_plugin_init(name_out, description_out, version_out, arg, HEXCHATLIBDIR);
}
int hexchat_plugin_deinit(void)
int zoitechat_plugin_deinit(void)
{
int ret = _on_plugin_deinit();
ph = NULL;

View File

@@ -1 +0,0 @@
from _hexchat import *

View File

@@ -14,17 +14,17 @@ else
endif
python3_source = custom_target('python-bindings',
input: ['../../src/common/hexchat-plugin.h', 'python.py'],
input: ['../../src/common/zoitechat-plugin.h', 'python.py'],
output: 'python.c',
command: [find_program('generate_plugin.py'), '@INPUT@', '@OUTPUT@']
)
install_data(['_hexchat.py', 'hexchat.py', 'xchat.py'],
install_dir: join_paths(get_option('libdir'), 'hexchat/python')
install_data(['_zoitechat.py', 'zoitechat.py', 'xchat.py'],
install_dir: join_paths(get_option('libdir'), 'zoitechat/python')
)
shared_module('python', python3_source,
dependencies: [hexchat_plugin_dep, python_dep],
dependencies: [zoitechat_plugin_dep, python_dep],
install: true,
install_dir: plugindir,
name_prefix: '',

View File

@@ -1,3 +1,3 @@
EXPORTS
hexchat_plugin_init
hexchat_plugin_deinit
zoitechat_plugin_init
zoitechat_plugin_deinit

View File

@@ -9,7 +9,7 @@ import traceback
import weakref
from contextlib import contextmanager
from _hexchat_embedded import ffi, lib
from _zoitechat_embedded import ffi, lib
if sys.version_info < (3, 0):
from io import BytesIO as HelpEater
@@ -17,17 +17,17 @@ else:
from io import StringIO as HelpEater
if not hasattr(sys, 'argv'):
sys.argv = ['<hexchat>']
sys.argv = ['<zoitechat>']
VERSION = b'2.0' # Sync with hexchat.__version__
VERSION = b'2.0' # Sync with zoitechat.__version__
PLUGIN_NAME = ffi.new('char[]', b'Python')
PLUGIN_DESC = ffi.new('char[]', b'Python %d.%d scripting interface' % (sys.version_info[0], sys.version_info[1]))
PLUGIN_VERSION = ffi.new('char[]', VERSION)
# TODO: Constants should be screaming snake case
hexchat = None
zoitechat = None
local_interp = None
hexchat_stdout = None
zoitechat_stdout = None
plugins = set()
@@ -36,8 +36,8 @@ def redirected_stdout():
sys.stdout = sys.__stdout__
sys.stderr = sys.__stderr__
yield
sys.stdout = hexchat_stdout
sys.stderr = hexchat_stdout
sys.stdout = zoitechat_stdout
sys.stderr = zoitechat_stdout
if os.getenv('HEXCHAT_LOG_PYTHON'):
@@ -59,13 +59,13 @@ class Stdout:
idx = string.rfind(b'\n')
if idx != -1:
self.buffer += string[:idx]
lib.hexchat_print(lib.ph, bytes(self.buffer))
lib.zoitechat_print(lib.ph, bytes(self.buffer))
self.buffer = bytearray(string[idx + 1:])
else:
self.buffer += string
def flush(self):
lib.hexchat_print(lib.ph, bytes(self.buffer))
lib.zoitechat_print(lib.ph, bytes(self.buffer))
self.buffer = bytearray()
def isatty(self):
@@ -86,14 +86,14 @@ class Hook:
self.plugin = weakref.proxy(plugin)
self.callback = callback
self.userdata = userdata
self.hexchat_hook = None
self.zoitechat_hook = None
self.handle = ffi.new_handle(weakref.proxy(self))
def __del__(self):
log('Removing hook', id(self))
if self.is_unload is False:
assert self.hexchat_hook is not None
lib.hexchat_unhook(lib.ph, self.hexchat_hook)
assert self.zoitechat_hook is not None
lib.zoitechat_unhook(lib.ph, self.zoitechat_hook)
if sys.version_info[0] == 2:
@@ -159,17 +159,17 @@ class Plugin:
self.name = self.globals['__module_name__']
except KeyError:
lib.hexchat_print(lib.ph, b'Failed to load module: __module_name__ must be set')
lib.zoitechat_print(lib.ph, b'Failed to load module: __module_name__ must be set')
return False
self.version = self.globals.get('__module_version__', '')
self.description = self.globals.get('__module_description__', '')
self.ph = lib.hexchat_plugingui_add(lib.ph, filename.encode(), self.name.encode(),
self.ph = lib.zoitechat_plugingui_add(lib.ph, filename.encode(), self.name.encode(),
self.description.encode(), self.version.encode(), ffi.NULL)
except Exception as e:
lib.hexchat_print(lib.ph, 'Failed to load module: {}'.format(e).encode())
lib.zoitechat_print(lib.ph, 'Failed to load module: {}'.format(e).encode())
traceback.print_exc()
return False
@@ -188,7 +188,7 @@ class Plugin:
del self.hooks
if self.ph is not None:
lib.hexchat_plugingui_remove(lib.ph, self.ph)
lib.zoitechat_plugingui_remove(lib.ph, self.ph)
if sys.version_info[0] == 2:
@@ -292,7 +292,7 @@ def _on_timer_hook(userdata):
return 1
try:
# Avoid calling hexchat_unhook twice if unnecessary
# Avoid calling zoitechat_unhook twice if unnecessary
hook.is_unload = True
except ReferenceError:
# hook is a weak reference, it might have been destroyed by the callback
@@ -310,10 +310,10 @@ def _on_timer_hook(userdata):
@ffi.def_extern(error=3)
def _on_say_command(word, word_eol, userdata):
channel = ffi.string(lib.hexchat_get_info(lib.ph, b'channel'))
channel = ffi.string(lib.zoitechat_get_info(lib.ph, b'channel'))
if channel == b'>>python<<':
python = ffi.string(word_eol[1])
lib.hexchat_print(lib.ph, b'>>> ' + python)
lib.zoitechat_print(lib.ph, b'>>> ' + python)
exec_in_interp(__decode(python))
return 1
@@ -323,7 +323,7 @@ def _on_say_command(word, word_eol, userdata):
def load_filename(filename):
filename = os.path.expanduser(filename)
if not os.path.isabs(filename):
configdir = __decode(ffi.string(lib.hexchat_get_info(lib.ph, b'configdir')))
configdir = __decode(ffi.string(lib.zoitechat_get_info(lib.ph, b'configdir')))
filename = os.path.join(configdir, 'addons', filename)
@@ -366,7 +366,7 @@ def change_cwd(path):
def autoload():
configdir = __decode(ffi.string(lib.hexchat_get_info(lib.ph, b'configdir')))
configdir = __decode(ffi.string(lib.zoitechat_get_info(lib.ph, b'configdir')))
addondir = os.path.join(configdir, 'addons')
try:
with change_cwd(addondir): # Maintaining old behavior
@@ -382,7 +382,7 @@ def autoload():
def list_plugins():
if not plugins:
lib.hexchat_print(lib.ph, b'No python modules loaded')
lib.zoitechat_print(lib.ph, b'No python modules loaded')
return
tbl_headers = [b'Name', b'Version', b'Filename', b'Description']
@@ -404,9 +404,9 @@ def list_plugins():
]
for row in tbl:
lib.hexchat_print(lib.ph, b' '.join(item.ljust(column_sizes[i])
lib.zoitechat_print(lib.ph, b' '.join(item.ljust(column_sizes[i])
for i, item in enumerate(row)))
lib.hexchat_print(lib.ph, b'')
lib.zoitechat_print(lib.ph, b'')
def exec_in_interp(python):
@@ -418,16 +418,16 @@ def exec_in_interp(python):
if local_interp is None:
local_interp = Plugin()
local_interp.locals = {}
local_interp.globals['hexchat'] = hexchat
local_interp.globals['zoitechat'] = zoitechat
code = compile_line(python)
try:
ret = eval(code, local_interp.globals, local_interp.locals)
if ret is not None:
lib.hexchat_print(lib.ph, '{}'.format(ret).encode())
lib.zoitechat_print(lib.ph, '{}'.format(ret).encode())
except Exception as e:
traceback.print_exc(file=hexchat_stdout)
traceback.print_exc(file=zoitechat_stdout)
@ffi.def_extern()
@@ -475,32 +475,32 @@ def _on_py_command(word, word_eol, userdata):
elif subcmd == 'unload':
name = __decode(ffi.string(word[3]))
if not unload_name(name):
lib.hexchat_print(lib.ph, b'Can\'t find a python plugin with that name')
lib.zoitechat_print(lib.ph, b'Can\'t find a python plugin with that name')
elif subcmd == 'reload':
name = __decode(ffi.string(word[3]))
if not reload_name(name):
lib.hexchat_print(lib.ph, b'Can\'t find a python plugin with that name')
lib.zoitechat_print(lib.ph, b'Can\'t find a python plugin with that name')
elif subcmd == 'console':
lib.hexchat_command(lib.ph, b'QUERY >>python<<')
lib.zoitechat_command(lib.ph, b'QUERY >>python<<')
elif subcmd == 'list':
list_plugins()
elif subcmd == 'about':
lib.hexchat_print(lib.ph, b'HexChat Python interface version ' + VERSION)
lib.zoitechat_print(lib.ph, b'ZoiteChat Python interface version ' + VERSION)
else:
lib.hexchat_command(lib.ph, b'HELP PY')
lib.zoitechat_command(lib.ph, b'HELP PY')
return 3
@ffi.def_extern()
def _on_plugin_init(plugin_name, plugin_desc, plugin_version, arg, libdir):
global hexchat
global hexchat_stdout
global zoitechat
global zoitechat_stdout
signal.signal(signal.SIGINT, signal.SIG_DFL)
@@ -512,23 +512,23 @@ def _on_plugin_init(plugin_name, plugin_desc, plugin_version, arg, libdir):
libdir = __decode(ffi.string(libdir))
modpath = os.path.join(libdir, '..', 'python')
sys.path.append(os.path.abspath(modpath))
hexchat = importlib.import_module('hexchat')
zoitechat = importlib.import_module('zoitechat')
except (UnicodeDecodeError, ImportError) as e:
lib.hexchat_print(lib.ph, b'Failed to import module: ' + repr(e).encode())
lib.zoitechat_print(lib.ph, b'Failed to import module: ' + repr(e).encode())
return 0
hexchat_stdout = Stdout()
sys.stdout = hexchat_stdout
sys.stderr = hexchat_stdout
zoitechat_stdout = Stdout()
sys.stdout = zoitechat_stdout
sys.stderr = zoitechat_stdout
pydoc.help = pydoc.Helper(HelpEater(), HelpEater())
lib.hexchat_hook_command(lib.ph, b'', 0, lib._on_say_command, ffi.NULL, ffi.NULL)
lib.hexchat_hook_command(lib.ph, b'LOAD', 0, lib._on_load_command, ffi.NULL, ffi.NULL)
lib.hexchat_hook_command(lib.ph, b'UNLOAD', 0, lib._on_unload_command, ffi.NULL, ffi.NULL)
lib.hexchat_hook_command(lib.ph, b'RELOAD', 0, lib._on_reload_command, ffi.NULL, ffi.NULL)
lib.hexchat_hook_command(lib.ph, b'PY', 0, lib._on_py_command, b'''Usage: /PY LOAD <filename>
lib.zoitechat_hook_command(lib.ph, b'', 0, lib._on_say_command, ffi.NULL, ffi.NULL)
lib.zoitechat_hook_command(lib.ph, b'LOAD', 0, lib._on_load_command, ffi.NULL, ffi.NULL)
lib.zoitechat_hook_command(lib.ph, b'UNLOAD', 0, lib._on_unload_command, ffi.NULL, ffi.NULL)
lib.zoitechat_hook_command(lib.ph, b'RELOAD', 0, lib._on_reload_command, ffi.NULL, ffi.NULL)
lib.zoitechat_hook_command(lib.ph, b'PY', 0, lib._on_py_command, b'''Usage: /PY LOAD <filename>
UNLOAD <filename|name>
RELOAD <filename|name>
LIST
@@ -536,7 +536,7 @@ def _on_plugin_init(plugin_name, plugin_desc, plugin_version, arg, libdir):
CONSOLE
ABOUT''', ffi.NULL)
lib.hexchat_print(lib.ph, b'Python interface loaded')
lib.zoitechat_print(lib.ph, b'Python interface loaded')
autoload()
return 1
@@ -544,19 +544,19 @@ def _on_plugin_init(plugin_name, plugin_desc, plugin_version, arg, libdir):
@ffi.def_extern()
def _on_plugin_deinit():
global local_interp
global hexchat
global hexchat_stdout
global zoitechat
global zoitechat_stdout
global plugins
plugins = set()
local_interp = None
hexchat = None
hexchat_stdout = None
zoitechat = None
zoitechat_stdout = None
sys.stdout = sys.__stdout__
sys.stderr = sys.__stderr__
pydoc.help = pydoc.Helper()
for mod in ('_hexchat', 'hexchat', 'xchat', '_hexchat_embedded'):
for mod in ('_zoitechat', 'zoitechat', 'xchat', '_zoitechat_embedded'):
try:
del sys.modules[mod]

View File

@@ -22,15 +22,15 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
<Import Project="..\..\win32\zoitechat.props" />
<PropertyGroup>
<TargetName>$(Python3Output)</TargetName>
<OutDir>$(HexChatRel)plugins\</OutDir>
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Glib);$(Python3Path)\include;..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(Glib);$(Python3Path)\include;..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<ModuleDefinitionFile>python.def</ModuleDefinitionFile>
@@ -38,13 +38,13 @@
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(Python3Path)\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PreBuildEvent>
<Command>"$(Python3Path)\python.exe" generate_plugin.py ..\..\src\common\hexchat-plugin.h python.py "$(IntDir)python.c"</Command>
<Command>"$(Python3Path)\python.exe" generate_plugin.py ..\..\src\common\zoitechat-plugin.h python.py "$(IntDir)python.c"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;PYTHON_EXPORTS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(Glib);$(Python3Path)\include;..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(Glib);$(Python3Path)\include;..\..\src\common;$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<ModuleDefinitionFile>python.def</ModuleDefinitionFile>
@@ -52,16 +52,16 @@
<AdditionalLibraryDirectories>$(DepsRoot)\lib;$(Python3Path)\libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PreBuildEvent>
<Command>"$(Python3Path)\python.exe" generate_plugin.py ..\..\src\common\hexchat-plugin.h python.py "$(IntDir)python.c"</Command>
<Command>"$(Python3Path)\python.exe" generate_plugin.py ..\..\src\common\zoitechat-plugin.h python.py "$(IntDir)python.c"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="generate_plugin.py" />
<None Include="hexchat.py" />
<None Include="zoitechat.py" />
<None Include="python.def" />
<None Include="python.py" />
<None Include="xchat.py" />
<None Include="_hexchat.py" />
<None Include="_zoitechat.py" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(IntDir)python.c" />

View File

@@ -15,13 +15,13 @@
<None Include="python.def">
<Filter>Resource Files</Filter>
</None>
<None Include="_hexchat.py">
<None Include="_zoitechat.py">
<Filter>Source Files</Filter>
</None>
<None Include="generate_plugin.py">
<Filter>Source Files</Filter>
</None>
<None Include="hexchat.py">
<None Include="zoitechat.py">
<Filter>Source Files</Filter>
</None>
<None Include="python.py">

View File

@@ -1,4 +1,4 @@
# HexChat Python Module Style Guide
# ZoiteChat Python Module Style Guide
(This is a work in progress).

View File

@@ -1 +1 @@
from _hexchat import *
from _zoitechat import *

View File

@@ -0,0 +1 @@
from _zoitechat import *

View File

@@ -1,5 +1,5 @@
/*
* SysInfo - sysinfo plugin for HexChat
* SysInfo - sysinfo plugin for ZoiteChat
* Copyright (c) 2015 Patrick Griffis.
*
* This program is free software you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
* SysInfo - sysinfo plugin for HexChat
* SysInfo - sysinfo plugin for ZoiteChat
* Copyright (c) 2015 Patrick Griffis.
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -5,7 +5,7 @@ sysinfo_sources = [
sysinfo_deps = [
libgio_dep,
hexchat_plugin_dep,
zoitechat_plugin_dep,
common_sysinfo_deps,
]

View File

@@ -1,5 +1,5 @@
/*
* SysInfo - sysinfo plugin for HexChat
* SysInfo - sysinfo plugin for ZoiteChat
* Copyright (c) 2015 Patrick Griffis.
*
* This program is free software you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
* SysInfo - sysinfo plugin for HexChat
* SysInfo - sysinfo plugin for ZoiteChat
* Copyright (c) 2015 Patrick Griffis.
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -1,5 +1,5 @@
/*
* SysInfo - sysinfo plugin for HexChat
* SysInfo - sysinfo plugin for ZoiteChat
* Copyright (c) 2012 Berke Viktor.
*
* xsys.c - main functions for X-Sys 2
@@ -29,14 +29,14 @@
#include <string.h>
#include <glib.h>
#include "hexchat-plugin.h"
#include "zoitechat-plugin.h"
#include "sysinfo-backend.h"
#include "sysinfo.h"
#define _(x) hexchat_gettext(ph,x)
#define _(x) zoitechat_gettext(ph,x)
#define DEFAULT_ANNOUNCE TRUE
static hexchat_plugin *ph;
static zoitechat_plugin *ph;
static char name[] = "Sysinfo";
static char desc[] = "Display info about your hardware and OS";
@@ -54,7 +54,7 @@ typedef struct
static char *
get_client (void)
{
return g_strdup_printf ("HexChat %s", hexchat_get_info(ph, "version"));
return g_strdup_printf ("ZoiteChat %s", zoitechat_get_info(ph, "version"));
}
static hwinfo hwinfos[] = {
@@ -102,7 +102,7 @@ print_summary (gboolean announce)
}
output = g_strjoinv (" \002\342\200\242\002 ", strings);
hexchat_commandf (ph, "%s %s", announce ? "SAY" : "ECHO", output);
zoitechat_commandf (ph, "%s %s", announce ? "SAY" : "ECHO", output);
g_strfreev (strings);
g_free (output);
@@ -120,23 +120,23 @@ print_info (char *info, gboolean announce)
char *str = hwinfos[i].callback();
if (str)
{
hexchat_commandf (ph, "%s \002%s\002: %s", announce ? "SAY" : "ECHO",
zoitechat_commandf (ph, "%s \002%s\002: %s", announce ? "SAY" : "ECHO",
hwinfos[i].title, str);
g_free (str);
}
else
hexchat_print (ph, _("Sysinfo: Failed to get info. Either not supported or error."));
zoitechat_print (ph, _("Sysinfo: Failed to get info. Either not supported or error."));
return;
}
}
hexchat_print (ph, _("Sysinfo: No info by that name\n"));
zoitechat_print (ph, _("Sysinfo: No info by that name\n"));
}
static gboolean
sysinfo_get_bool_pref (const char *pref, gboolean def)
{
int value = hexchat_pluginpref_get_int (ph, pref);
int value = zoitechat_pluginpref_get_int (ph, pref);
if (value != -1)
return value;
@@ -150,12 +150,12 @@ sysinfo_set_pref_real (const char *pref, char *value, gboolean def)
if (value && value[0])
{
guint64 i = g_ascii_strtoull (value, NULL, 0);
hexchat_pluginpref_set_int (ph, pref, i != 0);
hexchat_printf (ph, _("Sysinfo: %s is set to: %d\n"), pref, i != 0);
zoitechat_pluginpref_set_int (ph, pref, i != 0);
zoitechat_printf (ph, _("Sysinfo: %s is set to: %d\n"), pref, i != 0);
}
else
{
hexchat_printf (ph, _("Sysinfo: %s is set to: %d\n"), pref,
zoitechat_printf (ph, _("Sysinfo: %s is set to: %d\n"), pref,
sysinfo_get_bool_pref(pref, def));
}
}
@@ -165,7 +165,7 @@ sysinfo_set_pref (char *key, char *value)
{
if (!key || !key[0])
{
hexchat_print (ph, _("Sysinfo: Valid settings are: announce and hide_* for each piece of information. e.g. hide_os. Without a value it will show current (or default) setting.\n"));
zoitechat_print (ph, _("Sysinfo: Valid settings are: announce and hide_* for each piece of information. e.g. hide_os. Without a value it will show current (or default) setting.\n"));
return;
}
@@ -187,7 +187,7 @@ sysinfo_set_pref (char *key, char *value)
}
}
hexchat_print (ph, _("Sysinfo: Invalid variable name\n"));
zoitechat_print (ph, _("Sysinfo: Invalid variable name\n"));
}
static int
@@ -210,7 +210,7 @@ sysinfo_cb (char *word[], char *word_eol[], void *userdata)
}
/* Cannot send to server tab */
channel_type = hexchat_list_int (ph, NULL, "type");
channel_type = zoitechat_list_int (ph, NULL, "type");
if (channel_type != 2 /* SESS_CHANNEL */ && channel_type != 3 /* SESS_DIALOG */)
announce = FALSE;
@@ -226,24 +226,24 @@ sysinfo_cb (char *word[], char *word_eol[], void *userdata)
}
int
hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
*plugin_name = name;
*plugin_desc = desc;
*plugin_version = version;
hexchat_hook_command (ph, "SYSINFO", HEXCHAT_PRI_NORM, sysinfo_cb, sysinfo_help, NULL);
zoitechat_hook_command (ph, "SYSINFO", HEXCHAT_PRI_NORM, sysinfo_cb, sysinfo_help, NULL);
hexchat_command (ph, "MENU ADD \"Window/Send System Info\" \"SYSINFO\"");
hexchat_printf (ph, _("%s plugin loaded\n"), name);
zoitechat_command (ph, "MENU ADD \"Window/Send System Info\" \"SYSINFO\"");
zoitechat_printf (ph, _("%s plugin loaded\n"), name);
return 1;
}
int
hexchat_plugin_deinit (void)
zoitechat_plugin_deinit (void)
{
hexchat_command (ph, "MENU DEL \"Window/Display System Info\"");
hexchat_printf (ph, _("%s plugin unloaded\n"), name);
zoitechat_command (ph, "MENU DEL \"Window/Display System Info\"");
zoitechat_printf (ph, _("%s plugin unloaded\n"), name);
return 1;
}

View File

@@ -1,3 +1,3 @@
EXPORTS
hexchat_plugin_init
hexchat_plugin_deinit
zoitechat_plugin_init
zoitechat_plugin_deinit

View File

@@ -1,5 +1,5 @@
/*
* SysInfo - sysinfo plugin for HexChat
* SysInfo - sysinfo plugin for ZoiteChat
* Copyright (c) 2015 Patrick Griffis.
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -23,20 +23,20 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\win32\hexchat.props" />
<Import Project="..\..\win32\zoitechat.props" />
<PropertyGroup>
<TargetName>hcsysinfo</TargetName>
<OutDir>$(HexChatRel)plugins\</OutDir>
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;SYSINFO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src\common;$(DepsRoot)\include;$(Glib);$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;$(DepsRoot)\include;$(Glib);$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(HexChatLib)common.lib;wbemuuid.lib;comsupp.lib;$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(ZoiteChatLib)common.lib;wbemuuid.lib;comsupp.lib;$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>comsupp.lib</IgnoreSpecificDefaultLibraries>
<ModuleDefinitionFile>sysinfo.def</ModuleDefinitionFile>
</Link>
@@ -44,12 +44,12 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;SYSINFO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\..\src\common;$(DepsRoot)\include;$(Glib);$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\src\common;$(DepsRoot)\include;$(Glib);$(ZoiteChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(HexChatLib)common.lib;wbemuuid.lib;comsupp.lib;$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(ZoiteChatLib)common.lib;wbemuuid.lib;comsupp.lib;$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>comsupp.lib</IgnoreSpecificDefaultLibraries>
<ModuleDefinitionFile>sysinfo.def</ModuleDefinitionFile>
</Link>

View File

@@ -1,5 +1,5 @@
/*
* SysInfo - sysinfo plugin for HexChat
* SysInfo - sysinfo plugin for ZoiteChat
* Copyright (c) 2015 Patrick Griffis.
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (c) 2011-2012 Berke Viktor.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@@ -1,7 +1,7 @@
winsparkle_dep = cc.find_library('WinSparkle')
shared_module('upd', 'upd.c',
dependencies: [winsparkle_dep, hexchat_plugin_dep],
dependencies: [winsparkle_dep, zoitechat_plugin_dep],
install: true,
install_dir: plugindir,
name_prefix: '',

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (c) 2010-2012 Berke Viktor.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -22,15 +22,15 @@
#include <winsparkle.h>
#include "hexchat-plugin.h"
#include "zoitechat-plugin.h"
#define APPCAST_URL "https://hexchat.github.io/appcast.xml"
#define APPCAST_URL "https://zoitechat.github.io/appcast.xml"
static hexchat_plugin *ph; /* plugin handle */
static zoitechat_plugin *ph; /* plugin handle */
static char name[] = "Update Checker";
static char desc[] = "Check for HexChat updates automatically";
static char desc[] = "Check for ZoiteChat updates automatically";
static char version[] = "5.0";
static const char upd_help[] = "Update Checker Usage:\n /UPDCHK, check for HexChat updates\n";
static const char upd_help[] = "Update Checker Usage:\n /UPDCHK, check for ZoiteChat updates\n";
static int
check_cmd (char *word[], char *word_eol[], void *userdata)
@@ -41,7 +41,7 @@ check_cmd (char *word[], char *word_eol[], void *userdata)
}
int
hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
@@ -52,19 +52,19 @@ hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **p
win_sparkle_set_appcast_url (APPCAST_URL);
win_sparkle_init ();
hexchat_hook_command (ph, "UPDCHK", HEXCHAT_PRI_NORM, check_cmd, upd_help, NULL);
hexchat_command (ph, "MENU -ishare\\download.png ADD \"Help/Check for Updates\" \"UPDCHK\"");
hexchat_printf (ph, "%s plugin loaded\n", name);
zoitechat_hook_command (ph, "UPDCHK", HEXCHAT_PRI_NORM, check_cmd, upd_help, NULL);
zoitechat_command (ph, "MENU -ishare\\download.png ADD \"Help/Check for Updates\" \"UPDCHK\"");
zoitechat_printf (ph, "%s plugin loaded\n", name);
return 1;
}
int
hexchat_plugin_deinit (void)
zoitechat_plugin_deinit (void)
{
win_sparkle_cleanup ();
hexchat_command (ph, "MENU DEL \"Help/Check for updates\"");
hexchat_printf (ph, "%s plugin unloaded\n", name);
zoitechat_command (ph, "MENU DEL \"Help/Check for updates\"");
zoitechat_printf (ph, "%s plugin unloaded\n", name);
return 1;
}

View File

@@ -1,3 +1,3 @@
EXPORTS
hexchat_plugin_init
hexchat_plugin_deinit
zoitechat_plugin_init
zoitechat_plugin_deinit

Some files were not shown because too many files have changed in this diff Show More