mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-11 08:20:17 +00:00
new name after fork
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* HexChat
|
||||
/* ZoiteChat
|
||||
* Copyright (c) 2011-2012 Berke Viktor.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
@@ -23,11 +23,11 @@
|
||||
#include <windows.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "hexchat-plugin.h"
|
||||
#include "zoitechat-plugin.h"
|
||||
|
||||
static hexchat_plugin *ph; /* plugin handle */
|
||||
static zoitechat_plugin *ph; /* plugin handle */
|
||||
static char name[] = "Exec";
|
||||
static char desc[] = "Execute commands inside HexChat";
|
||||
static char desc[] = "Execute commands inside ZoiteChat";
|
||||
static char version[] = "1.2";
|
||||
|
||||
static int
|
||||
@@ -100,12 +100,12 @@ run_command (char *word[], char *word_eol[], void *userdata)
|
||||
token = strtok_s (buffer, "\n", &context);
|
||||
while (token != NULL)
|
||||
{
|
||||
hexchat_commandf (ph, "SAY %s", token);
|
||||
zoitechat_commandf (ph, "SAY %s", token);
|
||||
token = strtok_s (NULL, "\n", &context);
|
||||
}
|
||||
}
|
||||
else
|
||||
hexchat_printf (ph, "%s", buffer);
|
||||
zoitechat_printf (ph, "%s", buffer);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -118,11 +118,11 @@ run_command (char *word[], char *word_eol[], void *userdata)
|
||||
|
||||
/* display a newline to separate things */
|
||||
if (!announce)
|
||||
hexchat_printf (ph, "\n");
|
||||
zoitechat_printf (ph, "\n");
|
||||
|
||||
if (timeElapsed >= 10)
|
||||
{
|
||||
hexchat_printf (ph, "Command took too much time to run, execution aborted.\n");
|
||||
zoitechat_printf (ph, "Command took too much time to run, execution aborted.\n");
|
||||
}
|
||||
|
||||
CloseHandle (readPipe);
|
||||
@@ -131,14 +131,14 @@ run_command (char *word[], char *word_eol[], void *userdata)
|
||||
}
|
||||
else
|
||||
{
|
||||
hexchat_command (ph, "help exec");
|
||||
zoitechat_command (ph, "help exec");
|
||||
}
|
||||
|
||||
return HEXCHAT_EAT_HEXCHAT;
|
||||
}
|
||||
|
||||
int
|
||||
hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
|
||||
zoitechat_plugin_init (zoitechat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
|
||||
{
|
||||
ph = plugin_handle;
|
||||
|
||||
@@ -146,15 +146,15 @@ hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **p
|
||||
*plugin_desc = desc;
|
||||
*plugin_version = version;
|
||||
|
||||
hexchat_hook_command (ph, "EXEC", HEXCHAT_PRI_NORM, run_command, "Usage: /EXEC [-O] - execute commands inside HexChat", 0);
|
||||
hexchat_printf (ph, "%s plugin loaded\n", name);
|
||||
zoitechat_hook_command (ph, "EXEC", HEXCHAT_PRI_NORM, run_command, "Usage: /EXEC [-O] - execute commands inside ZoiteChat", 0);
|
||||
zoitechat_printf (ph, "%s plugin loaded\n", name);
|
||||
|
||||
return 1; /* return 1 for success */
|
||||
}
|
||||
|
||||
int
|
||||
hexchat_plugin_deinit (void)
|
||||
zoitechat_plugin_deinit (void)
|
||||
{
|
||||
hexchat_printf (ph, "%s plugin unloaded\n", name);
|
||||
zoitechat_printf (ph, "%s plugin unloaded\n", name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
EXPORTS
|
||||
hexchat_plugin_init
|
||||
hexchat_plugin_deinit
|
||||
zoitechat_plugin_init
|
||||
zoitechat_plugin_deinit
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="..\..\win32\hexchat.props" />
|
||||
<Import Project="..\..\win32\zoitechat.props" />
|
||||
<PropertyGroup>
|
||||
<TargetName>hcexec</TargetName>
|
||||
<OutDir>$(HexChatRel)plugins\</OutDir>
|
||||
<OutDir>$(ZoiteChatRel)plugins\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
shared_module('exec', 'exec.c',
|
||||
dependencies: hexchat_plugin_dep,
|
||||
dependencies: zoitechat_plugin_dep,
|
||||
install: true,
|
||||
install_dir: plugindir,
|
||||
vs_module_defs: 'exec.def',
|
||||
|
||||
Reference in New Issue
Block a user