PtokaX forum

Development Section => Your Developing Problems => Topic started by: jiten on 20 April, 2004, 16:45:07

Title: PM shown in main
Post by: jiten on 20 April, 2004, 16:45:07
how can i change this script, so that the PM is shown in a new window and not in main? i'm using oDC 5.21 and this is what happens:

[16:42] Private message from ?bot?: You have not reached the minimum share ammount of 1 GB.
[16:42] Private message from ?bot?: Hint: Go to File - Settings - Sharing and then click on 'Add Folder' in order to reach the minimum share.
[16:43] // Type !help in main for your available commands!


-- the code is below

botname = "?bot?"
minShareGB = 1

kb = 1024
mb = kb*kb
gb = kb*kb*kb
minShare = minShareGB * gb

function Main()
frmHub:RegBot(BotName)
end

function NewUserConnected(user)
local t = tokenize(user.sMyInfoString,"$")
local num = t[getn(t)]

if tonumber( num ) < minShare then
user:SendPM(botname, "You have not reached the minimum share ammount of "..minShareGB.." GB.")
user:SendPM(botname, "Hint: Go to File - Settings - Sharing and then click on 'Add Folder' in order to reach the minimum share.")

end
end

function tokenize (inString,token)
_WORDS = {}
local matcher = "([^"..token.."]+)"
gsub(inString, matcher, function (w) tinsert(_WORDS,w) end)
return _WORDS
end
Title:
Post by: 10togo on 20 April, 2004, 17:19:06
QuotePM shown in main

change
frmHub:RegBot(BotName)
in this
frmHub:RegBot(botname)
Title:
Post by: ??????Hawk?????? on 20 April, 2004, 18:34:11
hi m8  

the script is set to show in new window...

you need to change you client settings in advanced.

tick .  pop up private messages from users that are not on line
tick. pop up private messages.
untick . ignore private messages from users that are not online
Title:
Post by: Skrollster on 20 April, 2004, 18:46:20
do as 10togo wrote and everything will be fine...
Title:
Post by: jiten on 20 April, 2004, 21:56:00
well, i changed my DC's settings just like Hawk said and it worked.
Title:
Post by: Vntalk on 21 April, 2004, 00:23:20
if you could create a bot that can allow OP to read users PM that would be great
Title:
Post by: Yokozuna on 21 April, 2004, 00:45:27
Quoteif you could create a bot that can allow OP to read users PM that would be great

Vntalk, it is possible but it should not be done !
It would be spying and a deep cut into privacy of every user.
No support from my side !


Yokozuna
Title:
Post by: (uk-kingdom)John on 21 April, 2004, 12:56:17
Those bots are already out.. let users find out your doing that and you will lose everyone.. Its private messaging not monitored messaging..
Title:
Post by: pHaTTy on 21 April, 2004, 13:12:20
QuoteOriginally posted by Vntalk
if you could create a bot that can allow OP to read users PM that would be great

dont ask such a thing, or ya'll have ur head cut off in ere =)
Title:
Post by: [NL]Pur on 21 April, 2004, 13:56:00
Quotewell, i changed my DC's settings just like Hawk said and it worked.

i think you didn't solve it there, now it only works for you and not the other ppl in the hub.