Add save command in prompt, fixed issue #28
This commit is contained in:
parent
aced38a44b
commit
cec57b69ed
2 changed files with 15 additions and 0 deletions
|
|
@ -133,6 +133,20 @@ def join(data, toks, context, prompt):
|
|||
srv.leave(toks[rd])
|
||||
return
|
||||
|
||||
def save_mod(data, toks, context, prompt):
|
||||
"""Force save module data"""
|
||||
if len(toks) < 2:
|
||||
print ("save: not enough arguments.")
|
||||
return
|
||||
|
||||
for mod in toks[1:]:
|
||||
if mod in context.modules:
|
||||
context.modules[mod].save()
|
||||
print ("save: module `%s´ saved successfully" % mod)
|
||||
else:
|
||||
print ("save: no module named `%s´" % mod)
|
||||
return
|
||||
|
||||
def send(data, toks, context, prompt):
|
||||
"""Send a message on a channel"""
|
||||
rd = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue