[mw-devel] [Git][arthur/mw][master] Remove force_list and K_BIND_FORCE

Andrew Price welshbyte at sucs.org
Mon Nov 5 12:46:52 GMT 2018


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
4dbf0632 by Andrew Price at 2018-11-05T12:45:16+00:00
Remove force_list and K_BIND_FORCE

- - - - -


6 changed files:

- src/client/alias.c
- src/client/alias.h
- src/client/init.c
- src/client/js-duk.c
- src/client/main.c
- src/client/talker.c


Changes:

=====================================
src/client/alias.c
=====================================
--- a/src/client/alias.c
+++ b/src/client/alias.c
@@ -17,7 +17,6 @@ alias *rpc_list = NULL;
 alias *event_list = NULL;
 alias *onoff_list = NULL;
 alias *ipc_list = NULL;
-alias *force_list = NULL;
 alias *shutdown_list = NULL;
 alias *eventin_list = NULL;
 


=====================================
src/client/alias.h
=====================================
--- a/src/client/alias.h
+++ b/src/client/alias.h
@@ -22,7 +22,6 @@ extern alias *rpc_list;
 extern alias *event_list;
 extern alias *onoff_list;
 extern alias *ipc_list;
-extern alias *force_list;
 extern alias *shutdown_list;
 extern alias *eventin_list;
 


=====================================
src/client/init.c
=====================================
--- a/src/client/init.c
+++ b/src/client/init.c
@@ -312,18 +312,7 @@ static int ReadInitFile(const char *base, const char *filename)
 		/* allow user to bind force functions */
 		if (!strcasecmp(a, "force"))
 		{
-			if ((b=strtok(NULL," \t\n\r"))==NULL)
-			{
-				printf(_("Malformed force bind in %s at line %d\n"),filename,lineno);
-				free(backup);
-				free(header);
-				continue;
-			}
-
-			if (AddLink(&force_list, b, ""))
-			{
-				printf(_("Force bind already exists. Useless instruction at line %d in %s.\n"), lineno, filename);
-			}
+			/* force has been removed - this is a no-op */
 		}else
 		/* load mw-script functions */
 		if (!strcasecmp(a,"function"))


=====================================
src/client/js-duk.c
=====================================
--- a/src/client/js-duk.c
+++ b/src/client/js-duk.c
@@ -43,7 +43,6 @@ const struct binding bindings[] = {
 	{ K_BIND_ALIAS, 1, &alias_list, "Alias" },
 	{ K_BIND_EVENT, 0, &event_list, "Event bind" },
 	{ K_BIND_ONOFF, 0, &onoff_list, "Check on/off bind" },
-	{ K_BIND_FORCE, 0, &force_list, "Force bind" },
 	{ K_BIND_SHUTDOWN, 0, &shutdown_list, "Shutdown bind" },
 	{ K_BIND_INPUT, 0, &eventin_list, "Input event bind" },
 	{ 0, 0, NULL, NULL }


=====================================
src/client/main.c
=====================================
--- a/src/client/main.c
+++ b/src/client/main.c
@@ -885,7 +885,6 @@ void close_down(int logofftype, char *sourceuser, char *reason)
 	DestroyAllLinks(&event_list);
 	DestroyAllLinks(&onoff_list);
 	DestroyAllLinks(&ipc_list);
-	DestroyAllLinks(&force_list);
 	DestroyAllLinks(&shutdown_list);
 
 	ScriptCleanup();


=====================================
src/client/talker.c
=====================================
--- a/src/client/talker.c
+++ b/src/client/talker.c
@@ -357,7 +357,6 @@ void t_restart(CommandList *cm, int argc, const char **argv, char *args)
 	DestroyAllLinks(&eventin_list); eventin_list = NULL;
 	DestroyAllLinks(&onoff_list); onoff_list = NULL;
 	DestroyAllLinks(&ipc_list); ipc_list = NULL;
-	DestroyAllLinks(&force_list); force_list = NULL;
 	DestroyAllLinks(&shutdown_list); shutdown_list = NULL;
 
 	stop_js();



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

-- 
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/4dbf06322aa3f445ec2182410089d1a058a9657c
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/20181105/f017b08c/attachment-0001.html>


More information about the mw-devel mailing list