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 ^__^
--********************************************************--
--********************************************************--
--** **--
--** 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
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