Advanced Text for MOTD - Page 2
 

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

Advanced Text for MOTD

Started by Metaphase, 16 March, 2004, 18:43:37

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

bolamix

Yay, I've noticed [NL]Pur's (and others') code posts before... True, [ code ] is the usual method, but i tend to find that [ php] is prettier, and maybe even more readable ;) I've thought before about the fact that it could confuse people, though... but it's the 1st time i notice a remark to that effect.
Sharing is of the essence!

Live music >> Aiwadirock! live music hub
PtokaX knowledge >> The PtokaX Wiki

[NL]Pur

i agree with bolamix , it's looking alot nicer,

and if you not only read the error but also thought a few secs about it you could have solved it yourself.

BoJlk

...okey [NL]Pur i'll know for next time...

bastya_elvtars

so then tell me exactly what you want

onjoin info on user?

user commands sent from hhub to client?

both?

what?

 ?(
Everything could have been anything else and it would have just as much meaning.

BoJlk

Personally me.
I would like for a user to see his own statistics
like
your share is: xxx
you are in: xxx many hubs
etc.

bastya_elvtars

QuoteOriginally posted by BoJlk
Personally me.
I would like for a user to see his own statistics
like
your share is: xxx
you are in: xxx many hubs
etc.

personally i like the idea, i put it into lawmaker, but a.i. and nxs contain it too, and i guess many more greater scripts than mine.

i dont know if this is an option in robocop, it would be nice to have. request that feature, opti will surely implement it if its not there

the only problem is that MOTD is sent before script execution, so first u see the MOTD, then u se what the script tells u on connection, so better not put this in motd, rather put into RC or whatever.

this motd thingy in yhub is to resolve the non-scriptable program. personally im sick of yhub, it consumes cpu and there is lackl of features that i.e. verli has. In ptokax such features can be reached by scripting.
Everything could have been anything else and it would have just as much meaning.

Typhoon

onjoin info is also available in my signature ;o)

Typhoon?



bastya_elvtars

#32
QuoteOriginally posted by Typhoon?
onjoin info is also available in my signature ;o)

Typhoon?

hey mods

please delete self-advertisements! bleeeeeeeeeeeeeeh

 :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D  :D
Everything could have been anything else and it would have just as much meaning.

BoJlk

#33
bastya_elvtars You should know...  :D  :D  :D

stewpot_smile2005

--Your Bot's Name
Bot = "IntroBot"

-- This Registers the Bot in the userlist.
function Main()
frmHub:RegBot(Bot)
end

-- This triggers when a user enters the hub
function NewUserConnected(user)

    user:SendData(Bot,"Welcome "..user.sName.." Your IP is: "..user.sIP.." ")
    user:SendData(Bot,"your information")
    user:SendData(Bot,"sharesize:"..getMyInfoString(user).share)
    user:SendData(Bot,"tag:"..getMyInfoString(user).tag)
    user:SendData(Bot,"speed:"..getMyInfoString(user).speed)
    user:SendData(Bot,"email:"..getMyInfoString(user).email)
    user:SendData(Bot,"description:"..getMyInfoString(user).description)
end

I want it to look some thing like this

----------------

your user name is : XXX
your IP is : XXXXXXXXX
your share size is : XXXXXXXXXXXXXX
Your email is :XXXXXXXXXXXXXXXXXXXXXX
Your descipstion is : XXXXXXXXXXXXX
and some on

GrinSlaW

search the forum and you will see lots of this kind of bots you want you can configure those by your own if not then say whats your problem is and we will help


cheers
.:: AcExtreme ::. | .:: AcPro ::.

Psycho_Chihuahua

QuoteOriginally posted by stewpot_smile2005
--Your Bot's Name
Bot = "IntroBot"

-- This Registers the Bot in the userlist.
function Main()
frmHub:RegBot(Bot)
end

-- This triggers when a user enters the hub
function NewUserConnected(user)

    user:SendData(Bot,"Welcome "..user.sName.." Your IP is: "..user.sIP.." ")
    user:SendData(Bot,"your information")
    user:SendData(Bot,"sharesize:"..getMyInfoString(user).share)
    user:SendData(Bot,"tag:"..getMyInfoString(user).tag)
    user:SendData(Bot,"speed:"..getMyInfoString(user).speed)
    user:SendData(Bot,"email:"..getMyInfoString(user).email)
    user:SendData(Bot,"description:"..getMyInfoString(user).description)
end

I want it to look some thing like this

----------------

your user name is : XXX
your IP is : XXXXXXXXX
your share size is : XXXXXXXXXXXXXX
Your email is :XXXXXXXXXXXXXXXXXXXXXX
Your descipstion is : XXXXXXXXXXXXX
and some on

I'm not quit sure what u actually want but from what i gather you just wanted an edit on that script so here you go:
--Your Bot's Name
Bot = "IntroBot"

-- This Registers the Bot in the userlist.
function Main()
frmHub:RegBot(Bot)
end

-- This triggers when a user enters the hub
function NewUserConnected(user)

    user:SendData(Bot,"your information")
    user:SendData(Bot,"your username is: "..user.sName.." ")
	user:SendData(Bot,"your IP is: "..user.sIP.." ")
    user:SendData(Bot,"your sharesize is: "..getMyInfoString(user).share)
    user:SendData(Bot,"your email is:"..getMyInfoString(user).email)
    user:SendData(Bot,"your description is: "..getMyInfoString(user).description)
    user:SendData(Bot,"your connection is: "..getMyInfoString(user).speed)
    user:SendData(Bot,"your tag is: "..getMyInfoString(user).tag)
end

Not tested (only for Syntax with Ptx Hubsoft)
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Znupi

I will post my variant ... hope it helps ...
Bot = frmHub:GetHubBotName()
linii = "-----------------------------------------------"

function NewUserConnected(user)
	user:SendData(Bot,"////////////////////////////"..linii)
	user:SendData(Bot,"  -[ [ [ Znup Bot ver. 0.2 ] ] ]-")
	user:SendData(Bot,"     DeVeloPeD bY ZnuPi")
	user:SendData(Bot,"     http://znupi.sytes.net")
	user:SendData(Bot,"  -[ [ [ Znup Bot ver. 0.2 ] ] ]-")
	user:SendData(Bot,"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"..linii)
	user:SendData(Bot,"-----------------------------------------------"..linii)
	user:SendData(Bot,"////////////////////////////")
	user:SendData(Bot,"       llllllll YOUR INFO llllllll")
	user:SendData(Bot,"Nick: "..user.sName)
	user:SendData(Bot,"IP: "..user.sIP)
	user:SendData(Bot,"Client: "..user.sClient.." "..user.sClientVersion)
	if (user.sMode=="P") then
		user:SendData(Bot,"Mode : Passive")
	end
	if (user.sMode=="A") then
		user:SendData(Bot,"Mode : Active")
	end
	user:SendData(Bot,"ShareSize : "..user.iShareSize.." B")
	user:SendData(Bot,"Profile : Regular User")
	user:SendData(Bot,"You are in "..user.iHubs.." hubs with "..user.iSlots.." slots")
	user:SendData(Bot,"       llllllll YOUR INFO llllllll")
	user:SendData(Bot,"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"..linii)
	user:SendData(Bot,"-----------------------------------------------"..linii)
	user:SendData(Bot,"////////////////////////////"..linii)
	user:SendData(Bot,"       llllllllll HUB INFO llllllllll")
	user:SendData(Bot,"Name : "..frmHub:GetHubName())
	user:SendData(Bot,"Topic : "..title)
	user:SendData(Bot,"Users : "..frmHub:GetUsersCount())
	user:SendData(Bot,"Hub Bot : "..frmHub:GetHubBotName())
	user:SendData(Bot,"       llllllllll HUB INFO llllllllll")
	user:SendData(Bot,"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"..linii)
end

