Change Password
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Change Password

Started by 6Marilyn6Manson6, 27 November, 2004, 17:20:08

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

6Marilyn6Manson6

hello,
I search script very easy.... I search script with 1 command:

!ch_pass

and with this command I change my personal password [for all profile] Thanks a lot ^__^

sylvi

--********************************************************--
--********************************************************--
--** **--
--** In this Bot the users livels are settings: **--
--** **--
--** Newbie = lvl 5 **--
--** Reg = lvl 3 **--
--** Vip = lvl 2 **--
--** **--
--** **--
--********************************************************--
--********************************************************--

BotName = "ChPass"

function Main()
   frmHub:RegBot(BotName)
end

function DataArrival(user, data)
   if (strsub(data,1,1) == "<") then
      data = strsub(data,1,strlen(data)-1)
      local s,e,cmd = strfind( data, "%b<>%s+(%S+)" )
      --//Command ChangePass
      if (cmd=="!changepass" or cmd=="!chpass" or cmd=="!Changepass") then
         if (user.iProfile == -1) then
            user:SendPM(BotName, "Du bist leider nicht regestriert. Der Befehl steht dir nicht zur Verf?gung|")
         else
            local s,e,pwd = strfind(data, "%b<>%s%S+%s*(%S*)")
            if pwd == "" then
               user:SendPM(BotName, "Bitte gib mir dein neues Passwort damit ich es umtragen kann")
               return 1
            elseif (user.bOperator) then
               AddRegUser(user.sName, pwd, user.iProfile)
               user:SendPM(BotName, "Die Regestierung deines neuen Passwortes ist abgeschlossen. Dein neues Passwort ist: " ..pwd.."|")
               return 1
            elseif (user.iProfile == 3 or user.iProfile == 2) then --//Here you can change the users livel
               SendToOps(BotName, "The user "..user.sName.." have change the password in: " ..pwd.."|")
               AddRegUser(user.sName, pwd, user.iProfile)
               user:SendPM(BotName, "Die Regestierung deines neuen Passwortes ist abgeschlossen. Dein neues Passwort ist: " ..pwd.."|")
               return 1
            end
         end
      end
   end
end

nErBoS

Hi,

Here you have it another one protected against bad nicks and passwords...

--## PASSWORD CHANGER BOT
--## Request by 6Marilyn6Manson6
--## Made by nErBoS
--## Commands:
--##	+changepass 	- Changes your password

sBot = "PC-Bot"

function Main()
	frmHub:RegBot(sBot)
end

function DataArrival(user, data)
	if (strsub(data,1,1) == "<" or strsub(data,1,5+strlen(sBot)) == "$To: "..sBot) then
		data = strsub(data,1,strlen(data)-1)
		local s,e,cmd = strfind(data, "%b<>%s+(%S+)")
		if (cmd == "+changepass") then
			local s,e,sPass = strfind(data, "%b<>%s+%S+%s+(%S+)")
			if (sPass == nil) then
				user:SendPM(sBot, "Syntax Error, +changepass , you must write a password.")
			elseif (user.iProfile == -1) then
				user:SendPM(sBot, "You aren't regged, so you don't have a password.")
			elseif (strfind(sPass, "[%c|\n\r]")) then
				user:SendPM(sBot, "Invalid Password. Try Again.")
			elseif (strfind(user.sName, "[%c|\n\r]")) then 
				user:SendPM(sBot, "Your nick is invalid. Please choose a new one.")
			else
				AddRegUser(user.sName,sPass,user.iProfile)
				user:SendPM(sBot, "Your password has been changed to: "..sPass.." . Please recconect to make effect.")
			end
			return 1
		end
	end
end

Best regards, nErBoS
--## nErBoS Spot ##--

SMF spam blocked by CleanTalk