aboutsummaryrefslogtreecommitdiff
path: root/modules/say.py
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-11-07 15:35:55 +0100
committerKarel Kočí <cynerd@email.cz>2015-11-07 15:35:55 +0100
commitccc21b09f752d583e3fdca694cd94e61a9fbaa69 (patch)
tree1cf19174ddcbd39c2dc05557823b5f7d9fc169ec /modules/say.py
parent2a7c2861b69da4570e90be17ad5e0f36b3ec0527 (diff)
downloadmcserver-wrapper-ccc21b09f752d583e3fdca694cd94e61a9fbaa69.tar.gz
mcserver-wrapper-ccc21b09f752d583e3fdca694cd94e61a9fbaa69.tar.bz2
mcserver-wrapper-ccc21b09f752d583e3fdca694cd94e61a9fbaa69.zip
Remove modules
Modules are not used any more. They are now useless.
Diffstat (limited to 'modules/say.py')
-rw-r--r--modules/say.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/modules/say.py b/modules/say.py
deleted file mode 100644
index 64810e0..0000000
--- a/modules/say.py
+++ /dev/null
@@ -1,49 +0,0 @@
-import sys
-import re
-import utils
-from utils import conf
-
-services = (
- utils.Service.action,
- )
-
-def action(args):
- if conf.action == None:
- if args[0].lower() != 'say':
- return False
- conf.action = 'say'
- conf.action_module = sys.modules[__name__]
- conf.sayMessage = []
- for arg in args[1:]:
- if conf.identifier == None:
- conf.identifier = arg
- else:
- conf.sayMessage.append(arg)
- return len(args)
- else:
- return 0
-
-def action_exec():
- if not conf.sayMessage or not conf.identifier:
- action_full_help()
- return
- if not utils.isServerRunning():
- sys.exit("Server is not running or wrong identifier.")
- with open(sconf.inputPipe, 'w') as f:
- f.write("/say " + ' '.join(map(str, sconf.saymessage)) + '\n')
- f.flush()
-
-def action_help():
- print(' say')
- print(' Sends message to Minecraft server chat.')
-
-def action_full_help():
- print('mcwrapper [arguments...] say IDENTIFIER {message...}')
- print(' Sends message to Minecraft server chat.')
- print('')
- print(' arguments')
- utils.printArgumentsHelp()
- print(' IDENTIFIER')
- print(' Identifier of running server instance.')
- print(' message')
- print(' Message to be send to Minecraft server chat.')