and the output of this is ...
<Da'ZnuP'BoT> ////////////////////////////-----------------------------------------------
<Da'ZnuP'BoT>   -[ [ [ Znup Bot ver. 0.2 ] ] ]-
<Da'ZnuP'BoT>      DeVeloPeD bY ZnuPi
<Da'ZnuP'BoT>      http://znupi.sytes.net
<Da'ZnuP'BoT>   -[ [ [ Znup Bot ver. 0.2 ] ] ]-
<Da'ZnuP'BoT> \\\\\\\\\\\\\\\\\\\\\\\\\\\\-----------------------------------------------
<Da'ZnuP'BoT> ----------------------------------------------------------------------------------------------
<Da'ZnuP'BoT> ////////////////////////////
<Da'ZnuP'BoT>        llllllll YOUR INFO llllllll
<Da'ZnuP'BoT> Nick: [RO][-Znupi-]
<Da'ZnuP'BoT> IP: 127.0.0.1
<Da'ZnuP'BoT> Client: DC++ 0.674
<Da'ZnuP'BoT> Mode : Passive
<Da'ZnuP'BoT> ShareSize : 0 B
<Da'ZnuP'BoT> Profile : Regular User
<Da'ZnuP'BoT> You are in 8 hubs with 10 slots
<Da'ZnuP'BoT>        llllllll YOUR INFO llllllll
<Da'ZnuP'BoT> \\\\\\\\\\\\\\\\\\\\\\\\\\\\-----------------------------------------------
<Da'ZnuP'BoT> ----------------------------------------------------------------------------------------------
<Da'ZnuP'BoT> ////////////////////////////-----------------------------------------------
<Da'ZnuP'BoT>        llllllllll HUB INFO llllllllll
<Da'ZnuP'BoT> Name : PalaSh e un idiot
<Da'ZnuP'BoT> Topic : PalaSh e un mare idiot
<Da'ZnuP'BoT> Users : 1
<Da'ZnuP'BoT> Hub Bot : Da'ZnuP'BoT
<Da'ZnuP'BoT>        llllllllll HUB INFO llllllllll
<Da'ZnuP'BoT> \\\\\\\\\\\\\\\\\\\\\\\\\\\\-----------------------------------------------

Hope I helped! :)

Znupi

sry for advertising ... you can delete those lines... :D

Znupi

Oh, and another thing ... If u want to send a customized message before "This hub is running PtokaX DC Hub 0.3.4.0 [debug] (UpTime: 0 days, 0 hours, 14 minutes)" ... u should make it this way :

function GetNickListArrival(user,data)
user:SendData(Bot,"Insert welcome message here")
end

This way ye old "This hub is running PtokaX DC Hub 0.3.4.0 [debug] (UpTime: 0 days, 0 hours, 14 minutes)" will be the second message in ur hub, thus the welcome message discplayed in hublist.org will be customized! :D

Typhoon

Quote from: Znupi on 10 June, 2006, 13:02:29
I will post my variant ... hope it helps ...
Bot = frmHub:GetHubBotName()
linii = "-----------------------------------------------"

function NewUserConnected(user)
	user:SendData(Bot,"////////////////////////////"..linii)
	user:SendData(Bot,"  -[ [ [ Znup Bot ver. 0.2 ] ] ]-")
	user:SendData(Bot,"     DeVeloPeD bY ZnuPi")
	user:SendData(Bot,"     http://znupi.sytes.net")
	user:SendData(Bot,"  -[ [ [ Znup Bot ver. 0.2 ] ] ]-")
	user:SendData(Bot,"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"..linii)
	user:SendData(Bot,"-----------------------------------------------"..linii)
	user:SendData(Bot,"////////////////////////////")
	user:SendData(Bot,"       llllllll YOUR INFO llllllll")
	user:SendData(Bot,"Nick: "..user.sName)
	user:SendData(Bot,"IP: "..user.sIP)
	user:SendData(Bot,"Client: "..user.sClient.." "..user.sClientVersion)
	if (user.sMode=="P") then
		user:SendData(Bot,"Mode : Passive")
	end
	if (user.sMode=="A") then
		user:SendData(Bot,"Mode : Active")
	end
	user:SendData(Bot,"ShareSize : "..user.iShareSize.." B")
	user:SendData(Bot,"Profile : Regular User")
	user:SendData(Bot,"You are in "..user.iHubs.." hubs with "..user.iSlots.." slots")
	user:SendData(Bot,"       llllllll YOUR INFO llllllll")
	user:SendData(Bot,"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"..linii)
	user:SendData(Bot,"-----------------------------------------------"..linii)
	user:SendData(Bot,"////////////////////////////"..linii)
	user:SendData(Bot,"       llllllllll HUB INFO llllllllll")
	user:SendData(Bot,"Name : "..frmHub:GetHubName())
	user:SendData(Bot,"Topic : "..title)
	user:SendData(Bot,"Users : "..frmHub:GetUsersCount())
	user:SendData(Bot,"Hub Bot : "..frmHub:GetHubBotName())
	user:SendData(Bot,"       llllllllll HUB INFO llllllllll")
	user:SendData(Bot,"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"..linii)
end

