Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/commands.c @ 641:62679532ea55
Allow special jid "." in commands /add and /status_to
This special jid is the jid of the current buddy.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 28 Dec 2005 19:05:11 +0100 |
parents | 1cd7f8e3895b |
children | 68fb0c1dfb15 |
comparison
equal
deleted
inserted
replaced
640:1cd7f8e3895b | 641:62679532ea55 |
---|---|
504 free_arg_lst(paramlst); | 504 free_arg_lst(paramlst); |
505 return; | 505 return; |
506 } | 506 } |
507 | 507 |
508 // Allow things like /status_to "" away | 508 // Allow things like /status_to "" away |
509 if (!*jid) | 509 if (!*jid || !strcmp(jid, ".")) |
510 jid = NULL; | 510 jid = NULL; |
511 | 511 |
512 if (jid) { | 512 if (jid) { |
513 // The JID has been specified. Quick check... | 513 // The JID has been specified. Quick check... |
514 if (check_jid_syntax(jid)) { | 514 if (check_jid_syntax(jid)) { |
552 id = *paramlst; | 552 id = *paramlst; |
553 nick = *(paramlst+1); | 553 nick = *(paramlst+1); |
554 | 554 |
555 if (!id) | 555 if (!id) |
556 nick = NULL; // Allow things like: /add "" nick | 556 nick = NULL; // Allow things like: /add "" nick |
557 else if (!*id) | 557 else if (!*id || !strcmp(id, ".")) |
558 id = NULL; | 558 id = NULL; |
559 | 559 |
560 if (id) { | 560 if (id) { |
561 // The JID has been specified. Quick check... | 561 // The JID has been specified. Quick check... |
562 if (check_jid_syntax(id)) { | 562 if (check_jid_syntax(id)) { |