diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/char/int_auction.c | 20 | ||||
-rw-r--r-- | src/char/int_mail.c | 24 | ||||
-rw-r--r-- | src/char/int_mail.h | 4 |
3 files changed, 24 insertions, 24 deletions
diff --git a/src/char/int_auction.c b/src/char/int_auction.c index 6982f5628..7a5a8b2fb 100644 --- a/src/char/int_auction.c +++ b/src/char/int_auction.c @@ -144,12 +144,12 @@ static int inter_auction_end_timer(int tid, int64 tick, int id, intptr_t data) { { if( auction->buyer_id ) { - mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "Thanks, you won the auction!.", 0, &auction->item); + inter_mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "Thanks, you won the auction!.", 0, &auction->item); mapif_Auction_message(auction->buyer_id, 6); // You have won the auction - mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "Payment for your auction!.", auction->price, NULL); + inter_mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "Payment for your auction!.", auction->price, NULL); } else - mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "No buyers have been found for your auction.", 0, &auction->item); + inter_mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "No buyers have been found for your auction.", 0, &auction->item); ShowInfo("Auction End: id %u.\n", auction->auction_id); @@ -352,7 +352,7 @@ static void mapif_parse_Auction_cancel(int fd) return; } - mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "Auction canceled.", 0, &auction->item); + inter_mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "Auction canceled.", 0, &auction->item); inter_auction_delete(auction); mapif_Auction_cancel(fd, char_id, 0); // The auction has been canceled @@ -391,9 +391,9 @@ static void mapif_parse_Auction_close(int fd) } // Send Money to Seller - mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "Auction closed.", auction->price, NULL); + inter_mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "Auction closed.", auction->price, NULL); // Send Item to Buyer - mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "Auction winner.", 0, &auction->item); + inter_mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "Auction winner.", 0, &auction->item); mapif_Auction_message(auction->buyer_id, 6); // You have won the auction inter_auction_delete(auction); @@ -432,11 +432,11 @@ static void mapif_parse_Auction_bid(int fd) { // Send Money back to the previous Buyer if( auction->buyer_id != char_id ) { - mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "Someone has placed a higher bid.", auction->price, NULL); + inter_mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "Someone has placed a higher bid.", auction->price, NULL); mapif_Auction_message(auction->buyer_id, 7); // You have failed to win the auction } else - mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "You have placed a higher bid.", auction->price, NULL); + inter_mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "You have placed a higher bid.", auction->price, NULL); } auction->buyer_id = char_id; @@ -447,9 +447,9 @@ static void mapif_parse_Auction_bid(int fd) { // Automatic won the auction mapif_Auction_bid(fd, char_id, bid - auction->buynow, 1); // You have successfully bid in the auction - mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "You have won the auction.", 0, &auction->item); + inter_mail_sendmail(0, "Auction Manager", auction->buyer_id, auction->buyer_name, "Auction", "You have won the auction.", 0, &auction->item); mapif_Auction_message(char_id, 6); // You have won the auction - mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "Payment for your auction!.", auction->buynow, NULL); + inter_mail_sendmail(0, "Auction Manager", auction->seller_id, auction->seller_name, "Auction", "Payment for your auction!.", auction->buynow, NULL); inter_auction_delete(auction); return; diff --git a/src/char/int_mail.c b/src/char/int_mail.c index 47d2cc1c5..dcc0eaaed 100644 --- a/src/char/int_mail.c +++ b/src/char/int_mail.c @@ -20,7 +20,7 @@ #include "../common/strlib.h" #include "../common/timer.h" -static int mail_fromsql(int char_id, struct mail_data* md) +static int inter_mail_fromsql(int char_id, struct mail_data* md) { int i, j; struct mail_message *msg; @@ -105,7 +105,7 @@ static int mail_fromsql(int char_id, struct mail_data* md) /// Stores a single message in the database. /// Returns the message's ID if successful (or 0 if it fails). -int mail_savemessage(struct mail_message* msg) +int inter_mail_savemessage(struct mail_message* msg) { StringBuf buf; SqlStmt* stmt; @@ -144,7 +144,7 @@ int mail_savemessage(struct mail_message* msg) /// Retrieves a single message from the database. /// Returns true if the operation succeeds (or false if it fails). -static bool mail_loadmessage(int mail_id, struct mail_message* msg) +static bool inter_mail_loadmessage(int mail_id, struct mail_message* msg) { int j; StringBuf buf; @@ -208,7 +208,7 @@ static void mapif_Mail_sendinbox(int fd, int char_id, unsigned char flag) { struct mail_data md; memset(&md, 0, sizeof(md)); - mail_fromsql(char_id, &md); + inter_mail_fromsql(char_id, &md); //FIXME: dumping the whole structure like this is unsafe [ultramage] WFIFOHEAD(fd, sizeof(md) + 9); @@ -238,7 +238,7 @@ static void mapif_parse_Mail_read(int fd) /*========================================== * Client Attachment Request *------------------------------------------*/ -static bool mail_DeleteAttach(int mail_id) +static bool inter_mail_DeleteAttach(int mail_id) { StringBuf buf; int i; @@ -266,7 +266,7 @@ static void mapif_Mail_getattach(int fd, int char_id, int mail_id) struct mail_message msg; memset(&msg, 0, sizeof(msg)); - if( !mail_loadmessage(mail_id, &msg) ) + if( !inter_mail_loadmessage(mail_id, &msg) ) return; if( msg.dest_id != char_id ) @@ -278,7 +278,7 @@ static void mapif_Mail_getattach(int fd, int char_id, int mail_id) if( (msg.item.nameid < 1 || msg.item.amount < 1) && msg.zeny < 1 ) return; // No Attachment - if( !mail_DeleteAttach(mail_id) ) + if( !inter_mail_DeleteAttach(mail_id) ) return; WFIFOHEAD(fd, sizeof(struct item) + 12); @@ -346,7 +346,7 @@ static void mapif_Mail_return(int fd, int char_id, int mail_id) struct mail_message msg; int new_mail = 0; - if( mail_loadmessage(mail_id, &msg) ) + if( inter_mail_loadmessage(mail_id, &msg) ) { if( msg.dest_id != char_id) return; @@ -369,7 +369,7 @@ static void mapif_Mail_return(int fd, int char_id, int mail_id) msg.status = MAIL_NEW; msg.timestamp = time(NULL); - new_mail = mail_savemessage(&msg); + new_mail = inter_mail_savemessage(&msg); mapif_Mail_new(&msg); } } @@ -432,13 +432,13 @@ static void mapif_parse_Mail_send(int fd) msg.status = MAIL_NEW; if( msg.dest_id > 0 ) - msg.id = mail_savemessage(&msg); + msg.id = inter_mail_savemessage(&msg); mapif_Mail_send(fd, &msg); // notify sender mapif_Mail_new(&msg); // notify recipient } -void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item) +void inter_mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item) { struct mail_message msg; memset(&msg, 0, sizeof(struct mail_message)); @@ -455,7 +455,7 @@ void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* msg.timestamp = time(NULL); - mail_savemessage(&msg); + inter_mail_savemessage(&msg); mapif_Mail_new(&msg); } diff --git a/src/char/int_mail.h b/src/char/int_mail.h index 8800061d7..490422c50 100644 --- a/src/char/int_mail.h +++ b/src/char/int_mail.h @@ -8,12 +8,12 @@ struct item; struct mail_message; int inter_mail_parse_frommap(int fd); -void mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item); +void inter_mail_sendmail(int send_id, const char* send_name, int dest_id, const char* dest_name, const char* title, const char* body, int zeny, struct item *item); int inter_mail_sql_init(void); void inter_mail_sql_final(void); -int mail_savemessage(struct mail_message* msg); +int inter_mail_savemessage(struct mail_message* msg); void mapif_Mail_new(struct mail_message *msg); #endif /* CHAR_INT_MAIL_H */ |