Hi folks.
I am running ptokax 0.3.2.6 t4.
Its running good only i want a script who gives info about users who have been online but arent anymore.
At the moment i only got command userinfo when they are in the hub.
So i hope someone can help me with userhistory.
THNKS IN ADVANCE.
Only way you cud do that is my storing the data on entering connections/users
here is a little unfinished one i have quickly wrote
--KeikoLastSettingBot by Phatty
--v1.00
Bot = "Keiko"
function NewUserConnected(user)
if (strfind(user.sMyInfoString," _,b, dcgui = strfind(user.sMyInfoString,"V:0.(%x+.%x+)")
elseif (strfind(user.sMyInfoString,"<+")) then
if strfind(user.sMyInfoString," clienttype = "oDC"
elseif strfind(user.sMyInfoString,"V:0.%x+%a") then
clienttype = "czdc++"
elseif strfind(user.sMyInfoString,"L:") or strfind(user.sMyInfoString,"B:") then
clienttype = "bcdc++"
else
clienttype = "dc++"
end
_,b, dcver = strfind(user.sMyInfoString,"V:0.(%x+)")
end
if strfind(user.sMyInfoString,"M:A") then
mode = "active"
else
mode = "pasive"
end
appendto(user.sName..".txt")
write("At "..date("%d").."/"..date("%m").."-"..date("%Y").." "..date("%T").." "..user.sName.." enters the Hub with IP: "..user.sIP.." with client version "..user.iVersion.." and type: "..clienttype.." and was in mode: "..mode..".\r\n")
writeto()
user.sName(Bot,"You have been logged for server safety")
end
l8rr,,
-phatty
Hia:))
This have been ansvered b4 :)) but il do it once again.
I use "logger-v.2.58" from C H I L L E R.. Its just Gooood
http://chiller3000.tripod.com/p-scripts/ (http://chiller3000.tripod.com/p-scripts/)
Z ya
hmmm damn logger does that :( lol
oh well
--KeikoLastSettingBot by Phatty
--v1.00
Bot = "Keiko"
mcmd = "#"
function NewUserConnected(user)
if (strfind(user.sMyInfoString," _,b, dcgui = strfind(user.sMyInfoString,"V:0.(%x+.%x+)")
elseif (strfind(user.sMyInfoString,"<+")) then
if strfind(user.sMyInfoString," clienttype = "oDC"
elseif strfind(user.sMyInfoString,"V:0.%x+%a") then
clienttype = "czdc++"
elseif strfind(user.sMyInfoString,"L:") or strfind(user.sMyInfoString,"B:") then
clienttype = "bcdc++"
else
clienttype = "dc++"
end
_,b, dcver = strfind(user.sMyInfoString,"V:0.(%x+)")
end
if strfind(user.sMyInfoString,"M:A") then
mode = "active"
else
mode = "pasive"
end
appendto(user.sName..".txt")
write("At "..date("%d").."/"..date("%m").."-"..date("%Y").." "..date("%T").." "..user.sName.." enters the Hub with IP: "..user.sIP.." with client version "..user.iVersion.." and type: "..clienttype.." and was in mode: "..mode..".\r\n")
writeto()
user.sName(Bot,"You have been logged for server safety")
end
function WhileRead(user,str)
while 1 do
line = read()
if line == nil then break end
user:SendPM(Bot,line)
end
readfrom()
end
function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd,str = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
if cmd == mcmd.."check" then
if user.bOperator then
readfrom(str..".txt")
if str == nil then
user:SendData(Bot,"There has been no such user here")
return 1
else
WhileRead(user,str)
return 1
end
end
end
end
end
lol
-phatty
Thanks for the advice i will try both scripts!!!
Oke i have read "logger-v.2.58" from C H I L L E R script.
My problem is that all the commands have to be with ! in front cause my securityscript wont allow other scripts to use prefix +.
Can i just change the ini files where the commands are in or do i have to do more changings.
Also all kick and ban commands writen in the script are diffrent then my commands!!!
Could i simply change them???
Well..as far as i can tell.. its easy to change...
If there is nowhere Prefix == "!" line then all commands must be in that format -- cmd == "!view"so just change ! to whatever u want to...
I might've wrote it hard to understand... just ask for better explanation and i will... try.. ;)
Oke i changed prefix and commands now i get pm from bot saying users arent logged????
Is that good or shouldt that be else way??
could be both 8o
Damn script wont work it logs users but when i try !userinfo on a users wich is logged but not in hub anymore .
Then there wont happen a thing
I cant do anything without seeing WHAT u've changed there...You might've done smth wrong....
just one thing.
if you use !userinfo as command the the ptokax command will be disabled.
and you can't change the ban function in the script cause it has non ;).
it only checks the ban commands from ptokax so that nobody can kick somebody who is in the same or higher ranke then oneself. and logs attemps and successfull ban's.
So chilla.
If i understand it right i dont have to change a thing to get it work??
If i dont change for example +userinfo into !userinfo
then the + command wont work cause my securityscript wont let me use oher +commands then listed in security script