barneygale / mark2

minecraft server wrapper, written in python with twisted
Other
105 stars 27 forks source link

~restart command? not working as in the scripts.txt samples? #32

Closed SupaYoshi closed 11 years ago

SupaYoshi commented 11 years ago

Hello, i tried the restart sample as it is in the samples of mark2 but ~restart wont work.

Can someone please explain why it isnt?

Thanks!

Would like it for the custom reboot message ;)

http://pastebin.com/5wZxwziL

barneygale commented 11 years ago

You're trying to run ~restart at 1:46am every day?

barneygale commented 11 years ago

Just saw your comments in #mcdevs (I'm Stormx2 on freenode fyi).

You can run restart from console - run mark2 attach, then type "~restart" into the box at the bottom. See ~help for a list of commands.

From shell you can issue a ~restart with mark2 send ~restart

SupaYoshi commented 11 years ago

So how would I setup a autoreboot? This answer is nice.. but this still doesnt help me with scripts.txt

I can do ~ to execute a mark2 command it says, but actually I cannot? Since ~restart won't work only when attached. So How can i restart?

Help!

barneygale commented 11 years ago

Set up an autoreboot in scripts.txt. Specify a timespec for how often you want it to occur, e.g.

0   */2 *   *   *   ~restart

Will restart every 2 hours. see here for more info on crontab

SupaYoshi commented 11 years ago

Hey, i tried as you said on IRC.

This worked: * * * * * /say foo

;) when i type restart from mark2 attach, it says: 2013-02-24 13:36:55 | Startup script 'start.bat' does not exist!

When doing ~restart from mark2 attach it works.

Maybe that has something to do with it?

haha. help?

barneygale commented 11 years ago

when i type restart from mark2 attach, it says: 2013-02-24 13:36:55 | Startup script 'start.bat' does not exist!

All mark2 console commands begin with a tilde. By typing "restart" into console, you're running the minecraft command restart. This isn't defined in vanilla minecraft so I'd imagine you have a bukkit plugin that hooks restart.

When doing ~restart from mark2 attach it works.

Good

  • * * * * ~restart wont work either btw ;)

Weird that say works but ~restart doesn't. I'll try again to reproduce and get back to you.

barneygale commented 11 years ago

I can't reproduce this. Could you

  1. Make sure you're running very latest mark2
  2. Send me your 'config/mark2.properties', and the 'mark2.properties' in your server directory if you have one defined
  3. Send me your 'scripts.txt'
  4. Send me '/tmp/mark2/nameofyourserver.log'

You could use http://gist.github.com to paste em.

barneygale commented 11 years ago

SupaYoshi, is this still not working for you?

barneygale commented 11 years ago

Please open another issue if you're still experiencing this in current mark2.

SupaYoshi commented 11 years ago

Hey barney, sorry for the late response. I was able to fix it, eventually it just worked ;) I been bsuy with everything and nothing lately. Wil be back soon askin new questions. This was solved for me the way you told me it. and it works.