summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Makefile7
-rwxr-xr-xplugins/build.sh31
-rwxr-xr-xplugins/build.sh.old26
-rw-r--r--plugins/pong.cpp44
4 files changed, 7 insertions, 101 deletions
diff --git a/plugins/Makefile b/plugins/Makefile
index f81ebcd..c881e08 100644
--- a/plugins/Makefile
+++ b/plugins/Makefile
@@ -1,3 +1,10 @@
+all:
+ for i in *.cpp; do make $${i%.cpp}.so; done
+
%.so: %.cpp
$(CXX) $(CXXFLAGS) -shared -o $@ $^ ../myfuncs.cpp
+clean:
+ rm *.so *.o
+
+.PHONY: clean all
diff --git a/plugins/build.sh b/plugins/build.sh
deleted file mode 100755
index a9d0158..0000000
--- a/plugins/build.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-CPP="g++"
-if [ "$TARGET" == "fritzbox" -o "$TARGET" == "fb" ]; then
- TARGET="mipsel-linux-uclibc"
-fi
-
-if [ -n "$TARGET" ]; then
- CPP="$TARGET-$CPP";
-fi
-
-fails=""
-for i in $@; do
- echo "building $i";
- if [ -e "$i.additional" ]; then
- add=$(cat "$i.additional")
- else
- add=""
- fi
- $CPP $i ../myfuncs.cpp $add -shared -o "${i%.*}".so || fails="$fails$i "
-done
-
-echo
-
-if [ -n "$fails" ]; then
- for i in $fails; do
- echo "building $i failed!"
- done
-else
- echo "all done!"
-fi
-
-echo
diff --git a/plugins/build.sh.old b/plugins/build.sh.old
deleted file mode 100755
index 00f6a26..0000000
--- a/plugins/build.sh.old
+++ /dev/null
@@ -1,26 +0,0 @@
-CPP="g++"
-if [ "$TARGET" == "fritzbox" -o "$TARGET" == "fb" ]; then
- TARGET="mipsel-linux-uclibc"
-fi
-
-if [ -n "$TARGET" ]; then
- CPP="$TARGET-$CPP";
-fi
-
-fails=""
-for i in $@; do
- echo "building $i";
- $CPP $i ../myfuncs.cpp -shared -o "${i%.*}".so || fails="$fails$i "
-done
-
-echo
-
-if [ -n "$fails" ]; then
- for i in $fails; do
- echo "building $i failed!"
- done
-else
- echo "all done!"
-fi
-
-echo
diff --git a/plugins/pong.cpp b/plugins/pong.cpp
deleted file mode 100644
index b126fc0..0000000
--- a/plugins/pong.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * foo.cpp
- *
- * Copyright 2009 Florian <flo@localhost.localdomain>
- *
- * 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 Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-
-
-#include <iostream>
-#include <string>
-
-using namespace std;
-
-#include "../TConnectionInterface.h"
-#include "../TPluginParentLight.h"
-#include "../mytypes.h"
-#include "../myfuncs.h"
-
-int x;
-
-extern "C" void init(int* csize, int* conndefault, int* chandefault, int* sessdefault)
-{
- *csize=0; *conndefault=PFLAGS_EXEC_ONANYEVENT; *chandefault=0; *sessdefault=0;//return 0; //wir brauchen keinen kontext!
-}
-
-extern "C" void plugin (plugincontext* context, ircmessage msg, TPluginParentLight* parent, int reason)
-{
- if (ucase(msg.command)=="PING")
- parent->get_parent()->send("PONG :" + msg.content+NEWLINE);
-}