1 /* $Id$ */
2 /***************************************************************************
3  *                   (C) Copyright 2003-2010 - Stendhal                    *
4  ***************************************************************************
5  ***************************************************************************
6  *                                                                         *
7  *   This program is free software; you can redistribute it and/or modify  *
8  *   it under the terms of the GNU General Public License as published by  *
9  *   the Free Software Foundation; either version 2 of the License, or     *
10  *   (at your option) any later version.                                   *
11  *                                                                         *
12  ***************************************************************************/
13 package games.stendhal.client.actions;
14 
15 import games.stendhal.client.ClientSingletonRepository;
16 import marauroa.common.game.RPAction;
17 
18 /**
19  * Send a support request message.
20  */
21 class SupportAction implements SlashAction {
22 
23 	/**
24 	 * Execute a chat command.
25 	 *
26 	 * @param params
27 	 *            The formal parameters.
28 	 * @param remainder
29 	 *            Line content after parameters.
30 	 *
31 	 * @return <code>true</code> if command was handled.
32 	 */
33 	@Override
execute(final String[] params, final String remainder)34 	public boolean execute(final String[] params, final String remainder) {
35 		final RPAction tell = new RPAction();
36 
37 		tell.put("type", "support");
38 		tell.put("text", remainder);
39 
40 		ClientSingletonRepository.getClientFramework().send(tell);
41 
42 		return true;
43 	}
44 
45 	/**
46 	 * Get the maximum number of formal parameters.
47 	 *
48 	 * @return The parameter count.
49 	 */
50 	@Override
getMaximumParameters()51 	public int getMaximumParameters() {
52 		return 0;
53 	}
54 
55 	/**
56 	 * Get the minimum number of formal parameters.
57 	 *
58 	 * @return The parameter count.
59 	 */
60 	@Override
getMinimumParameters()61 	public int getMinimumParameters() {
62 		return 0;
63 	}
64 }
65