and the output of this is ...
<Da'ZnuP'BoT> ////////////////////////////-----------------------------------------------
<Da'ZnuP'BoT>   -[ [ [ Znup Bot ver. 0.2 ] ] ]-
<Da'ZnuP'BoT>      DeVeloPeD bY ZnuPi
<Da'ZnuP'BoT>      http://znupi.sytes.net
<Da'ZnuP'BoT>   -[ [ [ Znup Bot ver. 0.2 ] ] ]-
<Da'ZnuP'BoT> \\\\\\\\\\\\\\\\\\\\\\\\\\\\-----------------------------------------------
<Da'ZnuP'BoT> ----------------------------------------------------------------------------------------------
<Da'ZnuP'BoT> ////////////////////////////
<Da'ZnuP'BoT>        llllllll YOUR INFO llllllll
<Da'ZnuP'BoT> Nick: [RO][-Znupi-]
<Da'ZnuP'BoT> IP: 127.0.0.1
<Da'ZnuP'BoT> Client: DC++ 0.674
<Da'ZnuP'BoT> Mode : Passive
<Da'ZnuP'BoT> ShareSize : 0 B
<Da'ZnuP'BoT> Profile : Regular User
<Da'ZnuP'BoT> You are in 8 hubs with 10 slots
<Da'ZnuP'BoT>        llllllll YOUR INFO llllllll
<Da'ZnuP'BoT> \\\\\\\\\\\\\\\\\\\\\\\\\\\\-----------------------------------------------
<Da'ZnuP'BoT> ----------------------------------------------------------------------------------------------
<Da'ZnuP'BoT> ////////////////////////////-----------------------------------------------
<Da'ZnuP'BoT>        llllllllll HUB INFO llllllllll
<Da'ZnuP'BoT> Name : PalaSh e un idiot
<Da'ZnuP'BoT> Topic : PalaSh e un mare idiot
<Da'ZnuP'BoT> Users : 1
<Da'ZnuP'BoT> Hub Bot : Da'ZnuP'BoT
<Da'ZnuP'BoT>        llllllllll HUB INFO llllllllll
<Da'ZnuP'BoT> \\\\\\\\\\\\\\\\\\\\\\\\\\\\-----------------------------------------------

Hope I helped! :)

why not make it into a string instead of beating the shit out of the userobject so f**king many times ?? ..

something like this for example ..

SendAdMessage = function()
		local border1 = "\t===========H=U=B==I=N=F=O==========="
		local border2 = "\t====================================="
		local tosend = "\r\n\r\n"..border1.."\r\n"..
		 "	?Hub Owner:     "..tSetup.HubInfo.Owner.."\r\n"..
		 "	?Hub Name:      "..frmHub:GetHubName().."\r\n"..
		 "	?Hub Address:   "..tSetup.HubInfo.HubAddy.."\r\n".. 
		 "	?Web Address:  "..tSetup.HubInfo.HomePage.."\r\n"..
		 "	?Complain @:   "..tSetup.HubInfo.Complaint_Email.."\r\n"..
		 "	?Hub Network:  +network".."\r\n"..
		 "	?Help Menu:      +help".."\r\n"..
		 "	?Hub Rules:      +rules".."\r\n"..border2.."\r\n"
		SendToAll(tSetup.Bots.BotName,tosend)
	end,


cheers Typhoon?



Znupi

There's more than one way to acheiving something ... and yes, the one string idea is better ... but I don't use PtokaX as my hubsoft, I use YnHub instead, I only use PtokaX to make LUA scripts 'coz I like the language ... and I think it looks cooler my way ... oh well ...

Typhoon

Quote from: Znupi on 10 June, 2006, 23:34:56
There's more than one way to acheiving something ... and yes, the one string idea is better ... but I don't use PtokaX as my hubsoft, I use YnHub instead, I only use PtokaX to make LUA scripts 'coz I like the language ... and I think it looks cooler my way ... oh well ...

sure it could be that it looks better your way, but all those object calls are quite a waste and waste resembles in memory leak and so on..

i guess you're here to find out more about Lua, then you should check out the above functions and do some memory/time testing to see the results...

by calling the same user object for 27 times is in my opinion a very poor way of doing it..

but check it out a bit and give some feed back..



Znupi

