i have a small problems whit ptokax thoes scripts
 

i have a small problems whit ptokax thoes scripts

Started by Domino, 05 September, 2004, 09:57:19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Domino

hello all

i have some problem
my hub is Ptokax 0,330 debug 1525
OS 2003 Ram 512MB cpu 1ghz internert conections 10Mbit

skript runing
Robo 8,0b
hubtime 1,5
zRightclicker
[8-Ball] - v0.21

when i have abut 1600-1900 usesr its starts to lagg alot
and then i restarts the hus software and after that it?s start to lagg
at 1100-1300 users
is?t the roboscript?

when i look att adv options and in the memory disp
ther are to [8-Ball] - v0.21 thats runing and they are using same amount of memmory
yes a have restarted the hub.

-- [8-Ball] - v0.21
--
-- Written by bonki 2003
--
-- ABOUT:
--   A very simple magic 8-ball implementation.
--
-- AVAILABLE COMMANDS:
--  !-LADY-
--
--  If iInterval is set it even answers if somebody asks a question in main chat
--  and nobody answers after iInterval milliseconds.
--
-- CHANGELOG:
--   v0.21: Bugfix: Auto-answer is now not sent when users PM eachother
--   v0.2:  Added:  Auto-answer in main chat, see "available commands" for further details.
--          Added:  Neat-looking tag :)
--   v0.11: Bugfix: can't remember :P
--   v0.1:  Initial Version

sVer       = "0.21";

sName      = "-LADY-"
sAskPhrase = "!-LADY-";

iInterval  = 8 * 100;
--iInterval  = nil; -- uncomment this if you don't want to use this feature

aAnswers = {
             "Ska jag sga en hemlis!!",
             "Har platinablonderat har",
             "Jag har 2 tuttar utav silikon",
             "Skyll allt pa ISOTOP",
             "Nu skaaaaaaaalaaaaaaaar vi alla PARTYYYYYY",
             "Far hicka nu sorry all",
             "Vill tanka film nan me lediga slot",
             "*Rkpaus*",
             "Kissen r st",
             "Fraga Kraven han stller ju dumma fragor till mig ju",
             "Drop dead u fellow",
             "I like KJP_SF",
             "Im The QUEEN BOSS THE KING",
             "Putte dricker l",
             "Bli kristen o ga till kyrkan med dig",
             "Amatrer dr",
             "Bttre kan ni vl",
             "Nej.",
             "JA.",
             "NOOOOOOOOOOOOOOOOOOO!",
             "Sjlvklart.",
             "THE_BOSS R GUD.",
             "Yeah :)",
             "HELL NO!",
             "Aldrig!",
             "Never ever.",
             "Vad haander er !",
             "No...now go and blame ISOTOP!",
             "Rkna inte med det.",
             "Inte en chans!",
             "Mitt svar r nej.",
             "Va loliga ni ar.",
             "Vill me ha mat!",
             "Min klla sger nej...",
             "Yes, haller med.",
             "koncentrera dig o fraga igen.",
             ":D.",
             "Sager inget ;-)",
             "Anvand hyvet. (A)bort, (R)etry, (I)gnore?_",
             "Jag rknar 50 percent.",
             "Jag vet men sger inget :-)",
             "r det fest hr eller???",
             "Fraga din mamma, she knows better than a stupid billard ball!",
             "Skojar du eller?",
             "Vad? Fattar nada",
             "Huh?",
             "Blah blahhh blahh...",
             "Skojar du elller!",
             "Menar du allvar?",
             "Haha, jag gillar dig...funny guy, you are :-)",
             "Geeeeee...Vilken j*vl*fraga",
             "Sluta sup :-P",
             "Vad tror du om mig egentligen?",
             "Hur ska jag kunna veta",
             "Och dom sger jag stller idiotfrger...",
             "Get a life and leave me alone!",
             "Jag gr som jag vill",
             "TRUE NORWEGIAN BLACK METAL!!!", -- sue me!!!",
             "KRAAAAVEN????",
             "Ask RabidWombat, he'll know for sure :-)", -- honor to whom honor is due! :-)",
             "W-e  a-r-e  B-o-r-g,  y-o-u  w-i-l-l  b-e  a-s-s-i-m-i-l-a-t-e-d,  R-e-s-i-s-t-a-n-c-e  i-s  f-u-t-i-l-e ! Err...I mean...No.",
             "Jag r trstig, vad sger du Boss...",
           };

