server shutdown function

This commit is contained in:
Max-Wilhelm Bruker
2011-06-24 18:45:39 +02:00
parent 5e3db65846
commit a4c3d48389
33 changed files with 1410 additions and 604 deletions

View File

@@ -454,8 +454,8 @@ ResponseCode ServerSocketInterface::cmdDeckDownload(Command_DeckDownload *cmd, C
return RespNothing;
}
// ADMIN FUNCTIONS.
// Permission is checked by the calling function.
// MODERATOR FUNCTIONS.
// May be called by admins and moderators. Permission is checked by the calling function.
ResponseCode ServerSocketInterface::cmdUpdateServerMessage(Command_UpdateServerMessage * /*cmd*/, CommandContainer * /*cont*/)
{
@@ -463,6 +463,15 @@ ResponseCode ServerSocketInterface::cmdUpdateServerMessage(Command_UpdateServerM
return RespOk;
}
// ADMIN FUNCTIONS.
// Permission is checked by the calling function.
ResponseCode ServerSocketInterface::cmdShutdownServer(Command_ShutdownServer *cmd, CommandContainer * /*cont*/)
{
servatrice->scheduleShutdown(cmd->getReason(), cmd->getMinutes());
return RespOk;
}
ResponseCode ServerSocketInterface::cmdBanFromServer(Command_BanFromServer *cmd, CommandContainer * /*cont*/)
{
QString userName = cmd->getUserName();