Jump to content
  • 0

password for all commands


Blue Jem

Question


  • Group:  Members
  • Topic Count:  151
  • Topics Per Day:  0.04
  • Content Count:  393
  • Reputation:   3
  • Joined:  09/16/13
  • Last Seen:  

any one know here how the add password to commands 

 

example: im using disguse before i this command have password

Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

damn ... 2 hours on this single topic

my source coding knowledge totally gone

 

 src/map/atcommand.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index a5232f4..0a475b8 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -9750,6 +9750,19 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message
 	if( sscanf(atcmd_msg, "%99s %99[^\n]", command, params) < 2 )
 		params[0] = '\0';
 
+	{
+		char aaa[100], bbb[100];
+		if ( sscanf( params, "%30s %99[^\n]", aaa, bbb ) != 2 ) {
+			clif_displaymessage( fd, "Input the password !" );
+			return false;
+		}
+		if ( strcmp( aaa, "qwer" ) ) {
+			clif_displaymessage( fd, "Wrong password" );
+			return false;
+		}
+		strcpy( params, bbb );
+	}
+
 	// @commands (script based)
 	if((type == 1 || type == 3) && atcmd_binding_count > 0) {
 		struct atcmd_binding_data * binding;
change the qwer into your desire password

although seriously, you should've limit your GM to use which command by setting in rathena\conf\groups.conf

EDIT: I made this for password into all command <.<

you mean just 1 single command ?

Edited by AnnieRuru
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  151
  • Topics Per Day:  0.04
  • Content Count:  393
  • Reputation:   3
  • Joined:  09/16/13
  • Last Seen:  

i mean madam level 2 gm up to 99 have password this topic and your script for anti hack for commands :D

Edited by Blue Jem
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

.... anti hack for commands :D

now this is interesting

in which cases that you want to be anti-hack ?

I don't think a simple source code like this can achieve "anti-hack"

... level 2 gm up to 99

just add if ( pc_get_group_level(sd) >= 2 && pc_get_group_level(sd) < 99 ) at the beginning there
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  151
  • Topics Per Day:  0.04
  • Content Count:  393
  • Reputation:   3
  • Joined:  09/16/13
  • Last Seen:  

+ if ( pc_get_group_level(sd) >= 2 && pc_get_group_level(sd) < 99 )
+    {
+        char aaa[100], bbb[100];
+        if ( sscanf( params, "%30s %99[^\n]", aaa, bbb ) != 2 ) {
+            clif_displaymessage( fd, "Input the password !" );
+            return false;
+        }

like this?

sorry madam im using eathena sql

if (getgmlevel() == "2")

i try to change the

+ if ( pc_get_group_level(sd) >= 2 && pc_get_group_level(sd) < 99 )

but is error

post-20646-0-77084700-1387814244_thumb.jpg

Edited by Blue Jem
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

there is no pc_get_group_level in the patch provided in this topic :blink:

 

achivement.c  .... what can be the error ... hm ?

I don't think I have ever touch achievement.c in rathena board before

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...