diff -r 94e66990427f -r 4a7cf0f5e85c pep.c --- a/pep.c Thu Jan 21 15:43:39 2010 +0200 +++ b/pep.c Mon Feb 15 18:52:58 2010 +0200 @@ -161,24 +161,10 @@ // release handlers before reconnect static void pep_hh (guint32 hid, hk_arg_t *args, gpointer userdata) { -#ifdef HOOK_POST_CONNECT if (hid == HOOK_POST_CONNECT) pep_register_handlers (); else if (hid == HOOK_PRE_DISCONNECT) pep_unregister_handlers (); -#else - hk_arg_t *arg; - - for (arg = args; arg->name; ++arg) { - if (!strcmp (arg->name, "hook")) { - if (!strcmp (arg->value, "hook-pre-disconnect")) - pep_unregister_handlers (); - else if (!strcmp (arg->value, "hook-post-connect")) - pep_register_handlers (); - return; - } - } -#endif } const gchar *g_module_check_init (GModule *module) @@ -188,11 +174,7 @@ pep_iq_handler = lm_message_handler_new (pep_iq_pubsub_handler, NULL, NULL); // register hook handler -#ifdef HOOK_POST_CONNECT hk_add_handler (pep_hh, HOOK_POST_CONNECT | HOOK_PRE_DISCONNECT, NULL); -#else - hk_add_handler (pep_hh, HOOK_INTERNAL, NULL); -#endif // register handlers to connection pep_register_handlers ();