Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: src/com/kongregate/http/HttpMethodWrapper.java
- ===================================================================
- --- src/com/kongregate/http/HttpMethodWrapper.java (revision 12199)
- +++ src/com/kongregate/http/HttpMethodWrapper.java (working copy)
- @@ -155,14 +155,15 @@
- * Creates an HttpMethod for banning the given user AS the user with the given session lookup key
- * SessionID must belong to a moderator or greater.
- */
- - public static HttpMethodWrapper createBanMethod( String sessionLookupKey, String username, int minutes ){
- + public static HttpMethodWrapper createBanMethod( String sessionLookupKey, String username, int minutes, String reason ){
- // Format is: /accounts/<username>/ban
- String url = URL.getBaseURL() + "/accounts/" + username + "/ban_internal";
- PostMethod method = createPostMethod( url );
- NameValuePair[] request = {
- createAdminKeyPair(),
- new NameValuePair("uid", sessionLookupKey),
- - new NameValuePair("duration", String.valueOf( minutes ) )
- + new NameValuePair("duration", String.valueOf( minutes ) ),
- + new NameValuePair("reason", reason )
- };
- method.setRequestBody(request);
- int[] acceptedCodes = { HttpStatus.SC_OK };
- @@ -174,7 +175,7 @@
- * Creates an HttpMethod for banning the given user AS the user with the given session lookup key
- * SessionID must belong to a moderator or greater.
- */
- - public static HttpMethodWrapper createSilenceMethod( String sessionLookupKey, String username, int minutes ){
- + public static HttpMethodWrapper createSilenceMethod( String sessionLookupKey, String username, int minutes, String reason ){
- // Format is: /silencings.json
- String url = URL.getBaseURL() + "/silencings.json";
- PostMethod method = createPostMethod( url );
- @@ -182,7 +183,8 @@
- createAdminKeyPair(),
- new NameValuePair("username", username),
- new NameValuePair("uid", sessionLookupKey),
- - new NameValuePair("duration", String.valueOf( minutes ) )
- + new NameValuePair("duration", String.valueOf( minutes ) ),
- + new NameValuePair("reason", reason )
- };
- method.setRequestBody(request);
- int[] acceptedCodes = { HttpStatus.SC_OK };
- Index: src/com/kongregate/comm/Opcode.java
- ===================================================================
- --- src/com/kongregate/comm/Opcode.java (revision 12199)
- +++ src/com/kongregate/comm/Opcode.java (working copy)
- @@ -75,6 +75,7 @@
- public static final String PARAM_SESSION_ID = "sessionid"; // The session id
- public static final String PARAM_SESSION_LOOKUP_KEY = "slk"; // The session lookup key
- public static final String PARAM_DURATION = "duration"; // duration
- + public static final String PARAM_REASON = "reason"; // reason
- public static final String PARAM_GAME_ID = "game_id"; // The game ID
- public static final String PARAM_GAME_NAME = "game_name"; // Game's full name
- public static final String PARAM_DATA = "data"; // Data
Add Comment
Please, Sign In to add comment