cSlave v0.2.2 a
 

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

cSlave v0.2.2 a

Started by Corayzon, 21 March, 2004, 12:38:07

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Corayzon

cSlave-0.22b has hit the streetz ...

here is one of the newest scripts on the block...and still being in development this should cause a stir...

whats so special about this script u ask?

this script is entirly editable via the settings.lua file. settings range from every single msg the hub may send to profile names and levels to command names and levels to how the hub kicks...well, lets just say everything.

im not gonna go on about it...ur just gonna have to see for urself

cSlave Download

Some cSlave features::
editable profile names and levels
editable help files for each profile
editable profile tags
intro, outro system
random intro, outro system
editable system messages (every single message!)
easy variable swapping for message settings
heaps of kicking, banning, regisetering settings
editable system templates (eg. release list, awaylist, ect...)
editable command names and levels
and a whole lot more
 
please remember this is a beta version...and may not function correcty if some settings are set incorrectly (no validation as of yet)...also the docs arnt complete...so if u have problems...just drop an email to corayzon@yahoo.com.au

NightLitch

nice script, but it's sad you rate it yourself...

Keep up the fine work.

/NL
//NL

Corayzon

eheheheh

cheerz dude! :D

Corayzon

<<<  This is what its all about!  >>>

settings.lua
-------------------------------------------------------------------------------------
systemprefix = "+"
prefixs["+"] = "yes"
prefixs["!"] = "yes"
prefixs["\"] = "yes"
prefixs[">"] = "yes"
sBot = "-cSlave-"

-- FileSettings
file["releases"] = sysPath.."txts/releases.txt"
file["rules"] = "txts/rules.txt"
file["network"] = "txts/network.txt"
file["motd"] = "txts/motd.txt"
file["sfv"] = "txts/sfv.txt"

-- LoggingSettings
logtofile = nil
logconnections = "yes"
logkicking = "yes"
logbanning = "yes"

-- Profile Levels and Names
profiles["Master"] = 1
profiles["Administrator"] = 3
profiles["Operator"] = 5
profiles["VIP"] = 7
profiles["Reg"] = 9
profiles["none"] = 11

-- Profile Help Files
helpfile["Master"] = sysPath.."txts/help/helptemplate.txt"
helpfile["Administrator"] = sysPath.."txts/help/helptemplate.txt"
helpfile["Operator"] = sysPath.."txts/help/helptemplate.txt"
helpfile["VIP"] = sysPath.."txts/help/helptemplate.txt"
helpfile["Reg"] = sysPath.."txts/help/helptemplate.txt"
helpfile["none"] = sysPath.."txts/help/helptemplate.txt"

-- Intro/Outro Profile Tages
protag["Master"] = "HuB~OwNeR"
protag["Administrator"] = "aDmiNiStraToR"
protag["Operator"] = "oPerAtoR"
protag["VIP"] = "ViP"
protag["none"] = sBot

-- Intro/Outro Messages
randomintro = "yes"
randomoutro = "yes"
introprofilelevel = 8
outroprofilelevel = 8
opconnectmsg = "[USERNAME] has just connected"
opdisconnectmsg = "[USERNAME] has just disconected"
connectmsg = "[USERNAME] has just connected"
disconnectmsg = "[USERNAME] has just disconnected"

-- User Registering Messages
msgreguser1 = ""
msgreguser2 = " has been registered as an "
msgreguser3 = " by "
msgreguser4 = "*** Unable to register "
msgreguser5 = " as an "
msgreguser6 = "*** You are unable to register a user with a same or higher level"
msgunreguser1 = ""
msgunreguser2 = " has been unregistered by "
msgunreguser3 = "*** You are unable to unregister a user with a same or higher level profile"
msgunreguser4 = "*** You are unable to unregister a user that has no profile: "
msgreglist = "\r\n\r\n\tR e g i s t e r e d   U s e r   L i s t\r\n\r\n"
msgreglist1 = "***You are unable to view registered users for a profile that doesn't exist"

-- Hub Info Messages
msghubinfo = "\r\n\r\n\tH u b   I n f o r m a t i o n\r\n\r\n"
msghubname = "\t\tHub Name\t\t"
msghubdescription = "\t\tHub Description\t\t"
msgusercount = "\t\tCurrent User Count\t\t"
msghubbotname = "\t\tHub Bot Name\t\t"
msgmaxusers = "\t\tMax Users\t\t"
msgminshare = "\t\tMin Share\t\t"
msgopchatbot = "\t\tOperator Chat Bot\t\t"
msgredirectaddress = "\t\tRedirect Address\t\t"
msgregserver = "\t\tReg Server\t\t"
msgtotalshare = "\t\tTotal Hub Share\t\t"

-- User Info Messages
msguserinfo = "\r\n\r\n\tU s e r   I n f o r m a t i o n\r\n\r\n"
msgusername = "\t\tUser Name\t\t"
msgipaddress = "\t\tIP Address\t\t"
msgprofiletype = "\t\tProfile\t\t\t"
msguserstatus = "\t\tStatus\t\t\t"
msgversion = "\t\tVersion\t\t\t"
msgprofilenone = "none"
msguseronline = "online"
msguseraway = "away"

-- Kick Statistics Messages
msgshowkicks = "\r\n\r\n\tK i c k i n g / B a n n i n g   S t a t i s t i c s\r\n\r\n"
msgkick = "\t\tKicks:\t\t"
msgban = "\t\tBans:\t\t"
msgtimeban = "\t\tTimebans:\t"
msgunban = "\t\tUnbans:\t\t"
showkicksmsg1 = "*** Unable to load kick statistics for: "

-- Command Usage Return Messages
msgusage = "***usage: "
msgusagefrom = sBot

-- KickingOptions
sendrulesonkick = "yes"
banonkicks = 5
kicktime = 20
kickmsg1 = ""
kickmsg2 = " is being kicked by "
kickmsg3 = " has been kicked by "
kickmsg4 = " because: "
kickmsg5 = "You have been kicked by "
kickmsg6 = "*** You are unable to kick a user with a same or higher level profile"
kickmsg7 = "*** You are unable to kick a user that does not exist"

-- BanningOptions
sendrulesonban = "yes"
banmsg1 = ""
banmsg2 = " is being banned by "
banmsg3 = " has been banned by"
banmsg4 = " because: "
banmsg5 = "You have been banned by "
banmsg6 = " for "
banmsg7 = " minutes "
banmsg8 = "*** You are unable to ban a user with a same or higher level profile"
banmsg9 = "*** You are unable to ban a user that does not exist"

-- Away\Back Options
awaymsg1 = ""
awaymsg2 = " is now away"
awaymsg3 = " is now away because: "
backmsg1 = ""
backmsg2 = " is now back "
msgawaylist = "\r\n\r\n\tA w a y   L i s t\r\n\r\n"

-- Release Options
msgrelease = "\r\n\r\n\tR e l e a s e   L i s t\r\n\r\n"
msgfindrelease = "\r\n\r\n\tF i n d   R e l e a s e\r\n\r\n"
msgaddrelease1 = "Release '"
msgaddrelease2 = "' has been added by "

and many more....

[NL]trucker

Corayzon


looking good there m8

keep up the good work :-))
Owner of FunnyHub
 
