comparison mcabber/src/hooks.c @ 1357:7bbfb0073f88

Fix an UTF-8 problem in new hook_execute_internal() function There could be a double UTF-8 encoding, if the user has a non-utf8 locale. BTW improve bindcommand() -- unnecessary string duplication.
author Mikael Berthe <mikael@lilotux.net>
date Sun, 11 Nov 2007 11:29:16 +0100
parents 9716cf8a0726
children 7daf906fbcdc
comparison
equal deleted inserted replaced
1356:7794d76ca90e 1357:7bbfb0073f88
346 return; 346 return;
347 347
348 buf = g_strdup_printf("Running %s...", hookname); 348 buf = g_strdup_printf("Running %s...", hookname);
349 scr_LogPrint(LPRINT_LOGNORM, "%s", buf); 349 scr_LogPrint(LPRINT_LOGNORM, "%s", buf);
350 350
351 cmdline = g_strdup_printf(mkcmdstr("%s"), hook_command); 351 cmdline = from_utf8(hook_command);
352 process_command(hook_command, TRUE); // XXX Note: /quit won't work. 352 process_command(cmdline, TRUE); // XXX Note: /quit won't work.
353 353
354 g_free(cmdline); 354 g_free(cmdline);
355 g_free(buf); 355 g_free(buf);
356 } 356 }
357 357