NXS-3 - Page 4
 

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

NXS-3

Started by NightLitch, 29 January, 2004, 18:18:37

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Optimus

Quoteelse a nice bot, but you should get into tables..
you will be so happy, each time you add a new command ;).

hi Chilla, how does that look like?

Btw, nice bot Night

c h i l l a

table with functions:

table = {
   test1 = function() end,
   test2 = function() end,
}

NightLitch

QuoteNow there are 2 commands that don?t work for me:
!mm
!settings

Are my Profiles right?

//WickeD

hehe !settings doesn't exist yet.. forgot to -- in help...

and mm I don't understand why it doesn't work for you when it does for me.

the profiles is right btw.
//NL

NightLitch

QuoteOriginally posted by Chilla

nighlitch...

just one thing, the whois, you took from logger (LIS),
well I just modded it to make it a little faster, well excatly to close the socket as soon as possible, but it was actually from tezlo.

else a nice bot, but you should get into tables..
you will be so happy, each time you add a new command ;).

Thx Chilla. But haven't had the time looking into makin command into tables gonna try it.

How do I call it in Dataarrival then, this is mine now:

function MainCom(curUser,data)
	data=strsub(data,1,strlen(data)-1)
	local _,_,cmd = strfind(data, "%b<>%s+(%S+)")
	if not cmd then cmd = "0" end
	if (strsub(cmd, 1, 1) ~= Prefix1 and strsub(cmd, 1, 1) ~= Prefix2) then
		return 0
	else
		cmd = strlower(cmd)
		if strlen(cmd) > 1 then
			cmd=strsub(cmd,2,strlen(cmd))
			local SendCom = (Com(curUser,data,cmd))
			if not SendCom then
				return 1
			else
				return SendCom
			end
		end
	end
end
//NL

NightLitch

QuoteOriginally posted by Optimus

Btw, nice bot Night

Thx m8 yours is not soo bad either ;-p.

envy the program you set the settings in.

But Is half there I think, I have a CGI atleast coming to webb. that is a start right ? :-)
//NL

NightLitch

Chilla give me a short breif on how I create the command call from table.

It will be much nicer yeah. I don't need to write elseif & cmd== jada jada... any longer then.

plz show me.

/Thx
//NL

c h i l l a

take a look here

and

here

and LIS uses it also :)

NightLitch

One question here Chilla, can I put ex. the tables at the end of my file if I say I want it that way ??
//NL

c h i l l a

sure...  put them table anywhere in the script..

just not into a function, else you only want you table only sometimes.
see ptokax reads a script. first from top to end.
and if you create a table in between, it doesn't matter.

NightLitch

Ahh.. Thx ALOT man can I do the script differently now. hehe

Well gonna try first the command-table soon enough first.
//NL

c h i l l a

no problem,  and what is also great is that your script will get faster, cause you don't need your if's and esleifs anymore :)

NightLitch

Well to tell you the truth, I am sick of them.

Am sick off all curUser:SendData or PM to

So have done it Local Msg etc. now.

But know that is a pain to. hehe

trying to find the fastest way programming by testing my
capasity on the keyboard.

NOTE: This is not a way near to be competion Phatty or anyone
trying to be fast writing in this Forum... hehe

Sure I must be able to do the ex:

Kick/Ban/Warn functions have say almost the same function beside a few lines. that must be able to combine.

Gonna take a closer look in LIS about your IP catching & computing. Cause my HubOwner wants the ip-part in the script.

What is faster; having the ip-script beside or inside my NXS-3 ???

ThX Chilla/ NL
//NL

NightLitch

Question Chilla:

How do I make the profile checks now on the commands ??

do I need more tables ??? or what ??

here is my "test" code:

STATSFUNC = {
	["!test"] = function(curUser,data) DoHelp(curUser,data) end,
}

function DataArrival(curUser,data)
if ( strsub(data, 1, 1) == "<" ) then

		data = strsub(data,strlen(curUser.sName)+4,strlen(data)-1)
		local _,_,cmd = strfind(data,"^(%S+)")

		if cmd and STATSFUNC[cmd] then
			SendToAll(STATSFUNC[cmd](curUser,data))
		end
end
end

plz help me out. this All new, haven't handle the commands in a table.
//NL

NightLitch

New Version out for for the moment:

NXS-3 Version 1.4
//NL

WickeD

Good work m8!  =)

Thx a lot!

//WickeD

WickeD

Look... I typed !status and gut this info in mainchat:
--------------------------------------------------
These are the current stats:
--------------------------------------------------
Unknown commands: 0 x
PM commands: 0 x
--------------------------------------------------
Key commands: 30 x
MyInfo commands: 16 x
ValidateNick commands: 30 x
GetInfo commands: 45 x
Password commands: 3 x
Version commands: 11 x
--------------------------------------------------
GetNickList commands: 11 x
GetBanList commands: 0 x
--------------------------------------------------
Search commands: 0 x
SR commands: 0 x
CTM commands: 0 x
RevCTM commands: 0 x
--------------------------------------------------
ClientSocket Errors: 0 x
MHSocket Errors: 2 x
MHubReconnectCounter: 255 x

And next time I typed !status I gut this massage:
      Hub Status
 -----=============================================================---
      File:               Size:
      ???               ????
      userinfo.dat            0.00 Kb.
      userlog.dat            0.23 Kb.
      awaylog.dat            0.04 Kb.
      warnlog.dat            0.00 Kb.
      kicklog.dat            0.00 Kb.
      banlog.dat            0.00 Kb.
 
       0 user(s) max counted.
       Hub uptime 4 min(s)
       Highest share shared: 0.000 TB
 -----=============================================================---

And I can not get tha first massage again. Only getting the second massage. How come?

Is it me that is very tired ore what?  *Smiling*

//WickeD

c h i l l a

#91
either check in the function or on the command.
But just read, LIS...  you will find so many ways of handling tables in it, it's great :).

you can also call functions you can find it in
crazy script.

NightLitch

WickeD: I will change command name.

Chilla: Ok Thx, Gonna check it out then. but hope if I don't get it, you halp me out.

/NL
//NL

WickeD

Can you add in NSX-3 Bad-Files-Check funktion that check users when they enter the hub?  And when I warned a user today he/she had typed !away and I did get the away massage in a Pm and in OP-Chat to me when I warned he/she. Do you know why?

The warn logged, so the warn works....

//WickeD

NightLitch

hehe a simple bug that is. hehe gonna check it out.

About the file check I prefer DC++ CMD to check for bad files. but can add it later. well se.

/NL
//NL

WickeD

When a user sends a Pm to a user I get that Pm to, In a Pm and in OP-Chat, And every time he/she write it pop?s up in Pm and in OP-Chat to me.  Can you check it out to?

//WickeD

WickeD

The !warn that I tested on my self works, it logged in the warnlog, but it do not show in !info or in !myinfo.


//WickeD

WickeD

The !warn that I tested on my self works, it logged in the warnlog, but it do not show in !info or in !myinfo.

And what is this: WEEKS = 1 ?


//WickeD

NightLitch

Just a little miss by me... Will be fixed in upcoming version.
//NL

WickeD

If you where a girl a kiss you!!! =)

Thx very very very much!!!

//WickeD

SMF spam blocked by CleanTalk