Funyhub.no-ip.info
       Forum Master of


Corayzon

time to do a quick grafix user interface for the settings file  :D, omg...this is gonna be good

Corayzon

#6
just updated the settings file system :D

instead of teedious settings like:-

-- User Registering Messages
msgreguser1 = ""
msgreguser2 = " has been registered as an "
msgreguser3 = " by "
msgreguser4 = "*** Unable to register "
msgreguser5 = " as an "
msgreguser6 = "*** You are unable to register a user with a same or higher level"
msgunreguser1 = ""
msgunreguser2 = " has been unregistered by "
msgunreguser3 = "*** You are unable to unregister a user with a same or higher level profile"
msgunreguser4 = "*** You are unable to unregister a user that has no profile: "
msgreglist = "\r\n\r\n\tR e g i s t e r e d   U s e r   L i s t\r\n\r\n"
msgreglist1 = "***You are unable to view registered users for a profile that doesn't exist"

i have replaced them with settings like:-

-- User Registering Messages
regusermsg = "#u has been registered as an #x by #e"
regusererr1 = "*** Unable to register #u as an #x"
regusererr2 = "*** You are unable to register a user with a same or higher level: #x"
unregmsg = "#u has been uregistered by #e"
unregerr1 = "*** You are unable to unregister a user with a same or higher level profile: #u: #x"
unregerr2 = "*** You are unable to unregister a user that has no profile: #u"
msgreglist = "\r\n\r\n\tR e g i s t e r e d   U s e r   L i s t\r\n\r\n"
msgreglist1 = "***You are unable to view registered users for a profile that doesn't exist: #x"


