[mw-devel] [Git][arthur/mw][master] Give a name to the plain gag and stop it being an error. fixes #10

Justin Mitchell arthur at sucs.org
Wed Jan 13 16:52:36 GMT 2016


Justin Mitchell pushed to branch master at Justin Mitchell / mw


Commits:
2edf7464 by Justin Mitchell at 2016-01-13T16:52:21Z
Give a name to the plain gag and stop it being an error. fixes #10

- - - - -


2 changed files:

- src/gags.c
- src/server/actions.c


Changes:

=====================================
src/gags.c
=====================================
--- a/src/gags.c
+++ b/src/gags.c
@@ -47,7 +47,7 @@ char *apply_bork(char *text, const gag_pattern_t *list, int caps);
  ****/
 
 GagInfo gaglist[]={
-{"","Gag", "Ungag",
+{"gag","Gag", "Ungag",
    "You have just been gagged!",
    "You have been ungagged. You can now talk normally",
    gag_normal},


=====================================
src/server/actions.c
=====================================
--- a/src/server/actions.c
+++ b/src/server/actions.c
@@ -165,8 +165,8 @@ void accept_action(ipc_connection_t *conn, ipc_message_t *msg)
 		const char *gagtype = json_getstring(j, "gag");
 
 		if (gagtype == NULL) {
-			send_error(conn, msg, "Missing gag type");
-			return;
+			/* the original, and best */
+			gagtype = "gag";
 		}
 
 		int gtnum = gag_code(gagtype);



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/2edf74646e486da257a28eceb561dd0e5d8c6163
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20160113/7d4b7298/attachment.html>


More information about the mw-devel mailing list