sLastNick = nil;

function Main()
  randomseed(clock());

  bot = { sBotName  = sName,
          sBotVer   = sVer,
          sBotEmail = "bonki@no-spam.net",
          sBotSpeed = "Sol",                   -- "Speed of Light" =)
          sBotTag   = "<++ V:"..sVer..",P:bonki,T:"..getn(aAnswers)..">",
          sBotDescr = "Magic LADY-Bot v"..sVer.." written by bonki 2003",
          iBotShare = 0 };

  frmHub:RegBot(bot.sBotName);
  UpdateBotInfo();

  SetTimer(iInterval);
end

function NewUserConnected(curUser)
  curUser:SendData(sBotInfo);
end

function OpConnected(curUser)
  curUser:SendData(sBotInfo);
end

function DataArrival(curUser, sData)
  local _, _, cmd, args = strfind(sData, "^%b<>%s+(%S+)%s*([^%|]*)%|$");

  if (cmd == nil) then
    return 0; end;

  cmd = strlower(cmd);

  if (cmd == sAskPhrase) then
    SendToAll(sData);

    -- quick-check whether it COULD be a question somehow

    if (strfind(strsub(args, -3), "%?") and strfind(args, "%s+")) then
      SendToAll(bot.sBotName, GetRandomSentence());
    else
      SendToAll(bot.sBotName, "I'm a magic LADY you fool. Ask me a question or leave me alone!");
    end

    return 1;
  end

  if (iInterval) then
    if (strfind(strsub(args, -3), "%?") and strfind(args, "%s+")) then
      bQuestion = 1;
      StartTimer();
    else
      bQuestion = nil;
      StopTimer();
    end
  end

  return 0;
end

function OnTimer()
  if (bQuestion) then
    SendToAll(bot.sBotName, GetRandomSentence());
  end
  StopTimer();
end

function GetRandomSentence()
 local iRnd = random(getn(aAnswers));
 return aAnswers[iRnd];
end

function UpdateBotInfo()
  sBotInfo = "$MyINFO $ALL "..bot.sBotName.." "..bot.sBotDescr..bot.sBotTag.."$ $"..bot.sBotSpeed..strchar(1).."$"..bot.sBotEmail.."$"..bot.iBotShare.."$" ;
end


Domino

