# HG changeset patch # User Mikael Berthe # Date 1203763774 -3600 # Node ID 0c030b00306d0ab352d273bda4cce4a6b328531b # Parent 46e5eb9917bc901dd8a7fcd220d2d9425c3f5869 Allow the special JID "." in command say_to diff -r 46e5eb9917bc -r 0c030b00306d mcabber/src/commands.c --- a/mcabber/src/commands.c Sat Feb 23 11:42:07 2008 +0100 +++ b/mcabber/src/commands.c Sat Feb 23 11:49:34 2008 +0100 @@ -1443,7 +1443,16 @@ fjid = *paramlst; msg = *(paramlst+1); - if (!strcmp(fjid, ".") || check_jid_syntax(fjid)) { + if (!strcmp(fjid, ".")) { + // Send the message to the current buddy + if (current_buddy) + fjid = (char*)buddy_getjid(BUDDATA(current_buddy)); + if (!fjid) { + scr_LogPrint(LPRINT_NORMAL, "Please specify a Jabber ID."); + free_arg_lst(paramlst); + return; + } + } else if (check_jid_syntax(fjid)) { scr_LogPrint(LPRINT_NORMAL, "Please specify a valid Jabber ID."); free_arg_lst(paramlst); return;