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

@@ -23,19 +23,19 @@
#include <sys/types.h>
#include <sys/stat.h>
#include "hexchat.h"
#include "zoitechat.h"
#include "cfgfiles.h"
#include "util.h"
#include "fe.h"
#include "text.h"
#include "hexchatc.h"
#include "zoitechatc.h"
#include "typedef.h"
#ifdef WIN32
#include <io.h>
#else
#include <unistd.h>
#define HEXCHAT_DIR "hexchat"
#define HEXCHAT_DIR "zoitechat"
#endif
#define DEF_FONT "Monospace 9"
@@ -322,7 +322,7 @@ get_xdir (void)
roaming_path = g_utf16_to_utf8 (roaming_path_wide, -1, NULL, NULL, NULL);
CoTaskMemFree (roaming_path_wide);
xdir = g_build_filename (roaming_path, "HexChat", NULL);
xdir = g_build_filename (roaming_path, "ZoiteChat", NULL);
g_free (roaming_path);
}
@@ -345,7 +345,7 @@ default_file (void)
if (!dfile)
{
dfile = g_build_filename (get_xdir (), "hexchat.conf", NULL);
dfile = g_build_filename (get_xdir (), "zoitechat.conf", NULL);
}
return dfile;
}
@@ -533,7 +533,7 @@ const struct prefs vars[] =
{"net_auto_reconnectonfail", P_OFFINT (hex_net_auto_reconnectonfail), TYPE_BOOL},
#endif
{"net_bind_host", P_OFFSET (hex_net_bind_host), TYPE_STR},
{"net_ping_timeout", P_OFFINT (hex_net_ping_timeout), TYPE_INT, hexchat_reinit_timers},
{"net_ping_timeout", P_OFFINT (hex_net_ping_timeout), TYPE_INT, zoitechat_reinit_timers},
{"net_proxy_auth", P_OFFINT (hex_net_proxy_auth), TYPE_BOOL},
{"net_proxy_host", P_OFFSET (hex_net_proxy_host), TYPE_STR},
{"net_proxy_pass", P_OFFSET (hex_net_proxy_pass), TYPE_STR},
@@ -734,7 +734,7 @@ load_default_config(void)
username = convert_with_fallback (username, "username");
realname = convert_with_fallback (realname, "realname");
memset (&prefs, 0, sizeof (struct hexchatprefs));
memset (&prefs, 0, sizeof (struct zoitechatprefs));
/* put in default values, anything left out is automatically zero */
@@ -1327,7 +1327,7 @@ cmd_set (struct session *sess, char *tbuf, char *word[], char *word_eol[])
}
int
hexchat_open_file (const char *file, int flags, int mode, int xof_flags)
zoitechat_open_file (const char *file, int flags, int mode, int xof_flags)
{
char *buf;
int fd;
@@ -1357,7 +1357,7 @@ hexchat_open_file (const char *file, int flags, int mode, int xof_flags)
}
FILE *
hexchat_fopen_file (const char *file, const char *mode, int xof_flags)
zoitechat_fopen_file (const char *file, const char *mode, int xof_flags)
{
char *buf;
FILE *fh;

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -22,7 +22,7 @@
#ifndef HEXCHAT_CFGFILES_H
#define HEXCHAT_CFGFILES_H
#include "hexchat.h"
#include "zoitechat.h"
#define LANGUAGES_LENGTH 53
@@ -48,8 +48,8 @@ void list_loadconf (char *file, GSList ** list, char *defaultconf);
int list_delentry (GSList ** list, char *name);
void list_addentry (GSList ** list, char *cmd, char *name);
int cmd_set (session *sess, char *tbuf, char *word[], char *word_eol[]);
int hexchat_open_file (const char *file, int flags, int mode, int xof_flags);
FILE *hexchat_fopen_file (const char *file, const char *mode, int xof_flags);
int zoitechat_open_file (const char *file, int flags, int mode, int xof_flags);
FILE *zoitechat_fopen_file (const char *file, const char *mode, int xof_flags);
#define XOF_DOMODE 1
#define XOF_FULLPATH 2
@@ -60,10 +60,10 @@ FILE *hexchat_fopen_file (const char *file, const char *mode, int xof_flags);
#define STRUCT_OFFSET_INT(type,field) \
( (unsigned int) (((int *) (&(((type *) NULL)->field)))- ((int *) NULL)) )
#define P_OFFSET(field) STRUCT_OFFSET_STR(struct hexchatprefs, field),sizeof(prefs.field)
#define P_OFFSETNL(field) STRUCT_OFFSET_STR(struct hexchatprefs, field)
#define P_OFFINT(field) STRUCT_OFFSET_INT(struct hexchatprefs, field),0
#define P_OFFINTNL(field) STRUCT_OFFSET_INT(struct hexchatprefs, field)
#define P_OFFSET(field) STRUCT_OFFSET_STR(struct zoitechatprefs, field),sizeof(prefs.field)
#define P_OFFSETNL(field) STRUCT_OFFSET_STR(struct zoitechatprefs, field)
#define P_OFFINT(field) STRUCT_OFFSET_INT(struct zoitechatprefs, field),0
#define P_OFFINTNL(field) STRUCT_OFFSET_INT(struct zoitechatprefs, field)
struct prefs
{

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -33,13 +33,13 @@
#include <unistd.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "cfgfiles.h"
#include "server.h"
#include "text.h"
#include "util.h"
#include "hexchatc.h"
#include "zoitechatc.h"
static GSList *chanopt_list = NULL;
@@ -266,7 +266,7 @@ chanopt_load_all (void)
chanopt_in_memory *current = NULL;
/* 1. load the old file into our GSList */
fh = hexchat_open_file ("chanopt.conf", O_RDONLY, 0, 0);
fh = zoitechat_open_file ("chanopt.conf", O_RDONLY, 0, 0);
if (fh != -1)
{
while (waitline (fh, buf, sizeof buf, FALSE) != -1)
@@ -413,7 +413,7 @@ chanopt_save_all (gboolean flush)
return;
}
fh = hexchat_open_file ("chanopt.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
fh = zoitechat_open_file ("chanopt.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
if (fh == -1)
{
return;

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -24,7 +24,7 @@
<ClInclude Include="ignore.h" />
<ClInclude Include="inbound.h" />
<ClInclude Include="inet.h" />
<ClInclude Include="$(HexChatLib)marshal.h" />
<ClInclude Include="$(ZoiteChatLib)marshal.h" />
<ClInclude Include="modes.h" />
<ClInclude Include="network.h" />
<ClInclude Include="notify.h" />
@@ -39,16 +39,16 @@
<ClInclude Include="scram.h" />
<ClInclude Include="sysinfo\sysinfo.h" />
<ClInclude Include="text.h" />
<ClInclude Include="$(HexChatLib)textenums.h" />
<ClInclude Include="$(HexChatLib)textevents.h" />
<ClInclude Include="$(ZoiteChatLib)textenums.h" />
<ClInclude Include="$(ZoiteChatLib)textevents.h" />
<ClInclude Include="tree.h" />
<ClInclude Include="typedef.h" />
<ClInclude Include="url.h" />
<ClInclude Include="userlist.h" />
<ClInclude Include="util.h" />
<ClInclude Include="hexchat-plugin.h" />
<ClInclude Include="hexchat.h" />
<ClInclude Include="hexchatc.h" />
<ClInclude Include="zoitechat-plugin.h" />
<ClInclude Include="zoitechat.h" />
<ClInclude Include="zoitechatc.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="cfgfiles.c" />
@@ -59,7 +59,7 @@
<ClCompile Include="plugin-identd.c" />
<ClCompile Include="ignore.c" />
<ClCompile Include="inbound.c" />
<ClCompile Include="$(HexChatLib)marshal.c" />
<ClCompile Include="$(ZoiteChatLib)marshal.c" />
<ClCompile Include="modes.c" />
<ClCompile Include="network.c" />
<ClCompile Include="notify.c" />
@@ -77,11 +77,11 @@
<ClCompile Include="url.c" />
<ClCompile Include="userlist.c" />
<ClCompile Include="util.c" />
<ClCompile Include="hexchat.c" />
<ClCompile Include="zoitechat.c" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\win32\config.h.tt" />
<ClInclude Include="$(HexChatLib)config.h" />
<ClInclude Include="$(ZoiteChatLib)config.h" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{87554B59-006C-4D94-9714-897B27067BA3}</ProjectGuid>
@@ -91,20 +91,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>
<OutDir>$(HexChatLib)</OutDir>
<OutDir>$(ZoiteChatLib)</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(HexChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ZoiteChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_LIB;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(HexChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ZoiteChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
</ItemDefinitionGroup>
@@ -113,10 +113,10 @@
<PreBuildEvent>
<Command><![CDATA[
SET SOLUTIONDIR=$(SolutionDir)..\
"$(Python3Path)\python.exe" $(ProjectDir)make-te.py "$(ProjectDir)textevents.in" "$(HexChatLib)textevents.h" "$(HexChatLib)textenums.h"
powershell -File "$(SolutionDir)..\win32\version-template.ps1" "$(SolutionDir)..\win32\config.h.tt" "$(HexChatLib)config.h"
"$(Python3Path)\python.exe" "$(DepsRoot)\bin\glib-genmarshal" --prefix=_hexchat_marshal --header "$(ProjectDir)marshalers.list" --output "$(HexChatLib)marshal.h"
"$(Python3Path)\python.exe" "$(DepsRoot)\bin\glib-genmarshal" --prefix=_hexchat_marshal --body "$(ProjectDir)marshalers.list" --output "$(HexChatLib)marshal.c"
"$(Python3Path)\python.exe" $(ProjectDir)make-te.py "$(ProjectDir)textevents.in" "$(ZoiteChatLib)textevents.h" "$(ZoiteChatLib)textenums.h"
powershell -File "$(SolutionDir)..\win32\version-template.ps1" "$(SolutionDir)..\win32\config.h.tt" "$(ZoiteChatLib)config.h"
"$(Python3Path)\python.exe" "$(DepsRoot)\bin\glib-genmarshal" --prefix=_zoitechat_marshal --header "$(ProjectDir)marshalers.list" --output "$(ZoiteChatLib)marshal.h"
"$(Python3Path)\python.exe" "$(DepsRoot)\bin\glib-genmarshal" --prefix=_zoitechat_marshal --body "$(ProjectDir)marshalers.list" --output "$(ZoiteChatLib)marshal.c"
]]></Command>
</PreBuildEvent>
</ItemDefinitionGroup>

View File

@@ -77,10 +77,10 @@
<ClInclude Include="text.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(HexChatLib)textenums.h">
<ClInclude Include="$(ZoiteChatLib)textenums.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(HexChatLib)textevents.h">
<ClInclude Include="$(ZoiteChatLib)textevents.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="tree.h">
@@ -95,22 +95,22 @@
<ClInclude Include="util.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hexchat.h">
<ClInclude Include="zoitechat.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hexchatc.h">
<ClInclude Include="zoitechatc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="hexchat-plugin.h">
<ClInclude Include="zoitechat-plugin.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(HexChatLib)config.h">
<ClInclude Include="$(ZoiteChatLib)config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="typedef.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="$(HexChatLib)marshal.h">
<ClInclude Include="$(ZoiteChatLib)marshal.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="plugin-identd.h">
@@ -187,10 +187,10 @@
<ClCompile Include="util.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="hexchat.c">
<ClCompile Include="zoitechat.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(HexChatLib)marshal.c">
<ClCompile Include="$(ZoiteChatLib)marshal.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="plugin-identd.c">

View File

@@ -24,7 +24,7 @@
#include <unistd.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "cfgfiles.h"
#include "util.h"
#include "modes.h"
@@ -35,7 +35,7 @@
#include "text.h"
#include "ctcp.h"
#include "server.h"
#include "hexchatc.h"
#include "zoitechatc.h"
static void
@@ -136,10 +136,10 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip,
if (!g_ascii_strcasecmp (msg, "VERSION") && !prefs.hex_irc_hide_version)
{
#ifdef WIN32
g_snprintf (outbuf, sizeof (outbuf), "VERSION HexChat "PACKAGE_VERSION" [x%d] / %s",
g_snprintf (outbuf, sizeof (outbuf), "VERSION ZoiteChat "PACKAGE_VERSION" [x%d] / %s",
get_cpu_arch (), get_sys_str (1));
#else
g_snprintf (outbuf, sizeof (outbuf), "VERSION HexChat "PACKAGE_VERSION" / %s",
g_snprintf (outbuf, sizeof (outbuf), "VERSION ZoiteChat "PACKAGE_VERSION" / %s",
get_sys_str (1));
#endif
serv->p_nctcp (serv, nick, outbuf);

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* dbus-plugin.c - hexchat plugin for remote access using D-Bus
/* dbus-plugin.c - zoitechat plugin for remote access using D-Bus
* Copyright (C) 2006 Claessens Xavier
*
* This program is free software; you can redistribute it and/or modify
@@ -25,16 +25,16 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#include <glib/gi18n.h>
#include "hexchat-plugin.h"
#include "zoitechat-plugin.h"
#include "dbus-plugin.h"
#define PNAME _("remote access")
#define PDESC _("plugin for remote access using DBUS")
#define PVERSION ""
#define DBUS_OBJECT_PATH "/org/hexchat"
#define DBUS_OBJECT_PATH "/org/zoitechat"
static hexchat_plugin *ph;
static zoitechat_plugin *ph;
static guint last_context_id = 0;
static GList *contexts = NULL;
static GHashTable *clients = NULL;
@@ -51,7 +51,7 @@ struct RemoteObject
guint last_hook_id;
guint last_list_id;
hexchat_context *context;
zoitechat_context *context;
char *dbus_path;
char *filename;
GHashTable *hooks;
@@ -68,14 +68,14 @@ typedef struct
{
guint id;
int return_value;
hexchat_hook *hook;
zoitechat_hook *hook;
RemoteObject *obj;
} HookInfo;
typedef struct
{
guint id;
hexchat_context *context;
zoitechat_context *context;
} ContextInfo;
enum
@@ -246,8 +246,8 @@ static gboolean remote_object_send_modes (RemoteObject *obj,
/* Useful functions */
static char** build_list (char *word[]);
static guint context_list_find_id (hexchat_context *context);
static hexchat_context* context_list_find_context (guint id);
static guint context_list_find_id (zoitechat_context *context);
static zoitechat_context* context_list_find_context (guint id);
/* Remote Object */
@@ -259,14 +259,14 @@ hook_info_destroy (gpointer data)
if (info == NULL) {
return;
}
hexchat_unhook (ph, info->hook);
zoitechat_unhook (ph, info->hook);
g_free (info);
}
static void
list_info_destroy (gpointer data)
{
hexchat_list_free (ph, (hexchat_list*)data);
zoitechat_list_free (ph, (zoitechat_list*)data);
}
static void
@@ -278,7 +278,7 @@ remote_object_finalize (GObject *obj)
g_hash_table_destroy (self->hooks);
g_free (self->dbus_path);
g_free (self->filename);
hexchat_plugingui_remove (ph, self->handle);
zoitechat_plugingui_remove (ph, self->handle);
G_OBJECT_CLASS (remote_object_parent_class)->finalize (obj);
}
@@ -301,7 +301,7 @@ remote_object_init (RemoteObject *obj)
obj->filename = NULL;
obj->last_hook_id = 0;
obj->last_list_id = 0;
obj->context = hexchat_get_context (ph);
obj->context = zoitechat_get_context (ph);
}
static void
@@ -317,7 +317,7 @@ remote_object_class_init (RemoteObjectClass *klass)
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
_hexchat_marshal_VOID__POINTER_POINTER_UINT_UINT,
_zoitechat_marshal_VOID__POINTER_POINTER_UINT_UINT,
G_TYPE_NONE,
4, G_TYPE_STRV, G_TYPE_STRV, G_TYPE_UINT, G_TYPE_UINT);
@@ -327,7 +327,7 @@ remote_object_class_init (RemoteObjectClass *klass)
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
_hexchat_marshal_VOID__POINTER_POINTER_UINT_UINT,
_zoitechat_marshal_VOID__POINTER_POINTER_UINT_UINT,
G_TYPE_NONE,
4, G_TYPE_STRV, G_TYPE_STRV, G_TYPE_UINT, G_TYPE_UINT);
@@ -337,7 +337,7 @@ remote_object_class_init (RemoteObjectClass *klass)
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
_hexchat_marshal_VOID__POINTER_POINTER_UINT_UINT,
_zoitechat_marshal_VOID__POINTER_POINTER_UINT_UINT,
G_TYPE_NONE,
3, G_TYPE_STRV, G_TYPE_UINT, G_TYPE_UINT);
@@ -379,7 +379,7 @@ remote_object_connect (RemoteObject *obj,
remote_object = g_object_new (REMOTE_TYPE_OBJECT, NULL);
remote_object->dbus_path = path;
remote_object->filename = g_path_get_basename (filename);
remote_object->handle = hexchat_plugingui_add (ph,
remote_object->handle = zoitechat_plugingui_add (ph,
remote_object->filename,
name,
desc,
@@ -415,8 +415,8 @@ remote_object_command (RemoteObject *obj,
const char *command,
GError **error)
{
if (hexchat_set_context (ph, obj->context)) {
hexchat_command (ph, command);
if (zoitechat_set_context (ph, obj->context)) {
zoitechat_command (ph, command);
}
return TRUE;
}
@@ -426,8 +426,8 @@ remote_object_print (RemoteObject *obj,
const char *text,
GError **error)
{
if (hexchat_set_context (ph, obj->context)) {
hexchat_print (ph, text);
if (zoitechat_set_context (ph, obj->context)) {
zoitechat_print (ph, text);
}
return TRUE;
}
@@ -439,7 +439,7 @@ remote_object_find_context (RemoteObject *obj,
guint *ret_id,
GError **error)
{
hexchat_context *context;
zoitechat_context *context;
if (*server == '\0') {
server = NULL;
@@ -447,7 +447,7 @@ remote_object_find_context (RemoteObject *obj,
if (*channel == '\0') {
channel = NULL;
}
context = hexchat_find_context (ph, server, channel);
context = zoitechat_find_context (ph, server, channel);
*ret_id = context_list_find_id (context);
return TRUE;
@@ -468,7 +468,7 @@ remote_object_set_context (RemoteObject *obj,
gboolean *ret,
GError **error)
{
hexchat_context *context;
zoitechat_context *context;
context = context_list_find_context (id);
if (context == NULL) {
@@ -489,12 +489,12 @@ remote_object_get_info (RemoteObject *obj,
{
/* win_ptr is a GtkWindow* casted to char* and will crash
* D-Bus if we send it as a string */
if (!hexchat_set_context (ph, obj->context) ||
if (!zoitechat_set_context (ph, obj->context) ||
g_str_equal (id, "win_ptr")) {
*ret_info = NULL;
return TRUE;
}
*ret_info = g_strdup (hexchat_get_info (ph, id));
*ret_info = g_strdup (zoitechat_get_info (ph, id));
return TRUE;
}
@@ -508,11 +508,11 @@ remote_object_get_prefs (RemoteObject *obj,
{
const char *str;
if (!hexchat_set_context (ph, obj->context)) {
if (!zoitechat_set_context (ph, obj->context)) {
*ret_type = 0;
return TRUE;
}
*ret_type = hexchat_get_prefs (ph, name, &str, ret_int);
*ret_type = zoitechat_get_prefs (ph, name, &str, ret_int);
*ret_str = g_strdup (str);
return TRUE;
@@ -529,7 +529,7 @@ server_hook_cb (char *word[],
arg1 = build_list (word + 1);
arg2 = build_list (word_eol + 1);
info->obj->context = hexchat_get_context (ph);
info->obj->context = zoitechat_get_context (ph);
g_signal_emit (info->obj,
signals[SERVER_SIGNAL],
0,
@@ -552,7 +552,7 @@ command_hook_cb (char *word[],
arg1 = build_list (word + 1);
arg2 = build_list (word_eol + 1);
info->obj->context = hexchat_get_context (ph);
info->obj->context = zoitechat_get_context (ph);
g_signal_emit (info->obj,
signals[COMMAND_SIGNAL],
0,
@@ -572,7 +572,7 @@ print_hook_cb (char *word[],
char **arg1;
arg1 = build_list (word + 1);
info->obj->context = hexchat_get_context (ph);
info->obj->context = zoitechat_get_context (ph);
g_signal_emit (info->obj,
signals[PRINT_SIGNAL],
0,
@@ -598,7 +598,7 @@ remote_object_hook_command (RemoteObject *obj,
info->obj = obj;
info->return_value = return_value;
info->id = ++obj->last_hook_id;
info->hook = hexchat_hook_command (ph,
info->hook = zoitechat_hook_command (ph,
name,
priority,
command_hook_cb,
@@ -624,7 +624,7 @@ remote_object_hook_server (RemoteObject *obj,
info->obj = obj;
info->return_value = return_value;
info->id = ++obj->last_hook_id;
info->hook = hexchat_hook_server (ph,
info->hook = zoitechat_hook_server (ph,
name,
priority,
server_hook_cb,
@@ -649,7 +649,7 @@ remote_object_hook_print (RemoteObject *obj,
info->obj = obj;
info->return_value = return_value;
info->id = ++obj->last_hook_id;
info->hook = hexchat_hook_print (ph,
info->hook = zoitechat_hook_print (ph,
name,
priority,
print_hook_cb,
@@ -675,14 +675,14 @@ remote_object_list_get (RemoteObject *obj,
guint *ret_id,
GError **error)
{
hexchat_list *xlist;
zoitechat_list *xlist;
guint *id;
if (!hexchat_set_context (ph, obj->context)) {
if (!zoitechat_set_context (ph, obj->context)) {
*ret_id = 0;
return TRUE;
}
xlist = hexchat_list_get (ph, name);
xlist = zoitechat_list_get (ph, name);
if (xlist == NULL) {
*ret_id = 0;
return TRUE;
@@ -703,14 +703,14 @@ remote_object_list_next (RemoteObject *obj,
gboolean *ret,
GError **error)
{
hexchat_list *xlist;
zoitechat_list *xlist;
xlist = g_hash_table_lookup (obj->lists, &id);
if (xlist == NULL) {
*ret = FALSE;
return TRUE;
}
*ret = hexchat_list_next (ph, xlist);
*ret = zoitechat_list_next (ph, xlist);
return TRUE;
}
@@ -722,10 +722,10 @@ remote_object_list_str (RemoteObject *obj,
char **ret_str,
GError **error)
{
hexchat_list *xlist;
zoitechat_list *xlist;
xlist = g_hash_table_lookup (obj->lists, &id);
if (xlist == NULL && !hexchat_set_context (ph, obj->context)) {
if (xlist == NULL && !zoitechat_set_context (ph, obj->context)) {
*ret_str = NULL;
return TRUE;
}
@@ -733,7 +733,7 @@ remote_object_list_str (RemoteObject *obj,
*ret_str = NULL;
return TRUE;
}
*ret_str = g_strdup (hexchat_list_str (ph, xlist, name));
*ret_str = g_strdup (zoitechat_list_str (ph, xlist, name));
return TRUE;
}
@@ -745,19 +745,19 @@ remote_object_list_int (RemoteObject *obj,
int *ret_int,
GError **error)
{
hexchat_list *xlist;
zoitechat_list *xlist;
xlist = g_hash_table_lookup (obj->lists, &id);
if (xlist == NULL && !hexchat_set_context (ph, obj->context)) {
if (xlist == NULL && !zoitechat_set_context (ph, obj->context)) {
*ret_int = -1;
return TRUE;
}
if (g_str_equal (name, "context")) {
hexchat_context *context;
context = (hexchat_context*)hexchat_list_str (ph, xlist, name);
zoitechat_context *context;
context = (zoitechat_context*)zoitechat_list_str (ph, xlist, name);
*ret_int = context_list_find_id (context);
} else {
*ret_int = hexchat_list_int (ph, xlist, name);
*ret_int = zoitechat_list_int (ph, xlist, name);
}
return TRUE;
@@ -770,14 +770,14 @@ remote_object_list_time (RemoteObject *obj,
guint64 *ret_time,
GError **error)
{
hexchat_list *xlist;
zoitechat_list *xlist;
xlist = g_hash_table_lookup (obj->lists, &id);
if (xlist == NULL) {
*ret_time = (guint64) -1;
return TRUE;
}
*ret_time = hexchat_list_time (ph, xlist, name);
*ret_time = zoitechat_list_time (ph, xlist, name);
return TRUE;
}
@@ -788,7 +788,7 @@ remote_object_list_fields (RemoteObject *obj,
char ***ret,
GError **error)
{
*ret = g_strdupv ((char**)hexchat_list_fields (ph, name));
*ret = g_strdupv ((char**)zoitechat_list_fields (ph, name));
if (*ret == NULL) {
*ret = g_new0 (char*, 1);
}
@@ -818,9 +818,9 @@ remote_object_emit_print (RemoteObject *obj,
argv[i] = args[i];
}
*ret = hexchat_set_context (ph, obj->context);
*ret = zoitechat_set_context (ph, obj->context);
if (*ret) {
*ret = hexchat_emit_print (ph, event_name, argv[0], argv[1],
*ret = zoitechat_emit_print (ph, event_name, argv[0], argv[1],
argv[2], argv[3]);
}
@@ -834,8 +834,8 @@ remote_object_nickcmp (RemoteObject *obj,
int *ret,
GError **error)
{
hexchat_set_context (ph, obj->context);
*ret = hexchat_nickcmp (ph, nick1, nick2);
zoitechat_set_context (ph, obj->context);
*ret = zoitechat_nickcmp (ph, nick1, nick2);
return TRUE;
}
@@ -847,7 +847,7 @@ remote_object_strip (RemoteObject *obj,
char **ret_str,
GError **error)
{
*ret_str = hexchat_strip (ph, str, len, flag);
*ret_str = zoitechat_strip (ph, str, len, flag);
return TRUE;
}
@@ -859,8 +859,8 @@ remote_object_send_modes (RemoteObject *obj,
char mode,
GError **error)
{
if (hexchat_set_context (ph, obj->context)) {
hexchat_send_modes (ph, targets,
if (zoitechat_set_context (ph, obj->context)) {
zoitechat_send_modes (ph, targets,
g_strv_length ((char**)targets),
modes_per_line,
sign, mode);
@@ -896,7 +896,7 @@ init_dbus (void)
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
if (connection == NULL) {
hexchat_printf (ph, _("Couldn't connect to session bus: %s\n"),
zoitechat_printf (ph, _("Couldn't connect to session bus: %s\n"),
error->message);
g_error_free (error);
return FALSE;
@@ -913,7 +913,7 @@ init_dbus (void)
G_TYPE_INVALID,
G_TYPE_UINT, &request_name_result,
G_TYPE_INVALID)) {
hexchat_printf (ph, _("Failed to acquire %s: %s\n"),
zoitechat_printf (ph, _("Failed to acquire %s: %s\n"),
DBUS_SERVICE,
error->message);
g_error_free (error);
@@ -938,7 +938,7 @@ init_dbus (void)
return TRUE;
}
/* hexchat_plugin stuffs */
/* zoitechat_plugin stuffs */
static char**
build_list (char *word[])
@@ -964,7 +964,7 @@ build_list (char *word[])
}
static guint
context_list_find_id (hexchat_context *context)
context_list_find_id (zoitechat_context *context)
{
GList *l = NULL;
@@ -977,7 +977,7 @@ context_list_find_id (hexchat_context *context)
return 0;
}
static hexchat_context*
static zoitechat_context*
context_list_find_context (guint id)
{
GList *l = NULL;
@@ -999,7 +999,7 @@ open_context_cb (char *word[],
info = g_new0 (ContextInfo, 1);
info->id = ++last_context_id;
info->context = hexchat_get_context (ph);
info->context = zoitechat_get_context (ph);
contexts = g_list_prepend (contexts, info);
return HEXCHAT_EAT_NONE;
@@ -1010,7 +1010,7 @@ close_context_cb (char *word[],
void *userdata)
{
GList *l;
hexchat_context *context = hexchat_get_context (ph);
zoitechat_context *context = zoitechat_get_context (ph);
for (l = contexts; l != NULL; l = l->next) {
if (((ContextInfo*)l->data)->context == context) {
@@ -1051,7 +1051,7 @@ unload_plugin_cb (char *word[], char *word_eol[], void *userdata)
}
int
dbus_plugin_init (hexchat_plugin *plugin_handle,
dbus_plugin_init (zoitechat_plugin *plugin_handle,
char **plugin_name,
char **plugin_desc,
char **plugin_version,
@@ -1063,24 +1063,24 @@ dbus_plugin_init (hexchat_plugin *plugin_handle,
*plugin_version = PVERSION;
if (init_dbus()) {
/*hexchat_printf (ph, _("%s loaded successfully!\n"), PNAME);*/
/*zoitechat_printf (ph, _("%s loaded successfully!\n"), PNAME);*/
clients = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
g_object_unref);
hexchat_hook_print (ph, "Open Context",
zoitechat_hook_print (ph, "Open Context",
HEXCHAT_PRI_NORM,
open_context_cb,
NULL);
hexchat_hook_print (ph, "Close Context",
zoitechat_hook_print (ph, "Close Context",
HEXCHAT_PRI_NORM,
close_context_cb,
NULL);
hexchat_hook_command (ph, "unload",
zoitechat_hook_command (ph, "unload",
HEXCHAT_PRI_HIGHEST,
unload_plugin_cb, NULL, NULL);
}

View File

@@ -1,4 +1,4 @@
/* dbus-plugin.c - hexchat plugin for remote access using DBUS
/* dbus-plugin.c - zoitechat plugin for remote access using DBUS
* Copyright (C) 2006 Claessens Xavier
*
* This program is free software; you can redistribute it and/or modify
@@ -22,7 +22,7 @@
#ifndef HEXCHAT_DBUS_PLUGIN_H
#define HEXCHAT_DBUS_PLUGIN_H
int dbus_plugin_init (hexchat_plugin *plugin_handle,
int dbus_plugin_init (zoitechat_plugin *plugin_handle,
char **plugin_name,
char **plugin_desc,
char **plugin_version,

View File

@@ -24,10 +24,10 @@
#include <stdlib.h>
#include "../marshal.c"
#define DBUS_SERVICE "org.hexchat.service"
#define DBUS_REMOTE "/org/hexchat/Remote"
#define DBUS_REMOTE_CONNECTION_INTERFACE "org.hexchat.connection"
#define DBUS_REMOTE_PLUGIN_INTERFACE "org.hexchat.plugin"
#define DBUS_SERVICE "org.zoitechat.service"
#define DBUS_REMOTE "/org/zoitechat/Remote"
#define DBUS_REMOTE_CONNECTION_INTERFACE "org.zoitechat.connection"
#define DBUS_REMOTE_PLUGIN_INTERFACE "org.zoitechat.plugin"
guint command_id;
guint server_id;
@@ -73,7 +73,7 @@ test_command_cb (DBusGProxy *proxy,
G_TYPE_INVALID, G_TYPE_INVALID)) {
write_error ("Failed to complete unhook", &error);
}
/* Now if you write "/test blah" again in the HexChat window
/* Now if you write "/test blah" again in the ZoiteChat window
* you'll get a "Unknown command" error message */
g_print ("test command received: %s\n", word_eol[1]);
if (!dbus_g_proxy_call (proxy, "Print",
@@ -159,7 +159,7 @@ main (int argc, char **argv)
g_print ("Server hook id=%d\n", server_id);
dbus_g_object_register_marshaller (
_hexchat_marshal_VOID__POINTER_POINTER_UINT_UINT,
_zoitechat_marshal_VOID__POINTER_POINTER_UINT_UINT,
G_TYPE_NONE,
G_TYPE_STRV, G_TYPE_STRV, G_TYPE_UINT, G_TYPE_UINT,
G_TYPE_INVALID);
@@ -195,7 +195,7 @@ main (int argc, char **argv)
G_CALLBACK (unload_cb),
NULL, NULL);
/* Now you can write on the HexChat windows: "/test arg1 arg2 ..." */
/* Now you can write on the ZoiteChat windows: "/test arg1 arg2 ..." */
mainloop = g_main_loop_new (NULL, FALSE);
g_main_loop_run (mainloop);

View File

@@ -1,6 +1,6 @@
#!/usr/bin/python
# HexChat
# ZoiteChat
# Copyright (C) 1998-2010 Peter Zelezny.
# Copyright (C) 2009-2013 Berke Viktor.
#
@@ -23,29 +23,29 @@ from gi.repository import Gio
bus = Gio.bus_get_sync(Gio.BusType.SESSION, None)
connection = Gio.DBusProxy.new_sync(bus, Gio.DBusProxyFlags.NONE, None,
'org.hexchat.service', '/org/hexchat/Remote', 'org.hexchat.connection', None)
'org.zoitechat.service', '/org/zoitechat/Remote', 'org.zoitechat.connection', None)
path = connection.Connect('(ssss)',
'example.py',
'Python example',
'Example of a D-Bus client written in python',
'1.0')
hexchat = Gio.DBusProxy.new_sync(bus, Gio.DBusProxyFlags.NONE, None,
'org.hexchat.service', path, 'org.hexchat.plugin', None)
zoitechat = Gio.DBusProxy.new_sync(bus, Gio.DBusProxyFlags.NONE, None,
'org.zoitechat.service', path, 'org.zoitechat.plugin', None)
# Note the type before every arguement, this must be done.
# Type requirements are listed in our docs and characters are listed in the dbus docs.
# s = string, u = uint, i = int, etc.
channels = hexchat.ListGet ('(s)', "channels")
while hexchat.ListNext ('(u)', channels):
name = hexchat.ListStr ('(us)', channels, "channel")
channels = zoitechat.ListGet ('(s)', "channels")
while zoitechat.ListNext ('(u)', channels):
name = zoitechat.ListStr ('(us)', channels, "channel")
print("------- " + name + " -------")
hexchat.SetContext ('(u)', hexchat.ListInt ('(us)', channels, "context"))
hexchat.EmitPrint ('(sas)', "Channel Message", ["John", "Hi there", "@"])
users = hexchat.ListGet ('(s)', "users")
while hexchat.ListNext ('(u)', users):
print("Nick: " + hexchat.ListStr ('(us)', users, "nick"))
hexchat.ListFree ('(u)', users)
hexchat.ListFree ('(u)', channels)
zoitechat.SetContext ('(u)', zoitechat.ListInt ('(us)', channels, "context"))
zoitechat.EmitPrint ('(sas)', "Channel Message", ["John", "Hi there", "@"])
users = zoitechat.ListGet ('(s)', "users")
while zoitechat.ListNext ('(u)', users):
print("Nick: " + zoitechat.ListStr ('(us)', users, "nick"))
zoitechat.ListFree ('(u)', users)
zoitechat.ListFree ('(u)', channels)
print(hexchat.Strip ('(sii)', "\00312Blue\003 \002Bold!\002", -1, 1|2))
print(zoitechat.Strip ('(sii)', "\00312Blue\003 \002Bold!\002", -1, 1|2))

View File

@@ -19,16 +19,16 @@ if get_option('dbus-service-use-appid')
dbus_output_file = 'io.github.Hexchat.service'
dbus_cargs = '-DDBUS_SERVICE="io.github.Hexchat"'
else
dbus_service_name = 'org.hexchat.service'
dbus_output_file = 'org.hexchat.service.service'
dbus_cargs = '-DDBUS_SERVICE="org.hexchat.service"'
dbus_service_name = 'org.zoitechat.service'
dbus_output_file = 'org.zoitechat.service.service'
dbus_cargs = '-DDBUS_SERVICE="org.zoitechat.service"'
endif
dbus_conf = configuration_data()
dbus_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
dbus_conf.set('service_name', dbus_service_name)
configure_file(
input: 'org.hexchat.service.service.in',
input: 'org.zoitechat.service.service.in',
output: dbus_output_file,
configuration: dbus_conf,
install: true,
@@ -43,7 +43,7 @@ dbus_remote_object = custom_target('remote-object-glue',
'--output=@OUTPUT@', '@INPUT@']
)
hexchat_dbus = static_library('hexchatdbus',
zoitechat_dbus = static_library('zoitechatdbus',
sources: [dbus_remote_object, marshal] + dbus_sources,
c_args: dbus_cargs,
dependencies: common_deps + dbus_deps,
@@ -51,6 +51,6 @@ hexchat_dbus = static_library('hexchatdbus',
pic: true
)
hexchat_dbus_dep = declare_dependency(
link_with: hexchat_dbus
zoitechat_dbus_dep = declare_dependency(
link_with: zoitechat_dbus
)

View File

@@ -1,3 +1,3 @@
[D-BUS Service]
Name=@service_name@
Exec=@bindir@/hexchat
Exec=@bindir@/zoitechat

View File

@@ -2,7 +2,7 @@
<node name="/">
<interface name="org.hexchat.connection">
<interface name="org.zoitechat.connection">
<method name="Connect">
<annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
<arg type="s" name="filename" direction="in"/>
@@ -16,7 +16,7 @@
</method>
</interface>
<interface name="org.hexchat.plugin">
<interface name="org.zoitechat.plugin">
<method name="Command">
<arg type="s" name="command" direction="in"/>
</method>

View File

@@ -46,7 +46,7 @@
#include <unistd.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "util.h"
#include "fe.h"
#include "outbound.h"
@@ -56,7 +56,7 @@
#include "server.h"
#include "text.h"
#include "url.h"
#include "hexchatc.h"
#include "zoitechatc.h"
/* Setting _FILE_OFFSET_BITS to 64 doesn't change lseek to use off64_t on Windows, so override lseek to the version that does */
#if defined(WIN32) && (!defined(__MINGW32__) && !defined(__MINGW64__))

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -174,9 +174,9 @@ void fe_menu_update (menu_entry *);
#define FE_SE_RECONDELAY 3
#define FE_SE_CONNECTING 4
void fe_server_event (server *serv, int type, int arg);
/* pass NULL filename2 for default HexChat icon */
/* pass NULL filename2 for default ZoiteChat icon */
void fe_tray_set_flash (const char *filename1, const char *filename2, int timeout);
/* pass NULL filename for default HexChat icon */
/* pass NULL filename for default ZoiteChat icon */
void fe_tray_set_file (const char *filename);
typedef enum
{

View File

@@ -1,459 +0,0 @@
/* HexChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* You can distribute this header with your plugins for easy compilation */
#ifndef HEXCHAT_PLUGIN_H
#define HEXCHAT_PLUGIN_H
#include <time.h>
#define HEXCHAT_PRI_HIGHEST 127
#define HEXCHAT_PRI_HIGH 64
#define HEXCHAT_PRI_NORM 0
#define HEXCHAT_PRI_LOW (-64)
#define HEXCHAT_PRI_LOWEST (-128)
#define HEXCHAT_FD_READ 1
#define HEXCHAT_FD_WRITE 2
#define HEXCHAT_FD_EXCEPTION 4
#define HEXCHAT_FD_NOTSOCKET 8
#define HEXCHAT_EAT_NONE 0 /* pass it on through! */
#define HEXCHAT_EAT_HEXCHAT 1 /* don't let HexChat see this event */
#define HEXCHAT_EAT_PLUGIN 2 /* don't let other plugins see this event */
#define HEXCHAT_EAT_ALL (HEXCHAT_EAT_HEXCHAT|HEXCHAT_EAT_PLUGIN) /* don't let anything see this event */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _hexchat_plugin hexchat_plugin;
typedef struct _hexchat_list hexchat_list;
typedef struct _hexchat_hook hexchat_hook;
#ifndef PLUGIN_C
typedef struct _hexchat_context hexchat_context;
#endif
typedef struct
{
time_t server_time_utc; /* 0 if not used */
} hexchat_event_attrs;
#ifndef PLUGIN_C
struct _hexchat_plugin
{
/* these are only used on win32 */
hexchat_hook *(*hexchat_hook_command) (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
const char *help_text,
void *userdata);
hexchat_hook *(*hexchat_hook_server) (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_print) (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_timer) (hexchat_plugin *ph,
int timeout,
int (*callback) (void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_fd) (hexchat_plugin *ph,
int fd,
int flags,
int (*callback) (int fd, int flags, void *user_data),
void *userdata);
void *(*hexchat_unhook) (hexchat_plugin *ph,
hexchat_hook *hook);
void (*hexchat_print) (hexchat_plugin *ph,
const char *text);
void (*hexchat_printf) (hexchat_plugin *ph,
const char *format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 2, 3)))
#endif
;
void (*hexchat_command) (hexchat_plugin *ph,
const char *command);
void (*hexchat_commandf) (hexchat_plugin *ph,
const char *format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 2, 3)))
#endif
;
int (*hexchat_nickcmp) (hexchat_plugin *ph,
const char *s1,
const char *s2);
int (*hexchat_set_context) (hexchat_plugin *ph,
hexchat_context *ctx);
hexchat_context *(*hexchat_find_context) (hexchat_plugin *ph,
const char *servname,
const char *channel);
hexchat_context *(*hexchat_get_context) (hexchat_plugin *ph);
const char *(*hexchat_get_info) (hexchat_plugin *ph,
const char *id);
int (*hexchat_get_prefs) (hexchat_plugin *ph,
const char *name,
const char **string,
int *integer);
hexchat_list * (*hexchat_list_get) (hexchat_plugin *ph,
const char *name);
void (*hexchat_list_free) (hexchat_plugin *ph,
hexchat_list *xlist);
const char * const * (*hexchat_list_fields) (hexchat_plugin *ph,
const char *name);
int (*hexchat_list_next) (hexchat_plugin *ph,
hexchat_list *xlist);
const char * (*hexchat_list_str) (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
int (*hexchat_list_int) (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
void * (*hexchat_plugingui_add) (hexchat_plugin *ph,
const char *filename,
const char *name,
const char *desc,
const char *version,
char *reserved);
void (*hexchat_plugingui_remove) (hexchat_plugin *ph,
void *handle);
int (*hexchat_emit_print) (hexchat_plugin *ph,
const char *event_name, ...);
int (*hexchat_read_fd) (hexchat_plugin *ph,
void *src,
char *buf,
int *len);
time_t (*hexchat_list_time) (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
char *(*hexchat_gettext) (hexchat_plugin *ph,
const char *msgid);
void (*hexchat_send_modes) (hexchat_plugin *ph,
const char **targets,
int ntargets,
int modes_per_line,
char sign,
char mode);
char *(*hexchat_strip) (hexchat_plugin *ph,
const char *str,
int len,
int flags);
void (*hexchat_free) (hexchat_plugin *ph,
void *ptr);
int (*hexchat_pluginpref_set_str) (hexchat_plugin *ph,
const char *var,
const char *value);
int (*hexchat_pluginpref_get_str) (hexchat_plugin *ph,
const char *var,
char *dest);
int (*hexchat_pluginpref_set_int) (hexchat_plugin *ph,
const char *var,
int value);
int (*hexchat_pluginpref_get_int) (hexchat_plugin *ph,
const char *var);
int (*hexchat_pluginpref_delete) (hexchat_plugin *ph,
const char *var);
int (*hexchat_pluginpref_list) (hexchat_plugin *ph,
char *dest);
hexchat_hook *(*hexchat_hook_server_attrs) (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[],
hexchat_event_attrs *attrs, void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_print_attrs) (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], hexchat_event_attrs *attrs,
void *user_data),
void *userdata);
int (*hexchat_emit_print_attrs) (hexchat_plugin *ph, hexchat_event_attrs *attrs,
const char *event_name, ...);
hexchat_event_attrs *(*hexchat_event_attrs_create) (hexchat_plugin *ph);
void (*hexchat_event_attrs_free) (hexchat_plugin *ph,
hexchat_event_attrs *attrs);
};
#endif
hexchat_hook *
hexchat_hook_command (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
const char *help_text,
void *userdata);
hexchat_event_attrs *hexchat_event_attrs_create (hexchat_plugin *ph);
void hexchat_event_attrs_free (hexchat_plugin *ph, hexchat_event_attrs *attrs);
hexchat_hook *
hexchat_hook_server (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
void *userdata);
hexchat_hook *
hexchat_hook_server_attrs (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[],
hexchat_event_attrs *attrs, void *user_data),
void *userdata);
hexchat_hook *
hexchat_hook_print (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], void *user_data),
void *userdata);
hexchat_hook *
hexchat_hook_print_attrs (hexchat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], hexchat_event_attrs *attrs,
void *user_data),
void *userdata);
hexchat_hook *
hexchat_hook_timer (hexchat_plugin *ph,
int timeout,
int (*callback) (void *user_data),
void *userdata);
hexchat_hook *
hexchat_hook_fd (hexchat_plugin *ph,
int fd,
int flags,
int (*callback) (int fd, int flags, void *user_data),
void *userdata);
void *
hexchat_unhook (hexchat_plugin *ph,
hexchat_hook *hook);
void
hexchat_print (hexchat_plugin *ph,
const char *text);
void
hexchat_printf (hexchat_plugin *ph,
const char *format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 2, 3)))
#endif
;
void
hexchat_command (hexchat_plugin *ph,
const char *command);
void
hexchat_commandf (hexchat_plugin *ph,
const char *format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 2, 3)))
#endif
;
int
hexchat_nickcmp (hexchat_plugin *ph,
const char *s1,
const char *s2);
int
hexchat_set_context (hexchat_plugin *ph,
hexchat_context *ctx);
hexchat_context *
hexchat_find_context (hexchat_plugin *ph,
const char *servname,
const char *channel);
hexchat_context *
hexchat_get_context (hexchat_plugin *ph);
const char *
hexchat_get_info (hexchat_plugin *ph,
const char *id);
int
hexchat_get_prefs (hexchat_plugin *ph,
const char *name,
const char **string,
int *integer);
hexchat_list *
hexchat_list_get (hexchat_plugin *ph,
const char *name);
void
hexchat_list_free (hexchat_plugin *ph,
hexchat_list *xlist);
const char * const *
hexchat_list_fields (hexchat_plugin *ph,
const char *name);
int
hexchat_list_next (hexchat_plugin *ph,
hexchat_list *xlist);
const char *
hexchat_list_str (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
int
hexchat_list_int (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
time_t
hexchat_list_time (hexchat_plugin *ph,
hexchat_list *xlist,
const char *name);
void *
hexchat_plugingui_add (hexchat_plugin *ph,
const char *filename,
const char *name,
const char *desc,
const char *version,
char *reserved);
void
hexchat_plugingui_remove (hexchat_plugin *ph,
void *handle);
int
hexchat_emit_print (hexchat_plugin *ph,
const char *event_name, ...);
int
hexchat_emit_print_attrs (hexchat_plugin *ph, hexchat_event_attrs *attrs,
const char *event_name, ...);
char *
hexchat_gettext (hexchat_plugin *ph,
const char *msgid);
void
hexchat_send_modes (hexchat_plugin *ph,
const char **targets,
int ntargets,
int modes_per_line,
char sign,
char mode);
char *
hexchat_strip (hexchat_plugin *ph,
const char *str,
int len,
int flags);
void
hexchat_free (hexchat_plugin *ph,
void *ptr);
int
hexchat_pluginpref_set_str (hexchat_plugin *ph,
const char *var,
const char *value);
int
hexchat_pluginpref_get_str (hexchat_plugin *ph,
const char *var,
char *dest);
int
hexchat_pluginpref_set_int (hexchat_plugin *ph,
const char *var,
int value);
int
hexchat_pluginpref_get_int (hexchat_plugin *ph,
const char *var);
int
hexchat_pluginpref_delete (hexchat_plugin *ph,
const char *var);
int
hexchat_pluginpref_list (hexchat_plugin *ph,
char *dest);
#if !defined(PLUGIN_C) && (defined(WIN32) || defined(__CYGWIN__))
#ifndef HEXCHAT_PLUGIN_HANDLE
#define HEXCHAT_PLUGIN_HANDLE (ph)
#endif
#define hexchat_hook_command ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_command)
#define hexchat_event_attrs_create ((HEXCHAT_PLUGIN_HANDLE)->hexchat_event_attrs_create)
#define hexchat_event_attrs_free ((HEXCHAT_PLUGIN_HANDLE)->hexchat_event_attrs_free)
#define hexchat_hook_server ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_server)
#define hexchat_hook_server_attrs ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_server_attrs)
#define hexchat_hook_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_print)
#define hexchat_hook_print_attrs ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_print_attrs)
#define hexchat_hook_timer ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_timer)
#define hexchat_hook_fd ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_fd)
#define hexchat_unhook ((HEXCHAT_PLUGIN_HANDLE)->hexchat_unhook)
#define hexchat_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_print)
#define hexchat_printf ((HEXCHAT_PLUGIN_HANDLE)->hexchat_printf)
#define hexchat_command ((HEXCHAT_PLUGIN_HANDLE)->hexchat_command)
#define hexchat_commandf ((HEXCHAT_PLUGIN_HANDLE)->hexchat_commandf)
#define hexchat_nickcmp ((HEXCHAT_PLUGIN_HANDLE)->hexchat_nickcmp)
#define hexchat_set_context ((HEXCHAT_PLUGIN_HANDLE)->hexchat_set_context)
#define hexchat_find_context ((HEXCHAT_PLUGIN_HANDLE)->hexchat_find_context)
#define hexchat_get_context ((HEXCHAT_PLUGIN_HANDLE)->hexchat_get_context)
#define hexchat_get_info ((HEXCHAT_PLUGIN_HANDLE)->hexchat_get_info)
#define hexchat_get_prefs ((HEXCHAT_PLUGIN_HANDLE)->hexchat_get_prefs)
#define hexchat_list_get ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_get)
#define hexchat_list_free ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_free)
#define hexchat_list_fields ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_fields)
#define hexchat_list_next ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_next)
#define hexchat_list_str ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_str)
#define hexchat_list_int ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_int)
#define hexchat_plugingui_add ((HEXCHAT_PLUGIN_HANDLE)->hexchat_plugingui_add)
#define hexchat_plugingui_remove ((HEXCHAT_PLUGIN_HANDLE)->hexchat_plugingui_remove)
#define hexchat_emit_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_emit_print)
#define hexchat_emit_print_attrs ((HEXCHAT_PLUGIN_HANDLE)->hexchat_emit_print_attrs)
#define hexchat_list_time ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_time)
#define hexchat_gettext ((HEXCHAT_PLUGIN_HANDLE)->hexchat_gettext)
#define hexchat_send_modes ((HEXCHAT_PLUGIN_HANDLE)->hexchat_send_modes)
#define hexchat_strip ((HEXCHAT_PLUGIN_HANDLE)->hexchat_strip)
#define hexchat_free ((HEXCHAT_PLUGIN_HANDLE)->hexchat_free)
#define hexchat_pluginpref_set_str ((HEXCHAT_PLUGIN_HANDLE)->hexchat_pluginpref_set_str)
#define hexchat_pluginpref_get_str ((HEXCHAT_PLUGIN_HANDLE)->hexchat_pluginpref_get_str)
#define hexchat_pluginpref_set_int ((HEXCHAT_PLUGIN_HANDLE)->hexchat_pluginpref_set_int)
#define hexchat_pluginpref_get_int ((HEXCHAT_PLUGIN_HANDLE)->hexchat_pluginpref_get_int)
#define hexchat_pluginpref_delete ((HEXCHAT_PLUGIN_HANDLE)->hexchat_pluginpref_delete)
#define hexchat_pluginpref_list ((HEXCHAT_PLUGIN_HANDLE)->hexchat_pluginpref_list)
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -29,13 +29,13 @@
#include <unistd.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "ignore.h"
#include "cfgfiles.h"
#include "fe.h"
#include "text.h"
#include "util.h"
#include "hexchatc.h"
#include "zoitechatc.h"
#include "typedef.h"
@@ -280,7 +280,7 @@ ignore_load ()
char *cfg, *my_cfg;
int fh;
fh = hexchat_open_file ("ignore.conf", O_RDONLY, 0, 0);
fh = zoitechat_open_file ("ignore.conf", O_RDONLY, 0, 0);
if (fh != -1)
{
fstat (fh, &st);
@@ -311,7 +311,7 @@ ignore_save ()
GSList *temp = ignore_list;
struct ignore *ig;
fh = hexchat_open_file ("ignore.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
fh = zoitechat_open_file ("ignore.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
if (fh != -1)
{
while (temp)

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -33,7 +33,7 @@
#define WANTDNS
#include "inet.h"
#include "hexchat.h"
#include "zoitechat.h"
#include "util.h"
#include "ignore.h"
#include "fe.h"
@@ -45,7 +45,7 @@
#include "servlist.h"
#include "text.h"
#include "ctcp.h"
#include "hexchatc.h"
#include "zoitechatc.h"
#include "chanopt.h"

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -3,7 +3,7 @@ common_sources = [
'chanopt.c',
'ctcp.c',
'dcc.c',
'hexchat.c',
'zoitechat.c',
'history.c',
'ignore.c',
'inbound.c',
@@ -56,7 +56,7 @@ endif
marshal = gnome.genmarshal('marshal',
sources: 'marshalers.list',
prefix: '_hexchat_marshal',
prefix: '_zoitechat_marshal',
internal: true
)
@@ -80,16 +80,16 @@ endif
if dbus_glib_dep.found()
subdir('dbus')
common_deps += hexchat_dbus_dep
common_deps += zoitechat_dbus_dep
common_includes += include_directories('dbus')
endif
if get_option('plugin')
common_deps += libgmodule_dep
install_headers('hexchat-plugin.h')
install_headers('zoitechat-plugin.h')
endif
hexchat_common = static_library('hexchatcommon',
zoitechat_common = static_library('zoitechatcommon',
sources: [textevents] + marshal + common_sources,
include_directories: config_h_include,
dependencies: common_deps + common_sysinfo_deps,
@@ -97,15 +97,15 @@ hexchat_common = static_library('hexchatcommon',
pic: true
)
hexchat_common_dep = declare_dependency(
zoitechat_common_dep = declare_dependency(
sources: [textevents] + marshal,
link_with: hexchat_common,
link_with: zoitechat_common,
include_directories: common_includes,
compile_args: common_cflags,
dependencies: libgio_dep,
)
hexchat_plugin_dep = declare_dependency(
zoitechat_plugin_dep = declare_dependency(
include_directories: common_includes,
compile_args: common_cflags,
dependencies: global_deps,

View File

@@ -20,8 +20,8 @@
#include <stdlib.h>
#include <stdio.h>
#include "hexchat.h"
#include "hexchatc.h"
#include "zoitechat.h"
#include "zoitechatc.h"
#include "modes.h"
#include "server.h"
#include "text.h"

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -30,14 +30,14 @@
#include <unistd.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "notify.h"
#include "cfgfiles.h"
#include "fe.h"
#include "server.h"
#include "text.h"
#include "util.h"
#include "hexchatc.h"
#include "zoitechatc.h"
GSList *notify_list = 0;
@@ -129,7 +129,7 @@ notify_save (void)
GSList *list = g_slist_copy(notify_list);
list = g_slist_reverse(list);
fh = hexchat_open_file ("notify.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
fh = zoitechat_open_file ("notify.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
if (fh != -1)
{
while (list)
@@ -156,7 +156,7 @@ notify_load (void)
char buf[256];
char *sep;
fh = hexchat_open_file ("notify.conf", O_RDONLY, 0, 0);
fh = zoitechat_open_file ("notify.conf", O_RDONLY, 0, 0);
if (fh != -1)
{
while (waitline (fh, buf, sizeof buf, FALSE) != -1)

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -38,18 +38,18 @@
#include <sys/stat.h>
#include <fcntl.h>
#include "hexchat.h"
#include "zoitechat.h"
#include "plugin.h"
#include "ignore.h"
#include "util.h"
#include "fe.h"
#include "cfgfiles.h" /* hexchat_fopen_file() */
#include "cfgfiles.h" /* zoitechat_fopen_file() */
#include "network.h" /* net_ip() */
#include "modes.h"
#include "notify.h"
#include "inbound.h"
#include "text.h"
#include "hexchatc.h"
#include "zoitechatc.h"
#include "servlist.h"
#include "server.h"
#include "tree.h"
@@ -85,7 +85,7 @@ random_line (char *file_name)
if (!file_name[0])
goto nofile;
fh = hexchat_fopen_file (file_name, "r", 0);
fh = zoitechat_fopen_file (file_name, "r", 0);
if (!fh)
{
nofile:
@@ -1942,7 +1942,7 @@ cmd_exec (struct session *sess, char *tbuf, char *word[], char *word_eol[])
static int
cmd_exportconf (struct session *sess, char *tbuf, char *word[], char *word_eol[])
{
/* this is pretty much the same as in hexchat_exit() */
/* this is pretty much the same as in zoitechat_exit() */
save_config ();
if (prefs.save_pevents)
{
@@ -2500,7 +2500,7 @@ cmd_kickban (struct session *sess, char *tbuf, char *word[], char *word_eol[])
static int
cmd_killall (struct session *sess, char *tbuf, char *word[], char *word_eol[])
{
hexchat_exit();
zoitechat_exit();
return 2;
}
@@ -2585,7 +2585,7 @@ load_perform_file (session *sess, char *file)
char *nl;
FILE *fp;
fp = hexchat_fopen_file (file, "r", 0); /* load files from config dir */
fp = zoitechat_fopen_file (file, "r", 0); /* load files from config dir */
if (!fp)
return FALSE;
@@ -3628,7 +3628,7 @@ cmd_tray (struct session *sess, char *tbuf, char *word[], char *word_eol[])
if (!word[3][0])
{
fe_tray_set_file (NULL); /* default HexChat icon */
fe_tray_set_file (NULL); /* default ZoiteChat icon */
return TRUE;
}
@@ -4019,7 +4019,7 @@ const struct commands xc_cmds[] = {
#endif
#endif
#if 0
{"EXPORTCONF", cmd_exportconf, 0, 0, 1, N_("EXPORTCONF, exports HexChat settings")},
{"EXPORTCONF", cmd_exportconf, 0, 0, 1, N_("EXPORTCONF, exports ZoiteChat settings")},
#endif
{"FLUSHQ", cmd_flushq, 0, 0, 1,
N_("FLUSHQ, flushes the current server's send queue")},
@@ -4070,7 +4070,7 @@ const struct commands xc_cmds[] = {
{"ME", cmd_me, 0, 0, 1,
N_("ME <action>, sends the action to the current channel (actions are written in the 3rd person, like /me jumps)")},
{"MENU", cmd_menu, 0, 0, 1, "MENU [-eX] [-i<ICONFILE>] [-k<mod>,<key>] [-m] [-pX] [-r<X,group>] [-tX] {ADD|DEL} <path> [command] [unselect command]\n"
" See http://hexchat.readthedocs.org/en/latest/plugins.html#controlling-the-gui for more details."},
" See http://zoitechat.readthedocs.org/en/latest/plugins.html#controlling-the-gui for more details."},
{"MHOP", cmd_mhop, 1, 1, 1,
N_("MHOP, Mass hop's all users in the current channel (needs chanop)")},
{"MKICK", cmd_mkick, 1, 1, 1,
@@ -4112,7 +4112,7 @@ const struct commands xc_cmds[] = {
{"RECONNECT", cmd_reconnect, 0, 0, 1,
N_("RECONNECT [<host>] [<port>] [<password>], Can be called just as /RECONNECT to reconnect to the current server or with /RECONNECT ALL to reconnect to all the open servers")},
#endif
{"RECV", cmd_recv, 1, 0, 1, N_("RECV <text>, send raw data to HexChat, as if it was received from the IRC server")},
{"RECV", cmd_recv, 1, 0, 1, N_("RECV <text>, send raw data to ZoiteChat, as if it was received from the IRC server")},
{"RELOAD", cmd_reload, 0, 0, 1, N_("RELOAD <name>, reloads a plugin or script")},
{"SAY", cmd_say, 0, 0, 1,
N_("SAY <text>, sends the text to the object in the current window")},

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -20,7 +20,7 @@
#ifndef HEXCHAT_OUTBOUND_H
#define HEXCHAT_OUTBOUND_H
#include "hexchat.h"
#include "zoitechat.h"
extern const struct commands xc_cmds[];
extern GSList *menu_list;

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
@@ -19,12 +19,12 @@
#include <string.h>
#include <gio/gio.h>
#include "hexchat-plugin.h"
#include "zoitechat-plugin.h"
#define _(x) hexchat_gettext(ph,x)
#define _(x) zoitechat_gettext(ph,x)
static void identd_start_server (void);
static hexchat_plugin *ph;
static zoitechat_plugin *ph;
static GSocketService *service;
static GHashTable *responses;
@@ -100,12 +100,12 @@ identd_command_cb (char *word[], char *word_eol[], void *userdata)
{
g_hash_table_insert (responses, GINT_TO_POINTER (port), g_strdup (word[3]));
/* Automatically remove entry after 30 seconds */
hexchat_hook_timer (ph, 30000, identd_cleanup_response_cb, GINT_TO_POINTER (port));
zoitechat_hook_timer (ph, 30000, identd_cleanup_response_cb, GINT_TO_POINTER (port));
}
}
else
{
hexchat_command (ph, "HELP IDENTD");
zoitechat_command (ph, "HELP IDENTD");
}
return HEXCHAT_EAT_ALL;
@@ -172,7 +172,7 @@ identd_read_ready (GDataInputStream *in_stream, GAsyncResult *res, ident_info *i
inet_addr = g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (sok_addr));
addr = g_inet_address_to_string (inet_addr);
hexchat_printf (ph, _("*\tServicing ident request from %s as %s"), addr, info->username);
zoitechat_printf (ph, _("*\tServicing ident request from %s as %s"), addr, info->username);
g_object_unref (sok_addr);
g_object_unref (inet_addr);
@@ -220,12 +220,12 @@ identd_start_server (void)
GError *error = NULL;
int enabled, port = 113;
if (hexchat_get_prefs (ph, "identd_server", NULL, &enabled) == 3)
if (zoitechat_get_prefs (ph, "identd_server", NULL, &enabled) == 3)
{
if (!enabled)
return;
}
if (hexchat_get_prefs (ph, "identd_port", NULL, &port) == 2 && (port <= 0 || port > G_MAXUINT16))
if (zoitechat_get_prefs (ph, "identd_port", NULL, &port) == 2 && (port <= 0 || port > G_MAXUINT16))
{
port = 113;
}
@@ -235,20 +235,20 @@ identd_start_server (void)
g_socket_listener_add_inet_port (G_SOCKET_LISTENER (service), port, NULL, &error);
if (error)
{
hexchat_printf (ph, _("*\tError starting identd server: %s"), error->message);
zoitechat_printf (ph, _("*\tError starting identd server: %s"), error->message);
g_error_free (error);
g_clear_object (&service);
return;
}
/*hexchat_printf (ph, "*\tIdentd listening on port: %d", port); */
/*zoitechat_printf (ph, "*\tIdentd listening on port: %d", port); */
g_signal_connect (G_OBJECT (service), "incoming", G_CALLBACK(identd_incoming_cb), NULL);
g_socket_service_start (service);
}
int
identd_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name,
identd_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name,
char **plugin_desc, char **plugin_version, char *arg)
{
ph = plugin_handle;
@@ -258,7 +258,7 @@ identd_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name,
responses = g_hash_table_new_full (NULL, NULL, NULL, g_free);
hexchat_hook_command (ph, "IDENTD", HEXCHAT_PRI_NORM, identd_command_cb,
zoitechat_hook_command (ph, "IDENTD", HEXCHAT_PRI_NORM, identd_command_cb,
_("IDENTD <port> <username>"), NULL);
identd_start_server ();

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -20,7 +20,7 @@
#ifndef HEXCHAT_PLUGIN_IDENTD_H
#define HEXCHAT_PLUGIN_IDENTD_H
int identd_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name,
int identd_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name,
char **plugin_desc, char **plugin_version, char *arg);
int identd_plugin_deinit (void);

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -22,15 +22,15 @@
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "hexchat-plugin.h"
#include "zoitechat-plugin.h"
#ifdef WIN32
#define g_ascii_strcasecmp stricmp
#endif
#define _(x) hexchat_gettext(ph,x)
#define _(x) zoitechat_gettext(ph,x)
static hexchat_plugin *ph; /* plugin handle */
static zoitechat_plugin *ph; /* plugin handle */
static GSList *timer_list = NULL;
#define STATIC
@@ -40,8 +40,8 @@ static GSList *timer_list = NULL;
typedef struct
{
hexchat_hook *hook;
hexchat_context *context;
zoitechat_hook *hook;
zoitechat_context *context;
char *command;
int ref;
int repeat;
@@ -54,7 +54,7 @@ timer_del (timer *tim)
{
timer_list = g_slist_remove (timer_list, tim);
g_free (tim->command);
hexchat_unhook (ph, tim->hook);
zoitechat_unhook (ph, tim->hook);
g_free (tim);
}
@@ -72,21 +72,21 @@ timer_del_ref (int ref, int quiet)
{
timer_del (tim);
if (!quiet)
hexchat_printf (ph, _("Timer %d deleted.\n"), ref);
zoitechat_printf (ph, _("Timer %d deleted.\n"), ref);
return;
}
list = list->next;
}
if (!quiet)
hexchat_print (ph, _("No such ref number found.\n"));
zoitechat_print (ph, _("No such ref number found.\n"));
}
static int
timeout_cb (timer *tim)
{
if (hexchat_set_context (ph, tim->context))
if (zoitechat_set_context (ph, tim->context))
{
hexchat_command (ph, tim->command);
zoitechat_command (ph, tim->command);
if (tim->forever)
return 1;
@@ -124,13 +124,13 @@ timer_add (int ref, int timeout, int repeat, char *command)
tim->repeat = repeat;
tim->timeout = timeout;
tim->command = g_strdup (command);
tim->context = hexchat_get_context (ph);
tim->context = zoitechat_get_context (ph);
tim->forever = FALSE;
if (repeat == 0)
tim->forever = TRUE;
tim->hook = hexchat_hook_timer (ph, timeout, (void *)timeout_cb, tim);
tim->hook = zoitechat_hook_timer (ph, timeout, (void *)timeout_cb, tim);
timer_list = g_slist_append (timer_list, tim);
}
@@ -142,17 +142,17 @@ timer_showlist (void)
if (timer_list == NULL)
{
hexchat_print (ph, _("No timers installed.\n"));
hexchat_print (ph, _(HELP));
zoitechat_print (ph, _("No timers installed.\n"));
zoitechat_print (ph, _(HELP));
return;
}
/* 00000 00000000 0000000 abc */
hexchat_print (ph, _("\026 Ref# Seconds Repeat Command \026\n"));
zoitechat_print (ph, _("\026 Ref# Seconds Repeat Command \026\n"));
list = timer_list;
while (list)
{
tim = list->data;
hexchat_printf (ph, _("%5d %8.1f %7d %s\n"), tim->ref, tim->timeout / 1000.0f,
zoitechat_printf (ph, _("%5d %8.1f %7d %s\n"), tim->ref, tim->timeout / 1000.0f,
tim->repeat, tim->command);
list = list->next;
}
@@ -202,7 +202,7 @@ timer_cb (char *word[], char *word_eol[], void *userdata)
command = word_eol[3 + offset];
if (timeout < 0.1 || timeout * 1000 > INT_MAX || !command[0])
hexchat_print (ph, HELP);
zoitechat_print (ph, HELP);
else
timer_add (ref, (int) timeout * 1000, repeat, command);
@@ -213,19 +213,19 @@ int
#ifdef STATIC
timer_plugin_init
#else
hexchat_plugin_init
zoitechat_plugin_init
#endif
(hexchat_plugin *plugin_handle, char **plugin_name,
(zoitechat_plugin *plugin_handle, char **plugin_name,
char **plugin_desc, char **plugin_version, char *arg)
{
/* we need to save this for use with any hexchat_* functions */
/* we need to save this for use with any zoitechat_* functions */
ph = plugin_handle;
*plugin_name = "Timer";
*plugin_desc = "IrcII style /TIMER command";
*plugin_version = "";
hexchat_hook_command (ph, "TIMER", HEXCHAT_PRI_NORM, timer_cb, _(HELP), 0);
zoitechat_hook_command (ph, "TIMER", HEXCHAT_PRI_NORM, timer_cb, _(HELP), 0);
return 1; /* return 1 for success */
}

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -20,7 +20,7 @@
#ifndef HEXCHAT_PLUGIN_TIMER_H
#define HEXCHAT_PLUGIN_TIMER_H
int timer_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name,
int timer_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name,
char **plugin_desc, char **plugin_version, char *arg);
#endif

View File

@@ -29,7 +29,7 @@
#include <unistd.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "fe.h"
#include "util.h"
#include "outbound.h"
@@ -41,13 +41,13 @@
#include "notify.h"
#include "text.h"
#define PLUGIN_C
typedef struct session hexchat_context;
#include "hexchat-plugin.h"
typedef struct session zoitechat_context;
#include "zoitechat-plugin.h"
#include "plugin.h"
#include "typedef.h"
#include "hexchatc.h"
#include "zoitechatc.h"
/* the USE_PLUGIN define only removes libdl stuff */
@@ -58,9 +58,9 @@ typedef struct session hexchat_context;
#define DEBUG(x) {x;}
/* crafted to be an even 32 bytes */
struct _hexchat_hook
struct _zoitechat_hook
{
hexchat_plugin *pl; /* the plugin to which it belongs */
zoitechat_plugin *pl; /* the plugin to which it belongs */
char *name; /* "xdcc" */
void *callback; /* pointer to xdcc_callback */
char *help_text; /* help_text for commands only */
@@ -70,7 +70,7 @@ struct _hexchat_hook
int pri; /* fd */ /* priority / fd for HOOK_FD only */
};
struct _hexchat_list
struct _zoitechat_list
{
int type; /* LIST_* */
GSList *pos; /* current pos */
@@ -79,15 +79,15 @@ struct _hexchat_list
struct notify_per_server *notifyps; /* notify_per_server * */
};
typedef int (hexchat_cmd_cb) (char *word[], char *word_eol[], void *user_data);
typedef int (hexchat_serv_cb) (char *word[], char *word_eol[], void *user_data);
typedef int (hexchat_print_cb) (char *word[], void *user_data);
typedef int (hexchat_serv_attrs_cb) (char *word[], char *word_eol[], hexchat_event_attrs *attrs, void *user_data);
typedef int (hexchat_print_attrs_cb) (char *word[], hexchat_event_attrs *attrs, void *user_data);
typedef int (hexchat_fd_cb) (int fd, int flags, void *user_data);
typedef int (hexchat_timer_cb) (void *user_data);
typedef int (hexchat_init_func) (hexchat_plugin *, char **, char **, char **, char *);
typedef int (hexchat_deinit_func) (hexchat_plugin *);
typedef int (zoitechat_cmd_cb) (char *word[], char *word_eol[], void *user_data);
typedef int (zoitechat_serv_cb) (char *word[], char *word_eol[], void *user_data);
typedef int (zoitechat_print_cb) (char *word[], void *user_data);
typedef int (zoitechat_serv_attrs_cb) (char *word[], char *word_eol[], zoitechat_event_attrs *attrs, void *user_data);
typedef int (zoitechat_print_attrs_cb) (char *word[], zoitechat_event_attrs *attrs, void *user_data);
typedef int (zoitechat_fd_cb) (int fd, int flags, void *user_data);
typedef int (zoitechat_timer_cb) (void *user_data);
typedef int (zoitechat_init_func) (zoitechat_plugin *, char **, char **, char **, char *);
typedef int (zoitechat_deinit_func) (zoitechat_plugin *);
enum
{
@@ -152,13 +152,13 @@ extern const struct prefs vars[]; /* cfgfiles.c */
/* unload a plugin and remove it from our linked list */
static int
plugin_free (hexchat_plugin *pl, int do_deinit, int allow_refuse)
plugin_free (zoitechat_plugin *pl, int do_deinit, int allow_refuse)
{
GSList *list, *next;
hexchat_hook *hook;
hexchat_deinit_func *deinit_func;
zoitechat_hook *hook;
zoitechat_deinit_func *deinit_func;
/* fake plugin added by hexchat_plugingui_add() */
/* fake plugin added by zoitechat_plugingui_add() */
if (pl->fake)
goto xit;
@@ -177,7 +177,7 @@ plugin_free (hexchat_plugin *pl, int do_deinit, int allow_refuse)
hook = list->data;
next = list->next;
if (hook->pl == pl)
hexchat_unhook (NULL, hook);
zoitechat_unhook (NULL, hook);
list = next;
}
@@ -205,14 +205,14 @@ xit:
return TRUE;
}
static hexchat_plugin *
plugin_list_add (hexchat_context *ctx, char *filename, const char *name,
static zoitechat_plugin *
plugin_list_add (zoitechat_context *ctx, char *filename, const char *name,
const char *desc, const char *version, void *handle,
void *deinit_func, int fake, int free_strings)
{
hexchat_plugin *pl;
zoitechat_plugin *pl;
pl = g_new (hexchat_plugin, 1);
pl = g_new (zoitechat_plugin, 1);
pl->handle = handle;
pl->filename = filename;
pl->context = ctx;
@@ -230,7 +230,7 @@ plugin_list_add (hexchat_context *ctx, char *filename, const char *name,
#ifndef WIN32
static void *
hexchat_dummy (hexchat_plugin *ph)
zoitechat_dummy (zoitechat_plugin *ph)
{
return NULL;
}
@@ -238,7 +238,7 @@ hexchat_dummy (hexchat_plugin *ph)
#else
static int
hexchat_read_fd (hexchat_plugin *ph, GIOChannel *source, char *buf, int *len)
zoitechat_read_fd (zoitechat_plugin *ph, GIOChannel *source, char *buf, int *len)
{
GError *error = NULL;
@@ -262,7 +262,7 @@ void
plugin_add (session *sess, char *filename, void *handle, void *init_func,
void *deinit_func, char *arg, int fake)
{
hexchat_plugin *pl;
zoitechat_plugin *pl;
char *file;
file = g_strdup (filename);
@@ -273,55 +273,55 @@ plugin_add (session *sess, char *filename, void *handle, void *init_func,
if (!fake)
{
/* win32 uses these because it doesn't have --export-dynamic! */
pl->hexchat_hook_command = hexchat_hook_command;
pl->hexchat_hook_server = hexchat_hook_server;
pl->hexchat_hook_print = hexchat_hook_print;
pl->hexchat_hook_timer = hexchat_hook_timer;
pl->hexchat_hook_fd = hexchat_hook_fd;
pl->hexchat_unhook = hexchat_unhook;
pl->hexchat_print = hexchat_print;
pl->hexchat_printf = hexchat_printf;
pl->hexchat_command = hexchat_command;
pl->hexchat_commandf = hexchat_commandf;
pl->hexchat_nickcmp = hexchat_nickcmp;
pl->hexchat_set_context = hexchat_set_context;
pl->hexchat_find_context = hexchat_find_context;
pl->hexchat_get_context = hexchat_get_context;
pl->hexchat_get_info = hexchat_get_info;
pl->hexchat_get_prefs = hexchat_get_prefs;
pl->hexchat_list_get = hexchat_list_get;
pl->hexchat_list_free = hexchat_list_free;
pl->hexchat_list_fields = hexchat_list_fields;
pl->hexchat_list_str = hexchat_list_str;
pl->hexchat_list_next = hexchat_list_next;
pl->hexchat_list_int = hexchat_list_int;
pl->hexchat_plugingui_add = hexchat_plugingui_add;
pl->hexchat_plugingui_remove = hexchat_plugingui_remove;
pl->hexchat_emit_print = hexchat_emit_print;
pl->zoitechat_hook_command = zoitechat_hook_command;
pl->zoitechat_hook_server = zoitechat_hook_server;
pl->zoitechat_hook_print = zoitechat_hook_print;
pl->zoitechat_hook_timer = zoitechat_hook_timer;
pl->zoitechat_hook_fd = zoitechat_hook_fd;
pl->zoitechat_unhook = zoitechat_unhook;
pl->zoitechat_print = zoitechat_print;
pl->zoitechat_printf = zoitechat_printf;
pl->zoitechat_command = zoitechat_command;
pl->zoitechat_commandf = zoitechat_commandf;
pl->zoitechat_nickcmp = zoitechat_nickcmp;
pl->zoitechat_set_context = zoitechat_set_context;
pl->zoitechat_find_context = zoitechat_find_context;
pl->zoitechat_get_context = zoitechat_get_context;
pl->zoitechat_get_info = zoitechat_get_info;
pl->zoitechat_get_prefs = zoitechat_get_prefs;
pl->zoitechat_list_get = zoitechat_list_get;
pl->zoitechat_list_free = zoitechat_list_free;
pl->zoitechat_list_fields = zoitechat_list_fields;
pl->zoitechat_list_str = zoitechat_list_str;
pl->zoitechat_list_next = zoitechat_list_next;
pl->zoitechat_list_int = zoitechat_list_int;
pl->zoitechat_plugingui_add = zoitechat_plugingui_add;
pl->zoitechat_plugingui_remove = zoitechat_plugingui_remove;
pl->zoitechat_emit_print = zoitechat_emit_print;
#ifdef WIN32
pl->hexchat_read_fd = (void *) hexchat_read_fd;
pl->zoitechat_read_fd = (void *) zoitechat_read_fd;
#else
pl->hexchat_read_fd = hexchat_dummy;
pl->zoitechat_read_fd = zoitechat_dummy;
#endif
pl->hexchat_list_time = hexchat_list_time;
pl->hexchat_gettext = hexchat_gettext;
pl->hexchat_send_modes = hexchat_send_modes;
pl->hexchat_strip = hexchat_strip;
pl->hexchat_free = hexchat_free;
pl->hexchat_pluginpref_set_str = hexchat_pluginpref_set_str;
pl->hexchat_pluginpref_get_str = hexchat_pluginpref_get_str;
pl->hexchat_pluginpref_set_int = hexchat_pluginpref_set_int;
pl->hexchat_pluginpref_get_int = hexchat_pluginpref_get_int;
pl->hexchat_pluginpref_delete = hexchat_pluginpref_delete;
pl->hexchat_pluginpref_list = hexchat_pluginpref_list;
pl->hexchat_hook_server_attrs = hexchat_hook_server_attrs;
pl->hexchat_hook_print_attrs = hexchat_hook_print_attrs;
pl->hexchat_emit_print_attrs = hexchat_emit_print_attrs;
pl->hexchat_event_attrs_create = hexchat_event_attrs_create;
pl->hexchat_event_attrs_free = hexchat_event_attrs_free;
pl->zoitechat_list_time = zoitechat_list_time;
pl->zoitechat_gettext = zoitechat_gettext;
pl->zoitechat_send_modes = zoitechat_send_modes;
pl->zoitechat_strip = zoitechat_strip;
pl->zoitechat_free = zoitechat_free;
pl->zoitechat_pluginpref_set_str = zoitechat_pluginpref_set_str;
pl->zoitechat_pluginpref_get_str = zoitechat_pluginpref_get_str;
pl->zoitechat_pluginpref_set_int = zoitechat_pluginpref_set_int;
pl->zoitechat_pluginpref_get_int = zoitechat_pluginpref_get_int;
pl->zoitechat_pluginpref_delete = zoitechat_pluginpref_delete;
pl->zoitechat_pluginpref_list = zoitechat_pluginpref_list;
pl->zoitechat_hook_server_attrs = zoitechat_hook_server_attrs;
pl->zoitechat_hook_print_attrs = zoitechat_hook_print_attrs;
pl->zoitechat_emit_print_attrs = zoitechat_emit_print_attrs;
pl->zoitechat_event_attrs_create = zoitechat_event_attrs_create;
pl->zoitechat_event_attrs_free = zoitechat_event_attrs_free;
/* run hexchat_plugin_init, if it returns 0, close the plugin */
if (((hexchat_init_func *)init_func) (pl, &pl->name, &pl->desc, &pl->version, arg) == 0)
/* run zoitechat_plugin_init, if it returns 0, close the plugin */
if (((zoitechat_init_func *)init_func) (pl, &pl->name, &pl->desc, &pl->version, arg) == 0)
{
plugin_free (pl, FALSE, FALSE);
return;
@@ -339,7 +339,7 @@ int
plugin_kill (char *name, int by_filename)
{
GSList *list;
hexchat_plugin *pl;
zoitechat_plugin *pl;
list = plugin_list;
while (list)
@@ -370,7 +370,7 @@ void
plugin_kill_all (void)
{
GSList *list, *next;
hexchat_plugin *pl;
zoitechat_plugin *pl;
list = plugin_list;
while (list)
@@ -423,21 +423,21 @@ char *
plugin_load (session *sess, char *filename, char *arg)
{
GModule *handle = module_load (filename);
hexchat_init_func *init_func;
hexchat_deinit_func *deinit_func;
zoitechat_init_func *init_func;
zoitechat_deinit_func *deinit_func;
if (handle == NULL)
return (char *)g_module_error ();
/* find the init routine hexchat_plugin_init */
if (!g_module_symbol (handle, "hexchat_plugin_init", (gpointer *)&init_func))
/* find the init routine zoitechat_plugin_init */
if (!g_module_symbol (handle, "zoitechat_plugin_init", (gpointer *)&init_func))
{
g_module_close (handle);
return _("No hexchat_plugin_init symbol; is this really a HexChat plugin?");
return _("No zoitechat_plugin_init symbol; is this really a ZoiteChat plugin?");
}
/* find the plugin's deinit routine, if any */
if (!g_module_symbol (handle, "hexchat_plugin_deinit", (gpointer *)&deinit_func))
if (!g_module_symbol (handle, "zoitechat_plugin_deinit", (gpointer *)&deinit_func))
deinit_func = NULL;
/* add it to our linked list */
@@ -510,7 +510,7 @@ plugin_reload (session *sess, char *name, int by_filename)
GSList *list;
char *filename;
char *ret;
hexchat_plugin *pl;
zoitechat_plugin *pl;
list = plugin_list;
while (list)
@@ -547,7 +547,7 @@ plugin_reload (session *sess, char *name, int by_filename)
static GSList *
plugin_hook_find (GSList *list, int type, char *name)
{
hexchat_hook *hook;
zoitechat_hook *hook;
while (list)
{
@@ -571,10 +571,10 @@ plugin_hook_find (GSList *list, int type, char *name)
static int
plugin_hook_run (session *sess, char *name, char *word[], char *word_eol[],
hexchat_event_attrs *attrs, int type)
zoitechat_event_attrs *attrs, int type)
{
GSList *list, *next;
hexchat_hook *hook;
zoitechat_hook *hook;
int ret, eat = 0;
list = hook_list;
@@ -592,19 +592,19 @@ plugin_hook_run (session *sess, char *name, char *word[], char *word_eol[],
switch (hook->type)
{
case HOOK_COMMAND:
ret = ((hexchat_cmd_cb *)hook->callback) (word, word_eol, hook->userdata);
ret = ((zoitechat_cmd_cb *)hook->callback) (word, word_eol, hook->userdata);
break;
case HOOK_PRINT_ATTRS:
ret = ((hexchat_print_attrs_cb *)hook->callback) (word, attrs, hook->userdata);
ret = ((zoitechat_print_attrs_cb *)hook->callback) (word, attrs, hook->userdata);
break;
case HOOK_SERVER:
ret = ((hexchat_serv_cb *)hook->callback) (word, word_eol, hook->userdata);
ret = ((zoitechat_serv_cb *)hook->callback) (word, word_eol, hook->userdata);
break;
case HOOK_SERVER_ATTRS:
ret = ((hexchat_serv_attrs_cb *)hook->callback) (word, word_eol, attrs, hook->userdata);
ret = ((zoitechat_serv_attrs_cb *)hook->callback) (word, word_eol, attrs, hook->userdata);
break;
default: /*case HOOK_PRINT:*/
ret = ((hexchat_print_cb *)hook->callback) (word, hook->userdata);
ret = ((zoitechat_print_cb *)hook->callback) (word, hook->userdata);
break;
}
@@ -647,14 +647,14 @@ plugin_emit_command (session *sess, char *name, char *word[], char *word_eol[])
return plugin_hook_run (sess, name, word, word_eol, NULL, HOOK_COMMAND);
}
hexchat_event_attrs *
hexchat_event_attrs_create (hexchat_plugin *ph)
zoitechat_event_attrs *
zoitechat_event_attrs_create (zoitechat_plugin *ph)
{
return g_new0 (hexchat_event_attrs, 1);
return g_new0 (zoitechat_event_attrs, 1);
}
void
hexchat_event_attrs_free (hexchat_plugin *ph, hexchat_event_attrs *attrs)
zoitechat_event_attrs_free (zoitechat_plugin *ph, zoitechat_event_attrs *attrs)
{
g_free (attrs);
}
@@ -665,7 +665,7 @@ int
plugin_emit_server (session *sess, char *name, char *word[], char *word_eol[],
time_t server_time)
{
hexchat_event_attrs attrs;
zoitechat_event_attrs attrs;
attrs.server_time_utc = server_time;
@@ -678,7 +678,7 @@ plugin_emit_server (session *sess, char *name, char *word[], char *word_eol[],
int
plugin_emit_print (session *sess, char *word[], time_t server_time)
{
hexchat_event_attrs attrs;
zoitechat_event_attrs attrs;
attrs.server_time_utc = server_time;
@@ -733,7 +733,7 @@ plugin_emit_keypress (session *sess, unsigned int state, unsigned int keyval, gu
}
static int
plugin_timeout_cb (hexchat_hook *hook)
plugin_timeout_cb (zoitechat_hook *hook)
{
int ret;
@@ -741,7 +741,7 @@ plugin_timeout_cb (hexchat_hook *hook)
hook->pl->context = current_sess;
/* call the plugin's timeout function */
ret = ((hexchat_timer_cb *)hook->callback) (hook->userdata);
ret = ((zoitechat_timer_cb *)hook->callback) (hook->userdata);
/* the callback might have already unhooked it! */
if (!g_slist_find (hook_list, hook) || hook->type == HOOK_DELETED)
@@ -750,7 +750,7 @@ plugin_timeout_cb (hexchat_hook *hook)
if (ret == 0)
{
hook->tag = 0; /* avoid fe_timeout_remove, returning 0 is enough! */
hexchat_unhook (hook->pl, hook);
zoitechat_unhook (hook->pl, hook);
}
return ret;
@@ -759,10 +759,10 @@ plugin_timeout_cb (hexchat_hook *hook)
/* insert a hook into hook_list according to its priority */
static void
plugin_insert_hook (hexchat_hook *new_hook)
plugin_insert_hook (zoitechat_hook *new_hook)
{
GSList *list;
hexchat_hook *hook;
zoitechat_hook *hook;
int new_hook_type;
switch (new_hook->type)
@@ -795,10 +795,10 @@ plugin_insert_hook (hexchat_hook *new_hook)
}
static gboolean
plugin_fd_cb (GIOChannel *source, GIOCondition condition, hexchat_hook *hook)
plugin_fd_cb (GIOChannel *source, GIOCondition condition, zoitechat_hook *hook)
{
int flags = 0, ret;
typedef int (hexchat_fd_cb2) (int fd, int flags, void *user_data, GIOChannel *);
typedef int (zoitechat_fd_cb2) (int fd, int flags, void *user_data, GIOChannel *);
if (condition & G_IO_IN)
flags |= HEXCHAT_FD_READ;
@@ -807,7 +807,7 @@ plugin_fd_cb (GIOChannel *source, GIOCondition condition, hexchat_hook *hook)
if (condition & G_IO_PRI)
flags |= HEXCHAT_FD_EXCEPTION;
ret = ((hexchat_fd_cb2 *)hook->callback) (hook->pri, flags, hook->userdata, source);
ret = ((zoitechat_fd_cb2 *)hook->callback) (hook->pri, flags, hook->userdata, source);
/* the callback might have already unhooked it! */
if (!g_slist_find (hook_list, hook) || hook->type == HOOK_DELETED)
@@ -816,7 +816,7 @@ plugin_fd_cb (GIOChannel *source, GIOCondition condition, hexchat_hook *hook)
if (ret == 0)
{
hook->tag = 0; /* avoid fe_input_remove, returning 0 is enough! */
hexchat_unhook (hook->pl, hook);
zoitechat_unhook (hook->pl, hook);
}
return ret;
@@ -824,13 +824,13 @@ plugin_fd_cb (GIOChannel *source, GIOCondition condition, hexchat_hook *hook)
/* allocate and add a hook to our list. Used for all 4 types */
static hexchat_hook *
plugin_add_hook (hexchat_plugin *pl, int type, int pri, const char *name,
static zoitechat_hook *
plugin_add_hook (zoitechat_plugin *pl, int type, int pri, const char *name,
const char *help_text, void *callb, int timeout, void *userdata)
{
hexchat_hook *hook;
zoitechat_hook *hook;
hook = g_new0 (hexchat_hook, 1);
hook = g_new0 (zoitechat_hook, 1);
hook->type = type;
hook->pri = pri;
hook->name = g_strdup (name);
@@ -851,7 +851,7 @@ plugin_add_hook (hexchat_plugin *pl, int type, int pri, const char *name,
GList *
plugin_command_list(GList *tmp_list)
{
hexchat_hook *hook;
zoitechat_hook *hook;
GSList *list = hook_list;
while (list)
@@ -869,7 +869,7 @@ plugin_command_foreach (session *sess, void *userdata,
void (*cb) (session *sess, void *userdata, char *name, char *help))
{
GSList *list;
hexchat_hook *hook;
zoitechat_hook *hook;
list = hook_list;
while (list)
@@ -887,7 +887,7 @@ int
plugin_show_help (session *sess, char *cmd)
{
GSList *list;
hexchat_hook *hook;
zoitechat_hook *hook;
list = plugin_hook_find (hook_list, HOOK_COMMAND, cmd);
if (list)
@@ -969,7 +969,7 @@ plugin_find_context (const char *servname, const char *channel, server *current_
/* ========================================================= */
void *
hexchat_unhook (hexchat_plugin *ph, hexchat_hook *hook)
zoitechat_unhook (zoitechat_plugin *ph, zoitechat_hook *hook)
{
/* perl.c trips this */
if (!g_slist_find (hook_list, hook) || hook->type == HOOK_DELETED)
@@ -989,56 +989,56 @@ hexchat_unhook (hexchat_plugin *ph, hexchat_hook *hook)
return hook->userdata;
}
hexchat_hook *
hexchat_hook_command (hexchat_plugin *ph, const char *name, int pri,
hexchat_cmd_cb *callb, const char *help_text, void *userdata)
zoitechat_hook *
zoitechat_hook_command (zoitechat_plugin *ph, const char *name, int pri,
zoitechat_cmd_cb *callb, const char *help_text, void *userdata)
{
return plugin_add_hook (ph, HOOK_COMMAND, pri, name, help_text, callb, 0,
userdata);
}
hexchat_hook *
hexchat_hook_server (hexchat_plugin *ph, const char *name, int pri,
hexchat_serv_cb *callb, void *userdata)
zoitechat_hook *
zoitechat_hook_server (zoitechat_plugin *ph, const char *name, int pri,
zoitechat_serv_cb *callb, void *userdata)
{
return plugin_add_hook (ph, HOOK_SERVER, pri, name, 0, callb, 0, userdata);
}
hexchat_hook *
hexchat_hook_server_attrs (hexchat_plugin *ph, const char *name, int pri,
hexchat_serv_attrs_cb *callb, void *userdata)
zoitechat_hook *
zoitechat_hook_server_attrs (zoitechat_plugin *ph, const char *name, int pri,
zoitechat_serv_attrs_cb *callb, void *userdata)
{
return plugin_add_hook (ph, HOOK_SERVER_ATTRS, pri, name, 0, callb, 0,
userdata);
}
hexchat_hook *
hexchat_hook_print (hexchat_plugin *ph, const char *name, int pri,
hexchat_print_cb *callb, void *userdata)
zoitechat_hook *
zoitechat_hook_print (zoitechat_plugin *ph, const char *name, int pri,
zoitechat_print_cb *callb, void *userdata)
{
return plugin_add_hook (ph, HOOK_PRINT, pri, name, 0, callb, 0, userdata);
}
hexchat_hook *
hexchat_hook_print_attrs (hexchat_plugin *ph, const char *name, int pri,
hexchat_print_attrs_cb *callb, void *userdata)
zoitechat_hook *
zoitechat_hook_print_attrs (zoitechat_plugin *ph, const char *name, int pri,
zoitechat_print_attrs_cb *callb, void *userdata)
{
return plugin_add_hook (ph, HOOK_PRINT_ATTRS, pri, name, 0, callb, 0,
userdata);
}
hexchat_hook *
hexchat_hook_timer (hexchat_plugin *ph, int timeout, hexchat_timer_cb *callb,
zoitechat_hook *
zoitechat_hook_timer (zoitechat_plugin *ph, int timeout, zoitechat_timer_cb *callb,
void *userdata)
{
return plugin_add_hook (ph, HOOK_TIMER, 0, 0, 0, callb, timeout, userdata);
}
hexchat_hook *
hexchat_hook_fd (hexchat_plugin *ph, int fd, int flags,
hexchat_fd_cb *callb, void *userdata)
zoitechat_hook *
zoitechat_hook_fd (zoitechat_plugin *ph, int fd, int flags,
zoitechat_fd_cb *callb, void *userdata)
{
hexchat_hook *hook;
zoitechat_hook *hook;
hook = plugin_add_hook (ph, HOOK_FD, 0, 0, 0, callb, 0, userdata);
hook->pri = fd;
@@ -1049,11 +1049,11 @@ hexchat_hook_fd (hexchat_plugin *ph, int fd, int flags,
}
void
hexchat_print (hexchat_plugin *ph, const char *text)
zoitechat_print (zoitechat_plugin *ph, const char *text)
{
if (!is_session (ph->context))
{
DEBUG(PrintTextf(0, "%s\thexchat_print called without a valid context.\n", ph->name));
DEBUG(PrintTextf(0, "%s\tzoitechat_print called without a valid context.\n", ph->name));
return;
}
@@ -1061,7 +1061,7 @@ hexchat_print (hexchat_plugin *ph, const char *text)
}
void
hexchat_printf (hexchat_plugin *ph, const char *format, ...)
zoitechat_printf (zoitechat_plugin *ph, const char *format, ...)
{
va_list args;
char *buf;
@@ -1070,18 +1070,18 @@ hexchat_printf (hexchat_plugin *ph, const char *format, ...)
buf = g_strdup_vprintf (format, args);
va_end (args);
hexchat_print (ph, buf);
zoitechat_print (ph, buf);
g_free (buf);
}
void
hexchat_command (hexchat_plugin *ph, const char *command)
zoitechat_command (zoitechat_plugin *ph, const char *command)
{
char *command_utf8;
if (!is_session (ph->context))
{
DEBUG(PrintTextf(0, "%s\thexchat_command called without a valid context.\n", ph->name));
DEBUG(PrintTextf(0, "%s\tzoitechat_command called without a valid context.\n", ph->name));
return;
}
@@ -1092,7 +1092,7 @@ hexchat_command (hexchat_plugin *ph, const char *command)
}
void
hexchat_commandf (hexchat_plugin *ph, const char *format, ...)
zoitechat_commandf (zoitechat_plugin *ph, const char *format, ...)
{
va_list args;
char *buf;
@@ -1101,24 +1101,24 @@ hexchat_commandf (hexchat_plugin *ph, const char *format, ...)
buf = g_strdup_vprintf (format, args);
va_end (args);
hexchat_command (ph, buf);
zoitechat_command (ph, buf);
g_free (buf);
}
int
hexchat_nickcmp (hexchat_plugin *ph, const char *s1, const char *s2)
zoitechat_nickcmp (zoitechat_plugin *ph, const char *s1, const char *s2)
{
return ((session *)ph->context)->server->p_cmp (s1, s2);
}
hexchat_context *
hexchat_get_context (hexchat_plugin *ph)
zoitechat_context *
zoitechat_get_context (zoitechat_plugin *ph)
{
return ph->context;
}
int
hexchat_set_context (hexchat_plugin *ph, hexchat_context *context)
zoitechat_set_context (zoitechat_plugin *ph, zoitechat_context *context)
{
if (is_session (context))
{
@@ -1128,14 +1128,14 @@ hexchat_set_context (hexchat_plugin *ph, hexchat_context *context)
return 0;
}
hexchat_context *
hexchat_find_context (hexchat_plugin *ph, const char *servname, const char *channel)
zoitechat_context *
zoitechat_find_context (zoitechat_plugin *ph, const char *servname, const char *channel)
{
return plugin_find_context (servname, channel, ph->context->server);
}
const char *
hexchat_get_info (hexchat_plugin *ph, const char *id)
zoitechat_get_info (zoitechat_plugin *ph, const char *id)
{
session *sess;
guint32 hash;
@@ -1171,7 +1171,7 @@ hexchat_get_info (hexchat_plugin *ph, const char *id)
sess = ph->context;
if (!is_session (sess))
{
DEBUG(PrintTextf(0, "%s\thexchat_get_info called without a valid context.\n", ph->name));
DEBUG(PrintTextf(0, "%s\tzoitechat_get_info called without a valid context.\n", ph->name));
return NULL;
}
@@ -1246,7 +1246,7 @@ hexchat_get_info (hexchat_plugin *ph, const char *id)
}
int
hexchat_get_prefs (hexchat_plugin *ph, const char *name, const char **string, int *integer)
zoitechat_get_prefs (zoitechat_plugin *ph, const char *name, const char **string, int *integer)
{
int i = 0;
@@ -1292,12 +1292,12 @@ hexchat_get_prefs (hexchat_plugin *ph, const char *name, const char **string, in
return 0;
}
hexchat_list *
hexchat_list_get (hexchat_plugin *ph, const char *name)
zoitechat_list *
zoitechat_list_get (zoitechat_plugin *ph, const char *name)
{
hexchat_list *list;
zoitechat_list *list;
list = g_new0 (hexchat_list, 1);
list = g_new0 (zoitechat_list, 1);
switch (str_hash (name))
{
@@ -1340,7 +1340,7 @@ hexchat_list_get (hexchat_plugin *ph, const char *name)
}
void
hexchat_list_free (hexchat_plugin *ph, hexchat_list *xlist)
zoitechat_list_free (zoitechat_plugin *ph, zoitechat_list *xlist)
{
if (xlist->type == LIST_USERS)
g_slist_free (xlist->head);
@@ -1348,7 +1348,7 @@ hexchat_list_free (hexchat_plugin *ph, hexchat_list *xlist)
}
int
hexchat_list_next (hexchat_plugin *ph, hexchat_list *xlist)
zoitechat_list_next (zoitechat_plugin *ph, zoitechat_list *xlist)
{
if (xlist->next == NULL)
return 0;
@@ -1370,7 +1370,7 @@ hexchat_list_next (hexchat_plugin *ph, hexchat_list *xlist)
}
const char * const *
hexchat_list_fields (hexchat_plugin *ph, const char *name)
zoitechat_list_fields (zoitechat_plugin *ph, const char *name)
{
static const char * const dcc_fields[] =
{
@@ -1420,7 +1420,7 @@ hexchat_list_fields (hexchat_plugin *ph, const char *name)
}
time_t
hexchat_list_time (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
zoitechat_list_time (zoitechat_plugin *ph, zoitechat_list *xlist, const char *name)
{
guint32 hash = str_hash (name);
gpointer data;
@@ -1454,7 +1454,7 @@ hexchat_list_time (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
}
const char *
hexchat_list_str (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
zoitechat_list_str (zoitechat_plugin *ph, zoitechat_list *xlist, const char *name)
{
guint32 hash = str_hash (name);
gpointer data = ph->context;
@@ -1544,7 +1544,7 @@ hexchat_list_str (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
}
int
hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
zoitechat_list_int (zoitechat_plugin *ph, zoitechat_list *xlist, const char *name)
{
guint32 hash = str_hash (name);
gpointer data = ph->context;
@@ -1683,7 +1683,7 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
}
void *
hexchat_plugingui_add (hexchat_plugin *ph, const char *filename,
zoitechat_plugingui_add (zoitechat_plugin *ph, const char *filename,
const char *name, const char *desc,
const char *version, char *reserved)
{
@@ -1697,7 +1697,7 @@ hexchat_plugingui_add (hexchat_plugin *ph, const char *filename,
}
void
hexchat_plugingui_remove (hexchat_plugin *ph, void *handle)
zoitechat_plugingui_remove (zoitechat_plugin *ph, void *handle)
{
#ifdef USE_PLUGIN
plugin_free (handle, FALSE, FALSE);
@@ -1705,7 +1705,7 @@ hexchat_plugingui_remove (hexchat_plugin *ph, void *handle)
}
int
hexchat_emit_print (hexchat_plugin *ph, const char *event_name, ...)
zoitechat_emit_print (zoitechat_plugin *ph, const char *event_name, ...)
{
va_list args;
/* currently only 4 because no events use more than 4.
@@ -1732,7 +1732,7 @@ hexchat_emit_print (hexchat_plugin *ph, const char *event_name, ...)
}
int
hexchat_emit_print_attrs (hexchat_plugin *ph, hexchat_event_attrs *attrs,
zoitechat_emit_print_attrs (zoitechat_plugin *ph, zoitechat_event_attrs *attrs,
const char *event_name, ...)
{
va_list args;
@@ -1760,15 +1760,15 @@ hexchat_emit_print_attrs (hexchat_plugin *ph, hexchat_event_attrs *attrs,
}
char *
hexchat_gettext (hexchat_plugin *ph, const char *msgid)
zoitechat_gettext (zoitechat_plugin *ph, const char *msgid)
{
/* so that plugins can use HexChat's internal gettext strings. */
/* so that plugins can use ZoiteChat's internal gettext strings. */
/* e.g. The EXEC plugin uses this on Windows. */
return _(msgid);
}
void
hexchat_send_modes (hexchat_plugin *ph, const char **targets, int ntargets, int modes_per_line, char sign, char mode)
zoitechat_send_modes (zoitechat_plugin *ph, const char **targets, int ntargets, int modes_per_line, char sign, char mode)
{
char tbuf[514]; /* modes.c needs 512 + null */
@@ -1776,19 +1776,19 @@ hexchat_send_modes (hexchat_plugin *ph, const char **targets, int ntargets, int
}
char *
hexchat_strip (hexchat_plugin *ph, const char *str, int len, int flags)
zoitechat_strip (zoitechat_plugin *ph, const char *str, int len, int flags)
{
return strip_color ((char *)str, len, flags);
}
void
hexchat_free (hexchat_plugin *ph, void *ptr)
zoitechat_free (zoitechat_plugin *ph, void *ptr)
{
g_free (ptr);
}
static int
hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char *value, int mode) /* mode: 0 = delete, 1 = save */
zoitechat_pluginpref_set_str_real (zoitechat_plugin *pl, const char *var, const char *value, int mode) /* mode: 0 = delete, 1 = save */
{
FILE *fpIn;
int fhOut;
@@ -1808,8 +1808,8 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char
g_free (canon);
confname_tmp = g_strdup_printf ("%s.new", confname);
fhOut = hexchat_open_file (confname_tmp, O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
fpIn = hexchat_fopen_file (confname, "r", 0);
fhOut = zoitechat_open_file (confname_tmp, O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
fpIn = zoitechat_fopen_file (confname, "r", 0);
if (fhOut == -1) /* unable to save, abort */
{
@@ -1933,13 +1933,13 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char
}
int
hexchat_pluginpref_set_str (hexchat_plugin *pl, const char *var, const char *value)
zoitechat_pluginpref_set_str (zoitechat_plugin *pl, const char *var, const char *value)
{
return hexchat_pluginpref_set_str_real (pl, var, value, 1);
return zoitechat_pluginpref_set_str_real (pl, var, value, 1);
}
static int
hexchat_pluginpref_get_str_real (hexchat_plugin *pl, const char *var, char *dest, int dest_len)
zoitechat_pluginpref_get_str_real (zoitechat_plugin *pl, const char *var, char *dest, int dest_len)
{
char *confname, *canon, *cfg, *unescaped_value;
char buf[512];
@@ -1971,27 +1971,27 @@ hexchat_pluginpref_get_str_real (hexchat_plugin *pl, const char *var, char *dest
}
int
hexchat_pluginpref_get_str (hexchat_plugin *pl, const char *var, char *dest)
zoitechat_pluginpref_get_str (zoitechat_plugin *pl, const char *var, char *dest)
{
/* All users of this must ensure dest is >= 512... */
return hexchat_pluginpref_get_str_real (pl, var, dest, 512);
return zoitechat_pluginpref_get_str_real (pl, var, dest, 512);
}
int
hexchat_pluginpref_set_int (hexchat_plugin *pl, const char *var, int value)
zoitechat_pluginpref_set_int (zoitechat_plugin *pl, const char *var, int value)
{
char buffer[12];
g_snprintf (buffer, sizeof (buffer), "%d", value);
return hexchat_pluginpref_set_str_real (pl, var, buffer, 1);
return zoitechat_pluginpref_set_str_real (pl, var, buffer, 1);
}
int
hexchat_pluginpref_get_int (hexchat_plugin *pl, const char *var)
zoitechat_pluginpref_get_int (zoitechat_plugin *pl, const char *var)
{
char buffer[12];
if (hexchat_pluginpref_get_str_real (pl, var, buffer, sizeof(buffer)))
if (zoitechat_pluginpref_get_str_real (pl, var, buffer, sizeof(buffer)))
{
int ret = atoi (buffer);
@@ -2008,13 +2008,13 @@ hexchat_pluginpref_get_int (hexchat_plugin *pl, const char *var)
}
int
hexchat_pluginpref_delete (hexchat_plugin *pl, const char *var)
zoitechat_pluginpref_delete (zoitechat_plugin *pl, const char *var)
{
return hexchat_pluginpref_set_str_real (pl, var, 0, 0);
return zoitechat_pluginpref_set_str_real (pl, var, 0, 0);
}
int
hexchat_pluginpref_list (hexchat_plugin *pl, char* dest)
zoitechat_pluginpref_list (zoitechat_plugin *pl, char* dest)
{
FILE *fpIn;
char confname[64];
@@ -2027,7 +2027,7 @@ hexchat_pluginpref_list (hexchat_plugin *pl, char* dest)
sprintf (confname, "addon_%s.conf", token);
g_free (token);
fpIn = hexchat_fopen_file (confname, "r", 0);
fpIn = zoitechat_fopen_file (confname, "r", 0);
if (fpIn == NULL) /* no existing config file, no parsing */
{

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -21,134 +21,134 @@
#define HEXCHAT_COMMONPLUGIN_H
#ifdef PLUGIN_C
struct _hexchat_plugin
struct _zoitechat_plugin
{
/* Keep these in sync with hexchat-plugin.h */
/* Keep these in sync with zoitechat-plugin.h */
/* !!don't change the order, to keep binary compat!! */
hexchat_hook *(*hexchat_hook_command) (hexchat_plugin *ph,
zoitechat_hook *(*zoitechat_hook_command) (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
const char *help_text,
void *userdata);
hexchat_hook *(*hexchat_hook_server) (hexchat_plugin *ph,
zoitechat_hook *(*zoitechat_hook_server) (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_print) (hexchat_plugin *ph,
zoitechat_hook *(*zoitechat_hook_print) (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_timer) (hexchat_plugin *ph,
zoitechat_hook *(*zoitechat_hook_timer) (zoitechat_plugin *ph,
int timeout,
int (*callback) (void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_fd) (hexchat_plugin *ph,
zoitechat_hook *(*zoitechat_hook_fd) (zoitechat_plugin *ph,
int fd,
int flags,
int (*callback) (int fd, int flags, void *user_data),
void *userdata);
void *(*hexchat_unhook) (hexchat_plugin *ph,
hexchat_hook *hook);
void (*hexchat_print) (hexchat_plugin *ph,
void *(*zoitechat_unhook) (zoitechat_plugin *ph,
zoitechat_hook *hook);
void (*zoitechat_print) (zoitechat_plugin *ph,
const char *text);
void (*hexchat_printf) (hexchat_plugin *ph,
void (*zoitechat_printf) (zoitechat_plugin *ph,
const char *format, ...);
void (*hexchat_command) (hexchat_plugin *ph,
void (*zoitechat_command) (zoitechat_plugin *ph,
const char *command);
void (*hexchat_commandf) (hexchat_plugin *ph,
void (*zoitechat_commandf) (zoitechat_plugin *ph,
const char *format, ...);
int (*hexchat_nickcmp) (hexchat_plugin *ph,
int (*zoitechat_nickcmp) (zoitechat_plugin *ph,
const char *s1,
const char *s2);
int (*hexchat_set_context) (hexchat_plugin *ph,
hexchat_context *ctx);
hexchat_context *(*hexchat_find_context) (hexchat_plugin *ph,
int (*zoitechat_set_context) (zoitechat_plugin *ph,
zoitechat_context *ctx);
zoitechat_context *(*zoitechat_find_context) (zoitechat_plugin *ph,
const char *servname,
const char *channel);
hexchat_context *(*hexchat_get_context) (hexchat_plugin *ph);
const char *(*hexchat_get_info) (hexchat_plugin *ph,
zoitechat_context *(*zoitechat_get_context) (zoitechat_plugin *ph);
const char *(*zoitechat_get_info) (zoitechat_plugin *ph,
const char *id);
int (*hexchat_get_prefs) (hexchat_plugin *ph,
int (*zoitechat_get_prefs) (zoitechat_plugin *ph,
const char *name,
const char **string,
int *integer);
hexchat_list * (*hexchat_list_get) (hexchat_plugin *ph,
zoitechat_list * (*zoitechat_list_get) (zoitechat_plugin *ph,
const char *name);
void (*hexchat_list_free) (hexchat_plugin *ph,
hexchat_list *xlist);
const char * const * (*hexchat_list_fields) (hexchat_plugin *ph,
void (*zoitechat_list_free) (zoitechat_plugin *ph,
zoitechat_list *xlist);
const char * const * (*zoitechat_list_fields) (zoitechat_plugin *ph,
const char *name);
int (*hexchat_list_next) (hexchat_plugin *ph,
hexchat_list *xlist);
const char * (*hexchat_list_str) (hexchat_plugin *ph,
hexchat_list *xlist,
int (*zoitechat_list_next) (zoitechat_plugin *ph,
zoitechat_list *xlist);
const char * (*zoitechat_list_str) (zoitechat_plugin *ph,
zoitechat_list *xlist,
const char *name);
int (*hexchat_list_int) (hexchat_plugin *ph,
hexchat_list *xlist,
int (*zoitechat_list_int) (zoitechat_plugin *ph,
zoitechat_list *xlist,
const char *name);
void * (*hexchat_plugingui_add) (hexchat_plugin *ph,
void * (*zoitechat_plugingui_add) (zoitechat_plugin *ph,
const char *filename,
const char *name,
const char *desc,
const char *version,
char *reserved);
void (*hexchat_plugingui_remove) (hexchat_plugin *ph,
void (*zoitechat_plugingui_remove) (zoitechat_plugin *ph,
void *handle);
int (*hexchat_emit_print) (hexchat_plugin *ph,
int (*zoitechat_emit_print) (zoitechat_plugin *ph,
const char *event_name, ...);
void *(*hexchat_read_fd) (hexchat_plugin *ph);
time_t (*hexchat_list_time) (hexchat_plugin *ph,
hexchat_list *xlist,
void *(*zoitechat_read_fd) (zoitechat_plugin *ph);
time_t (*zoitechat_list_time) (zoitechat_plugin *ph,
zoitechat_list *xlist,
const char *name);
char *(*hexchat_gettext) (hexchat_plugin *ph,
char *(*zoitechat_gettext) (zoitechat_plugin *ph,
const char *msgid);
void (*hexchat_send_modes) (hexchat_plugin *ph,
void (*zoitechat_send_modes) (zoitechat_plugin *ph,
const char **targets,
int ntargets,
int modes_per_line,
char sign,
char mode);
char *(*hexchat_strip) (hexchat_plugin *ph,
char *(*zoitechat_strip) (zoitechat_plugin *ph,
const char *str,
int len,
int flags);
void (*hexchat_free) (hexchat_plugin *ph,
void (*zoitechat_free) (zoitechat_plugin *ph,
void *ptr);
int (*hexchat_pluginpref_set_str) (hexchat_plugin *ph,
int (*zoitechat_pluginpref_set_str) (zoitechat_plugin *ph,
const char *var,
const char *value);
int (*hexchat_pluginpref_get_str) (hexchat_plugin *ph,
int (*zoitechat_pluginpref_get_str) (zoitechat_plugin *ph,
const char *var,
char *dest);
int (*hexchat_pluginpref_set_int) (hexchat_plugin *ph,
int (*zoitechat_pluginpref_set_int) (zoitechat_plugin *ph,
const char *var,
int value);
int (*hexchat_pluginpref_get_int) (hexchat_plugin *ph,
int (*zoitechat_pluginpref_get_int) (zoitechat_plugin *ph,
const char *var);
int (*hexchat_pluginpref_delete) (hexchat_plugin *ph,
int (*zoitechat_pluginpref_delete) (zoitechat_plugin *ph,
const char *var);
int (*hexchat_pluginpref_list) (hexchat_plugin *ph,
int (*zoitechat_pluginpref_list) (zoitechat_plugin *ph,
char *dest);
hexchat_hook *(*hexchat_hook_server_attrs) (hexchat_plugin *ph,
zoitechat_hook *(*zoitechat_hook_server_attrs) (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[],
hexchat_event_attrs *attrs, void *user_data),
zoitechat_event_attrs *attrs, void *user_data),
void *userdata);
hexchat_hook *(*hexchat_hook_print_attrs) (hexchat_plugin *ph,
zoitechat_hook *(*zoitechat_hook_print_attrs) (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], hexchat_event_attrs *attrs,
int (*callback) (char *word[], zoitechat_event_attrs *attrs,
void *user_data),
void *userdata);
int (*hexchat_emit_print_attrs) (hexchat_plugin *ph, hexchat_event_attrs *attrs,
int (*zoitechat_emit_print_attrs) (zoitechat_plugin *ph, zoitechat_event_attrs *attrs,
const char *event_name, ...);
hexchat_event_attrs *(*hexchat_event_attrs_create) (hexchat_plugin *ph);
void (*hexchat_event_attrs_free) (hexchat_plugin *ph,
hexchat_event_attrs *attrs);
zoitechat_event_attrs *(*zoitechat_event_attrs_create) (zoitechat_plugin *ph);
void (*zoitechat_event_attrs_free) (zoitechat_plugin *ph,
zoitechat_event_attrs *attrs);
/* PRIVATE FIELDS! */
void *handle; /* from dlopen */
@@ -157,8 +157,8 @@ struct _hexchat_plugin
char *desc;
char *version;
session *context;
void *deinit_callback; /* pointer to hexchat_plugin_deinit */
unsigned int fake:1; /* fake plugin. Added by hexchat_plugingui_add() */
void *deinit_callback; /* pointer to zoitechat_plugin_deinit */
unsigned int fake:1; /* fake plugin. Added by zoitechat_plugingui_add() */
unsigned int free_strings:1; /* free name,desc,version? */
};
#endif

View File

@@ -28,7 +28,7 @@
#include <unistd.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "proto-irc.h"
#include "ctcp.h"
#include "fe.h"
@@ -41,7 +41,7 @@
#include "text.h"
#include "outbound.h"
#include "util.h"
#include "hexchatc.h"
#include "zoitechatc.h"
#include "url.h"
#include "servlist.h"
@@ -1622,7 +1622,7 @@ irc_inline (server *serv, char *buf, int len)
goto xit;
word[1]++;
word_eol[1] = buf + 1; /* but not for HexChat internally */
word_eol[1] = buf + 1; /* but not for ZoiteChat internally */
} else
{

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -18,7 +18,7 @@
*/
#include <time.h>
#include "hexchat.h"
#include "zoitechat.h"
#ifndef HEXCHAT_PROTO_H
#define HEXCHAT_PROTO_H

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 2023 Patrick Okraku
*
* This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "hexchat.h"
#include "zoitechat.h"
#ifdef USE_OPENSSL

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 2023 Patrick Okraku
*
* This program is free software; you can redistribute it and/or modify

View File

@@ -40,12 +40,12 @@
#include <unistd.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "fe.h"
#include "cfgfiles.h"
#include "network.h"
#include "notify.h"
#include "hexchatc.h"
#include "zoitechatc.h"
#include "inbound.h"
#include "outbound.h"
#include "text.h"

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -26,13 +26,13 @@
#include <unistd.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "cfgfiles.h"
#include "fe.h"
#include "server.h"
#include "text.h"
#include "util.h" /* token_foreach */
#include "hexchatc.h"
#include "zoitechatc.h"
#include "servlist.h"
@@ -984,7 +984,7 @@ servlist_load (void)
g_free (oldfile);
g_free (newfile);
fp = hexchat_fopen_file ("servlist.conf", "r", 0);
fp = zoitechat_fopen_file ("servlist.conf", "r", 0);
if (!fp)
return FALSE;
@@ -1127,7 +1127,7 @@ servlist_save (void)
first = TRUE;
#endif
fp = hexchat_fopen_file ("servlist.conf", "w", 0);
fp = zoitechat_fopen_file ("servlist.conf", "w", 0);
if (!fp)
{
#ifndef WIN32

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

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

@@ -32,7 +32,7 @@
#include <sys/mman.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "cfgfiles.h"
#include "chanopt.h"
#include "plugin.h"
@@ -40,7 +40,7 @@
#include "server.h"
#include "util.h"
#include "outbound.h"
#include "hexchatc.h"
#include "zoitechatc.h"
#include "text.h"
#include "typedef.h"
#ifdef WIN32
@@ -771,7 +771,7 @@ text_convert_invalid (const gchar* text, gssize len, GIConv converter, const gch
* But iconv may not convert everything till invalid_start_pos since the last few bytes may be part of a shift sequence.
* So get the new bytes_read and use it as the actual invalid_start_pos to handle this.
*
* See https://github.com/hexchat/hexchat/issues/1758
* See https://github.com/zoitechat/zoitechat/issues/1758
*/
result_part = g_convert_with_iconv (current_start, invalid_start_pos, converter, &invalid_start_pos, &result_part_len, NULL);
g_iconv (converter, NULL, NULL, NULL, NULL);
@@ -1565,7 +1565,7 @@ pevent_make_pntevts (void)
if (pevt_build_string (pntevts_text[i], &(pntevts[i]), &m) != 0 && !translate)
{
g_error ("HexChat CRITICAL *** default event text failed to build!");
g_error ("ZoiteChat CRITICAL *** default event text failed to build!");
}
else
{
@@ -1576,7 +1576,7 @@ pevent_make_pntevts (void)
if (pevt_build_string (pntevts_text[i], &(pntevts[i]), &m) != 0)
{
g_error ("HexChat CRITICAL *** default event text failed to build!");
g_error ("ZoiteChat CRITICAL *** default event text failed to build!");
}
}
}
@@ -1646,9 +1646,9 @@ pevent_load (char *filename)
char *ofs;
if (filename == NULL)
fd = hexchat_open_file ("pevents.conf", O_RDONLY, 0, 0);
fd = zoitechat_open_file ("pevents.conf", O_RDONLY, 0, 0);
else
fd = hexchat_open_file (filename, O_RDONLY, 0, XOF_FULLPATH);
fd = zoitechat_open_file (filename, O_RDONLY, 0, XOF_FULLPATH);
if (fd == -1)
return 1;
@@ -1705,7 +1705,7 @@ pevent_check_all_loaded (void)
if (pntevts_text[i] == NULL)
{
/*printf ("%s\n", te[i].name);
g_snprintf(out, sizeof(out), "The data for event %s failed to load. Reverting to defaults.\nThis may be because a new version of HexChat is loading an old config file.\n\nCheck all print event texts are correct", evtnames[i]);
g_snprintf(out, sizeof(out), "The data for event %s failed to load. Reverting to defaults.\nThis may be because a new version of ZoiteChat is loading an old config file.\n\nCheck all print event texts are correct", evtnames[i]);
gtkutil_simpledialog(out); */
/* make-te.c sets this 128 flag (DON'T call gettext() flag) */
if (te[i].num_args & 128)
@@ -1774,7 +1774,7 @@ format_event (session *sess, int index, char **args, char *o, gsize sizeofo, uns
if (a > numargs)
{
fprintf (stderr,
"HexChat DEBUG: display_event: arg > numargs (%d %d %s)\n",
"ZoiteChat DEBUG: display_event: arg > numargs (%d %d %s)\n",
a, numargs, i);
break;
}
@@ -2167,10 +2167,10 @@ pevent_save (char *fn)
char buf[1024];
if (!fn)
fd = hexchat_open_file ("pevents.conf", O_CREAT | O_TRUNC | O_WRONLY,
fd = zoitechat_open_file ("pevents.conf", O_CREAT | O_TRUNC | O_WRONLY,
0x180, XOF_DOMODE);
else
fd = hexchat_open_file (fn, O_CREAT | O_TRUNC | O_WRONLY, 0x180,
fd = zoitechat_open_file (fn, O_CREAT | O_TRUNC | O_WRONLY, 0x180,
XOF_FULLPATH | XOF_DOMODE);
if (fd == -1)
{
@@ -2257,9 +2257,9 @@ sound_play (const char *file, gboolean quiet)
{
ca_context_create (&ca_con);
ca_context_change_props (ca_con,
CA_PROP_APPLICATION_ID, "hexchat",
CA_PROP_APPLICATION_NAME, "HexChat",
CA_PROP_APPLICATION_ICON_NAME, "hexchat", NULL);
CA_PROP_APPLICATION_ID, "zoitechat",
CA_PROP_APPLICATION_NAME, "ZoiteChat",
CA_PROP_APPLICATION_ICON_NAME, "zoitechat", NULL);
}
if (ca_context_play (ca_con, 0, CA_PROP_MEDIA_FILENAME, wavfile, NULL) != 0)
@@ -2270,7 +2270,7 @@ sound_play (const char *file, gboolean quiet)
if (cmd)
{
buf = g_strdup_printf ("%s \"%s\"", cmd, wavfile);
hexchat_exec (buf);
zoitechat_exec (buf);
g_free (buf);
g_free (cmd);
}
@@ -2320,7 +2320,7 @@ sound_load ()
memset (&sound_files, 0, sizeof (char *) * (NUM_XP));
fd = hexchat_open_file ("sound.conf", O_RDONLY, 0, 0);
fd = zoitechat_open_file ("sound.conf", O_RDONLY, 0, 0);
if (fd == -1)
return;
@@ -2350,7 +2350,7 @@ sound_save ()
int fd, i;
char buf[512];
fd = hexchat_open_file ("sound.conf", O_CREAT | O_TRUNC | O_WRONLY, 0x180,
fd = zoitechat_open_file ("sound.conf", O_CREAT | O_TRUNC | O_WRONLY, 0x180,
XOF_DOMODE);
if (fd == -1)
return;

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -20,8 +20,8 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "hexchat.h"
#include "hexchatc.h"
#include "zoitechat.h"
#include "zoitechatc.h"
#include "cfgfiles.h"
#include "fe.h"
#include "tree.h"
@@ -80,9 +80,9 @@ url_save_tree (const char *fname, const char *mode, gboolean fullpath)
FILE *fd;
if (fullpath)
fd = hexchat_fopen_file (fname, mode, XOF_FULLPATH);
fd = zoitechat_fopen_file (fname, mode, XOF_FULLPATH);
else
fd = hexchat_fopen_file (fname, mode, 0);
fd = zoitechat_fopen_file (fname, mode, 0);
if (fd == NULL)
return;
@@ -96,7 +96,7 @@ url_save_node (char* url)
FILE *fd;
/* open <config>/url.log in append mode */
fd = hexchat_fopen_file ("url.log", "a", 0);
fd = zoitechat_fopen_file ("url.log", "a", 0);
if (fd == NULL)
{
return;
@@ -166,7 +166,7 @@ url_add (char *urltext, int len)
if (prefs.hex_url_grabber_limit > 0 && size >= prefs.hex_url_grabber_limit)
{
/* the loop is necessary to handle having the limit lowered while
HexChat is running */
ZoiteChat is running */
size -= prefs.hex_url_grabber_limit;
for(; size > 0; size--)
{

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -20,12 +20,12 @@
#include <stdlib.h>
#include <string.h>
#include "hexchat.h"
#include "zoitechat.h"
#include "modes.h"
#include "fe.h"
#include "notify.h"
#include "tree.h"
#include "hexchatc.h"
#include "zoitechatc.h"
#include "util.h"

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -43,8 +43,8 @@
#include "config.h"
#include <fcntl.h>
#include <errno.h>
#include "hexchat.h"
#include "hexchatc.h"
#include "zoitechat.h"
#include "zoitechatc.h"
#include <ctype.h>
#include "util.h"

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -0,0 +1,459 @@
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* You can distribute this header with your plugins for easy compilation */
#ifndef HEXCHAT_PLUGIN_H
#define HEXCHAT_PLUGIN_H
#include <time.h>
#define HEXCHAT_PRI_HIGHEST 127
#define HEXCHAT_PRI_HIGH 64
#define HEXCHAT_PRI_NORM 0
#define HEXCHAT_PRI_LOW (-64)
#define HEXCHAT_PRI_LOWEST (-128)
#define HEXCHAT_FD_READ 1
#define HEXCHAT_FD_WRITE 2
#define HEXCHAT_FD_EXCEPTION 4
#define HEXCHAT_FD_NOTSOCKET 8
#define HEXCHAT_EAT_NONE 0 /* pass it on through! */
#define HEXCHAT_EAT_HEXCHAT 1 /* don't let ZoiteChat see this event */
#define HEXCHAT_EAT_PLUGIN 2 /* don't let other plugins see this event */
#define HEXCHAT_EAT_ALL (HEXCHAT_EAT_HEXCHAT|HEXCHAT_EAT_PLUGIN) /* don't let anything see this event */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _zoitechat_plugin zoitechat_plugin;
typedef struct _zoitechat_list zoitechat_list;
typedef struct _zoitechat_hook zoitechat_hook;
#ifndef PLUGIN_C
typedef struct _zoitechat_context zoitechat_context;
#endif
typedef struct
{
time_t server_time_utc; /* 0 if not used */
} zoitechat_event_attrs;
#ifndef PLUGIN_C
struct _zoitechat_plugin
{
/* these are only used on win32 */
zoitechat_hook *(*zoitechat_hook_command) (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
const char *help_text,
void *userdata);
zoitechat_hook *(*zoitechat_hook_server) (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
void *userdata);
zoitechat_hook *(*zoitechat_hook_print) (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], void *user_data),
void *userdata);
zoitechat_hook *(*zoitechat_hook_timer) (zoitechat_plugin *ph,
int timeout,
int (*callback) (void *user_data),
void *userdata);
zoitechat_hook *(*zoitechat_hook_fd) (zoitechat_plugin *ph,
int fd,
int flags,
int (*callback) (int fd, int flags, void *user_data),
void *userdata);
void *(*zoitechat_unhook) (zoitechat_plugin *ph,
zoitechat_hook *hook);
void (*zoitechat_print) (zoitechat_plugin *ph,
const char *text);
void (*zoitechat_printf) (zoitechat_plugin *ph,
const char *format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 2, 3)))
#endif
;
void (*zoitechat_command) (zoitechat_plugin *ph,
const char *command);
void (*zoitechat_commandf) (zoitechat_plugin *ph,
const char *format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 2, 3)))
#endif
;
int (*zoitechat_nickcmp) (zoitechat_plugin *ph,
const char *s1,
const char *s2);
int (*zoitechat_set_context) (zoitechat_plugin *ph,
zoitechat_context *ctx);
zoitechat_context *(*zoitechat_find_context) (zoitechat_plugin *ph,
const char *servname,
const char *channel);
zoitechat_context *(*zoitechat_get_context) (zoitechat_plugin *ph);
const char *(*zoitechat_get_info) (zoitechat_plugin *ph,
const char *id);
int (*zoitechat_get_prefs) (zoitechat_plugin *ph,
const char *name,
const char **string,
int *integer);
zoitechat_list * (*zoitechat_list_get) (zoitechat_plugin *ph,
const char *name);
void (*zoitechat_list_free) (zoitechat_plugin *ph,
zoitechat_list *xlist);
const char * const * (*zoitechat_list_fields) (zoitechat_plugin *ph,
const char *name);
int (*zoitechat_list_next) (zoitechat_plugin *ph,
zoitechat_list *xlist);
const char * (*zoitechat_list_str) (zoitechat_plugin *ph,
zoitechat_list *xlist,
const char *name);
int (*zoitechat_list_int) (zoitechat_plugin *ph,
zoitechat_list *xlist,
const char *name);
void * (*zoitechat_plugingui_add) (zoitechat_plugin *ph,
const char *filename,
const char *name,
const char *desc,
const char *version,
char *reserved);
void (*zoitechat_plugingui_remove) (zoitechat_plugin *ph,
void *handle);
int (*zoitechat_emit_print) (zoitechat_plugin *ph,
const char *event_name, ...);
int (*zoitechat_read_fd) (zoitechat_plugin *ph,
void *src,
char *buf,
int *len);
time_t (*zoitechat_list_time) (zoitechat_plugin *ph,
zoitechat_list *xlist,
const char *name);
char *(*zoitechat_gettext) (zoitechat_plugin *ph,
const char *msgid);
void (*zoitechat_send_modes) (zoitechat_plugin *ph,
const char **targets,
int ntargets,
int modes_per_line,
char sign,
char mode);
char *(*zoitechat_strip) (zoitechat_plugin *ph,
const char *str,
int len,
int flags);
void (*zoitechat_free) (zoitechat_plugin *ph,
void *ptr);
int (*zoitechat_pluginpref_set_str) (zoitechat_plugin *ph,
const char *var,
const char *value);
int (*zoitechat_pluginpref_get_str) (zoitechat_plugin *ph,
const char *var,
char *dest);
int (*zoitechat_pluginpref_set_int) (zoitechat_plugin *ph,
const char *var,
int value);
int (*zoitechat_pluginpref_get_int) (zoitechat_plugin *ph,
const char *var);
int (*zoitechat_pluginpref_delete) (zoitechat_plugin *ph,
const char *var);
int (*zoitechat_pluginpref_list) (zoitechat_plugin *ph,
char *dest);
zoitechat_hook *(*zoitechat_hook_server_attrs) (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[],
zoitechat_event_attrs *attrs, void *user_data),
void *userdata);
zoitechat_hook *(*zoitechat_hook_print_attrs) (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], zoitechat_event_attrs *attrs,
void *user_data),
void *userdata);
int (*zoitechat_emit_print_attrs) (zoitechat_plugin *ph, zoitechat_event_attrs *attrs,
const char *event_name, ...);
zoitechat_event_attrs *(*zoitechat_event_attrs_create) (zoitechat_plugin *ph);
void (*zoitechat_event_attrs_free) (zoitechat_plugin *ph,
zoitechat_event_attrs *attrs);
};
#endif
zoitechat_hook *
zoitechat_hook_command (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
const char *help_text,
void *userdata);
zoitechat_event_attrs *zoitechat_event_attrs_create (zoitechat_plugin *ph);
void zoitechat_event_attrs_free (zoitechat_plugin *ph, zoitechat_event_attrs *attrs);
zoitechat_hook *
zoitechat_hook_server (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[], void *user_data),
void *userdata);
zoitechat_hook *
zoitechat_hook_server_attrs (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], char *word_eol[],
zoitechat_event_attrs *attrs, void *user_data),
void *userdata);
zoitechat_hook *
zoitechat_hook_print (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], void *user_data),
void *userdata);
zoitechat_hook *
zoitechat_hook_print_attrs (zoitechat_plugin *ph,
const char *name,
int pri,
int (*callback) (char *word[], zoitechat_event_attrs *attrs,
void *user_data),
void *userdata);
zoitechat_hook *
zoitechat_hook_timer (zoitechat_plugin *ph,
int timeout,
int (*callback) (void *user_data),
void *userdata);
zoitechat_hook *
zoitechat_hook_fd (zoitechat_plugin *ph,
int fd,
int flags,
int (*callback) (int fd, int flags, void *user_data),
void *userdata);
void *
zoitechat_unhook (zoitechat_plugin *ph,
zoitechat_hook *hook);
void
zoitechat_print (zoitechat_plugin *ph,
const char *text);
void
zoitechat_printf (zoitechat_plugin *ph,
const char *format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 2, 3)))
#endif
;
void
zoitechat_command (zoitechat_plugin *ph,
const char *command);
void
zoitechat_commandf (zoitechat_plugin *ph,
const char *format, ...)
#ifdef __GNUC__
__attribute__((format(printf, 2, 3)))
#endif
;
int
zoitechat_nickcmp (zoitechat_plugin *ph,
const char *s1,
const char *s2);
int
zoitechat_set_context (zoitechat_plugin *ph,
zoitechat_context *ctx);
zoitechat_context *
zoitechat_find_context (zoitechat_plugin *ph,
const char *servname,
const char *channel);
zoitechat_context *
zoitechat_get_context (zoitechat_plugin *ph);
const char *
zoitechat_get_info (zoitechat_plugin *ph,
const char *id);
int
zoitechat_get_prefs (zoitechat_plugin *ph,
const char *name,
const char **string,
int *integer);
zoitechat_list *
zoitechat_list_get (zoitechat_plugin *ph,
const char *name);
void
zoitechat_list_free (zoitechat_plugin *ph,
zoitechat_list *xlist);
const char * const *
zoitechat_list_fields (zoitechat_plugin *ph,
const char *name);
int
zoitechat_list_next (zoitechat_plugin *ph,
zoitechat_list *xlist);
const char *
zoitechat_list_str (zoitechat_plugin *ph,
zoitechat_list *xlist,
const char *name);
int
zoitechat_list_int (zoitechat_plugin *ph,
zoitechat_list *xlist,
const char *name);
time_t
zoitechat_list_time (zoitechat_plugin *ph,
zoitechat_list *xlist,
const char *name);
void *
zoitechat_plugingui_add (zoitechat_plugin *ph,
const char *filename,
const char *name,
const char *desc,
const char *version,
char *reserved);
void
zoitechat_plugingui_remove (zoitechat_plugin *ph,
void *handle);
int
zoitechat_emit_print (zoitechat_plugin *ph,
const char *event_name, ...);
int
zoitechat_emit_print_attrs (zoitechat_plugin *ph, zoitechat_event_attrs *attrs,
const char *event_name, ...);
char *
zoitechat_gettext (zoitechat_plugin *ph,
const char *msgid);
void
zoitechat_send_modes (zoitechat_plugin *ph,
const char **targets,
int ntargets,
int modes_per_line,
char sign,
char mode);
char *
zoitechat_strip (zoitechat_plugin *ph,
const char *str,
int len,
int flags);
void
zoitechat_free (zoitechat_plugin *ph,
void *ptr);
int
zoitechat_pluginpref_set_str (zoitechat_plugin *ph,
const char *var,
const char *value);
int
zoitechat_pluginpref_get_str (zoitechat_plugin *ph,
const char *var,
char *dest);
int
zoitechat_pluginpref_set_int (zoitechat_plugin *ph,
const char *var,
int value);
int
zoitechat_pluginpref_get_int (zoitechat_plugin *ph,
const char *var);
int
zoitechat_pluginpref_delete (zoitechat_plugin *ph,
const char *var);
int
zoitechat_pluginpref_list (zoitechat_plugin *ph,
char *dest);
#if !defined(PLUGIN_C) && (defined(WIN32) || defined(__CYGWIN__))
#ifndef HEXCHAT_PLUGIN_HANDLE
#define HEXCHAT_PLUGIN_HANDLE (ph)
#endif
#define zoitechat_hook_command ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_command)
#define zoitechat_event_attrs_create ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_event_attrs_create)
#define zoitechat_event_attrs_free ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_event_attrs_free)
#define zoitechat_hook_server ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_server)
#define zoitechat_hook_server_attrs ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_server_attrs)
#define zoitechat_hook_print ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_print)
#define zoitechat_hook_print_attrs ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_print_attrs)
#define zoitechat_hook_timer ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_timer)
#define zoitechat_hook_fd ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_hook_fd)
#define zoitechat_unhook ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_unhook)
#define zoitechat_print ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_print)
#define zoitechat_printf ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_printf)
#define zoitechat_command ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_command)
#define zoitechat_commandf ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_commandf)
#define zoitechat_nickcmp ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_nickcmp)
#define zoitechat_set_context ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_set_context)
#define zoitechat_find_context ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_find_context)
#define zoitechat_get_context ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_get_context)
#define zoitechat_get_info ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_get_info)
#define zoitechat_get_prefs ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_get_prefs)
#define zoitechat_list_get ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_get)
#define zoitechat_list_free ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_free)
#define zoitechat_list_fields ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_fields)
#define zoitechat_list_next ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_next)
#define zoitechat_list_str ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_str)
#define zoitechat_list_int ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_int)
#define zoitechat_plugingui_add ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_plugingui_add)
#define zoitechat_plugingui_remove ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_plugingui_remove)
#define zoitechat_emit_print ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_emit_print)
#define zoitechat_emit_print_attrs ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_emit_print_attrs)
#define zoitechat_list_time ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_list_time)
#define zoitechat_gettext ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_gettext)
#define zoitechat_send_modes ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_send_modes)
#define zoitechat_strip ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_strip)
#define zoitechat_free ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_free)
#define zoitechat_pluginpref_set_str ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_set_str)
#define zoitechat_pluginpref_get_str ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_get_str)
#define zoitechat_pluginpref_set_int ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_set_int)
#define zoitechat_pluginpref_get_int ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_get_int)
#define zoitechat_pluginpref_delete ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_delete)
#define zoitechat_pluginpref_list ((HEXCHAT_PLUGIN_HANDLE)->zoitechat_pluginpref_list)
#endif
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -34,13 +34,13 @@
#include <unistd.h>
#endif
#include "hexchat.h"
#include "zoitechat.h"
#include "fe.h"
#include "util.h"
#include "cfgfiles.h"
#include "chanopt.h"
#include "ignore.h"
#include "hexchat-plugin.h"
#include "zoitechat-plugin.h"
#include "inbound.h"
#include "plugin.h"
#include "plugin-identd.h"
@@ -51,7 +51,7 @@
#include "outbound.h"
#include "text.h"
#include "url.h"
#include "hexchatc.h"
#include "zoitechatc.h"
#if ! GLIB_CHECK_VERSION (2, 36, 0)
#include <glib-object.h> /* for g_type_init() */
@@ -88,8 +88,8 @@ GSList *tabmenu_list = 0;
GList *sess_list_by_lastact[5] = {NULL, NULL, NULL, NULL, NULL};
static int in_hexchat_exit = FALSE;
int hexchat_is_quitting = FALSE;
static int in_zoitechat_exit = FALSE;
int zoitechat_is_quitting = FALSE;
/* command-line args */
int arg_dont_autoconnect = FALSE;
int arg_skip_plugins = FALSE;
@@ -105,7 +105,7 @@ gint arg_existing = FALSE;
struct session *current_tab;
struct session *current_sess = 0;
struct hexchatprefs prefs;
struct zoitechatprefs prefs;
/*
* Update the priority queue of the "interesting sessions"
@@ -348,14 +348,14 @@ doover:
/* these are only run if the lagometer is enabled */
static int
hexchat_lag_check (void) /* this gets called every 30 seconds */
zoitechat_lag_check (void) /* this gets called every 30 seconds */
{
lag_check ();
return 1;
}
static int
hexchat_lag_check_update (void) /* this gets called every 0.5 seconds */
zoitechat_lag_check_update (void) /* this gets called every 0.5 seconds */
{
lagcheck_update ();
return 1;
@@ -363,7 +363,7 @@ hexchat_lag_check_update (void) /* this gets called every 0.5 seconds */
/* call whenever timeout intervals change */
void
hexchat_reinit_timers (void)
zoitechat_reinit_timers (void)
{
static int lag_check_update_tag = 0;
static int lag_check_tag = 0;
@@ -395,7 +395,7 @@ hexchat_reinit_timers (void)
/* lag-o-meter */
if (prefs.hex_gui_lagometer && lag_check_update_tag == 0)
{
lag_check_update_tag = fe_timeout_add (500, hexchat_lag_check_update, NULL);
lag_check_update_tag = fe_timeout_add (500, zoitechat_lag_check_update, NULL);
}
else if (!prefs.hex_gui_lagometer && lag_check_update_tag != 0)
{
@@ -407,7 +407,7 @@ hexchat_reinit_timers (void)
if ((prefs.hex_net_ping_timeout != 0 || prefs.hex_gui_lagometer)
&& lag_check_tag == 0)
{
lag_check_tag = fe_timeout_add_seconds (30, hexchat_lag_check, NULL);
lag_check_tag = fe_timeout_add_seconds (30, zoitechat_lag_check, NULL);
}
else if ((!prefs.hex_net_ping_timeout && !prefs.hex_gui_lagometer)
&& lag_check_tag != 0)
@@ -442,7 +442,7 @@ irc_init (session *sess)
plugin_add (sess, NULL, NULL, dbus_plugin_init, NULL, NULL, FALSE);
#endif
hexchat_reinit_timers ();
zoitechat_reinit_timers ();
if (arg_url != NULL)
{
@@ -597,7 +597,7 @@ send_quit_or_part (session * killsess)
list = list->next;
}
if (hexchat_is_quitting)
if (zoitechat_is_quitting)
willquit = TRUE;
if (killserv->connected)
@@ -691,8 +691,8 @@ session_free (session *killsess)
g_free (killsess);
if (!sess_list && !in_hexchat_exit)
hexchat_exit (); /* sess_list is empty, quit! */
if (!sess_list && !in_zoitechat_exit)
zoitechat_exit (); /* sess_list is empty, quit! */
list = sess_list;
while (list)
@@ -751,7 +751,7 @@ static char defaultconf_commands[] =
"NAME SPING\n" "CMD ping\n\n"\
"NAME SQUERY\n" "CMD quote SQUERY %2 :&3\n\n"\
"NAME SSLSERVER\n" "CMD server -ssl &2\n\n"\
"NAME SV\n" "CMD echo HexChat %v %m\n\n"\
"NAME SV\n" "CMD echo ZoiteChat %v %m\n\n"\
"NAME UMODE\n" "CMD mode %n &2\n\n"\
"NAME UPTIME\n" "CMD quote STATS u\n\n"\
"NAME VER\n" "CMD ctcp %2 VERSION\n\n"\
@@ -980,10 +980,10 @@ xchat_init (void)
}
void
hexchat_exit (void)
zoitechat_exit (void)
{
hexchat_is_quitting = TRUE;
in_hexchat_exit = TRUE;
zoitechat_is_quitting = TRUE;
in_zoitechat_exit = TRUE;
plugin_kill_all ();
fe_cleanup ();
@@ -1003,7 +1003,7 @@ hexchat_exit (void)
}
void
hexchat_exec (const char *cmd)
zoitechat_exec (const char *cmd)
{
util_exec (cmd);
}
@@ -1013,16 +1013,16 @@ static void
set_locale (void)
{
#ifdef WIN32
char hexchat_lang[13]; /* LC_ALL= plus 5 chars of hex_gui_lang and trailing \0 */
char zoitechat_lang[13]; /* LC_ALL= plus 5 chars of hex_gui_lang and trailing \0 */
strcpy (hexchat_lang, "LC_ALL=");
strcpy (zoitechat_lang, "LC_ALL=");
if (0 <= prefs.hex_gui_lang && prefs.hex_gui_lang < LANGUAGES_LENGTH)
strcat (hexchat_lang, languages[prefs.hex_gui_lang]);
strcat (zoitechat_lang, languages[prefs.hex_gui_lang]);
else
strcat (hexchat_lang, "en");
strcat (zoitechat_lang, "en");
putenv (hexchat_lang);
putenv (zoitechat_lang);
#endif
}
@@ -1091,7 +1091,7 @@ main (int argc, char *argv[])
return ret;
#ifdef USE_DBUS
hexchat_remote ();
zoitechat_remote ();
#endif
#ifdef WIN32

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -91,9 +91,9 @@ struct nbexec
struct session *sess;
};
struct hexchatprefs
struct zoitechatprefs
{
/* these are the rebranded, consistent, sorted hexchat variables */
/* these are the rebranded, consistent, sorted zoitechat variables */
/* BOOLEANS */
unsigned int hex_away_auto_unmark;
@@ -488,7 +488,7 @@ typedef struct server
int proxy_sok6;
int id; /* unique ID number (for plugin API) */
/* dcc_ip moved from hexchatprefs to make it per-server */
/* dcc_ip moved from zoitechatprefs to make it per-server */
guint32 dcc_ip;
#ifdef USE_OPENSSL

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -20,9 +20,9 @@
#ifndef HEXCHAT_C_H
#define HEXCHAT_C_H
extern struct hexchatprefs prefs;
extern struct zoitechatprefs prefs;
extern int hexchat_is_quitting;
extern int zoitechat_is_quitting;
extern gint arg_skip_plugins; /* command-line args */
extern gint arg_dont_autoconnect;
extern char *arg_url;
@@ -50,13 +50,13 @@ extern GList *sess_list_by_lastact[];
session * find_channel (server *serv, char *chan);
session * find_dialog (server *serv, char *nick);
session * new_ircwindow (server *serv, char *name, int type, int focus);
void hexchat_reinit_timers (void);
void zoitechat_reinit_timers (void);
void lastact_update (session * sess);
session * lastact_getfirst (int (*filter) (session *sess));
int is_session (session * sess);
void session_free (session *killsess);
void lag_check (void);
void hexchat_exit (void);
void hexchat_exec (const char *cmd);
void zoitechat_exit (void);
void zoitechat_exec (const char *cmd);
#endif

View File

@@ -22,8 +22,8 @@
#include "fe-gtk.h"
#include "../common/hexchat.h"
#include "../common/hexchatc.h"
#include "../common/zoitechat.h"
#include "../common/zoitechatc.h"
#include "gtkutil.h"
#include "ascii.h"
#include "maingui.h"

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -28,11 +28,11 @@
#include "fe-gtk.h"
#include "../common/hexchat.h"
#include "../common/zoitechat.h"
#include "../common/fe.h"
#include "../common/modes.h"
#include "../common/outbound.h"
#include "../common/hexchatc.h"
#include "../common/zoitechatc.h"
#include "gtkutil.h"
#include "maingui.h"
#include "banlist.h"

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -20,7 +20,7 @@
#ifndef HEXCHAT_BANLIST_H
#define HEXCHAT_BANLIST_H
#include "../common/hexchat.h"
#include "../common/zoitechat.h"
void banlist_opengui (session *sess);
#ifndef RPL_BANLIST

View File

@@ -32,8 +32,8 @@
#include <gdk/gdkkeysyms.h>
#include "../common/hexchat.h"
#include "../common/hexchatc.h"
#include "../common/zoitechat.h"
#include "../common/zoitechatc.h"
#include "../common/cfgfiles.h"
#include "../common/outbound.h"
#include "../common/util.h"
@@ -477,12 +477,12 @@ chanlist_filereq_done (server *serv, char *file)
if (!file)
return;
fh = hexchat_open_file (file, O_TRUNC | O_WRONLY | O_CREAT, 0600,
fh = zoitechat_open_file (file, O_TRUNC | O_WRONLY | O_CREAT, 0600,
XOF_DOMODE | XOF_FULLPATH);
if (fh == -1)
return;
g_snprintf (buf, sizeof buf, "HexChat Channel List: %s - %s\n",
g_snprintf (buf, sizeof buf, "ZoiteChat Channel List: %s - %s\n",
serv->servername, ctime (&t));
write (fh, buf, strlen (buf));

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -561,7 +561,7 @@ cv_tabs_add (chanview *cv, chan *ch, char *name, GtkTreeIter *parent)
GtkWidget *but;
but = gtk_toggle_button_new_with_label (name);
gtk_widget_set_name (but, "hexchat-tab");
gtk_widget_set_name (but, "zoitechat-tab");
g_object_set_data (G_OBJECT (but), "c", ch);
/* used to trap right-clicks */
g_signal_connect (G_OBJECT (but), "button_press_event",

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -115,7 +115,7 @@ cv_tree_init (chanview *cv)
gtk_widget_show (win);
view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (cv->store));
gtk_widget_set_name (view, "hexchat-tree");
gtk_widget_set_name (view, "zoitechat-tree");
if (cv->style)
gtk_widget_set_style (view, cv->style);
/*gtk_widget_modify_base (view, GTK_STATE_NORMAL, &colors[COL_BG]);*/

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -22,8 +22,8 @@
#include <stdlib.h>
#include <string.h>
#include "../common/hexchat.h"
#include "../common/hexchatc.h"
#include "../common/zoitechat.h"
#include "../common/zoitechatc.h"
#include "fe-gtk.h"
#include "maingui.h"
#include "gtkutil.h"
@@ -601,9 +601,9 @@ chan_remove (chan *ch, gboolean force)
{
chan *new_ch;
int i, num;
extern int hexchat_is_quitting;
extern int zoitechat_is_quitting;
if (hexchat_is_quitting) /* avoid lots of looping on exit */
if (zoitechat_is_quitting) /* avoid lots of looping on exit */
return TRUE;
/* is this ch allowed to be closed while still having children? */

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -28,8 +28,8 @@
#include "../common/inet.h"
#include "fe-gtk.h"
#include "../common/hexchat.h"
#include "../common/hexchatc.h"
#include "../common/zoitechat.h"
#include "../common/zoitechatc.h"
#include "../common/fe.h"
#include "../common/util.h"
#include "../common/network.h"

View File

@@ -33,9 +33,9 @@
#include "fe-gtk.h"
#include "../common/hexchat.h"
#include "../common/zoitechat.h"
#include "../common/cfgfiles.h"
#include "../common/hexchatc.h"
#include "../common/zoitechatc.h"
#include "../common/fe.h"
#include "menu.h"
#include "gtkutil.h"
@@ -67,7 +67,7 @@ editlist_save (GtkWidget *igad, gchar *file)
char *name, *cmd;
int fh;
fh = hexchat_open_file (file, O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
fh = zoitechat_open_file (file, O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
if (fh != -1)
{
if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter))

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -29,12 +29,12 @@
#include <unistd.h>
#endif
#include "../common/hexchat.h"
#include "../common/zoitechat.h"
#include "../common/fe.h"
#include "../common/util.h"
#include "../common/text.h"
#include "../common/cfgfiles.h"
#include "../common/hexchatc.h"
#include "../common/zoitechatc.h"
#include "../common/plugin.h"
#include "../common/server.h"
#include "../common/url.h"
@@ -86,7 +86,7 @@ static const GOptionEntry gopt_entries[] =
{"url", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &arg_url, N_("Open an irc://server:port/channel?key URL"), "URL"},
{"command", 'c', 0, G_OPTION_ARG_STRING, &arg_command, N_("Execute command:"), "COMMAND"},
#ifdef USE_DBUS
{"existing", 'e', 0, G_OPTION_ARG_NONE, &arg_existing, N_("Open URL or execute command in an existing HexChat"), NULL},
{"existing", 'e', 0, G_OPTION_ARG_NONE, &arg_existing, N_("Open URL or execute command in an existing ZoiteChat"), NULL},
#endif
{"minimize", 0, 0, G_OPTION_ARG_INT, &arg_minimize, N_("Begin minimized. Level 0=Normal 1=Iconified 2=Tray"), N_("level")},
{"version", 'v', 0, G_OPTION_ARG_NONE, &arg_show_version, N_("Show version information"), NULL},
@@ -106,7 +106,7 @@ create_msg_dialog (gchar *title, gchar *message)
/* On Win32 we automatically have the icon. If we try to load it explicitly, it will look ugly for some reason. */
#ifndef WIN32
pixmaps_init ();
gtk_window_set_icon (GTK_WINDOW (dialog), pix_hexchat);
gtk_window_set_icon (GTK_WINDOW (dialog), pix_zoitechat);
#endif
gtk_dialog_run (GTK_DIALOG (dialog));
@@ -252,10 +252,10 @@ const char cursor_color_rc[] =
"{"
"GtkEntry::cursor-color=\"#%02x%02x%02x\""
"}"
"widget \"*.hexchat-inputbox\" style : application \"xc-ib-st\"";
"widget \"*.zoitechat-inputbox\" style : application \"xc-ib-st\"";
static const char adwaita_workaround_rc[] =
"style \"hexchat-input-workaround\""
"style \"zoitechat-input-workaround\""
"{"
"engine \"pixmap\" {"
"image {"
@@ -268,7 +268,7 @@ static const char adwaita_workaround_rc[] =
"}"
"}"
"}"
"widget \"*.hexchat-inputbox\" style \"hexchat-input-workaround\"";
"widget \"*.zoitechat-inputbox\" style \"zoitechat-input-workaround\"";
GtkStyle *
create_input_style (GtkStyle *style)
@@ -321,7 +321,7 @@ fe_init (void)
pixmaps_init ();
#ifdef HAVE_GTK_MAC
gtkosx_application_set_dock_icon_pixbuf (osx_app, pix_hexchat);
gtkosx_application_set_dock_icon_pixbuf (osx_app, pix_zoitechat);
#endif
channelwin_pix = pixmap_load_from_file (prefs.hex_text_background);
input_style = create_input_style (gtk_style_new ());
@@ -331,7 +331,7 @@ fe_init (void)
static void
gtkosx_application_terminate (GtkosxApplication *app, gpointer userdata)
{
hexchat_exit();
zoitechat_exit();
}
#endif
@@ -691,9 +691,9 @@ fe_beep (session *sess)
{
ca_context_create (&ca_con);
ca_context_change_props (ca_con,
CA_PROP_APPLICATION_ID, "hexchat",
CA_PROP_APPLICATION_ID, "zoitechat",
CA_PROP_APPLICATION_NAME, DISPLAY_NAME,
CA_PROP_APPLICATION_ICON_NAME, "hexchat", NULL);
CA_PROP_APPLICATION_ICON_NAME, "zoitechat", NULL);
}
if (ca_context_play (ca_con, 0, CA_PROP_EVENT_ID, "message-new-instant", NULL) != 0)
@@ -1043,7 +1043,7 @@ osx_show_uri (const char *url)
open = g_find_program_in_path ("open");
cmd = g_strjoin (" ", open, encoded_url, NULL);
hexchat_exec (cmd);
zoitechat_exec (cmd);
g_free (encoded_url);
g_free (cmd);

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*
@@ -22,7 +22,7 @@
#include "config.h"
#define DISPLAY_NAME "HexChat"
#define DISPLAY_NAME "ZoiteChat"
#ifndef WIN32
#include <sys/types.h>

View File

@@ -22,32 +22,32 @@
<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>hexchat</TargetName>
<OutDir>$(HexChatRel)</OutDir>
<TargetName>zoitechat</TargetName>
<OutDir>$(ZoiteChatRel)</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\common;$(HexChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\common;$(ZoiteChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DepLibs);$(HexChatLib)common.lib;wbemuuid.lib;comsupp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(DepLibs);$(ZoiteChatLib)common.lib;wbemuuid.lib;comsupp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;$(OwnFlags);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\common;$(HexChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\common;$(ZoiteChatLib);$(DepsRoot)\include;$(Glib);$(Gtk);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DisableSpecificWarnings>4244;4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DepLibs);$(HexChatLib)common.lib;wbemuuid.lib;comsupp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>$(DepLibs);$(ZoiteChatLib)common.lib;wbemuuid.lib;comsupp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<EntryPointSymbol>mainCRTStartup</EntryPointSymbol>
</Link>
</ItemDefinitionGroup>
@@ -55,13 +55,13 @@
<PreBuildEvent>
<Command><![CDATA[
SET SOLUTIONDIR=$(SolutionDir)..\
powershell -File "$(SolutionDir)..\win32\version-template.ps1" "$(SolutionDir)..\src\fe-gtk\hexchat.rc.tt" "$(HexChatLib)hexchat.rc.utf8"
REM hexchat.rc needs to be in UCS-2 or Resource Compiler will complain
powershell "Get-Content -Encoding UTF8 '$(HexChatLib)hexchat.rc.utf8' | Out-File '$(HexChatLib)hexchat.rc'; Remove-Item '$(HexChatLib)hexchat.rc.utf8'"
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-header --manual-register --sourcedir "$(DataDir)" --target "$(HexChatLib)resources.h" "$(DataDir)hexchat.gresource.xml"
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-source --manual-register --sourcedir "$(DataDir)" --target "$(HexChatLib)resources.c" "$(DataDir)hexchat.gresource.xml"
powershell -File "$(SolutionDir)..\win32\version-template.ps1" "$(SolutionDir)..\src\fe-gtk\zoitechat.rc.tt" "$(ZoiteChatLib)zoitechat.rc.utf8"
REM zoitechat.rc needs to be in UCS-2 or Resource Compiler will complain
powershell "Get-Content -Encoding UTF8 '$(ZoiteChatLib)zoitechat.rc.utf8' | Out-File '$(ZoiteChatLib)zoitechat.rc'; Remove-Item '$(ZoiteChatLib)zoitechat.rc.utf8'"
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-header --manual-register --sourcedir "$(DataDir)" --target "$(ZoiteChatLib)resources.h" "$(DataDir)zoitechat.gresource.xml"
"$(DepsRoot)\bin\glib-compile-resources.exe" --generate-source --manual-register --sourcedir "$(DataDir)" --target "$(ZoiteChatLib)resources.c" "$(DataDir)zoitechat.gresource.xml"
]]></Command>
<Message>Build hexchat.rc and gresource file</Message>
<Message>Build zoitechat.rc and gresource file</Message>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
@@ -116,7 +116,7 @@ powershell "Get-Content -Encoding UTF8 '$(HexChatLib)hexchat.rc.utf8' | Out-File
<ClCompile Include="plugin-tray.c" />
<ClCompile Include="plugingui.c" />
<ClCompile Include="rawlog.c" />
<ClCompile Include="$(HexChatLib)resources.c" />
<ClCompile Include="$(ZoiteChatLib)resources.c" />
<ClCompile Include="servlistgui.c" />
<ClCompile Include="setup.c" />
<ClCompile Include="sexy-iso-codes.c" />
@@ -127,17 +127,17 @@ powershell "Get-Content -Encoding UTF8 '$(HexChatLib)hexchat.rc.utf8' | Out-File
<ClCompile Include="xtext.c" />
</ItemGroup>
<ItemGroup>
<Manifest Include="..\..\win32\hexchat.exe.manifest" />
<Manifest Include="..\..\win32\zoitechat.exe.manifest" />
</ItemGroup>
<ItemGroup>
<None Include="hexchat.rc.tt" />
<ResourceCompile Include="$(HexChatLib)hexchat.rc" />
<None Include="zoitechat.rc.tt" />
<ResourceCompile Include="$(ZoiteChatLib)zoitechat.rc" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\data\icons\hexchat.ico" />
<None Include="..\..\data\icons\zoitechat.ico" />
</ItemGroup>
<ItemGroup>
<Xml Include="..\..\data\hexchat.gresource.xml" />
<Xml Include="..\..\data\zoitechat.gresource.xml" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
</Project>

View File

@@ -182,7 +182,7 @@
<ClCompile Include="xtext.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="$(HexChatLib)resources.c">
<ClCompile Include="$(ZoiteChatLib)resources.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="plugin-notification.c">
@@ -193,22 +193,22 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<Manifest Include="..\..\win32\hexchat.exe.manifest">
<Manifest Include="..\..\win32\zoitechat.exe.manifest">
<Filter>Resource Files</Filter>
</Manifest>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="$(HexChatLib)hexchat.rc">
<ResourceCompile Include="$(ZoiteChatLib)zoitechat.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\..\data\icons\hexchat.ico">
<None Include="..\..\data\icons\zoitechat.ico">
<Filter>Resource Files</Filter>
</None>
<None Include="hexchat.rc.tt" />
<None Include="zoitechat.rc.tt" />
</ItemGroup>
<ItemGroup>
<Xml Include="..\..\data\hexchat.gresource.xml" />
<Xml Include="..\..\data\zoitechat.gresource.xml" />
</ItemGroup>
</Project>

View File

@@ -33,8 +33,8 @@
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include "fe-gtk.h"
#include "../common/hexchat.h"
#include "../common/hexchatc.h"
#include "../common/zoitechat.h"
#include "../common/zoitechatc.h"
#include "../common/cfgfiles.h"
#include "../common/fe.h"
#include "../common/userlist.h"
@@ -850,11 +850,11 @@ key_save_kbs (void)
GSList *list = keybind_list;
struct key_binding *kb;
fd = hexchat_open_file ("keybindings.conf", O_CREAT | O_TRUNC | O_WRONLY,
fd = zoitechat_open_file ("keybindings.conf", O_CREAT | O_TRUNC | O_WRONLY,
0x180, XOF_DOMODE);
if (fd < 0)
return 1;
write (fd, buf, g_snprintf (buf, 510, "# HexChat key bindings config file\n\n"));
write (fd, buf, g_snprintf (buf, 510, "# ZoiteChat key bindings config file\n\n"));
while (list)
{
@@ -947,7 +947,7 @@ key_load_kbs (void)
GdkModifierType mod = 0;
off_t size;
fd = hexchat_open_file ("keybindings.conf", O_RDONLY, 0, 0);
fd = zoitechat_open_file ("keybindings.conf", O_RDONLY, 0, 0);
if (fd < 0)
{
ibuf = g_strdup (default_kb_cfg);

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -35,11 +35,11 @@
#include <gdk/gdkx.h>
#endif
#include "../common/hexchat.h"
#include "../common/zoitechat.h"
#include "../common/fe.h"
#include "../common/util.h"
#include "../common/cfgfiles.h"
#include "../common/hexchatc.h"
#include "../common/zoitechatc.h"
#include "../common/typedef.h"
#include "gtkutil.h"
#include "pixmaps.h"
@@ -585,7 +585,7 @@ gtkutil_set_icon (GtkWidget *win)
/* FIXME: Magically breaks icon rendering in most
* (sub)windows, but OFC only on Windows. GTK <3
*/
gtk_window_set_icon (GTK_WINDOW (win), pix_hexchat);
gtk_window_set_icon (GTK_WINDOW (win), pix_zoitechat);
#endif
}
@@ -599,7 +599,7 @@ gtkutil_window_new (char *title, char *role, int width, int height, int flags)
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtkutil_set_icon (win);
#ifdef WIN32
gtk_window_set_wmclass (GTK_WINDOW (win), "HexChat", "hexchat");
gtk_window_set_wmclass (GTK_WINDOW (win), "ZoiteChat", "zoitechat");
#endif
gtk_window_set_title (GTK_WINDOW (win), title);
gtk_window_set_default_size (GTK_WINDOW (win), width, height);

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -24,7 +24,7 @@
#include <fcntl.h>
#include "fe-gtk.h"
#include "../common/hexchat.h"
#include "../common/zoitechat.h"
#include "../common/ignore.h"
#include "../common/cfgfiles.h"
#include "../common/fe.h"

View File

@@ -31,8 +31,8 @@
#include <unistd.h>
#endif
#include "../common/hexchat.h"
#include "../common/hexchatc.h"
#include "../common/zoitechat.h"
#include "../common/zoitechatc.h"
#include "../common/server.h"
#include "../common/servlist.h"
#include "../common/fe.h"
@@ -249,7 +249,7 @@ joind_show_dialog (server *serv)
if (serv->network)
if (g_ascii_strcasecmp(((ircnet*)serv->network)->name, "Libera.Chat") == 0)
{
gtk_entry_set_text (GTK_ENTRY (entry1), "#hexchat");
gtk_entry_set_text (GTK_ENTRY (entry1), "#zoitechat");
}
gtk_widget_grab_focus (okbutton1);

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -23,10 +23,10 @@
#include <gdk/gdkkeysyms.h>
#include "../common/hexchat.h"
#include "../common/zoitechat.h"
#include "../common/fe.h"
#include "../common/server.h"
#include "../common/hexchatc.h"
#include "../common/zoitechatc.h"
#include "../common/outbound.h"
#include "../common/inbound.h"
#include "../common/plugin.h"
@@ -996,7 +996,7 @@ static void
mg_topdestroy_cb (GtkWidget *win, session *sess)
{
/* printf("enter mg_topdestroy. sess %p was destroyed\n", sess);*/
session_free (sess); /* tell hexchat.c about it */
session_free (sess); /* tell zoitechat.c about it */
}
/* cleanup an IRC tab */
@@ -1006,7 +1006,7 @@ mg_ircdestroy (session *sess)
{
GSList *list;
session_free (sess); /* tell hexchat.c about it */
session_free (sess); /* tell zoitechat.c about it */
if (mg_gui == NULL)
{
@@ -1176,13 +1176,13 @@ mg_open_quit_dialog (gboolean minimize_button)
cons = mg_count_networks ();
if (dccs + cons == 0 || !prefs.hex_gui_quit_dialog)
{
hexchat_exit ();
zoitechat_exit ();
return;
}
dialog = gtk_dialog_new ();
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
gtk_window_set_title (GTK_WINDOW (dialog), _("Quit HexChat?"));
gtk_window_set_title (GTK_WINDOW (dialog), _("Quit ZoiteChat?"));
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent_window));
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
@@ -1252,7 +1252,7 @@ mg_open_quit_dialog (gboolean minimize_button)
case 0:
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton1)))
prefs.hex_gui_quit_dialog = 0;
hexchat_exit ();
zoitechat_exit ();
break;
case 1: /* minimize to tray */
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton1)))
@@ -1785,7 +1785,7 @@ mg_tabwindow_kill_cb (GtkWidget *win, gpointer userdata)
session *sess;
/* puts("enter mg_tabwindow_kill_cb");*/
hexchat_is_quitting = TRUE;
zoitechat_is_quitting = TRUE;
/* see if there's any non-tab windows left */
list = sess_list;
@@ -1795,7 +1795,7 @@ mg_tabwindow_kill_cb (GtkWidget *win, gpointer userdata)
next = list->next;
if (!sess->gui->is_tab)
{
hexchat_is_quitting = FALSE;
zoitechat_is_quitting = FALSE;
/* puts("-> will not exit, some toplevel windows left");*/
} else
{
@@ -1851,7 +1851,7 @@ mg_link_irctab (session *sess, int focus)
win = mg_changui_destroy (sess);
mg_changui_new (sess, sess->res, 0, focus);
mg_populate (sess);
hexchat_is_quitting = FALSE;
zoitechat_is_quitting = FALSE;
if (win)
gtk_widget_destroy (win);
return;
@@ -2078,7 +2078,7 @@ mg_create_chanmodebuttons (session_gui *gui, GtkWidget *box)
gui->flag_k = mg_create_flagbutton (_("Keyword"), box, "k");
gui->key_entry = gtk_entry_new ();
gtk_widget_set_name (gui->key_entry, "hexchat-inputbox");
gtk_widget_set_name (gui->key_entry, "zoitechat-inputbox");
gtk_entry_set_max_length (GTK_ENTRY (gui->key_entry), 23);
gtk_widget_set_size_request (gui->key_entry, 115, -1);
gtk_box_pack_start (GTK_BOX (box), gui->key_entry, 0, 0, 0);
@@ -2090,7 +2090,7 @@ mg_create_chanmodebuttons (session_gui *gui, GtkWidget *box)
gui->flag_l = mg_create_flagbutton (_("User Limit"), box, "l");
gui->limit_entry = gtk_entry_new ();
gtk_widget_set_name (gui->limit_entry, "hexchat-inputbox");
gtk_widget_set_name (gui->limit_entry, "zoitechat-inputbox");
gtk_entry_set_max_length (GTK_ENTRY (gui->limit_entry), 10);
gtk_widget_set_size_request (gui->limit_entry, 30, -1);
gtk_box_pack_start (GTK_BOX (box), gui->limit_entry, 0, 0, 0);
@@ -2180,7 +2180,7 @@ mg_create_topicbar (session *sess, GtkWidget *box)
sess->res->tab = NULL;
gui->topic_entry = topic = sexy_spell_entry_new ();
gtk_widget_set_name (topic, "hexchat-inputbox");
gtk_widget_set_name (topic, "zoitechat-inputbox");
sexy_spell_entry_set_checked (SEXY_SPELL_ENTRY (topic), FALSE);
gtk_container_add (GTK_CONTAINER (hbox), topic);
g_signal_connect (G_OBJECT (topic), "activate",
@@ -2991,7 +2991,7 @@ mg_create_entry (session *sess, GtkWidget *box)
G_CALLBACK (mg_inputbox_cb), gui);
gtk_container_add (GTK_CONTAINER (hbox), entry);
gtk_widget_set_name (entry, "hexchat-inputbox");
gtk_widget_set_name (entry, "zoitechat-inputbox");
g_signal_connect (G_OBJECT (entry), "key_press_event",
G_CALLBACK (key_handle_key_press), NULL);
g_signal_connect (G_OBJECT (entry), "focus_in_event",
@@ -3130,10 +3130,10 @@ mg_create_topwindow (session *sess)
GtkWidget *table;
if (sess->type == SESS_DIALOG)
win = gtkutil_window_new ("HexChat", NULL,
win = gtkutil_window_new ("ZoiteChat", NULL,
prefs.hex_gui_dialog_width, prefs.hex_gui_dialog_height, 0);
else
win = gtkutil_window_new ("HexChat", NULL,
win = gtkutil_window_new ("ZoiteChat", NULL,
prefs.hex_gui_win_width,
prefs.hex_gui_win_height, 0);
sess->gui->window = win;
@@ -3253,7 +3253,7 @@ mg_create_tabwindow (session *sess)
GdkWindow *parent_win;
#endif
win = gtkutil_window_new ("HexChat", NULL, prefs.hex_gui_win_width,
win = gtkutil_window_new ("ZoiteChat", NULL, prefs.hex_gui_win_width,
prefs.hex_gui_win_height, 0);
sess->gui->window = win;
gtk_window_move (GTK_WINDOW (win), prefs.hex_gui_win_left,

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -32,8 +32,8 @@
#include <gdk/gdkkeysyms.h>
#include "../common/hexchat.h"
#include "../common/hexchatc.h"
#include "../common/zoitechat.h"
#include "../common/zoitechatc.h"
#include "../common/cfgfiles.h"
#include "../common/outbound.h"
#include "../common/ignore.h"
@@ -101,7 +101,7 @@ static void
nick_command (session * sess, char *cmd)
{
if (*cmd == '!')
hexchat_exec (cmd + 1);
zoitechat_exec (cmd + 1);
else
handle_command (sess, cmd, TRUE);
}
@@ -514,7 +514,7 @@ menu_create (GtkWidget *menu, GSList *list, char *target, int check_path)
{
char *icon, *label;
/* default command in hexchat.c */
/* default command in zoitechat.c */
if (pop->cmd[0] == 'n' && !strcmp (pop->cmd, "notify -n ASK %s"))
{
/* don't create this item if already in notify list */
@@ -1491,7 +1491,7 @@ menu_noplugin_info (void)
"%m = machine info\n"\
"%n = your nick\n"\
"%t = time/date\n"\
"%v = HexChat version\n"\
"%v = ZoiteChat version\n"\
"%2 = word 2\n"\
"%3 = word 3\n"\
"&2 = word 2 to the end of line\n"\
@@ -1538,7 +1538,7 @@ menu_noplugin_info (void)
"%s = the URL string\n\n"\
"Putting a ! in front of the command\n"\
"indicates it should be sent to a\n"\
"shell instead of HexChat")
"shell instead of ZoiteChat")
static void
menu_usercommands (void)
@@ -1613,7 +1613,7 @@ menu_ctcpguiopen (void)
static void
menu_docs (GtkWidget *wid, gpointer none)
{
fe_open_url ("http://hexchat.readthedocs.org");
fe_open_url ("http://zoitechat.readthedocs.org");
}
/*static void
@@ -1674,7 +1674,7 @@ menu_metres_off (GtkWidget *item, gpointer none)
{
prefs.hex_gui_lagometer = 0;
prefs.hex_gui_throttlemeter = 0;
hexchat_reinit_timers ();
zoitechat_reinit_timers ();
menu_setting_foreach (menu_apply_metres_cb, -1, 0);
}
}
@@ -1686,7 +1686,7 @@ menu_metres_text (GtkWidget *item, gpointer none)
{
prefs.hex_gui_lagometer = 2;
prefs.hex_gui_throttlemeter = 2;
hexchat_reinit_timers ();
zoitechat_reinit_timers ();
menu_setting_foreach (menu_apply_metres_cb, -1, 0);
}
}
@@ -1698,7 +1698,7 @@ menu_metres_graph (GtkWidget *item, gpointer none)
{
prefs.hex_gui_lagometer = 1;
prefs.hex_gui_throttlemeter = 1;
hexchat_reinit_timers ();
zoitechat_reinit_timers ();
menu_setting_foreach (menu_apply_metres_cb, -1, 0);
}
}
@@ -1710,7 +1710,7 @@ menu_metres_both (GtkWidget *item, gpointer none)
{
prefs.hex_gui_lagometer = 3;
prefs.hex_gui_throttlemeter = 3;
hexchat_reinit_timers ();
zoitechat_reinit_timers ();
menu_setting_foreach (menu_apply_metres_cb, -1, 0);
}
}
@@ -1758,9 +1758,9 @@ menu_about (GtkWidget *wid, gpointer sess)
gtk_about_dialog_set_program_name (dialog, _(DISPLAY_NAME));
gtk_about_dialog_set_version (dialog, PACKAGE_VERSION);
gtk_about_dialog_set_license (dialog, license); /* gtk3 can use GTK_LICENSE_GPL_2_0 */
gtk_about_dialog_set_website (dialog, "http://hexchat.github.io");
gtk_about_dialog_set_website (dialog, "http://zoitechat.github.io");
gtk_about_dialog_set_website_label (dialog, "Website");
gtk_about_dialog_set_logo (dialog, pix_hexchat);
gtk_about_dialog_set_logo (dialog, pix_zoitechat);
gtk_about_dialog_set_copyright (dialog, "\302\251 1998-2010 Peter \305\275elezn\303\275\n\302\251 2009-2014 Berke Viktor");
gtk_about_dialog_set_comments (dialog, comment);
@@ -2501,7 +2501,7 @@ togitem:
menu_widgets[mymenu[i].id] = item;
#ifdef HAVE_GTK_MAC
/* We want HexChat to be the app menu, not including Quit or HexChat itself */
/* We want ZoiteChat to be the app menu, not including Quit or ZoiteChat itself */
if (bar && item && i <= CLOSE_OFFSET + 1 && mymenu[i].id != MENU_ID_HEXCHAT)
{
if (!submenu || mymenu[i].type == M_MENUSUB)

View File

@@ -1,4 +1,4 @@
/* HexChat
/* ZoiteChat
* Copyright (C) 1998-2010 Peter Zelezny.
* Copyright (C) 2009-2013 Berke Viktor.
*

View File

@@ -1,4 +1,4 @@
hexchat_gtk_sources = [
zoitechat_gtk_sources = [
'ascii.c',
'banlist.c',
'chanlist.c',
@@ -29,22 +29,22 @@ hexchat_gtk_sources = [
]
gtk_dep = dependency('gtk+-2.0', version: '>= 2.24.0')
hexchat_gtk_deps = [
hexchat_common_dep,
zoitechat_gtk_deps = [
zoitechat_common_dep,
libgmodule_dep, # used by libsexy
gtk_dep
]
if gtk_dep.get_pkgconfig_variable('target') == 'x11'
hexchat_gtk_deps += dependency('x11')
zoitechat_gtk_deps += dependency('x11')
endif
hexchat_gtk_cflags = []
zoitechat_gtk_cflags = []
hexchat_gtk_ldflags = []
zoitechat_gtk_ldflags = []
if host_machine.system() == 'windows'
hexchat_gtk_sources += 'notifications/notification-windows.c'
zoitechat_gtk_sources += 'notifications/notification-windows.c'
# TODO: mingw doesn't have these headers or libs
# add_languages('cpp')
@@ -53,38 +53,38 @@ if host_machine.system() == 'windows'
#)
else
hexchat_gtk_sources += 'notifications/notification-freedesktop.c'
zoitechat_gtk_sources += 'notifications/notification-freedesktop.c'
endif
iso_codes = dependency('iso-codes', required: false)
if iso_codes.found()
hexchat_gtk_sources += 'sexy-iso-codes.c'
zoitechat_gtk_sources += 'sexy-iso-codes.c'
iso_codes_prefix = iso_codes.get_pkgconfig_variable('prefix')
hexchat_gtk_cflags += '-DISO_CODES_PREFIX="@0@"'.format(iso_codes_prefix)
hexchat_gtk_cflags += '-DISO_CODES_LOCALEDIR="@0@"'.format(
zoitechat_gtk_cflags += '-DISO_CODES_PREFIX="@0@"'.format(iso_codes_prefix)
zoitechat_gtk_cflags += '-DISO_CODES_LOCALEDIR="@0@"'.format(
join_paths(iso_codes_prefix, 'share/locale'))
endif
if get_option('plugin')
hexchat_gtk_sources += 'plugingui.c'
zoitechat_gtk_sources += 'plugingui.c'
endif
resources = gnome.compile_resources('resources',
'../../data/hexchat.gresource.xml',
'../../data/zoitechat.gresource.xml',
source_dir: '../../data', # TODO: Fix upstream
c_name: 'hexchat',
c_name: 'zoitechat',
extra_args: ['--manual-register']
)
if host_machine.system() == 'windows'
hexchat_gtk_ldflags += '-Wl,-e,mainCRTStartup'
zoitechat_gtk_ldflags += '-Wl,-e,mainCRTStartup'
endif
executable('hexchat',
sources: resources + hexchat_gtk_sources,
dependencies: hexchat_gtk_deps,
c_args: hexchat_gtk_cflags,
link_args: hexchat_gtk_ldflags,
executable('zoitechat',
sources: resources + zoitechat_gtk_sources,
dependencies: zoitechat_gtk_deps,
c_args: zoitechat_gtk_cflags,
link_args: zoitechat_gtk_ldflags,
pie: true,
install: true,
gui_app: true,

View File

@@ -1,4 +1,4 @@
/* HexChat
/* 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) 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) 2021 Patrick Griffis.
*
* This program is free software; you can redistribute it and/or modify
@@ -54,7 +54,7 @@ notification_backend_show (const char *title, const char *text)
text = g_markup_escape_text (text, -1);
g_variant_builder_init (&params, G_VARIANT_TYPE ("(susssasa{sv}i)"));
g_variant_builder_add (&params, "s", "hexchat"); /* App name */
g_variant_builder_add (&params, "s", "zoitechat"); /* App name */
g_variant_builder_add (&params, "u", 0); /* ID, 0 means don't replace */
g_variant_builder_add (&params, "s", "io.github.Hexchat"); /* App icon */
g_variant_builder_add (&params, "s", title);

View File

@@ -1,4 +1,4 @@
/* HexChat
/* 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) 2015 Arnav Singh.
*
* This program is free software; you can redistribute it and/or modify
@@ -16,7 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "hexchat.h"
#include "zoitechat.h"
#include "plugin.h"
#include <gmodule.h>

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