| 116 | } |
| 117 | |
| 118 | String CommandProcessor::pvp(ConnectionId connectionId, String const&) { |
| 119 | if (!m_universe->isPvp(connectionId)) { |
| 120 | m_universe->setPvp(connectionId, true); |
| 121 | if (m_universe->isPvp(connectionId)) |
| 122 | m_universe->adminBroadcast(strf("Player {} is now PVP", m_universe->clientNick(connectionId))); |
| 123 | } else { |
| 124 | m_universe->setPvp(connectionId, false); |
| 125 | if (!m_universe->isPvp(connectionId)) |
| 126 | m_universe->adminBroadcast(strf("Player {} is a big wimp and is no longer PVP", m_universe->clientNick(connectionId))); |
| 127 | } |
| 128 | |
| 129 | if (m_universe->isPvp(connectionId)) |
| 130 | return "PVP active"; |
| 131 | else |
| 132 | return "PVP inactive"; |
| 133 | } |
| 134 | |
| 135 | String CommandProcessor::whoami(ConnectionId connectionId, String const&) { |
| 136 | return strf("Server: You are {}. You are {}an Admin", |
nothing calls this directly
no test coverage detected