The new system has a convertstring function that transforms #h to the hubname, #u to the current username and many more...

Ull just have to wait till the 0.2.3 release to see ;)

aL1en

nice coraz
im glad to be in the hub everyday and how things going :)

improving fast  :))

Skrollster

Haven't tested yet, nor have i checked the source..

but i have a question: can you use

prefixs["STring longer then 1 char"] = yes ???

Corayzon

well...u can store a string longer then 1 in the prefix's table...

but when the systrem checks for prefixs it is checked to the first char in the msg string...

so no i wouldnt work...but i could do ;)

Nice to hear from u all...gimmi ur sujestions and report bugs please! =]

??????Hawk??????

Nice script m8...

Very neatly done  :]

Corayzon

heya guys...

i been very busy latly and between work i have got time to work on the script...

but i have allmost completed the settings file format and will be releasing cSlave 0.22 b very very soon...

:D:D:D:D

Corayzon

just got some time to do some work on the scripts :D... and now i have allmost done version 0.22b (updated settings file)

hopefully after work 2night my mates will gimmi some time to work instead of smokin cones them :P

 8)


Corayzon

#14
^^^ Update Above ^^^

I have added 'settings help.txt'  to the download site and am now working on producing a nice little help file for setting up the settings file for your own hub...

Here is another sneak peak at the settings.lua file...

-- cSlave 0.2.2 b :: settings.lua :: writin by Corayzon
-------------------------------------------------------------------------------------
sBot = "-cSlave-"
bHideBot = no		--not implemented
bMainChatConvert = yes
bPmChatConvert = yes

systemprefix = "+"
prefixs["+"] = yes

sendrulesonkick = yes
sendrulesonban = yes
kicktime = 60
banonkicks = 5
randomintro = yes
randomoutro = yes
introprofilelevel = 8
outroprofilelevel = 8

-- FileSettings
file["releases"] = sysPath.."txts/releases.txt"
file["rules"] = "txts/rules.txt"
file["network"] = "txts/network.txt"
file["motd"] = "txts/motd.txt"
file["sfv"] = "txts/sfv.txt"

-- LoggingSettings		--not implemented	-- ToDo :: Logging settings file (its gonna be good (aq2 admin server styles))
logtofile = no
logconnections = yes
logkicking = yes
logbanning = yes

-- Profile Levels and Names
profiles["Master"] = 1
profiles["Administrator"] = 3
profiles["Operator"] = 5
profiles["VIP"] = 7
profiles["Reg"] = 9
profiles["none"] = 11

-- Profile Help Files
helpfile["Master"] = sysPath.."txts/help/helptemplate.txt"
helpfile["Administrator"] = sysPath.."txts/help/helptemplate.txt"
helpfile["Operator"] = sysPath.."txts/help/helptemplate.txt"
helpfile["VIP"] = sysPath.."txts/help/helptemplate.txt"
helpfile["Reg"] = sysPath.."txts/help/helptemplate.txt"
helpfile["none"] = sysPath.."txts/help/helptemplate.txt"

-- Intro/Outro Profile Tages
protag["Master"] = "HuB~OwNeR"
protag["Administrator"] = "aDmiNiStraToR"
protag["Operator"] = "oPerAtoR"
protag["VIP"] = "ViP"
protag["none"] = sBot

-- Intro/Outro Messages
welcomemsg = "Welcome to #h #u, have a nice stay =]"
opconnectmsg = "#u has just connected"
opdisconnectmsg = "#u has just disconected"
connectmsg = "#u has just connected"
disconnectmsg = "#u has just disconnected"

-- User Registering Messages
regusermsg = "#u has been registered as an #x by #e"
regusererr1 = "*** Unable to register #u as an #x"
regusererr2 = "*** You are unable to register a user with a same or higher level: #x"
unregmsg = "#u has been uregistered by #e"
unregerr1 = "*** You are unable to unregister a user with a same or higher level profile: #u: #x"
unregerr2 = "*** You are unable to unregister a user that has no profile: #u"
msgreglist = "#n#n#tR e g i s t e r e d   U s e r   L i s t#n#n#t"
msgreglist1 = "***You are unable to view registered users for a profile that doesn't exist: #x"

