i'd like to see antispam features...
[mirrors/libpurple-core-answerscripts.git] / answerscripts.c
index 0ad50d7c70a0e30f118bf1691219902078215f11..3e629db9a4191d6e118556a35f0868d9de96069f 100755 (executable)
@@ -46,7 +46,10 @@ typedef struct {
 } answerscripts_job;
 
 const void *check_null(const void *pointer) {
 } answerscripts_job;
 
 const void *check_null(const void *pointer) {
-       if(pointer == NULL) return "";
+       if(pointer == NULL) {
+               fprintf(stderr, "NULL pointer detected in answerscripts!\n");
+               return "";
+       }
        return pointer;
 }
 
        return pointer;
 }
 
@@ -220,7 +223,7 @@ static PurplePluginInfo info = {
 
        "core-answerscripts",
        "AnswerScripts",
 
        "core-answerscripts",
        "AnswerScripts",
-       "0.5.3",
+       "0.5.4",
        "Framework for hooking scripts to process received messages for libpurple clients",
        "\nThis plugin will execute script \"~/.purple/" ANSWERSCRIPT "\" "
                "(or any other executable called \"" ANSWERSCRIPT "\" and found in purple_user_dir()) "
        "Framework for hooking scripts to process received messages for libpurple clients",
        "\nThis plugin will execute script \"~/.purple/" ANSWERSCRIPT "\" "
                "(or any other executable called \"" ANSWERSCRIPT "\" and found in purple_user_dir()) "
@@ -248,12 +251,12 @@ static PurplePluginInfo info = {
 
 static void init_plugin(PurplePlugin * plugin) {
        //Export static environment variables
 
 static void init_plugin(PurplePlugin * plugin) {
        //Export static environment variables
-       #ifndef __x86_64__ //Workaround for x86_64 (where this causes problems for unknown reason)
+       //#ifndef __x86_64__ //Workaround for x86_64 (where this causes problems for unknown reason)
                const char * core_ui = check_null(purple_core_get_ui());
                const char * core_version = check_null(purple_core_get_version());
                setenv(ENV_PREFIX "L_AGENT", (char *) core_ui, 1);      //ID of IM client used with answerscripts
                setenv(ENV_PREFIX "L_AGENT_VERSION", (char *) core_version, 1); //Version of client
                const char * core_ui = check_null(purple_core_get_ui());
                const char * core_version = check_null(purple_core_get_version());
                setenv(ENV_PREFIX "L_AGENT", (char *) core_ui, 1);      //ID of IM client used with answerscripts
                setenv(ENV_PREFIX "L_AGENT_VERSION", (char *) core_version, 1); //Version of client
-       #endif
+       //#endif
 }
 
 PURPLE_INIT_PLUGIN(autoanswer, init_plugin, info)
 }
 
 PURPLE_INIT_PLUGIN(autoanswer, init_plugin, info)
This page took 0.117747 seconds and 4 git commands to generate.