diff --git a/src/sbbs3/postmsg.cpp b/src/sbbs3/postmsg.cpp index 82370af3d2301831a4e0a8a4d3fd9330bf6121ad..01b8a6c13e3ffd3766febadbd0c2df7a31e2809e 100644 --- a/src/sbbs3/postmsg.cpp +++ b/src/sbbs3/postmsg.cpp @@ -1,5 +1,3 @@ -/* postmsg.cpp */ - /* Synchronet user create/post public message routine */ /* $Id$ */ @@ -587,7 +585,6 @@ extern "C" int DLLCALL votemsg(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, const cha ,cfg->grp[cfg->sub[smb->subnum]->grp]->sname ,cfg->sub[smb->subnum]->sname ,from - ,(msg->hdr.attr&MSG_UPVOTE) ? "Up":"Down" ,remsg.subj); putsmsg(cfg, user.number, smsg); } diff --git a/src/sbbs3/qwk.cpp b/src/sbbs3/qwk.cpp index 1570db297f08ad970961daa0574ea3b857bc00e3..d16b9514d0a7797403f62249a0cd8a73648fc5de 100644 --- a/src/sbbs3/qwk.cpp +++ b/src/sbbs3/qwk.cpp @@ -1054,7 +1054,7 @@ bool sbbs_t::qwk_voting(const char* fname, smb_net_type_t net_type) smb.subnum = subnum; } int i; - if((i=votemsg(&cfg, &smb, &msg, text[MsgVoteNotice])) != SMB_SUCCESS) + if((i=votemsg(&cfg, &smb, &msg, text[msg.hdr.attr == MSG_UPVOTE ? MsgUpVoteNotice:MsgDownVoteNotice])) != SMB_SUCCESS) errormsg(WHERE,ERR_WRITE,smb.file,i,smb.last_error); } if(smb.subnum != INVALID_SUB) diff --git a/src/sbbs3/readmsgs.cpp b/src/sbbs3/readmsgs.cpp index b98d3c66d065a1d0ccc13f0806bac8b6ba95982a..ceb57bb09c9d5c3d6c32717aa10e365dbce9ca33 100644 --- a/src/sbbs3/readmsgs.cpp +++ b/src/sbbs3/readmsgs.cpp @@ -40,7 +40,7 @@ int sbbs_t::sub_op(uint subnum) return(is_user_subop(&cfg, subnum, &useron, &client)); } -char sbbs_t::msg_listing_flag(uint subnum, smbmsg_t* msg) +char sbbs_t::msg_listing_flag(uint subnum, smbmsg_t* msg, post_t* post) { if(msg->hdr.attr&MSG_DELETE) return '-'; if((stricmp(msg->to,useron.alias)==0 || stricmp(msg->to,useron.name)==0) @@ -48,10 +48,13 @@ char sbbs_t::msg_listing_flag(uint subnum, smbmsg_t* msg) if(msg->hdr.attr&MSG_PERMANENT) return 'p'; if(msg->hdr.attr&MSG_LOCKED) return 'L'; if(msg->hdr.attr&MSG_KILLREAD) return 'K'; - if(msg->hdr.attr&MSG_NOREPLY) return 'r'; + if(msg->hdr.attr&MSG_NOREPLY) return '#'; if(msg->hdr.number > subscan[subnum].ptr) return '*'; if(msg->hdr.attr&MSG_PRIVATE) return 'P'; - if(sub_op(subnum) && msg->hdr.attr&MSG_ANONYMOUS) return 'A'; + if(post->upvotes > post->downvotes) return 'V'; + if(post->upvotes || post->downvotes) return 'v'; + if(msg->hdr.attr&MSG_REPLIED) return 'R'; + if(sub_op(subnum) && msg->hdr.attr&MSG_ANONYMOUS) return 'A'; return ' '; } @@ -73,7 +76,7 @@ long sbbs_t::listmsgs(uint subnum, long mode, post_t *post, long i, long posts) ,msg.hdr.attr&MSG_ANONYMOUS && !sub_op(subnum) ? text[Anonymous] : msg.from ,msg.to - ,msg_listing_flag(subnum, &msg) + ,msg_listing_flag(subnum, &msg, &post[i]) ,msg.subj); smb_freemsgmem(&msg); msg.total_hfields=0; @@ -1060,7 +1063,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find) msg_client_hfields(&vote, &client); smb_hfield_str(&vote, SENDERSERVER, startup->host_name); - if((i=votemsg(&cfg, &smb, &vote, text[MsgVoteNotice])) != SMB_SUCCESS) + if((i=votemsg(&cfg, &smb, &vote, text[vote.hdr.attr&MSG_UPVOTE ? MsgUpVoteNotice : MsgDownVoteNotice])) != SMB_SUCCESS) errormsg(WHERE,ERR_WRITE,smb.file,i,smb.last_error); break; @@ -1405,7 +1408,7 @@ long sbbs_t::searchposts(uint subnum, post_t *post, long start, long posts ,(msg.hdr.attr&MSG_ANONYMOUS) && !sub_op(subnum) ? text[Anonymous] : msg.from ,msg.to - ,msg_listing_flag(subnum, &msg) + ,msg_listing_flag(subnum, &msg, &post[l]) ,msg.subj); found++; } @@ -1460,7 +1463,7 @@ long sbbs_t::showposts_toyou(uint subnum, post_t *post, ulong start, long posts, ,(msg.hdr.attr&MSG_ANONYMOUS) && !SYSOP ? text[Anonymous] : msg.from ,msg.to - ,msg_listing_flag(subnum, &msg) + ,msg_listing_flag(subnum, &msg, &post[l]) ,msg.subj); } } diff --git a/src/sbbs3/sbbs.h b/src/sbbs3/sbbs.h index d69f6dd6436aca2b75a2adce1d72786865d2d80f..f56ea45148eb6d9b62cedb5af03935d4266a5783 100644 --- a/src/sbbs3/sbbs.h +++ b/src/sbbs3/sbbs.h @@ -755,7 +755,7 @@ public: long searchposts(uint subnum, post_t* post, long start, long msgs, const char* find); long showposts_toyou(uint subnum, post_t* post, ulong start, long posts, long mode=0); void msghdr(smbmsg_t* msg); - char msg_listing_flag(uint subnum, smbmsg_t*); + char msg_listing_flag(uint subnum, smbmsg_t*, post_t*); /* chat.cpp */ void chatsection(void); diff --git a/src/sbbs3/text.h b/src/sbbs3/text.h index 6a00f62e1e40922a4c4cc90028b2b571a8858961..d1845dc526884a4ea9868d3b602d27244fe43014 100644 --- a/src/sbbs3/text.h +++ b/src/sbbs3/text.h @@ -824,11 +824,12 @@ enum { ,NodeStatusLogout ,VotingNotAllowed ,VotedAlready + ,R_Voting ,QWKSettingsVoting ,VoteMsgUpDownOrQuit ,MsgVotes - ,MsgVoteNotice - ,R_Voting + ,MsgUpVoteNotice + ,MsgDownVoteNotice ,TOTAL_TEXT }; diff --git a/src/sbbs3/text_defaults.c b/src/sbbs3/text_defaults.c index e228a569568f93dcef93490f305ca5c33366b97b..563a3cd2d928a6bd11bd6a498aa3bd11ed8e2e43 100644 --- a/src/sbbs3/text_defaults.c +++ b/src/sbbs3/text_defaults.c @@ -1287,6 +1287,8 @@ const char * const text_defaults[TOTAL_TEXT]={ "\x6c\x6c\x6f\x77\x65\x64\x20\x68\x65\x72\x65\x2e\x0d\x0a" ,"\x0d\x0a\x01\x68\x01\x72\x49\x27\x6d\x20\x73\x6f\x72\x72\x79\x2c\x20\x79\x6f\x75\x27\x76\x65\x20\x61\x6c\x72\x65\x61\x64\x79\x20" "\x76\x6f\x74\x65\x64\x20\x6f\x6e\x20\x74\x68\x69\x73\x2e\x0d\x0a" + ,"\x0d\x0a\x01\x68\x01\x72\x49\x27\x6d\x20\x73\x6f\x72\x72\x79\x2c\x20\x79\x6f\x75\x27\x72\x65\x20\x6e\x6f\x74\x20\x61\x6c\x6c\x6f" + "\x77\x65\x64\x20\x74\x6f\x20\x76\x6f\x74\x65\x2e\x0d\x0a" ,"\x01\x6e\x01\x62\x5b\x01\x68\x01\x77\x56\x01\x6e\x01\x62\x5d\x20\x01\x68\x49\x6e\x63\x6c\x75\x64\x65\x20\x56\x4f\x54\x49\x4e\x47" "\x2e\x44\x41\x54\x20\x46\x69\x6c\x65\x20\x20\x20\x20\x20\x20\x01\x6e\x01\x62\x3a\x20\x01\x63\x25\x73\x0d\x0a" ,"\x0d\x0a\x56\x6f\x74\x65\x20\x66\x6f\x72\x20\x6d\x65\x73\x73\x61\x67\x65\x3a\x20\x7e\x55\x70\x2c\x20\x7e\x44\x6f\x77\x6e\x2c\x20" @@ -1294,8 +1296,9 @@ const char * const text_defaults[TOTAL_TEXT]={ ,"\x0d\x0a\xb3\x20\x01\x62\x4d\x73\x67\x20\x01\x6e\x01\x62\x3a\x20\x01\x68\x01\x63\x56\x6f\x74\x65\x64\x20\x55\x70\x20\x25\x75\x20" "\x74\x69\x6d\x65\x73\x20\x61\x6e\x64\x20\x44\x6f\x77\x6e\x20\x25\x75\x20\x74\x69\x6d\x65\x73" ,"\x0d\x0a\x01\x6e\x01\x68\x4f\x6e\x20\x25\x73\x2c\x20\x69\x6e\x20\x01\x63\x25\x73\x20\x01\x6e\x01\x63\x25\x73\x0d\x0a\x01\x68\x01" - "\x6d\x25\x73\x20\x01\x63\x25\x73\x01\x6e\x01\x6d\x2d\x76\x6f\x74\x65\x64\x20\x79\x6f\x75\x72\x20\x6d\x65\x73\x73\x61\x67\x65\x3a" + "\x6d\x25\x73\x20\x01\x63\x55\x70\x01\x6e\x01\x6d\x2d\x76\x6f\x74\x65\x64\x20\x79\x6f\x75\x72\x20\x6d\x65\x73\x73\x61\x67\x65\x3a" "\x20\x01\x6e\x01\x68\x25\x73\x0d\x0a" - ,"\x0d\x0a\x01\x68\x01\x72\x49\x27\x6d\x20\x73\x6f\x72\x72\x79\x2c\x20\x79\x6f\x75\x27\x72\x65\x20\x6e\x6f\x74\x20\x61\x6c\x6c\x6f" - "\x77\x65\x64\x20\x74\x6f\x20\x76\x6f\x74\x65\x2e\x0d\x0a" + ,"\x0d\x0a\x01\x6e\x01\x68\x4f\x6e\x20\x25\x73\x2c\x20\x69\x6e\x20\x01\x63\x25\x73\x20\x01\x6e\x01\x63\x25\x73\x0d\x0a\x01\x68\x01" + "\x6d\x25\x73\x20\x01\x72\x44\x6f\x77\x6e\x01\x6e\x01\x6d\x2d\x76\x6f\x74\x65\x64\x20\x79\x6f\x75\x72\x20\x6d\x65\x73\x73\x61\x67" + "\x65\x3a\x20\x01\x6e\x01\x68\x25\x73\x0d\x0a" };