From 85bdb06cad4e8a58509f7421610ef9c82bbabc02 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Tue, 8 Nov 2016 22:34:31 -0500 Subject: Convert doat to an internal command - Trivial plugin - Useful for many users - Was under a dumb license --- plugins/Makefile.am | 6 +-- plugins/doat/Makefile.am | 9 ---- plugins/doat/doat.c | 92 --------------------------------------- plugins/doat/doat.def | 3 -- plugins/doat/doat.vcxproj | 59 ------------------------- plugins/doat/doat.vcxproj.filters | 23 ---------- 6 files changed, 1 insertion(+), 191 deletions(-) delete mode 100644 plugins/doat/Makefile.am delete mode 100644 plugins/doat/doat.c delete mode 100644 plugins/doat/doat.def delete mode 100644 plugins/doat/doat.vcxproj delete mode 100644 plugins/doat/doat.vcxproj.filters (limited to 'plugins') diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 018cb924..3880f15d 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -10,10 +10,6 @@ if DO_PERL perldir = perl endif -if DO_DOAT -doatdir = doat -endif - if DO_FISHLIM fishlimdir = fishlim endif @@ -26,4 +22,4 @@ if DO_SYSINFO sysinfodir = sysinfo endif -SUBDIRS = $(lua) $(pythondir) $(perldir) $(checksumdir) $(doatdir) $(fishlimdir) $(sysinfodir) +SUBDIRS = $(lua) $(pythondir) $(perldir) $(checksumdir) $(fishlimdir) $(sysinfodir) 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 -#include -#include -#include -#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 @@ - - - - v140 - DynamicLibrary - - - - Release - Win32 - - - Release - x64 - - - - {4980AF24-9D42-427D-A8E6-0DF3B97C455D} - Win32Proj - doat - - - - - - - hcdoat - $(HexChatRel)plugins\ - - - - WIN32;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions) - ..\..\src\common;$(HexChatLib);$(Glib);%(AdditionalIncludeDirectories) - - - $(DepsRoot)\lib;%(AdditionalLibraryDirectories) - $(DepLibs);%(AdditionalDependencies) - doat.def - - - - - WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;DOAT_EXPORTS;%(PreprocessorDefinitions) - ..\..\src\common;$(HexChatLib);$(Glib);%(AdditionalIncludeDirectories) - - - $(DepsRoot)\lib;%(AdditionalLibraryDirectories) - $(DepLibs);%(AdditionalDependencies) - doat.def - - - - - - - - - - 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 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file -- cgit 1.4.1