static const struct message_entry msgtab[] = {
{ "MSMSG_CANNOT_SEND", "You cannot send to account $b%s$b." },
static const struct message_entry msgtab[] = {
{ "MSMSG_CANNOT_SEND", "You cannot send to account $b%s$b." },
{ "MSMSG_MEMO_SENT", "Message sent to $b%s$b (ID# %d)." },
{ "MSMSG_NO_MESSAGES", "You have no messages." },
{ "MSMSG_MEMOS_FOUND", "Found $b%d$b matches.\nUse /msg $S READ <ID> to read a message." },
{ "MSMSG_MEMO_SENT", "Message sent to $b%s$b (ID# %d)." },
{ "MSMSG_NO_MESSAGES", "You have no messages." },
{ "MSMSG_MEMOS_FOUND", "Found $b%d$b matches.\nUse /msg $S READ <ID> to read a message." },
int reciept = 0, inc = 2;
struct handle_info *hi;
struct memo_account *ma, *sender;
int reciept = 0, inc = 2;
struct handle_info *hi;
struct memo_account *ma, *sender;
- char *flags = argv[2];
- while (*flags) {
- switch (*flags) {
- case '-':
- if (s != 0)
- brk = 1;
- break;
-
- case 'r':
- if (s > 0)
+ inc = 2; /* Start of message on 3rd ([2]) word */
+ if(argv[2][0] == '-' && argv[2][1] != '-') { /* first word is flags ('-r')*/
+ char *flags = argv[2];
+ inc++; /* Start of message is now 1 word later */
+ for(flags++;*flags;flags++) {
+ switch (*flags) {
+ case 'r':
message = unsplit_string(argv + inc, argc - inc, NULL);
memo = add_memo(now, ma, sender, message, 1);
message = unsplit_string(argv + inc, argc - inc, NULL);
memo = add_memo(now, ma, sender, message, 1);