in this script is ther somthing worng  what its "Syntax error: `)' expected;
  last token read: `then' at line 201 in string "


-- Simple Illegalist v0.1
-- Created by Ptaczek, Jan-3, 2003
-- Searches for specified patterns. Useful for illegal share checking
-- some changes by Skippy and RabidWombat and OpiumVolage and trucker
-- add tables warn and kick by nErBoS

BotName = "[Angels]Doc"

function Main()
frmHub:RegBot(BotName)
frmHub:EnableSearchData(1)
end

Files = {   
   ["bestiality"]="Bestiality porn is *sick porn* and not allowed in this hub...Unshare and reconnect!",
   ["r@ygold"]="R@ygold porn is *sick porn* and not allowed in this hub...Unshare and reconnect!",
        ["underage"]="Underage porn is*sick porn* and not allowed in this hub...Unshare and reconnect!",
   ["preteen"]="Preteen porn is *sick porn* and not allowed in this hub...Unshare and reconnect!",
   ["download10 .dat"]="Remove done kazaafiles,unfinsihed files, read share rules,...Unshare and reconnect!",
   ["INCOMPLETE~"]="You are being kicked because incomplite files,read share rules,...Unshare and reconnect!",
   ["_INCOMPLETE__"]="Remove files that begins with _INCOMPLETE__ it is incomplete WinMX download files..Unshare and reconnect!",
   [".part.met"]="Remove files that ends with .part.met it is incomplete eDonkey/eMule download file...Unshare and reconnect!",
   [".antifrag"]="Dont share incomplete download's(.antifrag)...Unshare and reconnect!",
}

--warn = {}
--kick = {}
saveData = { }
usersimune = {"[Angels]-=TheKing=-","Domino","KJP_SF","'[VIP]AnotherGuy","'[VIP]Blue",
"'[VIP]Bullit","'[VIP]Carro","'[VIP]Fjodor","'[VIP]Gamersdot","'[VIP]iSOTOP",
"'[VIP]Mysan","'[VIP]Putte68","'[VIP]Tahu","'[VIP]Tokfan","'[VIP]Webbelina",
"Gudfadern","[ANGELS]Busan","[Angels]Carmen","[Angels]Evil","[Angels]Kraven",
"[ANGELS]MI@","[Angels]Muffalotta","[Angels]Sirgul"} -- Usres you want to not be checked
--log

--kicklog = "kicks.txt" -- In script folder
main = "Active" --- write Deactive and will not send the kicks and bans to the main
-----------//////////////////////////////////////------------------------------------------------------
kickLogNew = "_Kick Log.txt"
function Serialize(tTable, sTableName, hFile, sTab)
   assert(tTable, "tTable equals nil");
   assert(sTableName, "sTableName equals nil");
   assert(hFile, "hFile equals nil");
   assert(type(tTable) == "table", "tTable must be a table!");
   assert(type(sTableName) == "string", "sTableName must be a string!");
   sTab = sTab or "";
   write(hFile, sTab..sTableName.." ={\n" );
   for key, value in tTable do
      local sKey = (type(key) == "string") and format("[%q]",key) or format("[%d]",key);
      if(type(value) == "table") then
         Serialize(value, sKey, hFile, sTab.."\t");
      else
         local sValue = (type(value) == "string") and format("%q",value) or tostring(value);
         write(hFile, sTab.."\t"..sKey.." = "..sValue);
      end
      write(hFile, ",\n");
   end
   write(hFile, sTab.."}");
end
function SaveToFile(file , table , tablename)
   local hFile = openfile(file, "w");
   Serialize(table, tablename, hFile);
   closefile(hFile);
end
function LoadFromFile (file)
   assert(readfrom(file),file.." is not found.Generating new "..file..". All is fine. Don't panic.")
   dostring(read("*all"))
   readfrom()
end
function saveLogData(t,n,i,r,p,a)
   if saveData[n] then
      saveData[n][t] = {}
   else
      saveData[n] = {}
      saveData[n][t] = {}
   end
   saveData[n][t] = {
   ["IP"] = i,
   ["REASON"] = r,
   ["Path"] = p,
   ["ACTION"] = a
      }
   Serialize(saveData, "saveData", kickLogNew)
end
function saveKickCount(n,kC,wC)
   if not saveData[user.sName] then
      saveData[user.sName] = {}
   end
   if wC == "" then
      saveData[user.sName]["KickCount"] = kC
      Serialize(saveData, "saveData", kickLogNew)
   else
      saveData[user.sName]["WarnCount"] = wC
      Serialize(saveData, "saveData", kickLogNew)
   end
end

LoadFromFile(kickLogNew)
-----------//////////////////////////////////////------------------------------------------------------

function NewUserConnected(user)
   if not saveData[user.sName] then
      saveData[user.sName] = {}
   end
   if (saveData[user.sName]["WarnCount"] == nil or saveData[user.sName]["WarnCount"] == 4) then
      saveData[user.sName]["WarnCount"] = 0
      saveKickCount(user.sName,0,"")
   end
   if (saveData[user.sName]["KickCount"] == nil or saveData[user.sName]["KickCount"] == 4) then
      saveData[user.sName]["WarnCount"] = 0
      saveKickCount(user.sName,"",0)
   end
   for i,v in Files do
      user:SendData("$Search Hub:"..BotName.." F?F?0?1?"..i)
   end
end

function DataArrival(user, data)
-----------//////////////////////////////////////------------------------------------------------------
local timeNow = GetTime() --//ths will prevent double entries for the same kick even if the script i plugged this into tries.
-----------//////////////////////////////////////------------------------------------------------------
if( strsub(data, 1, 3) == "$SR" ) then
_,_,nick = strfind( data, "\05(%S*)|$" )
local s,e,path = strfind(data, "$SR%s+%S+%s+(.+)%x+%s+%x+/%x+")
if( nick == BotName) then
   for i=1,getn(usersimune) do
   if (user.bOperator or user.sName == usersimune) then
   return 1
   end
   end
   if (GetProfileName(user.iProfile) == "VIP") then
      if (saveData[user.sName]["KickCount"] == 3) then
         ClearNill(user)
         saveData[user.sName]["KickCount"] = saveData[user.sName]["KickCount"] + 1
         saveKickCount(user.sName, 4,"")
         Reason = FindWhat(data)
         SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason.." FILE: "..path)
         user:SendPM(BotName,"You have been banned. "..Reason)
         if (main == "Active" ) then
            SendToAll(BotName, "The user "..user.sName.." is been banned for "..Reason)
         end
         if (main == "Deactive") then
            return 1
         end
         user:Ban()
      elseif (saveData[user.sName]["WarnCount"] == 3 or saveData[user.sName]["KickCount"] == 1 or saveData[user.sName]["KickCount"] == 2) then
         ClearNill(user)
         saveData[user.sName]["WarnCount"] = saveData[user.sName]["WarnCount"] + 1
         saveData[user.sName]["KickCount"] = saveData[user.sName]["KickCount"] + 1
         saveKickCount(user.sName, saveData[user.sName]["KickCount"],"")
         saveKickCount(user.sName, "",saveData[user.sName]["WarnCount"])
         Reason = FindWhat(data)
         SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..saveData[user.sName]["KickCount"].." kicks. Reason: "..Reason.." FILE: "..path)
         user:SendPM(BotName,"You have been kicked "..saveData[user.sName]["KickCount"].." time(s) at 3 you will be ban. "..Reason.." FILE: "..path)
         --appendto(kicklog)
-----------------------------------//only thing i don't konw werks is user.sIP... i'm not a ptokax sciptor..
         saveLogData(timeNow, user.sName, user.sIP, Reason, path, "Temp Ban")
-----------//////////////////////////////////////------------------------------------------------------
         --write("\r\n"..user.sName.."|"..Reason.."|"..path.."|"..kick[user.sName].."|"..GetTime())
         --writeto()
         if (main == "Active" ) then
            SendToAll(BotName, "The user "..user.sName.." is been kicked for "..Reason)
         end
         if (main == "Deactive") then
            return 1
         end
         user:TempBan()
      elseif (saveData[user.sName]["WarnCount"] == 0 or saveData[user.sName]["WarnCount"] == 1 or saveData[user.sName]["WarnCount"] == 2) then
         ClearNill(user)
         saveData[user.sName]["WarnCount"] = saveData[user.sName]["WarnCount"] + 1
         saveKickCount(user.sName, "",saveData[user.sName]["WarnCount"])
         Reason = FindWhat(data)
         SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..saveData[user.sName]["WarnCount"].." warns. Reason: "..Reason.." FILE: "..path)
         user:SendPM(BotName, "You have been warned "..saveData[user.sName]["WarnCount"].." time(s) at 3 you will be kicked. "..Reason.." FILE: "..path)
         user:SendPM(BotName, "You can come back when you have corrected the problem")
         user:SendPM(BotName, "Disconnected...")
         -----------------------------------//only thing i don't konw werks is user.sIP... i'm not a ptokax sciptor..
         saveLogData(timeNow, user.sName, user.sIP, Reason, path, "Disconnect")
-----------//////////////////////////////////////------------------------------------------------------        
         user:Disconnect()
      end
   elseif not(user.bOperator and GetProfileName(user.iProfile) == "VIP" and user.sName == usersimune) then --this will solve the double log i think
      if (saveData[user.sName]["KickCount"] == 3) then
         ClearNill(user)
         saveData[user.sName]["KickCount"] = saveData[user.sName]["KickCount"] + 1
         saveKickCount(user.sName, saveData[user.sName]["KickCount"],"")
         Reason = FindWhat(data)
         SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got ban. Reason: "..Reason.." FILE: "..path)
         user:SendPM(BotName,"You have been banned. "..Reason)
         if (main == "Active" ) then
            SendToAll(BotName, "The user "..user.sName.." is been banned for "..Reason)
         end
         if (main == "Deactive") then
            return 1
         end
         -----------------------------------//only thing i don't konw werks is user.sIP... i'm not a ptokax sciptor..
         saveLogData(timeNow, user.sName, user.sIP, Reason, path, "Ban")
-----------//////////////////////////////////////------------------------------------------------------
         user:Ban()
      elseif (saveData[user.sName]["KickCount"] == 0 or saveData[user.sName]["KickCount"] == 1 or saveData[user.sName]["KickCount"] then
         ClearNill(user)
         saveData[user.sName]["KickCount"] = saveData[user.sName]["KickCount"] + 1
         saveKickCount(user.sName, saveData[user.sName]["KickCount"],"")
         user:SendData(Bot, saveData[user.sName]["KickCount"])
         Reason = FindWhat(data)
         SendPmToNick("[NL]trucker", BotName, "*** User "..user.sName.." got "..saveData[user.sName]["KickCount"].." kicks. Reason: "..Reason.." FILE: "..path)
         user:SendPM(BotName,"You have been kicked "..saveData[user.sName]["KickCount"].." time(s) at 3 you will be ban. "..Reason.." FILE: "..path)
         --appendto(kicklog)
         -----------------------------------//only thing i don't konw werks is user.sIP... i'm not a ptokax sciptor..
         saveLogData(timeNow, user.sName, user.sIP, Reason, path, "Temp Ban")
-----------//////////////////////////////////////------------------------------------------------------      
         --write("\r\n"..user.sName.."|"..Reason.."|"..path.."|"..kick[user.sName].."|"..GetTime())
         --writeto()
         if (main == "Active" ) then
            SendToAll(BotName, "The user "..user.sName.." is been kicked for "..Reason)
         end
         if (main == "Deactive") then
            return 1
         end
         user:TempBan()
      end
      
      
is any bug in Robo that att 2000 users
or what
i have the ptokax log file but i dont will help me

end yes i have to reinstall all software and skript
and i don?t knowe programing

small questions but to me they are big

thanks for your time

/Domino

Herodes

For the second script try changing this ...
saveData[user.sName]["KickCount"] = saveData[user.sName]["KickCount"] + 1
saveKickCount(user.sName, saveData[user.sName]["KickCount"],"")
user:SendData(Bot, saveData[user.sName]["KickCount"])
to this
saveData[user.sName]["KickCount"] = saveData[user.sName]["KickCount"] + 1
saveKickCount(user.sName, saveData[user.sName]["KickCount"])
user:SendData(Bot, saveData[user.sName]["KickCount"])
Hope it helps. ..

plop

i don't know if you upload stuff with your client but check the next graph.
Maximum upload speed of 10.000 Mbit's
can handle maximum 2023 users
-------------------------------------------------
Upload per second:      10.000 Mbits    1.250 MB
Upload per minute:      118.585 Mbits   14.823 MB
Upload per hour:        6.948 Gbits     889.391 MB
Upload per day:         166.761 Gbits   20.845 GB
Upload per month:       4.886 Tbits     625.353 GB
-------------------------------------------------
This is just the uploaded data
-------------------------------------------------
this is for a old version of verlihub, ptokax uses a bit more upload.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Domino


SMF spam blocked by CleanTalk