-- Kicking Messages
kickmsg1 = "#u has been kicked by #e"
kickmsg2 = "#u  is being kicked by #e because: #x"
kickmsg3 = "You have been kicked by #e"
kickmsg4 = "#e has kicked you because: #x"
kickerr1 = "*** You are unable to kick a user with a same or higher level profile: #x"
kickerr2 = "*** You are unable to kick a user that does not exist: #u"

-- Banning\Time Banning Messages
banmsg1 = "#u has been banned by #e"
banmsg2 = "#u is being banned by #e because: #x "
banmsg3 = "You have been banned by #e"
banmsg4 = "#e has banned you because: #x"
banerr1 = "*** You are unable to ban a user with a same or higher level profile: #x"
banerr2 = "*** You are unable to ban a user that does not exist: #u"
timebanmsg1 = "#u has been banned for #r minutes by #e"
timebanmsg2 = "#u has been banned for #r minutes by #e because: #x"
timebanmsg3 = "You have been banned by #e for #r mintues"
timebanmsg4 = "#e has banned you for #r minutes because #x"

--Unbanning Messages
unbanmsg1 = "#u has been unbanned by #e"

-- Hub Info Messages
hubinfomsg[1] = "#n#n#tH u b   I n f o r m a t i o n#n#n"
hubinfomsg[2] = "#t#tHub Name#t#t#h#n"
hubinfomsg[3] = "#t#tHub Description#t#t#hd#n"
hubinfomsg[4] = "#t#tCurrent User Count\#t#t#uc#n"
hubinfomsg[5] = "#t#tHub Bot Name#t#t#hb#n"
hubinfomsg[6] = "#t#tMax Users#t#t#mu#n"
hubinfomsg[7] = "#t#tMin Share#t#t#ms#n"
hubinfomsg[8] = "#t#tOperator Chat Bot#t#t#op#n"
hubinfomsg[9] = "#t#tRedirect Address#t#t#ra#n"
hubinfomsg[10] = "#t#tTotal Hub Share#t#t#hs#n"

-- User Info Messages
userinfomsg[1] = "#n#n#tU s e r   I n f o r m a t i o n#n#n"
userinfomsg[2] = "#t#tUser Name#t#t#u#n"
userinfomsg[3] = "#t#tIP Address#t#t#e#n"
userinfomsg[4] = "#t#tProfile#t#t#t#x#n"
userinfomsg[5] = "#t#tStatus#t#t#t#r#n"
userstatusonline = "online"
userstatusaway = "away[#e]"
userinfoerr = "*** Unable to get userinfo: #u"

-- Kick Statistics Messages
kickinfomsg[1] = "#n#n#tK i c k i n g / B a n n i n g   S t a t i s t i c s#n#n"
kickinfomsg[2] = "#t#tKicks:#t#t#e#n"
kickinfomsg[3] = "#t#tBans:#t#t#x#n"
kickinfomsg[4] = "#t#tTimebans:#t#r#n"
kickinfomsg[5] = "#t#tUnbans:#t#t#a#n"
kickinfoerr = "*** Unable to load kick statistics for: #u"

-- Away\Back Options
awaymsg1 = "#u is now away"
awaymsg2 = "#u is now away because: #e"
backmsg = "#u is now back #e"
awaylistmsg = "#n#n#tA w a y   L i s t#n#n"
awaylistformat = "#t#t#u#t[#e]#n"

-- Release Options
releaselistmsg = "#n#n#tR e l e a s e   L i s t#n#n"
findreleasemsg = "#n#n#tF i n d   R e l e a s e#n#n"
releaselistformat = "#t#t#e#n"
addreleasemsg = "Release '#e' has been added by #u"

-- Command Usage Return Messages
usagemsg = "*** Usage: #e <#x>"
msgusagefrom = sBot

And much more!!!

This might look a bit complex and confusing but with the help of a good settings help file, u will find it very easy to set up and maintain your hub, without any problems what so ever =]

Corayzon

#15
and once again...please report any strange activities, errors or sujestions to Corayzon@yahoo.com.au or in a reply to this topic =]

i want ur feedback!...thankz guys!

Corayzon

im just on mi lunch break so i dont have time to rar it up but,...

