[mw-devel] [Git][arthur/mw][master] Use the message's timestamp when receiving wiz messages

Andrew Price welshbyte at sucs.org
Sun Nov 19 18:48:30 GMT 2017


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
e27f8078 by Andrew Price at 2017-11-19T18:47:33+00:00
Use the message's timestamp when receiving wiz messages

- - - - -


1 changed file:

- src/client/incoming.c


Changes:

=====================================
src/client/incoming.c
=====================================
--- a/src/client/incoming.c
+++ b/src/client/incoming.c
@@ -50,7 +50,7 @@ static void force_vtext(ipc_message_t *msg, const char *from, const char *format
 static void force_ipc(char *text, char *from);
 static void force_rpc(char *text, char *from);
 static void force_checkonoff(char *text, char *from);
-static void force_wiz(char *text, char *from);
+static void force_wiz(ipc_message_t *msg, char *text, char *from);
 static void force_chatmode(char *text, unsigned long theirprivs, const char *from);
 static void force_status(char *text, char *from);
 static void force_channel(char *text, char *from, unsigned long theirprivs);
@@ -764,7 +764,7 @@ static void accept_pipe_cmd(ipc_message_t *msg, struct user *mesg_user)
 			force_checkonoff(newbuff, mesg_user->record.name);
 			break;
 		case IPC_WIZ:
-			force_wiz(newbuff, mesg_user->record.name);
+			force_wiz(msg, newbuff, mesg_user->record.name);
 			break;
 		case IPC_CHANNEL:
 			force_channel(newbuff, mesg_user->record.name, mesg_user->record.chatprivs);
@@ -855,7 +855,7 @@ static void force_text(ipc_message_t *msg, const char *text, const char *from)
 	InsertMesg(mesg);
 }
 
-static void force_wiz(char *newbuff, char *from)
+static void force_wiz(ipc_message_t *msg, char *newbuff, char *from)
 {
 	char tb[MAXTEXTLENGTH];
 	tb[0]=0;
@@ -865,7 +865,7 @@ static void force_wiz(char *newbuff, char *from)
 		time_t t;
 		struct tm *tt;
 
-		t=time(0);
+		t = msg->head.when;
 		tt=localtime(&t);
 		strftime(tb, MAXTEXTLENGTH,"%H:%M ", tt);
 	}



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/e27f8078d9d4aad0e72b6e8f3a1e9c468f16a401

---
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/e27f8078d9d4aad0e72b6e8f3a1e9c468f16a401
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20171119/1f424374/attachment-0001.html>


More information about the mw-devel mailing list