Ok ... so if I understood right ... you're suggesting something more like :
function NewUserConnected(user)
	if (user.sMode == "P") then
		mode = "Passive"
	end
	if (user.sMode == "A") then
		mode = "Active"
	end
	local linii = "-----------------------------------------------"
	local slash = "////////////////////////////"
	local bslash = "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
	local motd = "\r\n\r\n\t\t"..slash..linii.."\r\n"..
		"\t\t  -[ [ [ Znup BoT ver. 0.2 ] ] ]-\r\n"..
		"\t\t     DeVeloPeD bY ZnuPi\r\n"..
		"\t\t     http://znupi.sytes.net\r\n"..
		"\t\t"..bslash..linii.."\r\n"..
		"\t\t"..linii..linii.."\r\n"..
		"\t\t"..slash..linii.."\r\n"..
		"\t\t       llllllll YOUR INFO llllllll\r\n"..
		"\t\tNick: "..user.sName.."\r\n"..
		"\t\tIP: "..user.sIP.."\r\n"..
		"\t\tClient: "..user.sClient.." "..user.sClientVersion.."\r\n"..
		"\t\tMode: "..mode.."\r\n"..
		"\t\tSharesize: "..user.iShareSize.." B\r\n"..
		"\t\tProfile: Regular User\r\n"..
		"\t\tYou are in "..user.iHubs.." hubs with "..user.iSlots.." slots\r\n"..
		"\t\t       llllllll YOUR INFO llllllll\r\n"..
		"\t\t"..bslash..linii.."\r\n"..
		"\t\t"..linii..linii.."\r\n"..
		"\t\t"..slash..linii.."\r\n"..
		"\t\t       llllllllll HUB INFO llllllllll\r\n"..
		"\t\tName: "..frmHub:GetHubName().."\r\n"..
		"\t\tTopic: "..title.."\r\n"..
		"\t\tUsers: "..frmHub:GetUsersCount().."\r\n"..
		"\t\tHub Bot: "..frmHub:GetHubBotName().."\r\n"..
		"\t\t       llllllllll HUB INFO llllllllll\r\n"..
		"\t\t"..bslash..linii.."\r\n"
	user:SendData(Bot,motd)
end

Is that better? ;D

Markitos

Quote from: Znupi on 11 June, 2006, 12:25:50
Ok ... so if I understood right ... you're suggesting something more like :
function NewUserConnected(user)
	if (user.sMode == "P") then
		mode = "Passive"
	end
	if (user.sMode == "A") then
		mode = "Active"
	end
	local linii = "-----------------------------------------------"
	local slash = "////////////////////////////"
	local bslash = "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
	local motd = "\r\n\r\n\t\t"..slash..linii.."\r\n"..
		"\t\t  -[ [ [ Znup BoT ver. 0.2 ] ] ]-\r\n"..
		"\t\t     DeVeloPeD bY ZnuPi\r\n"..
		"\t\t     http://znupi.sytes.net\r\n"..
		"\t\t"..bslash..linii.."\r\n"..
		"\t\t"..linii..linii.."\r\n"..
		"\t\t"..slash..linii.."\r\n"..
		"\t\t       llllllll YOUR INFO llllllll\r\n"..
		"\t\tNick: "..user.sName.."\r\n"..
		"\t\tIP: "..user.sIP.."\r\n"..
		"\t\tClient: "..user.sClient.." "..user.sClientVersion.."\r\n"..
		"\t\tMode: "..mode.."\r\n"..
		"\t\tSharesize: "..user.iShareSize.." B\r\n"..
		"\t\tProfile: Regular User\r\n"..
		"\t\tYou are in "..user.iHubs.." hubs with "..user.iSlots.." slots\r\n"..
		"\t\t       llllllll YOUR INFO llllllll\r\n"..
		"\t\t"..bslash..linii.."\r\n"..
		"\t\t"..linii..linii.."\r\n"..
		"\t\t"..slash..linii.."\r\n"..
		"\t\t       llllllllll HUB INFO llllllllll\r\n"..
		"\t\tName: "..frmHub:GetHubName().."\r\n"..
		"\t\tTopic: "..title.."\r\n"..
		"\t\tUsers: "..frmHub:GetUsersCount().."\r\n"..
		"\t\tHub Bot: "..frmHub:GetHubBotName().."\r\n"..
		"\t\t       llllllllll HUB INFO llllllllll\r\n"..
		"\t\t"..bslash..linii.."\r\n"
	user:SendData(Bot,motd)
end

Is that better? ;D
U could use string.rep 4 this
local linii = "-----------------------------------------------"
local slash = "////////////////////////////"
local bslash = "\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

Check the lua 5 manual :-)


bastya_elvtars

Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk