summary refs log tree commit diff stats
path: root/plugins/doat
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2016-11-08 22:34:31 -0500
committertomek <eustachy.kapusta@gmail.com>2016-11-09 17:29:23 +0100
commit85bdb06cad4e8a58509f7421610ef9c82bbabc02 (patch)
tree49520316d27cb45e4a0f9d8dc2fe9705dfdb4c7f /plugins/doat
parenta0e80ebda2bc9270beb4818a2438d7555593b6fd (diff)
Convert doat to an internal command
- Trivial plugin
- Useful for many users
- Was under a dumb license
Diffstat (limited to 'plugins/doat')
-rw-r--r--plugins/doat/Makefile.am9
-rw-r--r--plugins/doat/doat.c92
-rw-r--r--plugins/doat/doat.def3
-rw-r--r--plugins/doat/doat.vcxproj59
-rw-r--r--plugins/doat/doat.vcxproj.filters23
5 files changed, 0 insertions, 186 deletions
diff --git a/plugins/doat/Makefile.am b/plugins/doat/Makefile.am
deleted file mode 100644
index d8765946..00000000
--- a/plugins/doat/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-libdir = $(hexchatlibdir)
-
-lib_LTLIBRARIES = doat.la
-doat_la_SOURCES = doat.c
-doat_la_LDFLAGS = $(PLUGIN_LDFLAGS) -module
-doat_la_LIBADD = $(GLIB_LIBS)
-doat_la_CPPFLAGS = -I$(top_srcdir)/src/common
-doat_la_CFLAGS = $(GLIB_CFLAGS)
-
diff --git a/plugins/doat/doat.c b/plugins/doat/doat.c
deleted file mode 100644
index 1d1bfcdf..00000000
--- a/plugins/doat/doat.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* This program is free software. It comes without any warranty, to
- * the extent permitted by applicable law. You can redistribute it
- * and/or modify it under the terms of the Do What The Fuck You Want
- * To Public License, Version 2, as published by Sam Hocevar. See
- * http://sam.zoy.org/wtfpl/COPYING or http://lwsitu.com/xchat/COPYING
- * for more details. */
-
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <glib.h>
-#include "hexchat-plugin.h"
-
-static hexchat_plugin *ph;
-
-static int
-parse_command( char *word[], char *word_eol[], void *userdata ) {
-	char *channel = NULL, *server = NULL, *token = NULL;
-/*	char *save_ptr1 = NULL;*/
-	char *str1 = NULL;
-	char *delimiter = NULL;
-
-	hexchat_context *ctx = NULL;
-
-	if( word[2] != NULL && word[3] != NULL ) {
-		for( str1 = word[2]; ; str1 = NULL ) {
-/*			token = strtok_r( str1, ",", &save_ptr1 );*/
-			token = strtok( str1, "," );
-/*			printf( "token: %s\n", token );*/
-
-			if( token == NULL ) {
-				break;
-			}
-
-			channel = g_strdup( token );
-				
-			delimiter = strchr( channel, '/' );
-
-			server = NULL;
-			if( delimiter != NULL ) {
-				*delimiter = '\0';
-
-				if( strlen( delimiter + 1 ) > 0 ) {
-					server = g_strdup( delimiter + 1 );
-				}
-			}
-
-			/* /Network form */
-			if( strlen( channel ) == 0 ) {
-				g_free( channel );
-				channel = NULL;
-			}
-
-/*			printf( "channel[%s] server[%s]\n", channel, server );*/
-
-			if( (ctx = hexchat_find_context( ph, server, channel ) ) != NULL ) {
-				if( hexchat_set_context( ph, ctx ) ) {
-					hexchat_command( ph, word_eol[3] );
-				}
-			}
-
-			g_free( channel );
-			g_free( server );
-		}
-	}
-	return HEXCHAT_EAT_HEXCHAT;
-}
-
-int
-hexchat_plugin_init( hexchat_plugin * plugin_handle, char **plugin_name,
-	char **plugin_desc, char **plugin_version, char *arg ) {
-
-	ph = plugin_handle;
-	*plugin_name = "Do At";
-	*plugin_version = "1.0001";
-	*plugin_desc = "Perform an arbitrary command on multiple channels";
-
-	hexchat_hook_command( ph, "doat", HEXCHAT_PRI_NORM, parse_command, "DOAT [channel,list,/network] [command], perform a command on multiple contexts", NULL );
-
-	hexchat_print (ph, "Do At plugin loaded\n");
-
-	return 1;
-}
-
-int
-hexchat_plugin_deinit (void)
-{
-	hexchat_print (ph, "Do At plugin unloaded\n");
-	return 1;
-}
diff --git a/plugins/doat/doat.def b/plugins/doat/doat.def
deleted file mode 100644
index e560f50f..00000000
--- a/plugins/doat/doat.def
+++ /dev/null
@@ -1,3 +0,0 @@
-EXPORTS 

-hexchat_plugin_init 

-hexchat_plugin_deinit 

diff --git a/plugins/doat/doat.vcxproj b/plugins/doat/doat.vcxproj
deleted file mode 100644
index f11dac64..00000000
--- a/plugins/doat/doat.vcxproj
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <PropertyGroup Label="Configuration">

-    <PlatformToolset>v140</PlatformToolset>

-    <ConfigurationType>DynamicLibrary</ConfigurationType>

-  </PropertyGroup>

-  <ItemGroup Label="ProjectConfigurations">

-    <ProjectConfiguration Include="Release|Win32">

-      <Configuration>Release</Configuration>

-      <Platform>Win32</Platform>

-    </ProjectConfiguration>

-    <ProjectConfiguration Include="Release|x64">

-      <Configuration>Release</Configuration>

-      <Platform>x64</Platform>

-    </ProjectConfiguration>

-  </ItemGroup>

-  <PropertyGroup Label="Globals">

-    <ProjectGuid>{4980AF24-9D42-427D-A8E6-0DF3B97C455D}</ProjectGuid>

-    <Keyword>Win32Proj</Keyword>

-    <RootNamespace>doat</RootNamespace>

-  </PropertyGroup>

-  <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" />

-  <PropertyGroup>

-    <TargetName>hcdoat</TargetName>

-    <OutDir>$(HexChatRel)plugins\</OutDir>

-  </PropertyGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">

-    <ClCompile>

-      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <AdditionalIncludeDirectories>..\..\src\common;$(HexChatLib);$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>

-      <ModuleDefinitionFile>doat.def</ModuleDefinitionFile>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

-    <ClCompile>

-      <PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>

-      <AdditionalIncludeDirectories>..\..\src\common;$(HexChatLib);$(Glib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

-    </ClCompile>

-    <Link>

-      <AdditionalLibraryDirectories>$(DepsRoot)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>

-      <AdditionalDependencies>$(DepLibs);%(AdditionalDependencies)</AdditionalDependencies>

-      <ModuleDefinitionFile>doat.def</ModuleDefinitionFile>

-    </Link>

-  </ItemDefinitionGroup>

-  <ItemGroup>

-    <ClCompile Include="doat.c" />

-  </ItemGroup>

-  <ItemGroup>

-    <None Include="doat.def" />

-  </ItemGroup>

-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

-</Project>

diff --git a/plugins/doat/doat.vcxproj.filters b/plugins/doat/doat.vcxproj.filters
deleted file mode 100644
index 43ea8307..00000000
--- a/plugins/doat/doat.vcxproj.filters
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>

-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

-  <ItemGroup>

-    <Filter Include="Source Files">

-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>

-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>

-    </Filter>

-    <Filter Include="Resource Files">

-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>

-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>

-    </Filter>

-  </ItemGroup>

-  <ItemGroup>

-    <ClCompile Include="doat.c">

-      <Filter>Source Files</Filter>

-    </ClCompile>

-  </ItemGroup>

-  <ItemGroup>

-    <None Include="doat.def">

-      <Filter>Resource Files</Filter>

-    </None>

-  </ItemGroup>

-</Project>
\ No newline at end of file