help in Leviathan
 

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

help in Leviathan

Started by Muscaria, 25 June, 2007, 15:03:25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Muscaria


hello all =]

if someone knows how to make the registration of an user to be sent in opchat please let me know
and pls send me what file or code need to post it so u can tell me what to edit


thanx
:)

Cêñoßy†ê

#1
if you want script to send message to op-chant when user has registered himself,open Script_Commands.lua with notepad and search for Command["regme"] = function(user, data, where)

then replace that whole function with this

Command["regme"] = function(user, data, where)
	local _,_,_,passw = string.find( data, "%b<>%s+(%S+)%s+(%S+)" )
	if GetUserProfile(user.sName) == nil then
		if passw then
			if CheckName(user.sName) == nil then
				if CheckPassword(passw) == nil then
					SendToOpChat(Cfg.Bot_Name.."> "..user.sName.." used self-registration and is now registered in hub "..frmHub:GetHubName())
					user:SendPM(Cfg.Bot_Name,"\n\r\n\tYou are succesfully registered !\r\tProfile: Reg\r\tNick: "..user.sName.."\r\tPassword: "..passw.."\r\tHub address: "..frmHub:GetHubAddress()..":"..frmHub:GetHubPort().."")
					UserInfo[string.lower(user.sName)] = {Registered_By = user.sName,Time_Registered = os.date("%A %d %B %Y / %X"),Users_Registered = 0, Julian = os.time(os.date("!*t")),Enter = os.date(), SessionTime = 0, TotalTime = 0, Leave = os.date(),Messages = { MAIN = 0, PM = 0},Tag = user.sTag,IP = user.sIP,dns = (WSA.GetHostByAddr(user.sIP) or "")}
					SaveToFile(UserInfoFile,UserInfo, "UserInfo")
					AddRegUser(user.sName,passw,3)
				else
					user:SendMessage(Cfg.Bot_Name,CheckPassword(passw))
				end
			else
				user:SendMessage(Cfg.Bot_Name,CheckName(victim))	
			end
		else
			user:SendMessage(Cfg.Bot_Name, "Right command is !regme <password> !!!")
		end
	else
		user:SendMessage(Cfg.Bot_Name, "Dont even try it!!! We DONT have room for 2 same registered nicks here!!")
	end
	return 1
end


or if you want that users registration request comes to OP-Chat then replace it with this

Command["regme"] = function(user, data, where)
	local _,_,_,passw = string.find( data, "%b<>%s+(%S+)%s+(%S+)" )
	if GetUserProfile(user.sName) == nil then
		if passw then
			SendToOpChat(Cfg.Bot_Name.."> "..user.sName.." wants to get registered with password "..passw.." in hub "..frmHub:GetHubName())
			user:SendMessage(Cfg.Bot_Name, "Your registration request sended to OP-Chat, please wait till some operator will register you !")
		else
			user:SendMessage(Cfg.Bot_Name, "Right command is !regme <password> !!!")
		end
	else
		user:SendMessage(Cfg.Bot_Name, "Dont even try it!!! We DONT have room for 2 same registered nicks here!!")
	end
	return 1
end
Powered By Leviathan™ 2nd Generation v. 1.9

Muscaria

 
hello bro,
just to tell that the user dont reg by him self only the ops can reg and they can reg vip,svip,op,superop,master,administrator and owner...prob i need to edit all those reging just dont know how :)

:) i figure it ot bro thanx a lot
cheers
ok i need your help again friends :)
i get the eror when i try to change the profile of a user....this is the eror

Script error found, please notify C??o?y?? or T?M??r?V?ll?R with this message:
Leviathan v3.0
...syMexico/scripts/LV_DataBase/lua/Script_Commands.lua:435: attempt to call global 'ChangeRegUser' (a nil value)

and here is the part of the code...
Command["changeprofile"] = function(user, data)
	if user.iProfile == 6 or Command_Permission["changeprofile"][user.iProfile] == 1 then
	local s,e,cmd,victim,prof = string.find(data, "%b<>%s+(%S+)%s+(%S+)%s+(%S+)")
		if victim then
			if frmHub:isNickRegged(victim) then
				if Cvrt.P1[string.lower(prof)] then
					if GetUserProfile(victim) == Cvrt.P1[string.lower(prof)] then
						user:SendData(Cfg.Bot_Name,"Seams user: "..victim.." is allready registered as: "..string.upper(prof).." !!!")
						return 1
					end
					if ProtectionTable[user.iProfile][Cvrt.P1[string.lower(prof)]] == 0 then
						user:SendData(Cfg.Bot_Name,"You silly mortal... you cant upgrade to ["..prof.."] with that profile!!!")
					else
						SendToAll(Cfg.Bot_Name,victim.."'s profile changed to: "..string.upper(prof).." by: "..Cvrt.P2[user.iProfile].." "..user.sName)
						ChangeRegUser(victim,frmHub:GetUserPassword(victim),Cvrt.P1[string.lower(prof)])
						local who = GetItemByName(victim) 
						if who then
							who:SendPM(Cfg.Bot_Name,"Your profile is changed to "..string.upper(prof).."  by: "..Cvrt.P2[user.iProfile].." "..user.sName)
						else
							user:SendPM(Cfg.Bot_Name,who.."'s profile is changed to "..string.upper(prof).."  with password: "..frmHub:GetUserPassword(who))
						end
					end
				else
					user:SendData(Cfg.Bot_Name, "*** You used a unknown profile! (profiles: owner, netfounder, moderator, master, operator, vip, reg)")
				end
			else
				user:SendData(Cfg.Bot_Name,"Cant change profile from: "..victim.." because that nick aint registered!!")
			end
		else
			user:SendData(Cfg.Bot_Name, "Right command is !changeprofile <nick> <owner/netfounder/moderator/master/operator/vip/reg> !!!")
		end
	else
		Forbidden(user)
	end
	return 1
end

SMF spam blocked by CleanTalk