There was a bug in the variable swapping system that
stopped the opchat from processing when
bPmChatConvert is set to 'yes'

to fix this up just replace the DataArrival function with this one in cSlave.lua

function DataArrival(user, data)
	
	data=strsub(data,1,strlen(data)-1) 
	_,_,cmd=strfind(data, "%b<>%s+(%S+)")
	if cmd ~= nil then cmd = strlower(cmd) end

	if cmd ~= nil and prefixs[strsub(cmd,1,1)] then
		cmd = strsub(cmd, 2, strlen(cmd))

		-- away.lua commands
		------------------------------------------
		if 	cmd == cmdaway 			or 
			cmd == cmdback 			or 
			cmd == cmdawaylist 			then
			if doAwayCommand(user, data, cmd) then return 1 end
		end

		-- kicking-banning.lua commands
		------------------------------------------
		if 	cmd == cmdkick 			or 
			cmd == cmdban 			or 
			cmd == cmdtimeban 			or 
			cmd == cmdunban 			or
			cmd == cmdshowkicks		then
			if doKickBanCommand(user, data, cmd) then return 1 end
		end

		-- client.lua commands
		------------------------------------------
		if 	cmd == cmdhelp 			or 
			cmd == cmdrules 			or
			cmd == cmdnetwork 			or
			cmd == cmdmotd 			or
			cmd == cmdsfv 			or
			cmd == cmdhubinfo 			or
			cmd == cmdgetuserinfo		or
			cmd == cmdmyinfo			or
			cmd == cmdadvert			then
			if doClientCommand(user, data, cmd) then return 1 end
		end

		-- registering.lua commands
		------------------------------------------
		if 	cmd == cmdreguser			or 
			cmd == cmdunreguser		or
			cmd == cmdreglist			then
			if doRegisterCommand(user, data, cmd) then return 1 end
		end

		-- release.lua commands
		------------------------------------------
		if 	cmd == cmdrelease			or 
			cmd == cmdaddrelease		then
			if doReleaseCommand(user, data, cmd) then return 1 end
		end

		if 	cmd == cmdslots			then
			if slotsCommand(user, data, cmd) then return 1 end
		end

		if	cmd == cmdusercommands		then
			if doUserCommands(user) then return 1 end
		end

	elseif 	strfind(data, "!help") 				or 
		strfind(data, "!restartscripts") 			or
		strfind(data, "!getbanlist") 			or
		strfind(data, "!clrtempban") 			or
		strfind(data, "!clrpermban") 			or
		strfind(data, "!drop") 				or
		strfind(data, "!getinfo") 			or
		strfind(data, "!op") 				or
		strfind(data, "!gag") 				or
		strfind(data, "!ungag") 			or
		strfind(data, "!restart") 			or
		strfind(data, "!restartscripts") 			or
		strfind(data, "!addreguser") 			or
		strfind(data, "!delreguser") 			or
		strfind(data, "!ipinfo") 				or
		strfind(data, "!iprangeinfo") 			or
		strfind(data, "!userinfo") 			or
		strfind(data, "!me") 				or
		strfind(data, "!help") 				then
		return

	elseif strsub(data, 1, strlen(user.sName) + 2) == "<"..user.sName..">" then
		if bMainChatConvert == yes then
			local _, _, fromUser, sMsg = strfind(data, "<(%S+)>%s+(.*)")
			SendToAll(fromUser, translateString(sMsg, user.sName, user.sIP))
			return 1
		end

	elseif strfind(data, "$To:") then
		if bPmChatConvert == yes then
			local s, e, toUser, fromUser, sMsg = strfind(data,    "%$To:%s(%S+)%sFrom:%s(%S+)%s$(.*)$")
			if toUser == frmHub:GetOpChatName() then return end
			sMsg = strsub(sMsg, 4 + strlen(user.sName), strlen(sMsg) - 4 + strlen(user.sName))
			SendPmToNick(toUser, fromUser, translateString(sMsg, toUser, user.sIP))
			return 1
		end

	elseif strsub(data, 1, 3)  ==  "$SR" then
		if slotsCommand(user, data, cmd) then return 1 end
	end
end

also there have been a few bug fixes so if u have a fualty version just redownload it from the ftp

and dont forget to report bug and errors to me to guys  8)

SMF spam blocked by CleanTalk